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

#include <BehaviourTree.hpp>

Public Member Functions

 Builder (const std::string &name="")
 
template<typename S , typename... Args, typename = typename std::enable_if_t<std::is_convertible_v<S, std::string>>>
std::shared_ptr< BehaviourTree< Context > > leaf (const S &s, Args &&... args)
 
template<typename... Args>
std::shared_ptr< BehaviourTree< Context > > leaf (Args &&... args)
 
CompositeBuilder< Builder, Context > sequence (const std::string &s="")
 
CompositeBuilder< Builder, Context > selector (const std::string &s="")
 
template<typename CompositeType , typename... Args, typename S , typename = typename std::enable_if_t<std::is_convertible_v<S, std::string>>>
CompositeBuilder< Builder, Context > composite (const S &s, Args &&... args)
 
template<typename CompositeType , typename... Args>
CompositeBuilder< Builder, Context > composite (Args &&... args)
 
DecoratorBuilder< Builder, Context > inverter (const std::string &s="")
 
DecoratorBuilder< Builder, Context > succeeder (const std::string &s="")
 
DecoratorBuilder< Builder, Context > repeater (const size_t n)
 
DecoratorBuilder< Builder, Context > repeater (const std::string &s, const size_t n)
 
template<typename DecoratorType , typename... Args, typename S , typename = typename std::enable_if_t<std::is_convertible_v<S, std::string>>>
DecoratorBuilder< Builder, Context > decorator (const S &s, Args &&... args)
 
template<typename DecoratorType , typename... Args>
DecoratorBuilder< Builder, Context > decorator (Args &&... args)
 

Private Member Functions

std::shared_ptr< BehaviourTree< Context > > build ()
 

Private Attributes

friend DecoratorBuilder< Builder, Context >
 
friend CompositeBuilder< Builder, Context >
 
const std::string root_name
 
std::shared_ptr< Node< Context > > root
 

Detailed Description

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

Definition at line 736 of file BehaviourTree.hpp.

Constructor & Destructor Documentation

◆ Builder()

template<typename Context >
Botcraft::Builder< Context >::Builder ( const std::string &  name = "")
inline

Definition at line 739 of file BehaviourTree.hpp.

Member Function Documentation

◆ build()

template<typename Context >
std::shared_ptr< BehaviourTree< Context > > Botcraft::Builder< Context >::build ( )
inlineprivate

◆ composite() [1/2]

template<typename Context >
template<typename CompositeType , typename... Args>
CompositeBuilder< Builder, Context > Botcraft::Builder< Context >::composite ( Args &&...  args)
inline

◆ composite() [2/2]

template<typename Context >
template<typename CompositeType , typename... Args, typename S , typename = typename std::enable_if_t<std::is_convertible_v<S, std::string>>>
CompositeBuilder< Builder, Context > Botcraft::Builder< Context >::composite ( const S &  s,
Args &&...  args 
)
inline

◆ decorator() [1/2]

template<typename Context >
template<typename DecoratorType , typename... Args>
DecoratorBuilder< Builder, Context > Botcraft::Builder< Context >::decorator ( Args &&...  args)
inline

◆ decorator() [2/2]

template<typename Context >
template<typename DecoratorType , typename... Args, typename S , typename = typename std::enable_if_t<std::is_convertible_v<S, std::string>>>
DecoratorBuilder< Builder, Context > Botcraft::Builder< Context >::decorator ( const S &  s,
Args &&...  args 
)
inline

◆ inverter()

template<typename Context >
DecoratorBuilder< Builder, Context > Botcraft::Builder< Context >::inverter ( const std::string &  s = "")
inline

◆ leaf() [1/2]

template<typename Context >
template<typename... Args>
std::shared_ptr< BehaviourTree< Context > > Botcraft::Builder< Context >::leaf ( Args &&...  args)
inline

Definition at line 753 of file BehaviourTree.hpp.

References Botcraft::Builder< Context >::root_name.

◆ leaf() [2/2]

template<typename Context >
template<typename S , typename... Args, typename = typename std::enable_if_t<std::is_convertible_v<S, std::string>>>
std::shared_ptr< BehaviourTree< Context > > Botcraft::Builder< Context >::leaf ( const S &  s,
Args &&...  args 
)
inline

Definition at line 746 of file BehaviourTree.hpp.

References Botcraft::Builder< Context >::root_name.

◆ repeater() [1/2]

template<typename Context >
DecoratorBuilder< Builder, Context > Botcraft::Builder< Context >::repeater ( const size_t  n)
inline

◆ repeater() [2/2]

template<typename Context >
DecoratorBuilder< Builder, Context > Botcraft::Builder< Context >::repeater ( const std::string &  s,
const size_t  n 
)
inline

◆ selector()

template<typename Context >
CompositeBuilder< Builder, Context > Botcraft::Builder< Context >::selector ( const std::string &  s = "")
inline

◆ sequence()

template<typename Context >
CompositeBuilder< Builder, Context > Botcraft::Builder< Context >::sequence ( const std::string &  s = "")
inline

◆ succeeder()

template<typename Context >
DecoratorBuilder< Builder, Context > Botcraft::Builder< Context >::succeeder ( const std::string &  s = "")
inline

Member Data Documentation

◆ CompositeBuilder< Builder, Context >

template<typename Context >
friend Botcraft::Builder< Context >::CompositeBuilder< Builder, Context >
private

◆ DecoratorBuilder< Builder, Context >

◆ root

◆ root_name

template<typename Context >
const std::string Botcraft::Builder< Context >::root_name
private

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