Public Member Functions | Static Public Attributes | Private Attributes | List of all members
HighFive::File Class Reference

File class. More...

#include <H5File.hpp>

Inheritance diagram for HighFive::File:
Inheritance graph
[legend]

Public Member Functions

 File (const std::string &filename, int openFlags=ReadOnly, const Properties &fileAccessProps=FileDriver())
 File. More...
 
void flush ()
 flush More...
 
const std::string & getName () const
 Return the name of the file. More...
 
- Public Member Functions inherited from HighFive::Object
hid_t getId () const
 getId More...
 
bool isValid () const
 isValid More...
 
 ~Object ()
 
- Public Member Functions inherited from HighFive::NodeTraits< File >
DataSet createDataSet (const std::string &dataset_name, const DataSpace &space, const DataSetCreateProps &createProps=DataSetCreateProps(), const DataSetAccessProps &accessProps=DataSetAccessProps())
 createDataSet create a new dataset in the current file with a size specified by space More...
 
DataSet createDataSet (const std::string &dataset_name, const DataSpace &space, const DataType &type, const DataSetCreateProps &createProps=DataSetCreateProps(), const DataSetAccessProps &accessProps=DataSetAccessProps())
 createDataSet Create a new dataset in the current file of datatype type and of size space More...
 
DataSet createDataSet (const std::string &dataset_name, const T &data, const DataSetCreateProps &createProps=DataSetCreateProps(), const DataSetAccessProps &accessProps=DataSetAccessProps())
 createDataSet create a new dataset in the current file and write to it, inferring the DataSpace from the data. More...
 
Group createGroup (const std::string &group_name)
 create a new group with the name group_name More...
 
bool exist (const std::string &node_name) const
 check a dataset or group exists in the current node / group More...
 
DataSet getDataSet (const std::string &dataset_name, const DataSetAccessProps &accessProps=DataSetAccessProps()) const
 get an existing dataset in the current file More...
 
Group getGroup (const std::string &group_name) const
 open an existing group with the name group_name More...
 
size_t getNumberObjects () const
 return the number of leaf objects of the node / group More...
 
std::string getObjectName (size_t index) const
 return the name of the object with the given index More...
 
std::vector< std::string > listObjectNames () const
 list all leaf objects name of the node / group More...
 
- Public Member Functions inherited from HighFive::AnnotateTraits< File >
Attribute createAttribute (const std::string &attribute_name, const DataSpace &space)
 createAttribute create a new attribute on the current dataset with size specified by space More...
 
Attribute createAttribute (const std::string &attribute_name, const DataSpace &space, const DataType &type)
 create a new attribute with the name attribute_name More...
 
Attribute createAttribute (const std::string &attribute_name, const T &data)
 createAttribute create a new attribute on the current dataset and write to it, inferring the DataSpace from data. More...
 
Attribute getAttribute (const std::string &attribute_name) const
 open an existing attribute with the name attribute_name More...
 
size_t getNumberAttributes () const
 return the number of attributes of the node / group More...
 
bool hasAttribute (const std::string &attr_name) const
 checks an attribute exists More...
 
std::vector< std::string > listAttributeNames () const
 list all attribute name of the node / group More...
 

Static Public Attributes

static const int Create = 0x10
 Open flag: Create non existing file. More...
 
static const int Debug = 0x08
 Open flag: Open in debug mode. More...
 
static const int Excl = 0x04
 Open flag: Open will fail if file already exist. More...
 
static const int OpenOrCreate = ReadWrite | Create
 Derived open flag: Opens RW or exclusivelly creates. More...
 
static const int Overwrite = Truncate
 Derived open flag: common write mode (=ReadWrite | Create | Truncate) More...
 
static const int ReadOnly = 0x00
 Open flag: Read only access. More...
 
static const int ReadWrite = 0x01
 Open flag: Read Write access. More...
 
static const int Truncate = 0x02
 Open flag: Truncate a file if already existing. More...
 

Private Attributes

std::string _filename
 

Additional Inherited Members

- Protected Member Functions inherited from HighFive::Object
 Object ()
 
 Object (const Object &other)
 
Objectoperator= (const Object &other)
 
- Protected Attributes inherited from HighFive::Object
hid_t _hid
 

Detailed Description

File class.

Definition at line 25 of file H5File.hpp.

Constructor & Destructor Documentation

◆ File()

HighFive::File::File ( const std::string &  filename,
int  openFlags = ReadOnly,
const Properties fileAccessProps = FileDriver() 
)
inlineexplicit

File.

Parameters
filenamefilepath of the HDF5 file
openFlagsOpen mode / flags ( ReadOnly, ReadWrite)

Open or create a new HDF5 file

Definition at line 41 of file H5File_misc.hpp.

Member Function Documentation

◆ flush()

void HighFive::File::flush ( )
inline

flush

Flushes all buffers associated with a file to disk

Definition at line 83 of file H5File_misc.hpp.

◆ getName()

const std::string & HighFive::File::getName ( ) const
inline

Return the name of the file.

Definition at line 79 of file H5File_misc.hpp.

Member Data Documentation

◆ _filename

std::string HighFive::File::_filename
private

Definition at line 69 of file H5File.hpp.

◆ Create

const int HighFive::File::Create = 0x10
static

Open flag: Create non existing file.

Definition at line 40 of file H5File.hpp.

◆ Debug

const int HighFive::File::Debug = 0x08
static

Open flag: Open in debug mode.

Definition at line 38 of file H5File.hpp.

◆ Excl

const int HighFive::File::Excl = 0x04
static

Open flag: Open will fail if file already exist.

Definition at line 36 of file H5File.hpp.

◆ OpenOrCreate

const int HighFive::File::OpenOrCreate = ReadWrite | Create
static

Derived open flag: Opens RW or exclusivelly creates.

Definition at line 44 of file H5File.hpp.

◆ Overwrite

const int HighFive::File::Overwrite = Truncate
static

Derived open flag: common write mode (=ReadWrite | Create | Truncate)

Definition at line 42 of file H5File.hpp.

◆ ReadOnly

const int HighFive::File::ReadOnly = 0x00
static

Open flag: Read only access.

Definition at line 30 of file H5File.hpp.

◆ ReadWrite

const int HighFive::File::ReadWrite = 0x01
static

Open flag: Read Write access.

Definition at line 32 of file H5File.hpp.

◆ Truncate

const int HighFive::File::Truncate = 0x02
static

Open flag: Truncate a file if already existing.

Definition at line 34 of file H5File.hpp.


The documentation for this class was generated from the following files:


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:26