Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / examples / Logging / Logging_Service_i.h
blobf5b07aab74f78c4907d55f8eaab5a1e9e4940b08
3 //=============================================================================
4 /**
5 * @file Logging_Service_i.h
7 * This class implements a simple "logger" CORBA server for the Logging
8 * service using skeletons generated by the TAO ORB IDL compiler.
10 * @author Nagarajan Surendran <naga@cs.wustl.edu> Matthew Braun <mjb2@cec.wustl.edu>
12 //=============================================================================
15 #ifndef _LOG_SERVER_H
16 #define _LOG_SERVER_H
18 #include "ace/Get_Opt.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 # pragma once
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #include "ace/Log_Msg.h"
25 #include "tao/Utils/ORB_Manager.h"
26 #include "orbsvcs/CosNamingC.h"
27 #include "orbsvcs/Naming/Naming_Client.h"
28 #include "Logger_i.h"
29 #include "LoggerS.h"
30 #include "LoggerC.h"
32 /**
33 * @class Logger_Server
35 * @brief Defines a Logger_Server class that implements the functionality
36 * of a server process as an object.
38 * The interface is quite simple. A server program has to call
39 * init to initialize the logger_server's state and then call run
40 * to run the orb.
42 class Logger_Server
44 public:
45 /// Constructor.
46 Logger_Server ();
48 /// Destructor.
49 ~Logger_Server ();
51 /// Initialize the Logger_Server state - parsing arguments and ...
52 int init (int argc,
53 ACE_TCHAR **argv);
55 /// Run the ORB.
56 int run ();
58 /// This function creates and returns a logger with the given <name>.
59 /// Currently, <name> is unused.
60 Logger_ptr make_logger (const char *name);
62 private:
63 /// Parses the commandline arguments.
64 int parse_args ();
66 /// Initialises the name server and registers logger_factory with the
67 /// name server.
68 int init_naming_service ();
70 /// The ORB manager.
71 TAO_ORB_Manager orb_manager_;
73 /// helper class for getting access to Naming Service.
74 TAO_Naming_Client my_name_server_;
76 /// Implementation object of the Logger_Factory.
77 Logger_Factory_i factory_impl_;
79 /// Factory_var to register with NamingService.
80 Logger_Factory_var factory_;
82 /// Number of commandline arguments.
83 int argc_;
85 /// commandline arguments.
86 ACE_TCHAR **argv_;
88 /// The id to give the Logger_Factory instance (defaults to
89 /// "LoggingService")
90 const ACE_TCHAR* service_name_;
93 #endif /* _LOG_SERVER_H */