summaryrefslogtreecommitdiff
path: root/TAO/examples/Simple/grid/Client_i.h
blob: 4455c6c73b16e9a11f46847c124d5601f5598636 (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
// -*- C++ -*-
// $Id$
// ============================================================================
//
// = LIBRARY
//    TAO/tests/Simple
//
// = FILENAME
//    Client_i.h
//
// = DESCRIPTION
//    This class implements a simple CORBA client that access a Grid
//    server.
//
// = AUTHORS
//
// ============================================================================

# include "GridC.h"

class Client_i 
{
  // = TITLE
  //    Simple Client implementation.
  //
  // = DESCRIPTION
  //     Class wrapper for a client that gets the server IOR and then
  //     makes several calls to the server before optionally shutting
  //     it down.

public:
  // = Initialization and termination methods.
  Client_i (void);
  // Constructor.

  ~Client_i (void);
  // Destructor.

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

  int init (int argc, char *argv[]);
  // Initialize the client communication endpoint with server.
 
  void test_grid (void);
  // Make the grid. 

private:
  int read_ior (char *filename);
  // Function to read the server IOR from a file.

  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.

  char *ior_;
  // IOR of the obj ref of the server.

  int shutdown_;
  // Flag for server shutdown.

  CORBA::Environment env_;
  // Environment variable.

  Grid_Factory_var server_;
  // Server object ptr.

  Grid_ptr grid_;
  // Pointer to the grid

  CORBA::Short height_;
  // Height of the grid.

  CORBA::Short width_;
  // Width of the grid.

  CORBA::Short setx_;
  // Cell identifier in which a value meeds to be stored.
 
  CORBA::Short sety_;
  // Cell identifier in which a value meeds to be stored.

  CORBA::Long setvalue_;
  // The value that needs to be stored in the cell.

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