Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / PortableServer / Var_Size_SArgument_T.cpp
blobdaa01e75ac819bd72593f2e4ba036cb97aa70bdf
1 #ifndef TAO_VAR_SIZE_SARGUMENT_T_CPP
2 #define TAO_VAR_SIZE_SARGUMENT_T_CPP
4 #include "tao/SystemException.h"
6 #if !defined (__ACE_INLINE__)
7 #include "tao/PortableServer/Var_Size_SArgument_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_Var_Size_SArgument_T<S,Insert_Policy>::demarshal (TAO_InputCDR &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_Var_Size_SArgument_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 // ===========================================================
35 template<typename S,
36 template <typename> class Insert_Policy>
37 CORBA::Boolean
38 TAO::Inout_Var_Size_SArgument_T<S,Insert_Policy>::marshal (TAO_OutputCDR &cdr)
40 return cdr << this->x_;
43 template<typename S,
44 template <typename> class Insert_Policy>
45 CORBA::Boolean
46 TAO::Inout_Var_Size_SArgument_T<S,Insert_Policy>::demarshal (TAO_InputCDR & cdr)
48 return cdr >> this->x_;
51 #if TAO_HAS_INTERCEPTORS == 1
53 template<typename S,
54 template <typename> class Insert_Policy>
55 void
56 TAO::Inout_Var_Size_SArgument_T<S,Insert_Policy>::interceptor_value (
57 CORBA::Any *any) const
59 Insert_Policy<S>::any_insert (any, this->x_);
62 #endif /* TAO_HAS_INTERCEPTORS */
64 // ==============================================================
66 template<typename S,
67 template <typename> class Insert_Policy>
68 CORBA::Boolean
69 TAO::Out_Var_Size_SArgument_T<S,Insert_Policy>::marshal (TAO_OutputCDR &cdr)
71 if (0 == this->x_.ptr())
72 throw ::CORBA::BAD_PARAM(0, CORBA::COMPLETED_MAYBE);
74 return cdr << this->x_.in ();
77 #if TAO_HAS_INTERCEPTORS == 1
79 template<typename S,
80 template <typename> class Insert_Policy>
81 void
82 TAO::Out_Var_Size_SArgument_T<S,Insert_Policy>::interceptor_value (
83 CORBA::Any *any) const
85 Insert_Policy<S>::any_insert (any, this->x_.in ());
88 #endif /* TAO_HAS_INTERCEPTORS */
90 // ============================================================
92 template<typename S,
93 template <typename> class Insert_Policy>
94 CORBA::Boolean
95 TAO::Ret_Var_Size_SArgument_T<S,Insert_Policy>::marshal (TAO_OutputCDR &cdr)
97 return cdr << this->x_.in ();
100 #if TAO_HAS_INTERCEPTORS == 1
102 template<typename S,
103 template <typename> class Insert_Policy>
104 void
105 TAO::Ret_Var_Size_SArgument_T<S,Insert_Policy>::interceptor_value (
106 CORBA::Any *any) const
108 Insert_Policy<S>::any_insert (any, this->x_.in ());
111 #endif /* TAO_HAS_INTERCEPTORS */
113 TAO_END_VERSIONED_NAMESPACE_DECL
115 #endif /* TAO_VAR_SIZE_SARGUMENT_T_CPP */