98 template <
typename... Args>
99 explicit Data(Args &&...args)
100 :
BaseData(typeid(T).name()),
value(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:71
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()=0
This is an overloaded member function, provided for convenience. It differs from the above function o...
const std::string & get_type() const
Retrieves the type of the data as a string.
Definition data.hpp:61
virtual const void * get_value_ptr() const =0
Pure virtual method to retrieve a pointer to the stored value.
Template class for holding data of a specific type.
Definition data.hpp:84
const void * get_value_ptr() const override
Retrieves a pointer to the stored value.
Definition data.hpp:114
T value
The value of type T stored in this object.
Definition data.hpp:118
Data(Args &&...args)
Constructs a Data object with the type name of T and initializes its value.
Definition data.hpp:99
void * get_value_ptr()
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition data.hpp:115
T * get_value_ref()
Retrieves a reference to the stored value.
Definition data.hpp:108