UserData that self-destructs once detached. More...
#include <arcane/utils/AutoDestroyUserData.h>
Public Member Functions | |
| AutoDestroyUserData (T *adata) | |
| virtual void | notifyAttach () |
| Method executed when the instance is attached. | |
| virtual void | notifyDetach () |
| Method executed when the instance is detached. | |
| T * | data () |
| Public Member Functions inherited from Arcane::IUserData | |
| virtual | ~IUserData () |
| Releases resources. | |
UserData that self-destructs once detached.
An instance of this class must be allocated via new() and is automatically destroyed along with its associated data when it is detached from an IUserDataList via IUserDataList::removeData().
By default, it calls the delete operator for its data but it is possible to change its behavior via the DestroyBehaviour template parameter.
Definition at line 52 of file AutoDestroyUserData.h.
|
inline |
Definition at line 57 of file AutoDestroyUserData.h.
|
inline |
Definition at line 78 of file AutoDestroyUserData.h.
|
inlinevirtual |
Method executed when the instance is attached.
Implements Arcane::IUserData.
Definition at line 69 of file AutoDestroyUserData.h.
|
inlinevirtual |
Method executed when the instance is detached.
Implements Arcane::IUserData.
Definition at line 71 of file AutoDestroyUserData.h.