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

Represents a blackboard containing multiple entries. More...

#include <BlackboardEntry.h>

Public Member Functions

 Blackboard ()=default
 Blackboard (const EmberCore::String &id)
const EmberCore::StringGetId () const
void SetId (const EmberCore::String &id)
const EmberCore::StringGetParentId () const
void SetParentId (const EmberCore::String &parentId)
void AddEntry (std::unique_ptr< BlackboardEntry > entry)
void AddEntry (const EmberCore::String &key, BlackboardEntry::DataType type, const EmberCore::String &value="")
BlackboardEntryGetEntry (const EmberCore::String &key)
const BlackboardEntryGetEntry (const EmberCore::String &key) const
bool HasEntry (const EmberCore::String &key) const
void RemoveEntry (const EmberCore::String &key)
const std::map< EmberCore::String, std::unique_ptr< BlackboardEntry > > & GetEntries () const
size_t GetEntryCount () const
void Clear ()
std::unique_ptr< BlackboardClone () const

Private Attributes

EmberCore::String id_
EmberCore::String parent_id_
std::map< EmberCore::String, std::unique_ptr< BlackboardEntry > > entries_

Detailed Description

Represents a blackboard containing multiple entries.

Blackboards can inherit from parent blackboards and contain multiple typed entries.

Definition at line 86 of file BlackboardEntry.h.

Constructor & Destructor Documentation

◆ Blackboard() [1/2]

EmberCore::Blackboard::Blackboard ( )
default

◆ Blackboard() [2/2]

EmberCore::Blackboard::Blackboard ( const EmberCore::String & id)
explicit

Definition at line 170 of file BlackboardEntry.cpp.

Member Function Documentation

◆ AddEntry() [1/2]

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

Definition at line 188 of file BlackboardEntry.cpp.

◆ AddEntry() [2/2]

void EmberCore::Blackboard::AddEntry ( std::unique_ptr< BlackboardEntry > entry)

Definition at line 172 of file BlackboardEntry.cpp.

◆ Clear()

void EmberCore::Blackboard::Clear ( )

Definition at line 214 of file BlackboardEntry.cpp.

◆ Clone()

std::unique_ptr< Blackboard > EmberCore::Blackboard::Clone ( ) const

Definition at line 219 of file BlackboardEntry.cpp.

◆ GetEntries()

const std::map< EmberCore::String, std::unique_ptr< BlackboardEntry > > & EmberCore::Blackboard::GetEntries ( ) const
inline

Definition at line 109 of file BlackboardEntry.h.

◆ GetEntry() [1/2]

BlackboardEntry * EmberCore::Blackboard::GetEntry ( const EmberCore::String & key)

Definition at line 194 of file BlackboardEntry.cpp.

◆ GetEntry() [2/2]

const BlackboardEntry * EmberCore::Blackboard::GetEntry ( const EmberCore::String & key) const

Definition at line 199 of file BlackboardEntry.cpp.

◆ GetEntryCount()

size_t EmberCore::Blackboard::GetEntryCount ( ) const
inline

Definition at line 110 of file BlackboardEntry.h.

◆ GetId()

const EmberCore::String & EmberCore::Blackboard::GetId ( ) const
inline

Definition at line 92 of file BlackboardEntry.h.

◆ GetParentId()

const EmberCore::String & EmberCore::Blackboard::GetParentId ( ) const
inline

Definition at line 95 of file BlackboardEntry.h.

◆ HasEntry()

bool EmberCore::Blackboard::HasEntry ( const EmberCore::String & key) const

Definition at line 204 of file BlackboardEntry.cpp.

◆ RemoveEntry()

void EmberCore::Blackboard::RemoveEntry ( const EmberCore::String & key)

Definition at line 206 of file BlackboardEntry.cpp.

◆ SetId()

void EmberCore::Blackboard::SetId ( const EmberCore::String & id)
inline

Definition at line 93 of file BlackboardEntry.h.

◆ SetParentId()

void EmberCore::Blackboard::SetParentId ( const EmberCore::String & parentId)
inline

Definition at line 96 of file BlackboardEntry.h.

Member Data Documentation

◆ entries_

std::map<EmberCore::String, std::unique_ptr<BlackboardEntry> > EmberCore::Blackboard::entries_
private

Definition at line 119 of file BlackboardEntry.h.

◆ id_

EmberCore::String EmberCore::Blackboard::id_
private

Definition at line 117 of file BlackboardEntry.h.

◆ parent_id_

EmberCore::String EmberCore::Blackboard::parent_id_
private

Definition at line 118 of file BlackboardEntry.h.


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