Antkeeper  0.0.1
Public Types | Public Member Functions | Public Attributes | List of all members
ai::bt::condition< T > Struct Template Reference

Evaluates a boolean condition (predicate) and returns either status::success or status::failure. More...

#include <node.hpp>

Inheritance diagram for ai::bt::condition< T >:
ai::bt::node< T >

Public Types

typedef std::function< status(const node< T >::context_type &)> predicate_type
 
- Public Types inherited from ai::bt::node< T >
typedef T context_type
 Data type on which nodes operate. More...
 

Public Member Functions

virtual status execute (node< T >::context_type &context) const final
 
- Public Member Functions inherited from ai::bt::node< T >
virtual status execute (context_type &context) const =0
 Executes a node's function and returns its status. More...
 

Public Attributes

predicate_type predicate
 

Detailed Description

template<class T>
struct ai::bt::condition< T >

Evaluates a boolean condition (predicate) and returns either status::success or status::failure.

Definition at line 77 of file node.hpp.

Member Typedef Documentation

◆ predicate_type

template<class T >
typedef std::function<status(const node<T>::context_type&)> ai::bt::condition< T >::predicate_type

Definition at line 80 of file node.hpp.

Member Function Documentation

◆ execute()

template<class T >
status ai::bt::condition< T >::execute ( node< T >::context_type context) const
finalvirtual

Definition at line 127 of file node.hpp.

Member Data Documentation

◆ predicate

template<class T >
predicate_type ai::bt::condition< T >::predicate

Definition at line 81 of file node.hpp.


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