Botcraft 1.21.4
Loading...
Searching...
No Matches
Botcraft::Composite< Context > Class Template Reference

#include <BehaviourTree.hpp>

Inheritance diagram for Botcraft::Composite< Context >:
Botcraft::Node< Context > Botcraft::BaseNode Botcraft::Selector< Context > Botcraft::Sequence< Context >

Public Member Functions

virtual ~Composite ()
 
void AddChild (const std::shared_ptr< Node< Context > > &child)
 
virtual BehaviourNodeType GetNodeType () const override
 
virtual size_t GetNumChildren () const override
 
virtual const BaseNodeGetChild (const size_t index) const override
 
- Public Member Functions inherited from Botcraft::Node< Context >
virtual ~Node ()
 
Status Tick (Context &context) const
 
- Public Member Functions inherited from Botcraft::BaseNode
 BaseNode (const std::string &name_)
 
virtual ~BaseNode ()
 
std::string GetFullDescriptor () const
 
const std::string & GetName () const
 
std::string GetClassName () const
 

Protected Member Functions

Status TickChild (Context &context, const size_t index) const
 
- Protected Member Functions inherited from Botcraft::Node< Context >
virtual Status TickImpl (Context &context) const =0
 

Private Attributes

std::vector< std::shared_ptr< Node< Context > > > children
 

Additional Inherited Members

- Protected Attributes inherited from Botcraft::BaseNode
const std::string name
 

Detailed Description

template<typename Context>
class Botcraft::Composite< Context >

Definition at line 56 of file BehaviourTree.hpp.

Constructor & Destructor Documentation

◆ ~Composite()

template<typename Context >
virtual Botcraft::Composite< Context >::~Composite ( )
inlinevirtual

Definition at line 60 of file BehaviourTree.hpp.

Member Function Documentation

◆ AddChild()

template<typename Context >
void Botcraft::Composite< Context >::AddChild ( const std::shared_ptr< Node< Context > > &  child)
inline

Definition at line 62 of file BehaviourTree.hpp.

References Botcraft::Composite< Context >::children.

◆ GetChild()

template<typename Context >
virtual const BaseNode * Botcraft::Composite< Context >::GetChild ( const size_t  index) const
inlineoverridevirtual

Implements Botcraft::BaseNode.

Definition at line 77 of file BehaviourTree.hpp.

References Botcraft::Composite< Context >::children.

◆ GetNodeType()

template<typename Context >
virtual BehaviourNodeType Botcraft::Composite< Context >::GetNodeType ( ) const
inlineoverridevirtual

Implements Botcraft::BaseNode.

Definition at line 67 of file BehaviourTree.hpp.

References Botcraft::Composite.

◆ GetNumChildren()

template<typename Context >
virtual size_t Botcraft::Composite< Context >::GetNumChildren ( ) const
inlineoverridevirtual

◆ TickChild()

template<typename Context >
Status Botcraft::Composite< Context >::TickChild ( Context &  context,
const size_t  index 
) const
inlineprotected

Member Data Documentation

◆ children

template<typename Context >
std::vector<std::shared_ptr<Node<Context> > > Botcraft::Composite< Context >::children
private

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