Memory error handling. More...
#include <Inventor/errors/SoMemoryError.h>
Public Types | |
typedef bool | SoMemoryCleanupCB(const size_t requestedByteSize, void *data) |
Memory cleanup handling callback. | |
Public Types inherited from SoError | |
typedef void | SoErrorCB(const SoError *error, void *data) |
Error handling callbacks are of this type. | |
Public Member Functions | |
virtual SoType | getTypeId () const |
Returns type identifier for an instance of this class. | |
Public Member Functions inherited from SoError | |
const SbString & | getDebugString () const |
Returns debug string containing full error information from instance. | |
virtual | ~SoError () |
Destructor. | |
Public Member Functions inherited from SoTypedObject | |
SbBool | isOfType (const SoType &type) const |
Returns TRUE if this object is of the type specified in type or is derived from that type. | |
template<typename TypedObjectClass > | |
SbBool | isOfType () const |
Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class. | |
Static Public Member Functions | |
static void | setHandlerCallback (SoErrorCB *cb, void *data) |
Sets handler callback for SoMemoryError class. | |
static SoErrorCB * | getHandlerCallback () |
Returns handler callback for SoMemoryError class. | |
static void * | getHandlerData () |
Returns handler data for SoMemoryError class. | |
static void | setMemoryCleanupCallback (SoMemoryCleanupCB *cb, void *data) |
Sets memory cleanup handler callback for SoMemoryError class. | |
static SoType | getClassTypeId () |
Returns type identifier for SoMemoryError class. | |
static void | post (const SbString &whatWasAllocated) |
Posts an error. | |
static void | post (const char *whatWasAllocated) |
Posts an error. | |
Static Public Member Functions inherited from SoError | |
static void | setHandlerCallback (SoErrorCB *cb, void *data) |
Sets handler callback for SoError class. | |
static SoErrorCB * | getHandlerCallback () |
Returns handler callback for SoError class. | |
static void * | getHandlerData () |
Returns handler data for SoError class. | |
static SoType | getClassTypeId () |
Returns type identifier for SoError class. | |
static SoPRINTF void | post (const char *formatString ...) |
Posts an error. | |
Static Public Member Functions inherited from SoTypedObject | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
Memory error handling.
SoMemoryError is used for errors reported due to lack of memory. See SoError for full discussion of error handling in Open Inventor.
The post() method takes a string describing the item that was to be allocated, such as "cylinder vertex array".
setMemoryCleanupCallback() can be used to set a handler function that will be called when a memory allocation fails. The function can release some memory to allow the allocation to succeed.
SoDebugError, SoReadError, SoGLError
Definition at line 96 of file SoMemoryError.h.
typedef bool SoMemoryCleanupCB(const size_t requestedByteSize, void *data) |
Memory cleanup handling callback.
SoMemoryCleanupCB is called when Open Inventor is not able to allocate at least requestedSize bytes of memory. This notifies the application that available memory is too low. The application can try to release some memory to allow the allocation to succeed. If the callback returns true then Open Inventor will retry its allocation call.
SoMemoryError::setMemoryCleanupCallback
Definition at line 74 of file SoMemoryError.h.
|
static |
Returns type identifier for SoMemoryError class.
|
static |
Returns handler callback for SoMemoryError class.
|
static |
Returns handler data for SoMemoryError class.
|
virtual |
Returns type identifier for an instance of this class.
Reimplemented from SoError.
|
static |
Posts an error.
|
static |
Posts an error.
|
static |
Sets handler callback for SoMemoryError class.
|
static |
Sets memory cleanup handler callback for SoMemoryError class.