Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
A list of components that are dynamically subscribed to a particular message. More...
#include <DynamicSubscription.h>
Classes | |
struct | CompareIComponent |
Public Member Functions | |
void | Add (IComponent *cmp) |
void | Remove (IComponent *cmp) |
void | Flatten () |
const std::vector< IComponent * > & | GetComponents () |
void | DebugDump () |
Private Attributes | |
std::vector< IComponent * > | m_Components |
std::set< IComponent *, CompareIComponent > | m_Added |
std::set< IComponent *, CompareIComponent > | m_Removed |
A list of components that are dynamically subscribed to a particular message.
The components list is sorted by (entity_id, ComponentTypeId), with no duplicates.
To cope with changes to the subscription list while a message is still being broadcast, all changes are stored in the added/removed sets. The next time a message is sent, they will be merged into the main components list.
void CDynamicSubscription::Add | ( | IComponent * | cmp | ) |
void CDynamicSubscription::DebugDump | ( | ) |
void CDynamicSubscription::Flatten | ( | ) |
const std::vector< IComponent * > & CDynamicSubscription::GetComponents | ( | ) |
void CDynamicSubscription::Remove | ( | IComponent * | cmp | ) |
|
private |
|
private |
|
private |