SomIsObj

This function is a failsafe routine to determine whether a pointer references a valid SOM object.

Syntax
 somToken   memPtr; boolean    rc;

rc = somIsObj(memPtr); 

Parameters

 * memPtr (somToken) : A somToken (a pointer) to be checked.

Return Code
1   Returns 1 if obj is a pointer to a valid SOM object. 0   Returns 0 if obj is not a pointer to an valid SOM object.
 * rc (boolean) :

Remarks
This 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

Example Code
 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); } 
 * 1) include 
 * 2) include 

Data Structures

 * boolean (somcorba.h)
 * somToken (sombtype.h)