The NVList class

An NVList contains an ordered set of NamedValues. The CORBA specification defines several operations that the NVList supports. The IDL prototypes for these methods are as follows:

// get the number of elements in the NVList
ORBStatus get_count(
                out  long count );

// add an element to an NVList
ORBStatus add_item(
                in  Identifier      item_name,
                in  TypeCode    item_type,
                in  void* value,
                in  Flags item_flags );

// frees the NVList and any associated memory
ORBStatus free();


// frees dynamically allocated memory associated with the list
ORBStatus free_memory();

In DSOM, the NVList is a full-fledged object with methods for getting and setting elements:

//set the contents of an element in an NVList
ORBStatus set_item(
                in  long            item_number, /* element # to set */
                in  Identifier      item_name,
                in  TypeCode        item_type,
                in  void*           item_value,
                in  long            value_len,
                in  Flags           item_flags );


// get the contents of an element in an NVList
ORBStatus get_item(
                in  long            item_number, /* element # to get */
                out Identifier      item_name,
                out TypeCode        item_type,
                out void*           item_value,
                out long            value_len,
                out Flags           item_flags );


[Back: The NamedValue structure]
[Next: Creating argument lists]