Atoms Crowd
7.0.0
|
Simulation event factory. More...
#include <SimulationEvents.h>
Public Types | |
typedef SimulationEvent *(* | creatorFn) (const std::string ¶meter) |
Public Member Functions | |
AtomsPtr< SimulationEvent > | createSimulationEvent (const std::string &name) |
Creates a SimulationEvent. More... | |
SimulationEvent * | createSimulationEventRawPtr (const std::string &name) |
Creates a SimulationEvent. More... | |
bool | registerSimulationEvent (const std::string &eventName, creatorFn func, unsigned int moduleType=SimulationEvent::kNative, bool replace=false) |
Registers a behaviour module in the factory. More... | |
bool | deregisterSimulationEvent (const std::string &name) |
Deregisters a SimulationEventtype from the factory. More... | |
std::vector< std::string > | getRegisteredSimulationEvents () |
Gets all Simulation Event modules. More... | |
bool | isRegistered (const std::string &name) |
Checks if a Simulation Event is registered. More... | |
void | clear () |
Clears factory. | |
short | eventType (const std::string &name) |
Gets the event type. | |
Static Public Member Functions | |
static SimulationEvents & | instance () |
Singleton access. | |
Simulation event factory.
Factory used to create Simulation events.
AtomsPtr<SimulationEvent> Atoms::SimulationEvents::createSimulationEvent | ( | const std::string & | name | ) |
Creates a SimulationEvent.
name | SimulationEvent name |
SimulationEvent* Atoms::SimulationEvents::createSimulationEventRawPtr | ( | const std::string & | name | ) |
Creates a SimulationEvent.
name | behaviour module name |
bool Atoms::SimulationEvents::deregisterSimulationEvent | ( | const std::string & | name | ) |
Deregisters a SimulationEventtype from the factory.
name | Behaviour module name |
std::vector<std::string> Atoms::SimulationEvents::getRegisteredSimulationEvents | ( | ) |
Gets all Simulation Event modules.
bool Atoms::SimulationEvents::isRegistered | ( | const std::string & | name | ) |
Checks if a Simulation Event is registered.
name | Behaviour module name |
bool Atoms::SimulationEvents::registerSimulationEvent | ( | const std::string & | eventName, |
creatorFn | func, | ||
unsigned int | moduleType = SimulationEvent::kNative , |
||
bool | replace = false |
||
) |
Registers a behaviour module in the factory.
name | SimulationEvent name |
func | creator function |
replace | Replace module if it already exists |