ExceptionList definition taken from CORBA v2.2 Feb 1998. More...
#include <ExceptionList.h>
Public Types | |
typedef CORBA::ExceptionList_ptr | _ptr_type |
Useful for template programming. | |
typedef CORBA::ExceptionList_var | _var_type |
typedef CORBA::ExceptionList_out | _out_type |
Public Member Functions | |
ExceptionList (void) | |
Constructor. | |
ExceptionList (CORBA::ULong len, CORBA::TypeCode_ptr *tc_list) | |
~ExceptionList (void) | |
Destructor. | |
CORBA::ULong | count (void) |
Return the number of elements. | |
ExceptionList_ptr | _duplicate (void) |
Increase the reference count. | |
void | _destroy (void) |
void | add (CORBA::TypeCode_ptr tc) |
Add a TypeCode to the list. | |
void | add_consume (CORBA::TypeCode_ptr tc) |
Add and consume a TypeCode to the list. | |
CORBA::TypeCode_ptr | item (CORBA::ULong slot) |
Return the typecode at slot i. Raises the "Bounds" exception. | |
void | remove (CORBA::ULong slot) |
Remove the typecode at slot i. Raises the "Bounds" exception. | |
void | _incr_refcnt (void) |
Increment and decrement ref counts. | |
void | _decr_refcnt (void) |
Static Public Member Functions | |
static ExceptionList_ptr | _duplicate (ExceptionList *) |
Increase the reference count in the spec defined manner. | |
static ExceptionList_ptr | _nil (void) |
Private Member Functions | |
ExceptionList (const ExceptionList &) | |
ExceptionList & | operator= (const ExceptionList &) |
Private Attributes | |
ACE_Atomic_Op< TAO_SYNCH_MUTEX, CORBA::ULong > | ref_count_ |
Reference counter. | |
ACE_Unbounded_Queue < CORBA::TypeCode_ptr > | tc_list_ |
Internal list of typecodes. |
ExceptionList definition taken from CORBA v2.2 Feb 1998.
Maintains a list of TypeCodes for Exceptions.
Definition at line 59 of file ExceptionList.h.
Definition at line 106 of file ExceptionList.h.
Useful for template programming.
Definition at line 104 of file ExceptionList.h.
Definition at line 105 of file ExceptionList.h.
CORBA::ExceptionList::ExceptionList | ( | void | ) |
CORBA::ExceptionList::ExceptionList | ( | CORBA::ULong | len, | |
CORBA::TypeCode_ptr * | tc_list | |||
) |
Constructor - initialize given a length and an array of TypeCodes.
Definition at line 16 of file ExceptionList.cpp.
: ref_count_ (1) { for (CORBA::ULong i = 0; i < len; ++i) { this->add (tc_list [i]); } }
CORBA::ExceptionList::~ExceptionList | ( | void | ) |
Destructor.
Definition at line 26 of file ExceptionList.cpp.
{ for (CORBA::ULong i = 0; i < this->count (); ++i) { CORBA::TypeCode_ptr *tc = 0; if (this->tc_list_.get (tc, i) == -1) { return; } ::CORBA::release (*tc); } }
CORBA::ExceptionList::ExceptionList | ( | const ExceptionList & | ) | [private] |
void CORBA::ExceptionList::_decr_refcnt | ( | void | ) |
Definition at line 94 of file ExceptionList.cpp.
{ CORBA::ULong const refcount = --this->ref_count_; if (refcount == 0) { delete this; } }
void CORBA::ExceptionList::_destroy | ( | void | ) |
Definition at line 82 of file ExceptionList.cpp.
{ this->_decr_refcnt (); }
CORBA::ExceptionList_ptr CORBA::ExceptionList::_duplicate | ( | void | ) |
Increase the reference count.
Definition at line 75 of file ExceptionList.cpp.
{ this->_incr_refcnt (); return this; }
static ExceptionList_ptr CORBA::ExceptionList::_duplicate | ( | ExceptionList * | ) | [static] |
Increase the reference count in the spec defined manner.
void CORBA::ExceptionList::_incr_refcnt | ( | void | ) |
Increment and decrement ref counts.
Definition at line 88 of file ExceptionList.cpp.
{ ++this->ref_count_; }
CORBA::ExceptionList_ptr CORBA::ExceptionList::_nil | ( | void | ) | [static] |
Definition at line 41 of file ExceptionList.inl.
{ return static_cast<CORBA::ExceptionList_ptr>(0); }
void CORBA::ExceptionList::add | ( | CORBA::TypeCode_ptr | tc | ) |
Add a TypeCode to the list.
Definition at line 42 of file ExceptionList.cpp.
{ this->tc_list_.enqueue_tail (CORBA::TypeCode::_duplicate (tc)); }
void CORBA::ExceptionList::add_consume | ( | CORBA::TypeCode_ptr | tc | ) |
Add and consume a TypeCode to the list.
Definition at line 48 of file ExceptionList.cpp.
{ this->tc_list_.enqueue_tail (tc); }
CORBA::ULong CORBA::ExceptionList::count | ( | void | ) |
Return the number of elements.
Definition at line 34 of file ExceptionList.inl.
{ return (CORBA::ULong) this->tc_list_.size (); }
CORBA::TypeCode_ptr CORBA::ExceptionList::item | ( | CORBA::ULong | slot | ) |
Return the typecode at slot i. Raises the "Bounds" exception.
Definition at line 54 of file ExceptionList.cpp.
{ CORBA::TypeCode_ptr *tc = 0; if (this->tc_list_.get (tc, slot) == -1) { throw ::CORBA::TypeCode::Bounds (); } else { return CORBA::TypeCode::_duplicate (*tc); } }
ExceptionList& CORBA::ExceptionList::operator= | ( | const ExceptionList & | ) | [private] |
void CORBA::ExceptionList::remove | ( | CORBA::ULong | slot | ) |
Remove the typecode at slot i. Raises the "Bounds" exception.
Definition at line 69 of file ExceptionList.cpp.
{ throw ::CORBA::NO_IMPLEMENT (); }
ACE_Atomic_Op<TAO_SYNCH_MUTEX, CORBA::ULong> CORBA::ExceptionList::ref_count_ [private] |
Reference counter.
Definition at line 114 of file ExceptionList.h.
Internal list of typecodes.
Definition at line 117 of file ExceptionList.h.