summaryrefslogtreecommitdiff
path: root/trunk/TAO/orbsvcs/tests/ImplRepo/airplane_server_i.h
blob: 78b8f0c6873dda58ee256fa75a1f22ab85f7314f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// -*- C++ -*-

//=============================================================================
/**
 *  @file    airplane_server_i.h
 *
 *  $Id$
 *
 *  Server that sets up the ORB and handles the registration and execution
 *  of the Paper Airplane Server.
 *
 *
 *  @author Darrell Brunsch <brunsch@cs.wustl.edu>
 */
//=============================================================================


#if !defined (AIRPLANE_SERVER_I_H)
#define AIRPLANE_SERVER_I_H

#include "airplane_i.h"

/**
 * @class Airplane_Server_i
 *
 * @brief Paper Airplane Server Implementation Class
 *
 * Sets up everything necessary to get the Paper Airplane Server
 * running.
 */
class Airplane_Server_i
{
public:
  // = Initialization and termination methods.
  /// Default constructor
  Airplane_Server_i (void);

  /// Destructor
  ~Airplane_Server_i (void);

  /// Initialize the Server state - parsing arguments and waiting
  int init (int argc, char **argv);

  /// Run the orb
  int run (void);

private:
  /// Parses the commandline arguments.
  int parse_args (void);

  /// Number of command line arguments.
  int argc_;

  /// The command line arguments.
  char **argv_;

  /// The ORB.
  CORBA::ORB_var orb_;

  PortableServer::POA_var root_poa_;

  /// The POA for the Airplane Server.
  PortableServer::POA_var airplane_poa_;

  /// The POA manager.
  PortableServer::POAManager_var poa_manager_;

  /// The Paper Airplane Server Implementation.
  Airplane_i *server_impl_;

  /// File where the IOR of the server object is stored.
  FILE *ior_output_file_;
};

#endif /* AIRPLANE_SERVER_I_H */