#include <ElementManager.h>
Inheritance diagram for Odyssey::ElementManager:
Public Types | |
typedef boost::function< void()> | UpdateCallback |
Public Member Functions | |
~ElementManager () | |
ElementWeakPtr | createElement (const String &name) |
Create a plain Element instance with the given name. | |
ElementWeakPtr | createElement (const String &typeID, const String &name) |
Creates a new dynamic Element of the given type id with the given name. | |
ElementWeakPtr | getElement (const String &name) const |
Returns the element reference with the given name. | |
ElementWeakPtr | getElement (size_t index) const |
Returns the element reference at the given index. | |
void | _notifyUpdate (Element *element) |
An internal method for notification that an Element needs to be updated. | |
void | _notifyUpdate (Facet *facet) |
An internal method for notification that an Element's facet needs to be updated. | |
void | _cancelUpdate (Element *element) |
An internal method for cancellation of updates. | |
void | _cancelUpdate (Facet *facet) |
An internal method for cancellation of updates. | |
void | update (size_t index) |
Update only the element at the given index, regardless of active status. | |
void | update (const String &name) |
Update only the element at the given index, regardless of active status. | |
void | update () |
Updates only those elements that have notified the manager that they need updates. | |
void | updateAll () |
Updates all elements regardless of active status. | |
void | sendMessageToAll (const Message &msg) |
Send a message to every element in the manager. | |
void | postMessageToAll (const Message &msg) |
Posts a message to every element in the manager. | |
Static Public Member Functions | |
static ElementManager & | getSingleton () |
Returns the one and only instance. |
This class manages the Elements within the system. It has the capabilities to hold them, create, and acces them. It also provides the mechanism to do automatic Element updates, with various choices for updating Elements based on active status, etc.
|
|
|
|
|
An internal method for cancellation of updates.
|
|
An internal method for cancellation of updates.
|
|
An internal method for notification that an Element's facet needs to be updated.
|
|
An internal method for notification that an Element needs to be updated.
|
|
Creates a new dynamic Element of the given type id with the given name.
|
|
Create a plain Element instance with the given name. This function creates and adds a new element with the given name. The Element is returned in the form of a weak pointer, which can be locked to get the shared pointer.
|
|
Returns the element reference at the given index.
|
|
Returns the element reference with the given name.
|
|
Returns the one and only instance.
|
|
Posts a message to every element in the manager.
|
|
Send a message to every element in the manager.
|
|
Updates only those elements that have notified the manager that they need updates.
|
|
Update only the element at the given index, regardless of active status.
|
|
Update only the element at the given index, regardless of active status.
|
|
Updates all elements regardless of active status.
|