2-57
DSOM Framework Reference
get_item Method
Purpose
Returns the contents of a specified list item.
IDL Syntax
ORBStatus get_item (
in long item_number,
out Identifier item_name,
out TypeCode item_type,
out void* value,
out long value_len,
out Flags item_flags);
Description
The get_item method gets an item from the specified list. Items are numbered from 0
through N. The mode flags can be one of the following values:
The get_item method transfers ownership of storage allocated for the item value to the
caller.
Parameters
receiver A pointer to an NVList object.
env A pointer to the Environment structure for the method caller.
item_number The position (index) of the item in the list. The item_number ranges from 0
to n–1, where n is the total number of items in the list.
item_name A pointer to where the name of the item should be returned.
item_type A pointer to where the data type of the item should be returned.
value A pointer to where a pointer to the value of the item should be returned.
value_len A pointer to where the length of the item value should be returned.
item_flags A Flags bitmask (unsigned long). The item_flags can be one of the
following values indicating parameter direction.
ARG_IN The argument is input only.
ARG_OUT The argument is output only.
ARG_INOUT The argument is input/output.
In addition, item_flags can have the following values:
IN_COPY_VALUE
Indicates a copy of the argument is contained and used by
the NVList.
DEPENDENT_LIST
Indicates that a specified sublist must be freed when the
parent list is freed.
Return Value
The get_item method returns 0 for success, or a DSOM error code for failure (often
because item_number+1 exceeds the number of items in the list).
Comentários a estes Manuais