Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tests / Param_Test / recursive_union.h
blob62c729412c79cbb024c4558ec675f8d1edfe3591
2 //=============================================================================
3 /**
4 * @file recursive_union.h
6 * Tests a union that contains a sequence of itself
8 * @author Jeff Parsons <parsons@cs.wustl.edu>
9 */
10 //=============================================================================
13 #ifndef PARAM_TEST_RECURSIVE_UNION_H
14 #define PARAM_TEST_RECURSIVE_UNION_H
16 #include "param_testC.h"
17 #include "helper.h"
19 // =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
20 // test recursive unions
21 // =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
23 class Test_Recursive_Union
25 public:
26 /// ctor
27 Test_Recursive_Union ();
29 /// dtor
30 ~Test_Recursive_Union ();
32 /// run the SII test
33 int run_sii_test (Param_Test_ptr objref);
35 /// return operation name
36 const char *opname () const;
38 /// set values for parameters
39 int init_parameters (Param_Test_ptr objref);
41 /// reset values for CORBA
42 int reset_parameters ();
44 /// check if results are valid
45 CORBA::Boolean check_validity ();
47 /// check if results are valid. This is used for DII results
48 CORBA::Boolean check_validity (CORBA::Request_ptr req);
50 /// print all the values
51 void print_values ();
53 /// invoke DII request with appropriate exception handling.
54 void dii_req_invoke (CORBA::Request *);
56 private:
57 /// operation name
58 char *opname_;
60 /// in parameter
61 Param_Test::Recursive_Union in_;
63 // these need memory management
64 /// inout parameter
65 Param_Test::Recursive_Union_var inout_;
67 /// out parameter
68 Param_Test::Recursive_Union_var out_;
70 /// return value
71 Param_Test::Recursive_Union_var ret_;
73 void deep_init (Param_Test::Recursive_Union &u,
74 Generator *gen,
75 CORBA::ULong level);
77 /// helper functions for init_parameters
78 void deep_init_nested (Param_Test::nested_rec_union &nu,
79 Generator *gen,
80 CORBA::ULong level);
82 CORBA::Boolean deep_check (const Param_Test::Recursive_Union &in_union,
83 const Param_Test::Recursive_Union &test_union);
85 /// helper functions for check_validity
86 CORBA::Boolean deep_check_nested (const Param_Test::nested_rec_union &in,
87 const Param_Test::nested_rec_union &test);
90 #endif /* PARAM_TEST_RECURSIVE_UNION_H */