Bull DPX/20 Guia do Utilizador Página 315

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 424
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 314
3-9
Interface Repository Framework Reference
Example
Here is a code fragment written in C that uses the describe method:
#include <containd.h>
#include <attribdf.h>
#include <somtc.h>
. . .
AttributeDef attr; /* An AttributeDef object (also a Contained) */
Description desc; /* .value field will be an AttributeDescription
*/
AttributeDescription *ad;
Environment *ev;
. . .
desc = Contained_describe (attr, ev);
ad = (AttributeDescription *) desc.value._value;
printf (”Attribute name: %s, defined in: %s\n”,
ad–>name, ad–>defined_in);
printf (”Attribute type: ”);
TypeCode_print (ad–>type, ev);
printf (”Attribute mode: %s\n”, ad–>mode == AttributeDef_READONLY ?
”READONLY” : ”NORMAL”);
SOMFree (desc.value._value); /* Finished with describe output */
SOMObject_somFree (attr); /* Finished with AttributeDef object
*/
Original Class
Contained
Related Information
Methods: within
Vista de página 314
1 2 ... 310 311 312 313 314 315 316 317 318 319 320 ... 423 424

Comentários a estes Manuais

Sem comentários