Odyssey::ElementManager Class Reference

This is the manager for the Elements within the system. More...

#include <ElementManager.h>

Inheritance diagram for Odyssey::ElementManager:

Odyssey::Manager< ElementPtr > List of all members.

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 ElementManagergetSingleton ()
 Returns the one and only instance.

Detailed Description

This is the manager for the Elements within the system.

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.


Member Typedef Documentation

typedef boost::function<void ()> Odyssey::ElementManager::UpdateCallback
 


Constructor & Destructor Documentation

Odyssey::ElementManager::~ElementManager  ) 
 


Member Function Documentation

void Odyssey::ElementManager::_cancelUpdate Facet facet  ) 
 

An internal method for cancellation of updates.

void Odyssey::ElementManager::_cancelUpdate Element element  ) 
 

An internal method for cancellation of updates.

void Odyssey::ElementManager::_notifyUpdate Facet facet  ) 
 

An internal method for notification that an Element's facet needs to be updated.

void Odyssey::ElementManager::_notifyUpdate Element element  ) 
 

An internal method for notification that an Element needs to be updated.

ElementWeakPtr Odyssey::ElementManager::createElement const String typeID,
const String name
 

Creates a new dynamic Element of the given type id with the given name.

ElementWeakPtr Odyssey::ElementManager::createElement const String 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.

Parameters:
name the name of the element.

ElementWeakPtr Odyssey::ElementManager::getElement size_t  index  )  const
 

Returns the element reference at the given index.

ElementWeakPtr Odyssey::ElementManager::getElement const String name  )  const
 

Returns the element reference with the given name.

static ElementManager& Odyssey::ElementManager::getSingleton  )  [static]
 

Returns the one and only instance.

void Odyssey::ElementManager::postMessageToAll const Message msg  ) 
 

Posts a message to every element in the manager.

void Odyssey::ElementManager::sendMessageToAll const Message msg  ) 
 

Send a message to every element in the manager.

void Odyssey::ElementManager::update  ) 
 

Updates only those elements that have notified the manager that they need updates.

void Odyssey::ElementManager::update const String name  ) 
 

Update only the element at the given index, regardless of active status.

void Odyssey::ElementManager::update size_t  index  ) 
 

Update only the element at the given index, regardless of active status.

void Odyssey::ElementManager::updateAll  ) 
 

Updates all elements regardless of active status.


The documentation for this class was generated from the following file:
Generated on Sun Jan 7 01:18:52 2007 for Odyssey Meta-Engine by  doxygen 1.4.6-NO