Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / operation_details.inl
blobb1cc3fa16c9320ce4b2695634fcac1a1cf0a6e08
1 // -*- C++ -*-
2 //
3 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
5 ACE_INLINE
6 TAO_Operation_Details::TAO_Operation_Details (const char *name,
7                                               const CORBA::ULong len,
8                                               TAO::Argument **args,
9                                               const CORBA::ULong num,
10                                               const CORBA::Boolean has_in_args,
11                                               const TAO::Exception_Data *data,
12                                               const CORBA::ULong count)
13   : opname_ (name)
14     , opname_len_ (len)
15     , request_id_ (0)
16     , response_flags_ (0)
17     , addressing_mode_ (TAO_Target_Specification::Key_Addr)
18     , args_ (args)
19     , num_args_ (num)
20     , has_in_args_ (has_in_args)
21     , ex_data_ (data)
22     , ex_count_ (count)
23     , use_stub_args_ (args ? true : false)
24 #if TAO_HAS_INTERCEPTORS == 1
25     , ft_expiration_time_ (0)
26     , ft_retention_id_ (0)
27 #endif /*TAO_HAS_INTERCEPTORS == 1*/
28     , cac_ (0)
29     , reply_dispatcher_ (0)
33 ACE_INLINE const char*
34 TAO_Operation_Details::opname () const
36   return this->opname_;
39 ACE_INLINE CORBA::ULong
40 TAO_Operation_Details::opname_len () const
42   return this->opname_len_;
45 ACE_INLINE CORBA::Boolean
46 TAO_Operation_Details::argument_flag () const
48   return (this->num_args_ > 1);
51 #if 1
52 ACE_INLINE CORBA::Boolean
53 TAO_Operation_Details::in_argument_flag () const
55   return this->has_in_args_  && this->num_args_ > 1;
57 #else
58 ACE_INLINE CORBA::Boolean
59 TAO_Operation_Details::in_argument_flag () const
61   for (CORBA::ULong i = 1; i < this->num_args_ && !this->has_in_args_; i++)
62     {
63       if (dynamic_cast<TAO::InArgument *>(args_[i]) != 0 ||
64           dynamic_cast<TAO::InoutArgument *>(args_[i]))
65         {
66           return true;
67         }
68     }
69   return false;
71 #endif // TAO_IGNORE_IN_ARGS
73 ACE_INLINE TAO_Service_Context &
74 TAO_Operation_Details::request_service_context ()
76   return this->request_service_info_;
79 ACE_INLINE const TAO_Service_Context &
80 TAO_Operation_Details::request_service_context () const
82   return this->request_service_info_;
85 ACE_INLINE IOP::ServiceContextList &
86 TAO_Operation_Details::request_service_info ()
88   return this->request_service_context ().service_info ();
91 ACE_INLINE const IOP::ServiceContextList &
92 TAO_Operation_Details::request_service_info () const
94   return this->request_service_context ().service_info ();
97 ACE_INLINE TAO_Service_Context &
98 TAO_Operation_Details::reply_service_context ()
100   return this->reply_service_info_;
103 ACE_INLINE const TAO_Service_Context &
104 TAO_Operation_Details::reply_service_context () const
106   return this->reply_service_info_;
109 ACE_INLINE IOP::ServiceContextList &
110 TAO_Operation_Details::reply_service_info ()
112   return this->reply_service_context ().service_info ();
115 ACE_INLINE const IOP::ServiceContextList &
116 TAO_Operation_Details::reply_service_info () const
118   return this->reply_service_context ().service_info ();
121 ACE_INLINE void
122 TAO_Operation_Details::reset_request_service_info ()
124   this->request_service_context ().service_info ().length (0);
126 ACE_INLINE void
127 TAO_Operation_Details::reset_reply_service_info ()
129   this->reply_service_context ().service_info ().length (0);
132 ACE_INLINE void
133 TAO_Operation_Details::request_id (CORBA::ULong id)
135   this->request_id_ = id;
138 ACE_INLINE CORBA::ULong
139 TAO_Operation_Details::request_id () const
141   return this->request_id_;
144 ACE_INLINE void
145 TAO_Operation_Details::response_flags (CORBA::Octet flags)
147   this->response_flags_ = flags;
150 ACE_INLINE CORBA::ULong
151 TAO_Operation_Details::ex_count () const
153   return this->ex_count_;
156 ACE_INLINE TAO::Exception_Data const *
157 TAO_Operation_Details::ex_data () const
159   return this->ex_data_;
162 ACE_INLINE CORBA::Octet
163 TAO_Operation_Details::response_flags () const
165   return this->response_flags_;
168 ACE_INLINE TAO_Target_Specification::TAO_Target_Address
169 TAO_Operation_Details::addressing_mode () const
171   return this->addressing_mode_;
174 ACE_INLINE void
175 TAO_Operation_Details::addressing_mode (CORBA::Short mode)
177   if (mode == 0)
178     this->addressing_mode_ = TAO_Target_Specification::Key_Addr;
179   else if (mode == 1)
180     this->addressing_mode_ = TAO_Target_Specification::Profile_Addr;
181   else if (mode == 2)
182     this->addressing_mode_ = TAO_Target_Specification::Reference_Addr;
185 ACE_INLINE TAO::Argument **
186 TAO_Operation_Details::args () const
188   return this->args_;
191 ACE_INLINE CORBA::ULong
192 TAO_Operation_Details::args_num () const
194   return this->num_args_;
197 ACE_INLINE CORBA::Boolean
198 TAO_Operation_Details::use_stub_args () const
200   return this->use_stub_args_;
203 ACE_INLINE void
204 TAO_Operation_Details::use_stub_args (CORBA::Boolean use_stub_args)
206   this->use_stub_args_ = use_stub_args;
209 #if TAO_HAS_INTERCEPTORS == 1
210 ACE_INLINE void
211 TAO_Operation_Details::ft_expiration_time (TimeBase::TimeT time)
213   this->ft_expiration_time_ = time;
216 ACE_INLINE TimeBase::TimeT
217 TAO_Operation_Details::ft_expiration_time () const
219   return this->ft_expiration_time_;
222 ACE_INLINE void
223 TAO_Operation_Details::ft_retention_id (CORBA::Long request_id)
225   this->ft_retention_id_ = request_id;
228 ACE_INLINE CORBA::Long
229 TAO_Operation_Details::ft_retention_id () const
231   return this->ft_retention_id_;
233 #endif /*TAO_HAS_INTERCEPTORS == 1*/
235 ACE_INLINE TAO::Collocated_Arguments_Converter *
236 TAO_Operation_Details::cac () const
238   return this->cac_;
241 ACE_INLINE void
242 TAO_Operation_Details::cac (TAO::Collocated_Arguments_Converter *cac)
244   this->cac_ = cac;
247 ACE_INLINE TAO_Reply_Dispatcher *
248 TAO_Operation_Details::reply_dispatcher () const
250   return this->reply_dispatcher_;
253 ACE_INLINE void
254 TAO_Operation_Details::reply_dispatcher (TAO_Reply_Dispatcher *rd)
256   this->reply_dispatcher_ = rd;
260 TAO_END_VERSIONED_NAMESPACE_DECL