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

#include <BehaviourTree.hpp>

Inheritance diagram for Botcraft::Decorator< Context >:
Botcraft::Node< Context > Botcraft::BaseNode Botcraft::Inverter< Context > Botcraft::Repeater< Context > Botcraft::Succeeder< Context >

Public Member Functions

virtual ~Decorator ()
 
void SetChild (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
 
- Protected Member Functions inherited from Botcraft::Node< Context >
virtual Status TickImpl (Context &context) const =0
 

Private Attributes

std::shared_ptr< Node< Context > > child
 

Additional Inherited Members

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

Detailed Description

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

Definition at line 116 of file BehaviourTree.hpp.

Constructor & Destructor Documentation

◆ ~Decorator()

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

Definition at line 120 of file BehaviourTree.hpp.

Member Function Documentation

◆ GetChild()

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

Implements Botcraft::BaseNode.

Definition at line 137 of file BehaviourTree.hpp.

References Botcraft::Decorator< Context >::child.

◆ GetNodeType()

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

Implements Botcraft::BaseNode.

Definition at line 127 of file BehaviourTree.hpp.

References Botcraft::Decorator.

◆ GetNumChildren()

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

Implements Botcraft::BaseNode.

Definition at line 132 of file BehaviourTree.hpp.

References Botcraft::Decorator< Context >::child.

◆ SetChild()

template<typename Context >
void Botcraft::Decorator< Context >::SetChild ( std::shared_ptr< Node< Context > >  child_)
inline

Definition at line 122 of file BehaviourTree.hpp.

References Botcraft::Decorator< Context >::child.

◆ TickChild()

template<typename Context >
Status Botcraft::Decorator< Context >::TickChild ( Context &  context) const
inlineprotected

Member Data Documentation

◆ child


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