[Enterprise Extensions only]

StructDef::members

Overview The members read and write operations provide for the access and update of the list of elements of an OMG IDL structure definition in the Interface Repository.
Original interface StructDef Interface
Exceptions CORBA::SystemException


Intended Usage

The members attribute contains a description of each structure member. The members read and write operations allow the access and update of the members attribute.

IDL Syntax

  attribute StructMemberSeq members;

Read operations

Input parameters
None.
Return values
CORBA::StructMemberSeq *

The returned pointer references a sequence that is representative of the structure members. The memory is owned by the caller and can be released by invoking delete.

Write operations

Input parameters
CORBA::StructMemberSeq & members

The members parameter provides the list of structure members with which to update the StructDef.

Return values
None.

Example

  // C++
     /// assume 'this_struct_def', 'pk_long_ptr', and 'pk_double_ptr'
     // have already been initialized
     CORBA::StructDef * this_struct_def;
     CORBA::PrimitiveDef * pk_long_ptr;
     CORBA::PrimitiveDef * pk_double_ptr;
 
     // establish and initialize the StructMemberSeq . . .
     CORBA::StructMemberSeq seq_update;
     seq_update.length (2);
     seq_update[0].name = CORBA::string_dup ("element_zero_long");
     seq_update[0].type_def = CORBA::IDLType::_duplicate (pk_long_ptr);
     seq_update[1].name = CORBA::string_dup ("element_one_double");
     seq_update[1].type_def = CORBA::IDLType::_duplicate (pk_double_ptr);
 
     // set the members attribute of the StructDef
     this_struct_def-> members (seq_update);
 
     // read the members attribute information from the StructDef
     CORBA::StructMemberSeq * returned_members;
     returned_members = this_struct_def-> members ();