/* -*- C++ -*- $Id$ */ // ****** Code generated by the The ACE ORB (TAO) IDL Compiler ******* // TAO and the TAO IDL Compiler have been developed by the Center for // Distributed Object Computing at Washington University, St. Louis. // // Information about TAO is available at: // http://www.cs.wustl.edu/~schmidt/TAO.html #include "tao/PolicyC.h" #include "tao/Stub.h" #include "tao/Invocation.h" #include "tao/NVList.h" #if !defined (__ACE_INLINE__) #include "tao/PolicyC.i" #endif /* !defined INLINE */ // **************************************************************** TAO_NAMESPACE_TYPE (const CORBA::PolicyErrorCode) TAO_NAMESPACE_BEGIN (CORBA) TAO_NAMESPACE_DEFINE (const CORBA::PolicyErrorCode, BAD_POLICY, 0) TAO_NAMESPACE_END TAO_NAMESPACE_TYPE (const CORBA::PolicyErrorCode) TAO_NAMESPACE_BEGIN (CORBA) TAO_NAMESPACE_DEFINE (const CORBA::PolicyErrorCode, UNSUPPORTED_POLICY, 1) TAO_NAMESPACE_END TAO_NAMESPACE_TYPE (const CORBA::PolicyErrorCode) TAO_NAMESPACE_BEGIN (CORBA) TAO_NAMESPACE_DEFINE (const CORBA::PolicyErrorCode, BAD_POLICY_TYPE, 2) TAO_NAMESPACE_END TAO_NAMESPACE_TYPE (const CORBA::PolicyErrorCode) TAO_NAMESPACE_BEGIN (CORBA) TAO_NAMESPACE_DEFINE (const CORBA::PolicyErrorCode, BAD_POLICY_VALUE, 3) TAO_NAMESPACE_END TAO_NAMESPACE_TYPE (const CORBA::PolicyErrorCode) TAO_NAMESPACE_BEGIN (CORBA) TAO_NAMESPACE_DEFINE (const CORBA::PolicyErrorCode, UNSUPPORTED_POLICY_VALUE, 4) TAO_NAMESPACE_END // **************************************************************** // default constructor CORBA_PolicyError::CORBA_PolicyError (void) : CORBA_UserException ("IDL:omg.org/CORBA/PolicyError:1.0") { } // destructor - all members are of self managing types CORBA_PolicyError::~CORBA_PolicyError (void) { } void CORBA_PolicyError::_tao_any_destructor (void *x) { CORBA_PolicyError *tmp = ACE_static_cast (CORBA_PolicyError*,x); delete tmp; } // copy constructor CORBA_PolicyError::CORBA_PolicyError (const ::CORBA_PolicyError &_tao_excp) : CORBA_UserException (_tao_excp._id ()) { this->reason = _tao_excp.reason; } // assignment operator CORBA_PolicyError& CORBA_PolicyError::operator= (const ::CORBA_PolicyError &_tao_excp) { this->CORBA_UserException::operator= (_tao_excp); this->reason = _tao_excp.reason; return *this; } // narrow CORBA_PolicyError * CORBA_PolicyError::_downcast (CORBA::Exception *exc) { if (!ACE_OS::strcmp ("IDL:omg.org/CORBA/PolicyError:1.0", exc->_id ())) // same type return ACE_dynamic_cast (CORBA_PolicyError *, exc); else return 0; } void CORBA_PolicyError::_raise () { TAO_RAISE(*this); } void CORBA_PolicyError::_tao_encode ( TAO_OutputCDR &cdr, CORBA::Environment &ACE_TRY_ENV) const { if (cdr << *this) return; ACE_THROW (CORBA::MARSHAL ()); } void CORBA_PolicyError::_tao_decode ( TAO_InputCDR &cdr, CORBA::Environment &ACE_TRY_ENV) { if (cdr >> *this) return; ACE_THROW (CORBA::MARSHAL ()); } // TAO extension - the _alloc method CORBA::Exception *CORBA_PolicyError::_alloc (void) { CORBA::Exception *retval = 0; ACE_NEW_RETURN (retval, ::CORBA_PolicyError, 0); return retval; } CORBA_PolicyError::CORBA_PolicyError ( CORBA::PolicyErrorCode _tao_reason ) : CORBA_UserException (CORBA::string_dup ("IDL:omg.org/CORBA/PolicyError:1.0")) { this->reason = _tao_reason; } static const CORBA::Long _oc_CORBA_PolicyError[] = { TAO_ENCAP_BYTE_ORDER, // byte order 34, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f5242), ACE_NTOHL (0x415f506f), ACE_NTOHL (0x6c696379), ACE_NTOHL (0x4572726f), ACE_NTOHL (0x723a312e), ACE_NTOHL (0x30000000), // repository ID = IDL:omg.org/CORBA_PolicyError:1.0 18, ACE_NTOHL (0x434f5242), ACE_NTOHL (0x415f506f), ACE_NTOHL (0x6c696379), ACE_NTOHL (0x4572726f), ACE_NTOHL (0x72000000), // name = CORBA_PolicyError 1, // member count 7, ACE_NTOHL (0x72656173), ACE_NTOHL (0x6f6e0000), // name = reason CORBA::tk_alias, // typecode kind for typedefs 72, // encapsulation length TAO_ENCAP_BYTE_ORDER, // byte order 38, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f5242), ACE_NTOHL (0x412f506f), ACE_NTOHL (0x6c696379), ACE_NTOHL (0x4572726f), ACE_NTOHL (0x72436f64), ACE_NTOHL (0x653a312e), ACE_NTOHL (0x30000000), // repository ID = IDL:omg.org/CORBA/PolicyErrorCode:1.0 16, ACE_NTOHL (0x506f6c69), ACE_NTOHL (0x63794572), ACE_NTOHL (0x726f7243), ACE_NTOHL (0x6f646500), // name = PolicyErrorCode CORBA::tk_short, }; static CORBA::TypeCode _tc_TAO_tc_CORBA_PolicyError (CORBA::tk_except, sizeof (_oc_CORBA_PolicyError), (char *) &_oc_CORBA_PolicyError, 0, sizeof (CORBA_PolicyError)); CORBA::TypeCode_ptr _tc_CORBA_PolicyError = &_tc_TAO_tc_CORBA_PolicyError; CORBA::TypeCode_ptr CORBA_PolicyError::_type (void) const { return _tc_CORBA_PolicyError; } #if !defined (TAO_USE_SEQUENCE_TEMPLATES) #if !defined (__TAO_UNBOUNDED_SEQUENCE_CORBA_INVALIDPOLICIES__TAO_SEQ_USHORT_CS_) #define __TAO_UNBOUNDED_SEQUENCE_CORBA_INVALIDPOLICIES__TAO_SEQ_USHORT_CS_ void CORBA_InvalidPolicies::_TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort::_allocate_buffer (CORBA::ULong length) { CORBA::UShort* tmp = 0; tmp = _TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort::allocbuf (length); if (this->buffer_ != 0) { CORBA::UShort *old = ACE_reinterpret_cast (CORBA::UShort *,this->buffer_); for (CORBA::ULong i = 0; i < this->length_; ++i) tmp[i] = old[i]; if (this->release_) _TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort::freebuf (old); } this->buffer_ = tmp; } void CORBA_InvalidPolicies::_TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort::_deallocate_buffer (void) { if (this->buffer_ == 0 || this->release_ == 0) return; CORBA::UShort *tmp = ACE_reinterpret_cast (CORBA::UShort *,this->buffer_); _TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort::freebuf (tmp); this->buffer_ = 0; } CORBA_InvalidPolicies::_TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort::~_TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort (void) // Dtor. { this->_deallocate_buffer (); } #endif /* end #if !defined */ #endif /* !TAO_USE_SEQUENCE_TEMPLATES */ #if !defined (_CORBA_INVALIDPOLICIES__TAO_SEQ_USHORT_CS_) #define _CORBA_INVALIDPOLICIES__TAO_SEQ_USHORT_CS_ // ************************************************************* // CORBA_InvalidPolicies::_tao_seq_UShort // ************************************************************* CORBA_InvalidPolicies::_tao_seq_UShort::_tao_seq_UShort (void) {} CORBA_InvalidPolicies::_tao_seq_UShort::_tao_seq_UShort (CORBA::ULong max) // uses max size : #if !defined (TAO_USE_SEQUENCE_TEMPLATES) _TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort #else /* TAO_USE_SEQUENCE_TEMPLATES */ TAO_Unbounded_Sequence #endif /* !TAO_USE_SEQUENCE_TEMPLATES */ (max) {} CORBA_InvalidPolicies::_tao_seq_UShort::_tao_seq_UShort (CORBA::ULong max, CORBA::ULong length, CORBA::UShort *buffer, CORBA::Boolean release) : #if !defined (TAO_USE_SEQUENCE_TEMPLATES) _TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort #else /* TAO_USE_SEQUENCE_TEMPLATES */ TAO_Unbounded_Sequence #endif /* !TAO_USE_SEQUENCE_TEMPLATES */ (max, length, buffer, release) {} CORBA_InvalidPolicies::_tao_seq_UShort::_tao_seq_UShort (const _tao_seq_UShort &seq) // copy ctor : #if !defined (TAO_USE_SEQUENCE_TEMPLATES) _TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort #else /* TAO_USE_SEQUENCE_TEMPLATES */ TAO_Unbounded_Sequence #endif /* !TAO_USE_SEQUENCE_TEMPLATES */ (seq) {} CORBA_InvalidPolicies::_tao_seq_UShort::~_tao_seq_UShort (void) // dtor {} void CORBA_InvalidPolicies::_tao_seq_UShort::_tao_any_destructor (void *x) { _tao_seq_UShort *tmp = ACE_static_cast (_tao_seq_UShort*,x); delete tmp; } #endif /* end #if !defined */ // default constructor CORBA_InvalidPolicies::CORBA_InvalidPolicies (void) : CORBA_UserException ("IDL:omg.org/CORBA/InvalidPolicies:1.0") { } // destructor - all members are of self managing types CORBA_InvalidPolicies::~CORBA_InvalidPolicies (void) { } void CORBA_InvalidPolicies::_tao_any_destructor (void *x) { CORBA_InvalidPolicies *tmp = ACE_static_cast (CORBA_InvalidPolicies*,x); delete tmp; } // copy constructor CORBA_InvalidPolicies::CORBA_InvalidPolicies (const ::CORBA_InvalidPolicies &_tao_excp) : CORBA_UserException (_tao_excp._id ()) { this->indices = _tao_excp.indices; } // assignment operator CORBA_InvalidPolicies& CORBA_InvalidPolicies::operator= (const ::CORBA_InvalidPolicies &_tao_excp) { this->CORBA_UserException::operator= (_tao_excp); this->indices = _tao_excp.indices; return *this; } // narrow CORBA_InvalidPolicies * CORBA_InvalidPolicies::_downcast (CORBA::Exception *exc) { if (!ACE_OS::strcmp ("IDL:omg.org/CORBA/InvalidPolicies:1.0", exc->_id ())) // same type return ACE_dynamic_cast (CORBA_InvalidPolicies *, exc); else return 0; } void CORBA_InvalidPolicies::_raise () { TAO_RAISE(*this); } void CORBA_InvalidPolicies::_tao_encode ( TAO_OutputCDR &cdr, CORBA::Environment &ACE_TRY_ENV) const { if (cdr << *this) return; ACE_THROW (CORBA::MARSHAL ()); } void CORBA_InvalidPolicies::_tao_decode ( TAO_InputCDR &cdr, CORBA::Environment &ACE_TRY_ENV) { if (cdr >> *this) return; ACE_THROW (CORBA::MARSHAL ()); } // TAO extension - the _alloc method CORBA::Exception *CORBA_InvalidPolicies::_alloc (void) { CORBA::Exception *retval = 0; ACE_NEW_RETURN (retval, ::CORBA_InvalidPolicies, 0); return retval; } CORBA_InvalidPolicies::CORBA_InvalidPolicies ( const CORBA_InvalidPolicies::_tao_seq_UShort & _tao_indices ) : CORBA_UserException (CORBA::string_dup ("IDL:omg.org/CORBA/InvalidPolicies:1.0")) { this->indices = _tao_indices; } static const CORBA::Long _oc_CORBA_InvalidPolicies[] = { TAO_ENCAP_BYTE_ORDER, // byte order 38, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f5242), ACE_NTOHL (0x415f496e), ACE_NTOHL (0x76616c69), ACE_NTOHL (0x64506f6c), ACE_NTOHL (0x69636965), ACE_NTOHL (0x733a312e), ACE_NTOHL (0x30000000), // repository ID = IDL:omg.org/CORBA_InvalidPolicies:1.0 22, ACE_NTOHL (0x434f5242), ACE_NTOHL (0x415f496e), ACE_NTOHL (0x76616c69), ACE_NTOHL (0x64506f6c), ACE_NTOHL (0x69636965), ACE_NTOHL (0x73000000), // name = CORBA_InvalidPolicies 1, // member count 8, ACE_NTOHL (0x696e6469), ACE_NTOHL (0x63657300), // name = indices CORBA::tk_sequence, // typecode kind 12, // encapsulation length TAO_ENCAP_BYTE_ORDER, // byte order CORBA::tk_ushort, 0U, }; static CORBA::TypeCode _tc_TAO_tc_CORBA_InvalidPolicies (CORBA::tk_except, sizeof (_oc_CORBA_InvalidPolicies), (char *) &_oc_CORBA_InvalidPolicies, 0, sizeof (CORBA_InvalidPolicies)); CORBA::TypeCode_ptr _tc_CORBA_InvalidPolicies = &_tc_TAO_tc_CORBA_InvalidPolicies; CORBA::TypeCode_ptr CORBA_InvalidPolicies::_type (void) const { return _tc_CORBA_InvalidPolicies; } // default constructor CORBA_Policy::CORBA_Policy (void) {} // destructor CORBA_Policy::~CORBA_Policy (void) {} void CORBA_Policy::_tao_any_destructor (void *x) { CORBA_Policy *tmp = ACE_static_cast (CORBA_Policy*,x); CORBA::release (tmp); } CORBA_Policy_ptr CORBA_Policy::_narrow ( CORBA::Object_ptr obj, CORBA::Environment &ACE_TRY_ENV ) { if (CORBA::is_nil (obj)) return CORBA_Policy::_nil (); if (! obj->_is_local ()) { CORBA::Boolean is_a = obj->_is_a ("IDL:omg.org/CORBA/Policy:1.0", ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA_Policy::_nil ()); if (is_a == 0) return CORBA_Policy::_nil (); } return CORBA_Policy::_unchecked_narrow (obj, ACE_TRY_ENV); } CORBA_Policy_ptr CORBA_Policy::_unchecked_narrow ( CORBA::Object_ptr obj, CORBA::Environment & ) { if (CORBA::is_nil (obj)) return CORBA_Policy::_nil (); if (! obj->_is_local ()) { TAO_Stub* stub = obj->_stubobj (); if (stub) stub->_incr_refcnt (); CORBA_Policy_ptr default_proxy = CORBA_Policy::_nil (); if (obj->_is_collocated () && _TAO_collocation_CORBA_Policy_Stub_Factory_function_pointer != 0) { default_proxy = _TAO_collocation_CORBA_Policy_Stub_Factory_function_pointer (obj); } if (CORBA::is_nil (default_proxy)) ACE_NEW_RETURN (default_proxy, CORBA_Policy (stub), CORBA_Policy::_nil ()); return default_proxy; } else return ACE_reinterpret_cast ( CORBA_Policy_ptr, obj->_tao_QueryInterface ( ACE_reinterpret_cast ( ptr_arith_t, &CORBA_Policy::_narrow ) ) ); } CORBA_Policy_ptr CORBA_Policy::_duplicate (CORBA_Policy_ptr obj) { if (!CORBA::is_nil (obj)) obj->_add_ref (); return obj; } CORBA::PolicyType CORBA_Policy::policy_type ( CORBA::Environment &ACE_TRY_ENV ) ACE_THROW_SPEC (( CORBA::SystemException )) { CORBA::PolicyType _tao_retval = 0; TAO_Stub *istub = this->_stubobj (); if (istub == 0) ACE_THROW_RETURN (CORBA::INTERNAL (), _tao_retval); TAO_GIOP_Twoway_Invocation _tao_call ( istub, "_get_policy_type", 16, istub->orb_core () ); for (;;) { _tao_call.start (ACE_TRY_ENV); ACE_CHECK_RETURN (_tao_retval); CORBA::Short flag = TAO_TWOWAY_RESPONSE_FLAG; _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); ACE_CHECK_RETURN (_tao_retval); int _invoke_status = _tao_call.invoke (0, 0, ACE_TRY_ENV); ACE_CHECK_RETURN (_tao_retval); if (_invoke_status == TAO_INVOKE_RESTART) continue; if (_invoke_status != TAO_INVOKE_OK) { ACE_THROW_RETURN (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), _tao_retval); } TAO_InputCDR &_tao_in = _tao_call.inp_stream (); if (!( (_tao_in >> _tao_retval) )) ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), _tao_retval); break; } return _tao_retval; } CORBA_Policy_ptr CORBA_Policy::copy ( CORBA::Environment &ACE_TRY_ENV ) ACE_THROW_SPEC (( CORBA::SystemException )) { CORBA_Policy_ptr _tao_retval = CORBA_Policy::_nil (); CORBA_Policy_var _tao_safe_retval (_tao_retval); TAO_Stub *istub = this->_stubobj (); if (istub == 0) ACE_THROW_RETURN (CORBA::INTERNAL (), 0); TAO_GIOP_Twoway_Invocation _tao_call ( istub, "copy", 4, istub->orb_core () ); for (;;) { _tao_call.start (ACE_TRY_ENV); ACE_CHECK_RETURN (0); CORBA::Short flag = TAO_TWOWAY_RESPONSE_FLAG; _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); ACE_CHECK_RETURN (0); int _invoke_status = _tao_call.invoke (0, 0, ACE_TRY_ENV); ACE_CHECK_RETURN (0); if (_invoke_status == TAO_INVOKE_RESTART) continue; if (_invoke_status != TAO_INVOKE_OK) { ACE_THROW_RETURN (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), 0); } TAO_InputCDR &_tao_in = _tao_call.inp_stream (); if (!( (_tao_in >> _tao_safe_retval.inout ()) )) ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), 0); break; } return _tao_safe_retval._retn (); } void CORBA_Policy::destroy ( CORBA::Environment &ACE_TRY_ENV ) ACE_THROW_SPEC (( CORBA::SystemException )) { TAO_Stub *istub = this->_stubobj (); if (istub == 0) ACE_THROW (CORBA::INTERNAL ()); TAO_GIOP_Twoway_Invocation _tao_call ( istub, "destroy", 7, istub->orb_core () ); for (;;) { _tao_call.start (ACE_TRY_ENV); ACE_CHECK; CORBA::Short flag = TAO_TWOWAY_RESPONSE_FLAG; _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); ACE_CHECK; int _invoke_status = _tao_call.invoke (0, 0, ACE_TRY_ENV); ACE_CHECK; if (_invoke_status == TAO_INVOKE_RESTART) continue; if (_invoke_status != TAO_INVOKE_OK) { ACE_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES)); } break; } } CORBA::Boolean CORBA_Policy::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV) { if ( (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Policy:1.0")) || (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Object:1.0"))) return 1; // success using local knowledge else return this->CORBA_Object::_is_a (value, ACE_TRY_ENV); } void *CORBA_Policy::_tao_QueryInterface (ptr_arith_t type) { void *retv = 0; if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA_Policy::_narrow)) retv = ACE_reinterpret_cast (void*, this); 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; } const char* CORBA_Policy::_interface_repository_id (void) const { return "IDL:omg.org/CORBA/Policy:1.0"; } CORBA::Boolean CORBA_Policy::_tao_encode (TAO_OutputCDR &) { return 0; } CORBA::Boolean CORBA_Policy::_tao_decode (TAO_InputCDR &) { return 0; } static const CORBA::Long _oc_CORBA_Policy[] = { TAO_ENCAP_BYTE_ORDER, // byte order 29, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f5242), ACE_NTOHL (0x415f506f), ACE_NTOHL (0x6c696379), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:omg.org/CORBA_Policy:1.0 13, ACE_NTOHL (0x434f5242), ACE_NTOHL (0x415f506f), ACE_NTOHL (0x6c696379), ACE_NTOHL (0x0), // name = CORBA_Policy }; static CORBA::TypeCode _tc_TAO_tc_CORBA_Policy (CORBA::tk_objref, sizeof (_oc_CORBA_Policy), (char *) &_oc_CORBA_Policy, 0, sizeof (CORBA_Policy)); CORBA::TypeCode_ptr _tc_CORBA_Policy = &_tc_TAO_tc_CORBA_Policy; #if !defined (TAO_USE_SEQUENCE_TEMPLATES) #if !defined (__TAO_UNBOUNDED_OBJECT_SEQUENCE_CORBA_POLICYLIST_CS_) #define __TAO_UNBOUNDED_OBJECT_SEQUENCE_CORBA_POLICYLIST_CS_ // The Base_Sequence functions, please see tao/Sequence.h void _TAO_Unbounded_Object_Sequence_CORBA_PolicyList::_allocate_buffer (CORBA::ULong length) { CORBA_Policy **tmp = 0; tmp = _TAO_Unbounded_Object_Sequence_CORBA_PolicyList::allocbuf (length); if (this->buffer_ != 0) { CORBA_Policy **old = ACE_reinterpret_cast (CORBA_Policy**, this->buffer_); for (CORBA::ULong i = 0; i < this->length_; ++i) if (!this->release_) tmp[i] = CORBA_Policy::_duplicate (old[i]); else tmp[i] = old[i]; if (this->release_) delete[] old; } this->buffer_ = tmp; } void _TAO_Unbounded_Object_Sequence_CORBA_PolicyList::_deallocate_buffer (void) { if (this->buffer_ == 0 || this->release_ == 0) return; CORBA_Policy **tmp = ACE_reinterpret_cast (CORBA_Policy**, this->buffer_); for (CORBA::ULong i = 0; i < this->length_; ++i) { CORBA::release (tmp[i]); tmp[i] = CORBA_Policy::_nil (); } _TAO_Unbounded_Object_Sequence_CORBA_PolicyList::freebuf (tmp); this->buffer_ = 0; } _TAO_Unbounded_Object_Sequence_CORBA_PolicyList::~_TAO_Unbounded_Object_Sequence_CORBA_PolicyList (void) { this->_deallocate_buffer (); } void _TAO_Unbounded_Object_Sequence_CORBA_PolicyList::_shrink_buffer (CORBA::ULong nl, CORBA::ULong ol) { CORBA_Policy **tmp = ACE_reinterpret_cast (CORBA_Policy**, this->buffer_); for (CORBA::ULong i = nl; i < ol; ++i) { CORBA::release (tmp[i]); tmp[i] = CORBA_Policy::_nil (); } } void _TAO_Unbounded_Object_Sequence_CORBA_PolicyList::_downcast ( void* target, CORBA_Object *src, CORBA_Environment &ACE_TRY_ENV ) { CORBA_Policy **tmp = ACE_static_cast (CORBA_Policy**, target); *tmp = CORBA_Policy::_narrow (src, ACE_TRY_ENV); } CORBA_Object* _TAO_Unbounded_Object_Sequence_CORBA_PolicyList::_upcast (void *src) const { CORBA_Policy **tmp = ACE_static_cast (CORBA_Policy**, src); return *tmp; } #endif /* end #if !defined */ #endif /* !TAO_USE_SEQUENCE_TEMPLATES */ #if !defined (_CORBA_POLICYLIST_CS_) #define _CORBA_POLICYLIST_CS_ // ************************************************************* // CORBA_PolicyList // ************************************************************* CORBA_PolicyList::CORBA_PolicyList (void) {} CORBA_PolicyList::CORBA_PolicyList (CORBA::ULong max) // uses max size : #if !defined (TAO_USE_SEQUENCE_TEMPLATES) _TAO_Unbounded_Object_Sequence_CORBA_PolicyList #else /* TAO_USE_SEQUENCE_TEMPLATES */ TAO_Unbounded_Object_Sequence #endif /* !TAO_USE_SEQUENCE_TEMPLATES */ (max) {} CORBA_PolicyList::CORBA_PolicyList (CORBA::ULong max, CORBA::ULong length, CORBA_Policy_ptr *buffer, CORBA::Boolean release) : #if !defined (TAO_USE_SEQUENCE_TEMPLATES) _TAO_Unbounded_Object_Sequence_CORBA_PolicyList #else /* TAO_USE_SEQUENCE_TEMPLATES */ TAO_Unbounded_Object_Sequence #endif /* !TAO_USE_SEQUENCE_TEMPLATES */ (max, length, buffer, release) {} CORBA_PolicyList::CORBA_PolicyList (const CORBA_PolicyList &seq) // copy ctor : #if !defined (TAO_USE_SEQUENCE_TEMPLATES) _TAO_Unbounded_Object_Sequence_CORBA_PolicyList #else /* TAO_USE_SEQUENCE_TEMPLATES */ TAO_Unbounded_Object_Sequence #endif /* !TAO_USE_SEQUENCE_TEMPLATES */ (seq) {} CORBA_PolicyList::~CORBA_PolicyList (void) // dtor {} void CORBA_PolicyList::_tao_any_destructor (void *x) { CORBA_PolicyList *tmp = ACE_static_cast (CORBA_PolicyList*,x); delete tmp; } #endif /* end #if !defined */ static const CORBA::Long _oc_CORBA_PolicyList[] = { TAO_ENCAP_BYTE_ORDER, // byte order 33, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f5242), ACE_NTOHL (0x415f506f), ACE_NTOHL (0x6c696379), ACE_NTOHL (0x4c697374), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:omg.org/CORBA_PolicyList:1.0 17, ACE_NTOHL (0x434f5242), ACE_NTOHL (0x415f506f), ACE_NTOHL (0x6c696379), ACE_NTOHL (0x4c697374), ACE_NTOHL (0x0), // name = CORBA_PolicyList CORBA::tk_sequence, // typecode kind 76, // encapsulation length TAO_ENCAP_BYTE_ORDER, // byte order CORBA::tk_objref, // typecode kind 60, // encapsulation length TAO_ENCAP_BYTE_ORDER, // byte order 29, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f5242), ACE_NTOHL (0x415f506f), ACE_NTOHL (0x6c696379), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:omg.org/CORBA_Policy:1.0 13, ACE_NTOHL (0x434f5242), ACE_NTOHL (0x415f506f), ACE_NTOHL (0x6c696379), ACE_NTOHL (0x0), // name = CORBA_Policy 0U, }; static CORBA::TypeCode _tc_TAO_tc_CORBA_PolicyList (CORBA::tk_alias, sizeof (_oc_CORBA_PolicyList), (char *) &_oc_CORBA_PolicyList, 0, sizeof (CORBA_PolicyList)); CORBA::TypeCode_ptr _tc_CORBA_PolicyList = &_tc_TAO_tc_CORBA_PolicyList; #if !defined (TAO_USE_SEQUENCE_TEMPLATES) #if !defined (__TAO_UNBOUNDED_SEQUENCE_CORBA_POLICYTYPESEQ_CS_) #define __TAO_UNBOUNDED_SEQUENCE_CORBA_POLICYTYPESEQ_CS_ void _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq::_allocate_buffer (CORBA::ULong length) { CORBA::ULong* tmp = 0; tmp = _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq::allocbuf (length); if (this->buffer_ != 0) { CORBA::ULong *old = ACE_reinterpret_cast (CORBA::ULong *,this->buffer_); for (CORBA::ULong i = 0; i < this->length_; ++i) tmp[i] = old[i]; if (this->release_) _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq::freebuf (old); } this->buffer_ = tmp; } void _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq::_deallocate_buffer (void) { if (this->buffer_ == 0 || this->release_ == 0) return; CORBA::ULong *tmp = ACE_reinterpret_cast (CORBA::ULong *,this->buffer_); _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq::freebuf (tmp); this->buffer_ = 0; } _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq::~_TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq (void) // Dtor. { this->_deallocate_buffer (); } #endif /* end #if !defined */ #endif /* !TAO_USE_SEQUENCE_TEMPLATES */ #if !defined (_CORBA_POLICYTYPESEQ_CS_) #define _CORBA_POLICYTYPESEQ_CS_ // ************************************************************* // CORBA_PolicyTypeSeq // ************************************************************* CORBA_PolicyTypeSeq::CORBA_PolicyTypeSeq (void) {} CORBA_PolicyTypeSeq::CORBA_PolicyTypeSeq (CORBA::ULong max) // uses max size : #if !defined (TAO_USE_SEQUENCE_TEMPLATES) _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq #else /* TAO_USE_SEQUENCE_TEMPLATES */ TAO_Unbounded_Sequence #endif /* !TAO_USE_SEQUENCE_TEMPLATES */ (max) {} CORBA_PolicyTypeSeq::CORBA_PolicyTypeSeq (CORBA::ULong max, CORBA::ULong length, CORBA::ULong *buffer, CORBA::Boolean release) : #if !defined (TAO_USE_SEQUENCE_TEMPLATES) _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq #else /* TAO_USE_SEQUENCE_TEMPLATES */ TAO_Unbounded_Sequence #endif /* !TAO_USE_SEQUENCE_TEMPLATES */ (max, length, buffer, release) {} CORBA_PolicyTypeSeq::CORBA_PolicyTypeSeq (const CORBA_PolicyTypeSeq &seq) // copy ctor : #if !defined (TAO_USE_SEQUENCE_TEMPLATES) _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq #else /* TAO_USE_SEQUENCE_TEMPLATES */ TAO_Unbounded_Sequence #endif /* !TAO_USE_SEQUENCE_TEMPLATES */ (seq) {} CORBA_PolicyTypeSeq::~CORBA_PolicyTypeSeq (void) // dtor {} void CORBA_PolicyTypeSeq::_tao_any_destructor (void *x) { CORBA_PolicyTypeSeq *tmp = ACE_static_cast (CORBA_PolicyTypeSeq*,x); delete tmp; } #endif /* end #if !defined */ static const CORBA::Long _oc_CORBA_PolicyTypeSeq[] = { TAO_ENCAP_BYTE_ORDER, // byte order 36, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f5242), ACE_NTOHL (0x415f506f), ACE_NTOHL (0x6c696379), ACE_NTOHL (0x54797065), ACE_NTOHL (0x5365713a), ACE_NTOHL (0x312e3000), // repository ID = IDL:omg.org/CORBA_PolicyTypeSeq:1.0 20, ACE_NTOHL (0x434f5242), ACE_NTOHL (0x415f506f), ACE_NTOHL (0x6c696379), ACE_NTOHL (0x54797065), ACE_NTOHL (0x53657100), // name = CORBA_PolicyTypeSeq CORBA::tk_sequence, // typecode kind 80, // encapsulation length TAO_ENCAP_BYTE_ORDER, // byte order CORBA::tk_alias, // typecode kind for typedefs 64, // encapsulation length TAO_ENCAP_BYTE_ORDER, // byte order 33, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f5242), ACE_NTOHL (0x412f506f), ACE_NTOHL (0x6c696379), ACE_NTOHL (0x54797065), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:omg.org/CORBA/PolicyType:1.0 11, ACE_NTOHL (0x506f6c69), ACE_NTOHL (0x63795479), ACE_NTOHL (0x70650000), // name = PolicyType CORBA::tk_ulong, 0U, }; static CORBA::TypeCode _tc_TAO_tc_CORBA_PolicyTypeSeq (CORBA::tk_alias, sizeof (_oc_CORBA_PolicyTypeSeq), (char *) &_oc_CORBA_PolicyTypeSeq, 0, sizeof (CORBA_PolicyTypeSeq)); CORBA::TypeCode_ptr _tc_CORBA_PolicyTypeSeq = &_tc_TAO_tc_CORBA_PolicyTypeSeq; // default constructor CORBA_PolicyManager::CORBA_PolicyManager (void) {} // destructor CORBA_PolicyManager::~CORBA_PolicyManager (void) {} CORBA_PolicyManager_ptr CORBA_PolicyManager::_narrow ( CORBA::Object_ptr obj, CORBA::Environment &ACE_TRY_ENV ) { return CORBA_PolicyManager::_unchecked_narrow (obj, ACE_TRY_ENV); } CORBA_PolicyManager_ptr CORBA_PolicyManager::_unchecked_narrow ( CORBA::Object_ptr obj, CORBA::Environment & ) { if (CORBA::is_nil (obj)) return CORBA_PolicyManager::_nil (); return ACE_reinterpret_cast ( CORBA_PolicyManager_ptr, obj->_tao_QueryInterface ( ACE_reinterpret_cast ( ptr_arith_t, &CORBA_PolicyManager::_narrow ) ) ); } CORBA_PolicyManager_ptr CORBA_PolicyManager::_duplicate (CORBA_PolicyManager_ptr obj) { if (!CORBA::is_nil (obj)) obj->_add_ref (); return obj; } void *CORBA_PolicyManager::_tao_QueryInterface (ptr_arith_t type) { void *retv = 0; if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA_PolicyManager::_narrow)) retv = ACE_reinterpret_cast (void*, this); 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; } const char* CORBA_PolicyManager::_interface_repository_id (void) const { return "IDL:omg.org/CORBA/PolicyManager:1.0"; } // default constructor CORBA_PolicyCurrent::CORBA_PolicyCurrent (void) {} // destructor CORBA_PolicyCurrent::~CORBA_PolicyCurrent (void) {} CORBA_PolicyCurrent_ptr CORBA_PolicyCurrent::_narrow ( CORBA::Object_ptr obj, CORBA::Environment &ACE_TRY_ENV ) { return CORBA_PolicyCurrent::_unchecked_narrow (obj, ACE_TRY_ENV); } CORBA_PolicyCurrent_ptr CORBA_PolicyCurrent::_unchecked_narrow ( CORBA::Object_ptr obj, CORBA::Environment & ) { if (CORBA::is_nil (obj)) return CORBA_PolicyCurrent::_nil (); return ACE_reinterpret_cast ( CORBA_PolicyCurrent_ptr, obj->_tao_QueryInterface ( ACE_reinterpret_cast ( ptr_arith_t, &CORBA_PolicyCurrent::_narrow ) ) ); } CORBA_PolicyCurrent_ptr CORBA_PolicyCurrent::_duplicate (CORBA_PolicyCurrent_ptr obj) { if (!CORBA::is_nil (obj)) obj->_add_ref (); return obj; } void *CORBA_PolicyCurrent::_tao_QueryInterface (ptr_arith_t type) { void *retv = 0; if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA_PolicyCurrent::_narrow)) retv = ACE_reinterpret_cast (void*, this); else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA_PolicyManager::_narrow)) retv = ACE_reinterpret_cast ( void *, ACE_static_cast ( CORBA_PolicyManager_ptr, this ) ); else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA_Current::_narrow)) retv = ACE_reinterpret_cast ( void *, ACE_static_cast ( CORBA_Current_ptr, this ) ); 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; } const char* CORBA_PolicyCurrent::_interface_repository_id (void) const { return "IDL:omg.org/CORBA/PolicyCurrent:1.0"; } void operator<<= (CORBA::Any &_tao_any, CORBA::SetOverrideType _tao_elem) { TAO_OutputCDR stream; stream << _tao_elem; _tao_any._tao_replace ( CORBA::_tc_SetOverrideType, TAO_ENCAP_BYTE_ORDER, stream.begin () ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::SetOverrideType &_tao_elem) { ACE_TRY_NEW_ENV { CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_SetOverrideType, ACE_TRY_ENV)) // not equal { return 0; } ACE_TRY_CHECK; TAO_InputCDR stream ( _tao_any._tao_get_cdr (), _tao_any._tao_byte_order () ); if (stream >> _tao_elem) { return 1; } } ACE_CATCHANY { return 0; } ACE_ENDTRY; return 0; } void operator<<= (CORBA::Any &_tao_any, const CORBA_PolicyError &_tao_elem) // copying { TAO_OutputCDR stream; stream << _tao_elem; _tao_any._tao_replace ( _tc_CORBA_PolicyError, TAO_ENCAP_BYTE_ORDER, stream.begin () ); } void operator<<= (CORBA::Any &_tao_any, CORBA_PolicyError *_tao_elem) // non copying { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( _tc_CORBA_PolicyError, TAO_ENCAP_BYTE_ORDER, stream.begin (), 1, _tao_elem, CORBA_PolicyError::_tao_any_destructor ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_PolicyError *&_tao_elem) { return _tao_any >>= ACE_const_cast( const CORBA_PolicyError*&, _tao_elem ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA_PolicyError *&_tao_elem) { _tao_elem = 0; ACE_TRY_NEW_ENV { CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (_tc_CORBA_PolicyError, ACE_TRY_ENV)) // not equal { return 0; } ACE_TRY_CHECK; if (_tao_any.any_owns_data ()) { _tao_elem = (CORBA_PolicyError *)_tao_any.value (); return 1; } else { CORBA_PolicyError *tmp; ACE_NEW_RETURN (tmp, CORBA_PolicyError, 0); TAO_InputCDR stream ( _tao_any._tao_get_cdr (), _tao_any._tao_byte_order () ); CORBA::String_var interface_repository_id; if (!(stream >> interface_repository_id.out ())) return 0; if (ACE_OS::strcmp ( interface_repository_id.in (), "IDL:omg.org/CORBA/PolicyError:1.0")) return 0; if (stream >> *tmp) { ((CORBA::Any *)&_tao_any)->_tao_replace ( _tc_CORBA_PolicyError, 1, tmp, CORBA_PolicyError::_tao_any_destructor ); _tao_elem = tmp; return 1; } else { delete tmp; } } } ACE_CATCHANY { } ACE_ENDTRY; return 0; } void operator<<= (CORBA::Any &_tao_any, const CORBA_InvalidPolicies &_tao_elem) // copying { TAO_OutputCDR stream; stream << _tao_elem; _tao_any._tao_replace ( _tc_CORBA_InvalidPolicies, TAO_ENCAP_BYTE_ORDER, stream.begin () ); } void operator<<= (CORBA::Any &_tao_any, CORBA_InvalidPolicies *_tao_elem) // non copying { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( _tc_CORBA_InvalidPolicies, TAO_ENCAP_BYTE_ORDER, stream.begin (), 1, _tao_elem, CORBA_InvalidPolicies::_tao_any_destructor ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_InvalidPolicies *&_tao_elem) { return _tao_any >>= ACE_const_cast( const CORBA_InvalidPolicies*&, _tao_elem ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA_InvalidPolicies *&_tao_elem) { _tao_elem = 0; ACE_TRY_NEW_ENV { CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (_tc_CORBA_InvalidPolicies, ACE_TRY_ENV)) // not equal { return 0; } ACE_TRY_CHECK; if (_tao_any.any_owns_data ()) { _tao_elem = (CORBA_InvalidPolicies *)_tao_any.value (); return 1; } else { CORBA_InvalidPolicies *tmp; ACE_NEW_RETURN (tmp, CORBA_InvalidPolicies, 0); TAO_InputCDR stream ( _tao_any._tao_get_cdr (), _tao_any._tao_byte_order () ); CORBA::String_var interface_repository_id; if (!(stream >> interface_repository_id.out ())) return 0; if (ACE_OS::strcmp ( interface_repository_id.in (), "IDL:omg.org/CORBA/InvalidPolicies:1.0")) return 0; if (stream >> *tmp) { ((CORBA::Any *)&_tao_any)->_tao_replace ( _tc_CORBA_InvalidPolicies, 1, tmp, CORBA_InvalidPolicies::_tao_any_destructor ); _tao_elem = tmp; return 1; } else { delete tmp; } } } ACE_CATCHANY { } ACE_ENDTRY; return 0; } CORBA_Policy_ptr (*_TAO_collocation_CORBA_Policy_Stub_Factory_function_pointer) ( CORBA::Object_ptr obj ) = 0; void operator<<= (CORBA::Any &_tao_any, CORBA_Policy_ptr _tao_elem) { TAO_OutputCDR stream; if (stream << _tao_elem) { _tao_any._tao_replace ( _tc_CORBA_Policy, TAO_ENCAP_BYTE_ORDER, stream.begin (), 1, CORBA_Policy::_duplicate (_tao_elem), CORBA_Policy::_tao_any_destructor ); } } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_Policy_ptr &_tao_elem) { ACE_TRY_NEW_ENV { _tao_elem = CORBA_Policy::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (_tc_CORBA_Policy, ACE_TRY_ENV)) // not equal { return 0; } ACE_TRY_CHECK; TAO_InputCDR stream ( _tao_any._tao_get_cdr (), _tao_any._tao_byte_order () ); if (stream >> _tao_elem) { ((CORBA::Any *)&_tao_any)->_tao_replace ( _tc_CORBA_Policy, 1, _tao_elem, CORBA_Policy::_tao_any_destructor ); return 1; } } ACE_CATCHANY { _tao_elem = CORBA_Policy::_nil (); return 0; } ACE_ENDTRY; _tao_elem = CORBA_Policy::_nil (); return 0; } #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) template class TAO_Object_Manager; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) # pragma instantiate TAO_Object_Manager #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ void operator<<= ( CORBA::Any &_tao_any, const CORBA_PolicyList &_tao_elem ) // copying { TAO_OutputCDR stream; if (stream << _tao_elem) { _tao_any._tao_replace ( _tc_CORBA_PolicyList, TAO_ENCAP_BYTE_ORDER, stream.begin () ); } } void operator<<= (CORBA::Any &_tao_any, CORBA_PolicyList *_tao_elem) // non copying { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( _tc_CORBA_PolicyList, TAO_ENCAP_BYTE_ORDER, stream.begin (), 1, _tao_elem, CORBA_PolicyList::_tao_any_destructor ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_PolicyList *&_tao_elem) { return _tao_any >>= ACE_const_cast( const CORBA_PolicyList*&, _tao_elem ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA_PolicyList *&_tao_elem) { _tao_elem = 0; ACE_TRY_NEW_ENV { CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (_tc_CORBA_PolicyList, ACE_TRY_ENV)) // not equal { return 0; } ACE_TRY_CHECK; if (_tao_any.any_owns_data ()) { _tao_elem = ACE_static_cast( const CORBA_PolicyList*, _tao_any.value () ); return 1; } else { CORBA_PolicyList *tmp; ACE_NEW_RETURN (tmp, CORBA_PolicyList, 0); TAO_InputCDR stream ( _tao_any._tao_get_cdr (), _tao_any._tao_byte_order () ); if (stream >> *tmp) { ((CORBA::Any *)&_tao_any)->_tao_replace ( _tc_CORBA_PolicyList, 1, ACE_static_cast (void *, tmp), CORBA_PolicyList::_tao_any_destructor ); _tao_elem = tmp; return 1; } else { delete tmp; } } } ACE_CATCHANY { } ACE_ENDTRY; return 0; } void operator<<= ( CORBA::Any &_tao_any, const CORBA_PolicyTypeSeq &_tao_elem ) // copying { TAO_OutputCDR stream; if (stream << _tao_elem) { _tao_any._tao_replace ( _tc_CORBA_PolicyTypeSeq, TAO_ENCAP_BYTE_ORDER, stream.begin () ); } } void operator<<= (CORBA::Any &_tao_any, CORBA_PolicyTypeSeq *_tao_elem) // non copying { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( _tc_CORBA_PolicyTypeSeq, TAO_ENCAP_BYTE_ORDER, stream.begin (), 1, _tao_elem, CORBA_PolicyTypeSeq::_tao_any_destructor ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_PolicyTypeSeq *&_tao_elem) { return _tao_any >>= ACE_const_cast( const CORBA_PolicyTypeSeq*&, _tao_elem ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA_PolicyTypeSeq *&_tao_elem) { _tao_elem = 0; ACE_TRY_NEW_ENV { CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (_tc_CORBA_PolicyTypeSeq, ACE_TRY_ENV)) // not equal { return 0; } ACE_TRY_CHECK; if (_tao_any.any_owns_data ()) { _tao_elem = ACE_static_cast( const CORBA_PolicyTypeSeq*, _tao_any.value () ); return 1; } else { CORBA_PolicyTypeSeq *tmp; ACE_NEW_RETURN (tmp, CORBA_PolicyTypeSeq, 0); TAO_InputCDR stream ( _tao_any._tao_get_cdr (), _tao_any._tao_byte_order () ); if (stream >> *tmp) { ((CORBA::Any *)&_tao_any)->_tao_replace ( _tc_CORBA_PolicyTypeSeq, 1, ACE_static_cast (void *, tmp), CORBA_PolicyTypeSeq::_tao_any_destructor ); _tao_elem = tmp; return 1; } else { delete tmp; } } } ACE_CATCHANY { } ACE_ENDTRY; return 0; } #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) template class TAO_Object_Manager; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) # pragma instantiate TAO_Object_Manager #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) template class TAO_Object_Manager; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) # pragma instantiate TAO_Object_Manager #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ #if !defined _TAO_CDR_OP_CORBA_InvalidPolicies__tao_seq_UShort_CPP_ #define _TAO_CDR_OP_CORBA_InvalidPolicies__tao_seq_UShort_CPP_ CORBA::Boolean operator<< ( TAO_OutputCDR &strm, const CORBA_InvalidPolicies::_tao_seq_UShort &_tao_sequence ) { if (strm << _tao_sequence.length ()) { // encode all elements return strm.write_ushort_array (_tao_sequence.get_buffer (), _tao_sequence.length ()); } return 0; // error } CORBA::Boolean operator>> ( TAO_InputCDR &strm, CORBA_InvalidPolicies::_tao_seq_UShort &_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 return strm.read_ushort_array (_tao_sequence.get_buffer (), _tao_sequence.length ()); } return 0; // error } #endif /* _TAO_CDR_OP_CORBA_InvalidPolicies__tao_seq_UShort_CPP_ */ CORBA::Boolean operator<< ( TAO_OutputCDR &strm, const CORBA_PolicyList &_tao_sequence ) { if (strm << _tao_sequence.length ()) { // encode all elements CORBA::Boolean _tao_marshal_flag = 1; for (CORBA::ULong i = 0; i < _tao_sequence.length () && _tao_marshal_flag; i++) { _tao_marshal_flag = (strm << _tao_sequence[i].in ()); } return _tao_marshal_flag; } return 0; // error } CORBA::Boolean operator>> ( TAO_InputCDR &strm, CORBA_PolicyList &_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 CORBA::Boolean _tao_marshal_flag = 1; for (CORBA::ULong i = 0; i < _tao_sequence.length () && _tao_marshal_flag; i++) { _tao_marshal_flag = (strm >> _tao_sequence[i].out ()); } return _tao_marshal_flag; } return 0; // error } CORBA::Boolean operator<< ( TAO_OutputCDR &strm, const CORBA_PolicyTypeSeq &_tao_sequence ) { if (strm << _tao_sequence.length ()) { // encode all elements return strm.write_ulong_array (_tao_sequence.get_buffer (), _tao_sequence.length ()); } return 0; // error } CORBA::Boolean operator>> ( TAO_InputCDR &strm, CORBA_PolicyTypeSeq &_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 return strm.read_ulong_array (_tao_sequence.get_buffer (), _tao_sequence.length ()); } return 0; // error }