Overview | The members read and write operations provide for the access and update of the list of elements of an OMG IDL enumeration definition (EnumDef) in the Interface Repository. |
Original interface | CORBA module: EnumDef Interface |
Exceptions | CORBA::SystemException |
Intended Usage
The members attribute contains a distinct name for each possible value of the enumeration. The members read operation provides access to a copy of the contents of this enumeration member list, and the members write operation provides the ability to update the members attribute.
Syntax
attribute EnumMemberSeq members;
Read operations
The returned pointer references a sequence that is representative of the enumeration members. The memory is owned by the caller and can be released by invoking delete.
Write operations
The members parameter provides the list of enumeration members with which to update the EnumDef.
Example
// C++ // assume that 'this_enum' has already been initialized CORBA::EnumDef * this_enum; // establish and initialize 'seq_update' CORBA::EnumMemberSeq seq_update; seq_update.length (3); seq_update[0] = CORBA::string_dup ("enumerator_0"); seq_update[1] = CORBA::string_dup ("enumerator_1"); seq_update[2] = CORBA::string_dup ("enumerator_2"); // change the 'members' information in the enumeration this_enum-> members (seq_update); // read the 'members' information from the enumeration CORBA::EnumMemberSeq * returned_seq; returned_seq = this_enum-> members ();