// -*- C++ -*- // // $Id$ // **** Code generated by the The ACE ORB (TAO) IDL Compiler **** // TAO and the TAO IDL Compiler have been developed by: // Center for Distributed Object Computing // Washington University // St. Louis, MO // USA // http://www.cs.wustl.edu/~schmidt/doc-center.html // and // Distributed Object Computing Laboratory // University of California at Irvine // Irvine, CA // USA // http://doc.ece.uci.edu/ // // Information about TAO is available at: // http://www.cs.wustl.edu/~schmidt/TAO.html #include "PolicyC.h" #include "tao/Stub.h" #include "tao/Invocation.h" #include "tao/PortableInterceptor.h" #include "tao/ClientRequestInfo.h" #if TAO_HAS_INTERCEPTORS == 1 #include "tao/RequestInfo_Util.h" #endif /* TAO_HAS_INTERCEPTORS == 1 */ #if defined (__BORLANDC__) #pragma option -w-rvl -w-rch -w-ccc -w-aus #endif /* __BORLANDC__ */ #if !defined (__ACE_INLINE__) #include "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 ())) { 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 ("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; // TAO extension - the virtual _type method. 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 ())) { 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 ("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; // TAO extension - the virtual _type method. CORBA::TypeCode_ptr CORBA_InvalidPolicies::_type (void) const { return ::_tc_CORBA_InvalidPolicies; } // ************************************************************* // Operations for class CORBA_Policy_var // ************************************************************* CORBA_Policy_var::CORBA_Policy_var (void) // default constructor : ptr_ (CORBA_Policy::_nil ()) {} ::CORBA_Policy_ptr CORBA_Policy_var::ptr (void) const { return this->ptr_; } CORBA_Policy_var::CORBA_Policy_var (const ::CORBA_Policy_var &p) // copy constructor : TAO_Base_var (), ptr_ (CORBA_Policy::_duplicate (p.ptr ())) {} CORBA_Policy_var::~CORBA_Policy_var (void) // destructor { CORBA::release (this->ptr_); } CORBA_Policy_var & CORBA_Policy_var::operator= (CORBA_Policy_ptr p) { CORBA::release (this->ptr_); this->ptr_ = p; return *this; } CORBA_Policy_var & CORBA_Policy_var::operator= (const ::CORBA_Policy_var &p) { if (this != &p) { CORBA::release (this->ptr_); this->ptr_ = ::CORBA_Policy::_duplicate (p.ptr ()); } return *this; } CORBA_Policy_var::operator const ::CORBA_Policy_ptr &() const // cast { return this->ptr_; } CORBA_Policy_var::operator ::CORBA_Policy_ptr &() // cast { return this->ptr_; } ::CORBA_Policy_ptr CORBA_Policy_var::operator-> (void) const { return this->ptr_; } ::CORBA_Policy_ptr CORBA_Policy_var::in (void) const { return this->ptr_; } ::CORBA_Policy_ptr & CORBA_Policy_var::inout (void) { return this->ptr_; } ::CORBA_Policy_ptr & CORBA_Policy_var::out (void) { CORBA::release (this->ptr_); this->ptr_ = ::CORBA_Policy::_nil (); return this->ptr_; } ::CORBA_Policy_ptr CORBA_Policy_var::_retn (void) { // yield ownership of managed obj reference ::CORBA_Policy_ptr val = this->ptr_; this->ptr_ = ::CORBA_Policy::_nil (); return val; } ::CORBA_Policy_ptr CORBA_Policy_var::duplicate (CORBA_Policy_ptr p) { return ::CORBA_Policy::_duplicate (p); } void CORBA_Policy_var::release (CORBA_Policy_ptr p) { CORBA::release (p); } ::CORBA_Policy_ptr CORBA_Policy_var::nil (void) { return ::CORBA_Policy::_nil (); } ::CORBA_Policy_ptr CORBA_Policy_var::narrow ( CORBA::Object *p, CORBA::Environment &ACE_TRY_ENV ) { return ::CORBA_Policy::_narrow (p, ACE_TRY_ENV); } CORBA::Object * CORBA_Policy_var::upcast (void *src) { CORBA_Policy **tmp = ACE_static_cast (CORBA_Policy **, src); return *tmp; } // ************************************************************* // Operations for class CORBA_Policy_out // ************************************************************* CORBA_Policy_out::CORBA_Policy_out (CORBA_Policy_ptr &p) : ptr_ (p) { this->ptr_ = ::CORBA_Policy::_nil (); } CORBA_Policy_out::CORBA_Policy_out (CORBA_Policy_var &p) // constructor from _var : ptr_ (p.out ()) { CORBA::release (this->ptr_); this->ptr_ = ::CORBA_Policy::_nil (); } CORBA_Policy_out::CORBA_Policy_out (const ::CORBA_Policy_out &p) // copy constructor : ptr_ (ACE_const_cast (CORBA_Policy_out &, p).ptr_) {} ::CORBA_Policy_out & CORBA_Policy_out::operator= (const ::CORBA_Policy_out &p) { this->ptr_ = ACE_const_cast (CORBA_Policy_out&, p).ptr_; return *this; } CORBA_Policy_out & CORBA_Policy_out::operator= (const ::CORBA_Policy_var &p) { this->ptr_ = ::CORBA_Policy::_duplicate (p.ptr ()); return *this; } CORBA_Policy_out & CORBA_Policy_out::operator= (CORBA_Policy_ptr p) { this->ptr_ = p; return *this; } CORBA_Policy_out::operator ::CORBA_Policy_ptr &() // cast { return this->ptr_; } ::CORBA_Policy_ptr & CORBA_Policy_out::ptr (void) // ptr { return this->ptr_; } ::CORBA_Policy_ptr CORBA_Policy_out::operator-> (void) { return this->ptr_; } #if (TAO_HAS_INTERCEPTORS == 1) class TAO_ClientRequestInfo_CORBA_Policy_policy_type_get : public TAO_ClientRequestInfo { public: TAO_ClientRequestInfo_CORBA_Policy_policy_type_get ( TAO_GIOP_Invocation *_tao_invocation, CORBA::Object_ptr _tao_target, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); virtual Dynamic::ParameterList * arguments ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); virtual Dynamic::ExceptionList * exceptions ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::Any * result ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); void result (CORBA::PolicyType result); private: TAO_ClientRequestInfo_CORBA_Policy_policy_type_get (const TAO_ClientRequestInfo_CORBA_Policy_policy_type_get &); void operator= (const TAO_ClientRequestInfo_CORBA_Policy_policy_type_get &); CORBA::PolicyType _result; }; TAO_ClientRequestInfo_CORBA_Policy_policy_type_get::TAO_ClientRequestInfo_CORBA_Policy_policy_type_get ( TAO_GIOP_Invocation *_tao_invocation, CORBA::Object_ptr _tao_target, CORBA::Environment & ) : TAO_ClientRequestInfo (_tao_invocation, _tao_target) {} Dynamic::ParameterList * TAO_ClientRequestInfo_CORBA_Policy_policy_type_get::arguments (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { // Generate the argument list on demand. Dynamic::ParameterList *parameter_list = TAO_RequestInfo_Util::make_parameter_list (ACE_TRY_ENV); ACE_CHECK_RETURN (0); return parameter_list; } Dynamic::ExceptionList * TAO_ClientRequestInfo_CORBA_Policy_policy_type_get::exceptions (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { // Generate the exception list on demand. Dynamic::ExceptionList *exception_list = TAO_RequestInfo_Util::make_exception_list (ACE_TRY_ENV); ACE_CHECK_RETURN (0); return exception_list; } CORBA::Any * TAO_ClientRequestInfo_CORBA_Policy_policy_type_get::result (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { // Generate the result on demand. CORBA::Boolean tk_void_any = 0; CORBA::Any *result_any = TAO_RequestInfo_Util::make_any (tk_void_any, ACE_TRY_ENV); ACE_CHECK_RETURN (0); CORBA::Any_var safe_result_any = result_any; (*result_any) <<= this->_result; return safe_result_any._retn (); } void TAO_ClientRequestInfo_CORBA_Policy_policy_type_get::result (CORBA::PolicyType result) { // update the result this->_result = result; } class TAO_ClientRequestInfo_CORBA_Policy_copy : public TAO_ClientRequestInfo { public: TAO_ClientRequestInfo_CORBA_Policy_copy ( TAO_GIOP_Invocation *_tao_invocation, CORBA::Object_ptr _tao_target, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); virtual Dynamic::ParameterList * arguments ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); virtual Dynamic::ExceptionList * exceptions ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::Any * result ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); void result (CORBA_Policy_ptr result); private: TAO_ClientRequestInfo_CORBA_Policy_copy (const TAO_ClientRequestInfo_CORBA_Policy_copy &); void operator= (const TAO_ClientRequestInfo_CORBA_Policy_copy &); CORBA_Policy_ptr _result; }; TAO_ClientRequestInfo_CORBA_Policy_copy::TAO_ClientRequestInfo_CORBA_Policy_copy ( TAO_GIOP_Invocation *_tao_invocation, CORBA::Object_ptr _tao_target, CORBA::Environment & ) : TAO_ClientRequestInfo (_tao_invocation, _tao_target) {} Dynamic::ParameterList * TAO_ClientRequestInfo_CORBA_Policy_copy::arguments (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { // Generate the argument list on demand. Dynamic::ParameterList *parameter_list = TAO_RequestInfo_Util::make_parameter_list (ACE_TRY_ENV); ACE_CHECK_RETURN (0); return parameter_list; } Dynamic::ExceptionList * TAO_ClientRequestInfo_CORBA_Policy_copy::exceptions (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { // Generate the exception list on demand. Dynamic::ExceptionList *exception_list = TAO_RequestInfo_Util::make_exception_list (ACE_TRY_ENV); ACE_CHECK_RETURN (0); return exception_list; } CORBA::Any * TAO_ClientRequestInfo_CORBA_Policy_copy::result (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { // Generate the result on demand. CORBA::Boolean tk_void_any = 0; CORBA::Any *result_any = TAO_RequestInfo_Util::make_any (tk_void_any, ACE_TRY_ENV); ACE_CHECK_RETURN (0); CORBA::Any_var safe_result_any = result_any; (*result_any) <<= this->_result; return safe_result_any._retn (); } void TAO_ClientRequestInfo_CORBA_Policy_copy::result (CORBA_Policy_ptr result) { // update the result this->_result = result; } class TAO_ClientRequestInfo_CORBA_Policy_destroy : public TAO_ClientRequestInfo { public: TAO_ClientRequestInfo_CORBA_Policy_destroy ( TAO_GIOP_Invocation *_tao_invocation, CORBA::Object_ptr _tao_target, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); virtual Dynamic::ParameterList * arguments ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); virtual Dynamic::ExceptionList * exceptions ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::Any * result ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC ((CORBA::SystemException)); private: TAO_ClientRequestInfo_CORBA_Policy_destroy (const TAO_ClientRequestInfo_CORBA_Policy_destroy &); void operator= (const TAO_ClientRequestInfo_CORBA_Policy_destroy &); }; TAO_ClientRequestInfo_CORBA_Policy_destroy::TAO_ClientRequestInfo_CORBA_Policy_destroy ( TAO_GIOP_Invocation *_tao_invocation, CORBA::Object_ptr _tao_target, CORBA::Environment & ) : TAO_ClientRequestInfo (_tao_invocation, _tao_target) {} Dynamic::ParameterList * TAO_ClientRequestInfo_CORBA_Policy_destroy::arguments (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { // Generate the argument list on demand. Dynamic::ParameterList *parameter_list = TAO_RequestInfo_Util::make_parameter_list (ACE_TRY_ENV); ACE_CHECK_RETURN (0); return parameter_list; } Dynamic::ExceptionList * TAO_ClientRequestInfo_CORBA_Policy_destroy::exceptions (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { // Generate the exception list on demand. Dynamic::ExceptionList *exception_list = TAO_RequestInfo_Util::make_exception_list (ACE_TRY_ENV); ACE_CHECK_RETURN (0); return exception_list; } CORBA::Any * TAO_ClientRequestInfo_CORBA_Policy_destroy::result (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { // Generate the result on demand. CORBA::Boolean tk_void_any = 1; CORBA::Any *result_any = TAO_RequestInfo_Util::make_any (tk_void_any, ACE_TRY_ENV); ACE_CHECK_RETURN (0); return result_any; } #endif /* TAO_HAS_INTERCEPTORS */ /////////////////////////////////////////////////////////////////////// // Base & Remote Proxy Implementation. // _TAO_CORBA_Policy_Proxy_Impl::_TAO_CORBA_Policy_Proxy_Impl (void) {} _TAO_CORBA_Policy_Remote_Proxy_Impl::_TAO_CORBA_Policy_Remote_Proxy_Impl (void) {} // Remote Implementation of the IDL interface methods CORBA::PolicyType _TAO_CORBA_Policy_Remote_Proxy_Impl::policy_type ( CORBA_Object *_collocated_tao_target_, CORBA::Environment &ACE_TRY_ENV ) ACE_THROW_SPEC (( CORBA::SystemException )) { CORBA::PolicyType _tao_retval = 0; TAO_Stub *istub = _collocated_tao_target_->_stubobj (); if (istub == 0) ACE_THROW_RETURN (CORBA::INTERNAL (), _tao_retval); TAO_GIOP_Twoway_Invocation _tao_call ( istub, "_get_policy_type", 16, 0, istub->orb_core () ); #if (TAO_HAS_INTERCEPTORS == 1) TAO_ClientRequestInterceptor_Adapter _tao_vfr ( istub->orb_core ()->client_request_interceptors () ); #endif /* TAO_HAS_INTERCEPTORS */ for (;;) { int _invoke_status = TAO_INVOKE_EXCEPTION; #if TAO_HAS_INTERCEPTORS == 1 TAO_ClientRequestInfo_CORBA_Policy_policy_type_get ri ( &_tao_call, _collocated_tao_target_, ACE_TRY_ENV ); ACE_CHECK_RETURN (_tao_retval); ACE_TRY { #endif /* TAO_HAS_INTERCEPTORS */ _tao_call.start (ACE_TRY_ENV); TAO_INTERCEPTOR_CHECK_RETURN (_tao_retval); CORBA::Short _tao_response_flag = TAO_TWOWAY_RESPONSE_FLAG; TAO_INTERCEPTOR (ri.response_expected (1)); TAO_INTERCEPTOR ( _tao_vfr.send_request ( &ri, ACE_TRY_ENV ) ); TAO_INTERCEPTOR_CHECK_RETURN (_tao_retval); _tao_call.prepare_header ( ACE_static_cast (CORBA::Octet, _tao_response_flag), ACE_TRY_ENV ); TAO_INTERCEPTOR_CHECK_RETURN (_tao_retval); _invoke_status = _tao_call.invoke (0, 0, ACE_TRY_ENV); TAO_INTERCEPTOR_CHECK_RETURN (_tao_retval); if (_invoke_status == TAO_INVOKE_EXCEPTION) { TAO_INTERCEPTOR_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) )) { TAO_INTERCEPTOR_THROW_RETURN ( CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), _tao_retval ); } TAO_INTERCEPTOR ( CORBA::PolicyType _tao_retval_info = _tao_retval; ri.result (_tao_retval_info); ); TAO_INTERCEPTOR ( ri.reply_status (_invoke_status); if (_invoke_status == TAO_INVOKE_OK) { _tao_vfr.receive_reply ( &ri, ACE_TRY_ENV ); } else { _tao_vfr.receive_other ( &ri, ACE_TRY_ENV ); } ); TAO_INTERCEPTOR_CHECK_RETURN (_tao_retval); #if TAO_HAS_INTERCEPTORS == 1 } ACE_CATCH (PortableInterceptor::ForwardRequest, exc) { _invoke_status = _tao_call.location_forward (exc.forward.in (), ACE_TRY_ENV); ACE_TRY_CHECK; ri.forward_reference (exc); _tao_vfr.receive_other ( &ri, ACE_TRY_ENV ); ACE_TRY_CHECK; } ACE_CATCHANY { ri.exception (&ACE_ANY_EXCEPTION); _tao_vfr.receive_exception ( &ri, ACE_TRY_ENV ); ACE_TRY_CHECK; ACE_RE_THROW; } ACE_ENDTRY; ACE_CHECK_RETURN (_tao_retval); #endif /* TAO_HAS_INTERCEPTORS */ if (_invoke_status == TAO_INVOKE_RESTART) { _tao_call.restart_flag (1); continue; } break; } return _tao_retval; } CORBA_Policy_ptr _TAO_CORBA_Policy_Remote_Proxy_Impl::copy ( CORBA_Object *_collocated_tao_target_, 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 = _collocated_tao_target_->_stubobj (); if (istub == 0) ACE_THROW_RETURN (CORBA::INTERNAL (), 0); TAO_GIOP_Twoway_Invocation _tao_call ( istub, "copy", 4, 0, istub->orb_core () ); #if (TAO_HAS_INTERCEPTORS == 1) TAO_ClientRequestInterceptor_Adapter _tao_vfr ( istub->orb_core ()->client_request_interceptors () ); #endif /* TAO_HAS_INTERCEPTORS */ for (;;) { int _invoke_status = TAO_INVOKE_EXCEPTION; #if TAO_HAS_INTERCEPTORS == 1 TAO_ClientRequestInfo_CORBA_Policy_copy ri ( &_tao_call, _collocated_tao_target_, ACE_TRY_ENV ); ACE_CHECK_RETURN (0); ACE_TRY { #endif /* TAO_HAS_INTERCEPTORS */ _tao_call.start (ACE_TRY_ENV); TAO_INTERCEPTOR_CHECK_RETURN (0); CORBA::Short _tao_response_flag = TAO_TWOWAY_RESPONSE_FLAG; TAO_INTERCEPTOR (ri.response_expected (1)); TAO_INTERCEPTOR ( _tao_vfr.send_request ( &ri, ACE_TRY_ENV ) ); TAO_INTERCEPTOR_CHECK_RETURN (0); _tao_call.prepare_header ( ACE_static_cast (CORBA::Octet, _tao_response_flag), ACE_TRY_ENV ); TAO_INTERCEPTOR_CHECK_RETURN (0); _invoke_status = _tao_call.invoke (0, 0, ACE_TRY_ENV); TAO_INTERCEPTOR_CHECK_RETURN (0); if (_invoke_status == TAO_INVOKE_EXCEPTION) { TAO_INTERCEPTOR_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 ()) )) { TAO_INTERCEPTOR_THROW_RETURN ( CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), 0 ); } TAO_INTERCEPTOR ( CORBA_Policy_ptr _tao_retval_info = _tao_safe_retval._retn (); ri.result (_tao_retval_info); _tao_safe_retval = _tao_retval_info; ); TAO_INTERCEPTOR ( ri.reply_status (_invoke_status); if (_invoke_status == TAO_INVOKE_OK) { _tao_vfr.receive_reply ( &ri, ACE_TRY_ENV ); } else { _tao_vfr.receive_other ( &ri, ACE_TRY_ENV ); } ); TAO_INTERCEPTOR_CHECK_RETURN (0); #if TAO_HAS_INTERCEPTORS == 1 } ACE_CATCH (PortableInterceptor::ForwardRequest, exc) { _invoke_status = _tao_call.location_forward (exc.forward.in (), ACE_TRY_ENV); ACE_TRY_CHECK; ri.forward_reference (exc); _tao_vfr.receive_other ( &ri, ACE_TRY_ENV ); ACE_TRY_CHECK; } ACE_CATCHANY { ri.exception (&ACE_ANY_EXCEPTION); _tao_vfr.receive_exception ( &ri, ACE_TRY_ENV ); ACE_TRY_CHECK; ACE_RE_THROW; } ACE_ENDTRY; ACE_CHECK_RETURN (0); #endif /* TAO_HAS_INTERCEPTORS */ if (_invoke_status == TAO_INVOKE_RESTART) { _tao_call.restart_flag (1); continue; } break; } return _tao_safe_retval._retn (); } void _TAO_CORBA_Policy_Remote_Proxy_Impl::destroy ( CORBA_Object *_collocated_tao_target_, CORBA::Environment &ACE_TRY_ENV ) ACE_THROW_SPEC (( CORBA::SystemException )) { TAO_Stub *istub = _collocated_tao_target_->_stubobj (); if (istub == 0) ACE_THROW (CORBA::INTERNAL ()); TAO_GIOP_Twoway_Invocation _tao_call ( istub, "destroy", 7, 0, istub->orb_core () ); #if (TAO_HAS_INTERCEPTORS == 1) TAO_ClientRequestInterceptor_Adapter _tao_vfr ( istub->orb_core ()->client_request_interceptors () ); #endif /* TAO_HAS_INTERCEPTORS */ for (;;) { int _invoke_status = TAO_INVOKE_EXCEPTION; #if TAO_HAS_INTERCEPTORS == 1 TAO_ClientRequestInfo_CORBA_Policy_destroy ri ( &_tao_call, _collocated_tao_target_, ACE_TRY_ENV ); ACE_CHECK; ACE_TRY { #endif /* TAO_HAS_INTERCEPTORS */ _tao_call.start (ACE_TRY_ENV); TAO_INTERCEPTOR_CHECK; CORBA::Short _tao_response_flag = TAO_TWOWAY_RESPONSE_FLAG; TAO_INTERCEPTOR (ri.response_expected (1)); TAO_INTERCEPTOR ( _tao_vfr.send_request ( &ri, ACE_TRY_ENV ) ); TAO_INTERCEPTOR_CHECK; _tao_call.prepare_header ( ACE_static_cast (CORBA::Octet, _tao_response_flag), ACE_TRY_ENV ); TAO_INTERCEPTOR_CHECK; _invoke_status = _tao_call.invoke (0, 0, ACE_TRY_ENV); TAO_INTERCEPTOR_CHECK; if (_invoke_status == TAO_INVOKE_EXCEPTION) { TAO_INTERCEPTOR_THROW ( CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES) ); } TAO_INTERCEPTOR ( ri.reply_status (_invoke_status); if (_invoke_status == TAO_INVOKE_OK) { _tao_vfr.receive_reply ( &ri, ACE_TRY_ENV ); } else { _tao_vfr.receive_other ( &ri, ACE_TRY_ENV ); } ); TAO_INTERCEPTOR_CHECK; #if TAO_HAS_INTERCEPTORS == 1 } ACE_CATCH (PortableInterceptor::ForwardRequest, exc) { _invoke_status = _tao_call.location_forward (exc.forward.in (), ACE_TRY_ENV); ACE_TRY_CHECK; ri.forward_reference (exc); _tao_vfr.receive_other ( &ri, ACE_TRY_ENV ); ACE_TRY_CHECK; } ACE_CATCHANY { ri.exception (&ACE_ANY_EXCEPTION); _tao_vfr.receive_exception ( &ri, ACE_TRY_ENV ); ACE_TRY_CHECK; ACE_RE_THROW; } ACE_ENDTRY; ACE_CHECK; #endif /* TAO_HAS_INTERCEPTORS */ if (_invoke_status == TAO_INVOKE_RESTART) { _tao_call.restart_flag (1); continue; } break; } } // // End Base & Remote Proxy Implemeentation. /////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// // Remote & Base Proxy Broker Implementation // _TAO_CORBA_Policy_Proxy_Broker::_TAO_CORBA_Policy_Proxy_Broker (void) { } _TAO_CORBA_Policy_Proxy_Broker::~_TAO_CORBA_Policy_Proxy_Broker (void) { } _TAO_CORBA_Policy_Proxy_Broker * (*_TAO_CORBA_Policy_Proxy_Broker_Factory_function_pointer) ( CORBA::Object_ptr obj ) = 0; // Factory Member function Implementation. _TAO_CORBA_Policy_Remote_Proxy_Broker * _TAO_CORBA_Policy_Remote_Proxy_Broker::the_TAO_CORBA_Policy_Remote_Proxy_Broker (void) { static ::_TAO_CORBA_Policy_Remote_Proxy_Broker remote_proxy_broker; return &remote_proxy_broker; } _TAO_CORBA_Policy_Remote_Proxy_Broker::_TAO_CORBA_Policy_Remote_Proxy_Broker (void) { } _TAO_CORBA_Policy_Remote_Proxy_Broker::~_TAO_CORBA_Policy_Remote_Proxy_Broker (void) { } _TAO_CORBA_Policy_Proxy_Impl& _TAO_CORBA_Policy_Remote_Proxy_Broker::select_proxy ( ::CORBA_Policy *, CORBA::Environment & ) { return this->remote_proxy_impl_; } // // End Remote & Base Proxy Broker Implementation /////////////////////////////////////////////////////////////////////// // default constructor CORBA_Policy::CORBA_Policy (int collocated) { this->CORBA_Policy_setup_collocation (collocated); } // destructor CORBA_Policy::~CORBA_Policy (void) {} void CORBA_Policy::CORBA_Policy_setup_collocation (int collocated) { if (collocated) this->the_TAO_CORBA_Policy_Proxy_Broker_ = ::_TAO_CORBA_Policy_Proxy_Broker_Factory_function_pointer (this); else this->the_TAO_CORBA_Policy_Proxy_Broker_ = ::_TAO_CORBA_Policy_Remote_Proxy_Broker::the_TAO_CORBA_Policy_Remote_Proxy_Broker (); } 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 ( !CORBA::is_nil (stub->servant_orb_var ().ptr ()) && stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects () && obj->_is_collocated () &&_TAO_CORBA_Policy_Proxy_Broker_Factory_function_pointer != 0 ) { ACE_NEW_RETURN ( default_proxy, ::CORBA_Policy ( stub, 1, obj->_servant ()), CORBA_Policy::_nil ()); } if (CORBA::is_nil (default_proxy)) ACE_NEW_RETURN (default_proxy, ::CORBA_Policy (stub, 0, obj->_servant ()), 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::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; } CORBA::PolicyType CORBA_Policy::policy_type ( CORBA::Environment &ACE_TRY_ENV ) ACE_THROW_SPEC (( CORBA::SystemException )) { _TAO_CORBA_Policy_Proxy_Impl &proxy = this->the_TAO_CORBA_Policy_Proxy_Broker_->select_proxy (this, ACE_TRY_ENV); ACE_CHECK_RETURN (0); return proxy.policy_type ( this, ACE_TRY_ENV ); } CORBA_Policy_ptr CORBA_Policy::copy ( CORBA::Environment &ACE_TRY_ENV ) ACE_THROW_SPEC (( CORBA::SystemException )) { _TAO_CORBA_Policy_Proxy_Impl &proxy = this->the_TAO_CORBA_Policy_Proxy_Broker_->select_proxy (this, ACE_TRY_ENV); ACE_CHECK_RETURN (0); return proxy.copy ( this, ACE_TRY_ENV ); } void CORBA_Policy::destroy ( CORBA::Environment &ACE_TRY_ENV ) ACE_THROW_SPEC (( CORBA::SystemException )) { _TAO_CORBA_Policy_Proxy_Impl &proxy = this->the_TAO_CORBA_Policy_Proxy_Broker_->select_proxy (this, ACE_TRY_ENV); ACE_CHECK; proxy.destroy ( this, ACE_TRY_ENV ); } 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); ACE_CHECK; } 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; // ************************************************************* // Operations for class CORBA_PolicyManager_var // ************************************************************* CORBA_PolicyManager_var::CORBA_PolicyManager_var (void) // default constructor : ptr_ (CORBA_PolicyManager::_nil ()) {} ::CORBA_PolicyManager_ptr CORBA_PolicyManager_var::ptr (void) const { return this->ptr_; } CORBA_PolicyManager_var::CORBA_PolicyManager_var (const ::CORBA_PolicyManager_var &p) // copy constructor : TAO_Base_var (), ptr_ (CORBA_PolicyManager::_duplicate (p.ptr ())) {} CORBA_PolicyManager_var::~CORBA_PolicyManager_var (void) // destructor { CORBA::release (this->ptr_); } CORBA_PolicyManager_var & CORBA_PolicyManager_var::operator= (CORBA_PolicyManager_ptr p) { CORBA::release (this->ptr_); this->ptr_ = p; return *this; } CORBA_PolicyManager_var & CORBA_PolicyManager_var::operator= (const ::CORBA_PolicyManager_var &p) { if (this != &p) { CORBA::release (this->ptr_); this->ptr_ = ::CORBA_PolicyManager::_duplicate (p.ptr ()); } return *this; } CORBA_PolicyManager_var::operator const ::CORBA_PolicyManager_ptr &() const // cast { return this->ptr_; } CORBA_PolicyManager_var::operator ::CORBA_PolicyManager_ptr &() // cast { return this->ptr_; } ::CORBA_PolicyManager_ptr CORBA_PolicyManager_var::operator-> (void) const { return this->ptr_; } ::CORBA_PolicyManager_ptr CORBA_PolicyManager_var::in (void) const { return this->ptr_; } ::CORBA_PolicyManager_ptr & CORBA_PolicyManager_var::inout (void) { return this->ptr_; } ::CORBA_PolicyManager_ptr & CORBA_PolicyManager_var::out (void) { CORBA::release (this->ptr_); this->ptr_ = ::CORBA_PolicyManager::_nil (); return this->ptr_; } ::CORBA_PolicyManager_ptr CORBA_PolicyManager_var::_retn (void) { // yield ownership of managed obj reference ::CORBA_PolicyManager_ptr val = this->ptr_; this->ptr_ = ::CORBA_PolicyManager::_nil (); return val; } ::CORBA_PolicyManager_ptr CORBA_PolicyManager_var::duplicate (CORBA_PolicyManager_ptr p) { return ::CORBA_PolicyManager::_duplicate (p); } void CORBA_PolicyManager_var::release (CORBA_PolicyManager_ptr p) { CORBA::release (p); } ::CORBA_PolicyManager_ptr CORBA_PolicyManager_var::nil (void) { return ::CORBA_PolicyManager::_nil (); } ::CORBA_PolicyManager_ptr CORBA_PolicyManager_var::narrow ( CORBA::Object *p, CORBA::Environment &ACE_TRY_ENV ) { return ::CORBA_PolicyManager::_narrow (p, ACE_TRY_ENV); } CORBA::Object * CORBA_PolicyManager_var::upcast (void *src) { CORBA_PolicyManager **tmp = ACE_static_cast (CORBA_PolicyManager **, src); return *tmp; } // ************************************************************* // Operations for class CORBA_PolicyManager_out // ************************************************************* CORBA_PolicyManager_out::CORBA_PolicyManager_out (CORBA_PolicyManager_ptr &p) : ptr_ (p) { this->ptr_ = ::CORBA_PolicyManager::_nil (); } CORBA_PolicyManager_out::CORBA_PolicyManager_out (CORBA_PolicyManager_var &p) // constructor from _var : ptr_ (p.out ()) { CORBA::release (this->ptr_); this->ptr_ = ::CORBA_PolicyManager::_nil (); } CORBA_PolicyManager_out::CORBA_PolicyManager_out (const ::CORBA_PolicyManager_out &p) // copy constructor : ptr_ (ACE_const_cast (CORBA_PolicyManager_out &, p).ptr_) {} ::CORBA_PolicyManager_out & CORBA_PolicyManager_out::operator= (const ::CORBA_PolicyManager_out &p) { this->ptr_ = ACE_const_cast (CORBA_PolicyManager_out&, p).ptr_; return *this; } CORBA_PolicyManager_out & CORBA_PolicyManager_out::operator= (const ::CORBA_PolicyManager_var &p) { this->ptr_ = ::CORBA_PolicyManager::_duplicate (p.ptr ()); return *this; } CORBA_PolicyManager_out & CORBA_PolicyManager_out::operator= (CORBA_PolicyManager_ptr p) { this->ptr_ = p; return *this; } CORBA_PolicyManager_out::operator ::CORBA_PolicyManager_ptr &() // cast { return this->ptr_; } ::CORBA_PolicyManager_ptr & CORBA_PolicyManager_out::ptr (void) // ptr { return this->ptr_; } ::CORBA_PolicyManager_ptr CORBA_PolicyManager_out::operator-> (void) { return this->ptr_; } // default constructor CORBA_PolicyManager::CORBA_PolicyManager () { } // 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"; } // ************************************************************* // Operations for class CORBA_PolicyCurrent_var // ************************************************************* CORBA_PolicyCurrent_var::CORBA_PolicyCurrent_var (void) // default constructor : ptr_ (CORBA_PolicyCurrent::_nil ()) {} ::CORBA_PolicyCurrent_ptr CORBA_PolicyCurrent_var::ptr (void) const { return this->ptr_; } CORBA_PolicyCurrent_var::CORBA_PolicyCurrent_var (const ::CORBA_PolicyCurrent_var &p) // copy constructor : TAO_Base_var (), ptr_ (CORBA_PolicyCurrent::_duplicate (p.ptr ())) {} CORBA_PolicyCurrent_var::~CORBA_PolicyCurrent_var (void) // destructor { CORBA::release (this->ptr_); } CORBA_PolicyCurrent_var & CORBA_PolicyCurrent_var::operator= (CORBA_PolicyCurrent_ptr p) { CORBA::release (this->ptr_); this->ptr_ = p; return *this; } CORBA_PolicyCurrent_var & CORBA_PolicyCurrent_var::operator= (const ::CORBA_PolicyCurrent_var &p) { if (this != &p) { CORBA::release (this->ptr_); this->ptr_ = ::CORBA_PolicyCurrent::_duplicate (p.ptr ()); } return *this; } CORBA_PolicyCurrent_var::operator const ::CORBA_PolicyCurrent_ptr &() const // cast { return this->ptr_; } CORBA_PolicyCurrent_var::operator ::CORBA_PolicyCurrent_ptr &() // cast { return this->ptr_; } ::CORBA_PolicyCurrent_ptr CORBA_PolicyCurrent_var::operator-> (void) const { return this->ptr_; } ::CORBA_PolicyCurrent_ptr CORBA_PolicyCurrent_var::in (void) const { return this->ptr_; } ::CORBA_PolicyCurrent_ptr & CORBA_PolicyCurrent_var::inout (void) { return this->ptr_; } ::CORBA_PolicyCurrent_ptr & CORBA_PolicyCurrent_var::out (void) { CORBA::release (this->ptr_); this->ptr_ = ::CORBA_PolicyCurrent::_nil (); return this->ptr_; } ::CORBA_PolicyCurrent_ptr CORBA_PolicyCurrent_var::_retn (void) { // yield ownership of managed obj reference ::CORBA_PolicyCurrent_ptr val = this->ptr_; this->ptr_ = ::CORBA_PolicyCurrent::_nil (); return val; } ::CORBA_PolicyCurrent_ptr CORBA_PolicyCurrent_var::duplicate (CORBA_PolicyCurrent_ptr p) { return ::CORBA_PolicyCurrent::_duplicate (p); } void CORBA_PolicyCurrent_var::release (CORBA_PolicyCurrent_ptr p) { CORBA::release (p); } ::CORBA_PolicyCurrent_ptr CORBA_PolicyCurrent_var::nil (void) { return ::CORBA_PolicyCurrent::_nil (); } ::CORBA_PolicyCurrent_ptr CORBA_PolicyCurrent_var::narrow ( CORBA::Object *p, CORBA::Environment &ACE_TRY_ENV ) { return ::CORBA_PolicyCurrent::_narrow (p, ACE_TRY_ENV); } CORBA::Object * CORBA_PolicyCurrent_var::upcast (void *src) { CORBA_PolicyCurrent **tmp = ACE_static_cast (CORBA_PolicyCurrent **, src); return *tmp; } // ************************************************************* // Operations for class CORBA_PolicyCurrent_out // ************************************************************* CORBA_PolicyCurrent_out::CORBA_PolicyCurrent_out (CORBA_PolicyCurrent_ptr &p) : ptr_ (p) { this->ptr_ = ::CORBA_PolicyCurrent::_nil (); } CORBA_PolicyCurrent_out::CORBA_PolicyCurrent_out (CORBA_PolicyCurrent_var &p) // constructor from _var : ptr_ (p.out ()) { CORBA::release (this->ptr_); this->ptr_ = ::CORBA_PolicyCurrent::_nil (); } CORBA_PolicyCurrent_out::CORBA_PolicyCurrent_out (const ::CORBA_PolicyCurrent_out &p) // copy constructor : ptr_ (ACE_const_cast (CORBA_PolicyCurrent_out &, p).ptr_) {} ::CORBA_PolicyCurrent_out & CORBA_PolicyCurrent_out::operator= (const ::CORBA_PolicyCurrent_out &p) { this->ptr_ = ACE_const_cast (CORBA_PolicyCurrent_out&, p).ptr_; return *this; } CORBA_PolicyCurrent_out & CORBA_PolicyCurrent_out::operator= (const ::CORBA_PolicyCurrent_var &p) { this->ptr_ = ::CORBA_PolicyCurrent::_duplicate (p.ptr ()); return *this; } CORBA_PolicyCurrent_out & CORBA_PolicyCurrent_out::operator= (CORBA_PolicyCurrent_ptr p) { this->ptr_ = p; return *this; } CORBA_PolicyCurrent_out::operator ::CORBA_PolicyCurrent_ptr &() // cast { return this->ptr_; } ::CORBA_PolicyCurrent_ptr & CORBA_PolicyCurrent_out::ptr (void) // ptr { return this->ptr_; } ::CORBA_PolicyCurrent_ptr CORBA_PolicyCurrent_out::operator-> (void) { return this->ptr_; } // default constructor CORBA_PolicyCurrent::CORBA_PolicyCurrent () { } // 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 (); CORBA::Boolean result = type->equivalent (CORBA::_tc_SetOverrideType, ACE_TRY_ENV); ACE_TRY_CHECK; if (!result) return 0; // not equivalent 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 (); CORBA::Boolean result = type->equivalent (_tc_CORBA_PolicyError, ACE_TRY_ENV); ACE_TRY_CHECK; if (!result) return 0; // not equivalent 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 (); CORBA::Boolean result = type->equivalent (_tc_CORBA_InvalidPolicies, ACE_TRY_ENV); ACE_TRY_CHECK; if (!result) return 0; // not equivalent 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; } 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 (); CORBA::Boolean result = type->equivalent (_tc_CORBA_Policy, ACE_TRY_ENV); ACE_TRY_CHECK; if (!result) return 0; // not equivalent 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 (); CORBA::Boolean result = type->equivalent (_tc_CORBA_PolicyList, ACE_TRY_ENV); ACE_TRY_CHECK; if (!result) return 0; // not equivalent 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 (); CORBA::Boolean result = type->equivalent (_tc_CORBA_PolicyTypeSeq, ACE_TRY_ENV); ACE_TRY_CHECK; if (!result) return 0; // not equivalent 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_Policy_ptr _tao_objref ) { CORBA::Object_ptr _tao_corba_obj = _tao_objref; return (strm << _tao_corba_obj); } CORBA::Boolean operator>> ( TAO_InputCDR &strm, CORBA_Policy_ptr &_tao_objref ) { ACE_TRY_NEW_ENV { CORBA::Object_var obj; if ((strm >> obj.inout ()) == 0) return 0; // narrow to the right type _tao_objref = CORBA_Policy::_unchecked_narrow ( obj.in (), ACE_TRY_ENV ); ACE_TRY_CHECK; return 1; } ACE_CATCHANY { // do nothing } ACE_ENDTRY; return 0; } 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 }