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 64 of file ExceptionList.h.


Member Typedef Documentation

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

Definition at line 114 of file ExceptionList.h.

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

Useful for template programming.

Definition at line 112 of file ExceptionList.h.

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

Definition at line 113 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 17 of file ExceptionList.cpp.

References add().

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

CORBA::ExceptionList::~ExceptionList void   ) 
 

Destructor.

Definition at line 27 of file ExceptionList.cpp.

References count(), and tc_list_.

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

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


Member Function Documentation

void CORBA::ExceptionList::_decr_refcnt void   ) 
 

Definition at line 98 of file ExceptionList.cpp.

Referenced by _destroy().

00099 {
00100   CORBA::ULong refcount = --this->ref_count_;
00101 
00102   if (refcount == 0)
00103     {
00104       delete this;
00105     }
00106 }

void CORBA::ExceptionList::_destroy void   ) 
 

Definition at line 86 of file ExceptionList.cpp.

References _decr_refcnt().

00087 {
00088   this->_decr_refcnt ();
00089 }

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 79 of file ExceptionList.cpp.

References _incr_refcnt().

00080 {
00081   this->_incr_refcnt ();
00082   return this;
00083 }

void CORBA::ExceptionList::_incr_refcnt void   ) 
 

Increment and decrement ref counts.

Definition at line 92 of file ExceptionList.cpp.

Referenced by _duplicate().

00093 {
00094   ++this->ref_count_;
00095 }

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

Definition at line 41 of file ExceptionList.inl.

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

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

Add a TypeCode to the list.

Definition at line 43 of file ExceptionList.cpp.

References tc_list_.

Referenced by ExceptionList().

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

void CORBA::ExceptionList::add_consume CORBA::TypeCode_ptr  tc  ) 
 

Add and consume a TypeCode to the list.

Definition at line 49 of file ExceptionList.cpp.

References tc_list_.

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

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 ~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 55 of file ExceptionList.cpp.

References ACE_THROW_RETURN, and tc_list_.

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

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 72 of file ExceptionList.cpp.

References ACE_THROW.

00074 {
00075   ACE_THROW (CORBA::NO_IMPLEMENT ());
00076 }


Member Data Documentation

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

Reference counter.

Definition at line 122 of file ExceptionList.h.

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

Internal list of typecodes.

Definition at line 125 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 Thu Nov 9 13:05:07 2006 for TAO_DynamicInterface by doxygen 1.3.6