summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/ImplRepo/airplane_client_i.h
blob: c530ca94826325b06a2a770dad8ac79196f25518 (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++ -*-
// $Id$

// ============================================================================
//
// = LIBRARY
//    TAO/orbsvcs/tests/ImplRepo
//
// = FILENAME
//    airplane_client_i.h
//
// = DESCRIPTION
//    This class implements a simple CORBA client which returns a random
//    paper airplane from the paper airplane server.
//
// = AUTHORS
//    Darrell Brunsch <brunsch@cs.wustl.edu>
//
// ============================================================================

#if !defined (AIRPLANE_CLIENT_I_H)
#define AIRPLANE_CLIENT_I_H

#include "AirplaneC.h"
#include "tao/corba.h"

class Airplane_Client_i
{
  // = TITLE
  //     Paper Airplane Client Implementation
  //
  // = DESCRIPTION
  //     Class wrapper for a client which gets the server IOR and then makes
  //     a couple of calls to the server.
public:
  // = Constructor and destructor.
  Airplane_Client_i (void);
  ~Airplane_Client_i (void);

  int run ();
  // 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.

  void get_planes (size_t count);
  // Ask the Paper Airplane Server for <count> planes.

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

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

  char *server_key_;
  // Key of the obj ref of the server.

  size_t loop_count_;
  // Number of airplanes to query for.

  CORBA::Environment env_;
  // Environment variable.

  Paper_Airplane_Server_ptr server_;
  // Server object ptr.

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

#endif /* AIRPLANE_CLIENT_I_H */