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

  • 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 156
SOM Kernel Reference 1-145
somGetSize Method
Purpose
Returns the size of an object. Not generally overridden.
IDL Syntax
long somGetSize ( );
Note: For backward compatibility, this method does not take an Environment parameter.
Description
The somGetSize method returns the total amount of contiguous space used by the
receiving object.
The value returned reflects only the amount of storage needed to hold the SOM
representation of the object. The object might actually be using or managing additional
space outside of this area.
The somGetSize method is not generally overridden.
Parameters
receiver A pointer to the object whose size is desired.
Return Value
The somGetSize method returns the size, in bytes, of the receiver.
C Example
#include <animal.h>
void main()
{
Animal myAnimal;
int animalSize;
myAnimal = AnimalNew();
animalSize = _somGetSize(myAnimal);
somPrintf(”Size of animal (in bytes): %d\n”, animalSize);
_somFree(myAnimal);
}
/*
Output from this program:
Size of animal (in bytes): 8
*/
Original Class
SOMObject
Related Information
Methods: somGetInstancePartSize, somGetInstanceSize
Zobrazit stránku 156
1 2 ... 152 153 154 155 156 157 158 159 160 161 162 ... 423 424

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

Žádné komentáře