Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / Alt_Mapping / options.h
blob6759627945942c8a7423cf1c34d21d93307a5d82
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_UB_STRING,
33 TEST_UB_STRUCT_SEQUENCE
36 enum INVOKE_TYPE
38 SII,
39 DII
42 /// constructor
43 Options (void);
45 /// destructor
46 ~Options (void);
48 /// Parses the arguments passed on the command line.
49 int parse_args (int argc, ACE_TCHAR **argv);
51 /// return the IOR for the servant
52 char const * param_test_ior (void) const;
54 /// what test to run
55 TEST_TYPE test_type (void);
57 /// whether to use SII or DII
58 INVOKE_TYPE invoke_type (void);
60 /// number of times to run the test
61 CORBA::ULong loop_count (void);
63 /// whether debug option is on or not
64 CORBA::Boolean debug (void) const;
66 /// If we should request the server to shutdown.
67 CORBA::Boolean shutdown (void) const;
69 private:
70 /// Function to read the servant IOR from a file.
71 int read_ior (ACE_TCHAR *filename);
73 /// IOR for the servant
74 CORBA::String_var ior_;
76 /// what test to run
77 TEST_TYPE test_type_;
79 /// whether SII or DII
80 INVOKE_TYPE invoke_type_;
82 /// Number of times to do the "test_*" operations.
83 CORBA::ULong loop_count_;
85 /// debugging output values
86 CORBA::Boolean debug_;
88 /// server shutdown flag.
89 CORBA::Boolean shutdown_;
92 typedef ACE_Singleton<Options, TAO_SYNCH_RECURSIVE_MUTEX> OPTIONS;
94 #endif /* OPTIONS_H */