Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / TAO / tao / Special_Basic_Argument_T.h
blobc37630e732dc205219a3c948b431a1b4eaf3a451
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Special_Basic_Argument_T.h
7 * @authors Jeff Parsons and Carlos O'Ryan
8 */
9 //=============================================================================
12 #ifndef TAO_SPECIAL_BASIC_ARGUMENT_T_H
13 #define TAO_SPECIAL_BASIC_ARGUMENT_T_H
15 #include /**/ "ace/pre.h"
17 #include "tao/Argument.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 # pragma once
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
25 namespace TAO
27 /**
28 * @class In_Special_Basic_Argument_T
30 * @brief Template class for IN stub argument of (w)char/boolean/octet.
33 template<typename S,
34 typename to_S,
35 typename from_S,
36 template <typename> class Insert_Policy>
37 class In_Special_Basic_Argument_T : public InArgument
39 public:
40 In_Special_Basic_Argument_T (S const &);
42 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
43 #if TAO_HAS_INTERCEPTORS == 1
44 virtual void interceptor_value (CORBA::Any *any) const;
45 #endif /* TAO_HAS_INTERCEPTORS == 1 */
46 S const & arg () const;
48 protected:
49 S const & x_;
52 /**
53 * @class In_Special_Basic_Clonable_Argument_T
55 * @brief Template class for IN stub argument of (w)char/boolean/octet.
57 template<typename S,
58 typename to_S,
59 typename from_S,
60 template <typename> class Insert_Policy>
61 class In_Special_Basic_Clonable_Argument_T :
62 public In_Special_Basic_Argument_T<S, to_S, from_S, Insert_Policy>
64 public:
65 In_Special_Basic_Clonable_Argument_T (S const &);
66 virtual ~In_Special_Basic_Clonable_Argument_T ();
68 virtual Argument* clone ();
70 private:
71 bool is_clone_;
74 /**
75 * @class Inout_Special_Basic_Argument_T
77 * @brief Template class for INOUT stub argument of (w)char/boolean/octet.
79 template<typename S,
80 typename to_S,
81 typename from_S,
82 template <typename> class Insert_Policy>
83 class Inout_Special_Basic_Argument_T : public InoutArgument
85 public:
86 Inout_Special_Basic_Argument_T (S & x);
88 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
89 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
90 #if TAO_HAS_INTERCEPTORS == 1
91 virtual void interceptor_value (CORBA::Any *any) const;
92 #endif /* TAO_HAS_INTERCEPTORS == 1 */
93 S & arg ();
95 private:
96 S & x_;
99 /**
100 * @class Out_Special_Basic_Argument_T
102 * @brief Template class for OUT stub argument of (w)char/boolean/octet.
104 template<typename S,
105 typename to_S,
106 typename from_S,
107 template <typename> class Insert_Policy>
108 class Out_Special_Basic_Argument_T : public OutArgument
110 public:
111 Out_Special_Basic_Argument_T (S & x);
113 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
114 #if TAO_HAS_INTERCEPTORS == 1
115 virtual void interceptor_value (CORBA::Any *any) const;
116 #endif /* TAO_HAS_INTERCEPTORS == 1 */
117 S & arg ();
119 private:
120 S & x_;
124 * @class Ret_Basic_Argument_T
126 * @brief Template class for return stub value of (w)char/boolean/octet.
128 template<typename S,
129 typename to_S,
130 typename from_S,
131 template <typename> class Insert_Policy>
132 class Ret_Special_Basic_Argument_T : public RetArgument
134 public:
135 Ret_Special_Basic_Argument_T ();
137 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
138 #if TAO_HAS_INTERCEPTORS == 1
139 virtual void interceptor_value (CORBA::Any *any) const;
140 #endif /* TAO_HAS_INTERCEPTORS == 1 */
141 S & arg ();
143 S excp ();
144 S retn ();
146 private:
147 S x_;
151 * @struct Special_Basic_Tag
153 * @brief Struct for basic IDL type arguments id tag.
156 struct TAO_Export Special_Basic_Tag {};
159 * @struct Special_Basic_Arg_Traits_T
161 * @brief Template class for stub argument traits of (w)char/boolean/octet.
163 template<typename T,
164 typename to_T,
165 typename from_T,
166 template <typename> class Insert_Policy>
167 struct Special_Basic_Arg_Traits_T
169 typedef T ret_type;
170 typedef T in_type;
171 typedef T & inout_type;
172 typedef T & out_type;
174 typedef In_Special_Basic_Argument_T<T,to_T,from_T,Insert_Policy> in_arg_val;
175 typedef In_Special_Basic_Clonable_Argument_T<T,to_T,from_T,Insert_Policy>
176 in_clonable_arg_val;
177 typedef Inout_Special_Basic_Argument_T<T,to_T,from_T,Insert_Policy> inout_arg_val;
178 typedef Out_Special_Basic_Argument_T<T,to_T,from_T,Insert_Policy> out_arg_val;
179 typedef Ret_Special_Basic_Argument_T<T,to_T,from_T,Insert_Policy> ret_val;
181 typedef Special_Basic_Tag idl_tag;
185 TAO_END_VERSIONED_NAMESPACE_DECL
187 #if defined (__ACE_INLINE__)
188 #include "tao/Special_Basic_Argument_T.inl"
189 #endif /* __ACE_INLINE__ */
191 #include "tao/Special_Basic_Argument_T.cpp"
193 #include /**/ "ace/post.h"
195 #endif /* TAO_SPECIAL_BASIC_ARGUMENT_T_H */