CNORXZ
Container with Native Operation Routines and Expressions
|
#include <h5_content_base.h>
Public Member Functions | |
DEFAULT_MEMBERS (ContentBase) | |
ContentBase (const String &_name, const ContentBase *_parent=nullptr) | |
virtual | ~ContentBase ()=default |
virtual ContentType | type () const =0 |
virtual bool | ro () const =0 |
virtual ContentBase & | open ()=0 |
virtual ContentBase & | close ()=0 |
virtual String | path () const =0 |
virtual String | filename () const =0 |
virtual bool | exists () const =0 |
const String & | name () const |
const ContentBase * | parent () const |
hid_t | id () const |
bool | isOpen () const |
template<typename T > | |
ContentBase & | addAttribute (const String &name, const T &value) |
DType | getAttribute (const String &name) const |
bool | attributeExists (const String &name) const |
std::map< String, DType > | getAttributes () const |
std::map< String, DType > | getRecursiveAttributes () const |
Protected Attributes | |
String | mName |
const ContentBase * | mParent = nullptr |
hid_t | mId = 0 |
CNORXZ::hdf5::ContentBase::ContentBase | ( | const String & | _name, |
const ContentBase * | _parent = nullptr ) |
Construct the class.
_name | Content name. |
_parent | Parent content object. Leave null for the root object. |
Definition at line 20 of file h5_content_base.cc.
|
virtualdefault |
Virtual default destructor.
ContentBase & CNORXZ::hdf5::ContentBase::addAttribute | ( | const String & | name, |
const T & | value ) |
Add attribute to this object.
T | Attribute value type. |
name | Attribute name. |
value | Attribute value. |
Definition at line 98 of file h5_content_base.cc.h.
Check if attribute of given name exists in this object.
name | Attribute name. |
Definition at line 111 of file h5_content_base.cc.
|
pure virtual |
Close object.
Implemented in CNORXZ::hdf5::Group, CNORXZ::hdf5::Dataset, CNORXZ::hdf5::File, and CNORXZ::hdf5::Table.
CNORXZ::hdf5::ContentBase::DEFAULT_MEMBERS | ( | ContentBase | ) |
Default constructors and assignments.
Check if group exists in the parent object.
Implemented in CNORXZ::hdf5::Group, CNORXZ::hdf5::Dataset, CNORXZ::hdf5::File, and CNORXZ::hdf5::Table.
Get the file name.
Implemented in CNORXZ::hdf5::Group, CNORXZ::hdf5::Dataset, CNORXZ::hdf5::File, and CNORXZ::hdf5::Table.
Get an attribute of this object.
name | Attribute name. |
Definition at line 44 of file h5_content_base.cc.
Get all attributes of this object.
Definition at line 119 of file h5_content_base.cc.
Get all attributes of this object and all its parent objects, recursively.
Definition at line 141 of file h5_content_base.cc.
hid_t CNORXZ::hdf5::ContentBase::id | ( | ) | const |
Get object id.
Definition at line 34 of file h5_content_base.cc.
bool CNORXZ::hdf5::ContentBase::isOpen | ( | ) | const |
Check if object is open, i.e. if there is a valid hdf5 id.
Definition at line 39 of file h5_content_base.cc.
|
pure virtual |
Open object.
Implemented in CNORXZ::hdf5::Group, CNORXZ::hdf5::Dataset, CNORXZ::hdf5::File, and CNORXZ::hdf5::Table.
const ContentBase * CNORXZ::hdf5::ContentBase::parent | ( | ) | const |
Get parent object.
Definition at line 29 of file h5_content_base.cc.
Get object path.
Implemented in CNORXZ::hdf5::Group, CNORXZ::hdf5::Dataset, CNORXZ::hdf5::File, and CNORXZ::hdf5::Table.
Check if in read-only mode
Implemented in CNORXZ::hdf5::Group, CNORXZ::hdf5::Dataset, CNORXZ::hdf5::File, and CNORXZ::hdf5::Table.
|
pure virtual |
Get the content type.
Implemented in CNORXZ::hdf5::Group, CNORXZ::hdf5::Dataset, CNORXZ::hdf5::File, and CNORXZ::hdf5::Table.
|
protected |
hdf5 identifier of the hdf5 object handled by this object.
Definition at line 142 of file h5_content_base.h.
|
protected |
Name of this object.
Definition at line 140 of file h5_content_base.h.
|
protected |
Pointer to this object's parent.
Definition at line 141 of file h5_content_base.h.