ConstantDef::value

Overview The value read and write operations allow the access and update of the value attribute of a ConstantDef.
Original interface CORBA module: ConstantDef Interface
Exceptions CORBA::SystemException


Intended Usage

The value attribute contains the value of the constant, not the computation of the value (for example, the fact that it was defined as "1+2"). Read and write value operations are provided with parameters as defined below.

Syntax

  any value;

Read operations

Input parameters
none
Return values
CORBA::Any *

The returned pointer to a CORBA::Any data type represents the value attribute of the constant. The object memory belongs to the caller, and can be removed by invoking delete.

Write operations

Input parameters
CORBA::Any & value

The value parameter is a reference to a CORBA::Any data type that provides the constant value to change the value attribute of the ConstantDef. When setting the value attribute, the TypeCode of the supplied CORBA::Any must be equal to the type attribute of the ConstantDef.

Return values
none

Example

  // C++
     // assume that 'constant_409' has already been initialized
     CORBA::ConstantDef * constant_409;
 
     // set the value '409' in the Any,
     // and invoke the value operation to update the constant
     CORBA::Any new_value;
     new_value <<= (CORBA::Long) 409;
     constant_409-> value (new_value);
 
     // read the constant value from the ConstantDef
     CORBA::Any * returned_value;
     returned_value = constant_409-> value ();

Related reference
CORBA module



Searchable topic ID:   rcor_modcn3
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_modcn3.html

Library | Support | Terms of Use | Feedback