TAO_AnyTypeCode
2.0.8
|
CORBA::NVList implementation. More...
#include <NVList.h>
Public Types | |
typedef NVList_ptr | _ptr_type |
typedef NVList_var | _var_type |
typedef NVList_out | _out_type |
Public Member Functions | |
ULong | count (void) const |
return the current number of elements in the list | |
NamedValue_ptr | add (Flags) |
add an element and just initialize the flags | |
NamedValue_ptr | add_item (const char *, Flags) |
add an element and initialize its name and flags | |
NamedValue_ptr | add_value (const char *, const Any &, Flags) |
initializes a value, name, and flags | |
NamedValue_ptr | add_item_consume (char *, Flags) |
NamedValue_ptr | add_value_consume (char *, Any_ptr, Flags) |
NamedValue_ptr | item (ULong n) |
retrieve the item at the nth location. Raises Bounds | |
void | remove (ULong n) |
remove element at index n. Raises Bounds | |
ULong | _incr_refcount (void) |
ULong | _decr_refcount (void) |
void | _tao_incoming_cdr (TAO_InputCDR &cdr, int flag, bool &lazy_evaluation) |
void | _tao_encode (TAO_OutputCDR &cdr, int flag) |
void | _tao_decode (TAO_InputCDR &cdr, int flag) |
Decode the NVList arguments from the cdr stream. | |
ptrdiff_t | _tao_target_alignment (void) |
Boolean | _lazy_has_arguments (void) const |
Static Public Member Functions | |
static NVList * | _duplicate (NVList *) |
static NVList * | _nil (void) |
Protected Member Functions | |
~NVList (void) | |
Destructor. | |
Private Member Functions | |
NVList (void) | |
NamedValue_ptr | add_element (Flags) |
void | evaluate (void) |
Private Attributes | |
ACE_Unbounded_Queue < NamedValue_ptr > | values_ |
Internal list of parameters stored as NamedValues. | |
ULong | max_ |
Maximum length of list. | |
ACE_Atomic_Op< TAO_SYNCH_MUTEX, unsigned long > | refcount_ |
Reference counter. | |
TAO_SYNCH_MUTEX | lock_ |
Protects the incoming pointer. | |
TAO_InputCDR * | incoming_ |
int | incoming_flag_ |
Friends | |
class | ::TAO_NVList_Adapter_Impl |
class | Request |
CORBA::NVList implementation.
This is used in the (client side) DII (Dynamic Invocation Interface) to hold parameters, except for the return parameter. It's used in the same role in the (server side) DSI (Dynamic Skeleton Interface).
Each user (client, server) provides the typecode and memory for each parameter using an NVList, then talks to the ORB using a Request or ServerRequest pseudo-object. The ORB copies data to/from the IPC messages (e.g. IIOP::Request, IIOP::Response) as appropriate.
typedef NVList_out CORBA::NVList::_out_type |
typedef NVList_ptr CORBA::NVList::_ptr_type |
typedef NVList_var CORBA::NVList::_var_type |
CORBA::NVList::~NVList | ( | void | ) | [protected] |
Destructor.
Protected destructor to enforce proper memory management through the reference counting mechanism.
CORBA::NVList::NVList | ( | void | ) | [private] |
Constructor - cannot be instantiated directly other than through the CORBA::ORB::create_list method
CORBA::ULong CORBA::NVList::_decr_refcount | ( | void | ) |
CORBA::NVList * CORBA::NVList::_duplicate | ( | CORBA::NVList * | x | ) | [static] |
CORBA::ULong CORBA::NVList::_incr_refcount | ( | void | ) |
CORBA::Boolean CORBA::NVList::_lazy_has_arguments | ( | void | ) | const |
If this list is used by a DII request, this will tell us if our CDR stream contains any marshaled arguments (needed for GIOP 1.2).
CORBA::NVList * CORBA::NVList::_nil | ( | void | ) | [static] |
void CORBA::NVList::_tao_decode | ( | TAO_InputCDR & | cdr, |
int | flag | ||
) |
Decode the NVList arguments from the cdr stream.
void CORBA::NVList::_tao_encode | ( | TAO_OutputCDR & | cdr, |
int | flag | ||
) |
Encode the NVList into the CDR stream. flag masks the type of arguments (IN, OUT or INOUT) that are to be marshaled.
void CORBA::NVList::_tao_incoming_cdr | ( | TAO_InputCDR & | cdr, |
int | flag, | ||
bool & | lazy_evaluation | ||
) |
ptrdiff_t CORBA::NVList::_tao_target_alignment | ( | void | ) |
Return the required alignment to marshal the NVList without any re-alignment. It returns ACE_CDR::MAX_ALIGNMENT to indicate errors.
CORBA::NamedValue_ptr CORBA::NVList::add | ( | CORBA::Flags | flags | ) |
add an element and just initialize the flags
CORBA::NamedValue_ptr CORBA::NVList::add_element | ( | CORBA::Flags | flags | ) | [private] |
Helper to increase the list size. This is used by all the add_ methods of the NVList class
CORBA::NamedValue_ptr CORBA::NVList::add_item | ( | const char * | name, |
CORBA::Flags | flags | ||
) |
add an element and initialize its name and flags
CORBA::NamedValue_ptr CORBA::NVList::add_item_consume | ( | char * | name, |
CORBA::Flags | flags | ||
) |
just like add_item. In addition, memory management of char * name is taken over by the NVList
CORBA::NamedValue_ptr CORBA::NVList::add_value | ( | const char * | name, |
const Any & | value, | ||
CORBA::Flags | flags | ||
) |
initializes a value, name, and flags
CORBA::NamedValue_ptr CORBA::NVList::add_value_consume | ( | char * | , |
Any_ptr | , | ||
Flags | |||
) |
CORBA::ULong CORBA::NVList::count | ( | void | ) | const |
return the current number of elements in the list
void CORBA::NVList::evaluate | ( | void | ) | [private] |
Lazy evaluation routine to fill up the Anys in the NVList from the CDR stream.
CORBA::NamedValue_ptr CORBA::NVList::item | ( | CORBA::ULong | n | ) |
retrieve the item at the nth location. Raises Bounds
void CORBA::NVList::remove | ( | CORBA::ULong | n | ) |
remove element at index n. Raises Bounds
friend class ::TAO_NVList_Adapter_Impl [friend] |
friend class Request [friend] |
TAO_InputCDR* CORBA::NVList::incoming_ [private] |
When the NVList is used as part of a Server Request we can simply store the CDR buffer and perform lazy evaluation to compute the Anys.
int CORBA::NVList::incoming_flag_ [private] |
The flags used to check which parameters are actually extracted from the <incoming_> buffer
TAO_SYNCH_MUTEX CORBA::NVList::lock_ [private] |
Protects the incoming pointer.
ULong CORBA::NVList::max_ [private] |
Maximum length of list.
ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> CORBA::NVList::refcount_ [private] |
Reference counter.
Internal list of parameters stored as NamedValues.