Ember
Loading...
Searching...
No Matches
EmberCore::BlackboardEntry Class Reference

Represents a single entry in a behavior tree blackboard. More...

#include <BlackboardEntry.h>

Public Types

enum class  DataType {
  BOOL , INT , INT8 , FLOAT ,
  STRING , CURRENCY , UINT8 , UINT32 ,
  SIZE_T , AUTO , VEC_INT , VEC_INT8 ,
  VEC_UINT8 , VEC_UINT32 , VEC_FLOAT , VEC_STRING ,
  VEC_CURRENCY , VEC_VEC_UINT8 , VEC_VEC_UINT32 , VEC_PAIR_FLOAT ,
  PAIR_FLOAT , PAIR_INT , PAIR_STRING , MAP_STRING_STRING ,
  MAP_STRING_INT , SET_STRING , SET_INT , SET_UINT32 ,
  UNKNOWN
}
 Supported data types for blackboard entries. More...

Public Member Functions

 BlackboardEntry ()=default
 BlackboardEntry (const EmberCore::String &key, DataType type, const EmberCore::String &value="")
const EmberCore::StringGetKey () const
DataType GetType () const
const EmberCore::StringGetValue () const
EmberCore::String GetTypeString () const
void SetKey (const EmberCore::String &key)
void SetType (DataType type)
void SetValue (const EmberCore::String &value)
bool IsValidValue () const

Static Public Member Functions

static DataType ParseDataType (const EmberCore::String &typeStr)
static EmberCore::String DataTypeToString (DataType type)

Private Attributes

EmberCore::String key_
DataType type_ = DataType::UNKNOWN
EmberCore::String value_

Detailed Description

Represents a single entry in a behavior tree blackboard.

Blackboard entries store typed data that can be accessed by behavior tree nodes. They support various data types including primitives, collections, and custom types.

Definition at line 17 of file BlackboardEntry.h.

Member Enumeration Documentation

◆ DataType

Supported data types for blackboard entries.

Enumerator
BOOL 
INT 
INT8 
FLOAT 
STRING 
CURRENCY 
UINT8 
UINT32 
SIZE_T 
AUTO 
VEC_INT 
VEC_INT8 
VEC_UINT8 
VEC_UINT32 
VEC_FLOAT 
VEC_STRING 
VEC_CURRENCY 
VEC_VEC_UINT8 
VEC_VEC_UINT32 
VEC_PAIR_FLOAT 
PAIR_FLOAT 
PAIR_INT 
PAIR_STRING 
MAP_STRING_STRING 
MAP_STRING_INT 
SET_STRING 
SET_INT 
SET_UINT32 
UNKNOWN 

Definition at line 22 of file BlackboardEntry.h.

Constructor & Destructor Documentation

◆ BlackboardEntry() [1/2]

EmberCore::BlackboardEntry::BlackboardEntry ( )
default

◆ BlackboardEntry() [2/2]

EmberCore::BlackboardEntry::BlackboardEntry ( const EmberCore::String & key,
DataType type,
const EmberCore::String & value = "" )

Definition at line 8 of file BlackboardEntry.cpp.

Member Function Documentation

◆ DataTypeToString()

EmberCore::String EmberCore::BlackboardEntry::DataTypeToString ( DataType type)
static

Definition at line 89 of file BlackboardEntry.cpp.

◆ GetKey()

const EmberCore::String & EmberCore::BlackboardEntry::GetKey ( ) const
inline

Definition at line 58 of file BlackboardEntry.h.

◆ GetType()

DataType EmberCore::BlackboardEntry::GetType ( ) const
inline

Definition at line 59 of file BlackboardEntry.h.

◆ GetTypeString()

EmberCore::String EmberCore::BlackboardEntry::GetTypeString ( ) const

Definition at line 11 of file BlackboardEntry.cpp.

◆ GetValue()

const EmberCore::String & EmberCore::BlackboardEntry::GetValue ( ) const
inline

Definition at line 60 of file BlackboardEntry.h.

◆ IsValidValue()

bool EmberCore::BlackboardEntry::IsValidValue ( ) const

Definition at line 154 of file BlackboardEntry.cpp.

◆ ParseDataType()

BlackboardEntry::DataType EmberCore::BlackboardEntry::ParseDataType ( const EmberCore::String & typeStr)
static

Definition at line 13 of file BlackboardEntry.cpp.

◆ SetKey()

void EmberCore::BlackboardEntry::SetKey ( const EmberCore::String & key)
inline

Definition at line 64 of file BlackboardEntry.h.

◆ SetType()

void EmberCore::BlackboardEntry::SetType ( DataType type)
inline

Definition at line 65 of file BlackboardEntry.h.

◆ SetValue()

void EmberCore::BlackboardEntry::SetValue ( const EmberCore::String & value)
inline

Definition at line 66 of file BlackboardEntry.h.

Member Data Documentation

◆ key_

EmberCore::String EmberCore::BlackboardEntry::key_
private

Definition at line 76 of file BlackboardEntry.h.

◆ type_

DataType EmberCore::BlackboardEntry::type_ = DataType::UNKNOWN
private

Definition at line 77 of file BlackboardEntry.h.

◆ value_

EmberCore::String EmberCore::BlackboardEntry::value_
private

Definition at line 78 of file BlackboardEntry.h.


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