![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Registry for BT-accessible event types loaded from JSON configuration Mirrors BTNodeRegistry pattern for consistency. More...
#include <BTEventTypeRegistry.h>
Classes | |
| struct | EventTypeEntry |
| Event type entry from JSON configuration. More... | |
Static Public Member Functions | |
| static bool | Initialize (const std::string &filepath) |
| Initialize registry from JSON file with fallback. | |
| static const std::vector< EventTypeEntry > & | GetAllEventTypes () |
| Get all registered event types. | |
| static const EventTypeEntry * | GetEventTypeEntry (const std::string &id) |
| Get event type entry by id. | |
| static std::string | GetDisplayName (const std::string &id) |
| Get display name for event type id. | |
| static std::string | GetDomain (const std::string &id) |
| Get domain for event type id. | |
| static std::string | GetCategory (const std::string &id) |
| Get category for event type id. | |
| static std::vector< EventTypeEntry > | GetEventTypesByCategory (const std::string &category) |
| Get all event types for a specific category. | |
| static std::vector< std::string > | GetAllCategories () |
| Get all unique categories. | |
| static bool | Reload (const std::string &filepath) |
| Reload registry from file (for live editing) | |
| static bool | IsValid (const std::string &id) |
| Check if event type is registered. | |
Static Private Member Functions | |
| static bool | LoadFromJSON (const std::string &filepath) |
| Load event types from JSON file. | |
| static void | InitializeDefaults () |
| Initialize default hardcoded event types (fallback) | |
Static Private Attributes | |
| static std::vector< EventTypeEntry > | s_eventTypes |
| static std::map< std::string, size_t > | s_eventTypeMap |
| static bool | s_initialized = false |
Registry for BT-accessible event types loaded from JSON configuration Mirrors BTNodeRegistry pattern for consistency.
Definition at line 17 of file BTEventTypeRegistry.h.
|
static |
Get all unique categories.
Definition at line 178 of file BTEventTypeRegistry.cpp.
References GetAllEventTypes(), and GetComponentTypeID_Static().
Here is the call graph for this function:
|
static |
Get all registered event types.
Definition at line 123 of file BTEventTypeRegistry.cpp.
References Initialize(), s_eventTypes, and s_initialized.
Referenced by GetAllCategories(), and GetEventTypesByCategory().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Get category for event type id.
Definition at line 159 of file BTEventTypeRegistry.cpp.
References GetComponentTypeID_Static(), and GetEventTypeEntry().
Here is the call graph for this function:
|
static |
Get display name for event type id.
Definition at line 147 of file BTEventTypeRegistry.cpp.
References GetComponentTypeID_Static(), and GetEventTypeEntry().
Here is the call graph for this function:
|
static |
Get domain for event type id.
Definition at line 153 of file BTEventTypeRegistry.cpp.
References GetComponentTypeID_Static(), and GetEventTypeEntry().
Here is the call graph for this function:
|
static |
Get event type entry by id.
| id | Event type identifier (e.g., "Olympe_EventType_AI_Explosion") |
Definition at line 132 of file BTEventTypeRegistry.cpp.
References GetComponentTypeID_Static(), Initialize(), s_eventTypeMap, s_eventTypes, and s_initialized.
Referenced by GetCategory(), GetDisplayName(), and GetDomain().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Get all event types for a specific category.
Definition at line 165 of file BTEventTypeRegistry.cpp.
References GetAllEventTypes(), and GetComponentTypeID_Static().
Here is the call graph for this function:Initialize registry from JSON file with fallback.
| filepath | Path to EventTypes.json (e.g., "./Gamedata/BehaviorTree/EventTypes.json") |
Definition at line 11 of file BTEventTypeRegistry.cpp.
References InitializeDefaults(), LoadFromJSON(), s_eventTypes, and s_initialized.
Referenced by GetAllEventTypes(), GetEventTypeEntry(), IsValid(), and Reload().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Initialize default hardcoded event types (fallback)
Definition at line 89 of file BTEventTypeRegistry.cpp.
References GetComponentTypeID_Static(), s_eventTypeMap, and s_eventTypes.
Referenced by Initialize().
Here is the call graph for this function:
Here is the caller graph for this function:Check if event type is registered.
Definition at line 198 of file BTEventTypeRegistry.cpp.
References Initialize(), s_eventTypeMap, and s_initialized.
Here is the call graph for this function:Load event types from JSON file.
Definition at line 34 of file BTEventTypeRegistry.cpp.
References BTEventTypeRegistry::EventTypeEntry::category, BTEventTypeRegistry::EventTypeEntry::description, BTEventTypeRegistry::EventTypeEntry::displayName, BTEventTypeRegistry::EventTypeEntry::domain, GetComponentTypeID_Static(), BTEventTypeRegistry::EventTypeEntry::id, s_eventTypeMap, and s_eventTypes.
Referenced by Initialize().
Here is the call graph for this function:
Here is the caller graph for this function:Reload registry from file (for live editing)
Definition at line 192 of file BTEventTypeRegistry.cpp.
References Initialize(), and s_initialized.
Here is the call graph for this function:
|
staticprivate |
Definition at line 98 of file BTEventTypeRegistry.h.
Referenced by GetEventTypeEntry(), InitializeDefaults(), IsValid(), and LoadFromJSON().
|
staticprivate |
Definition at line 97 of file BTEventTypeRegistry.h.
Referenced by GetAllEventTypes(), GetEventTypeEntry(), Initialize(), InitializeDefaults(), and LoadFromJSON().
Definition at line 99 of file BTEventTypeRegistry.h.
Referenced by GetAllEventTypes(), GetEventTypeEntry(), Initialize(), IsValid(), and Reload().