1 #ifndef TAO_BD_STRING_SARGUMENT_T_CPP
2 #define TAO_BD_STRING_SARGUMENT_T_CPP
4 #include "tao/SystemException.h"
6 #if !defined (__ACE_INLINE__)
7 #include "tao/PortableServer/BD_String_SArgument_T.inl"
8 #endif /* __ACE_INLINE__ */
10 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
12 template<typename S_var
,
14 template <typename
> class Insert_Policy
>
16 TAO::In_BD_String_SArgument_T
<S_var
,BOUND
,Insert_Policy
>::demarshal (
19 CORBA::Boolean
const demarshalled
= cdr
>> this->x_
.out ();
20 if (this->x_
.in () != 0 && ACE_OS::strlen (this->x_
.in ()) > BOUND
)
22 throw ::CORBA::BAD_PARAM ();
27 #if TAO_HAS_INTERCEPTORS == 1
29 template<typename S_var
,
31 template <typename
> class Insert_Policy
>
33 TAO::In_BD_String_SArgument_T
<S_var
,BOUND
,Insert_Policy
>::interceptor_value (
34 CORBA::Any
*any
) const
36 typedef typename
S_var::s_traits::from_type from_type
;
37 Insert_Policy
<from_type
>::any_insert (
39 from_type (this->x_
.in (), BOUND
));
42 #endif /* TAO_HAS_INTERCEPTORS */
44 // ===========================================================
46 template<typename S_var
,
48 template <typename
> class Insert_Policy
>
50 TAO::Inout_BD_String_SArgument_T
<S_var
,BOUND
,Insert_Policy
>::marshal (
53 if (this->x_
.in () != 0 && ACE_OS::strlen (this->x_
.in ()) > BOUND
)
55 throw ::CORBA::BAD_PARAM ();
57 return cdr
<< this->x_
.in ();
60 template<typename S_var
,
62 template <typename
> class Insert_Policy
>
64 TAO::Inout_BD_String_SArgument_T
<S_var
,BOUND
,Insert_Policy
>::demarshal (
67 CORBA::Boolean
const demarshalled
= cdr
>> this->x_
.out ();
68 if (this->x_
.in () != 0 && ACE_OS::strlen (this->x_
.in ()) > BOUND
)
70 throw ::CORBA::BAD_PARAM ();
75 #if TAO_HAS_INTERCEPTORS == 1
77 template<typename S_var
,
79 template <typename
> class Insert_Policy
>
81 TAO::Inout_BD_String_SArgument_T
<S_var
,BOUND
,Insert_Policy
>::
82 interceptor_value (CORBA::Any
*any
) const
84 typedef typename
S_var::s_traits::from_type from_type
;
85 Insert_Policy
<from_type
>::any_insert (
87 from_type (this->x_
.in (), BOUND
));
90 #endif /* TAO_HAS_INTERCEPTORS */
92 // ==============================================================
94 template<typename S_var
,
96 template <typename
> class Insert_Policy
>
98 TAO::Out_BD_String_SArgument_T
<S_var
,BOUND
,Insert_Policy
>::marshal (
101 if (this->x_
.in () != 0 && ACE_OS::strlen (this->x_
.in ()) > BOUND
)
103 throw ::CORBA::BAD_PARAM ();
105 return cdr
<< this->x_
.in ();
108 #if TAO_HAS_INTERCEPTORS == 1
110 template<typename S_var
,
112 template <typename
> class Insert_Policy
>
114 TAO::Out_BD_String_SArgument_T
<S_var
,BOUND
,Insert_Policy
>::
115 interceptor_value (CORBA::Any
*any
) const
117 typedef typename
S_var::s_traits::from_type from_type
;
118 Insert_Policy
<from_type
>::any_insert (
120 from_type (this->x_
.in (), BOUND
));
123 #endif /* TAO_HAS_INTERCEPTORS */
125 // ============================================================
127 template<typename S_var
,
129 template <typename
> class Insert_Policy
>
131 TAO::Ret_BD_String_SArgument_T
<S_var
,BOUND
,Insert_Policy
>::marshal (
134 if (this->x_
.in () != 0 && ACE_OS::strlen (this->x_
.in ()) > BOUND
)
136 throw ::CORBA::BAD_PARAM ();
138 return cdr
<< this->x_
.in ();
141 #if TAO_HAS_INTERCEPTORS == 1
143 template<typename S_var
,
145 template <typename
> class Insert_Policy
>
147 TAO::Ret_BD_String_SArgument_T
<S_var
,BOUND
,Insert_Policy
>::
148 interceptor_value (CORBA::Any
*any
) const
150 typedef typename
S_var::s_traits::from_type from_type
;
151 Insert_Policy
<from_type
>::any_insert (
153 from_type (this->x_
.in (), BOUND
));
156 #endif /* TAO_HAS_INTERCEPTORS */
158 TAO_END_VERSIONED_NAMESPACE_DECL
160 #endif /* TAO_BD_STRING_SARGUMENT_T_CPP */