summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/ImplRepo/nestea_server_i.h
blob: 04c2c4a7dcd5ad90822ed53564b422dcfb5c20c5 (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
76
77
// -*- C++ -*-
// $Id$

// ============================================================================
//
// = LIBRARY
//    TAO/orbsvcs/tests/ImplRepo
//
// = FILENAME
//    nestea_server_i.h
//
// = DESCRIPTION
//    Server that sets up the ORB and handles the registration and execution
//    of the Nestea Bookshelf Server.
//
// = AUTHORS
//    Darrell Brunsch <brunsch@cs.wustl.edu>
//
// ============================================================================

#if !defined (NESTEA_SERVER_I_H)
#define NESTEA_SERVER_I_H

#include "tao/TAO.h"
#include "nestea_i.h"
#include "orbsvcs/IR_Helper.h"

class Nestea_Server_i
{
  // = TITLE
  //   Nestea Bookshelf Server Implementation Class
  //
  // = DESCRIPTION
  //   Sets up everything necessary to get the Nestea Bookshelf Server 
  //   running.
  //   
public:
  // = Initialization and termination methods.
  Nestea_Server_i (const char *filename = "nestea.dat");
  // Default constructor

  ~Nestea_Server_i (void);
  // Destructor

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

  int run (CORBA::Environment &ACE_TRY_ENV);
  // Run the orb 

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

  int argc_;
  // Number of command line arguments.

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

  TAO_ORB_Manager orb_manager_;
  // The ORB manager.

  Nestea_i *server_impl_;
  // The Nestea Bookshelf Server Implementation.  

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

  IR_Helper *ir_helper_;
  // Helper class for using the IR.

  int use_ir_;
  // Flag for whether or not to use the IR.
};

#endif /* NESTEA_SERVER_I_H */