Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tests / Param_Test / recursive_struct.h
blob4fe7bdb9bed367c0a7bbaaeb4eacb7e3e2252f06
2 //=============================================================================
3 /**
4 * @file recursive_struct.h
6 * Tests a structure that contains a sequence of itself
8 * @author Aniruddha Gokhale
9 * @author Jeff Parsons
11 //=============================================================================
14 #ifndef PARAM_TEST_RECURSIVE_STRUCT_H
15 #define PARAM_TEST_RECURSIVE_STRUCT_H
17 #include "param_testC.h"
18 #include "helper.h"
20 // =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
21 // test recursive structs
22 // =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
24 class Test_Recursive_Struct
26 public:
27 /// ctor
28 Test_Recursive_Struct ();
30 /// dtor
31 ~Test_Recursive_Struct ();
33 /// run the SII test
34 int run_sii_test (Param_Test_ptr objref);
36 /// return operation name
37 const char *opname () const;
39 /// set values for parameters
40 int init_parameters (Param_Test_ptr objref);
42 /// reset values for CORBA
43 int reset_parameters ();
45 /// check if results are valid
46 CORBA::Boolean check_validity ();
48 /// check if results are valid. This is used for DII results
49 CORBA::Boolean check_validity (CORBA::Request_ptr req);
51 /// print all the values
52 void print_values ();
54 /// invoke DII request with appropriate exception handling.
55 void dii_req_invoke (CORBA::Request *);
57 private:
58 /// operation name
59 char *opname_;
61 /// in parameter
62 Param_Test::Recursive_Struct in_;
64 // these need memory management
65 /// inout parameter
66 Param_Test::Recursive_Struct_var inout_;
68 /// out parameter
69 Param_Test::Recursive_Struct_var out_;
71 /// return value
72 Param_Test::Recursive_Struct_var ret_;
74 /// helper function for init_parameters
75 void deep_init (Param_Test::Recursive_Struct &rs,
76 Generator *gen,
77 CORBA::ULong level);
79 /// helper function for check_validity
80 CORBA::Boolean deep_check (const Param_Test::Recursive_Struct &in_struct,
81 const Param_Test::Recursive_Struct &test_struct);
84 #endif /* PARAM_TEST_RECURSIVE_STRUCT_H */