97 template <
typename... Args>
100 this->
value = T(std::forward<Args>(args)...);
Abstract base class representing generic data with type information.
Definition data.hpp:33
virtual ~BaseData()=default
Virtual destructor for BaseData.
BaseData(std::string type)
Constructs a BaseData object with the specified type.
Definition data.hpp:39
std::string type
A string representing the type of the data.
Definition data.hpp:70
bool is_same_type(const BaseData &data) const
Checks if the type of this data matches the type of another BaseData object.
Definition data.hpp:52
virtual void * get_value_ptr() const =0
Pure virtual method to retrieve a pointer to the stored value.
std::string get_type() const
Retrieves the type of the data as a string.
Definition data.hpp:61
Template class for holding data of a specific type.
Definition data.hpp:83
void * get_value_ptr() const override
Retrieves a pointer to the stored value.
Definition data.hpp:113
T value
The value of type T stored in this object.
Definition data.hpp:116
Data(Args &&...args)
Constructs a Data object with the type name of T and initializes its value.
Definition data.hpp:98
T * get_value_ref()
Retrieves a reference to the stored value.
Definition data.hpp:107