ContextList definition taken from CORBA v2.3a Dec 1998. More...
#include <Context.h>

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 | |
| static ContextList_ptr | _duplicate (ContextList *) |
| Increment the reference count. | |
| static 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. | |
ContextList definition taken from CORBA v2.3a Dec 1998.
Maintains a list of strings for Contexts.
Definition at line 125 of file Context.h.
| CORBA::ContextList::ContextList | ( | void | ) |
| CORBA::ContextList::ContextList | ( | CORBA::ULong | len, | |
| char ** | ctx_list | |||
| ) |
Constructor - initialize given a length and an array of strings.
Definition at line 92 of file Context.cpp.
: ref_count_ (1) { for (CORBA::ULong i=0; i < len; i++) { this->add (ctx_list [i]); } }
| CORBA::ContextList::~ContextList | ( | void | ) |
Destructor.
Definition at line 101 of file Context.cpp.
{
for (CORBA::ULong i = 0; i < this->count (); ++i)
{
char **ctx = 0;
if (this->ctx_list_.get (ctx, i) == -1)
{
return;
}
CORBA::string_free (*ctx);
}
}
| CORBA::ContextList::ContextList | ( | const ContextList & | ) | [private] |
| void CORBA::ContextList::_decr_refcnt | ( | void | ) |
Definition at line 174 of file Context.cpp.
{
--this->ref_count_;
if (this->ref_count_ != 0)
{
delete this;
}
}
| void CORBA::ContextList::_destroy | ( | void | ) |
Decrement the reference count and delete if it is 0.
Definition at line 157 of file Context.cpp.
{
CORBA::ULong const current = --this->ref_count_;
if (current == 0)
{
delete this;
}
}
| CORBA::ContextList_ptr CORBA::ContextList::_duplicate | ( | void | ) |
Increment the reference count.
Definition at line 150 of file Context.cpp.
{
++this->ref_count_;
return this;
}
| static ContextList_ptr CORBA::ContextList::_duplicate | ( | ContextList * | ) | [static] |
Increment the reference count.
| void CORBA::ContextList::_incr_refcnt | ( | void | ) |
Increment and decrement ref counts.
Definition at line 168 of file Context.cpp.
{
++this->ref_count_;
}
| CORBA::ContextList_ptr CORBA::ContextList::_nil | ( | void | ) | [static] |
Return null pointer of this type.
Definition at line 80 of file Context.inl.
{
return (CORBA::ContextList_ptr)0;
}
| void CORBA::ContextList::add | ( | char * | ctx | ) |
Add a string to the list.
Definition at line 117 of file Context.cpp.
{
this->ctx_list_.enqueue_tail (CORBA::string_dup (ctx));
}
| void CORBA::ContextList::add_consume | ( | char * | ctx | ) |
Add and consume a string to the list.
Definition at line 123 of file Context.cpp.
{
this->ctx_list_.enqueue_tail (ctx);
}
| CORBA::ULong CORBA::ContextList::count | ( | void | ) |
Return the number of elements.
Definition at line 73 of file Context.inl.
{
return (CORBA::ULong) this->ctx_list_.size ();
}
| char * CORBA::ContextList::item | ( | CORBA::ULong | slot | ) |
Return the typecode at slot i. Raises the "Bounds" exception.
Definition at line 129 of file Context.cpp.
{
char **ctx = 0;
if (this->ctx_list_.get (ctx, slot) == -1)
{
throw ::CORBA::TypeCode::Bounds ();
}
else
{
return CORBA::string_dup (*ctx);
}
}
| ContextList& CORBA::ContextList::operator= | ( | const ContextList & | ) | [private] |
| void CORBA::ContextList::remove | ( | CORBA::ULong | slot | ) |
Remove the typecode at slot i. Raises the "Bounds" exception.
Definition at line 144 of file Context.cpp.
{
throw ::CORBA::NO_IMPLEMENT ();
}
ACE_Unbounded_Queue<char *> CORBA::ContextList::ctx_list_ [private] |
ACE_Atomic_Op<TAO_SYNCH_MUTEX, CORBA::ULong> CORBA::ContextList::ref_count_ [private] |
1.7.0