Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Var_Array_Argument_T.h
blob739e3e8f1601e47be2fd45c623812a7677c1a0d5
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Var_Array_Argument_T.h
7 * @authors Jeff Parsons and Carlos O'Ryan
8 */
9 //=============================================================================
11 #ifndef TAO_VAR_ARRAY_ARGUMENT_T_H
12 #define TAO_VAR_ARRAY_ARGUMENT_T_H
14 #include /**/ "ace/pre.h"
16 #include "tao/Argument.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
24 namespace TAO
26 /**
27 * @class In_Var_Array_Argument_T
29 * @brief IN stub argument of variable size element array.
32 template<typename S_forany,
33 template <typename> class Insert_Policy>
34 class In_Var_Array_Argument_T : public InArgument
36 public:
37 In_Var_Array_Argument_T (const typename S_forany::_slice_type * x);
39 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
40 #if TAO_HAS_INTERCEPTORS == 1
41 virtual void interceptor_value (CORBA::Any *any) const;
42 #endif /* TAO_HAS_INTERCEPTORS == 1 */
43 typename S_forany::_slice_type const * arg () const;
45 protected:
46 S_forany x_;
49 /**
50 * @class In_Var_Array_Clonable_Argument_T
52 * @brief IN stub argument of variable size element array.
55 template<typename S_forany,
56 template <typename> class Insert_Policy>
57 class In_Var_Array_Clonable_Argument_T :
58 public In_Var_Array_Argument_T<S_forany, Insert_Policy>
60 public:
61 In_Var_Array_Clonable_Argument_T (const typename S_forany::_slice_type * x);
62 virtual ~In_Var_Array_Clonable_Argument_T ();
64 virtual Argument* clone ();
66 private:
67 bool is_clone_;
70 /**
71 * @class Inout_Var_Array_Argument_T
73 * @brief INOUT stub argument of variable size element array.
76 template<typename S_forany,
77 template <typename> class Insert_Policy>
78 class Inout_Var_Array_Argument_T : public InoutArgument
80 public:
81 Inout_Var_Array_Argument_T (typename S_forany::_slice_type *&x);
83 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
84 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
85 #if TAO_HAS_INTERCEPTORS == 1
86 virtual void interceptor_value (CORBA::Any *any) const;
87 #endif /* TAO_HAS_INTERCEPTORS == 1 */
88 typename S_forany::_slice_type * arg ();
90 private:
91 S_forany x_;
94 /**
95 * @class Out_Var_Array_Argument_T
97 * @brief OUT stub argument of variable size element array.
100 template<typename S_out,
101 typename S_forany,
102 template <typename> class Insert_Policy>
103 class Out_Var_Array_Argument_T : public OutArgument
105 public:
106 Out_Var_Array_Argument_T (S_out x);
108 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
109 #if TAO_HAS_INTERCEPTORS == 1
110 virtual void interceptor_value (CORBA::Any *any) const;
111 #endif /* TAO_HAS_INTERCEPTORS == 1 */
112 typename S_forany::_slice_type *& arg ();
114 private:
115 typename S_forany::_slice_type *& x_;
119 * @class Ret_Var_Array_Argument_T
121 * @brief Return stub value of variable size element array.
124 template<typename S_var,
125 typename S_forany,
126 template <typename> class Insert_Policy>
127 class Ret_Var_Array_Argument_T : public RetArgument
129 public:
130 Ret_Var_Array_Argument_T ();
132 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
133 #if TAO_HAS_INTERCEPTORS == 1
134 virtual void interceptor_value (CORBA::Any *any) const;
135 #endif /* TAO_HAS_INTERCEPTORS == 1 */
136 typename S_forany::_slice_type *& arg ();
138 typename S_forany::_slice_type * excp ();
139 typename S_forany::_slice_type * retn ();
141 private:
142 S_var x_;
146 * @struct Var_Array_Arg_Traits_T
148 * @brief Argument traits of variable size element array.
151 template<typename T_out,
152 typename T_forany,
153 template <typename> class Insert_Policy>
154 struct Var_Array_Arg_Traits_T
156 typedef typename T_forany::_slice_type * ret_type;
157 typedef const typename T_forany::_array_type in_type;
158 typedef typename T_forany::_array_type inout_type;
159 typedef T_out out_type;
161 typedef In_Var_Array_Argument_T<T_forany,
162 Insert_Policy> in_arg_val;
163 typedef In_Var_Array_Clonable_Argument_T<T_forany,
164 Insert_Policy>
165 in_clonable_arg_val;
166 typedef Inout_Var_Array_Argument_T<T_forany,
167 Insert_Policy> inout_arg_val;
168 typedef Out_Var_Array_Argument_T<T_out,
169 T_forany,
170 Insert_Policy> out_arg_val;
171 typedef Ret_Var_Array_Argument_T<typename T_out::_var_type,
172 T_forany,
173 Insert_Policy> ret_val;
177 TAO_END_VERSIONED_NAMESPACE_DECL
179 #if defined (__ACE_INLINE__)
180 #include "tao/Var_Array_Argument_T.inl"
181 #endif /* __ACE_INLINE__ */
183 #include "tao/Var_Array_Argument_T.cpp"
185 #include /**/ "ace/post.h"
187 #endif /* TAO_VAR_ARRAY_ARGUMENT_T_H */