Class that sets a local variable to True if the object has been deleted. More...
#include <GUIDeleteNotification.h>
Public Member Functions | |
CGUIDeleteNotification () | |
CGUIDeleteNotification constructor. | |
virtual | ~CGUIDeleteNotification () |
Protected Member Functions | |
void | InitDeletedFlag (eC_Bool &bDeleted) |
void | ResetDeletedFlag () |
Resets the internal flag pointer to NULL. | |
Class that sets a local variable to True if the object has been deleted.
When using this helper class, create a local eC_Bool variable bDeleted and call InitDeletedFlag() with this variable as the parameter. If the instance of this class gets deleted (the dtor is called), the local variable will be set to true; if the local variable has been set to true the method should return immediately, especially without accessing any variables that are not allocated on its local stack.
Only if the object has not been deleted, call ResetDeletedFlag().
Example:
|
inlinevirtual |
Destructor. If a flag has been set via InitDeletedFlag(), its value is set to true at this moment.
|
inlineprotected |
Initializes the given flag to false and stores a pointer to it.
bDeleted | Flag indicating deletion. |