3-11
Interface Repository Framework Reference
Example
Here is a code fragment written in C that uses the within method:
#include <containd.h>
#include <containr.h>
. . .
Contained anObj;
Environment *ev;
sequence(Container) sc;
long i;
. . .
sc = Contained_within (anObj, ev);
printf (”%s is contained in (or inherited by):\n”,
Contained__get_name (anObj, ev));
for (i=0; i<sc._length; i++) {
printf (”\t%s\n”,
Contained__get_name ((Contained) sc._buffer[i], ev));
SOMObject_somFree (sc._buffer[i]);
}
if (sc._length)
SOMFree (sc._buffer);
Original Class
Contained
Related Information
Methods: describe
Kommentare zu diesen Handbüchern