Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / PortableServer / Object_SArgument_T.h
blob0d14e0dcbaee40ccd4960a96b685319ea58a32ee
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Object_SArgument_T.h
7 * @authors Jeff Parsons, Carlos O'Ryan and Ossama Othman
8 */
9 //=============================================================================
12 #ifndef TAO_OBJECT_SARGUMENT_T_H
13 #define TAO_OBJECT_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 */
23 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
25 // This set of classes is also used by valuetype arguments. If the
26 // specialization is done using S * for the parameter, the semantics
27 // are the same as for interfaces, so there's no need for another
28 // set of classes.
30 namespace TAO
32 /**
33 * @class In_Object_SArgument_T
35 * @brief Template class for IN skeleton object argument.
38 template<typename S_ptr,
39 typename S_var,
40 template <typename> class Insert_Policy>
41 class In_Object_SArgument_T : public InArgument
43 public:
44 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
45 #if TAO_HAS_INTERCEPTORS == 1
46 virtual void interceptor_value (CORBA::Any *any) const;
47 #endif /* TAO_HAS_INTERCEPTORS == 1 */
48 S_ptr arg () const;
50 private:
51 S_var x_;
54 /**
55 * @class Inout_Object_SArgument_T
57 * @brief Template class for INOUT skeleton object argument.
60 template<typename S_ptr,
61 typename S_var,
62 template <typename> class Insert_Policy>
63 class Inout_Object_SArgument_T : public InoutArgument
65 public:
66 Inout_Object_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_ptr & arg ();
75 private:
76 S_var x_;
79 /**
80 * @class Out_Object_SArgument_T
82 * @brief Template class for INOUT skeleton object argument.
85 template<typename S_ptr,
86 typename S_var,
87 typename S_out,
88 template <typename> class Insert_Policy>
89 class Out_Object_SArgument_T : public OutArgument
91 public:
92 Out_Object_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_out arg ();
100 private:
101 S_var x_;
105 * @class Ret_Object_SArgument_T
107 * @brief Template class for return skeleton value of object.
110 template<typename S_ptr,
111 typename S_var,
112 template <typename> class Insert_Policy>
113 class Ret_Object_SArgument_T : public RetArgument
115 public:
116 Ret_Object_SArgument_T ();
118 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
119 #if TAO_HAS_INTERCEPTORS == 1
120 virtual void interceptor_value (CORBA::Any *any) const;
121 #endif /* TAO_HAS_INTERCEPTORS == 1 */
122 S_ptr & arg ();
124 private:
125 S_var x_;
129 * @struct Object_SArg_Traits_T
131 * @brief Template class for skeleton argument traits of objects.
134 template<typename T_ptr,
135 typename T_var,
136 typename T_out,
137 template <typename> class Insert_Policy>
138 struct Object_SArg_Traits_T
140 typedef T_ptr ret_type;
141 typedef T_ptr in_type;
142 typedef T_ptr & inout_type;
143 typedef T_out out_type;
145 typedef In_Object_SArgument_T<T_ptr,
146 T_var,
147 Insert_Policy> in_arg_val;
148 typedef Inout_Object_SArgument_T<T_ptr,
149 T_var,
150 Insert_Policy> inout_arg_val;
151 typedef Out_Object_SArgument_T<T_ptr,
152 T_var,
153 T_out,
154 Insert_Policy> out_arg_val;
155 typedef Ret_Object_SArgument_T<T_ptr,
156 T_var,
157 Insert_Policy> ret_val;
159 // Typedefs corresponding to return value of arg() method in both
160 // the client and server side argument class templates.
161 typedef in_type in_arg_type;
162 typedef inout_type inout_arg_type;
163 typedef out_type out_arg_type;
164 typedef inout_type ret_arg_type;
168 TAO_END_VERSIONED_NAMESPACE_DECL
170 #if defined (__ACE_INLINE__)
171 #include "tao/PortableServer/Object_SArgument_T.inl"
172 #endif /* __ACE_INLINE__ */
174 #include "tao/PortableServer/Object_SArgument_T.cpp"
176 #include /**/ "ace/post.h"
178 #endif /* TAO_OBJECT_SARGUMENT_T_H */