Botcraft 1.21.4
Loading...
Searching...
No Matches
Botcraft::Leaf< Context > Class Template Referencefinal

#include <BehaviourTree.hpp>

Inheritance diagram for Botcraft::Leaf< Context >:
Botcraft::Node< Context > Botcraft::BaseNode

Public Member Functions

 Leaf ()=delete
 
template<typename FuncType >
 Leaf (const std::string &s, FuncType func_)
 
template<typename FuncType , typename... Args>
 Leaf (const std::string &s, FuncType func_, Args &&... args)
 
virtual ~Leaf ()
 
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

virtual Status TickImpl (Context &context) const override
 

Private Attributes

std::function< Status(Context &)> func
 

Additional Inherited Members

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

Detailed Description

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

Definition at line 171 of file BehaviourTree.hpp.

Constructor & Destructor Documentation

◆ Leaf() [1/3]

template<typename Context >
Botcraft::Leaf< Context >::Leaf ( )
delete

◆ Leaf() [2/3]

template<typename Context >
template<typename FuncType >
Botcraft::Leaf< Context >::Leaf ( const std::string &  s,
FuncType  func_ 
)
inline

Definition at line 177 of file BehaviourTree.hpp.

◆ Leaf() [3/3]

template<typename Context >
template<typename FuncType , typename... Args>
Botcraft::Leaf< Context >::Leaf ( const std::string &  s,
FuncType  func_,
Args &&...  args 
)
inline

Definition at line 180 of file BehaviourTree.hpp.

References Botcraft::Leaf< Context >::func.

◆ ~Leaf()

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

Definition at line 185 of file BehaviourTree.hpp.

Member Function Documentation

◆ GetChild()

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

Implements Botcraft::BaseNode.

Definition at line 197 of file BehaviourTree.hpp.

◆ GetNodeType()

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

Implements Botcraft::BaseNode.

Definition at line 187 of file BehaviourTree.hpp.

References Botcraft::Leaf.

◆ GetNumChildren()

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

Implements Botcraft::BaseNode.

Definition at line 192 of file BehaviourTree.hpp.

◆ TickImpl()

template<typename Context >
virtual Status Botcraft::Leaf< Context >::TickImpl ( Context &  context) const
inlineoverrideprotectedvirtual

Member Data Documentation

◆ func

template<typename Context >
std::function<Status(Context&)> Botcraft::Leaf< Context >::func
private

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