Overview | The contents operation returns the list of objects directly contained by or inherited into the object. |
Original interface | CORBA module: Container Interface |
Exceptions | CORBA::SystemException |
Intended Usage
The contents operation can be used to navigate through the hierarchy of objects. Starting with the Repository object, a client uses this operation to list all of the objects contained by the Repository, all of the objects contained by the modules within the Repository, all of the interfaces within a specific module, and so on.
Syntax
ContainedSeq contents (in DefinitionKind limit_type in boolean exclude_inherited);
Input parameters
An object can be contained within another object because it is defined within the containing object (for example, an interface is contained within a module). It may also be defined as contained because it is inherited by the containing object (for example, an operation may be contained by an interface because the interface inherits the operation from another interface).
When exclude_inherited is TRUE, inherited objects, if present, are not returned. If exclude_inherited is FALSE, all contained objects (whether contained due to inheritance or because they were defined within the object) are returned.
Return values
Example
// C++ // assume that 'repository_ptr' has already been initialized CORBA::Repository * repository_ptr; // retrieve all the objects conained by the Repository CORBA::ContainedSeq * returned_sequence; returned_sequence = repository_ptr-> contents (CORBA::dk_all, 0);