Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / PortableServer / Var_Size_SArgument_T.h
blobe0d581cd9be871ae181368c3cfa9b5d21689dd10
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Var_Size_SArgument_T.h
7 * @authors Jeff Parsons, Carlos O'Ryan and Ossama Othman
8 */
9 //=============================================================================
11 #ifndef TAO_VAR_SIZE_SARGUMENT_T_H
12 #define TAO_VAR_SIZE_SARGUMENT_T_H
14 #include /**/ "ace/pre.h"
15 #include "tao/Argument.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 # pragma once
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
23 namespace TAO
25 /**
26 * @class In_Var_Size_SArgument_T
28 * @brief Template class for IN skeleton argument of fixed size IDL types.
31 template<typename S,
32 template <typename> class Insert_Policy>
33 class In_Var_Size_SArgument_T : public InArgument
35 public:
36 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
37 #if TAO_HAS_INTERCEPTORS == 1
38 virtual void interceptor_value (CORBA::Any *any) const;
39 #endif /* TAO_HAS_INTERCEPTORS == 1 */
40 S const & arg () const;
42 private:
43 S x_;
46 /**
47 * @class Inout_Var_Size_SArgument_T
49 * @brief Template class for INOUT skeleton arg of fixed size IDL types.
52 template<typename S,
53 template <typename> class Insert_Policy>
54 class Inout_Var_Size_SArgument_T : public InoutArgument
56 public:
57 Inout_Var_Size_SArgument_T ();
59 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
60 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
61 #if TAO_HAS_INTERCEPTORS == 1
62 virtual void interceptor_value (CORBA::Any *any) const;
63 #endif /* TAO_HAS_INTERCEPTORS == 1 */
64 S & arg ();
66 private:
67 S x_;
70 /**
71 * @class Out_Var_Size_SArgument_T
73 * @brief Template class for OUT skeleton argument of fixed size IDL types.
76 template<typename S,
77 template <typename> class Insert_Policy>
78 class Out_Var_Size_SArgument_T : public OutArgument
80 public:
81 Out_Var_Size_SArgument_T ();
83 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
84 #if TAO_HAS_INTERCEPTORS == 1
85 virtual void interceptor_value (CORBA::Any *any) const;
86 #endif /* TAO_HAS_INTERCEPTORS == 1 */
87 S *& arg ();
89 private:
90 typename S::_var_type x_;
93 /**
94 * @class Ret_Var_Size_SArgument_T
96 * @brief Template class for return skeleton value of fixed size IDL types.
99 template<typename S,
100 template <typename> class Insert_Policy>
101 class Ret_Var_Size_SArgument_T : public RetArgument
103 public:
104 Ret_Var_Size_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 typename S::_var_type x_;
117 * @struct Var_Size_SArg_Traits_T
119 * @brief Template class for skeleton argument traits of
120 * variable size IDL types.
123 template<typename T,
124 template <typename> class Insert_Policy>
125 struct Var_Size_SArg_Traits_T
127 typedef T * ret_type;
128 typedef const T & in_type;
129 typedef T & inout_type;
130 typedef typename T::_out_type out_type;
132 typedef In_Var_Size_SArgument_T<T,Insert_Policy> in_arg_val;
133 typedef Inout_Var_Size_SArgument_T<T,Insert_Policy> inout_arg_val;
134 typedef Out_Var_Size_SArgument_T<T,Insert_Policy> out_arg_val;
135 typedef Ret_Var_Size_SArgument_T<T,Insert_Policy> ret_val;
137 // Typedefs corresponding to return value of arg() method in both
138 // the client and server side argument class templates.
139 typedef in_type in_arg_type;
140 typedef inout_type inout_arg_type;
141 typedef ret_type & out_arg_type;
142 typedef ret_type & ret_arg_type;
146 TAO_END_VERSIONED_NAMESPACE_DECL
148 #if defined (__ACE_INLINE__)
149 #include "tao/PortableServer/Var_Size_SArgument_T.inl"
150 #endif /* __ACE_INLINE__ */
152 #include "tao/PortableServer/Var_Size_SArgument_T.cpp"
154 #include /**/ "ace/post.h"
156 #endif /* TAO_VAR_SIZE_SARGUMENT_T_H */