REFERENCE MANUAL
#include <hps.h>
Public Member Functions | |
virtual EmergencyHandler * | Clone () const =0 |
EmergencyHandler () | |
intptr_t | GetClassID () const |
virtual void | Handle (const char *message, Emergency::Code code) const =0 |
Static Public Member Functions | |
static void | operator delete (void *in_ptr, size_t in_size) throw () |
static void * | operator new (size_t in_size) |
The EmergencyHandler class is the base class for an custom EmergencyHandler. An EmergencyHandler allows the developer to provide custom logic to handle 'emergency' situations. For example, one can set a soft memory limit using Database::SetSoftMemoryLimit. If that limit is hit, Visualize will call the EmergencyHandler.
An EmergencyHandler is set by calling Database::SetEmergencyHandler. Only one EmergencyHandler can be set on the Database. If you try to set a second handler, the first one will be overwritten.
The default emergency handler will print a few diagnostics to stdout (when run in debug mode), but will make no attempt to recover from the emergency condition.
|
inline |
A constructor for an EmergencyHandler.
|
pure virtual |
This function is used to copy custom EmergencyHandler classes. Users that create custom EmergencyHandler classes must override this function to provide the proper copying behavior.
intptr_t EmergencyHandler::GetClassID | ( | ) | const |
Returns a unique identifier that can be used to identify which class an object is.
|
pure virtual |
Visualize will call the EmergencyHandler::Handle method if any of the handler-enabling conditions are reached. The Emergency::Code value describes the type of condition.