3 //=============================================================================
5 * @file BD_String_Argument_T.h
7 * @authors Jeff Parsons and Carlos O'Ryan
9 //=============================================================================
12 #ifndef TAO_BD_STRING_ARGUMENT_T_H
13 #define TAO_BD_STRING_ARGUMENT_T_H
15 #include /**/ "ace/pre.h"
17 #include "ace/CDR_Stream.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "tao/Argument.h"
24 #include "tao/Any_Insert_Policy_T.h"
26 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
31 * @class In_BD_String_Argument_T
33 * @brief Template class for IN bounded (w)string argument.
36 template<typename S_var
,
38 template <typename
> class Insert_Policy
>
39 class In_BD_String_Argument_T
: public InArgument
42 In_BD_String_Argument_T (const typename
S_var::s_traits::char_type
* x
);
44 virtual CORBA::Boolean
marshal (TAO_OutputCDR
&cdr
);
46 #if TAO_HAS_INTERCEPTORS == 1
47 virtual void interceptor_value (CORBA::Any
*any
) const;
48 #endif /* TAO_HAS_INTERCEPTORS == 1 */
50 typename
S_var::s_traits::char_type
const * arg () const;
53 typename
S_var::s_traits::char_type
const * x_
;
57 * @class In_BD_String_Clonable_Argument_T
59 * @brief Template class for IN bounded (w)string argument.
62 template<typename S_var
,
64 template <typename
> class Insert_Policy
>
65 class In_BD_String_Clonable_Argument_T
:
66 public In_BD_String_Argument_T
<S_var
, BOUND
, Insert_Policy
>
69 In_BD_String_Clonable_Argument_T (const typename
S_var::s_traits::char_type
* x
);
70 virtual ~In_BD_String_Clonable_Argument_T ();
72 virtual Argument
* clone ();
78 * @class Inout_BD_String_Argument_T
80 * @brief Template class for INOUT bounded (w)string argument.
83 template<typename S_var
,
85 template <typename
> class Insert_Policy
>
86 class Inout_BD_String_Argument_T
: public InoutArgument
89 Inout_BD_String_Argument_T (typename
S_var::s_traits::char_type
*& x
);
91 virtual CORBA::Boolean
marshal (TAO_OutputCDR
&cdr
);
92 virtual CORBA::Boolean
demarshal (TAO_InputCDR
&cdr
);
93 #if TAO_HAS_INTERCEPTORS == 1
94 virtual void interceptor_value (CORBA::Any
*any
) const;
95 #endif /* TAO_HAS_INTERCEPTORS == 1 */
96 typename
S_var::s_traits::char_type
*& arg ();
99 typename
S_var::s_traits::char_type
*& x_
;
103 * @class Out_BD_String_Argument_T
105 * @brief Template class for OUT bounded (w)string argument.
108 template<typename S_var
,
110 template <typename
> class Insert_Policy
>
111 class Out_BD_String_Argument_T
: public OutArgument
114 Out_BD_String_Argument_T (typename
S_var::s_traits::string_out x
);
116 virtual CORBA::Boolean
demarshal (TAO_InputCDR
&);
117 #if TAO_HAS_INTERCEPTORS == 1
118 virtual void interceptor_value (CORBA::Any
*any
) const;
119 #endif /* TAO_HAS_INTERCEPTORS == 1 */
120 typename
S_var::s_traits::char_type
*& arg ();
123 typename
S_var::s_traits::char_type
*& x_
;
127 * @class Ret_BD_String_Argument_T
129 * @brief Template class for return stub value of bd (w)string argument.
132 template<typename S_var
,
134 template <typename
> class Insert_Policy
>
135 class Ret_BD_String_Argument_T
: public RetArgument
138 Ret_BD_String_Argument_T ();
140 virtual CORBA::Boolean
demarshal (TAO_InputCDR
&);
141 #if TAO_HAS_INTERCEPTORS == 1
142 virtual void interceptor_value (CORBA::Any
*any
) const;
143 #endif /* TAO_HAS_INTERCEPTORS == 1 */
144 typename
S_var::s_traits::char_type
*& arg ();
146 typename
S_var::s_traits::char_type
* excp ();
147 typename
S_var::s_traits::char_type
* retn ();
154 * @struct BD_String_Arg_Traits_T
156 * @brief Template class for stub argument traits of bounded (w)strings.
159 template<typename T_var
,
161 template <typename
> class Insert_Policy
>
162 struct BD_String_Arg_Traits_T
164 typedef typename
T_var::s_traits::char_type
* ret_type
;
165 typedef typename
T_var::s_traits::char_type
const * in_type
;
166 typedef typename
T_var::s_traits::char_type
*& inout_type
;
167 typedef typename
T_var::s_traits::string_out out_type
;
169 typedef In_BD_String_Argument_T
<T_var
,
171 Insert_Policy
> in_arg_val
;
172 typedef In_BD_String_Clonable_Argument_T
<T_var
,
176 typedef Inout_BD_String_Argument_T
<T_var
,
178 Insert_Policy
> inout_arg_val
;
179 typedef Out_BD_String_Argument_T
<T_var
,
181 Insert_Policy
> out_arg_val
;
182 typedef Ret_BD_String_Argument_T
<T_var
,
184 Insert_Policy
> ret_val
;
188 TAO_END_VERSIONED_NAMESPACE_DECL
190 #if defined (__ACE_INLINE__)
191 #include "tao/BD_String_Argument_T.inl"
192 #endif /* __ACE_INLINE__ */
194 #include "tao/BD_String_Argument_T.cpp"
196 #include /**/ "ace/post.h"
198 #endif /* TAO_BD_STRING_ARGUMENT_T_H */