summaryrefslogtreecommitdiff
path: root/TAO/performance-tests/CSD_Strategy/TestApps/ClientApp.h
blob: 75c8e5a09eef29c27c2ec19d051c06a801e11fb4 (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
//=============================================================================
/**
 *  @file    ClientApp.h
 *
 *  @author  Tim Bradley <bradley_t@ociweb.com>
 */
//=============================================================================
#ifndef CLIENTAPP_H
#define CLIENTAPP_H

#include "TestInf/TestAppBase.h"
#include "TestInf/ClientEngine.h"
#include "tao/ORB.h"
#include "ace/SString.h"

class ClientApp : public TestAppBase
{
public:
  ClientApp();
  virtual ~ClientApp();

protected:
  virtual int run_i(int argc, ACE_TCHAR* argv[]);

private:
  // These are all called, in order, by the run_i() method.
  int init(int argc, ACE_TCHAR* argv[]);
  void client_setup(void);
  int  run_engine(void);
  void cleanup();

  // Helper methods used by the methods above.
  int parse_args(int argc, ACE_TCHAR* argv[]);

  int set_arg(unsigned&   value,
                const ACE_TCHAR* arg,
                char        opt,
                const char* name,
                int         min = 0);

  void usage_statement();
  int arg_dependency_checks();


  CORBA::ORB_var      orb_;
  ACE_TString         exe_name_;
  ACE_TString         ior_;
  ClientEngine_Handle engine_;
  unsigned            client_id_;
  unsigned            num_loops_;
};

#endif