Overview | The lookup_id operation is used to look up an object in a Repository given its RepositoryId. |
Original interface | Repository Interface |
Exceptions | CORBA::SystemException |
Intended Usage
The lookup_id operation is used to retrieve an object from the Interface Repository based upon its unique CORBA::RepositoryId. If the Repository does not contain a definition for the search CORBA::RepositoryId, a nil object reference is returned.
Syntax
Contained lookup_id (in RepositoryId search_id);
Input parameters
Return values
Example
// C++ // assume that 'interface_1' and 'repository_ptr' have already been initialized; CORBA::InterfaceDef * interface_1; CORBA::Repository * repository_ptr; // obtain the CORBA::RepositoryId for 'interface_1' CORBA::RepositoryId rep_id; rep_id = interface_1-> id(); // . . . . // retrieve the object from the Interface Repository database // using the CORBA::RepositoryId as the search key CORBA::Contained * contained_ptr; contained_ptr = repository_ptr-> lookup_id (rep_id);