diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-04-24 13:44:55 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-04-24 13:44:55 +0000 |
commit | bec7502b0378ce251f466cc69095e6b429733ae7 (patch) | |
tree | 30ccc38ebab6b21bd7a5b04fcd46c556766fa366 /TAO/tao/PolicyC.i | |
parent | 1b01f16a141350eeb04def9eef23e8eaa5e2833b (diff) | |
download | ATCD-bec7502b0378ce251f466cc69095e6b429733ae7.tar.gz |
ChangeLogTag: Tue Apr 24 08:28:40 2001 Jeff Parsons <parsons@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/PolicyC.i')
-rw-r--r-- | TAO/tao/PolicyC.i | 611 |
1 files changed, 106 insertions, 505 deletions
diff --git a/TAO/tao/PolicyC.i b/TAO/tao/PolicyC.i index 1d4f91dcbf9..bbd5df5f2bd 100644 --- a/TAO/tao/PolicyC.i +++ b/TAO/tao/PolicyC.i @@ -207,184 +207,58 @@ #if !defined (_CORBA_POLICY___CI_) #define _CORBA_POLICY___CI_ -ACE_INLINE -CORBA_Policy::CORBA_Policy ( - TAO_Stub *objref, - CORBA::Boolean _tao_collocated, - TAO_Abstract_ServantBase *servant +ACE_INLINE CORBA_Policy_ptr +tao_CORBA_Policy_duplicate ( + CORBA_Policy_ptr p ) - : CORBA_Object (objref, _tao_collocated, servant) -{ - this->CORBA_Policy_setup_collocation (_tao_collocated); -} - -#endif /* end #if !defined */ - - -#if !defined (_CORBA_POLICY___VAR_CI_) -#define _CORBA_POLICY___VAR_CI_ - -// ************************************************************* -// Inline operations for class CORBA_Policy_var -// ************************************************************* - -ACE_INLINE -CORBA_Policy_var::CORBA_Policy_var (void) // default constructor - : ptr_ (CORBA_Policy::_nil ()) -{} - -ACE_INLINE ::CORBA_Policy_ptr -CORBA_Policy_var::ptr (void) const -{ - return this->ptr_; -} - -ACE_INLINE -CORBA_Policy_var::CORBA_Policy_var (const ::CORBA_Policy_var &p) // copy constructor - : TAO_Base_var (), - ptr_ (CORBA_Policy::_duplicate (p.ptr ())) -{} - -ACE_INLINE -CORBA_Policy_var::~CORBA_Policy_var (void) // destructor -{ - CORBA::release (this->ptr_); -} - -ACE_INLINE CORBA_Policy_var & -CORBA_Policy_var::operator= (CORBA_Policy_ptr p) -{ - CORBA::release (this->ptr_); - this->ptr_ = p; - return *this; -} - -ACE_INLINE 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; -} - -ACE_INLINE -CORBA_Policy_var::operator const ::CORBA_Policy_ptr &() const // cast { - return this->ptr_; -} - -ACE_INLINE -CORBA_Policy_var::operator ::CORBA_Policy_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::CORBA_Policy_ptr -CORBA_Policy_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::CORBA_Policy_ptr -CORBA_Policy_var::in (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::CORBA_Policy_ptr & -CORBA_Policy_var::inout (void) -{ - return this->ptr_; + return CORBA_Policy::_duplicate (p); } -ACE_INLINE ::CORBA_Policy_ptr & -CORBA_Policy_var::out (void) +ACE_INLINE void +tao_CORBA_Policy_release ( + CORBA_Policy_ptr p + ) { - CORBA::release (this->ptr_); - this->ptr_ = ::CORBA_Policy::_nil (); - return this->ptr_; + CORBA::release (p); } -ACE_INLINE ::CORBA_Policy_ptr -CORBA_Policy_var::_retn (void) +ACE_INLINE CORBA_Policy_ptr +tao_CORBA_Policy_nil ( + void + ) { - // yield ownership of managed obj reference - ::CORBA_Policy_ptr val = this->ptr_; - this->ptr_ = ::CORBA_Policy::_nil (); - return val; + return CORBA_Policy::_nil (); } - -#endif /* end #if !defined */ - - -#if !defined (_CORBA_POLICY___OUT_CI_) -#define _CORBA_POLICY___OUT_CI_ - -// ************************************************************* -// Inline operations for class CORBA_Policy_out -// ************************************************************* - -ACE_INLINE -CORBA_Policy_out::CORBA_Policy_out (CORBA_Policy_ptr &p) - : ptr_ (p) +ACE_INLINE CORBA_Policy_ptr +tao_CORBA_Policy_narrow ( + CORBA::Object *p, + CORBA::Environment &ACE_TRY_ENV + ) { - this->ptr_ = ::CORBA_Policy::_nil (); + return CORBA_Policy::_narrow (p, ACE_TRY_ENV); } -ACE_INLINE -CORBA_Policy_out::CORBA_Policy_out (CORBA_Policy_var &p) // constructor from _var - : ptr_ (p.out ()) +ACE_INLINE CORBA::Object * +tao_CORBA_Policy_upcast ( + void *src + ) { - CORBA::release (this->ptr_); - this->ptr_ = ::CORBA_Policy::_nil (); + CORBA_Policy **tmp = + ACE_static_cast (CORBA_Policy **, src); + return *tmp; } ACE_INLINE -CORBA_Policy_out::CORBA_Policy_out (const ::CORBA_Policy_out &p) // copy constructor - : ptr_ (ACE_const_cast (CORBA_Policy_out &, p).ptr_) -{} - -ACE_INLINE ::CORBA_Policy_out & -CORBA_Policy_out::operator= (const ::CORBA_Policy_out &p) -{ - this->ptr_ = ACE_const_cast (CORBA_Policy_out&, p).ptr_; - return *this; -} - -ACE_INLINE CORBA_Policy_out & -CORBA_Policy_out::operator= (const ::CORBA_Policy_var &p) -{ - this->ptr_ = ::CORBA_Policy::_duplicate (p.ptr ()); - return *this; -} - -ACE_INLINE CORBA_Policy_out & -CORBA_Policy_out::operator= (CORBA_Policy_ptr p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -CORBA_Policy_out::operator ::CORBA_Policy_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::CORBA_Policy_ptr & -CORBA_Policy_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::CORBA_Policy_ptr -CORBA_Policy_out::operator-> (void) +CORBA_Policy::CORBA_Policy ( + TAO_Stub *objref, + CORBA::Boolean _tao_collocated, + TAO_Abstract_ServantBase *servant + ) + : CORBA_Object (objref, _tao_collocated, servant) { - return this->ptr_; + this->CORBA_Policy_setup_collocation (_tao_collocated); } @@ -404,7 +278,9 @@ CORBA_Policy_out::operator-> (void) ACE_NEW_RETURN (buf, CORBA_Policy*[nelems], 0); for (CORBA::ULong i = 0; i < nelems; i++) - buf[i] = CORBA_Policy::_nil (); + { + buf[i] = CORBA_Policy::_nil (); + } return buf; } @@ -447,7 +323,9 @@ CORBA_Policy_out::operator-> (void) CORBA_Policy ** const tmp2 = ACE_reinterpret_cast (CORBA_Policy ** ACE_CAST_CONST, rhs.buffer_); for (CORBA::ULong i = 0; i < rhs.length_; ++i) - tmp1[i] = CORBA_Policy::_duplicate (tmp2[i]); + { + tmp1[i] = CORBA_Policy::_duplicate (tmp2[i]); + } this->buffer_ = tmp1; } @@ -487,7 +365,9 @@ CORBA_Policy_out::operator-> (void) CORBA_Policy ** const tmp2 = ACE_reinterpret_cast (CORBA_Policy ** ACE_CAST_CONST, rhs.buffer_); for (CORBA::ULong i = 0; i < rhs.length_; ++i) - tmp1[i] = CORBA_Policy::_duplicate (tmp2[i]); + { + tmp1[i] = CORBA_Policy::_duplicate (tmp2[i]); + } return *this; } @@ -1165,340 +1045,100 @@ CORBA_PolicyTypeSeq_out::operator[] (CORBA::ULong index) #endif /* end #if !defined */ -#if !defined (_CORBA_POLICYMANAGER___VAR_CI_) -#define _CORBA_POLICYMANAGER___VAR_CI_ - -// ************************************************************* -// Inline operations for class CORBA_PolicyManager_var -// ************************************************************* - -ACE_INLINE -CORBA_PolicyManager_var::CORBA_PolicyManager_var (void) // default constructor - : ptr_ (CORBA_PolicyManager::_nil ()) -{} - -ACE_INLINE ::CORBA_PolicyManager_ptr -CORBA_PolicyManager_var::ptr (void) const -{ - return this->ptr_; -} - -ACE_INLINE -CORBA_PolicyManager_var::CORBA_PolicyManager_var (const ::CORBA_PolicyManager_var &p) // copy constructor - : TAO_Base_var (), - ptr_ (CORBA_PolicyManager::_duplicate (p.ptr ())) -{} - -ACE_INLINE -CORBA_PolicyManager_var::~CORBA_PolicyManager_var (void) // destructor -{ - CORBA::release (this->ptr_); -} - -ACE_INLINE CORBA_PolicyManager_var & -CORBA_PolicyManager_var::operator= (CORBA_PolicyManager_ptr p) -{ - CORBA::release (this->ptr_); - this->ptr_ = p; - return *this; -} - -ACE_INLINE 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; -} - -ACE_INLINE -CORBA_PolicyManager_var::operator const ::CORBA_PolicyManager_ptr &() const // cast -{ - return this->ptr_; -} - -ACE_INLINE -CORBA_PolicyManager_var::operator ::CORBA_PolicyManager_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::CORBA_PolicyManager_ptr -CORBA_PolicyManager_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::CORBA_PolicyManager_ptr -CORBA_PolicyManager_var::in (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::CORBA_PolicyManager_ptr & -CORBA_PolicyManager_var::inout (void) -{ - return this->ptr_; -} - -ACE_INLINE ::CORBA_PolicyManager_ptr & -CORBA_PolicyManager_var::out (void) -{ - CORBA::release (this->ptr_); - this->ptr_ = ::CORBA_PolicyManager::_nil (); - return this->ptr_; -} - -ACE_INLINE ::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; -} - - -#endif /* end #if !defined */ - - -#if !defined (_CORBA_POLICYMANAGER___OUT_CI_) -#define _CORBA_POLICYMANAGER___OUT_CI_ - -// ************************************************************* -// Inline operations for class CORBA_PolicyManager_out -// ************************************************************* - -ACE_INLINE -CORBA_PolicyManager_out::CORBA_PolicyManager_out (CORBA_PolicyManager_ptr &p) - : ptr_ (p) -{ - this->ptr_ = ::CORBA_PolicyManager::_nil (); -} - -ACE_INLINE -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 (); -} - -ACE_INLINE -CORBA_PolicyManager_out::CORBA_PolicyManager_out (const ::CORBA_PolicyManager_out &p) // copy constructor - : ptr_ (ACE_const_cast (CORBA_PolicyManager_out &, p).ptr_) -{} - -ACE_INLINE ::CORBA_PolicyManager_out & -CORBA_PolicyManager_out::operator= (const ::CORBA_PolicyManager_out &p) -{ - this->ptr_ = ACE_const_cast (CORBA_PolicyManager_out&, p).ptr_; - return *this; -} - -ACE_INLINE CORBA_PolicyManager_out & -CORBA_PolicyManager_out::operator= (const ::CORBA_PolicyManager_var &p) -{ - this->ptr_ = ::CORBA_PolicyManager::_duplicate (p.ptr ()); - return *this; -} - -ACE_INLINE CORBA_PolicyManager_out & -CORBA_PolicyManager_out::operator= (CORBA_PolicyManager_ptr p) -{ - this->ptr_ = p; - return *this; -} - -ACE_INLINE -CORBA_PolicyManager_out::operator ::CORBA_PolicyManager_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::CORBA_PolicyManager_ptr & -CORBA_PolicyManager_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::CORBA_PolicyManager_ptr -CORBA_PolicyManager_out::operator-> (void) -{ - return this->ptr_; -} - - -#endif /* end #if !defined */ - - -#if !defined (_CORBA_POLICYCURRENT___VAR_CI_) -#define _CORBA_POLICYCURRENT___VAR_CI_ - -// ************************************************************* -// Inline operations for class CORBA_PolicyCurrent_var -// ************************************************************* - -ACE_INLINE -CORBA_PolicyCurrent_var::CORBA_PolicyCurrent_var (void) // default constructor - : ptr_ (CORBA_PolicyCurrent::_nil ()) -{} - -ACE_INLINE ::CORBA_PolicyCurrent_ptr -CORBA_PolicyCurrent_var::ptr (void) const -{ - return this->ptr_; -} - -ACE_INLINE -CORBA_PolicyCurrent_var::CORBA_PolicyCurrent_var (const ::CORBA_PolicyCurrent_var &p) // copy constructor - : TAO_Base_var (), - ptr_ (CORBA_PolicyCurrent::_duplicate (p.ptr ())) -{} +#if !defined (_CORBA_POLICYMANAGER___CI_) +#define _CORBA_POLICYMANAGER___CI_ -ACE_INLINE -CORBA_PolicyCurrent_var::~CORBA_PolicyCurrent_var (void) // destructor -{ - CORBA::release (this->ptr_); -} - -ACE_INLINE CORBA_PolicyCurrent_var & -CORBA_PolicyCurrent_var::operator= (CORBA_PolicyCurrent_ptr p) -{ - CORBA::release (this->ptr_); - this->ptr_ = p; - return *this; -} - -ACE_INLINE 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; -} - -ACE_INLINE -CORBA_PolicyCurrent_var::operator const ::CORBA_PolicyCurrent_ptr &() const // cast -{ - return this->ptr_; -} - -ACE_INLINE -CORBA_PolicyCurrent_var::operator ::CORBA_PolicyCurrent_ptr &() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::CORBA_PolicyCurrent_ptr -CORBA_PolicyCurrent_var::operator-> (void) const +ACE_INLINE CORBA_PolicyManager_ptr +tao_CORBA_PolicyManager_duplicate ( + CORBA_PolicyManager_ptr p + ) { - return this->ptr_; + return CORBA_PolicyManager::_duplicate (p); } -ACE_INLINE ::CORBA_PolicyCurrent_ptr -CORBA_PolicyCurrent_var::in (void) const +ACE_INLINE void +tao_CORBA_PolicyManager_release ( + CORBA_PolicyManager_ptr p + ) { - return this->ptr_; + CORBA::release (p); } -ACE_INLINE ::CORBA_PolicyCurrent_ptr & -CORBA_PolicyCurrent_var::inout (void) +ACE_INLINE CORBA_PolicyManager_ptr +tao_CORBA_PolicyManager_nil ( + void + ) { - return this->ptr_; + return CORBA_PolicyManager::_nil (); } -ACE_INLINE ::CORBA_PolicyCurrent_ptr & -CORBA_PolicyCurrent_var::out (void) +ACE_INLINE CORBA_PolicyManager_ptr +tao_CORBA_PolicyManager_narrow ( + CORBA::Object *p, + CORBA::Environment &ACE_TRY_ENV + ) { - CORBA::release (this->ptr_); - this->ptr_ = ::CORBA_PolicyCurrent::_nil (); - return this->ptr_; + return CORBA_PolicyManager::_narrow (p, ACE_TRY_ENV); } -ACE_INLINE ::CORBA_PolicyCurrent_ptr -CORBA_PolicyCurrent_var::_retn (void) +ACE_INLINE CORBA::Object * +tao_CORBA_PolicyManager_upcast ( + void *src + ) { - // yield ownership of managed obj reference - ::CORBA_PolicyCurrent_ptr val = this->ptr_; - this->ptr_ = ::CORBA_PolicyCurrent::_nil (); - return val; + CORBA_PolicyManager **tmp = + ACE_static_cast (CORBA_PolicyManager **, src); + return *tmp; } #endif /* end #if !defined */ -#if !defined (_CORBA_POLICYCURRENT___OUT_CI_) -#define _CORBA_POLICYCURRENT___OUT_CI_ - -// ************************************************************* -// Inline operations for class CORBA_PolicyCurrent_out -// ************************************************************* - -ACE_INLINE -CORBA_PolicyCurrent_out::CORBA_PolicyCurrent_out (CORBA_PolicyCurrent_ptr &p) - : ptr_ (p) -{ - this->ptr_ = ::CORBA_PolicyCurrent::_nil (); -} +#if !defined (_CORBA_POLICYCURRENT___CI_) +#define _CORBA_POLICYCURRENT___CI_ -ACE_INLINE -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 (); -} - -ACE_INLINE -CORBA_PolicyCurrent_out::CORBA_PolicyCurrent_out (const ::CORBA_PolicyCurrent_out &p) // copy constructor - : ptr_ (ACE_const_cast (CORBA_PolicyCurrent_out &, p).ptr_) -{} - -ACE_INLINE ::CORBA_PolicyCurrent_out & -CORBA_PolicyCurrent_out::operator= (const ::CORBA_PolicyCurrent_out &p) -{ - this->ptr_ = ACE_const_cast (CORBA_PolicyCurrent_out&, p).ptr_; - return *this; -} - -ACE_INLINE CORBA_PolicyCurrent_out & -CORBA_PolicyCurrent_out::operator= (const ::CORBA_PolicyCurrent_var &p) +ACE_INLINE CORBA_PolicyCurrent_ptr +tao_CORBA_PolicyCurrent_duplicate ( + CORBA_PolicyCurrent_ptr p + ) { - this->ptr_ = ::CORBA_PolicyCurrent::_duplicate (p.ptr ()); - return *this; + return CORBA_PolicyCurrent::_duplicate (p); } -ACE_INLINE CORBA_PolicyCurrent_out & -CORBA_PolicyCurrent_out::operator= (CORBA_PolicyCurrent_ptr p) +ACE_INLINE void +tao_CORBA_PolicyCurrent_release ( + CORBA_PolicyCurrent_ptr p + ) { - this->ptr_ = p; - return *this; + CORBA::release (p); } -ACE_INLINE -CORBA_PolicyCurrent_out::operator ::CORBA_PolicyCurrent_ptr &() // cast +ACE_INLINE CORBA_PolicyCurrent_ptr +tao_CORBA_PolicyCurrent_nil ( + void + ) { - return this->ptr_; + return CORBA_PolicyCurrent::_nil (); } -ACE_INLINE ::CORBA_PolicyCurrent_ptr & -CORBA_PolicyCurrent_out::ptr (void) // ptr +ACE_INLINE CORBA_PolicyCurrent_ptr +tao_CORBA_PolicyCurrent_narrow ( + CORBA::Object *p, + CORBA::Environment &ACE_TRY_ENV + ) { - return this->ptr_; + return CORBA_PolicyCurrent::_narrow (p, ACE_TRY_ENV); } -ACE_INLINE ::CORBA_PolicyCurrent_ptr -CORBA_PolicyCurrent_out::operator-> (void) +ACE_INLINE CORBA::Object * +tao_CORBA_PolicyCurrent_upcast ( + void *src + ) { - return this->ptr_; + CORBA_PolicyCurrent **tmp = + ACE_static_cast (CORBA_PolicyCurrent **, src); + return *tmp; } @@ -1594,55 +1234,16 @@ ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm,CORBA_InvalidPolicies & return 0; } -ACE_INLINE CORBA::Boolean -operator<< ( +CORBA::Boolean TAO_Export operator<< ( TAO_OutputCDR &, const CORBA_Policy_ptr ); -ACE_INLINE CORBA::Boolean -operator>> ( + +CORBA::Boolean TAO_Export operator>> ( TAO_InputCDR &, CORBA_Policy_ptr & ); -ACE_INLINE 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); -} - -ACE_INLINE 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; -} - #if !defined _TAO_CDR_OP_CORBA_PolicyList_I_ #define _TAO_CDR_OP_CORBA_PolicyList_I_ |