ConstantDef::type_def

Overview The type_def operation returns a pointer to an IDLType that is representative of the type within a ConstantDef.
Original interface CORBA module: ConstantDef Interface
Exceptions CORBA::SystemException


Intended Usage

The type_def attribute within a ConstantDef references an IDLType that identifies the definition of the type of the constant. Both read and write type_def operations are supported, the parameters of which are identified below.

Syntax

  attribute IDLType type_def;

Read operations

Input parameters
none
Return values
CORBA::IDLType_ptr

The returned CORBA::IDLType * is a pointer to a copy of the information referenced by the type_def attribute. The object and the associated memory are owned by the caller and can be released by invoking CORBA::release.

Write operations

Input parameters
CORBA::IDLType_ptr

The CORBA::IDLType_ptr must reference a simple type (a PrimitiveDef of kind CORBA::pk_long, CORBA::pk_short, CORBA::pk_ulong, CORBA::pk_ushort, CORBA::pk_float, CORBA::pk_double, CORBA::pk_char, CORBA::pk_wchar, CORBA::pk_octet, CORBA::pk_boolean, CORBA::pk_wstring, or CORBA::pk_string).

Return values
none

Example

  // C++
     // assume that 'this_constant' and 'pk_long_def'
     // have already been initialized
     CORBA::ConstantDef * this_constant;
     CORBA::PrimitiveDef * pk_long_def;
 
     // set the type_def attribute of the constant
     // to represent a CORBA::Long
     this_constant-> type_def (pk_long_def);
 
     // retrieve the type_def attribute from the constant
     CORBA::IDLType * constants_type_def;
     constants_type_def = this_constant-> type_def();

Related reference
CORBA module



Searchable topic ID:   rcor_modcn2
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_modcn2.html

Library | Support | Terms of Use | Feedback