=default for generated implementation copy ctor
[ACE_TAO.git] / TAO / examples / Quoter / server.h
blob2658f5c0e290a3e5d3b82736d79c0c1d560fcb01
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file server.h
7 * Implements the Quoter_Server class which handles the initialization of
8 * the quoter implementations.
10 * @author Darrell Brunsch (brunsch@cs.wustl.edu)
12 //=============================================================================
15 #ifndef QUOTER_SERVER_H
16 #define QUOTER_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 "orbsvcs/CosNamingC.h"
26 #include "orbsvcs/Naming/Naming_Server.h"
27 #include "tao/Utils/ORB_Manager.h"
28 #include "Quoter_i.h"
29 #include "QuoterC.h"
31 /**
32 * @class Quoter_Server
34 * Defines a Quoter Server class that implements the functionality
35 * of a server process as an object.
36 * =DESCRIPTION
37 * The interface is quite simple. A server program has to call
38 * init to initialize the quoter_server's state and then call run
39 * to run the orb.
41 class Quoter_Server
43 public:
44 /// Default constructor
45 Quoter_Server ();
47 /// Destructor
48 ~Quoter_Server ();
50 /// Initialize the Quoter_Server state - parsing arguments and ...
51 int init (int argc, ACE_TCHAR *argv[]);
53 /// Run the server.
54 int run ();
56 private:
57 /// Parses the commandline arguments.
58 int parse_args ();
60 /// Initializes the name server and registers cubit factory with the
61 /// name server.
62 int init_naming_service ();
64 /// Number of quoter objects we export.
65 int num_of_objs_;
67 /// Naming Service context
68 CosNaming::NamingContext_var namingContext_var_;
70 /// Instantiate the Quoter Factory
71 Quoter_Factory_i *quoter_Factory_i_ptr_;
73 /// The ORB manager.
74 TAO_ORB_Manager orb_manager_;
76 /// Number of commandline arguments.
77 int argc_;
79 /// commandline arguments.
80 ACE_TCHAR **argv_;
82 /// debug level (0 = quiet, 1 = default, informative, 2+ = noisy);
83 int debug_level_;
86 #endif /* QUOTER_SERVER_H */