|
GNode library (C++)
|
Abstract base class representing generic data with type information. More...
#include <data.hpp>

Public Member Functions | |
| BaseData (std::string type) | |
| Constructs a BaseData object with the specified type. | |
| virtual | ~BaseData ()=default |
| Virtual destructor for BaseData. | |
| bool | is_same_type (const BaseData &data) const |
| Checks if the type of this data matches the type of another BaseData object. | |
| std::string | get_type () const |
| Retrieves the type of the data as a string. | |
| virtual void * | get_value_ptr () const =0 |
| Pure virtual method to retrieve a pointer to the stored value. | |
Private Attributes | |
| std::string | type |
| A string representing the type of the data. | |
Abstract base class representing generic data with type information.
The BaseData class provides a common interface for handling data of different types. It stores a type identifier as a string and requires derived classes to implement a method to retrieve a pointer to the stored value.
|
inlineexplicit |
Constructs a BaseData object with the specified type.
| type | A string representing the type of the data. |
|
virtualdefault |
Virtual destructor for BaseData.
|
inline |
Retrieves the type of the data as a string.
|
pure virtual |
Pure virtual method to retrieve a pointer to the stored value.
Implemented in gnode::Data< T >.
|
inline |
|
private |
A string representing the type of the data.