#include <AH/Containers/Updatable.hpp>
A super class for object that have to be updated regularly.
All instances of this class are kept in a linked list, so it's easy to iterate over all of them to update them.
Definition at line 169 of file Updatable.hpp.
Main initialization and updating methods | |
virtual void | begin ()=0 |
Initialize this updatable. More... | |
virtual void | update ()=0 |
Update this updatable. More... | |
static void | beginAll () |
Begin all enabled instances of this class. More... | |
static void | updateAll () |
Update all enabled instances of this class. More... | |
Enabling and disabling updatables | |
void | enable () |
Enable this updatable: insert it into the linked list of instances, so it gets updated automatically. More... | |
void | disable () |
Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically. More... | |
bool | isEnabled () const |
Check if this updatable is enabled. More... | |
void | moveDown () |
Move down this element in the list. More... | |
static void | enable (UpdatableCRTP *element) |
Enable this updatable: insert it into the linked list of instances, so it gets updated automatically. More... | |
static void | enable (UpdatableCRTP &element) |
Enable this updatable: insert it into the linked list of instances, so it gets updated automatically. More... | |
static void | enable (U(&array)[N]) |
Enable this updatable: insert it into the linked list of instances, so it gets updated automatically. More... | |
static void | disable (UpdatableCRTP *element) |
Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically. More... | |
static void | disable (UpdatableCRTP &element) |
Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically. More... | |
static void | disable (U(&array)[N]) |
Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically. More... | |
Protected Attributes | |
Updatable< NormalUpdatable > * | next |
Updatable< NormalUpdatable > * | previous |
Static Protected Attributes | |
static DoublyLinkedList< Updatable< NormalUpdatable > > | updatables |
|
pure virtual |
Initialize this updatable.
|
pure virtual |
Update this updatable.
|
inlinestatic |
Begin all enabled instances of this class.
Definition at line 182 of file Updatable.hpp.
|
inlinestatic |
Update all enabled instances of this class.
Definition at line 186 of file Updatable.hpp.
|
inlineinherited |
Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.
Definition at line 96 of file Updatable.hpp.
|
inlinestaticinherited |
Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.
Definition at line 125 of file Updatable.hpp.
|
inlinestaticinherited |
Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.
Definition at line 127 of file Updatable.hpp.
|
inlinestaticinherited |
Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.
Definition at line 130 of file Updatable.hpp.
|
inlineinherited |
Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.
Definition at line 106 of file Updatable.hpp.
|
inlinestaticinherited |
Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.
Definition at line 136 of file Updatable.hpp.
|
inlinestaticinherited |
Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.
Definition at line 138 of file Updatable.hpp.
|
inlinestaticinherited |
Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.
Definition at line 141 of file Updatable.hpp.
|
inlineinherited |
Check if this updatable is enabled.
Definition at line 120 of file Updatable.hpp.
|
inlineinherited |
Move down this element in the list.
Definition at line 147 of file Updatable.hpp.
|
staticprotectedinherited |
Definition at line 152 of file Updatable.hpp.
|
protectedinherited |
Definition at line 320 of file LinkedList.hpp.
|
protectedinherited |
Definition at line 321 of file LinkedList.hpp.