NoJobEngine 2.0.7
Loading...
Searching...
No Matches
NoJob::BTBlackboard Class Reference

#include <BTBlackboard.h>

Classes

struct  DebugEntry

Public Types

using ObserverID = std::uint64_t

Public Member Functions

template<typename T>
void Set (std::string key, T &&value)
void Set (std::string key, const char *value)
template<typename T>
const T * TryGet (std::string_view key) const
template<typename T>
T * TryGet (std::string_view key)
template<typename T>
const T & Get (std::string_view key) const
template<typename T>
T & Get (std::string_view key)
template<typename T>
T GetOr (std::string_view key, T fallback) const
bool Contains (std::string_view key) const
bool Remove (std::string_view key)
void Clear ()
ObserverID Observe (std::string key, std::function< void(std::string_view)> callback)
bool Unobserve (ObserverID id)
std::uint64_t Revision () const noexcept
std::size_t Size () const
std::vector< DebugEntry > DebugEntries () const
std::type_index TypeOf (std::string_view key) const

Detailed Description

Definition at line 25 of file BTBlackboard.h.

Member Typedef Documentation

◆ ObserverID

using NoJob::BTBlackboard::ObserverID = std::uint64_t

Definition at line 96 of file BTBlackboard.h.

Member Function Documentation

◆ Clear()

void NoJob::BTBlackboard::Clear ( )
inline

Definition at line 90 of file BTBlackboard.h.

◆ Contains()

bool NoJob::BTBlackboard::Contains ( std::string_view key) const
inline

Definition at line 80 of file BTBlackboard.h.

◆ DebugEntries()

std::vector< DebugEntry > NoJob::BTBlackboard::DebugEntries ( ) const
inline

◆ Get() [1/2]

template<typename T>
T & NoJob::BTBlackboard::Get ( std::string_view key)
inline

Definition at line 67 of file BTBlackboard.h.

References TryGet().

◆ Get() [2/2]

template<typename T>
const T & NoJob::BTBlackboard::Get ( std::string_view key) const
inline

Definition at line 59 of file BTBlackboard.h.

References TryGet().

◆ GetOr()

template<typename T>
T NoJob::BTBlackboard::GetOr ( std::string_view key,
T fallback ) const
inline

Definition at line 75 of file BTBlackboard.h.

References TryGet().

Referenced by NoJob::BTExampleMover::CreateTree(), and NoJob::BTService::Tick().

◆ Observe()

ObserverID NoJob::BTBlackboard::Observe ( std::string key,
std::function< void(std::string_view)> callback )
inline

Definition at line 97 of file BTBlackboard.h.

Referenced by NoJob::BTDecorator::Tick().

◆ Remove()

bool NoJob::BTBlackboard::Remove ( std::string_view key)
inline

Definition at line 84 of file BTBlackboard.h.

Referenced by NoJob::BTService::Reset().

◆ Revision()

std::uint64_t NoJob::BTBlackboard::Revision ( ) const
inlinenoexcept

Definition at line 104 of file BTBlackboard.h.

◆ Set() [1/2]

void NoJob::BTBlackboard::Set ( std::string key,
const char * value )
inline

Definition at line 41 of file BTBlackboard.h.

References Set().

◆ Set() [2/2]

template<typename T>
void NoJob::BTBlackboard::Set ( std::string key,
T && value )
inline

◆ Size()

std::size_t NoJob::BTBlackboard::Size ( ) const
inline

Definition at line 105 of file BTBlackboard.h.

◆ TryGet() [1/2]

template<typename T>
T * NoJob::BTBlackboard::TryGet ( std::string_view key)
inline

Definition at line 53 of file BTBlackboard.h.

◆ TryGet() [2/2]

template<typename T>
const T * NoJob::BTBlackboard::TryGet ( std::string_view key) const
inline

Definition at line 47 of file BTBlackboard.h.

Referenced by NoJob::CreateBTGameplayRegistry(), Get(), Get(), and GetOr().

◆ TypeOf()

std::type_index NoJob::BTBlackboard::TypeOf ( std::string_view key) const
inline

Definition at line 133 of file BTBlackboard.h.

◆ Unobserve()

bool NoJob::BTBlackboard::Unobserve ( ObserverID id)
inline

Definition at line 103 of file BTBlackboard.h.

Referenced by NoJob::BTDecorator::Reset().


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