#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 136 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 107 of file Context.cpp. References add().
00109 : ref_count_ (1) 00110 { 00111 for (CORBA::ULong i=0; i < len; i++) 00112 { 00113 this->add (ctx_list [i]); 00114 } 00115 } |
|
Destructor.
Definition at line 117 of file Context.cpp. References count(), ctx_list_, ACE_Unbounded_Queue< char * >::get(), and CORBA::string_free().
00118 { 00119 for (CORBA::ULong i = 0; i < this->count (); ++i) 00120 { 00121 char **ctx; 00122 00123 if (this->ctx_list_.get (ctx, i) == -1) 00124 { 00125 return; 00126 } 00127 00128 CORBA::string_free (*ctx); 00129 } 00130 } |
|
|
|
Definition at line 193 of file Context.cpp.
00194 { 00195 this->ref_count_--; 00196 00197 if (this->ref_count_ != 0) 00198 { 00199 delete this; 00200 } 00201 } |
|
Decrement the reference count and delete if it is 0.
Definition at line 176 of file Context.cpp.
00177 { 00178 CORBA::ULong current = --this->ref_count_; 00179 00180 if (current == 0) 00181 { 00182 delete this; 00183 } 00184 } |
|
Increment the reference count.
|
|
Increment the reference count.
Definition at line 169 of file Context.cpp.
00170 { 00171 ++this->ref_count_; 00172 return this; 00173 } |
|
Increment and decrement ref counts.
Definition at line 187 of file Context.cpp.
00188 { 00189 this->ref_count_++; 00190 } |
|
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 133 of file Context.cpp. References ctx_list_, and ACE_Unbounded_Queue< char * >::enqueue_tail(). Referenced by ContextList().
00134 { 00135 this->ctx_list_.enqueue_tail (CORBA::string_dup (ctx)); 00136 } |
|
Add and consume a string to the list.
Definition at line 139 of file Context.cpp. References ctx_list_, and ACE_Unbounded_Queue< char * >::enqueue_tail().
00140 { 00141 this->ctx_list_.enqueue_tail (ctx); 00142 } |
|
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 145 of file Context.cpp. References ACE_THROW_RETURN, ctx_list_, ACE_Unbounded_Queue< char * >::get(), and CORBA::string_dup().
00147 { 00148 char **ctx = 0; 00149 00150 if (this->ctx_list_.get (ctx, slot) == -1) 00151 { 00152 ACE_THROW_RETURN (CORBA::TypeCode::Bounds (), 00153 0); 00154 } 00155 else 00156 { 00157 return CORBA::string_dup (*ctx); 00158 } 00159 } |
|
|
|
Remove the typecode at slot i. Raises the "Bounds" exception.
Definition at line 162 of file Context.cpp. References ACE_THROW.
00164 { 00165 ACE_THROW (CORBA::NO_IMPLEMENT ()); 00166 } |
|
Internal list of typecodes.
Definition at line 197 of file Context.h. Referenced by add(), add_consume(), count(), item(), and ~ContextList(). |
|
Reference counter.
|