Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / orbsvcs / Naming_Service / Naming_Service.h
blob858145e7a6f6315f016e3bc1ce8e9c71adf1ca56
1 // -*- C++ -*-
3 //==========================================================================
4 /**
5 * @file Naming_Service.h
7 * This class implements the functionality of a Naming_Service in
8 * a stand-alone process.
10 * @author Nagarajan Surendran (naga@cs.wustl.edu) Marina Spivak <marina@cs.wustl.edu>
12 //==========================================================================
15 #ifndef TAO_NAMING_SERVICE_H
16 #define TAO_NAMING_SERVICE_H
18 #include /**/ "ace/pre.h"
19 #include "tao/ORB.h"
21 #include "orbsvcs/Naming/Naming_Server.h"
23 /**
24 * @class TAO_Naming_Service
26 * @brief Defines a class that encapsulates the implementation of the
27 * COS Naming Service.
29 * This class makes use of the <TAO_Naming_Server>
30 * to implement the COS Naming Service.
32 class TAO_Naming_Service
34 public:
35 /// Default Constructor.
36 TAO_Naming_Service ();
38 /// Constructor taking the command-line arguments.
39 TAO_Naming_Service (int argc, ACE_TCHAR* argv[]);
41 /// Initialize the Naming Service with the arguments.
42 virtual int init (int argc, ACE_TCHAR* argv[]);
44 /// The opposite of init().
45 virtual int fini ();
47 /// Run the TAO_Naming_Service.
48 virtual int run ();
50 /// Shut down the TAO_Naming_Service; you must still call fini().
51 virtual void shutdown ();
53 /// Destructor.
54 virtual ~TAO_Naming_Service ();
56 protected:
57 /// Parse the command line arguments to find
58 /// the timeout period.
59 int parse_args (int &argc, ACE_TCHAR* argv[]);
61 /// The ORB.
62 CORBA::ORB_var orb_;
64 /// Naming Server instance.
65 TAO_Naming_Server my_naming_server_;
67 /// After how long the server should stop listening to requests (in
68 /// seconds).
69 long time_;
71 /// Number of threads for running the ORB. Default is 1
72 int num_threads_;
75 #include /**/ "ace/post.h"
77 #endif /* TAO_NAMING_SERVICE_H */