Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Fixed_Array_Argument_T.h
blobcf259d74efffb3f0ccf71cd4ab9c490f8d1f771a
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Fixed_Array_Argument_T.h
7 * @authors Jeff Parsons and Carlos O'Ryan
8 */
9 //=============================================================================
12 #ifndef TAO_FIXED_ARRAY_ARGUMENT_T_H
13 #define TAO_FIXED_ARRAY_ARGUMENT_T_H
15 #include /**/ "ace/pre.h"
16 #include "tao/Argument.h"
17 #include "tao/Array_Traits_T.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 # pragma once
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
25 namespace TAO
27 /**
28 * @class In_Fixed_Array_Argument_T
30 * @brief IN stub argument of fixed size element array.
33 template<typename S_forany,
34 template <typename> class Insert_Policy>
35 class In_Fixed_Array_Argument_T : public InArgument
37 public:
38 In_Fixed_Array_Argument_T (const typename S_forany::_slice_type * x);
40 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
41 #if TAO_HAS_INTERCEPTORS == 1
42 virtual void interceptor_value (CORBA::Any *any) const;
43 #endif /* TAO_HAS_INTERCEPTORS == 1 */
44 typename S_forany::_slice_type const * arg () const;
46 protected:
47 S_forany x_;
50 /**
51 * @class In_Fixed_Array_Clonable_Argument_T
53 * @brief IN stub argument of fixed size element array.
56 template<typename S_forany,
57 template <typename> class Insert_Policy>
58 class In_Fixed_Array_Clonable_Argument_T :
59 public In_Fixed_Array_Argument_T<S_forany, Insert_Policy>
61 public:
62 In_Fixed_Array_Clonable_Argument_T (const typename S_forany::_slice_type * x);
63 virtual ~In_Fixed_Array_Clonable_Argument_T ();
65 virtual Argument* clone ();
67 private:
68 bool is_clone_;
71 /**
72 * @class Inout_Fixed_Array_Argument_T
74 * @brief INOUT stub argument of fixed size element array.
77 template<typename S_forany,
78 template <typename> class Insert_Policy>
79 class Inout_Fixed_Array_Argument_T : public InoutArgument
81 public:
82 Inout_Fixed_Array_Argument_T (typename S_forany::_slice_type *&x);
84 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
85 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
86 #if TAO_HAS_INTERCEPTORS == 1
87 virtual void interceptor_value (CORBA::Any *any) const;
88 #endif /* TAO_HAS_INTERCEPTORS == 1 */
89 typename S_forany::_slice_type * arg ();
91 private:
92 S_forany x_;
95 /**
96 * @class Out_Fixed_Array_Argument_T
98 * @brief OUT stub argument of fixed size element array.
101 template<typename S_forany,
102 template <typename> class Insert_Policy>
103 class Out_Fixed_Array_Argument_T : public OutArgument
105 public:
106 Out_Fixed_Array_Argument_T (typename S_forany::_slice_type *& 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 S_forany x_;
119 * @class Ret_Fixed_Array_Argument_T
121 * @brief Return stub value of fixed size element array.
124 template<typename S_var,
125 typename S_forany,
126 template <typename> class Insert_Policy>
127 class Ret_Fixed_Array_Argument_T : public RetArgument
129 public:
130 Ret_Fixed_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 Fixed_Array_Arg_Traits_T
148 * @brief Argument traits of fixed size element array.
151 template<typename T_var,
152 typename T_forany,
153 template <typename> class Insert_Policy>
154 struct Fixed_Array_Arg_Traits_T
156 typedef typename T_forany::_slice_type * ret_type;
157 typedef typename T_forany::_array_type const in_type;
158 typedef typename T_forany::_array_type inout_type;
159 typedef typename T_forany::_array_type out_type;
161 typedef In_Fixed_Array_Argument_T<T_forany,
162 Insert_Policy> in_arg_val;
163 typedef In_Fixed_Array_Clonable_Argument_T<T_forany,
164 Insert_Policy>
165 in_clonable_arg_val;
166 typedef Inout_Fixed_Array_Argument_T<T_forany,
167 Insert_Policy> inout_arg_val;
168 typedef Out_Fixed_Array_Argument_T<T_forany,
169 Insert_Policy> out_arg_val;
170 typedef Ret_Fixed_Array_Argument_T<T_var,
171 T_forany,
172 Insert_Policy> ret_val;
176 TAO_END_VERSIONED_NAMESPACE_DECL
178 #if defined (__ACE_INLINE__)
179 #include "tao/Fixed_Array_Argument_T.inl"
180 #endif /* __ACE_INLINE__ */
182 #include "tao/Fixed_Array_Argument_T.cpp"
184 #include /**/ "ace/post.h"
186 #endif /* TAO_FIXED_ARRAY_ARGUMENT_T_H */