![]() |
Overview The describe_contents operation combines the contents operation and the describe operation. Original interface CORBA module: Container Interface Exceptions CORBA::SystemException
Intended Usage
The describe_contents operation combines the contents operation and the describe operation. For each object returned by the contents operation, the description of the object is returned (i.e., the object's describe operation is invoked and the results returned).
IDL Syntax
struct Description { Contained contained_object; DefinitionKind kind; any value; }; DescriptionSeq describe_contents (in DefinitionKind limit_type, in boolean exclude_inherited, sin long max_returned_objs);
Input parameters
- exclude_inherited
CORBA::Contained objects have a defined_in attribute that identifies the CORBA::Container within which they are defined. Objects can be contained either because they are defined within the containing object (for example, an interface is defined within a module) or because they are inherited by the containing object (for example, an operation may be contained by an interface because the interface inherits the operation from another interface).
If the exclude_inherited parameter is set to TRUE, inherited objects (if there are any) are not returned. If exclude_inherited is set to FALSE, all contained objects are returned (whether contained due to inheritance or because they were defined within the object).
- limit_type
The limit_type identifies the interface types for which descriptions are returned. If limit_type is set to CORBA::dk_all, objects of all interface types within the CORBA::Container are returned. If limit_type is set to a specific interface, only objects of that interface are returned.
Valid values for limit_type include CORBA::dk_all, CORBA::dk_Attribute, CORBA::dk_Constant, CORBA::dk_Exception, CORBA::dk_Interface, CORBA::dk_Module, CORBA::dk_Operation, CORBA::dk_Typedef, CORBA::dk_Union, CORBA::dk_Alias, CORBA::dk_Struct, and CORBA::dk_Enum.
- max_returned_objs
- The max_returned_objs parameter limits the number of objects that can be returned in an invocation of the call to the number provided. Setting the parameter to -1 indicates that all contained objects should be returned.
Return values
- DescriptionSeq *
- The returned value is a pointer to a sequence of descriptions of Interface Repository objects. The memory is owned by the caller and can be removed using delete.
Example
// C++ // assume that 'this_module' has already been initialized CORBA::ModuleDef * this_module; // retrieve information about all objects contained // within the module using 'describe_contents' CORBA::Container::DescriptionSeq * returned_descriptions; returned_descriptions = this_module-> describe_contents (CORBA::dk_all, 1, -1);