![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Singleton registry of available condition types. More...
#include <ConditionRegistry.h>
Public Member Functions | |
| void | Register (const ConditionSpec &spec) |
| Registers a ConditionSpec. | |
| const ConditionSpec * | GetConditionSpec (const std::string &id) const |
| Returns the ConditionSpec for the given id, or nullptr if not found. | |
| std::vector< std::string > | GetAllConditionIds () const |
| Returns all registered condition IDs. | |
| std::vector< ConditionSpec > | GetAllConditions () const |
| Returns all registered condition specs, sorted by id. | |
Static Public Member Functions | |
| static ConditionRegistry & | Get () |
| Returns the singleton instance. | |
Private Member Functions | |
| ConditionRegistry () | |
| void | InitializeBuiltInConditions () |
Private Attributes | |
| std::unordered_map< std::string, ConditionSpec > | m_specs |
Singleton registry of available condition types.
Definition at line 51 of file ConditionRegistry.h.
|
private |
Definition at line 26 of file ConditionRegistry.cpp.
References InitializeBuiltInConditions().
Here is the call graph for this function:
|
static |
Returns the singleton instance.
Calls InitializeBuiltInConditions() on first access.
Definition at line 20 of file ConditionRegistry.cpp.
References GetComponentTypeID_Static().
Referenced by Olympe::VSGraphVerifier::CheckConditionIDs(), and Olympe::VSGraphVerifier::CheckConditionParams().
Here is the call graph for this function:
Here is the caller graph for this function:| std::vector< std::string > Olympe::ConditionRegistry::GetAllConditionIds | ( | ) | const |
Returns all registered condition IDs.
Definition at line 51 of file ConditionRegistry.cpp.
References GetComponentTypeID_Static(), and m_specs.
Here is the call graph for this function:| std::vector< ConditionSpec > Olympe::ConditionRegistry::GetAllConditions | ( | ) | const |
Returns all registered condition specs, sorted by id.
Definition at line 61 of file ConditionRegistry.cpp.
References GetComponentTypeID_Static(), and m_specs.
Here is the call graph for this function:| const ConditionSpec * Olympe::ConditionRegistry::GetConditionSpec | ( | const std::string & | id | ) | const |
Returns the ConditionSpec for the given id, or nullptr if not found.
| id | Condition type ID. |
Definition at line 45 of file ConditionRegistry.cpp.
References GetComponentTypeID_Static(), and m_specs.
Here is the call graph for this function:
|
private |
Definition at line 78 of file ConditionRegistry.cpp.
References Olympe::ComparisonOp, GetComponentTypeID_Static(), Olympe::ConditionSpec::id, Olympe::Literal, Olympe::LocalVariable, and Register().
Referenced by ConditionRegistry().
Here is the call graph for this function:
Here is the caller graph for this function:| void Olympe::ConditionRegistry::Register | ( | const ConditionSpec & | spec | ) |
Registers a ConditionSpec.
| spec | Spec to register (id must be non-empty). |
Definition at line 35 of file ConditionRegistry.cpp.
References GetComponentTypeID_Static(), and m_specs.
Referenced by InitializeBuiltInConditions().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 88 of file ConditionRegistry.h.
Referenced by GetAllConditionIds(), GetAllConditions(), GetConditionSpec(), and Register().