diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-04-04 04:00:45 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-04-04 04:00:45 +0000 |
commit | 75199592fba5b7a9828bfcb400f0db57b38d7214 (patch) | |
tree | 81c992b953412f4bed23b92bf71a73c81fee5981 /TAO/tao/PolicyC.i | |
parent | 46e280e93bfa55ad35478770b2515b818f495438 (diff) | |
download | ATCD-75199592fba5b7a9828bfcb400f0db57b38d7214.tar.gz |
ChangeLogTag:Tue Apr 3 20:56:48 2001 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'TAO/tao/PolicyC.i')
-rw-r--r-- | TAO/tao/PolicyC.i | 525 |
1 files changed, 147 insertions, 378 deletions
diff --git a/TAO/tao/PolicyC.i b/TAO/tao/PolicyC.i index 95fa4a00726..1d4f91dcbf9 100644 --- a/TAO/tao/PolicyC.i +++ b/TAO/tao/PolicyC.i @@ -1,11 +1,23 @@ -/* -*- 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. +// -*- 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 +// http://www.cs.wustl.edu/~schmidt/TAO.html // ************************************************************* // Inline operations for exception CORBA_PolicyError @@ -17,7 +29,7 @@ #if !defined (TAO_USE_SEQUENCE_TEMPLATES) - + #if !defined (__TAO_UNBOUNDED_SEQUENCE_CORBA_INVALIDPOLICIES__TAO_SEQ_USHORT_CI_) #define __TAO_UNBOUNDED_SEQUENCE_CORBA_INVALIDPOLICIES__TAO_SEQ_USHORT_CI_ @@ -30,24 +42,24 @@ ACE_NEW_RETURN (retval, CORBA::UShort[size], 0); return retval; } - + ACE_INLINE void CORBA_InvalidPolicies::_TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort::freebuf (CORBA::UShort *buffer) // Free the sequence. { delete [] buffer; } - + ACE_INLINE CORBA_InvalidPolicies::_TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort::_TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort (void) // Default constructor. { } - + ACE_INLINE CORBA_InvalidPolicies::_TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort::_TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort (CORBA::ULong maximum) // Constructor using a maximum length value. : TAO_Unbounded_Base_Sequence (maximum, _TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort::allocbuf (maximum)) { } - + ACE_INLINE CORBA_InvalidPolicies::_TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort::_TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort (CORBA::ULong maximum, CORBA::ULong length, @@ -56,7 +68,7 @@ : TAO_Unbounded_Base_Sequence (maximum, length, data, release) { } - + ACE_INLINE CORBA_InvalidPolicies::_TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort::_TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort (const _TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort &rhs) // Copy constructor. @@ -66,10 +78,10 @@ { CORBA::UShort *tmp1 = _TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort::allocbuf (this->maximum_); CORBA::UShort * const tmp2 = ACE_reinterpret_cast (CORBA::UShort * ACE_CAST_CONST, rhs.buffer_); - + for (CORBA::ULong i = 0; i < this->length_; ++i) tmp1[i] = tmp2[i]; - + this->buffer_ = tmp1; } else @@ -77,14 +89,14 @@ this->buffer_ = 0; } } - + ACE_INLINE CORBA_InvalidPolicies::_TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort & CORBA_InvalidPolicies::_TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort::operator= (const _TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort &rhs) // Assignment operator. { if (this == &rhs) return *this; - + if (this->release_) { if (this->maximum_ < rhs.maximum_) @@ -97,18 +109,18 @@ } else this->buffer_ = _TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort::allocbuf (rhs.maximum_); - + TAO_Unbounded_Base_Sequence::operator= (rhs); - + CORBA::UShort *tmp1 = ACE_reinterpret_cast (CORBA::UShort *, this->buffer_); CORBA::UShort * const tmp2 = ACE_reinterpret_cast (CORBA::UShort * ACE_CAST_CONST, rhs.buffer_); - + for (CORBA::ULong i = 0; i < this->length_; ++i) tmp1[i] = tmp2[i]; - + return *this; } - + // = Accessors. ACE_INLINE CORBA::UShort & CORBA_InvalidPolicies::_TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort::operator[] (CORBA::ULong i) @@ -118,7 +130,7 @@ CORBA::UShort* tmp = ACE_reinterpret_cast(CORBA::UShort*,this->buffer_); return tmp[i]; } - + ACE_INLINE const CORBA::UShort & CORBA_InvalidPolicies::_TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort::operator[] (CORBA::ULong i) const // operator [] @@ -127,9 +139,9 @@ CORBA::UShort * const tmp = ACE_reinterpret_cast (CORBA::UShort* ACE_CAST_CONST, this->buffer_); return tmp[i]; } - + // Implement the TAO_Base_Sequence methods (see Sequence.h) - + ACE_INLINE CORBA::UShort * CORBA_InvalidPolicies::_TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort::get_buffer (CORBA::Boolean orphan) { @@ -163,13 +175,13 @@ } return result; } - + ACE_INLINE const CORBA::UShort * CORBA_InvalidPolicies::_TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort::get_buffer (void) const { return ACE_reinterpret_cast(const CORBA::UShort * ACE_CAST_CONST, this->buffer_); } - + ACE_INLINE void CORBA_InvalidPolicies::_TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort::replace (CORBA::ULong max, CORBA::ULong length, @@ -186,240 +198,28 @@ this->buffer_ = data; this->release_ = release; } - -#endif /* end #if !defined */ - - -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - -#if !defined (_CORBA_INVALIDPOLICIES__TAO_SEQ_USHORT_CI_) -#define _CORBA_INVALIDPOLICIES__TAO_SEQ_USHORT_CI_ - -// ************************************************************* -// Inline operations for class CORBA_InvalidPolicies::_tao_seq_UShort_var -// ************************************************************* - -ACE_INLINE -CORBA_InvalidPolicies::_tao_seq_UShort_var::_tao_seq_UShort_var (void) // default constructor - : ptr_ (0) -{} - -ACE_INLINE -CORBA_InvalidPolicies::_tao_seq_UShort_var::_tao_seq_UShort_var (_tao_seq_UShort *p) - : ptr_ (p) -{} - -ACE_INLINE -CORBA_InvalidPolicies::_tao_seq_UShort_var::_tao_seq_UShort_var (const ::CORBA_InvalidPolicies::_tao_seq_UShort_var &p) // copy constructor -{ - if (p.ptr_) - ACE_NEW (this->ptr_, ::CORBA_InvalidPolicies::_tao_seq_UShort (*p.ptr_)); - else - this->ptr_ = 0; -} - -// fixed-size base types only -ACE_INLINE -CORBA_InvalidPolicies::_tao_seq_UShort_var::_tao_seq_UShort_var (const ::CORBA_InvalidPolicies::_tao_seq_UShort &p) -{ - ACE_NEW (this->ptr_, ::CORBA_InvalidPolicies::_tao_seq_UShort (p)); -} - -ACE_INLINE -CORBA_InvalidPolicies::_tao_seq_UShort_var::~_tao_seq_UShort_var (void) // destructor -{ - delete this->ptr_; -} - -ACE_INLINE CORBA_InvalidPolicies::_tao_seq_UShort_var & -CORBA_InvalidPolicies::_tao_seq_UShort_var::operator= (_tao_seq_UShort *p) -{ - delete this->ptr_; - this->ptr_ = p; - return *this; -} - -ACE_INLINE CORBA_InvalidPolicies::_tao_seq_UShort_var & -CORBA_InvalidPolicies::_tao_seq_UShort_var::operator= (const ::CORBA_InvalidPolicies::_tao_seq_UShort_var &p) // deep copy -{ - if (this != &p) - { - if (p.ptr_ == 0) - { - delete this->ptr_; - this->ptr_ = 0; - } - else - { - CORBA_InvalidPolicies::_tao_seq_UShort *deep_copy = - new CORBA_InvalidPolicies::_tao_seq_UShort (*p.ptr_); - - if (deep_copy != 0) - { - CORBA_InvalidPolicies::_tao_seq_UShort *tmp = deep_copy; - deep_copy = this->ptr_; - this->ptr_ = tmp; - delete deep_copy; - } - } - } - return *this; -} - -// fixed-size types only -ACE_INLINE ::CORBA_InvalidPolicies::_tao_seq_UShort_var & -CORBA_InvalidPolicies::_tao_seq_UShort_var::operator= (const ::CORBA_InvalidPolicies::_tao_seq_UShort &p) -{ - if (this->ptr_ != &p) - { - delete this->ptr_; - ACE_NEW_RETURN (this->ptr_, ::CORBA_InvalidPolicies::_tao_seq_UShort (p), *this); - } - return *this; -} - -ACE_INLINE const ::CORBA_InvalidPolicies::_tao_seq_UShort * -CORBA_InvalidPolicies::_tao_seq_UShort_var::operator-> (void) const -{ - return this->ptr_; -} - -ACE_INLINE ::CORBA_InvalidPolicies::_tao_seq_UShort * -CORBA_InvalidPolicies::_tao_seq_UShort_var::operator-> (void) -{ - return this->ptr_; -} - -ACE_INLINE -CORBA_InvalidPolicies::_tao_seq_UShort_var::operator const ::CORBA_InvalidPolicies::_tao_seq_UShort &() const // cast -{ - return *this->ptr_; -} - -ACE_INLINE -CORBA_InvalidPolicies::_tao_seq_UShort_var::operator ::CORBA_InvalidPolicies::_tao_seq_UShort &() // cast -{ - return *this->ptr_; -} - -ACE_INLINE -CORBA_InvalidPolicies::_tao_seq_UShort_var::operator ::CORBA_InvalidPolicies::_tao_seq_UShort &() const // cast -{ - return *this->ptr_; -} - -ACE_INLINE CORBA::UShort & -CORBA_InvalidPolicies::_tao_seq_UShort_var::operator[] (CORBA::ULong index) -{ - return this->ptr_->operator[] (index); -} - -ACE_INLINE const ::CORBA_InvalidPolicies::_tao_seq_UShort & -CORBA_InvalidPolicies::_tao_seq_UShort_var::in (void) const -{ - return *this->ptr_; -} - -ACE_INLINE ::CORBA_InvalidPolicies::_tao_seq_UShort & -CORBA_InvalidPolicies::_tao_seq_UShort_var::inout (void) -{ - return *this->ptr_; -} - -// mapping for variable size -ACE_INLINE ::CORBA_InvalidPolicies::_tao_seq_UShort *& -CORBA_InvalidPolicies::_tao_seq_UShort_var::out (void) -{ - delete this->ptr_; - this->ptr_ = 0; - return this->ptr_; -} - -ACE_INLINE ::CORBA_InvalidPolicies::_tao_seq_UShort * -CORBA_InvalidPolicies::_tao_seq_UShort_var::_retn (void) -{ - ::CORBA_InvalidPolicies::_tao_seq_UShort *tmp = this->ptr_; - this->ptr_ = 0; - return tmp; -} - -ACE_INLINE ::CORBA_InvalidPolicies::_tao_seq_UShort * -CORBA_InvalidPolicies::_tao_seq_UShort_var::ptr (void) const -{ - return this->ptr_; -} - -// ************************************************************* -// Inline operations for class CORBA_InvalidPolicies::_tao_seq_UShort_out -// ************************************************************* - -ACE_INLINE -CORBA_InvalidPolicies::_tao_seq_UShort_out::_tao_seq_UShort_out (_tao_seq_UShort *&p) - : ptr_ (p) -{ - this->ptr_ = 0; -} +#endif /* end #if !defined */ -ACE_INLINE -CORBA_InvalidPolicies::_tao_seq_UShort_out::_tao_seq_UShort_out (_tao_seq_UShort_var &p) // constructor from _var - : ptr_ (p.out ()) -{ - delete this->ptr_; - this->ptr_ = 0; -} -ACE_INLINE -CORBA_InvalidPolicies::_tao_seq_UShort_out::_tao_seq_UShort_out (const ::CORBA_InvalidPolicies::_tao_seq_UShort_out &p) // copy constructor - : ptr_ (ACE_const_cast (_tao_seq_UShort_out&, p).ptr_) -{} +#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ -ACE_INLINE ::CORBA_InvalidPolicies::_tao_seq_UShort_out & -CORBA_InvalidPolicies::_tao_seq_UShort_out::operator= (const ::CORBA_InvalidPolicies::_tao_seq_UShort_out &p) -{ - this->ptr_ = ACE_const_cast (_tao_seq_UShort_out&, p).ptr_; - return *this; -} - -ACE_INLINE ::CORBA_InvalidPolicies::_tao_seq_UShort_out & -CORBA_InvalidPolicies::_tao_seq_UShort_out::operator= (_tao_seq_UShort *p) -{ - this->ptr_ = p; - return *this; -} +#if !defined (_CORBA_POLICY___CI_) +#define _CORBA_POLICY___CI_ ACE_INLINE -CORBA_InvalidPolicies::_tao_seq_UShort_out::operator ::CORBA_InvalidPolicies::_tao_seq_UShort *&() // cast -{ - return this->ptr_; -} - -ACE_INLINE ::CORBA_InvalidPolicies::_tao_seq_UShort *& -CORBA_InvalidPolicies::_tao_seq_UShort_out::ptr (void) // ptr -{ - return this->ptr_; -} - -ACE_INLINE ::CORBA_InvalidPolicies::_tao_seq_UShort * -CORBA_InvalidPolicies::_tao_seq_UShort_out::operator-> (void) -{ - return this->ptr_; -} - -ACE_INLINE CORBA::UShort & -CORBA_InvalidPolicies::_tao_seq_UShort_out::operator[] (CORBA::ULong index) +CORBA_Policy::CORBA_Policy ( + TAO_Stub *objref, + CORBA::Boolean _tao_collocated, + TAO_Abstract_ServantBase *servant + ) + : CORBA_Object (objref, _tao_collocated, servant) { - return this->ptr_->operator[] (index); + this->CORBA_Policy_setup_collocation (_tao_collocated); } - #endif /* end #if !defined */ -ACE_INLINE -CORBA_Policy::CORBA_Policy (TAO_Stub *objref, CORBA::Boolean _tao_collocated) // constructor - : CORBA_Object (objref, _tao_collocated) -{} - #if !defined (_CORBA_POLICY___VAR_CI_) #define _CORBA_POLICY___VAR_CI_ @@ -470,14 +270,14 @@ CORBA_Policy_var::operator= (const ::CORBA_Policy_var &p) return *this; } -ACE_INLINE +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 +ACE_INLINE +CORBA_Policy_var::operator ::CORBA_Policy_ptr &() // cast { return this->ptr_; } @@ -569,7 +369,7 @@ CORBA_Policy_out::operator= (CORBA_Policy_ptr p) return *this; } -ACE_INLINE +ACE_INLINE CORBA_Policy_out::operator ::CORBA_Policy_ptr &() // cast { return this->ptr_; @@ -592,7 +392,7 @@ CORBA_Policy_out::operator-> (void) #if !defined (TAO_USE_SEQUENCE_TEMPLATES) - + #if !defined (__TAO_UNBOUNDED_OBJECT_SEQUENCE_CORBA_POLICYLIST_CI_) #define __TAO_UNBOUNDED_OBJECT_SEQUENCE_CORBA_POLICYLIST_CI_ @@ -600,34 +400,34 @@ CORBA_Policy_out::operator-> (void) _TAO_Unbounded_Object_Sequence_CORBA_PolicyList::allocbuf (CORBA::ULong nelems) { CORBA_Policy **buf = 0; - + ACE_NEW_RETURN (buf, CORBA_Policy*[nelems], 0); - + for (CORBA::ULong i = 0; i < nelems; i++) buf[i] = CORBA_Policy::_nil (); - + return buf; } - - ACE_INLINE void + + ACE_INLINE void _TAO_Unbounded_Object_Sequence_CORBA_PolicyList::freebuf (CORBA_Policy **buffer) { if (buffer == 0) return; delete[] buffer; } - + ACE_INLINE _TAO_Unbounded_Object_Sequence_CORBA_PolicyList::_TAO_Unbounded_Object_Sequence_CORBA_PolicyList (void) { } - + ACE_INLINE _TAO_Unbounded_Object_Sequence_CORBA_PolicyList::_TAO_Unbounded_Object_Sequence_CORBA_PolicyList (CORBA::ULong maximum) : TAO_Unbounded_Base_Sequence (maximum, _TAO_Unbounded_Object_Sequence_CORBA_PolicyList::allocbuf (maximum)) { } - + ACE_INLINE _TAO_Unbounded_Object_Sequence_CORBA_PolicyList::_TAO_Unbounded_Object_Sequence_CORBA_PolicyList (CORBA::ULong maximum, CORBA::ULong length, @@ -636,7 +436,7 @@ CORBA_Policy_out::operator-> (void) : TAO_Unbounded_Base_Sequence (maximum, length, value, release) { } - + ACE_INLINE _TAO_Unbounded_Object_Sequence_CORBA_PolicyList::_TAO_Unbounded_Object_Sequence_CORBA_PolicyList(const _TAO_Unbounded_Object_Sequence_CORBA_PolicyList &rhs) : TAO_Unbounded_Base_Sequence (rhs) @@ -645,10 +445,10 @@ CORBA_Policy_out::operator-> (void) { CORBA_Policy **tmp1 = _TAO_Unbounded_Object_Sequence_CORBA_PolicyList::allocbuf (this->maximum_); 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]); - + this->buffer_ = tmp1; } else @@ -656,17 +456,17 @@ CORBA_Policy_out::operator-> (void) this->buffer_ = 0; } } - + ACE_INLINE _TAO_Unbounded_Object_Sequence_CORBA_PolicyList & _TAO_Unbounded_Object_Sequence_CORBA_PolicyList::operator= (const _TAO_Unbounded_Object_Sequence_CORBA_PolicyList &rhs) { if (this == &rhs) return *this; - + if (this->release_) { CORBA_Policy **tmp = ACE_reinterpret_cast (CORBA_Policy **, this->buffer_); - + for (CORBA::ULong i = 0; i < this->length_; ++i) { CORBA::release (tmp[i]); @@ -680,18 +480,18 @@ CORBA_Policy_out::operator-> (void) } else this->buffer_ = _TAO_Unbounded_Object_Sequence_CORBA_PolicyList::allocbuf (rhs.maximum_); - + TAO_Unbounded_Base_Sequence::operator= (rhs); - + CORBA_Policy **tmp1 = ACE_reinterpret_cast (CORBA_Policy **, this->buffer_); 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]); - + return *this; } - + ACE_INLINE TAO_Object_Manager<CORBA_Policy,CORBA_Policy_var> _TAO_Unbounded_Object_Sequence_CORBA_PolicyList::operator[] (CORBA::ULong index) const // read-write accessor @@ -700,7 +500,7 @@ CORBA_Policy_out::operator-> (void) CORBA_Policy ** const tmp = ACE_reinterpret_cast (CORBA_Policy ** ACE_CAST_CONST, this->buffer_); return TAO_Object_Manager<CORBA_Policy,CORBA_Policy_var> (tmp + index, this->release_); } - + ACE_INLINE CORBA_Policy* * _TAO_Unbounded_Object_Sequence_CORBA_PolicyList::get_buffer (CORBA::Boolean orphan) { @@ -734,18 +534,18 @@ CORBA_Policy_out::operator-> (void) } return result; } - + ACE_INLINE const CORBA_Policy* * _TAO_Unbounded_Object_Sequence_CORBA_PolicyList::get_buffer (void) const { return ACE_reinterpret_cast(const CORBA_Policy ** ACE_CAST_CONST, this->buffer_); } - - + + #endif /* end #if !defined */ -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ +#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ #if !defined (_CORBA_POLICYLIST_CI_) #define _CORBA_POLICYLIST_CI_ @@ -787,8 +587,8 @@ CORBA_PolicyList_var::operator= (CORBA_PolicyList *p) return *this; } -ACE_INLINE CORBA_PolicyList_var & -CORBA_PolicyList_var::operator= (const ::CORBA_PolicyList_var &p) // deep copy +ACE_INLINE ::CORBA_PolicyList_var & +CORBA_PolicyList_var::operator= (const ::CORBA_PolicyList_var &p) { if (this != &p) { @@ -799,7 +599,7 @@ CORBA_PolicyList_var::operator= (const ::CORBA_PolicyList_var &p) // deep copy } else { - CORBA_PolicyList *deep_copy = + CORBA_PolicyList *deep_copy = new CORBA_PolicyList (*p.ptr_); if (deep_copy != 0) @@ -827,27 +627,27 @@ CORBA_PolicyList_var::operator-> (void) return this->ptr_; } -ACE_INLINE +ACE_INLINE CORBA_PolicyList_var::operator const ::CORBA_PolicyList &() const // cast { return *this->ptr_; } -ACE_INLINE -CORBA_PolicyList_var::operator ::CORBA_PolicyList &() // cast +ACE_INLINE +CORBA_PolicyList_var::operator ::CORBA_PolicyList &() // cast { return *this->ptr_; } -ACE_INLINE -CORBA_PolicyList_var::operator ::CORBA_PolicyList &() const // cast +ACE_INLINE +CORBA_PolicyList_var::operator ::CORBA_PolicyList &() const // cast { return *this->ptr_; } // variable-size types only ACE_INLINE -CORBA_PolicyList_var::operator ::CORBA_PolicyList *&() // cast +CORBA_PolicyList_var::operator ::CORBA_PolicyList *&() // cast { return this->ptr_; } @@ -870,7 +670,7 @@ CORBA_PolicyList_var::inout (void) return *this->ptr_; } -// mapping for variable size +// mapping for variable size ACE_INLINE ::CORBA_PolicyList *& CORBA_PolicyList_var::out (void) { @@ -931,7 +731,7 @@ CORBA_PolicyList_out::operator= (CORBA_PolicyList *p) return *this; } -ACE_INLINE +ACE_INLINE CORBA_PolicyList_out::operator ::CORBA_PolicyList *&() // cast { return this->ptr_; @@ -960,7 +760,7 @@ CORBA_PolicyList_out::operator[] (CORBA::ULong index) #if !defined (TAO_USE_SEQUENCE_TEMPLATES) - + #if !defined (__TAO_UNBOUNDED_SEQUENCE_CORBA_POLICYTYPESEQ_CI_) #define __TAO_UNBOUNDED_SEQUENCE_CORBA_POLICYTYPESEQ_CI_ @@ -973,24 +773,24 @@ CORBA_PolicyList_out::operator[] (CORBA::ULong index) ACE_NEW_RETURN (retval, CORBA::ULong[size], 0); return retval; } - + ACE_INLINE void _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq::freebuf (CORBA::ULong *buffer) // Free the sequence. { delete [] buffer; } - + ACE_INLINE _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq::_TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq (void) // Default constructor. { } - + ACE_INLINE _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq::_TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq (CORBA::ULong maximum) // Constructor using a maximum length value. : TAO_Unbounded_Base_Sequence (maximum, _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq::allocbuf (maximum)) { } - + ACE_INLINE _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq::_TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq (CORBA::ULong maximum, CORBA::ULong length, @@ -999,7 +799,7 @@ CORBA_PolicyList_out::operator[] (CORBA::ULong index) : TAO_Unbounded_Base_Sequence (maximum, length, data, release) { } - + ACE_INLINE _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq::_TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq (const _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq &rhs) // Copy constructor. @@ -1009,10 +809,10 @@ CORBA_PolicyList_out::operator[] (CORBA::ULong index) { CORBA::ULong *tmp1 = _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq::allocbuf (this->maximum_); CORBA::ULong * const tmp2 = ACE_reinterpret_cast (CORBA::ULong * ACE_CAST_CONST, rhs.buffer_); - + for (CORBA::ULong i = 0; i < this->length_; ++i) tmp1[i] = tmp2[i]; - + this->buffer_ = tmp1; } else @@ -1020,14 +820,14 @@ CORBA_PolicyList_out::operator[] (CORBA::ULong index) this->buffer_ = 0; } } - + ACE_INLINE _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq & _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq::operator= (const _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq &rhs) // Assignment operator. { if (this == &rhs) return *this; - + if (this->release_) { if (this->maximum_ < rhs.maximum_) @@ -1040,18 +840,18 @@ CORBA_PolicyList_out::operator[] (CORBA::ULong index) } else this->buffer_ = _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq::allocbuf (rhs.maximum_); - + TAO_Unbounded_Base_Sequence::operator= (rhs); - + CORBA::ULong *tmp1 = ACE_reinterpret_cast (CORBA::ULong *, this->buffer_); CORBA::ULong * const tmp2 = ACE_reinterpret_cast (CORBA::ULong * ACE_CAST_CONST, rhs.buffer_); - + for (CORBA::ULong i = 0; i < this->length_; ++i) tmp1[i] = tmp2[i]; - + return *this; } - + // = Accessors. ACE_INLINE CORBA::ULong & _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq::operator[] (CORBA::ULong i) @@ -1061,7 +861,7 @@ CORBA_PolicyList_out::operator[] (CORBA::ULong index) CORBA::ULong* tmp = ACE_reinterpret_cast(CORBA::ULong*,this->buffer_); return tmp[i]; } - + ACE_INLINE const CORBA::ULong & _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq::operator[] (CORBA::ULong i) const // operator [] @@ -1070,9 +870,9 @@ CORBA_PolicyList_out::operator[] (CORBA::ULong index) CORBA::ULong * const tmp = ACE_reinterpret_cast (CORBA::ULong* ACE_CAST_CONST, this->buffer_); return tmp[i]; } - + // Implement the TAO_Base_Sequence methods (see Sequence.h) - + ACE_INLINE CORBA::ULong * _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq::get_buffer (CORBA::Boolean orphan) { @@ -1106,13 +906,13 @@ CORBA_PolicyList_out::operator[] (CORBA::ULong index) } return result; } - + ACE_INLINE const CORBA::ULong * _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq::get_buffer (void) const { return ACE_reinterpret_cast(const CORBA::ULong * ACE_CAST_CONST, this->buffer_); } - + ACE_INLINE void _TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq::replace (CORBA::ULong max, CORBA::ULong length, @@ -1129,11 +929,11 @@ CORBA_PolicyList_out::operator[] (CORBA::ULong index) this->buffer_ = data; this->release_ = release; } - + #endif /* end #if !defined */ -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ +#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ #if !defined (_CORBA_POLICYTYPESEQ_CI_) #define _CORBA_POLICYTYPESEQ_CI_ @@ -1182,8 +982,8 @@ CORBA_PolicyTypeSeq_var::operator= (CORBA_PolicyTypeSeq *p) return *this; } -ACE_INLINE CORBA_PolicyTypeSeq_var & -CORBA_PolicyTypeSeq_var::operator= (const ::CORBA_PolicyTypeSeq_var &p) // deep copy +ACE_INLINE ::CORBA_PolicyTypeSeq_var & +CORBA_PolicyTypeSeq_var::operator= (const ::CORBA_PolicyTypeSeq_var &p) { if (this != &p) { @@ -1194,7 +994,7 @@ CORBA_PolicyTypeSeq_var::operator= (const ::CORBA_PolicyTypeSeq_var &p) // deep } else { - CORBA_PolicyTypeSeq *deep_copy = + CORBA_PolicyTypeSeq *deep_copy = new CORBA_PolicyTypeSeq (*p.ptr_); if (deep_copy != 0) @@ -1234,20 +1034,20 @@ CORBA_PolicyTypeSeq_var::operator-> (void) return this->ptr_; } -ACE_INLINE +ACE_INLINE CORBA_PolicyTypeSeq_var::operator const ::CORBA_PolicyTypeSeq &() const // cast { return *this->ptr_; } -ACE_INLINE -CORBA_PolicyTypeSeq_var::operator ::CORBA_PolicyTypeSeq &() // cast +ACE_INLINE +CORBA_PolicyTypeSeq_var::operator ::CORBA_PolicyTypeSeq &() // cast { return *this->ptr_; } -ACE_INLINE -CORBA_PolicyTypeSeq_var::operator ::CORBA_PolicyTypeSeq &() const // cast +ACE_INLINE +CORBA_PolicyTypeSeq_var::operator ::CORBA_PolicyTypeSeq &() const // cast { return *this->ptr_; } @@ -1258,6 +1058,12 @@ CORBA_PolicyTypeSeq_var::operator[] (CORBA::ULong index) return this->ptr_->operator[] (index); } +ACE_INLINE const CORBA::PolicyType & +CORBA_PolicyTypeSeq_var::operator[] (CORBA::ULong index) const +{ + return ACE_const_cast (const CORBA::PolicyType &, this->ptr_->operator[] (index)); +} + ACE_INLINE const ::CORBA_PolicyTypeSeq & CORBA_PolicyTypeSeq_var::in (void) const { @@ -1270,7 +1076,7 @@ CORBA_PolicyTypeSeq_var::inout (void) return *this->ptr_; } -// mapping for variable size +// mapping for variable size ACE_INLINE ::CORBA_PolicyTypeSeq *& CORBA_PolicyTypeSeq_var::out (void) { @@ -1331,7 +1137,7 @@ CORBA_PolicyTypeSeq_out::operator= (CORBA_PolicyTypeSeq *p) return *this; } -ACE_INLINE +ACE_INLINE CORBA_PolicyTypeSeq_out::operator ::CORBA_PolicyTypeSeq *&() // cast { return this->ptr_; @@ -1408,14 +1214,14 @@ CORBA_PolicyManager_var::operator= (const ::CORBA_PolicyManager_var &p) return *this; } -ACE_INLINE +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 +ACE_INLINE +CORBA_PolicyManager_var::operator ::CORBA_PolicyManager_ptr &() // cast { return this->ptr_; } @@ -1507,7 +1313,7 @@ CORBA_PolicyManager_out::operator= (CORBA_PolicyManager_ptr p) return *this; } -ACE_INLINE +ACE_INLINE CORBA_PolicyManager_out::operator ::CORBA_PolicyManager_ptr &() // cast { return this->ptr_; @@ -1578,14 +1384,14 @@ CORBA_PolicyCurrent_var::operator= (const ::CORBA_PolicyCurrent_var &p) return *this; } -ACE_INLINE +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 +ACE_INLINE +CORBA_PolicyCurrent_var::operator ::CORBA_PolicyCurrent_ptr &() // cast { return this->ptr_; } @@ -1677,7 +1483,7 @@ CORBA_PolicyCurrent_out::operator= (CORBA_PolicyCurrent_ptr p) return *this; } -ACE_INLINE +ACE_INLINE CORBA_PolicyCurrent_out::operator ::CORBA_PolicyCurrent_ptr &() // cast { return this->ptr_; @@ -1700,19 +1506,21 @@ CORBA_PolicyCurrent_out::operator-> (void) ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, const CORBA::SetOverrideType &_tao_enumval) { - return strm.write_ulong ((CORBA::ULong) _tao_enumval); + CORBA::ULong _tao_temp = _tao_enumval; + return strm << _tao_temp; } ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm, CORBA::SetOverrideType &_tao_enumval) { - CORBA::ULong _tao_temp; - if (strm.read_ulong (_tao_temp)) - { - ACE_OS::memcpy (&_tao_enumval, &_tao_temp, sizeof (CORBA::ULong)); - return 1; - } - else - return 0; + CORBA::ULong _tao_temp = 0; + CORBA::Boolean _tao_result = strm >> _tao_temp; + + if (_tao_result == 1) + { + _tao_enumval = ACE_static_cast (CORBA::SetOverrideType, _tao_temp); + } + + return _tao_result; } ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, const CORBA_PolicyError &_tao_aggregate) @@ -1743,26 +1551,6 @@ ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm,CORBA_PolicyError &_tao return 0; } -#if !defined (ACE_LACKS_IOSTREAM_TOTALLY) - -ACE_INLINE -ostream & operator<< (ostream &os, const CORBA_PolicyError &_tao_aggregate) -{ - CORBA::TypeCode_ptr tc = _tao_aggregate._type (); - if (tc) - { - os << tc->name () << " ("; - } - os << _tao_aggregate._id (); - if (tc) - { - os << ")"; - } - return os; -} - -#endif /* ACE_LACKS_IOSTREAM_TOTALLY */ - #if !defined _TAO_CDR_OP_CORBA_InvalidPolicies__tao_seq_UShort_I_ #define _TAO_CDR_OP_CORBA_InvalidPolicies__tao_seq_UShort_I_ @@ -1806,26 +1594,6 @@ ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm,CORBA_InvalidPolicies & return 0; } -#if !defined (ACE_LACKS_IOSTREAM_TOTALLY) - -ACE_INLINE -ostream & operator<< (ostream &os, const CORBA_InvalidPolicies &_tao_aggregate) -{ - CORBA::TypeCode_ptr tc = _tao_aggregate._type (); - if (tc) - { - os << tc->name () << " ("; - } - os << _tao_aggregate._id (); - if (tc) - { - os << ")"; - } - return os; -} - -#endif /* ACE_LACKS_IOSTREAM_TOTALLY */ - ACE_INLINE CORBA::Boolean operator<< ( TAO_OutputCDR &, @@ -1904,3 +1672,4 @@ CORBA::Boolean TAO_Export operator>> ( ); #endif /* _TAO_CDR_OP_CORBA_PolicyTypeSeq_I_ */ + |