Defined in File data_loader.hpp
-
class DataLoader
Class for managing and loading data using different loaders.
This class manages a set of Loader objects and provides methods for registering, removing, and loading data using these objects. It also defines a method for loading control messages from data sources using the registered loaders.
Public Functions
- DataLoader()
Default constructor for the DataLoader class.
- ~DataLoader() = default
Destructor for the DataLoader class.
Method for loading a control message using the registered loaders.
- Parameters
- Returns
control_message – A shared pointer to the control message to be loaded.
A shared pointer to the loaded control message.
Method for registering a loader instance with the data loader.
- Parameters
loader_id – A string identifier for the loader instance.
loader – A shared pointer to the Loader object to be registered.
overwrite – A boolean indicating whether to overwrite an existing loader instance with the same identifier.
-
void remove_loader(const std::string &loader_id, bool throw_if_not_found = true)
Method for removing a loader instance from the data loader.
- Parameters
loader_id – A string identifier for the loader instance to be removed.
throw_if_not_found – A boolean indicating whether to throw an exception if the loader instance with the given identifier is not found.