Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Basic_Argument_T.h
blob20d5ba83a47aa43dfb190ab3f1b59f4138d17752
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Basic_Argument_T.h
7 * @authors Jeff Parsons and Carlos O'Ryan
8 */
9 //=============================================================================
11 #ifndef TAO_BASIC_ARGUMENT_T_H
12 #define TAO_BASIC_ARGUMENT_T_H
14 #include /**/ "ace/pre.h"
16 #include "tao/Argument.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
24 namespace TAO
26 /**
27 * @class In_Basic_Argument_T
29 * @brief Template class for IN stub argument of basic IDL types.
31 template<typename S,
32 template <typename> class Insert_Policy>
33 class In_Basic_Argument_T : public InArgument
35 public:
36 In_Basic_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 arg () const;
44 protected:
45 S const & x_;
48 /**
49 * @class In_Basic_Clonable_Argument_T
51 * @brief Template class for IN stub argument of basic IDL types.
54 template<typename S,
55 template <typename> class Insert_Policy>
56 class In_Basic_Clonable_Argument_T :
57 public In_Basic_Argument_T<S, Insert_Policy>
59 public:
60 In_Basic_Clonable_Argument_T (S const & x);
61 virtual ~In_Basic_Clonable_Argument_T ();
63 virtual Argument* clone ();
65 private:
66 bool is_clone_;
69 /**
70 * @class Inout_Basic_Argument_T
72 * @brief Template class for INOUT stub argument of basic IDL types.
75 template<typename S,
76 template <typename> class Insert_Policy>
77 class Inout_Basic_Argument_T : public InoutArgument
79 public:
80 Inout_Basic_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_Basic_Argument_T
96 * @brief Template class for OUT stub argument of basic IDL types.
99 template<typename S,
100 template <typename> class Insert_Policy>
101 class Out_Basic_Argument_T : public OutArgument
103 public:
104 Out_Basic_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_Basic_Argument_T
119 * @brief Template class for return stub value of basic IDL types.
122 template<typename S,
123 template <typename> class Insert_Policy>
124 class Ret_Basic_Argument_T : public RetArgument
126 public:
127 Ret_Basic_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 ();
135 S excp ();
136 S retn ();
138 private:
139 S x_;
143 * @struct Basic_Arg_Traits_T
145 * @brief Template class for stub argument traits of basic IDL types.
148 template<typename T, template <typename> class Insert_Policy>
149 struct Basic_Arg_Traits_T
151 typedef T ret_type;
152 typedef T in_type;
153 typedef T & inout_type;
154 typedef T & out_type;
156 typedef In_Basic_Argument_T<T, Insert_Policy> in_arg_val;
157 typedef In_Basic_Clonable_Argument_T<T, Insert_Policy>
158 in_clonable_arg_val;
159 typedef Inout_Basic_Argument_T<T, Insert_Policy> inout_arg_val;
160 typedef Out_Basic_Argument_T<T, Insert_Policy> out_arg_val;
161 typedef Ret_Basic_Argument_T<T, Insert_Policy> ret_val;
165 TAO_END_VERSIONED_NAMESPACE_DECL
167 #if defined (__ACE_INLINE__)
168 #include "tao/Basic_Argument_T.inl"
169 #endif /* __ACE_INLINE__ */
171 #include "tao/Basic_Argument_T.cpp"
173 #include /**/ "ace/post.h"
175 #endif /* TAO_BASIC_ARGUMENT_T_H */