Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / TAO / tao / PortableServer / Fixed_Size_SArgument_T.h
blobaa4874f13170b6ef488ba3acbf94c789b752e28c
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Fixed_Size_SArgument_T.h
7 * @author Jeff Parsons
8 * @author Carlos O'Ryan
9 * @author Ossama Othman
11 //=============================================================================
13 #ifndef TAO_FIXED_SIZE_SARGUMENT_T_H
14 #define TAO_FIXED_SIZE_SARGUMENT_T_H
16 #include /**/ "ace/pre.h"
18 #include "tao/Argument.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 # pragma once
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
26 namespace TAO
28 /**
29 * @class In_Fixed_Size_SArgument_T
31 * @brief Skeleton class template for operation "IN" arguments of
32 * fixed size IDL types.
34 * Skeleton class template for operation "IN" arguments of fixed
35 * size IDL types.
37 template<typename S, template <typename> class Insert_Policy>
38 class In_Fixed_Size_SArgument_T : public InArgument
40 public:
41 /**
42 * @name @c TAO::Argument Method Overrides
44 * @c TAO::Argument method overrides specific to the type of
45 * operation argument represented by this class.
47 * @see @c TAO::Argument.
49 //@{
50 virtual CORBA::Boolean demarshal (TAO_InputCDR & cdr);
52 #if TAO_HAS_INTERCEPTORS == 1
53 virtual void interceptor_value (CORBA::Any *any) const;
54 #endif /* TAO_HAS_INTERCEPTORS == 1 */
55 //@}
57 /// Retrieve underlying argument.
58 S const & arg () const;
60 private:
61 /// Reference to the "IN" argument.
62 S x_;
65 // ------------------------------------------------------------
67 /**
68 * @class Inout_Fixed_Size_SArgument_T
70 * @brief Template class for INOUT skeleton arg of fixed size IDL types.
73 template<typename S, template <typename> class Insert_Policy>
74 class Inout_Fixed_Size_SArgument_T : public InoutArgument
76 public:
77 /// Constructor.
78 Inout_Fixed_Size_SArgument_T ();
80 /**
81 * @name @c TAO::Argument Method Overrides
83 * @c TAO::Argument method overrides specific to the type of
84 * operation argument represented by this class.
86 * @see @c TAO::Argument.
88 //@{
89 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
90 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
91 #if TAO_HAS_INTERCEPTORS == 1
92 virtual void interceptor_value (CORBA::Any *any) const;
93 #endif /* TAO_HAS_INTERCEPTORS == 1 */
94 //@}
96 S & arg ();
98 private:
99 S x_;
102 // ------------------------------------------------------------
105 * @class Out_Fixed_Size_SArgument_T
107 * @brief Template class for OUT skeleton argument of fixed size IDL types.
110 template<typename S, template <typename> class Insert_Policy>
111 class Out_Fixed_Size_SArgument_T : public OutArgument
113 public:
114 /// Constructor.
115 Out_Fixed_Size_SArgument_T ();
118 * @name @c TAO::Argument Method Overrides
120 * @c TAO::Argument method overrides specific to the type of
121 * operation argument represented by this class.
123 * @see @c TAO::Argument.
125 //@{
126 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
127 #if TAO_HAS_INTERCEPTORS == 1
128 virtual void interceptor_value (CORBA::Any *any) const;
129 #endif /* TAO_HAS_INTERCEPTORS == 1 */
130 //@}
132 S & arg ();
134 private:
135 S x_;
138 // ------------------------------------------------------------
141 * @class Ret_Fixed_Size_SArgument_T
143 * @brief Template class for return skeleton value of fixed size IDL types.
146 template<typename S, template <typename> class Insert_Policy>
147 class Ret_Fixed_Size_SArgument_T : public RetArgument
149 public:
150 /// Constructor.
151 Ret_Fixed_Size_SArgument_T ();
154 * @name @c TAO::Argument Method Overrides
156 * @c TAO::Argument method overrides specific to the type of
157 * operation argument represented by this class.
159 * @see @c TAO::Argument.
161 //@{
162 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
163 #if TAO_HAS_INTERCEPTORS == 1
164 virtual void interceptor_value (CORBA::Any *any) const;
165 #endif /* TAO_HAS_INTERCEPTORS == 1 */
166 //@}
168 S & arg ();
170 private:
171 S x_;
174 // ------------------------------------------------------------
177 * @struct Fixed_Size_SArg_Traits_T
179 * @brief Template class for argument traits of fixed size IDL types.
182 template<typename T,
183 template <typename> class Insert_Policy>
184 struct Fixed_Size_SArg_Traits_T
186 typedef T ret_type;
187 typedef T const & in_type;
188 typedef T & inout_type;
189 typedef T & out_type;
191 typedef In_Fixed_Size_SArgument_T<T,Insert_Policy> in_arg_val;
192 typedef Inout_Fixed_Size_SArgument_T<T,Insert_Policy> inout_arg_val;
193 typedef Out_Fixed_Size_SArgument_T<T,Insert_Policy> out_arg_val;
194 typedef Ret_Fixed_Size_SArgument_T<T,Insert_Policy> ret_val;
196 // Typedefs corresponding to return value of arg() method in both
197 // the client and server side argument class templates.
198 typedef in_type in_arg_type;
199 typedef inout_type inout_arg_type;
200 typedef out_type out_arg_type;
201 typedef out_type ret_arg_type;
205 TAO_END_VERSIONED_NAMESPACE_DECL
207 #if defined (__ACE_INLINE__)
208 #include "tao/PortableServer/Fixed_Size_SArgument_T.inl"
209 #endif /* __ACE_INLINE__ */
211 #include "tao/PortableServer/Fixed_Size_SArgument_T.cpp"
213 #include /**/ "ace/post.h"
215 #endif /* TAO_FIXED_SIZE_SARGUMENT_T_H */