Template Class BlackboardValue

Inheritance Relationships

Base Type

Class Documentation

template<class T>
class BlackboardValue : public yasmin::blackboard::BlackboardValueInterface

A template class that wraps a value of type T.

The BlackboardValue class is a template that stores a value of any type T. It provides methods to get and set the value, as well as to retrieve the type information of the value in a human-readable format.

Template Parameters:

T – The type of the value to be stored.

Public Functions

inline BlackboardValue(T value)

Constructs a BlackboardValue with the specified value.

Parameters:

value – The initial value to store.

inline T get()

Retrieve the stored value.

Returns:

The stored value of type T.

inline void set(T value)

Set a new value.

Parameters:

value – The new value to store.

inline std::string get_type()

Get the type of the stored value as a string.

This method uses RTTI to get the mangled name of the type and demangles it for readability (if using GCC).

Returns:

A string representation of the type of the stored value.

inline virtual std::string to_string()

Convert the stored value’s type information to a string.

This method overrides the to_string method from the BlackboardValueInterface to provide the type of the value.

Returns:

A string representation of the type of the stored value.