Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / Param_Test / ub_struct_seq.h
blob835b2abc1959a181a6e6e8490b5a459802b98ae3
2 //=============================================================================
3 /**
4 * @file ub_struct_seq.h
6 * Tests unbounded struct sequence
8 * @author Aniruddha Gokhale
9 */
10 //=============================================================================
13 #ifndef PARAM_TEST_UNBOUNED_STRUCT_SEQUENCE_H
14 #define PARAM_TEST_UNBOUNED_STRUCT_SEQUENCE_H
16 #include "param_testC.h"
18 // =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
19 // test sequence of structs
20 // =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
22 class Test_Struct_Sequence
24 public:
25 /// ctor
26 Test_Struct_Sequence ();
28 /// dtor
29 ~Test_Struct_Sequence ();
31 /// run the SII test
32 int run_sii_test (Param_Test_ptr objref);
34 /// return operation name
35 const char *opname () const;
37 /// set values for parameters
38 int init_parameters (Param_Test_ptr objref);
40 /// reset values for CORBA
41 int reset_parameters ();
43 /// check if results are valid
44 CORBA::Boolean check_validity ();
46 /// check if results are valid. This is used for DII results
47 CORBA::Boolean check_validity (CORBA::Request_ptr req);
49 /// print all the values
50 void print_values ();
52 /// invoke DII request with appropriate exception handling.
53 void dii_req_invoke (CORBA::Request *);
55 protected:
56 /// compare
57 CORBA::Boolean compare (const Param_Test::StructSeq &s1,
58 const Param_Test::StructSeq &s2);
60 /// print individual sequence
61 void print_sequence (const Param_Test::StructSeq &s);
63 private:
64 /// operation name
65 char *opname_;
67 /// in parameter
68 Param_Test::StructSeq in_;
70 // these need memory management
71 /// inout parameter
72 Param_Test::StructSeq_var inout_;
74 /// out parameter
75 Param_Test::StructSeq_var out_;
77 /// return value
78 Param_Test::StructSeq_var ret_;
82 class Test_Unbounded_Struct_Sequence
84 public:
85 /// ctor
86 Test_Unbounded_Struct_Sequence ();
88 /// dtor
89 ~Test_Unbounded_Struct_Sequence ();
91 /// run the SII test
92 int run_sii_test (Param_Test_ptr objref);
94 /// return operation name
95 const char *opname () const;
97 /// set values for parameters
98 int init_parameters (Param_Test_ptr objref);
100 /// reset values for CORBA
101 int reset_parameters ();
103 /// check if results are valid
104 CORBA::Boolean check_validity ();
106 /// check if results are valid. This is used for DII results
107 CORBA::Boolean check_validity (CORBA::Request_ptr req);
109 /// print all the values
110 void print_values ();
112 /// invoke DII request with appropriate exception handling.
113 void dii_req_invoke (CORBA::Request *);
115 protected:
116 /// compare
117 CORBA::Boolean compare (const Param_Test::PathSpec &s1,
118 const Param_Test::PathSpec &s2);
120 /// print individual sequence
121 void print_sequence (const Param_Test::PathSpec &s);
123 private:
124 /// operation name
125 char *opname_;
127 /// in parameter
128 Param_Test::PathSpec in_;
130 // these need memory management
131 /// inout parameter
132 Param_Test::PathSpec_var inout_;
134 /// out parameter
135 Param_Test::PathSpec_var out_;
137 /// return value
138 Param_Test::PathSpec_var ret_;
142 #endif /* PARAM_TEST_UNBOUNED_STRUCT_SEQUENCE_H */