C++ YASMIN (Yet Another State MachINe)
|
A template class that wraps a value of type T. More...
#include <blackboard_value.hpp>
Public Member Functions | |
BlackboardValue (T value) | |
Constructs a BlackboardValue with the specified value. | |
T | get () |
Retrieve the stored value. | |
void | set (T value) |
Set a new value. | |
std::string | get_type () |
Get the type of the stored value as a string. | |
std::string | to_string () |
Convert the stored value's type information to a string. | |
Public Member Functions inherited from yasmin::blackboard::BlackboardValueInterface | |
virtual | ~BlackboardValueInterface () |
Virtual destructor for the interface. | |
Private Attributes | |
T | value |
The stored value of type T. | |
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.
T | The type of the value to be stored. |
|
inline |
Constructs a BlackboardValue with the specified value.
value | The initial value to store. |
|
inline |
Retrieve the stored value.
|
inline |
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).
|
inline |
Set a new value.
value | The new value to store. |
|
inlinevirtual |
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.
Reimplemented from yasmin::blackboard::BlackboardValueInterface.
|
private |
The stored value of type T.