1 #ifndef TAO_VAR_SIZE_ARGUMENT_T_CPP
2 #define TAO_VAR_SIZE_ARGUMENT_T_CPP
4 #include "tao/Var_Size_Argument_T.h"
5 #include "ace/OS_Memory.h"
7 #if !defined (__ACE_INLINE__)
8 #include "tao/Var_Size_Argument_T.inl"
9 #endif /* __ACE_INLINE__ */
11 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
14 template <typename
> class Insert_Policy
>
16 TAO::In_Var_Size_Argument_T
<S
,Insert_Policy
>::marshal (TAO_OutputCDR
&cdr
)
18 return cdr
<< *this->x_
;
21 #if TAO_HAS_INTERCEPTORS == 1
24 template <typename
> class Insert_Policy
>
26 TAO::In_Var_Size_Argument_T
<S
,Insert_Policy
>::interceptor_value (
27 CORBA::Any
*any
) const
29 Insert_Policy
<S
>::any_insert (any
, *this->x_
);
32 #endif /* TAO_HAS_INTERCEPTORS */
35 template <typename
> class Insert_Policy
>
36 TAO::In_Var_Size_Clonable_Argument_T
<S
,Insert_Policy
>::~In_Var_Size_Clonable_Argument_T ()
40 S
* tmp
= const_cast<S
*> (this->x_
);
46 template <typename
> class Insert_Policy
>
48 TAO::In_Var_Size_Clonable_Argument_T
<S
,Insert_Policy
>::clone ()
50 S
* clone_x
= new S (*(this->x_
));
51 In_Var_Size_Clonable_Argument_T
<S
,Insert_Policy
>* clone_arg
52 = new In_Var_Size_Clonable_Argument_T
<S
,Insert_Policy
> (*clone_x
);
53 clone_arg
->is_clone_
= true;
57 // ===========================================================
60 template <typename
> class Insert_Policy
>
62 TAO::Inout_Var_Size_Argument_T
<S
,Insert_Policy
>::marshal (
66 return cdr
<< *this->x_
;
70 template <typename
> class Insert_Policy
>
72 TAO::Inout_Var_Size_Argument_T
<S
,Insert_Policy
>::demarshal (
76 return cdr
>> *this->x_
;
79 #if TAO_HAS_INTERCEPTORS == 1
82 template <typename
> class Insert_Policy
>
84 TAO::Inout_Var_Size_Argument_T
<S
,Insert_Policy
>::interceptor_value (
85 CORBA::Any
*any
) const
87 Insert_Policy
<S
>::any_insert (any
, *this->x_
);
90 #endif /* TAO_HAS_INTERCEPTORS */
92 // ==============================================================
95 template <typename
> class Insert_Policy
>
97 TAO::Out_Var_Size_Argument_T
<S
,Insert_Policy
>::demarshal (
101 this->x_
= new (std::nothrow
) S
;
102 return cdr
>> *this->x_
;
105 #if TAO_HAS_INTERCEPTORS == 1
108 template <typename
> class Insert_Policy
>
110 TAO::Out_Var_Size_Argument_T
<S
,Insert_Policy
>::interceptor_value (
111 CORBA::Any
*any
) const
113 Insert_Policy
<S
>::any_insert (any
, *this->x_
);
116 #endif /* TAO_HAS_INTERCEPTORS */
118 // ============================================================
121 template <typename
> class Insert_Policy
>
123 TAO::Ret_Var_Size_Argument_T
<S
,Insert_Policy
>::demarshal (
132 return cdr
>> this->x_
.inout ();
135 #if TAO_HAS_INTERCEPTORS == 1
138 template <typename
> class Insert_Policy
>
140 TAO::Ret_Var_Size_Argument_T
<S
,Insert_Policy
>::interceptor_value (
141 CORBA::Any
*any
) const
143 Insert_Policy
<S
>::any_insert (any
, this->x_
.in ());
146 #endif /* TAO_HAS_INTERCEPTORS */
148 TAO_END_VERSIONED_NAMESPACE_DECL
150 #endif /* TAO_VAR_SIZE_ARGUMENT_T_CPP */