3 //=============================================================================
5 * @file Logging_Test_i.h
7 * This class implements a simple logger CORBA client for the Logger
8 * example using stubs generated by the TAO ORB IDL compiler
10 * @author Sergio Flores-Gaitan <sergio@cs.wustl.edu> Matt Braun <mjb2@cec.wustl.edu>
12 //=============================================================================
18 #include "ace/Get_Opt.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #include "orbsvcs/CosNamingC.h"
26 #include "orbsvcs/Naming/Naming_Client.h"
29 * @class Logger_Client
31 * @brief Defines a class that encapsulates behaviour of the Logger
32 * client example. Provides a better understanding of the logic
33 * in an object oriented way.
35 * This class declares an interface to run the example client for
36 * Logger CORBA server. All the complexity for initializing the
37 * server is hidden in the class. Just the <run> interface is
47 ~Logger_Client (void);
49 /// Initialize the client communication endpoint with server.
50 int init (int argc
, ACE_TCHAR
**argv
);
52 /// Execute client example code.
56 /// Parses the arguments passed on the command line.
57 int parse_args (void);
59 /// Prepares the <Log_Record> for logging.
60 void init_record (Logger::Log_Record
&newrec
,
61 Logger::Log_Priority lp
,
64 /// Initialises the name server and resolves the logger_factory
65 int init_naming_service (void);
67 /// Instantiates the 2 logger member variables
68 int init_loggers (void);
70 /// Shows contents of the record (for debugging purposes).
71 void show_record (Logger::Log_Record
&newrec
);
73 /// Keep a pointer to the ORB for easy access
76 /// An instance of the name client used for resolving the factory
78 TAO_Naming_Client my_name_client_
;
80 /// # of arguments on the command line.
83 /// arguments from command line.
86 /// A pointer to the Logger_Factory; used in init_loggers
87 Logger_Factory_var factory_
;
96 #endif /* _LOG_CLIENT_H */