NonStop Serverware

UnionDef

Previous Topic | Next Topic | Contents | Index
Getting Started | Administration Guide | Programmer's Guide

Subtopics

UnionDef Syntax
UnionDef::describe( )
UnionDef::discriminator_type
UnionDef::discriminator_type_def
UnionDef::members

The UnionDef interface is used to represent a Union that is stored in the Interface Repository. This interface provides methods for setting and retrieving the union's list of members and discriminator type.

UnionDef Syntax

module CORBA {
  struct UnionMember {
    Identifier <name>;
    any <label>;
	TypeCode <type>;
	IDLType type_def;
    };
  typedef sequence <UnionMember> UnionmemberSeq;

  interface UnionDef : TypedefDef {
    readonly attribute TypeCode <discriminator_type>;
	attribute IDLType <discriminator_type_def>;
    attribute UnionMemberSeq <members>;
  };
};

UnionDef::describe( )

This operation is inherited from contained and returns a structure of type Contained::Description:

struct Description {
  DefinitionKind kind;
  any value;
};

Syntax

Description describe( );

Description

The DefinitionKind for the kind member is dk_Union. The value member is an any whose TypeCode is _tc_TypeDescription and whose value is a structure of type TypeDescription:

struct TypeDescription {
  Identifier <name>;
  RepositoryId <id>;
  RepositoryId defined_in;
  VersionSpec <version>;
  TypeCode <type>;
};

UnionDef::discriminator_type

This attribute describes the discriminator type for this union. The attribute discriminator_type_def contains the same information.

Syntax

readonly attribute TypeCode discriminator_type;

See Also

CORBA::TypeCode

UnionDef::discriminator_type_def

This attribute describes the discriminator type for this union. The attribute discriminator_type contains the same information.

Syntax

attribute IDLType discriminator_type_def;

UnionDef::members

This attribute contains a description of each union member including its name, label, and type.

Syntax

attribute UnionMemberSeq <members>;

Description

The members attribute can be modified to change the union's members. Only the name, label, and type_def field of each UnionMember should be set.


Previous Topic | Next Topic | Contents | Top
Getting Started Guide | Administration Guide | Programmer's Guide
Bibliography | Glossary | Index
© Tandem, a division of Compaq. All rights reserved. Legal notices.