Use =default for skeleton copy constructor
[ACE_TAO.git] / TAO / examples / Simple / time-date / Time_Date.h
blob1e109e220918b33eadc54ad27e658140affc1834
1 // -*- C++ -*-
2 #include "ace/Task.h"
3 #include "ace/svc_export.h"
4 #include "tao/default_resource.h"
5 #include "Alt_Resource_Factory.h"
7 class Time_Date_i;
9 /**
10 * @class My_Resource_Factory
12 * @brief Illustrates how to select the appropriate @c ACE_Reactor.
14 * If we're running in a single-threaded configuration this will be
15 * the @c ACE_Reactor::instance singleton. Otherwise, it'll be the
16 * ORB's own default @c ACE_Reactor, which is defined by the
17 * @c TAO_Default_Resource_Factory.
19 class Alt_Resource_Factory_Export My_Resource_Factory
20 : public TAO_Default_Resource_Factory
22 public:
23 /// Return the @c ACE_Reactor that will be utilized by the ORB.
24 virtual ACE_Reactor *get_reactor ();
27 ACE_FACTORY_DECLARE (Alt_Resource_Factory, My_Resource_Factory)
29 /**
30 * @class DLL_ORB
32 * @brief Define a class that dynamically links an ORB into a server
33 * process via the @c ACE_Service_Configurator.
35 class ACE_Svc_Export DLL_ORB : public ACE_Task_Base
37 public:
38 /// Initialize the @c TAO_ORB_Manager.
39 virtual int init (int argc, ACE_TCHAR *argv[]);
41 /// Shutdown the @c TAO_ORB_Manager.
42 virtual int fini ();
44 /// Concurrency hook.
45 virtual int svc ();
47 public:
48 /// ORB pseudo-reference.
49 CORBA::ORB_var orb_;
51 /// Reference to the POA.
52 PortableServer::POA_var poa_;
54 /// Reference to the POA Manager.
55 PortableServer::POAManager_var poa_manager_;
58 /**
59 * @class Time_Date_Servant
61 * @brief Define a class that dynamically links the Time_Date service
62 * into a server process via the @c ACE_Service_Configurator.
63 * Note that this assumes the ORB has been linked previously.
65 class ACE_Svc_Export Time_Date_Servant : public ACE_Service_Object
67 public:
68 /// Constructor.
69 Time_Date_Servant ();
71 /// Initialize the @c Time_Date servant.
72 virtual int init (int argc, ACE_TCHAR *argv[]);
74 /// Parse the "command-line" arguments.
75 int parse_args (int argc, ACE_TCHAR *argv[]);
77 private:
78 /// Servant for the @c Time_Date object.
79 Time_Date_i * servant_;
81 /// File where the IOR of the server object is stored.
82 const ACE_TCHAR *ior_output_file_;
84 /// Name of the ORB we're linking dynamically.
85 ACE_CString orb_;
88 // The following Factory is used by the <ACE_Service_Config> and
89 // dll_orb.conf file to dynamically initialize the state of the
90 // Time_Date service.
91 ACE_SVC_FACTORY_DECLARE (DLL_ORB)
92 ACE_SVC_FACTORY_DECLARE (Time_Date_Servant)