#include <Context.h>
Collaboration diagram for CORBA::ContextList:
Public Types | |
typedef CORBA::ContextList_ptr | _ptr_type |
typedef CORBA::ContextList_var | _var_type |
typedef CORBA::ContextList_out | _out_type |
Public Member Functions | |
ContextList (void) | |
Constructor. | |
ContextList (CORBA::ULong len, char **ctx_list) | |
~ContextList (void) | |
Destructor. | |
CORBA::ULong | count (void) |
Return the number of elements. | |
ContextList_ptr | _duplicate (void) |
Increment the reference count. | |
void | _destroy (void) |
Decrement the reference count and delete if it is 0. | |
void | add (char *ctx) |
Add a string to the list. | |
void | add_consume (char *ctx) |
Add and consume a string to the list. | |
char * | 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 | |
ContextList_ptr | _duplicate (ContextList *) |
Increment the reference count. | |
ContextList_ptr | _nil () |
Return null pointer of this type. | |
Private Member Functions | |
ContextList (const ContextList &) | |
ContextList & | operator= (const ContextList &) |
Private Attributes | |
ACE_Atomic_Op< TAO_SYNCH_MUTEX, CORBA::ULong > | ref_count_ |
Reference counter. | |
ACE_Unbounded_Queue< char * > | ctx_list_ |
Internal list of typecodes. |
Maintains a list of strings for Contexts.
Definition at line 127 of file Context.h.
|
|
|
|
|
|
|
Constructor.
Definition at line 67 of file Context.inl.
00068 { 00069 } |
|
Constructor - initialize given a length and an array of strings. Definition at line 92 of file Context.cpp. References add().
00093 : ref_count_ (1) 00094 { 00095 for (CORBA::ULong i=0; i < len; i++) 00096 { 00097 this->add (ctx_list [i]); 00098 } 00099 } |
|
Destructor.
Definition at line 101 of file Context.cpp. References count(), ctx_list_, ACE_Unbounded_Queue< char * >::get(), and CORBA::string_free().
00102 { 00103 for (CORBA::ULong i = 0; i < this->count (); ++i) 00104 { 00105 char **ctx = 0; 00106 00107 if (this->ctx_list_.get (ctx, i) == -1) 00108 { 00109 return; 00110 } 00111 00112 CORBA::string_free (*ctx); 00113 } 00114 } |
|
|
|
Definition at line 174 of file Context.cpp.
00175 { 00176 --this->ref_count_; 00177 00178 if (this->ref_count_ != 0) 00179 { 00180 delete this; 00181 } 00182 } |
|
Decrement the reference count and delete if it is 0.
Definition at line 157 of file Context.cpp.
00158 { 00159 CORBA::ULong const current = --this->ref_count_; 00160 00161 if (current == 0) 00162 { 00163 delete this; 00164 } 00165 } |
|
Increment the reference count.
|
|
Increment the reference count.
Definition at line 150 of file Context.cpp.
00151 { 00152 ++this->ref_count_; 00153 return this; 00154 } |
|
Increment and decrement ref counts.
Definition at line 168 of file Context.cpp.
00169 { 00170 ++this->ref_count_; 00171 } |
|
Return null pointer of this type.
Definition at line 80 of file Context.inl.
00081 {
00082 return (CORBA::ContextList_ptr)0;
00083 }
|
|
Add a string to the list.
Definition at line 117 of file Context.cpp. References ctx_list_, and ACE_Unbounded_Queue< char * >::enqueue_tail(). Referenced by ContextList().
00118 { 00119 this->ctx_list_.enqueue_tail (CORBA::string_dup (ctx)); 00120 } |
|
Add and consume a string to the list.
Definition at line 123 of file Context.cpp. References ctx_list_, and ACE_Unbounded_Queue< char * >::enqueue_tail().
00124 { 00125 this->ctx_list_.enqueue_tail (ctx); 00126 } |
|
Return the number of elements.
Definition at line 73 of file Context.inl. References ctx_list_, and ACE_Unbounded_Queue< char * >::size(). Referenced by ~ContextList().
|
|
Return the typecode at slot i. Raises the "Bounds" exception.
Definition at line 129 of file Context.cpp. References ctx_list_, ACE_Unbounded_Queue< char * >::get(), and CORBA::string_dup().
00130 { 00131 char **ctx = 0; 00132 00133 if (this->ctx_list_.get (ctx, slot) == -1) 00134 { 00135 throw ::CORBA::TypeCode::Bounds (); 00136 } 00137 else 00138 { 00139 return CORBA::string_dup (*ctx); 00140 } 00141 } |
|
|
|
Remove the typecode at slot i. Raises the "Bounds" exception.
Definition at line 144 of file Context.cpp.
00145 { 00146 throw ::CORBA::NO_IMPLEMENT (); 00147 } |
|
Internal list of typecodes.
Definition at line 185 of file Context.h. Referenced by add(), add_consume(), count(), item(), and ~ContextList(). |
|
Reference counter.
|