Skip to content

Commit

Permalink
Add createReference function
Browse files Browse the repository at this point in the history
  • Loading branch information
jsiegle committed Aug 1, 2022
1 parent eaf206c commit cc4ae50
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Source/HDF5FileFormat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{

Expand Down
3 changes: 3 additions & 0 deletions Source/HDF5FileFormat.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cc4ae50

Please sign in to comment.