Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Vector_Argument_T.h
bloba73a670a2b5603947b560bdc39fe93c7281bce89
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Vector_Argument_T.h
7 * @author Jeff Parsons
8 */
9 //=============================================================================
11 #ifndef TAO_VECTOR_ARGUMENT_T_H
12 #define TAO_VECTOR_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_Vector_Argument_T
29 * @brief Template class for IN stub argument of
30 * unbounded sequence IDL types.
33 template<typename S,
34 template <typename> class Insert_Policy>
35 class In_Vector_Argument_T : public InArgument
37 public:
38 In_Vector_Argument_T (S const & 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 S const & arg () const;
46 protected:
47 S const & x_;
50 /**
51 * @class In_Vector_Clonable_Argument_T
53 * @brief Template class for IN stub argument of
54 * unbounded sequence IDL types.
57 template<typename S,
58 template <typename> class Insert_Policy>
59 class In_Vector_Clonable_Argument_T :
60 public In_Vector_Argument_T<S, Insert_Policy>
62 public:
63 In_Vector_Clonable_Argument_T (S const & x);
64 virtual ~In_Vector_Clonable_Argument_T ();
66 virtual Argument* clone ();
68 private:
69 bool is_clone_;
72 /**
73 * @class Inout_Vector_Argument_T
75 * @brief Template class for INOUT stub argument of
76 * unbounded sequence IDL types.
79 template<typename S,
80 template <typename> class Insert_Policy>
81 class Inout_Vector_Argument_T : public InoutArgument
83 public:
84 Inout_Vector_Argument_T (S & x);
86 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
87 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
88 #if TAO_HAS_INTERCEPTORS == 1
89 virtual void interceptor_value (CORBA::Any *any) const;
90 #endif /* TAO_HAS_INTERCEPTORS == 1 */
91 S & arg ();
93 private:
94 S & x_;
97 /**
98 * @class Out_Vector_Argument_T
100 * @brief Template class for OUT stub argument of
101 * unbounded sequence IDL types.
104 template<typename S,
105 template <typename> class Insert_Policy>
106 class Out_Vector_Argument_T : public OutArgument
108 public:
109 Out_Vector_Argument_T (S & x);
111 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
112 #if TAO_HAS_INTERCEPTORS == 1
113 virtual void interceptor_value (CORBA::Any *any) const;
114 #endif /* TAO_HAS_INTERCEPTORS == 1 */
115 S & arg ();
117 private:
118 S & x_;
122 * @class Ret_Vector_Argument_T
124 * @brief Template class for return stub value of fixed size IDL types.
127 template<typename S,
128 template <typename> class Insert_Policy>
129 class Ret_Vector_Argument_T : public RetArgument
131 public:
132 Ret_Vector_Argument_T ();
134 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
135 #if TAO_HAS_INTERCEPTORS == 1
136 virtual void interceptor_value (CORBA::Any *any) const;
137 #endif /* TAO_HAS_INTERCEPTORS == 1 */
138 S & arg ();
140 S excp ();
141 S retn ();
143 protected:
144 S x_;
148 * @struct Vector_Arg_Traits_T
150 * @brief Template class for stub argument traits of
151 * sequence IDL types, when the STL mapping is used by
152 * the IDL compiler. The ret_type and out_type typedefs
153 * are different from Vector_Arg_Traits_T.
156 template<typename T,
157 template <typename> class Insert_Policy>
158 struct Vector_Arg_Traits_T
160 typedef T ret_type;
161 typedef T const & in_type;
162 typedef T & inout_type;
163 typedef T & out_type;
165 typedef In_Vector_Argument_T<T, Insert_Policy> in_arg_val;
166 typedef In_Vector_Clonable_Argument_T<T, Insert_Policy>
167 in_clonable_arg_val;
168 typedef Inout_Vector_Argument_T<T, Insert_Policy> inout_arg_val;
169 typedef Out_Vector_Argument_T<T, Insert_Policy> out_arg_val;
170 typedef Ret_Vector_Argument_T<T, Insert_Policy> ret_val;
174 TAO_END_VERSIONED_NAMESPACE_DECL
176 #if defined (__ACE_INLINE__)
177 #include "tao/Vector_Argument_T.inl"
178 #endif /* __ACE_INLINE__ */
180 #include "tao/Vector_Argument_T.cpp"
182 #include /**/ "ace/post.h"
184 #endif /* TAO_VECTOR_ARGUMENT_T_H */