Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / PortableServer / Var_Array_SArgument_T.cpp
blob6742fe7f68a0b34d1b4d71e824e3b7662ec0b333
1 #ifndef TAO_VAR_ARRAY_SARGUMENT_T_CPP
2 #define TAO_VAR_ARRAY_SARGUMENT_T_CPP
4 #if !defined (__ACE_INLINE__)
5 #include "tao/PortableServer/Var_Array_SArgument_T.inl"
6 #endif /* __ACE_INLINE__ */
8 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
10 template<typename S_forany,
11 template <typename> class Insert_Policy>
12 CORBA::Boolean
13 TAO::In_Var_Array_SArgument_T<S_forany,
14 Insert_Policy>::demarshal (TAO_InputCDR & cdr)
16 S_forany tmp (this->x_);
17 return cdr >> tmp;
20 #if TAO_HAS_INTERCEPTORS == 1
22 template<typename S_forany,
23 template <typename> class Insert_Policy>
24 void
25 TAO::In_Var_Array_SArgument_T<S_forany,
26 Insert_Policy>::interceptor_value (
27 CORBA::Any *any) const
29 Insert_Policy<S_forany>::any_insert (any, S_forany (this->x_));
32 #endif /* TAO_HAS_INTERCEPTORS */
34 // ===========================================================
36 template<typename S_forany,
37 template <typename> class Insert_Policy>
38 CORBA::Boolean
39 TAO::Inout_Var_Array_SArgument_T<S_forany,
40 Insert_Policy>::marshal (TAO_OutputCDR &cdr)
42 return cdr << S_forany (this->x_);
45 template<typename S_forany,
46 template <typename> class Insert_Policy>
47 CORBA::Boolean
48 TAO::Inout_Var_Array_SArgument_T<S_forany,
49 Insert_Policy>::demarshal (TAO_InputCDR & cdr)
51 S_forany tmp (this->x_);
52 return cdr >> tmp;
55 #if TAO_HAS_INTERCEPTORS == 1
57 template<typename S_forany,
58 template <typename> class Insert_Policy>
59 void
60 TAO::Inout_Var_Array_SArgument_T<S_forany,
61 Insert_Policy>::interceptor_value (
62 CORBA::Any *any) const
64 typedef typename S_forany::_slice_type slice_type;
65 Insert_Policy<S_forany>::any_insert (
66 any,
67 S_forany (const_cast <slice_type *>(this->x_)));
70 #endif /* TAO_HAS_INTERCEPTORS */
72 // ==============================================================
74 template<typename S_var,
75 typename S_forany,
76 template <typename> class Insert_Policy>
77 CORBA::Boolean
78 TAO::Out_Var_Array_SArgument_T<S_var,
79 S_forany,
80 Insert_Policy>::marshal (
81 TAO_OutputCDR & cdr
84 S_forany tmp (this->x_.ptr ());
85 return cdr << tmp;
88 #if TAO_HAS_INTERCEPTORS == 1
90 template<typename S_var,
91 typename S_forany,
92 template <typename> class Insert_Policy>
93 void
94 TAO::Out_Var_Array_SArgument_T<S_var,
95 S_forany,
96 Insert_Policy>::interceptor_value (
97 CORBA::Any *any) const
99 Insert_Policy<S_forany>::any_insert (any, S_forany (this->x_.ptr ()));
102 #endif /* TAO_HAS_INTERCEPTORS */
104 // ============================================================
106 template<typename S_var,
107 typename S_forany,
108 template <typename> class Insert_Policy>
109 CORBA::Boolean
110 TAO::Ret_Var_Array_SArgument_T<S_var,
111 S_forany,
112 Insert_Policy>::marshal (
113 TAO_OutputCDR & cdr
116 return cdr << S_forany (this->x_.ptr ());
119 #if TAO_HAS_INTERCEPTORS == 1
121 template<typename S_var,
122 typename S_forany,
123 template <typename> class Insert_Policy>
124 void
125 TAO::Ret_Var_Array_SArgument_T<S_var,
126 S_forany,
127 Insert_Policy>::interceptor_value (
128 CORBA::Any *any) const
130 Insert_Policy<S_forany>::any_insert (any, S_forany (this->x_.ptr ()));
133 #endif /* TAO_HAS_INTERCEPTORS */
135 TAO_END_VERSIONED_NAMESPACE_DECL
137 #endif /* TAO_VAR_ARRAY_SARGUMENT_T_CPP */