3-10
SOMobjects Base Toolkit Programmer’s Reference Manual
within Method
Purpose
Returns a list of objects (in the Interface Repository) that contain a specified Contained
object.
IDL Syntax
sequence<Container> within ( );
Description
The within method returns a sequence of objects within the Interface Repository that
contain the specified Contained object. If the receiving object is an InterfaceDef or
ModuleDef, it can only be contained by the object that defines it. Other objects can be
contained by objects that define or inherit them.
If the object is global in scope, the sequence returned by within will have its _length field
set to zero.
When finished using the sequence returned by this method, the client code is responsible
for releasing each of the Containers 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++)
_somFree (seq._buffer[i]); /* Release each Container obj
*/
SOMFree (seq._buffer); /* Release the sequence buffer */
}
Parameters
receiver A pointer to a Contained object for which containing objects are needed.
ev A pointer to the Environment structure for the caller.
Return Value
The within method returns a sequence of Container objects that contain the specified
Contained object.
Comentários a estes Manuais