DataLoader
DataLoader
Abstract base class for data loaders. More…
#include <DataLoader.hpp>
Inherited by CapnProtoLoader, HDF5Loader, NumpyLoader, OpenCVLoader
Public Functions
| Name | |
|---|---|
| virtual | ~DataLoader() =default |
| virtual std::string | getFormatId() const =0 Get the format identifier (e.g., “capnp”, “hdf5”, “binary”). |
| virtual bool | supportsDataType(DM_DataType data_type) const =0 Check if this loader supports the given data type. |
| virtual LoadResult | loadData(std::string const & file_path, DM_DataType data_type, nlohmann::json const & config) const =0 Load data from file. |
Detailed Description
class DataLoader;Abstract base class for data loaders.
Each format plugin (e.g., CapnProto, HDF5) should inherit from this and implement loading for the data types it supports.
Public Functions Documentation
function ~DataLoader
virtual ~DataLoader() =defaultfunction getFormatId
virtual std::string getFormatId() const =0Get the format identifier (e.g., “capnp”, “hdf5”, “binary”).
Reimplemented by: CapnProtoLoader::getFormatId, HDF5Loader::getFormatId, NumpyLoader::getFormatId, OpenCVLoader::getFormatId
function supportsDataType
virtual bool supportsDataType(
DM_DataType data_type
) const =0Check if this loader supports the given data type.
Reimplemented by: CapnProtoLoader::supportsDataType, HDF5Loader::supportsDataType, NumpyLoader::supportsDataType, OpenCVLoader::supportsDataType
function loadData
virtual LoadResult loadData(
std::string const & file_path,
DM_DataType data_type,
nlohmann::json const & config
) const =0Load data from file.
Parameters:
- file_path Path to the data file
- data_type The type of data to load
- config JSON configuration from the loading config
Return: LoadResult containing the loaded data or error information
Reimplemented by: CapnProtoLoader::loadData, HDF5Loader::loadData, NumpyLoader::loadData, OpenCVLoader::loadData
Updated on 2026-11-13 at 20:25:41 +0000