1-144 SOMobjects Base Toolkit: Programmer’s Reference Manual
somGetClassName Method
Purpose
Returns the name of the class of an object. Not generally overridden.
IDL Syntax
string somGetClassName ( );
Note: For backward compatibility, this method does not take an Environment parameter.
Description
The somGetClassName method returns a pointer to a zero-terminated string that gives the
name of the class of an object.
This method is not generally overridden; it simply invokes somGetName on the class of the
receiver. Refer to somGetName for more information on the returned string,
Parameters
receiver A pointer to the object whose class name is desired.
Return Value
The somGetClassName method returns a pointer to the name of the class.
C Example
#include <animal.h>
main()
{
Animal myAnimal;
SOMClass animalClass;
char *className;
myAnimal = AnimalNew();
className = _somGetClassName(myAnimal);
somPrintf(”Class name: %s\n”, className);
_somFree(myAnimal);
}
/*
Output from this program:
Class name: Animal
*/
Original Class
SOMObject
Related Information
Methods: somGetName
Kommentare zu diesen Handbüchern