3-15
Interface Repository Framework Reference
describe_contents Method
Purpose
Returns a sequence of descriptions of the objects contained within a specified Container
object of the Interface Repository.
IDL Syntax
sequence<ContainerDescription> describe_contents (
in InterfaceName limit_type,
in boolean exclude_inherited,
in long max_returned_objs);
Description
The describe_contents method combines the operations of the contents method and the
describe method. That is, for each object returned by the contents operation, the
description of the object is returned by invoking its describe operation. Each object
represents a component of an IDL interface (class) definition maintained within the Interface
Repository.
If the limit_type is set to “all”, objects of all interface types are returned; otherwise, only
objects of the requested interface type are returned. Valid values for InterfaceName are
limited to the following set:
{“AttributeDef”, “ConstantDef”, “ExceptionDef”, “InterfaceDef”, “ModuleDef”,
“ParameterDef”, “OperationDef”, “TypeDef”, “all”}
If exclude_inherited is set to TRUE, any inherited objects will not be returned.
The max_returned_objs argument is used to limit the number of objects that can be
returned. If max_returned_objs is set to –1, the results for all contained objects will be
returned.
When finished using the sequence returned by this method, the client code is responsible
for freeing the value._value field in each description, releasing each of the objects in the
sequence, and freeing the sequence buffer. In C, this can be accomplished as follows:
if (seq._length) {
long i;
for (i=0; i<seq._length; i++) {
if (seq._buffer[i].value._value)
/* Release each description */
SOMFree (seq._buffer[i].value._value);
SOMObject_somFree (seq._buffer[i].contained_object);
/* Release each object */
}
SOMFree (seq._buffer); /* Release the buffer */
}
Parameters
receiver A pointer to a Container object whose contained object descriptions are
needed.
ev A pointer to the Environment structure for the caller.
limit_type The name of one interface type (see the previous valid list) or “all”, to
specify what type of objects the describe_contents method should return.
Comentários a estes Manuais