Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tao / PortableServer / Special_Basic_SArgument_T.h
blob8149c651288f3dc3e0496f7507672d6b2ad1c1e3
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Special_Basic_SArgument_T.h
7 * @authors Jeff Parsons, Carlos O'Ryan and Ossama Othman
8 */
9 //=============================================================================
12 #ifndef TAO_SPECIAL_BASIC_SARGUMENT_T_H
13 #define TAO_SPECIAL_BASIC_SARGUMENT_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 */
24 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
26 namespace TAO
28 /**
29 * @class In_Special_Basic_SArgument_T
31 * @brief Template class for IN skeleton argument of (w)char/boolean/octet.
34 template<typename S,
35 typename to_S,
36 typename from_S,
37 template <typename> class Insert_Policy>
38 class In_Special_Basic_SArgument_T : public InArgument
40 public:
41 In_Special_Basic_SArgument_T ();
43 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
44 #if TAO_HAS_INTERCEPTORS == 1
45 virtual void interceptor_value (CORBA::Any *any) const;
46 #endif /* TAO_HAS_INTERCEPTORS == 1 */
47 S const & arg () const;
49 private:
50 S x_;
53 /**
54 * @class Inout_Special_Basic_SArgument_T
56 * @brief Template class for INOUT (w)char/boolean/octet skeleton argument.
59 template<typename S,
60 typename to_S,
61 typename from_S,
62 template <typename> class Insert_Policy>
63 class Inout_Special_Basic_SArgument_T : public InoutArgument
65 public:
66 Inout_Special_Basic_SArgument_T ();
68 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
69 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
70 #if TAO_HAS_INTERCEPTORS == 1
71 virtual void interceptor_value (CORBA::Any *any) const;
72 #endif /* TAO_HAS_INTERCEPTORS == 1 */
73 S & arg ();
75 private:
76 S x_;
79 /**
80 * @class Out_Special_Basic_SArgument_T
82 * @brief Template class for OUT skeleton argument of (w)char/boolean/octet.
85 template<typename S,
86 typename to_S,
87 typename from_S,
88 template <typename> class Insert_Policy>
89 class Out_Special_Basic_SArgument_T : public OutArgument
91 public:
92 Out_Special_Basic_SArgument_T ();
94 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
95 #if TAO_HAS_INTERCEPTORS == 1
96 virtual void interceptor_value (CORBA::Any *any) const;
97 #endif /* TAO_HAS_INTERCEPTORS == 1 */
98 S & arg ();
100 private:
101 S x_;
105 * @class Ret_Basic_SArgument_T
107 * @brief Template class for return skeleton value of (w)char/boolean/octet.
110 template<typename S,
111 typename to_S,
112 typename from_S,
113 template <typename> class Insert_Policy>
114 class Ret_Special_Basic_SArgument_T : public RetArgument
116 public:
117 Ret_Special_Basic_SArgument_T ();
119 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
120 #if TAO_HAS_INTERCEPTORS == 1
121 virtual void interceptor_value (CORBA::Any *any) const;
122 #endif /* TAO_HAS_INTERCEPTORS == 1 */
123 S & arg ();
125 private:
126 S x_;
130 * @struct Special_Basic_SArg_Traits_T
132 * @brief Template class for skeleton argument traits
133 * of (w)char/boolean/octet.
136 template<typename T, typename to_T, typename from_T, template <typename> class Insert_Policy>
137 struct Special_Basic_SArg_Traits_T
139 typedef T ret_type;
140 typedef T in_type;
141 typedef T & inout_type;
142 typedef T & out_type;
144 typedef In_Special_Basic_SArgument_T<T,to_T,from_T,Insert_Policy> in_arg_val;
145 typedef Inout_Special_Basic_SArgument_T<T,to_T,from_T,Insert_Policy> inout_arg_val;
146 typedef Out_Special_Basic_SArgument_T<T,to_T,from_T,Insert_Policy> out_arg_val;
147 typedef Ret_Special_Basic_SArgument_T<T,to_T,from_T,Insert_Policy> ret_val;
149 // Typedefs corresponding to return value of arg() method in both
150 // the client and server side argument class templates.
151 typedef T const & in_arg_type;
152 typedef inout_type inout_arg_type;
153 typedef out_type out_arg_type;
154 typedef out_type ret_arg_type;
158 TAO_END_VERSIONED_NAMESPACE_DECL
160 #if defined (__ACE_INLINE__)
161 #include "tao/PortableServer/Special_Basic_SArgument_T.inl"
162 #endif /* __ACE_INLINE__ */
164 #include "tao/PortableServer/Special_Basic_SArgument_T.cpp"
166 #include /**/ "ace/post.h"
168 #endif /* TAO_SPECIAL_BASIC_SARGUMENT_T_H */