CNORXZ
Container with Native Operation Routines and Expressions
Loading...
Searching...
No Matches
Public Member Functions | List of all members
CNORXZ::hdf5::File Class Reference

#include <h5_file.h>

Inheritance diagram for CNORXZ::hdf5::File:
CNORXZ::hdf5::Group CNORXZ::hdf5::ContentBase

Public Member Functions

 DEFAULT_MEMBERS (File)
 
 File (const String &fname, bool _ro=true)
 
 ~File ()
 
virtual ContentType type () const override final
 
virtual bool ro () const override final
 
virtual Fileopen () override final
 
virtual Fileclose () override final
 
virtual String path () const override final
 
virtual String filename () const override final
 
virtual bool exists () const override final
 
bool ishdf5 () const
 
- Public Member Functions inherited from CNORXZ::hdf5::Group
 DEFAULT_MEMBERS (Group)
 
 Group (const String &gname, const ContentBase *_parent)
 
 ~Group ()
 
const ContentPtrget (const String &name) const
 
Sptr< GroupgetGroup (const String &name) const
 
Sptr< TablegetTable (const String &name) const
 
Sptr< DatasetgetDataset (const String &name) const
 
template<typename... Ts>
Sptr< STable< Ts... > > getTable (const String &name, Tuple< Ts... > proto)
 
template<typename T >
Sptr< SDataset< T > > getDataset (const String &name, T proto)
 
const MArray< ContentPtr > & get () const
 
GroupaddGroup (const String &name)
 
template<typename... Ts>
GroupaddTable (const String &name, const ArrayBase< Tuple< Ts... > > &data, const Arr< String, sizeof...(Ts)> &fnames)
 
template<typename T >
GroupaddDataset (const String &name, const ArrayBase< T > &data)
 
template<class F >
decltype(autoiter (F &&f) const
 
template<class F >
decltype(autoiterRecursive (F &&f) const
 
template<class F >
decltype(autoiter (F &&f)
 
template<class F >
decltype(autoiterRecursive (F &&f)
 
- Public Member Functions inherited from CNORXZ::hdf5::ContentBase
 DEFAULT_MEMBERS (ContentBase)
 
 ContentBase (const String &_name, const ContentBase *_parent=nullptr)
 
virtual ~ContentBase ()=default
 
const Stringname () const
 
const ContentBaseparent () const
 
hid_t id () const
 
bool isOpen () const
 
template<typename T >
ContentBaseaddAttribute (const String &name, const T &value)
 
DType getAttribute (const String &name) const
 
bool attributeExists (const String &name) const
 
std::map< String, DTypegetAttributes () const
 
std::map< String, DTypegetRecursiveAttributes () const
 

Additional Inherited Members

- Protected Member Functions inherited from CNORXZ::hdf5::Group
void mkCont ()
 
AIndex< ContentPtrgetIndexTo (const String &name) const
 
BIndex< ContentPtrgetIndexTo (const String &name)
 
- Static Protected Member Functions inherited from CNORXZ::hdf5::Group
template<typename C , class F >
static void recursion (const C &c, F &&f)
 
- Protected Attributes inherited from CNORXZ::hdf5::Group
MArray< ContentPtrmCont
 
- Protected Attributes inherited from CNORXZ::hdf5::ContentBase
String mName
 
const ContentBasemParent = nullptr
 
hid_t mId = 0
 

Detailed Description


Class to handle hdf5 file objects. Objects of this type usually serve as root object so they don't have any parent.

Definition at line 28 of file h5_file.h.

Constructor & Destructor Documentation

◆ File()

CNORXZ::hdf5::File::File ( const String & fname,
bool _ro = true )

Construct the class.

Parameters
fnamePath to the hdf5 file to be handled.
_roOpen in read-only mode if true, otherwise have write access.

Definition at line 19 of file h5_file.cc.

◆ ~File()

CNORXZ::hdf5::File::~File ( )

Destructor. Release all involved hdf5 ids.

Definition at line 24 of file h5_file.cc.

Member Function Documentation

◆ close()

File & CNORXZ::hdf5::File::close ( )
finaloverridevirtual

Close object.

Returns
Reference to this object.

Reimplemented from CNORXZ::hdf5::Group.

Definition at line 65 of file h5_file.cc.

◆ DEFAULT_MEMBERS()

CNORXZ::hdf5::File::DEFAULT_MEMBERS ( File )

Default constructors and assignments.

◆ exists()

bool CNORXZ::hdf5::File::exists ( ) const
finaloverridevirtual

Check if group exists in the parent object.

Returns
True if object exists, else false.

Reimplemented from CNORXZ::hdf5::Group.

Definition at line 91 of file h5_file.cc.

◆ filename()

String CNORXZ::hdf5::File::filename ( ) const
finaloverridevirtual

Get the file name.

Returns
Name of the hdf5 file this object is stored in.

Reimplemented from CNORXZ::hdf5::Group.

Definition at line 86 of file h5_file.cc.

◆ ishdf5()

bool CNORXZ::hdf5::File::ishdf5 ( ) const

Check if handled file is in hdf5 format.

Returns
True if file is in hdf5 format, else false.

Definition at line 102 of file h5_file.cc.

◆ open()

File & CNORXZ::hdf5::File::open ( )
finaloverridevirtual

Open object.

Returns
Reference to this object.

Reimplemented from CNORXZ::hdf5::Group.

Definition at line 39 of file h5_file.cc.

◆ path()

String CNORXZ::hdf5::File::path ( ) const
finaloverridevirtual

Get object path.

Returns
Absolute hdf5 file internal path of this object.

Reimplemented from CNORXZ::hdf5::Group.

Definition at line 81 of file h5_file.cc.

◆ ro()

bool CNORXZ::hdf5::File::ro ( ) const
finaloverridevirtual

Check if in read-only mode

Returns
True if read-only else false.

Reimplemented from CNORXZ::hdf5::Group.

Definition at line 34 of file h5_file.cc.

◆ type()

ContentType CNORXZ::hdf5::File::type ( ) const
finaloverridevirtual

Get the content type.

Returns
Content type.

Reimplemented from CNORXZ::hdf5::Group.

Definition at line 29 of file h5_file.cc.


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