Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Vector_Argument_T.cpp
blob18ea19ca6c55e4bccffed306ffd3731a27999db4
1 #ifndef TAO_VECTOR_ARGUMENT_T_CPP
2 #define TAO_VECTOR_ARGUMENT_T_CPP
4 #include "tao/Vector_Argument_T.h"
6 #if !defined (__ACE_INLINE__)
7 #include "tao/Vector_Argument_T.inl"
8 #endif /* __ACE_INLINE__ */
10 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
12 template<typename S,
13 template <typename> class Insert_Policy>
14 CORBA::Boolean
15 TAO::In_Vector_Argument_T<S,Insert_Policy>::marshal (TAO_OutputCDR &cdr)
17 return cdr << this->x_;
20 #if TAO_HAS_INTERCEPTORS == 1
22 template<typename S,
23 template <typename> class Insert_Policy>
24 void
25 TAO::In_Vector_Argument_T<S,Insert_Policy>::interceptor_value (
26 CORBA::Any *any) const
28 Insert_Policy<S>::any_insert (any, this->x_);
31 #endif /* TAO_HAS_INTERCEPTORS */
33 template<typename S,
34 template <typename> class Insert_Policy>
35 TAO::In_Vector_Clonable_Argument_T<S,Insert_Policy>::~In_Vector_Clonable_Argument_T ()
37 if (this->is_clone_)
39 S & tmp = const_cast<S &> (this->x_);
40 delete tmp;
44 template<typename S,
45 template <typename> class Insert_Policy>
46 TAO::Argument*
47 TAO::In_Vector_Clonable_Argument_T<S,Insert_Policy>::clone ()
49 S* clone_x = new S (this->x_);
50 In_Vector_Clonable_Argument_T<S,Insert_Policy>* clone_arg
51 = new In_Vector_Clonable_Argument_T<S,Insert_Policy> (*clone_x);
52 clone_arg->is_clone_ = true;
53 return clone_arg;
56 // ===========================================================
58 template<typename S,
59 template <typename> class Insert_Policy>
60 CORBA::Boolean
61 TAO::Inout_Vector_Argument_T<S,Insert_Policy>::marshal (
62 TAO_OutputCDR &cdr)
64 return cdr << this->x_;
67 template<typename S,
68 template <typename> class Insert_Policy>
69 CORBA::Boolean
70 TAO::Inout_Vector_Argument_T<S,Insert_Policy>::demarshal (
71 TAO_InputCDR & cdr)
73 return cdr >> this->x_;
76 #if TAO_HAS_INTERCEPTORS == 1
78 template<typename S,
79 template <typename> class Insert_Policy>
80 void
81 TAO::Inout_Vector_Argument_T<S,Insert_Policy>::interceptor_value (
82 CORBA::Any *any) const
84 Insert_Policy<S>::any_insert (any, this->x_);
87 #endif /* TAO_HAS_INTERCEPTORS */
89 // ==============================================================
91 template<typename S,
92 template <typename> class Insert_Policy>
93 CORBA::Boolean
94 TAO::Out_Vector_Argument_T<S,Insert_Policy>::demarshal (
95 TAO_InputCDR & cdr)
97 return cdr >> this->x_;
100 #if TAO_HAS_INTERCEPTORS == 1
102 template<typename S,
103 template <typename> class Insert_Policy>
104 void
105 TAO::Out_Vector_Argument_T<S,Insert_Policy>::interceptor_value (
106 CORBA::Any *any) const
108 Insert_Policy<S>::any_insert (any, this->x_);
111 #endif /* TAO_HAS_INTERCEPTORS */
113 // ============================================================
115 template<typename S,
116 template <typename> class Insert_Policy>
117 CORBA::Boolean
118 TAO::Ret_Vector_Argument_T<S,Insert_Policy>::demarshal (
119 TAO_InputCDR & cdr)
121 return cdr >> this->x_;
124 #if TAO_HAS_INTERCEPTORS == 1
126 template<typename S,
127 template <typename> class Insert_Policy>
128 void
129 TAO::Ret_Vector_Argument_T<S,Insert_Policy>::interceptor_value (
130 CORBA::Any *any) const
132 Insert_Policy<S>::any_insert (any, this->x_);
135 #endif /* TAO_HAS_INTERCEPTORS */
137 TAO_END_VERSIONED_NAMESPACE_DECL
139 #endif /* TAO_VECTOR_ARGUMENT_T_CPP */