Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

CORBA_NVList Class Reference

NVList ... 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). More...

#include <NVList.h>

Collaboration diagram for CORBA_NVList:

Collaboration graph
[legend]
List of all members.

Public Types

typedef CORBA_NVList_ptr _ptr_type
typedef CORBA_NVList_var _var_type

Public Methods

 ~CORBA_NVList (void)
 destructor.

CORBA::ULong count (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) const
 return the current number of elements in the list.

CORBA_NamedValue_ptr add (CORBA::Flags, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ())
 add an element and just initialize the flags.

CORBA_NamedValue_ptr add_item (const char *, CORBA::Flags, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ())
 add an element and initialize its name and flags.

CORBA_NamedValue_ptr add_value (const char *, const CORBA::Any &, CORBA::Flags, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ())
 initializes a value, name, and flags.

CORBA_NamedValue_ptr add_item_consume (char *, CORBA::Flags, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ())
 just like add_item. In addition, memory management of char * name is taken over by the NVList.

CORBA_NamedValue_ptr add_value_consume (char *, CORBA::Any_ptr, CORBA::Flags, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ())
 just like add_value. In addition, the NVList controls the memory management of the char *name and Any *value parameter.

CORBA_NamedValue_ptr item (CORBA::ULong n, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ())
 retrieve the item at the nth location. Raises Bounds.

void remove (CORBA::ULong n, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ())
 remove element at index n. Raises Bounds.

CORBA::ULong _incr_refcnt (void)
CORBA::ULong _decr_refcnt (void)
void _tao_incoming_cdr (TAO_InputCDR &cdr, int flag, int &lazy_evaluation, CORBA::Environment &ACE_TRY_ENV)
void _tao_encode (TAO_OutputCDR &cdr, TAO_ORB_Core *orb_core, int flag, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ())
 Encode the NVList into the CDR stream. <flag> masks the type of arguments (IN, OUT or INOUT) that are to be marshaled.

void _tao_decode (TAO_InputCDR &cdr, int flag, CORBA::Environment &ACE_TRY_ENV)
 Decode the NVList arguments from the <cdr> stream.

ptr_arith_t _tao_target_alignment (void)
CORBA::Boolean _lazy_has_arguments (void) const

Static Public Methods

CORBA_NVList* _duplicate (CORBA_NVList*)
CORBA_NVList* _nil (void)

Private Methods

 CORBA_NVList (void)
 constructor - cannot be instantiated directly other than through the ORB::create_list method.

CORBA_NamedValue_ptr add_element (CORBA::Flags, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ())
 helper to increase the list size. This is used by all the add_ methods of the NVList class.

void evaluate (CORBA::Environment &ACE_TRY_ENV)
 Lazy evaluation routine to fill up the Anys in the NVList from the CDR stream.


Private Attributes

ACE_Unbounded_Queue<CORBA_NamedValue_ptrvalues_
 internal list of parameters stored as NamedValues.

CORBA::ULong max_
 maximum length of list.

CORBA::ULong refcount_
 maintains how many references exist to this object.

TAO_SYNCH_MUTEX refcount_lock_
 Protects the reference count.

TAO_InputCDRincoming_
int incoming_flag_
 The flags used to check which parameters are actually extracted from the <incoming_> buffer.


Friends

class  CORBA_ORB
class  CORBA_Request

Detailed Description

NVList ... 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.


Member Typedef Documentation

typedef CORBA_NVList_ptr CORBA_NVList::_ptr_type
 

typedef CORBA_NVList_var CORBA_NVList::_var_type
 


Constructor & Destructor Documentation

CORBA_NVList::~CORBA_NVList ( void )
 

destructor.

ACE_INLINE CORBA_NVList::CORBA_NVList ( void ) [private]
 

constructor - cannot be instantiated directly other than through the ORB::create_list method.


Member Function Documentation

CORBA::ULong CORBA_NVList::_decr_refcnt ( void )
 

ACE_INLINE CORBA_NVList * CORBA_NVList::_duplicate ( CORBA_NVList * x ) [static]
 

CORBA::ULong CORBA_NVList::_incr_refcnt ( 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).

ACE_INLINE CORBA_NVList * CORBA_NVList::_nil ( void ) [static]
 

void CORBA_NVList::_tao_decode ( TAO_InputCDR & cdr,
int flag,
CORBA::Environment & ACE_TRY_ENV )
 

Decode the NVList arguments from the <cdr> stream.

void CORBA_NVList::_tao_encode ( TAO_OutputCDR & cdr,
TAO_ORB_Core * orb_core,
int flag,
CORBA::Environment & ACE_TRY_ENV = TAO_default_environment () )
 

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,
int & lazy_evaluation,
CORBA::Environment & ACE_TRY_ENV )
 

Set the incoming CDR stream, this is used by TAO to perform lazy evaluation of the NVList in an incoming ServerRequest. The <flag> is used to check which parameters (IN, OUT and/or INOUT) are to be extracted

ptr_arith_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,
CORBA_Environment & ACE_TRY_ENV = TAO_default_environment () )
 

add an element and just initialize the flags.

CORBA_NamedValue_ptr CORBA_NVList::add_element ( CORBA::Flags,
CORBA_Environment & ACE_TRY_ENV = TAO_default_environment () ) [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 *,
CORBA::Flags,
CORBA_Environment & ACE_TRY_ENV = TAO_default_environment () )
 

add an element and initialize its name and flags.

CORBA_NamedValue_ptr CORBA_NVList::add_item_consume ( char *,
CORBA::Flags,
CORBA_Environment & ACE_TRY_ENV = TAO_default_environment () )
 

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 *,
const CORBA::Any &,
CORBA::Flags,
CORBA_Environment & ACE_TRY_ENV = TAO_default_environment () )
 

initializes a value, name, and flags.

CORBA_NamedValue_ptr CORBA_NVList::add_value_consume ( char *,
CORBA::Any_ptr,
CORBA::Flags,
CORBA_Environment & ACE_TRY_ENV = TAO_default_environment () )
 

just like add_value. In addition, the NVList controls the memory management of the char *name and Any *value parameter.

ACE_INLINE CORBA::ULong CORBA_NVList::count ( CORBA_Environment & ACE_TRY_ENV = TAO_default_environment () ) const
 

return the current number of elements in the list.

void CORBA_NVList::evaluate ( CORBA::Environment & ACE_TRY_ENV ) [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,
CORBA_Environment & ACE_TRY_ENV = TAO_default_environment () )
 

retrieve the item at the nth location. Raises Bounds.

void CORBA_NVList::remove ( CORBA::ULong n,
CORBA_Environment & ACE_TRY_ENV = TAO_default_environment () )
 

remove element at index n. Raises Bounds.


Friends And Related Function Documentation

class CORBA_ORB [friend]
 

class CORBA_Request [friend]
 


Member Data Documentation

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.

CORBA::ULong CORBA_NVList::max_ [private]
 

maximum length of list.

CORBA::ULong CORBA_NVList::refcount_ [private]
 

maintains how many references exist to this object.

TAO_SYNCH_MUTEX CORBA_NVList::refcount_lock_ [private]
 

Protects the reference count.

ACE_Unbounded_Queue< CORBA_NamedValue_ptr > CORBA_NVList::values_ [private]
 

internal list of parameters stored as NamedValues.


The documentation for this class was generated from the following files:
Generated at Wed Nov 21 11:42:05 2001 for TAO by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000