API Reference

class h5pp::File

Warning

doxygenclass: Cannot find class “h5pp::File” in doxygen xml output for project “h5pp” from directory: ../xml

enum h5pp::FileAccess

enum class h5pp::FileAccess

File access permissions

See the original file access permissions in the HDF5 Documentation for H5F_CREATE and H5F_OPEN.

h5pp offers more flags for file access permissions than HDF5. The new flags are primarily intended to prevent accidental loss of data, but also to clarify intent and avoid mutually exclusive options.

The flags are listed in the order of increasing “danger” that they pose to previously existing files.

Enumerator

File exists

No file exists

Comment

READONLY

Open with read-only access

Throw error

Never writes to disk, fails if the file is not found

COLLISION_FAIL

Throw error

Create new file

Never deletes existing files and fails if it already exists

RENAME default

Create renamed file

Create new file

Never deletes existing files. Invents a new filename to avoid collision by appending “-#” (#=1,2,3…) to the stem of the filename

READWRITE

Open with read-write access

Create new file

Never deletes existing files, but is allowed to open/modify

BACKUP

Rename existing file and create new

Create new file

Avoids collision by backing up the existing file, appending .bak_# (#=1,2,3…) to the filename

REPLACE

Truncate (overwrite)

Create new file

Deletes the existing file and create a new one in place

  • When a new file is created, the intermediate directories are always created automatically.

  • When a new file is created, READWRITE access to it is implied.

Values:

enumerator READONLY
enumerator COLLISION_FAIL
enumerator RENAME
enumerator READWRITE
enumerator BACKUP
enumerator REPLACE

enum h5pp::TableSelection

enum class h5pp::TableSelection

Choose which row to read/write/copy/move on table operations.

Values:

enumerator FIRST

Selects the first element in a table

enumerator LAST

Selects the last element in a table

enumerator ALL

Selects the all elements in a table

enum h5pp::ResizePolicy

enum class h5pp::ResizePolicy

Set policy for modifying dataset dimensions when overwriting.

Values:

enumerator FIT

Overwriting a dataset will shrink or grow existing dimensions to fit new data (default on H5D_CHUNKED)

enumerator GROW

Overwriting a dataset will may grow existing dimensions, but never shrink, to fit new data (works only on H5D_CHUNKED)

enumerator OFF

Overwriting a dataset will not modify existing dimensions

enum h5pp::LocationMode

enum class h5pp::LocationMode

Specify whether the target location is on the same file or a different one when copying objects.

Values:

enumerator SAME_FILE

Interpret source and target location id’s as being on the same file

enumerator OTHER_FILE

Interpret source and target location id’s as being on different files

enumerator DETECT

Use H5Iget_file_id() to check. This is the default, but avoid when known.