blob: 1c6d3fcbcc34f1adf491a8c3848d14de7582c93e (
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
95
96
97
|
//=============================================================================
/**
* @file options.h
*
* $Id$
*
* Options for the Param_Test application
*
*
* @author Aniruddha Gokhale
*/
//=============================================================================
#ifndef OPTIONS_H
#define OPTIONS_H
#include "ace/Singleton.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "tao/Basic_Types.h"
#include "tao/CORBA_String.h"
#include "tao/orbconf.h"
class Options
{
public:
enum TEST_TYPE
{
NO_TEST,
TEST_UB_STRING,
TEST_UB_STRUCT_SEQUENCE
};
enum INVOKE_TYPE
{
SII,
DII
};
/// constructor
Options (void);
/// destructor
~Options (void);
/// Parses the arguments passed on the command line.
int parse_args (int argc, ACE_TCHAR **argv);
/// return the IOR for the servant
char const * param_test_ior (void) const;
/// what test to run
TEST_TYPE test_type (void);
/// whether to use SII or DII
INVOKE_TYPE invoke_type (void);
/// number of times to run the test
CORBA::ULong loop_count (void);
/// whether debug option is on or not
CORBA::Boolean debug (void) const;
/// If we should request the server to shutdown.
CORBA::Boolean shutdown (void) const;
private:
/// Function to read the servant IOR from a file.
int read_ior (ACE_TCHAR *filename);
/// IOR for the servant
CORBA::String_var ior_;
/// what test to run
TEST_TYPE test_type_;
/// whether SII or DII
INVOKE_TYPE invoke_type_;
/// Number of times to do the "test_*" operations.
CORBA::ULong loop_count_;
/// debugging output values
CORBA::Boolean debug_;
/// server shutdown flag.
CORBA::Boolean shutdown_;
};
typedef ACE_Singleton<Options, TAO_SYNCH_RECURSIVE_MUTEX> OPTIONS;
#endif /* OPTIONS_H */
|