UnionDef::members

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


Intended Usage

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

Syntax

  attribute UnionMemberSeq members;

Read operations

Input parameters
None.
Return values
CORBA::UnionMemberSeq *

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

Write operations

Input parameters
CORBA::UnionMemberSeq & members

The members parameter provides the list of union members with which to update the UnionDef.

Return values
None.

Example

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

Related reference
CORBA module



Searchable topic ID:   rcor_modun3
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/corba/ref/rcor_modun3.html

Library | Support | Terms of Use | Feedback