CORBA::ExceptionList Class Reference

ExceptionList definition taken from CORBA v2.2 Feb 1998. More...

#include <ExceptionList.h>

List of all members.

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

ExceptionList_ptr _duplicate (ExceptionList *)
 Increase the reference count in the spec defined manner.

ExceptionList_ptr _nil (void)

Private Member Functions

 ExceptionList (const ExceptionList &)
ExceptionListoperator= (const ExceptionList &)

Private Attributes

ACE_Atomic_Op< TAO_SYNCH_MUTEX,
CORBA::ULong
ref_count_
 Reference counter.

ACE_Unbounded_Queue< CORBA::TypeCode_ptrtc_list_
 Internal list of typecodes.


Detailed Description

ExceptionList definition taken from CORBA v2.2 Feb 1998.

Maintains a list of TypeCodes for Exceptions.

Definition at line 59 of file ExceptionList.h.


Member Typedef Documentation

typedef CORBA::ExceptionList_out CORBA::ExceptionList::_out_type
 

Definition at line 106 of file ExceptionList.h.

typedef CORBA::ExceptionList_ptr CORBA::ExceptionList::_ptr_type
 

Useful for template programming.

Definition at line 104 of file ExceptionList.h.

typedef CORBA::ExceptionList_var CORBA::ExceptionList::_var_type
 

Definition at line 105 of file ExceptionList.h.


Constructor & Destructor Documentation

ACE_INLINE CORBA::ExceptionList::ExceptionList void   ) 
 

Constructor.

Definition at line 27 of file ExceptionList.inl.

00028   : ref_count_ (1)
00029 {
00030 }

TAO_BEGIN_VERSIONED_NAMESPACE_DECL 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.

References add().

00018   : ref_count_ (1)
00019 {
00020   for (CORBA::ULong i = 0; i < len; ++i)
00021     {
00022       this->add (tc_list [i]);
00023     }
00024 }

CORBA::ExceptionList::~ExceptionList void   ) 
 

Destructor.

Definition at line 26 of file ExceptionList.cpp.

References count(), and tc_list_.

00027 {
00028   for (CORBA::ULong i = 0; i < this->count (); ++i)
00029     {
00030       CORBA::TypeCode_ptr *tc = 0;
00031 
00032       if (this->tc_list_.get (tc, i) == -1)
00033         {
00034           return;
00035         }
00036 
00037       ::CORBA::release (*tc);
00038     }
00039 }

CORBA::ExceptionList::ExceptionList const ExceptionList  )  [private]
 


Member Function Documentation

void CORBA::ExceptionList::_decr_refcnt void   ) 
 

Definition at line 94 of file ExceptionList.cpp.

Referenced by _destroy().

00095 {
00096   CORBA::ULong const refcount = --this->ref_count_;
00097 
00098   if (refcount == 0)
00099     {
00100       delete this;
00101     }
00102 }

void CORBA::ExceptionList::_destroy void   ) 
 

Definition at line 82 of file ExceptionList.cpp.

References _decr_refcnt().

00083 {
00084   this->_decr_refcnt ();
00085 }

ExceptionList_ptr CORBA::ExceptionList::_duplicate ExceptionList  )  [static]
 

Increase the reference count in the spec defined manner.

CORBA::ExceptionList_ptr CORBA::ExceptionList::_duplicate void   ) 
 

Increase the reference count.

Definition at line 75 of file ExceptionList.cpp.

References _incr_refcnt().

00076 {
00077   this->_incr_refcnt ();
00078   return this;
00079 }

void CORBA::ExceptionList::_incr_refcnt void   ) 
 

Increment and decrement ref counts.

Definition at line 88 of file ExceptionList.cpp.

Referenced by _duplicate().

00089 {
00090   ++this->ref_count_;
00091 }

ACE_INLINE CORBA::ExceptionList_ptr CORBA::ExceptionList::_nil void   )  [static]
 

Definition at line 41 of file ExceptionList.inl.

00042 {
00043   return static_cast<CORBA::ExceptionList_ptr>(0);
00044 }

void CORBA::ExceptionList::add CORBA::TypeCode_ptr  tc  ) 
 

Add a TypeCode to the list.

Definition at line 42 of file ExceptionList.cpp.

References tc_list_.

Referenced by ExceptionList().

00043 {
00044   this->tc_list_.enqueue_tail (CORBA::TypeCode::_duplicate (tc));
00045 }

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.

References tc_list_.

00049 {
00050   this->tc_list_.enqueue_tail (tc);
00051 }

ACE_INLINE CORBA::ULong CORBA::ExceptionList::count void   ) 
 

Return the number of elements.

Definition at line 34 of file ExceptionList.inl.

References tc_list_.

Referenced by TAO::DII_Invocation::handle_user_exception(), and ~ExceptionList().

00035 {
00036   return (CORBA::ULong) this->tc_list_.size ();
00037 }

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.

References tc_list_.

Referenced by TAO::DII_Invocation::handle_user_exception().

00055 {
00056   CORBA::TypeCode_ptr *tc = 0;
00057 
00058   if (this->tc_list_.get (tc, slot) == -1)
00059     {
00060       throw ::CORBA::TypeCode::Bounds ();
00061     }
00062   else
00063     {
00064       return CORBA::TypeCode::_duplicate (*tc);
00065     }
00066 }

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.

00070 {
00071   throw ::CORBA::NO_IMPLEMENT ();
00072 }


Member Data Documentation

ACE_Atomic_Op<TAO_SYNCH_MUTEX, CORBA::ULong> CORBA::ExceptionList::ref_count_ [private]
 

Reference counter.

Definition at line 114 of file ExceptionList.h.

ACE_Unbounded_Queue<CORBA::TypeCode_ptr> CORBA::ExceptionList::tc_list_ [private]
 

Internal list of typecodes.

Definition at line 117 of file ExceptionList.h.

Referenced by add(), add_consume(), count(), item(), and ~ExceptionList().


The documentation for this class was generated from the following files:
Generated on Sun Jan 27 13:37:48 2008 for TAO_DynamicInterface by doxygen 1.3.6