summaryrefslogtreecommitdiff
path: root/TAO/tests/NestedUpcall/Reactor/client.h
blob: d21806dc302538ef37008c0121e9b8323a67d52c (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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// -*- c++ -*-
// $Id$

// ============================================================================
//
// = LIBRARY
//    TAO/tests/NestedUpCalls
//
// = FILENAME
//    client.h
//
// = DESCRIPTION
//
//
// = AUTHORS
//    Aniruddha Gokhale, Sumedh Mungee, and Sergio Flores-Gaitan
//
// ============================================================================

#ifndef TAO_NUC_CLIENT_H
#define TAO_NUC_CLIENT_H

#include "ace/Get_Opt.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "tao/corba.h"
#include "reactor_i.h"
#include "ace/Auto_Ptr.h"

class NestedUpCalls_Client
{
  // = TITLE
  //    Defines a class that encapsulates behaviour of the NestedUpCalls client
  //    example.  Provides a better understanding of the logic in an
  //    object oriented way.
  //
  // = DESCRIPTION
  //    This class declares an interface to run the example client for
  //    NestedUpCalls CORBA server.  All the complexity for initializing the
  //    server is hidden in the class.  Just the run() interface is needed.
public:
  // = Constructor and destructor.
  NestedUpCalls_Client (void);
  ~NestedUpCalls_Client (void);

  int run (void);
  // Execute client example code.

  int init (int argc, char **argv);
  // Initialize the client communication endpoint with server.

private:
  int parse_args (void);
  // Parses the arguments passed on the command line.

  int argc_;
  // # of arguments on the command line.

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

  const char *nested_up_calls_reactor_key_;
  // Key of reactor obj ref.

  int shutdown_;
  // Flag to tell server to shutdown.

  u_int call_count_;
  // # of calls made to functions.

  int quiet_;
  // The test is quiet...

  CORBA::ORB_var orb_;
  // Remember our orb.

  Reactor_var reactor_;
  // reactor pointer for NestedUpCalls.

  FILE *nested_up_calls_reactor_ior_file_;
  // File from which to obtain the IOR.

  ACE_HANDLE f_handle_;
  // File handle to read the IOR.

  int use_naming_service_;
  // Flag to tell client not to use Namingservice to find the NestedUpCalls
  // reactor.
};

#endif /* TAO_NUC_CLIENT_H */