Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Basic_Argument_T.cpp
blob9f4b3058cd173b84612fba2d2b40d4ac36f837ee
1 #ifndef TAO_BASIC_ARGUMENT_T_CPP
2 #define TAO_BASIC_ARGUMENT_T_CPP
4 #include "tao/Basic_Argument_T.h"
6 #if !defined (__ACE_INLINE__)
7 #include "tao/Basic_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_Basic_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_Basic_Argument_T<S, Insert_Policy>::interceptor_value (CORBA::Any *any) const
27 Insert_Policy<S>::any_insert (any, this->x_);
30 #endif /* TAO_HAS_INTERCEPTORS */
32 template<typename S,
33 template <typename> class Insert_Policy>
34 TAO::In_Basic_Clonable_Argument_T<S,Insert_Policy>::~In_Basic_Clonable_Argument_T ()
36 if (this->is_clone_)
38 S* tmp = const_cast<S*> (&this->x_);
39 delete tmp;
43 template<typename S,
44 template <typename> class Insert_Policy>
45 TAO::Argument*
46 TAO::In_Basic_Clonable_Argument_T<S,Insert_Policy>::clone ()
48 S* clone_x = new S (this->x_);
49 In_Basic_Clonable_Argument_T<S,Insert_Policy>* clone_arg =
50 new In_Basic_Clonable_Argument_T<S,Insert_Policy> (*clone_x);
51 clone_arg->is_clone_ = true;
52 return clone_arg;
55 // ===========================================================
57 template<typename S,
58 template <typename> class Insert_Policy>
59 CORBA::Boolean
60 TAO::Inout_Basic_Argument_T<S, Insert_Policy>::marshal (TAO_OutputCDR &cdr)
62 return cdr << this->x_;
65 template<typename S,
66 template <typename> class Insert_Policy>
67 CORBA::Boolean
68 TAO::Inout_Basic_Argument_T<S, Insert_Policy>::demarshal (TAO_InputCDR & cdr)
70 return cdr >> this->x_;
73 #if TAO_HAS_INTERCEPTORS == 1
75 template<typename S,
76 template <typename> class Insert_Policy>
77 void
78 TAO::Inout_Basic_Argument_T<S, Insert_Policy>::interceptor_value (CORBA::Any *any) const
80 Insert_Policy<S>::any_insert (any, this->x_);
83 #endif /* TAO_HAS_INTERCEPTORS */
85 // ==============================================================
87 template<typename S,
88 template <typename> class Insert_Policy>
89 CORBA::Boolean
90 TAO::Out_Basic_Argument_T<S, Insert_Policy>::demarshal (TAO_InputCDR & cdr)
92 return cdr >> this->x_;
95 #if TAO_HAS_INTERCEPTORS == 1
97 template<typename S,
98 template <typename> class Insert_Policy>
99 void
100 TAO::Out_Basic_Argument_T<S, Insert_Policy>::interceptor_value (CORBA::Any *any) const
102 Insert_Policy<S>::any_insert (any, this->x_);
105 #endif /* TAO_HAS_INTERCEPTORS */
107 // ============================================================
109 template<typename S,
110 template <typename> class Insert_Policy>
111 CORBA::Boolean
112 TAO::Ret_Basic_Argument_T<S, Insert_Policy>::demarshal (TAO_InputCDR & cdr)
114 return cdr >> this->x_;
117 #if TAO_HAS_INTERCEPTORS == 1
119 template<typename S,
120 template <typename> class Insert_Policy>
121 void
122 TAO::Ret_Basic_Argument_T<S, Insert_Policy>::interceptor_value (CORBA::Any *any) const
124 Insert_Policy<S>::any_insert (any, this->x_);
127 #endif /* TAO_HAS_INTERCEPTORS */
129 TAO_END_VERSIONED_NAMESPACE_DECL
131 #endif /* TAO_BASIC_ARGUMENT_T_CPP */