3-13
Interface Repository Framework Reference
contents Method
Purpose
Returns a sequence indicating the objects contained within a specified Container object of
the Interface Repository.
IDL Syntax
sequence<Contained> contents (
in InterfaceName limit_type,
in boolean exclude_inherited);
Description
The contents method returns a list of objects contained by the specified Container object.
Each object represents a component of an IDL interface (class) definition maintained within
the Interface Repository.
The contents method is used to navigate through the hierarchy of objects within the
Interface Repository: starting with the Repository object, this method can list all of the
objects in the Repository, then all of the objects within the ModuleDef objects, then all
within the InterfaceDef objects, and so on.
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.
When finished using the sequence returned by this method, the client code is responsible
for 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++)
SOMObject_somFree (seq._buffer[i]); /* Release each object
*/
SOMFree (seq._buffer); /* Release the buffer
*/
}
Parameters
receiver A pointer to a Container object whose contained objects are needed.
ev A pointer to the Environment structure for the caller.
limit_type The name of one interface type (see the previous list of valid types) or “all”,
to specify what type of objects the contents method should search for.
exclude_inherited
A boolean value: TRUE to exclude any inherited objects, or FALSE to
include all objects.
Komentarze do niniejszej Instrukcji