diff --git a/Source/HDF5FileFormat.cpp b/Source/HDF5FileFormat.cpp index 69b9cf5..7bb804b 100644 --- a/Source/HDF5FileFormat.cpp +++ b/Source/HDF5FileFormat.cpp @@ -342,6 +342,19 @@ HDF5RecordingData* HDF5FileBase::getDataSet(String path) } } + +void HDF5FileBase::createReference(String path, String reference) +{ + + H5Lcreate_hard(file->getLocId(), + reference.getCharPointer(), + file->getLocId(), + path.getCharPointer(), + H5P_DEFAULT, + H5P_DEFAULT); + +} + void HDF5FileBase::createReferenceDataSet(String path, StringArray references) { diff --git a/Source/HDF5FileFormat.h b/Source/HDF5FileFormat.h index b61d72d..adb2082 100644 --- a/Source/HDF5FileFormat.h +++ b/Source/HDF5FileFormat.h @@ -139,6 +139,9 @@ class COMMON_LIB HDF5FileBase /** Creates a dataset that holds an array of references to groups within the file */ void createReferenceDataSet(String path, StringArray references); + /** Creates a reference to another location in the file */ + void createReference(String path, String reference); + /** aliases for createDataSet */ HDF5RecordingData* createDataSet(BaseDataType type, int sizeX, int chunkX, String path); HDF5RecordingData* createDataSet(BaseDataType type, int sizeX, int sizeY, int chunkX, String path);