summaryrefslogtreecommitdiff
path: root/TAO/examples/Simple/time/Time_i.h
blob: 0091d2ea09f3d9286571ed76587d29cc8e805833 (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
58
59
60
61
62
63
64
65
// -*- C++ -*-
// $Id$

// ============================================================================
//
// = LIBRARY
//    TAO/tests/Simple/time
//
// = FILENAME
//    Time_i.h
//
// = DESCRIPTION
//    This class implements the Time IDL interface.
//
// = AUTHOR
//    Darrell Brunsch <brunsch@cs.wustl.edu>
//
// ============================================================================

#ifndef TIME_I_H
#define TIME_I_H

#include "TimeS.h"

class Time_i: public POA_Time
{
  // = TITLE
  //    Time Object Implementation
  //
  // = DESCRIPTION
  //    Implementation of a simple object that has two methods, one that
  //    return the current time/date on the server and the other that
  //    shuts down the server.
public:
  // = Initialization and termination methods.
  Time_i (void);
  // Constructor

  Time_i (Time_i &);
  // Copy Constructor added because g++ generates a 
  // bad one if not defined

  ~Time_i (void);
  // Destructor
  
  virtual CORBA::Long time (CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));
  // Return the current time/date on the server
  
  virtual void shutdown (CORBA::Environment &env)
    ACE_THROW_SPEC ((CORBA::SystemException));
  
  // Shutdown the server.

  void orb (CORBA::ORB_ptr o);
  // Set the ORB pointer.

private:
  CORBA::ORB_var orb_;
  // ORB pointer.
};

#endif /* TIME_I_H */