1 #ifndef TAO_FIXED_ARRAY_ARGUMENT_T_CPP
2 #define TAO_FIXED_ARRAY_ARGUMENT_T_CPP
4 #include "tao/Fixed_Array_Argument_T.h"
6 #if !defined (__ACE_INLINE__)
7 #include "tao/Fixed_Array_Argument_T.inl"
8 #endif /* __ACE_INLINE__ */
10 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
12 template<typename S_forany
,
13 template <typename
> class Insert_Policy
>
15 TAO::In_Fixed_Array_Argument_T
<S_forany
,Insert_Policy
>::marshal (
18 return cdr
<< this->x_
;
21 #if TAO_HAS_INTERCEPTORS == 1
23 template<typename S_forany
,
24 template <typename
> class Insert_Policy
>
26 TAO::In_Fixed_Array_Argument_T
<S_forany
,Insert_Policy
>::
27 interceptor_value (CORBA::Any
*any
) const
29 Insert_Policy
<S_forany
>::any_insert (any
, this->x_
);
32 #endif /* TAO_HAS_INTERCEPTORS */
34 template<typename S_forany
,
35 template <typename
> class Insert_Policy
>
36 TAO::In_Fixed_Array_Clonable_Argument_T
<S_forany
,Insert_Policy
>::~In_Fixed_Array_Clonable_Argument_T ()
40 typedef TAO::details::array_traits
<S_forany
> ARRAY_TRAITS
;
41 typename
ARRAY_TRAITS::slice_type
* tmp
=
42 const_cast<typename
ARRAY_TRAITS::slice_type
*>(this->x_
.in ());
43 ARRAY_TRAITS::free (tmp
);
47 template<typename S_forany
,
48 template <typename
> class Insert_Policy
>
50 TAO::In_Fixed_Array_Clonable_Argument_T
<S_forany
,Insert_Policy
>::clone ()
52 typedef TAO::details::array_traits
<S_forany
> ARRAY_TRAITS
;
53 typename
ARRAY_TRAITS::slice_type
* tmp_ptr
= 0;
54 ACE_ALLOCATOR_RETURN (tmp_ptr
,
55 ARRAY_TRAITS::alloc (),
57 ARRAY_TRAITS::copy (tmp_ptr
, this->x_
.in ());
59 In_Fixed_Array_Clonable_Argument_T
<S_forany
,Insert_Policy
>* clone_arg
60 = new In_Fixed_Array_Clonable_Argument_T
<S_forany
,Insert_Policy
> (tmp_ptr
);
61 clone_arg
->is_clone_
= true;
65 // ===========================================================
67 template<typename S_forany
,
68 template <typename
> class Insert_Policy
>
70 TAO::Inout_Fixed_Array_Argument_T
<S_forany
,Insert_Policy
>::marshal (
73 return cdr
<< this->x_
;
76 template<typename S_forany
,
77 template <typename
> class Insert_Policy
>
79 TAO::Inout_Fixed_Array_Argument_T
<S_forany
,Insert_Policy
>::demarshal (
82 return cdr
>> this->x_
;
85 #if TAO_HAS_INTERCEPTORS == 1
87 template<typename S_forany
,
88 template <typename
> class Insert_Policy
>
90 TAO::Inout_Fixed_Array_Argument_T
<S_forany
,Insert_Policy
>::
91 interceptor_value (CORBA::Any
*any
) const
93 Insert_Policy
<S_forany
>::any_insert (any
, this->x_
);
96 #endif /* TAO_HAS_INTERCEPTORS */
98 // ==============================================================
100 template<typename S_forany
,
101 template <typename
> class Insert_Policy
>
103 TAO::Out_Fixed_Array_Argument_T
<S_forany
,Insert_Policy
>::demarshal (
106 return cdr
>> this->x_
;
109 #if TAO_HAS_INTERCEPTORS == 1
111 template<typename S_forany
,
112 template <typename
> class Insert_Policy
>
114 TAO::Out_Fixed_Array_Argument_T
<S_forany
,Insert_Policy
>::
115 interceptor_value (CORBA::Any
*any
) const
117 Insert_Policy
<S_forany
>::any_insert (any
, this->x_
);
120 #endif /* TAO_HAS_INTERCEPTORS */
122 // ============================================================
124 template<typename S_var
,
126 template <typename
> class Insert_Policy
>
128 TAO::Ret_Fixed_Array_Argument_T
<S_var
,S_forany
,Insert_Policy
>::
129 demarshal (TAO_InputCDR
& cdr
)
131 typedef TAO::Array_Traits
<S_forany
> ARRAY_TRAITS
;
132 typename
S_forany::_slice_type
* tmp_ptr
= 0;
133 ACE_ALLOCATOR_RETURN (tmp_ptr
,
134 ARRAY_TRAITS::alloc (),
137 S_forany
tmp (this->x_
.ptr ());
141 #if TAO_HAS_INTERCEPTORS == 1
143 template<typename S_var
,
145 template <typename
> class Insert_Policy
>
147 TAO::Ret_Fixed_Array_Argument_T
<S_var
,S_forany
,Insert_Policy
>::
148 interceptor_value (CORBA::Any
*any
) const
150 Insert_Policy
<S_forany
>::any_insert (any
, S_forany (this->x_
.ptr ()));
153 #endif /* TAO_HAS_INTERCEPTORS */
155 TAO_END_VERSIONED_NAMESPACE_DECL
157 #endif /* TAO_FIXED_ARRAY_ARGUMENT_T_CPP */