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

#include <BehaviorTree.h>

Public Member Functions

void Push (const std::string &path)
 Push a subgraph path onto the stack.
 
void Pop ()
 Pop a subgraph path from the stack.
 
bool Contains (const std::string &path) const
 Check if a path is already on the stack (cycle detection)
 
bool IsFull () const
 Check if maximum depth has been reached.
 
void Clear ()
 Clear the stack.
 
int GetDepth () const
 Get current depth.
 

Public Attributes

std::vector< std::string > pathStack
 Stack of active subgraph paths.
 
int depth = 0
 Current recursion depth.
 

Static Public Attributes

static const int MAX_DEPTH = 32
 Maximum recursion depth limit.
 

Detailed Description

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

Definition at line 319 of file BehaviorTree.h.

Member Function Documentation

◆ Clear()

void SubGraphCallStack::Clear ( )
inline

Clear the stack.

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

Definition at line 361 of file BehaviorTree.h.

References depth, and pathStack.

◆ Contains()

bool SubGraphCallStack::Contains ( const std::string &  path) const
inline

Check if a path is already on the stack (cycle detection)

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

Definition at line 344 of file BehaviorTree.h.

References GetComponentTypeID_Static(), and pathStack.

+ Here is the call graph for this function:

◆ GetDepth()

int SubGraphCallStack::GetDepth ( ) const
inline

Get current depth.

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

Definition at line 368 of file BehaviorTree.h.

References depth.

◆ IsFull()

bool SubGraphCallStack::IsFull ( ) const
inline

Check if maximum depth has been reached.

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

Definition at line 355 of file BehaviorTree.h.

References depth, and MAX_DEPTH.

◆ Pop()

void SubGraphCallStack::Pop ( )
inline

Pop a subgraph path from the stack.

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

Definition at line 334 of file BehaviorTree.h.

References depth, and pathStack.

◆ Push()

void SubGraphCallStack::Push ( const std::string &  path)
inline

Push a subgraph path onto the stack.

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

Definition at line 327 of file BehaviorTree.h.

References depth, and pathStack.

Member Data Documentation

◆ depth

int SubGraphCallStack::depth = 0

Current recursion depth.

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

Definition at line 322 of file BehaviorTree.h.

Referenced by Clear(), GetDepth(), IsFull(), Pop(), and Push().

◆ MAX_DEPTH

const int SubGraphCallStack::MAX_DEPTH = 32
static

◆ pathStack

std::vector<std::string> SubGraphCallStack::pathStack

Stack of active subgraph paths.

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

Definition at line 321 of file BehaviorTree.h.

Referenced by Clear(), Contains(), Pop(), and Push().


The documentation for this struct was generated from the following file: