--- orig/MessagingC.cpp Mon May 1 21:10:26 2000 +++ MessagingC.cpp Mon May 1 21:10:05 2000 @@ -9,10 +9,18 @@ #include "MessagingC.h" +#if (TAO_HAS_CORBA_MESSAGING == 1) + +#include "tao/MessagingS.h" +#include "tao/Stub.h" +#include "tao/Invocation.h" + #if !defined (__ACE_INLINE__) #include "MessagingC.i" #endif /* !defined INLINE */ +ACE_RCSID(tao, MessagingC, "$Id$") + static const CORBA::Long _oc_Messaging_RebindMode[] = { TAO_ENCAP_BYTE_ORDER, // byte order @@ -161,6 +169,9 @@ TAO_NAMESPACE_BEGIN (Messaging) TAO_NAMESPACE_DEFINE (const CORBA::UShort, ORDER_DEADLINE, 8U) TAO_NAMESPACE_END + +#if (TAO_HAS_REBIND_POLICY == 1) + TAO_NAMESPACE_TYPE (const CORBA::ULong) TAO_NAMESPACE_BEGIN (Messaging) TAO_NAMESPACE_DEFINE (const CORBA::ULong, REBIND_POLICY_TYPE, 23U) @@ -212,7 +223,7 @@ retv = ACE_reinterpret_cast (void*, this); else if (type == ACE_reinterpret_cast (ptr_arith_t, - &ACE_NESTED_CLASS (CORBA, Policy)::_narrow)) + &CORBA::Policy::_narrow)) retv = ACE_reinterpret_cast ( void *, @@ -225,7 +236,7 @@ else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -236,6 +247,10 @@ return "IDL:omg.org/Messaging/RebindPolicy:1.0"; } +#endif /* TAO_HAS_REBIND_POLICY == 1 */ + +#if (TAO_HAS_SYNC_SCOPE_POLICY == 1) + TAO_NAMESPACE_TYPE (const CORBA::ULong) TAO_NAMESPACE_BEGIN (Messaging) TAO_NAMESPACE_DEFINE (const CORBA::ULong, SYNC_SCOPE_POLICY_TYPE, 24U) @@ -287,7 +302,7 @@ retv = ACE_reinterpret_cast (void*, this); else if (type == ACE_reinterpret_cast (ptr_arith_t, - &ACE_NESTED_CLASS (CORBA, Policy)::_narrow)) + &CORBA::Policy::_narrow)) retv = ACE_reinterpret_cast ( void *, @@ -300,7 +315,7 @@ else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -311,6 +326,10 @@ return "IDL:omg.org/Messaging/SyncScopePolicy:1.0"; } +#endif /* TAO_HAS_SYNC_SCOPE_POLICY == 1 */ + +#if (TAO_HAS_PRIORITY_POLICIES == 1) + TAO_NAMESPACE_TYPE (const CORBA::ULong) TAO_NAMESPACE_BEGIN (Messaging) TAO_NAMESPACE_DEFINE (const CORBA::ULong, REQUEST_PRIORITY_POLICY_TYPE, 25U) @@ -398,7 +417,7 @@ retv = ACE_reinterpret_cast (void*, this); else if (type == ACE_reinterpret_cast (ptr_arith_t, - &ACE_NESTED_CLASS (CORBA, Policy)::_narrow)) + &CORBA::Policy::_narrow)) retv = ACE_reinterpret_cast ( void *, @@ -411,7 +430,7 @@ else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -422,6 +441,10 @@ return "IDL:omg.org/Messaging/RequestPriorityPolicy:1.0"; } +#endif /* TAO_HAS_PRIORITY_POLICIES == 1 */ + +#if (TAO_HAS_REQUEST_START_TIME_POLICY == 1) + TAO_NAMESPACE_TYPE (const CORBA::ULong) TAO_NAMESPACE_BEGIN (Messaging) TAO_NAMESPACE_DEFINE (const CORBA::ULong, REPLY_PRIORITY_POLICY_TYPE, 26U) @@ -473,7 +496,7 @@ retv = ACE_reinterpret_cast (void*, this); else if (type == ACE_reinterpret_cast (ptr_arith_t, - &ACE_NESTED_CLASS (CORBA, Policy)::_narrow)) + &CORBA::Policy::_narrow)) retv = ACE_reinterpret_cast ( void *, @@ -486,7 +509,7 @@ else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -497,6 +520,10 @@ return "IDL:omg.org/Messaging/ReplyPriorityPolicy:1.0"; } +#endif /* TAO_HAS_PRIORITY_POLICIES == 1 */ + +#if (TAO_HAS_REQUEST_START_TIME_POLICY == 1) + TAO_NAMESPACE_TYPE (const CORBA::ULong) TAO_NAMESPACE_BEGIN (Messaging) TAO_NAMESPACE_DEFINE (const CORBA::ULong, REQUEST_START_TIME_POLICY_TYPE, 27U) @@ -548,7 +575,7 @@ retv = ACE_reinterpret_cast (void*, this); else if (type == ACE_reinterpret_cast (ptr_arith_t, - &ACE_NESTED_CLASS (CORBA, Policy)::_narrow)) + &CORBA::Policy::_narrow)) retv = ACE_reinterpret_cast ( void *, @@ -561,7 +588,7 @@ else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -572,6 +599,10 @@ return "IDL:omg.org/Messaging/RequestStartTimePolicy:1.0"; } +#endif /* TAO_HAS_REQUEST_START_TIME_POLICY == 1 */ + +#if (TAO_HAS_REQUEST_END_TIME_POLICY == 1) + TAO_NAMESPACE_TYPE (const CORBA::ULong) TAO_NAMESPACE_BEGIN (Messaging) TAO_NAMESPACE_DEFINE (const CORBA::ULong, REQUEST_END_TIME_POLICY_TYPE, 28U) @@ -623,7 +654,7 @@ retv = ACE_reinterpret_cast (void*, this); else if (type == ACE_reinterpret_cast (ptr_arith_t, - &ACE_NESTED_CLASS (CORBA, Policy)::_narrow)) + &CORBA::Policy::_narrow)) retv = ACE_reinterpret_cast ( void *, @@ -636,7 +667,7 @@ else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -647,6 +678,10 @@ return "IDL:omg.org/Messaging/RequestEndTimePolicy:1.0"; } +#endif /* TAO_HAS_REQUEST_END_TIME_POLICY == 1 */ + +#if (TAO_HAS_REPLY_START_TIME_POLICY == 1) + TAO_NAMESPACE_TYPE (const CORBA::ULong) TAO_NAMESPACE_BEGIN (Messaging) TAO_NAMESPACE_DEFINE (const CORBA::ULong, REPLY_START_TIME_POLICY_TYPE, 29U) @@ -698,7 +733,7 @@ retv = ACE_reinterpret_cast (void*, this); else if (type == ACE_reinterpret_cast (ptr_arith_t, - &ACE_NESTED_CLASS (CORBA, Policy)::_narrow)) + &CORBA::Policy::_narrow)) retv = ACE_reinterpret_cast ( void *, @@ -711,7 +746,7 @@ else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -722,6 +757,10 @@ return "IDL:omg.org/Messaging/ReplyStartTimePolicy:1.0"; } +#endif /* TAO_HAS_REPLY_START_TIME_POLICY == 1 */ + +#if (TAO_HAS_REPLY_END_TIME_POLICY == 1) + TAO_NAMESPACE_TYPE (const CORBA::ULong) TAO_NAMESPACE_BEGIN (Messaging) TAO_NAMESPACE_DEFINE (const CORBA::ULong, REPLY_END_TIME_POLICY_TYPE, 30U) @@ -773,7 +812,7 @@ retv = ACE_reinterpret_cast (void*, this); else if (type == ACE_reinterpret_cast (ptr_arith_t, - &ACE_NESTED_CLASS (CORBA, Policy)::_narrow)) + &CORBA::Policy::_narrow)) retv = ACE_reinterpret_cast ( void *, @@ -786,7 +825,7 @@ else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -797,6 +836,10 @@ return "IDL:omg.org/Messaging/ReplyEndTimePolicy:1.0"; } +#endif /* TAO_HAS_REPLY_END_TIME_POLICY == 1 */ + +#if (TAO_HAS_RELATIVE_REQUEST_TIMEOUT_POLICY == 1) + TAO_NAMESPACE_TYPE (const CORBA::ULong) TAO_NAMESPACE_BEGIN (Messaging) TAO_NAMESPACE_DEFINE (const CORBA::ULong, RELATIVE_REQ_TIMEOUT_POLICY_TYPE, 31U) @@ -848,7 +891,7 @@ retv = ACE_reinterpret_cast (void*, this); else if (type == ACE_reinterpret_cast (ptr_arith_t, - &ACE_NESTED_CLASS (CORBA, Policy)::_narrow)) + &CORBA::Policy::_narrow)) retv = ACE_reinterpret_cast ( void *, @@ -861,7 +904,7 @@ else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -872,6 +915,10 @@ return "IDL:omg.org/Messaging/RelativeRequestTimeoutPolicy:1.0"; } +#endif /* TAO_HAS_RELATIVE_REQUEST_TIMEOUT_POLICY == 1 */ + +#if (TAO_HAS_RELATIVE_ROUNDTRIP_TIMEOUT_POLICY == 1) + TAO_NAMESPACE_TYPE (const CORBA::ULong) TAO_NAMESPACE_BEGIN (Messaging) TAO_NAMESPACE_DEFINE (const CORBA::ULong, RELATIVE_RT_TIMEOUT_POLICY_TYPE, 32U) @@ -923,7 +970,7 @@ retv = ACE_reinterpret_cast (void*, this); else if (type == ACE_reinterpret_cast (ptr_arith_t, - &ACE_NESTED_CLASS (CORBA, Policy)::_narrow)) + &CORBA::Policy::_narrow)) retv = ACE_reinterpret_cast ( void *, @@ -936,7 +983,7 @@ else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -947,6 +994,10 @@ return "IDL:omg.org/Messaging/RelativeRoundtripTimeoutPolicy:1.0"; } +#endif /* TAO_HAS_RELATIVE_ROUNDTRIP_TIMEOUT_POLICY == 1 */ + +#if (TAO_HAS_ROUTING_POLICY == 1) + TAO_NAMESPACE_TYPE (const CORBA::ULong) TAO_NAMESPACE_BEGIN (Messaging) TAO_NAMESPACE_DEFINE (const CORBA::ULong, ROUTING_POLICY_TYPE, 33U) @@ -1034,7 +1085,7 @@ retv = ACE_reinterpret_cast (void*, this); else if (type == ACE_reinterpret_cast (ptr_arith_t, - &ACE_NESTED_CLASS (CORBA, Policy)::_narrow)) + &CORBA::Policy::_narrow)) retv = ACE_reinterpret_cast ( void *, @@ -1047,7 +1098,7 @@ else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -1058,6 +1109,10 @@ return "IDL:omg.org/Messaging/RoutingPolicy:1.0"; } +#endif /* TAO_HAS_ROUTING_POLICY == 1 */ + +#if (TAO_HAS_MAX_HOPS_POLICY == 1) + TAO_NAMESPACE_TYPE (const CORBA::ULong) TAO_NAMESPACE_BEGIN (Messaging) TAO_NAMESPACE_DEFINE (const CORBA::ULong, MAX_HOPS_POLICY_TYPE, 34U) @@ -1109,7 +1164,7 @@ retv = ACE_reinterpret_cast (void*, this); else if (type == ACE_reinterpret_cast (ptr_arith_t, - &ACE_NESTED_CLASS (CORBA, Policy)::_narrow)) + &CORBA::Policy::_narrow)) retv = ACE_reinterpret_cast ( void *, @@ -1122,7 +1177,7 @@ else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -1133,6 +1188,10 @@ return "IDL:omg.org/Messaging/MaxHopsPolicy:1.0"; } +#endif /* TAO_HAS_MAX_HOPS_POLICY == 1 */ + +#if (TAO_HAS_QUEUE_ORDER_POLICY == 1) + TAO_NAMESPACE_TYPE (const CORBA::ULong) TAO_NAMESPACE_BEGIN (Messaging) TAO_NAMESPACE_DEFINE (const CORBA::ULong, QUEUE_ORDER_POLICY_TYPE, 35U) @@ -1184,7 +1243,7 @@ retv = ACE_reinterpret_cast (void*, this); else if (type == ACE_reinterpret_cast (ptr_arith_t, - &ACE_NESTED_CLASS (CORBA, Policy)::_narrow)) + &CORBA::Policy::_narrow)) retv = ACE_reinterpret_cast ( void *, @@ -1197,7 +1256,7 @@ else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -1208,6 +1267,8 @@ return "IDL:omg.org/Messaging/QueueOrderPolicy:1.0"; } +#endif /* TAO_HAS_QUEUE_ORDER_POLICY == 1 */ + static const CORBA::Long _oc_Messaging_PolicyValue[] = { TAO_ENCAP_BYTE_ORDER, // byte order @@ -1254,30 +1315,30 @@ Messaging::PolicyValue::_tao_seq_Octet::_tao_seq_Octet (void) {} Messaging::PolicyValue::_tao_seq_Octet::_tao_seq_Octet (CORBA::ULong max) // uses max size - : + : #if !defined (TAO_USE_SEQUENCE_TEMPLATES) TAO_Unbounded_Sequence #else /* TAO_USE_SEQUENCE_TEMPLATES */ TAO_Unbounded_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ +#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ (max) {} Messaging::PolicyValue::_tao_seq_Octet::_tao_seq_Octet (CORBA::ULong max, CORBA::ULong length, CORBA::Octet *buffer, CORBA::Boolean release) - : + : #if !defined (TAO_USE_SEQUENCE_TEMPLATES) TAO_Unbounded_Sequence #else /* TAO_USE_SEQUENCE_TEMPLATES */ TAO_Unbounded_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ +#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ (max, length, buffer, release) {} Messaging::PolicyValue::_tao_seq_Octet::_tao_seq_Octet (const _tao_seq_Octet &seq) // copy ctor - : + : #if !defined (TAO_USE_SEQUENCE_TEMPLATES) TAO_Unbounded_Sequence #else /* TAO_USE_SEQUENCE_TEMPLATES */ TAO_Unbounded_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ +#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ (seq) {} Messaging::PolicyValue::_tao_seq_Octet::~_tao_seq_Octet (void) // dtor @@ -1293,7 +1354,7 @@ #if !defined (TAO_USE_SEQUENCE_TEMPLATES) - + #if !defined (__TAO_UNBOUNDED_SEQUENCE_MESSAGING_POLICYVALUESEQ_CS_) #define __TAO_UNBOUNDED_SEQUENCE_MESSAGING_POLICYVALUESEQ_CS_ @@ -1302,43 +1363,43 @@ { Messaging::PolicyValue* tmp = 0; tmp = _TAO_Unbounded_Sequence_Messaging_PolicyValueSeq::allocbuf (length); - + if (this->buffer_ != 0) { Messaging::PolicyValue *old = ACE_reinterpret_cast (Messaging::PolicyValue *,this->buffer_); - + for (CORBA::ULong i = 0; i < this->length_; ++i) tmp[i] = old[i]; - + if (this->release_) _TAO_Unbounded_Sequence_Messaging_PolicyValueSeq::freebuf (old); - + } this->buffer_ = tmp; } - + void Messaging::_TAO_Unbounded_Sequence_Messaging_PolicyValueSeq::_deallocate_buffer (void) { if (this->buffer_ == 0 || this->release_ == 0) return; - + Messaging::PolicyValue *tmp = ACE_reinterpret_cast (Messaging::PolicyValue *,this->buffer_); - + _TAO_Unbounded_Sequence_Messaging_PolicyValueSeq::freebuf (tmp); this->buffer_ = 0; - } - + } + Messaging::_TAO_Unbounded_Sequence_Messaging_PolicyValueSeq::~_TAO_Unbounded_Sequence_Messaging_PolicyValueSeq (void) // Dtor. { this->_deallocate_buffer (); } - - + + #endif /* end #if !defined */ -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ +#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ #if !defined (_MESSAGING_POLICYVALUESEQ_CS_) #define _MESSAGING_POLICYVALUESEQ_CS_ @@ -1350,30 +1411,30 @@ Messaging::PolicyValueSeq::PolicyValueSeq (void) {} Messaging::PolicyValueSeq::PolicyValueSeq (CORBA::ULong max) // uses max size - : + : #if !defined (TAO_USE_SEQUENCE_TEMPLATES) _TAO_Unbounded_Sequence_Messaging_PolicyValueSeq #else /* TAO_USE_SEQUENCE_TEMPLATES */ TAO_Unbounded_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ +#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ (max) {} Messaging::PolicyValueSeq::PolicyValueSeq (CORBA::ULong max, CORBA::ULong length, Messaging::PolicyValue *buffer, CORBA::Boolean release) - : + : #if !defined (TAO_USE_SEQUENCE_TEMPLATES) _TAO_Unbounded_Sequence_Messaging_PolicyValueSeq #else /* TAO_USE_SEQUENCE_TEMPLATES */ TAO_Unbounded_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ +#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ (max, length, buffer, release) {} Messaging::PolicyValueSeq::PolicyValueSeq (const PolicyValueSeq &seq) // copy ctor - : + : #if !defined (TAO_USE_SEQUENCE_TEMPLATES) _TAO_Unbounded_Sequence_Messaging_PolicyValueSeq #else /* TAO_USE_SEQUENCE_TEMPLATES */ TAO_Unbounded_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ +#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ (seq) {} Messaging::PolicyValueSeq::~PolicyValueSeq (void) // dtor @@ -1435,81 +1496,77 @@ TAO_NAMESPACE_BEGIN (Messaging) TAO_NAMESPACE_DEFINE (const CORBA::ULong, INVOCATION_POLICIES, 2U) TAO_NAMESPACE_END -static const CORBA::Long _oc_Messaging_ExceptionHolder[] = + +#if (TAO_HAS_AMI_CALLBACK == 1) || (TAO_HAS_AMI_POLLER == 1) + +Messaging::ExceptionHolder* Messaging::ExceptionHolder::_downcast (CORBA::ValueBase* v) { - TAO_ENCAP_BYTE_ORDER, // byte order - 42, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x4d657373), ACE_NTOHL (0x6167696e), ACE_NTOHL (0x672f4578), ACE_NTOHL (0x63657074), ACE_NTOHL (0x696f6e48), ACE_NTOHL (0x6f6c6465), ACE_NTOHL (0x723a312e), ACE_NTOHL (0x30000000), // repository ID = IDL:omg.org/Messaging/ExceptionHolder:1.0 - 16, ACE_NTOHL (0x45786365), ACE_NTOHL (0x7074696f), ACE_NTOHL (0x6e486f6c), ACE_NTOHL (0x64657200), // name = ExceptionHolder - 3, // member count - 20, ACE_NTOHL (0x69735f73), ACE_NTOHL (0x79737465), ACE_NTOHL (0x6d5f6578), ACE_NTOHL (0x63657074), ACE_NTOHL (0x696f6e00), // name = is_system_exception - CORBA::tk_boolean, + if (v == 0) return 0; + return (ExceptionHolder* ) v->_tao_obv_narrow ((ptr_arith_t) &_downcast); +} - 11, ACE_NTOHL (0x62797465), ACE_NTOHL (0x5f6f7264), ACE_NTOHL (0x65720000), // name = byte_order - CORBA::tk_boolean, +const char* Messaging::ExceptionHolder::_tao_obv_repository_id () const +{ + return this->_tao_obv_static_repository_id (); +} - 20, ACE_NTOHL (0x6d617273), ACE_NTOHL (0x68616c65), ACE_NTOHL (0x645f6578), ACE_NTOHL (0x63657074), ACE_NTOHL (0x696f6e00), // name = marshaled_exception - CORBA::tk_sequence, // typecode kind - 12, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - CORBA::tk_octet, +void* Messaging::ExceptionHolder::_tao_obv_narrow (ptr_arith_t type_id) +{ + if (type_id == (ptr_arith_t) &_downcast) + return this; + void *rval = 0; + return rval; +} - 0U, +CORBA::Boolean Messaging::ExceptionHolder::_tao_marshal_v (TAO_OutputCDR & strm) +{ + return this->_tao_marshal__Messaging_ExceptionHolder (strm); +} -}; -static CORBA::TypeCode _tc_TAO_tc_Messaging_ExceptionHolder (CORBA::tk_struct, sizeof (_oc_Messaging_ExceptionHolder), (char *) &_oc_Messaging_ExceptionHolder, 0, sizeof (Messaging::ExceptionHolder)); -TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) -TAO_NAMESPACE_BEGIN (Messaging) -TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ExceptionHolder, &_tc_TAO_tc_Messaging_ExceptionHolder) -TAO_NAMESPACE_END -void Messaging::ExceptionHolder::_tao_any_destructor (void *x) +CORBA::Boolean Messaging::ExceptionHolder::_tao_unmarshal_v (TAO_InputCDR & strm) { - ExceptionHolder *tmp = ACE_static_cast (ExceptionHolder*,x); - delete tmp; + return this->_tao_unmarshal__Messaging_ExceptionHolder (strm); +} + +CORBA::Boolean Messaging::ExceptionHolder::_tao_unmarshal (TAO_InputCDR &strm, Messaging::ExceptionHolder *&new_object) +{ + CORBA::Boolean retval = 1; + CORBA::ValueBase *base; // %! should be a _var + CORBA::ValueFactory_ptr factory; // %! should be a _var + if (!CORBA::ValueBase::_tao_unmarshal_pre (strm, factory, base, + Messaging::ExceptionHolder::_tao_obv_static_repository_id ()) ) + { + return 0; + } + if (factory != 0) + { + base = factory->create_for_unmarshal (); + factory->_remove_ref (); + if (base == 0) return 0; // %! except.? + //%! ACE_DEBUG ((LM_DEBUG, "Messaging::ExceptionHolder::_tao_unmarshal %s\n", base->_tao_obv_repository_id () )); + retval = base->_tao_unmarshal_v (strm); + //%! ACE_DEBUG ((LM_DEBUG, "Messaging::ExceptionHolder::_tao_unmarshal retval unmarshal_v is %d\n", retval)); + if (!retval) return 0; + } + // Now base must be null or point to the unmarshaled object. + // Align the pointer to the right subobject. + new_object = Messaging::ExceptionHolder::_downcast (base); + // %! unmarshal_post + return 1; } -#if !defined (_MESSAGING_EXCEPTIONHOLDER__TAO_SEQ_OCTET_CS_) -#define _MESSAGING_EXCEPTIONHOLDER__TAO_SEQ_OCTET_CS_ +#if !defined (_MESSAGING_EXCEPTIONHOLDER___INIT_CS_) +#define _MESSAGING_EXCEPTIONHOLDER___INIT_CS_ -// ************************************************************* -// Messaging::ExceptionHolder::_tao_seq_Octet -// ************************************************************* +Messaging::ExceptionHolder_init::~ExceptionHolder_init () +{ +} -Messaging::ExceptionHolder::_tao_seq_Octet::_tao_seq_Octet (void) -{} -Messaging::ExceptionHolder::_tao_seq_Octet::_tao_seq_Octet (CORBA::ULong max) // uses max size - : -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - TAO_Unbounded_Sequence -#else /* TAO_USE_SEQUENCE_TEMPLATES */ - TAO_Unbounded_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - (max) -{} -Messaging::ExceptionHolder::_tao_seq_Octet::_tao_seq_Octet (CORBA::ULong max, CORBA::ULong length, CORBA::Octet *buffer, CORBA::Boolean release) - : -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - TAO_Unbounded_Sequence -#else /* TAO_USE_SEQUENCE_TEMPLATES */ - TAO_Unbounded_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - (max, length, buffer, release) -{} -Messaging::ExceptionHolder::_tao_seq_Octet::_tao_seq_Octet (const _tao_seq_Octet &seq) // copy ctor - : -#if !defined (TAO_USE_SEQUENCE_TEMPLATES) - TAO_Unbounded_Sequence -#else /* TAO_USE_SEQUENCE_TEMPLATES */ - TAO_Unbounded_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - (seq) -{} -Messaging::ExceptionHolder::_tao_seq_Octet::~_tao_seq_Octet (void) // dtor -{} -void Messaging::ExceptionHolder::_tao_seq_Octet::_tao_any_destructor (void *x) +const char* +Messaging::ExceptionHolder_init::tao_repository_id () { - _tao_seq_Octet *tmp = ACE_static_cast (_tao_seq_Octet*,x); - delete tmp; + return Messaging::ExceptionHolder::_tao_obv_static_repository_id (); } @@ -1560,11 +1617,11 @@ ACE_NEW_RETURN (default_proxy, ReplyHandler (stub), ReplyHandler::_nil ()); #if (TAO_HAS_SMART_PROXIES == 1) return TAO_Messaging_ReplyHandler_PROXY_FACTORY_ADAPTER::instance ()->create_proxy (default_proxy); - #else + #else return default_proxy; #endif /*TAO_HAS_SMART_PROXIES == 1*/ } - else + else return ACE_reinterpret_cast ( @@ -1608,7 +1665,7 @@ else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -1619,6 +1676,7 @@ return "IDL:omg.org/Messaging/ReplyHandler:1.0"; } +#if (TAO_HAS_SMART_PROXIES == 1) Messaging::TAO_Messaging_ReplyHandler_Default_Proxy_Factory::TAO_Messaging_ReplyHandler_Default_Proxy_Factory (int register_proxy_factory) { if (register_proxy_factory) @@ -1678,7 +1736,7 @@ if (this->delete_proxy_factory_ == 0 && this->proxy_factory_ != 0) { // Its necessary to set to 1 to make sure that it - // doesnt get into an infinite loop in as it is + // doesnt get into an infinite loop in as it is // invoked in the destructor of the class too. this->delete_proxy_factory_ = 1; delete this->proxy_factory_; @@ -1698,10 +1756,10 @@ // Verify that an is available else make one. if (this->proxy_factory_ == 0) ACE_NEW_RETURN (this->proxy_factory_, - TAO_Messaging_ReplyHandler_Default_Proxy_Factory (1), + TAO_Messaging_ReplyHandler_Default_Proxy_Factory (1), 0); - - + + return this->proxy_factory_->create_proxy (proxy); } @@ -1721,7 +1779,7 @@ Messaging::ReplyHandler_ptr Messaging::TAO_Messaging_ReplyHandler_Smart_Proxy_Base::get_proxy (void) - + { // Obtain the real proxy stored in if (CORBA::is_nil (this->proxy_.in ())) @@ -1731,17 +1789,19 @@ TAO_Messaging_ReplyHandler_PROXY_FACTORY_ADAPTER::instance ()->unregister_proxy_factory (); this->proxy_ = ::Messaging::ReplyHandler::_unchecked_narrow (this->base_proxy_.in ()); } - + return this->proxy_.in (); } - + #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) template class ACE_Singleton; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Singleton #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - + +#endif /* TAO_HAS_SMART_PROXIES */ + static const CORBA::Long _oc_Messaging_ReplyHandler[] = { TAO_ENCAP_BYTE_ORDER, // byte order @@ -1753,6 +1813,115 @@ TAO_NAMESPACE_BEGIN (Messaging) TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ReplyHandler, &_tc_TAO_tc_Messaging_ReplyHandler) TAO_NAMESPACE_END + +#endif /* TAO_HAS_AMI_CALLBACK == 1 || TAO_HAS_AMI_POLLER == 1 */ + +#if (TAO_HAS_AMI_CALLBACK == 1) + + CORBA::Boolean + OBV_Messaging::ExceptionHolder::_tao_marshal__Messaging_ExceptionHolder (TAO_OutputCDR &strm){ + return _tao_marshal_state (strm); + + } +CORBA::Boolean OBV_Messaging::ExceptionHolder::_tao_unmarshal__Messaging_ExceptionHolder (TAO_InputCDR &strm){ + return _tao_unmarshal_state (strm); + + } + // accessor to set the member + void + OBV_Messaging::ExceptionHolder::is_system_exception (CORBA::Boolean val) // set + { + // set the value + this->_pd_is_system_exception = val; + } + // retrieve the member + CORBA::Boolean + OBV_Messaging::ExceptionHolder::is_system_exception (void) const + { + return this->_pd_is_system_exception; + } + + // accessor to set the member + void + OBV_Messaging::ExceptionHolder::byte_order (CORBA::Boolean val) // set + { + // set the value + this->_pd_byte_order = val; + } + // retrieve the member + CORBA::Boolean + OBV_Messaging::ExceptionHolder::byte_order (void) const + { + return this->_pd_byte_order; + } + + +#if !defined (_MESSAGING_EXCEPTIONHOLDER__TAO_SEQ_OCTET_CS_) +#define _MESSAGING_EXCEPTIONHOLDER__TAO_SEQ_OCTET_CS_ + +Messaging::ExceptionHolder::_tao_seq_Octet::_tao_seq_Octet (void) +{} +Messaging::ExceptionHolder::_tao_seq_Octet::_tao_seq_Octet (CORBA::ULong max) // uses max size + : +#if !defined (TAO_USE_SEQUENCE_TEMPLATES) + TAO_Unbounded_Sequence +#else /* TAO_USE_SEQUENCE_TEMPLATES */ + TAO_Unbounded_Sequence +#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ + (max) +{} +Messaging::ExceptionHolder::_tao_seq_Octet::_tao_seq_Octet (CORBA::ULong max, CORBA::ULong length, CORBA::Octet *buffer, CORBA::Boolean release) + : +#if !defined (TAO_USE_SEQUENCE_TEMPLATES) + TAO_Unbounded_Sequence +#else /* TAO_USE_SEQUENCE_TEMPLATES */ + TAO_Unbounded_Sequence +#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ + (max, length, buffer, release) +{} +Messaging::ExceptionHolder::_tao_seq_Octet::_tao_seq_Octet (const _tao_seq_Octet &seq) // copy ctor + : +#if !defined (TAO_USE_SEQUENCE_TEMPLATES) + TAO_Unbounded_Sequence +#else /* TAO_USE_SEQUENCE_TEMPLATES */ + TAO_Unbounded_Sequence +#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ + (seq) +{} +Messaging::ExceptionHolder::_tao_seq_Octet::~_tao_seq_Octet (void) // dtor +{} +void Messaging::ExceptionHolder::_tao_seq_Octet::_tao_any_destructor (void *x) +{ + _tao_seq_Octet *tmp = ACE_static_cast (_tao_seq_Octet*,x); + delete tmp; +} + +#endif /* end #if !defined */ + +// accessor to set the member + void + OBV_Messaging::ExceptionHolder::marshaled_exception (const Messaging::ExceptionHolder::_tao_seq_Octet &val) + { + this->_pd_marshaled_exception = val; + } + + // readonly get method + const Messaging::ExceptionHolder::_tao_seq_Octet & + OBV_Messaging::ExceptionHolder::marshaled_exception (void) const + { + return this->_pd_marshaled_exception; + } + + // read/write get method + Messaging::ExceptionHolder::_tao_seq_Octet & + OBV_Messaging::ExceptionHolder::marshaled_exception (void) + { + return this->_pd_marshaled_exception; + } + +#endif /* TAO_HAS_AMI_CALLBACK == 1 */ + + void operator<<= (CORBA::Any &_tao_any, const Messaging::PriorityRange &_tao_elem) // copying { TAO_OutputCDR stream; @@ -2085,86 +2254,7 @@ return 0; } - void operator<<= (CORBA::Any &_tao_any, const Messaging::ExceptionHolder &_tao_elem) // copying - { - TAO_OutputCDR stream; - stream << _tao_elem; - _tao_any._tao_replace ( - Messaging::_tc_ExceptionHolder, - TAO_ENCAP_BYTE_ORDER, - stream.begin () - ); - } - - void operator<<= (CORBA::Any &_tao_any, Messaging::ExceptionHolder *_tao_elem) // non copying - { - TAO_OutputCDR stream; - stream << *_tao_elem; - _tao_any._tao_replace ( - Messaging::_tc_ExceptionHolder, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_elem, - Messaging::ExceptionHolder::_tao_any_destructor - ); - } - - CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::ExceptionHolder *&_tao_elem) - { - return _tao_any >>= ACE_const_cast(const Messaging::ExceptionHolder*&,_tao_elem); - } - -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const Messaging::ExceptionHolder *&_tao_elem) - { - _tao_elem = 0; - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (Messaging::_tc_ExceptionHolder, ACE_TRY_ENV)) // not equal - { - return 0; - } - ACE_TRY_CHECK; - if (_tao_any.any_owns_data ()) - { - _tao_elem = ACE_static_cast( - const Messaging::ExceptionHolder*, - _tao_any.value () - ); - return 1; - } - else - { - Messaging::ExceptionHolder *tmp; - ACE_NEW_RETURN (tmp, Messaging::ExceptionHolder, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> *tmp) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - Messaging::_tc_ExceptionHolder, - 1, - ACE_static_cast (void *, tmp), - Messaging::ExceptionHolder::_tao_any_destructor - ); - _tao_elem = tmp; - return 1; - } - else - { - delete tmp; - } - } - } - ACE_CATCHANY - { - } - ACE_ENDTRY; - return 0; - } +#if (TAO_HAS_AMI_CALLBACK == 1) || (TAO_HAS_AMI_POLLER == 1) Messaging::ReplyHandler_ptr (*_TAO_collocation_Messaging_ReplyHandler_Stub_Factory_function_pointer) ( CORBA::Object_ptr obj @@ -2175,7 +2265,7 @@ if (stream << _tao_elem) { _tao_any._tao_replace ( - Messaging::_tc_ReplyHandler, + Messaging::_tc_ReplyHandler, TAO_ENCAP_BYTE_ORDER, stream.begin (), 1, @@ -2205,7 +2295,7 @@ { _tao_elem = Messaging::ReplyHandler::_narrow (_tao_obj_var.in (), ACE_TRY_ENV); ACE_TRY_CHECK; - + ((CORBA::Any *)&_tao_any)->_tao_replace ( Messaging::_tc_ReplyHandler, 1, @@ -2232,7 +2322,9 @@ # pragma instantiate TAO_Object_Manager #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - + +#endif /* TAO_HAS_AMI_CALLBACK == 1 || TAO_HAS_AMI_POLLER == 1 */ + #if !defined _TAO_CDR_OP_Messaging_PolicyValue__tao_seq_Octet_CPP_ #define _TAO_CDR_OP_Messaging_PolicyValue__tao_seq_Octet_CPP_ @@ -2244,20 +2336,20 @@ if (strm << _tao_sequence.length ()) { // encode all elements - + #if defined (TAO_NO_COPY_OCTET_SEQUENCES) { - TAO_Unbounded_Sequence *oseq = + TAO_Unbounded_Sequence *oseq = ACE_static_cast (TAO_Unbounded_Sequence*, (Messaging::PolicyValue::_tao_seq_Octet *)&_tao_sequence); if (oseq->mb ()) return strm.write_octet_array_mb (oseq->mb ()); else return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ()); } - + #else /* TAO_NO_COPY_OCTET_SEQUENCES */ return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ()); - + #endif /* TAO_NO_COPY_OCTET_SEQUENCES */ } return 0; // error @@ -2274,14 +2366,14 @@ // set the length of the sequence _tao_sequence.length (_tao_seq_len); // If length is 0 we return true. - if (0 >= _tao_seq_len) + if (0 >= _tao_seq_len) return 1; // retrieve all the elements - + #if defined (TAO_NO_COPY_OCTET_SEQUENCES) if (ACE_BIT_DISABLED (strm.start ()->flags (),ACE_Message_Block::DONT_DELETE)) { - TAO_Unbounded_Sequence *oseq = + TAO_Unbounded_Sequence *oseq = ACE_static_cast(TAO_Unbounded_Sequence*, &_tao_sequence); oseq->replace (_tao_seq_len, strm.start ()); oseq->mb ()->wr_ptr (oseq->mb()->rd_ptr () + _tao_seq_len); @@ -2290,10 +2382,10 @@ } else return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_seq_len); - + #else /* TAO_NO_COPY_OCTET_SEQUENCES */ return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ()); - + #endif /* TAO_NO_COPY_OCTET_SEQUENCES */ } return 0; // error @@ -2330,7 +2422,7 @@ // set the length of the sequence _tao_sequence.length (_tao_seq_len); // If length is 0 we return true. - if (0 >= _tao_seq_len) + if (0 >= _tao_seq_len) return 1; // retrieve all the elements CORBA::Boolean _tao_marshal_flag = 1; @@ -2343,72 +2435,4 @@ return 0; // error } - -#if !defined _TAO_CDR_OP_Messaging_ExceptionHolder__tao_seq_Octet_CPP_ -#define _TAO_CDR_OP_Messaging_ExceptionHolder__tao_seq_Octet_CPP_ - -CORBA::Boolean operator<< ( - TAO_OutputCDR &strm, - const Messaging::ExceptionHolder::_tao_seq_Octet &_tao_sequence - ) -{ - if (strm << _tao_sequence.length ()) - { - // encode all elements - -#if defined (TAO_NO_COPY_OCTET_SEQUENCES) - { - TAO_Unbounded_Sequence *oseq = - ACE_static_cast (TAO_Unbounded_Sequence*, (Messaging::ExceptionHolder::_tao_seq_Octet *)&_tao_sequence); - if (oseq->mb ()) - return strm.write_octet_array_mb (oseq->mb ()); - else - return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ()); - } - -#else /* TAO_NO_COPY_OCTET_SEQUENCES */ - return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ()); - -#endif /* TAO_NO_COPY_OCTET_SEQUENCES */ - } - return 0; // error -} - -CORBA::Boolean operator>> ( - TAO_InputCDR &strm, - Messaging::ExceptionHolder::_tao_seq_Octet &_tao_sequence - ) -{ - CORBA::ULong _tao_seq_len; - if (strm >> _tao_seq_len) - { - // set the length of the sequence - _tao_sequence.length (_tao_seq_len); - // If length is 0 we return true. - if (0 >= _tao_seq_len) - return 1; - // retrieve all the elements - -#if defined (TAO_NO_COPY_OCTET_SEQUENCES) - if (ACE_BIT_DISABLED (strm.start ()->flags (),ACE_Message_Block::DONT_DELETE)) - { - TAO_Unbounded_Sequence *oseq = - ACE_static_cast(TAO_Unbounded_Sequence*, &_tao_sequence); - oseq->replace (_tao_seq_len, strm.start ()); - oseq->mb ()->wr_ptr (oseq->mb()->rd_ptr () + _tao_seq_len); - strm.skip_bytes (_tao_seq_len); - return 1; - } - else - return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_seq_len); - -#else /* TAO_NO_COPY_OCTET_SEQUENCES */ - return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ()); - -#endif /* TAO_NO_COPY_OCTET_SEQUENCES */ - } - return 0; // error -} - -#endif /* _TAO_CDR_OP_Messaging_ExceptionHolder__tao_seq_Octet_CPP_ */ - +#endif /* TAO_HAS_CORBA_MESSAGING == 1 */