Updated logging to include the class/method so that it is more obvious where these...
[ACE_TAO.git] / TAO / tao / Object_Argument_T.h
bloba2e2937c869868d6c3372d3696247ca68519233b
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Object_Argument_T.h
7 * @authors Jeff Parsons and Carlos O'Ryan
8 */
9 //=============================================================================
12 #ifndef TAO_OBJECT_ARGUMENT_T_H
13 #define TAO_OBJECT_ARGUMENT_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_Object_Argument_T
30 * @brief Template class for IN object argument.
33 template<typename S_ptr,
34 template <typename> class Insert_Policy>
35 class In_Object_Argument_T : public InArgument
37 public:
38 In_Object_Argument_T (S_ptr x);
40 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
41 #if TAO_HAS_INTERCEPTORS == 1
42 virtual void interceptor_value (CORBA::Any *any) const;
43 #endif /* TAO_HAS_INTERCEPTORS == 1 */
44 S_ptr arg () const;
46 protected:
47 S_ptr x_;
50 template<typename S_ptr>
51 struct In_Object_Argument_Cloner_T
53 static void duplicate(S_ptr objref);
54 static void release(S_ptr objref);
57 /**
58 * @class In_Object_Clonable_Argument_T
60 * @brief Template class for IN object argument.
63 template<typename S_ptr,
64 template <typename> class Insert_Policy>
65 class In_Object_Clonable_Argument_T :
66 public In_Object_Argument_T<S_ptr, Insert_Policy>
68 public:
69 In_Object_Clonable_Argument_T (S_ptr x);
70 virtual ~In_Object_Clonable_Argument_T ();
72 virtual Argument* clone ();
74 private:
75 bool is_clone_;
78 /**
79 * @class Inout_Object_Argument_T
81 * @brief Template class for INOUT object argument.
84 template<typename S_ptr,
85 typename S_traits,
86 template <typename> class Insert_Policy>
87 class Inout_Object_Argument_T : public InoutArgument
89 public:
90 Inout_Object_Argument_T (S_ptr & x);
92 virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
93 virtual CORBA::Boolean demarshal (TAO_InputCDR &cdr);
94 #if TAO_HAS_INTERCEPTORS == 1
95 virtual void interceptor_value (CORBA::Any *any) const;
96 #endif /* TAO_HAS_INTERCEPTORS == 1 */
97 S_ptr & arg ();
99 private:
100 S_ptr & x_;
104 * @class Out_Object_Argument_T
106 * @brief Template class for OUT object argument.
109 template<typename S_ptr,
110 typename S_out,
111 template <typename> class Insert_Policy>
112 class Out_Object_Argument_T : public OutArgument
114 public:
115 Out_Object_Argument_T (S_out & x);
117 virtual CORBA::Boolean demarshal (TAO_InputCDR &cdr);
118 #if TAO_HAS_INTERCEPTORS == 1
119 virtual void interceptor_value (CORBA::Any *any) const;
120 #endif /* TAO_HAS_INTERCEPTORS == 1 */
121 S_out arg ();
123 private:
124 S_ptr & x_;
128 * @class Ret_Object_Argument_T
130 * @brief Template class for return stub value of object argument.
133 template<typename S_ptr,
134 typename S_var,
135 template <typename> class Insert_Policy>
136 class Ret_Object_Argument_T : public RetArgument
138 public:
140 Ret_Object_Argument_T ();
142 virtual CORBA::Boolean demarshal (TAO_InputCDR &);
143 #if TAO_HAS_INTERCEPTORS == 1
144 virtual void interceptor_value (CORBA::Any *any) const;
145 #endif /* TAO_HAS_INTERCEPTORS == 1 */
146 S_ptr & arg ();
148 S_ptr excp ();
149 S_ptr retn ();
151 private:
152 S_var x_;
156 * @struct Object_Arg_Traits_T
158 * @brief Template class for stub argument traits of objects.
160 template<typename T_ptr,
161 typename T_var,
162 typename T_out,
163 typename T_traits,
164 template <typename> class Insert_Policy>
165 struct Object_Arg_Traits_T
167 typedef T_ptr ret_type;
168 typedef T_ptr in_type;
169 typedef T_ptr & inout_type;
170 typedef T_out out_type;
172 typedef In_Object_Argument_T<T_ptr,
173 Insert_Policy> in_arg_val;
174 typedef In_Object_Clonable_Argument_T<T_ptr,
175 Insert_Policy> in_clonable_arg_val;
176 typedef Inout_Object_Argument_T<T_ptr,
177 T_traits,
178 Insert_Policy> inout_arg_val;
179 typedef Out_Object_Argument_T<T_ptr,
180 T_out,
181 Insert_Policy> out_arg_val;
182 typedef Ret_Object_Argument_T<T_ptr,
183 T_var,
184 Insert_Policy> ret_val;
188 TAO_END_VERSIONED_NAMESPACE_DECL
190 #if defined (__ACE_INLINE__)
191 #include "tao/Object_Argument_T.inl"
192 #endif /* __ACE_INLINE__ */
194 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
195 #include "tao/Object_Argument_T.cpp"
196 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
198 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
199 #pragma implementation ("Object_Argument_T.cpp")
200 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
202 #include /**/ "ace/post.h"
204 #endif /* TAO_OBJECT_ARGUMENT_T_H */