1 #include "tao/operation_details.h"
3 #include "tao/ORB_Constants.h"
4 #include "tao/Exception_Data.h"
5 #include "tao/SystemException.h"
6 #include "tao/Argument.h"
10 #include "ace/OS_NS_string.h"
12 #if !defined (__ACE_INLINE__)
13 # include "tao/operation_details.inl"
14 #endif /* ! __ACE_INLINE__ */
16 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
19 TAO_Operation_Details::corba_exception (const char *id
) const
21 for (CORBA::ULong i
= 0; i
!= this->ex_count_
; ++i
)
23 if (ACE_OS::strcmp (id
, this->ex_data_
[i
].id
) != 0)
28 // Create an exception object
29 CORBA::Exception
*exception
= this->ex_data_
[i
].alloc ();
33 throw ::CORBA::NO_MEMORY (0, CORBA::COMPLETED_YES
);
36 // Return the exception object that we just created.
40 // If there are no matches return an unknown exception.
41 throw ::CORBA::UNKNOWN (0, CORBA::COMPLETED_YES
);
45 TAO_Operation_Details::has_exception (::CORBA::Exception
& ex
) const
47 for (CORBA::ULong i
= 0; i
!= this->ex_count_
; ++i
)
49 if (ACE_OS::strcmp (ex
._rep_id (), this->ex_data_
[i
].id
) == 0)
58 TAO_Operation_Details::marshal_args (TAO_OutputCDR
&cdr
)
61 for (CORBA::ULong i
= 0; i
!= this->num_args_
; ++i
)
63 if (!((*this->args_
[i
]).marshal (cdr
)))
67 // Nothing else to fragment. We're also guaranteed to have
68 // data in the CDR stream since the operation was a marshaling
69 // operation, not a fragmentation operation.
70 cdr
.more_fragments (false);
71 #ifdef TAO_HAS_VALUETYPE_OUT_INDIRECTION
72 cdr
.reset_vt_indirect_maps ();
76 #ifdef TAO_HAS_VALUETYPE_OUT_INDIRECTION
77 cdr
.reset_vt_indirect_maps ();
85 TAO_Operation_Details::demarshal_args (TAO_InputCDR
&cdr
)
88 for (CORBA::ULong i
= 0; i
!= this->num_args_
; ++i
)
90 if (!((*this->args_
[i
]).demarshal (cdr
)))
94 cdr
.reset_vt_indirect_maps ();
97 cdr
.reset_vt_indirect_maps ();
103 TAO_END_VERSIONED_NAMESPACE_DECL