![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Singleton registry for all BT node types. More...
#include <BTNodeRegistry.h>
Public Member Functions | |
| void | RegisterNodeType (const BTNodeTypeInfo &info) |
| Register a new node type. | |
| const BTNodeTypeInfo * | GetNodeTypeInfo (const std::string &typeName) const |
| Get metadata for a node type. | |
| std::vector< std::string > | GetAllNodeTypes () const |
| Get all registered node type names. | |
| std::vector< std::string > | GetNodeTypesByCategory (BTNodeCategory category) const |
| Get node types in a specific category. | |
| bool | IsValidNodeType (const std::string &typeName) const |
| Check if a node type exists. | |
| bool | CanHaveChildren (const std::string &typeName) const |
| Check if a node type can have children. | |
| int | GetMinChildren (const std::string &typeName) const |
| Get minimum number of children for a node type. | |
| int | GetMaxChildren (const std::string &typeName) const |
| Get maximum number of children for a node type. | |
Static Public Member Functions | |
| static BTNodeRegistry & | Get () |
| Get singleton instance. | |
Private Member Functions | |
| BTNodeRegistry () | |
| ~BTNodeRegistry ()=default | |
| BTNodeRegistry (const BTNodeRegistry &)=delete | |
| BTNodeRegistry & | operator= (const BTNodeRegistry &)=delete |
| void | InitializeBuiltInTypes () |
| Initialize all built-in BT node types. | |
Private Attributes | |
| std::map< std::string, BTNodeTypeInfo > | m_nodeTypes |
Singleton registry for all BT node types.
Manages metadata for all behavior tree node types. Automatically initializes built-in types on first access. Provides queries by type name or category.
Definition at line 59 of file BTNodeRegistry.h.
|
private |
Definition at line 29 of file BTNodeRegistry.cpp.
References InitializeBuiltInTypes().
Here is the call graph for this function:
|
privatedefault |
|
privatedelete |
Check if a node type can have children.
| typeName | Type name to check |
Definition at line 464 of file BTNodeRegistry.cpp.
References GetComponentTypeID_Static(), and GetNodeTypeInfo().
Here is the call graph for this function:
|
static |
Get singleton instance.
Definition at line 24 of file BTNodeRegistry.cpp.
References GetComponentTypeID_Static().
Referenced by Olympe::AI::AIEditorGUI::Initialize(), Olympe::AI::BTNodePalette::RenderCategory(), Olympe::AI::AIEditorNodeRenderer::RenderNode(), Olympe::AI::BTNodePalette::RenderNodeButton(), Olympe::AI::AIEditorNodeRenderer::RenderNodeTooltip(), Test10_NodePaletteIntegration(), Test10_RegistryCategoryQuery(), Test1_RegistryInitialization(), Test2_NodeTypeQuery(), Olympe::AI::BTGraphValidator::ValidateChildrenCount(), and Olympe::AI::BTGraphValidator::ValidateNodeTypes().
Here is the call graph for this function:
Here is the caller graph for this function:| std::vector< std::string > Olympe::AI::BTNodeRegistry::GetAllNodeTypes | ( | ) | const |
Get all registered node type names.
Definition at line 437 of file BTNodeRegistry.cpp.
References GetComponentTypeID_Static(), and m_nodeTypes.
Here is the call graph for this function:Get maximum number of children for a node type.
| typeName | Type name to query |
Definition at line 482 of file BTNodeRegistry.cpp.
References GetComponentTypeID_Static(), and GetNodeTypeInfo().
Here is the call graph for this function:Get minimum number of children for a node type.
| typeName | Type name to query |
Definition at line 473 of file BTNodeRegistry.cpp.
References GetComponentTypeID_Static(), and GetNodeTypeInfo().
Here is the call graph for this function:| const BTNodeTypeInfo * Olympe::AI::BTNodeRegistry::GetNodeTypeInfo | ( | const std::string & | typeName | ) | const |
Get metadata for a node type.
| typeName | Node type identifier |
Definition at line 432 of file BTNodeRegistry.cpp.
References GetComponentTypeID_Static(), and m_nodeTypes.
Referenced by CanHaveChildren(), GetMaxChildren(), and GetMinChildren().
Here is the call graph for this function:
Here is the caller graph for this function:| std::vector< std::string > Olympe::AI::BTNodeRegistry::GetNodeTypesByCategory | ( | BTNodeCategory | category | ) | const |
Get node types in a specific category.
| category | Category to filter by |
Definition at line 448 of file BTNodeRegistry.cpp.
References GetComponentTypeID_Static(), and m_nodeTypes.
Here is the call graph for this function:
|
private |
Initialize all built-in BT node types.
Definition at line 33 of file BTNodeRegistry.cpp.
References Olympe::AI::Action, ColorScheme::Action_Primary, Olympe::AI::Composite, ColorScheme::Composite_Primary, Olympe::AI::Condition, Olympe::AI::ConvertColorFormat(), Olympe::AI::Decorator, ColorScheme::EntryPoint_Primary, ColorScheme::FlowControl_Primary, ColorScheme::Inverter_Primary, m_nodeTypes, RegisterNodeType(), ColorScheme::Repeater_Primary, ColorScheme::SubGraph_Primary, and SYSTEM_LOG.
Referenced by BTNodeRegistry().
Here is the call graph for this function:
Here is the caller graph for this function:Check if a node type exists.
| typeName | Type name to check |
Definition at line 460 of file BTNodeRegistry.cpp.
References m_nodeTypes.
|
privatedelete |
| void Olympe::AI::BTNodeRegistry::RegisterNodeType | ( | const BTNodeTypeInfo & | info | ) |
Register a new node type.
| info | Node type metadata |
Definition at line 428 of file BTNodeRegistry.cpp.
References GetComponentTypeID_Static(), and m_nodeTypes.
Referenced by InitializeBuiltInTypes().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 133 of file BTNodeRegistry.h.
Referenced by GetAllNodeTypes(), GetNodeTypeInfo(), GetNodeTypesByCategory(), InitializeBuiltInTypes(), IsValidNodeType(), and RegisterNodeType().