Bull DPX/20 Uživatelská příručka Strana 322

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 424
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 321
3-16
SOMobjects Base Toolkit Programmers Reference Manual
exclude_inherited
A boolean value: TRUE to exclude any inherited objects, or FALSE to
include all objects.
max_returned_objs
A long integer indicating the maximum number of objects to be returned by
the method, or –1 to indicate no limit is set.
Return Value
The describe_contents method returns a sequence of ContainerDescription structures,
one for each object contained within the specified Container object. Each
ContainerDescription structure has a contained_object field, which points to the contained
object, as well as name and value fields, which are the result of the describe method.
Example
Here is a code fragment written in C that uses the describe_contents method:
#include <containr.h>
...
Container anObj;
Environment *ev;
sequence(ContainerDescription) sc;
long i;
...
sc = Container_describe_contents (anObj, ev, ”all”, FALSE, –1L);
printf (”%s defines or inherits the following objects:\n”,
SOMObject_somIsA (anObj, _Contained) ?
Contained__get_name ((Contained) anObj, ev) :
”The Interface Repository”);
for (i=0; i<sc._length; i++) {
printf (”\t%s\n”, sc._buffer[i].name);
if (sc._buffer[i].value._value)
SOMFree (sc._buffer[i].value._value);
SOMObject_somFree (sc._buffer[i].contained_object);
}
if (sc._length)
SOMFree (sc._buffer);
else
printf (”\t[none]\n”);
Original Class
Container
Related Information
Methods: contents, describe, lookup_name
Zobrazit stránku 321
1 2 ... 317 318 319 320 321 322 323 324 325 326 327 ... 423 424

Komentáře k této Příručce

Žádné komentáře