Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / PortableServer / Basic_SArgument_T.h
blob95963964245fe7cb0443f903f28d8bf1312595b3
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Basic_SArgument_T.h
7 * @authors Jeff Parsons, Carlos O'Ryan and Ossama Othman
8 */
9 //=============================================================================
12 #ifndef TAO_BASIC_SARGUMENT_T_H
13 #define TAO_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 */
23 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
25 namespace TAO
27 /**
28 * @class In_Basic_SArgument_T
30 * @brief Template class for IN skeleton argument of basic IDL types.
33 template<typename S, template <typename> class Insert_Policy>
34 class In_Basic_SArgument_T : public InArgument
36 public:
37 In_Basic_SArgument_T ();
39 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
40 #if TAO_HAS_INTERCEPTORS == 1
41 virtual void interceptor_value (CORBA::Any *any) const;
42 #endif /* TAO_HAS_INTERCEPTORS == 1 */
43 S arg () const;
45 private:
46 S x_;
49 /**
50 * @class Inout_Basic_SArgument_T
52 * @brief Template class for INOUT skeleton argument of basic IDL types.
55 template<typename S, template <typename> class Insert_Policy>
56 class Inout_Basic_SArgument_T : public InoutArgument
58 public:
59 Inout_Basic_SArgument_T ();
61 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
62 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
63 #if TAO_HAS_INTERCEPTORS == 1
64 virtual void interceptor_value (CORBA::Any *any) const;
65 #endif /* TAO_HAS_INTERCEPTORS == 1 */
66 S & arg ();
68 private:
69 S x_;
72 /**
73 * @class Out_Basic_SArgument_T
75 * @brief Template class for OUT skeleton argument of basic IDL types.
78 template<typename S, template <typename> class Insert_Policy>
79 class Out_Basic_SArgument_T : public OutArgument
81 public:
82 Out_Basic_SArgument_T ();
84 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
85 #if TAO_HAS_INTERCEPTORS == 1
86 virtual void interceptor_value (CORBA::Any *any) const;
87 #endif /* TAO_HAS_INTERCEPTORS == 1 */
88 S & arg ();
90 private:
91 S x_;
94 /**
95 * @class Ret_Basic_SArgument_T
97 * @brief Template class for return skeleton value of basic IDL types.
100 template<typename S, template <typename> class Insert_Policy>
101 class Ret_Basic_SArgument_T : public RetArgument
103 public:
104 Ret_Basic_SArgument_T ();
106 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
107 #if TAO_HAS_INTERCEPTORS == 1
108 virtual void interceptor_value (CORBA::Any *any) const;
109 #endif /* TAO_HAS_INTERCEPTORS == 1 */
110 S & arg ();
112 private:
113 S x_;
117 * @struct Basic_SArg_Traits_T
119 * @brief Template class for skeleton argument traits of basic IDL types.
122 template<typename T, template <typename> class Insert_Policy>
123 struct Basic_SArg_Traits_T
125 typedef T ret_type;
126 typedef T in_type;
127 typedef T & inout_type;
128 typedef T & out_type;
130 typedef In_Basic_SArgument_T<T, Insert_Policy> in_arg_val;
131 typedef Inout_Basic_SArgument_T<T, Insert_Policy> inout_arg_val;
132 typedef Out_Basic_SArgument_T<T, Insert_Policy> out_arg_val;
133 typedef Ret_Basic_SArgument_T<T, Insert_Policy> ret_val;
135 // Typedefs corresponding to return value of arg() method in both
136 // the client and server side argument class templates.
137 typedef in_type in_arg_type;
138 typedef inout_type inout_arg_type;
139 typedef out_type out_arg_type;
140 typedef out_type ret_arg_type;
144 TAO_END_VERSIONED_NAMESPACE_DECL
146 #if defined (__ACE_INLINE__)
147 #include "tao/PortableServer/Basic_SArgument_T.inl"
148 #endif /* __ACE_INLINE__ */
150 #include "tao/PortableServer/Basic_SArgument_T.cpp"
152 #include /**/ "ace/post.h"
154 #endif /* TAO_BASIC_SARGUMENT_T_H */