Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / Param_Test / options.h
blobc96104fc82428882fa4f4bd05607a35b8db8463c
2 //=============================================================================
3 /**
4 * @file options.h
6 * Options for the Param_Test application
8 * @author Aniruddha Gokhale
9 */
10 //=============================================================================
13 #ifndef OPTIONS_H
14 #define OPTIONS_H
16 #include "ace/Singleton.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/Basic_Types.h"
23 #include "tao/CORBA_String.h"
24 #include "tao/orbconf.h"
26 class Options
28 public:
29 enum TEST_TYPE
31 NO_TEST,
32 TEST_SHORT,
33 TEST_ULONGLONG,
34 TEST_UB_STRING,
35 TEST_UB_WSTRING,
36 TEST_BD_STRING,
37 TEST_BD_WSTRING,
38 TEST_FIXED_STRUCT,
39 TEST_UB_STRING_SEQUENCE,
40 TEST_BD_STRING_SEQUENCE,
41 TEST_UB_WSTRING_SEQUENCE,
42 TEST_BD_WSTRING_SEQUENCE,
43 TEST_VAR_STRUCT,
44 TEST_NESTED_STRUCT,
45 TEST_RECURSIVE_STRUCT,
46 TEST_OBJREF_STRUCT,
47 TEST_UB_STRUCT_SEQUENCE,
48 TEST_BD_STRUCT_SEQUENCE,
49 TEST_UB_ARRAY_SEQUENCE,
50 TEST_BD_ARRAY_SEQUENCE,
51 TEST_OBJREF,
52 TEST_TYPECODE,
53 TEST_ANY,
54 TEST_OBJREF_SEQUENCE,
55 TEST_ANYSEQ,
56 TEST_UB_SHORTSEQ,
57 TEST_BD_SHORTSEQ,
58 TEST_UB_LONGSEQ,
59 TEST_BD_LONGSEQ,
60 TEST_FIXED_ARRAY,
61 TEST_VAR_ARRAY,
62 TEST_MULTDIM_ARRAY,
63 TEST_EXCEPTION,
64 TEST_BIG_UNION,
65 TEST_SMALL_UNION,
66 TEST_RECURSIVE_UNION,
67 TEST_COMPLEX_ANY
70 enum INVOKE_TYPE
72 SII,
73 DII
76 /// constructor
77 Options (void);
79 /// destructor
80 ~Options (void);
82 /// Parses the arguments passed on the command line.
83 int parse_args (int argc, ACE_TCHAR **argv);
85 /// return the IOR for the servant
86 char const * param_test_ior (void) const;
88 /// what test to run
89 TEST_TYPE test_type (void);
91 /// whether to use SII or DII
92 INVOKE_TYPE invoke_type (void);
94 /// number of times to run the test
95 CORBA::ULong loop_count (void);
97 /// whether debug option is on or not
98 CORBA::Boolean debug (void) const;
100 /// If we should request the server to shutdown.
101 CORBA::Boolean shutdown (void) const;
103 private:
104 /// Function to read the servant IOR from a file.
105 int read_ior (ACE_TCHAR *filename);
107 /// IOR for the servant
108 CORBA::String_var ior_;
110 /// what test to run
111 TEST_TYPE test_type_;
113 /// whether SII or DII
114 INVOKE_TYPE invoke_type_;
116 /// Number of times to do the "test_*" operations.
117 CORBA::ULong loop_count_;
119 /// debugging output values
120 CORBA::Boolean debug_;
122 /// server shutdown flag.
123 CORBA::Boolean shutdown_;
126 typedef ACE_Singleton<Options, TAO_SYNCH_RECURSIVE_MUTEX> OPTIONS;
128 #endif /* OPTIONS_H */