summaryrefslogtreecommitdiff
path: root/TAO/examples/Simple/time/Time_i.cpp
blob: 13c0494ecd2e78dc0d5a3fc60fbd3bc74450aea1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// $Id$

#include "Time_i.h"

ACE_RCSID(Time, Time_i, "$Id$")

// Constructor
Time_i::Time_i (void)
{
  // no-op
}

// Copy  Constructor
Time_i::Time_i (Time_i &t)
  : POA_Time (t)
{
  // no-op
}

// Destructor

Time_i::~Time_i (void)
{
  // no-op
}

// Set the ORB pointer.

void
Time_i::orb (CORBA::ORB_ptr o)
{
  this->orb_ = CORBA::ORB::_duplicate (o);
}

// Return the current date/time on the server.

CORBA::Long
Time_i::current_time (TAO_ENV_SINGLE_ARG_DECL_NOT_USED)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  return CORBA::Long (ACE_OS::time (0));
}

// Shutdown.

void 
Time_i::shutdown (TAO_ENV_SINGLE_ARG_DECL_NOT_USED )
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  ACE_DEBUG ((LM_DEBUG,
              "%s\n",
              "Time_i is shutting down"));

  // Instruct the ORB to shutdown.
  this->orb_->shutdown ();
}