The PointerList class monitors the lifetime of objects attached to it. More...
#include <PointerList.h>
Public Member Functions | |
void | append (QObject *object) |
Appends a new instance of T to the PointerList. | |
PointerList (bool cleanup_when_done=false, QObject *parent=0) | |
Constructs a new PointerList. | |
Public Member Functions inherited from Qtilities::Core::PointerListDeleter | |
PointerListDeleter () | |
Constructor. | |
PointerListDeleter (const PointerListDeleter &other) | |
Copy constructor. |
Additional Inherited Members | |
Signals inherited from Qtilities::Core::PointerListDeleter | |
void | objectDestroyed (QObject *object) |
Signal which is emitted when an object is removed. |
The PointerList class monitors the lifetime of objects attached to it.
The PointerList provides monitoring and accessing of object pointers which are attached to it. Other than QObjectCleanupHandler the PointerList class provides access functions to the objects attached to it and emits signals to indicate its activity.
When creating a new PointerList object with the cleanup_when_done constructor parameter set to true, the PointerList will delete all objects attached to it when it is destructed.
For example:
The above code will result in the following actions inside test_list
Qtilities::Core::PointerList::PointerList | ( | bool | cleanup_when_done = false , |
QObject * | parent = 0 |
||
) |
Constructs a new PointerList.
cleanup_when_done | When true, the PointerList will delete all objects attached to it when it is destructed. |
Qtilities : Reference Documentation | Back to top |
Copyright © 2009-2013, Jaco Naudé
|