Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
BehaviorTreeManager Class Reference

#include <BehaviorTree.h>

Public Member Functions

bool LoadTreeFromFile (const std::string &filepath, uint32_t treeId)
 
bool ReloadTree (uint32_t treeId)
 
bool ValidateTree (const BehaviorTreeAsset &tree, std::string &errorMessage) const
 
const BehaviorTreeAssetGetTree (uint32_t treeId) const
 
void Clear ()
 
uint32_t GetTreeIdFromPath (const std::string &treePath) const
 
bool IsTreeLoadedByPath (const std::string &treePath) const
 
const BehaviorTreeAssetGetTreeByPath (const std::string &treePath) const
 
const BehaviorTreeAssetGetTreeByAnyId (uint32_t treeId) const
 
std::string GetTreePathFromId (uint32_t treeId) const
 
void DebugPrintLoadedTrees () const
 

Static Public Member Functions

static BehaviorTreeManagerGet ()
 

Private Member Functions

 BehaviorTreeManager ()=default
 

Private Attributes

std::vector< BehaviorTreeAssetm_trees
 
std::map< std::string, uint32_tm_pathToIdMap
 

Detailed Description

Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/AI/BehaviorTree.h.

Definition at line 244 of file BehaviorTree.h.

Constructor & Destructor Documentation

◆ BehaviorTreeManager()

BehaviorTreeManager::BehaviorTreeManager ( )
privatedefault

Member Function Documentation

◆ Clear()

void BehaviorTreeManager::Clear ( )

◆ DebugPrintLoadedTrees()

void BehaviorTreeManager::DebugPrintLoadedTrees ( ) const

◆ Get()

static BehaviorTreeManager & BehaviorTreeManager::Get ( )
inlinestatic

◆ GetTree()

const BehaviorTreeAsset * BehaviorTreeManager::GetTree ( uint32_t  treeId) const
Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/AI/BehaviorTree.h.

Definition at line 281 of file BehaviorTree.cpp.

References GetComponentTypeID_Static(), and m_trees.

Referenced by GetTreeByPath(), and PrefabFactory::InstantiateBehaviorTreeRuntime().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTreeByAnyId()

const BehaviorTreeAsset * BehaviorTreeManager::GetTreeByAnyId ( uint32_t  treeId) const

◆ GetTreeByPath()

const BehaviorTreeAsset * BehaviorTreeManager::GetTreeByPath ( const std::string &  treePath) const
Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/AI/BehaviorTree.h.

Definition at line 833 of file BehaviorTree.cpp.

References GetComponentTypeID_Static(), GetTree(), and GetTreeIdFromPath().

Referenced by BehaviorTreeSystem::Process().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTreeIdFromPath()

uint32_t BehaviorTreeManager::GetTreeIdFromPath ( const std::string &  treePath) const
Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/AI/BehaviorTree.h.

Definition at line 817 of file BehaviorTree.cpp.

References BehaviorTreeDependencyScanner::GenerateTreeIdFromPath(), GetComponentTypeID_Static(), and m_pathToIdMap.

Referenced by GetTreeByPath(), and PrefabFactory::InstantiateBehaviorTreeRuntime().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTreePathFromId()

std::string BehaviorTreeManager::GetTreePathFromId ( uint32_t  treeId) const

◆ IsTreeLoadedByPath()

bool BehaviorTreeManager::IsTreeLoadedByPath ( const std::string &  treePath) const
Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/AI/BehaviorTree.h.

Definition at line 828 of file BehaviorTree.cpp.

References m_pathToIdMap.

Referenced by World::LoadLevelDependencies().

+ Here is the caller graph for this function:

◆ LoadTreeFromFile()

bool BehaviorTreeManager::LoadTreeFromFile ( const std::string &  filepath,
uint32_t  treeId 
)

◆ ReloadTree()

bool BehaviorTreeManager::ReloadTree ( uint32_t  treeId)

◆ ValidateTree()

bool BehaviorTreeManager::ValidateTree ( const BehaviorTreeAsset tree,
std::string &  errorMessage 
) const
Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/AI/BehaviorTree.h.

Definition at line 327 of file BehaviorTree.cpp.

References GetComponentTypeID_Static(), Inverter, BTNode::name, Repeater, Selector, and Sequence.

Referenced by LoadTreeFromFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_pathToIdMap

std::map<std::string, uint32_t> BehaviorTreeManager::m_pathToIdMap
private

◆ m_trees

std::vector<BehaviorTreeAsset> BehaviorTreeManager::m_trees
private

The documentation for this class was generated from the following files: