![]() |
Overview The id operations provide read and write capability for the id attribute of a Contained Interface Repository object. Original interface CORBA module: Contained Interface Exceptions CORBA::SystemException
Intended Usage
An object that is contained by another object has a unique id attribute that identifies it globally within the Interface Repository. The id read (Get) operation provides the ability to retrieve a copy of the id attribute, and the id write (Set) operation allows the unique id attribute to be changed.
IDL Syntax
void id (CORBA::RepositoryId repositoryid) CORBA::RepositoryId id;
Read operations
- Input parameters
- none
- Return values
- CORBA::RepositoryId
The returned CORBA::RepositoryId is a copy of the id attribute of the Contained object. The associated memory is owned by the caller and can be freed by invoking CORBA::string_free.
Write operations
- Input parameters
- CORBA::RepositoryId new_id
The new_id parameter defines the new CORBA::RepositoryId value that will be used to uniquely identify the Contained object in the Interface Repository.
- Return values
- none
Example
// C++ // assume that 'this_union' has already been initialized CORBA::UnionDef * this_union; // change the 'id' attribute of the union (which is a contained object) CORBA::RepositoryId new_repid = CORBA::string_dup ("new_repid_test"); this_union-> id (new_repid); CORBA::string_free (new_repid); // query the union to get a copy of the 'id' attribute CORBA::RepositoryId returned_rep_id; returned_rep_id = this_union-> id ();