Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Special_Basic_Argument_T.cpp
blob889bef472c6a74db2c18e22b54e94888bfb23cd4
1 #ifndef TAO_SPECIAL_BASIC_ARGUMENT_T_CPP
2 #define TAO_SPECIAL_BASIC_ARGUMENT_T_CPP
4 #include "tao/Special_Basic_Argument_T.h"
5 #include "tao/CDR.h"
7 #if !defined (__ACE_INLINE__)
8 #include "tao/Special_Basic_Argument_T.inl"
9 #endif /* __ACE_INLINE__ */
11 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
13 template<typename S,
14 typename to_S,
15 typename from_S,
16 template <typename> class Insert_Policy>
17 CORBA::Boolean
18 TAO::In_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::marshal (TAO_OutputCDR &cdr)
20 return cdr << from_S (this->x_);
23 #if TAO_HAS_INTERCEPTORS == 1
25 template<typename S,
26 typename to_S,
27 typename from_S,
28 template <typename> class Insert_Policy>
29 void
30 TAO::In_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::interceptor_value (
31 CORBA::Any *any) const
33 Insert_Policy<from_S>::any_insert (any, from_S (this->x_));
36 #endif /* TAO_HAS_INTERCEPTORS */
38 template<typename S,
39 typename to_S,
40 typename from_S,
41 template <typename> class Insert_Policy>
42 TAO::In_Special_Basic_Clonable_Argument_T<S,to_S,from_S,Insert_Policy>::~In_Special_Basic_Clonable_Argument_T ()
44 if (this->is_clone_)
46 S* tmp = const_cast<S*> (&this->x_);
47 delete tmp;
51 template<typename S,
52 typename to_S,
53 typename from_S,
54 template <typename> class Insert_Policy>
55 TAO::Argument*
56 TAO::In_Special_Basic_Clonable_Argument_T<S,to_S,from_S,Insert_Policy>::clone ()
58 S* clone_x = new S (this->x_);
59 In_Special_Basic_Clonable_Argument_T<S,to_S,from_S,Insert_Policy>* clone_arg
60 = new In_Special_Basic_Clonable_Argument_T<S,to_S,from_S,Insert_Policy> (*clone_x);
61 clone_arg->is_clone_ = true;
62 return clone_arg;
65 // ===========================================================
67 template<typename S,
68 typename to_S,
69 typename from_S,
70 template <typename> class Insert_Policy>
71 CORBA::Boolean
72 TAO::Inout_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::marshal (
73 TAO_OutputCDR & cdr)
75 return cdr << from_S (this->x_);
78 template<typename S,
79 typename to_S,
80 typename from_S,
81 template <typename> class Insert_Policy>
82 CORBA::Boolean
83 TAO::Inout_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::demarshal (
84 TAO_InputCDR & cdr
87 return cdr >> to_S (this->x_);
90 #if TAO_HAS_INTERCEPTORS == 1
92 template<typename S,
93 typename to_S,
94 typename from_S,
95 template <typename> class Insert_Policy>
96 void
97 TAO::Inout_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::interceptor_value (
98 CORBA::Any *any) const
100 Insert_Policy<from_S>::any_insert (any, from_S (this->x_));
103 #endif /* TAO_HAS_INTERCEPTORS */
105 // ==============================================================
107 template<typename S,
108 typename to_S,
109 typename from_S,
110 template <typename> class Insert_Policy>
111 CORBA::Boolean
112 TAO::Out_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::demarshal (
113 TAO_InputCDR & cdr
116 return cdr >> to_S (this->x_);
119 #if TAO_HAS_INTERCEPTORS == 1
121 template<typename S,
122 typename to_S,
123 typename from_S,
124 template <typename> class Insert_Policy>
125 void
126 TAO::Out_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::interceptor_value (
127 CORBA::Any *any) const
129 Insert_Policy<from_S>::any_insert (any, from_S (this->x_));
132 #endif /* TAO_HAS_INTERCEPTORS */
134 // ============================================================
136 template<typename S,
137 typename to_S,
138 typename from_S,
139 template <typename> class Insert_Policy>
140 CORBA::Boolean
141 TAO::Ret_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::demarshal (
142 TAO_InputCDR & cdr
145 return cdr >> to_S (this->x_);
148 #if TAO_HAS_INTERCEPTORS == 1
150 template<typename S,
151 typename to_S,
152 typename from_S,
153 template <typename> class Insert_Policy>
154 void
155 TAO::Ret_Special_Basic_Argument_T<S,to_S,from_S,Insert_Policy>::interceptor_value (
156 CORBA::Any *any) const
158 Insert_Policy<from_S>::any_insert (any, from_S (this->x_));
161 #endif /* TAO_HAS_INTERCEPTORS */
163 TAO_END_VERSIONED_NAMESPACE_DECL
165 #endif /* TAO_SPECIAL_BASIC_ARGUMENT_T_CPP */