Bull DPX/20 Guia do Utilizador Página 31

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 424
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 30
SOM Kernel Reference 1-19
somIsObj Function
Purpose
Failsafe routine to determine whether a pointer references a valid SOM object.
Syntax
boolean somIsObj (somToken memPtr);
Description
The somIsObj function returns 1 if its argument is a pointer to a valid SOM object, or
returns 0 otherwise. The function handles address faults, and does extensive consistency
checking to guarantee a correct result.
Parameters
memPtr A somToken (a pointer) to be checked.
Return Value
The somIsObj function returns 1 if obj is a pointer to a valid SOM object, and 0 otherwise.
C++ Example
#include <stdio.h>
#include <som.xh>
void example(void *memPtr)
{
if (!somIsObj(memPtr))
printf(”memPtr is not a valid SOM object.\n”);
else
printf(”memPtr points to an object of class %s\n”,
((SOMObject *)memPtr)–>somGetClassName());
}
Related Information
Data Structures: boolean (somcorba.h), somToken (somapi.h)
Vista de página 30
1 2 ... 26 27 28 29 30 31 32 33 34 35 36 ... 423 424

Comentários a estes Manuais

Sem comentários