Overview | The mode read and write operations allow the access and update of the mode attribute of an attribute definition (CORBA::AttributeDef) within the Interface Repository. |
Original interface | CORBA module: AttributeDef Interface |
Exceptions | CORBA::SystemException |
Intended Usage
The mode attribute specifies read only or read/write access for this attribute. Read and write mode operations are supported with parameters as defined below.
Syntax
attribute AttributeMode mode;
Read operations
The returned value is the current value of the mode attribute of the attribute definition (CORBA::AttributeDef) object.
Write operations
The mode parameter is the new value to which the mode attribute of the CORBA::AttributeDef object will be set. Valid mode values include CORBA::ATTR_NORMAL (read/write access) and CORBA::ATTR_READONLY (read only access).
Example
// C++ /// assume that 'this_attribute' has already been initialized CORBA::AttributeDef * this_attribute; // set the new mode in the attribute definition CORBA::AttributeMode new_mode = CORBA::ATTR_READONLY; this_attribute-> mode (new_mode); // retrieve the mode from the attribute definition CORBA::AttributeMode returned_mode; returned_mode = this_attribute-> mode ();