Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Fixed_Size_Argument_T.h
blob316533c56563ebf3f1c280d49d7b788187cea8b3
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Fixed_Size_Argument_T.h
7 * @authors Jeff Parsons and Carlos O'Ryan
8 */
9 //=============================================================================
11 #ifndef TAO_FIXED_SIZE_ARGUMENT_T_H
12 #define TAO_FIXED_SIZE_ARGUMENT_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_Fixed_Size_Argument_T
28 * @brief Template class for IN stub argument of fixed size IDL types.
31 template<typename S,
32 template <typename> class Insert_Policy>
33 class In_Fixed_Size_Argument_T : public InArgument
35 public:
36 In_Fixed_Size_Argument_T (S const & x);
38 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
39 #if TAO_HAS_INTERCEPTORS == 1
40 virtual void interceptor_value (CORBA::Any *any) const;
41 #endif /* TAO_HAS_INTERCEPTORS == 1 */
42 S const & arg () const;
44 protected:
45 S const * x_;
48 /**
49 * @class In_Fixed_Size_Clonable_Argument_T
51 * @brief Template class for IN stub argument of fixed size IDL types.
54 template<typename S,
55 template <typename> class Insert_Policy>
56 class In_Fixed_Size_Clonable_Argument_T :
57 public In_Fixed_Size_Argument_T<S, Insert_Policy>
59 public:
60 In_Fixed_Size_Clonable_Argument_T (S const & x);
61 virtual ~In_Fixed_Size_Clonable_Argument_T ();
63 virtual Argument* clone ();
65 private:
66 bool is_clone_;
69 /**
70 * @class Inout_Fixed_Size_Argument_T
72 * @brief Template class for INOUT stub argument of fixed size IDL types.
75 template<typename S,
76 template <typename> class Insert_Policy>
77 class Inout_Fixed_Size_Argument_T : public InoutArgument
79 public:
80 Inout_Fixed_Size_Argument_T (S & x);
82 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
83 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
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 S * x_;
93 /**
94 * @class Out_Fixed_Size_Argument_T
96 * @brief Template class for OUT stub argument of fixed size IDL types.
99 template<typename S,
100 template <typename> class Insert_Policy>
101 class Out_Fixed_Size_Argument_T : public OutArgument
103 public:
104 Out_Fixed_Size_Argument_T (S & x);
106 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
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 * @class Ret_Fixed_Size_Argument_T
119 * @brief Template class for return stub value of fixed size IDL types.
122 template<typename S,
123 template <typename> class Insert_Policy>
124 class Ret_Fixed_Size_Argument_T : public RetArgument
126 public:
127 Ret_Fixed_Size_Argument_T ();
129 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
130 #if TAO_HAS_INTERCEPTORS == 1
131 virtual void interceptor_value (CORBA::Any *any) const;
132 #endif /* TAO_HAS_INTERCEPTORS == 1 */
133 S & arg ();
134 S excp ();
135 S retn ();
137 protected:
138 S x_;
142 * @struct Fixed_Size_Arg_Traits_T
144 * @brief Template class for argument traits of fixed size IDL types.
147 template<typename T,
148 template <typename> class Insert_Policy>
149 struct Fixed_Size_Arg_Traits_T
151 typedef T ret_type;
152 typedef T const & in_type;
153 typedef T & inout_type;
154 typedef T & out_type;
156 typedef In_Fixed_Size_Argument_T<T,Insert_Policy> in_arg_val;
157 typedef In_Fixed_Size_Clonable_Argument_T<T,Insert_Policy>
158 in_clonable_arg_val;
159 typedef Inout_Fixed_Size_Argument_T<T,Insert_Policy> inout_arg_val;
160 typedef Out_Fixed_Size_Argument_T<T,Insert_Policy> out_arg_val;
161 typedef Ret_Fixed_Size_Argument_T<T,Insert_Policy> ret_val;
165 TAO_END_VERSIONED_NAMESPACE_DECL
167 #if defined (__ACE_INLINE__)
168 #include "tao/Fixed_Size_Argument_T.inl"
169 #endif /* __ACE_INLINE__ */
171 #include "tao/Fixed_Size_Argument_T.cpp"
173 #include /**/ "ace/post.h"
175 #endif /* TAO_FIXED_SIZE_ARGUMENT_T_H */