provides STL interface for attributes
More...
#include <attribute_manager.hpp>
The AttributeManager class provides an STL compliant interface to access attribute attached to a Node.
◆ AttributeManager() [1/3]
hdf5::attribute::AttributeManager::AttributeManager |
( |
| ) |
|
|
delete |
◆ AttributeManager() [2/3]
hdf5::attribute::AttributeManager::AttributeManager |
( |
node::Node & |
node | ) |
|
Creates a new instance of AttributeManager which must be attached to a Node instance.
- Exceptions
-
std::runtime_error | in case of a failure |
- Parameters
-
node | reference to the parent node of the manager |
◆ AttributeManager() [3/3]
hdf5::attribute::AttributeManager::AttributeManager |
( |
const AttributeManager & |
manager | ) |
|
|
default |
Use the compiler provided default implementation here.
◆ begin()
◆ create() [1/3]
This is the most generic method to create attributes. See the template method below for more simple construction.
◆ create() [2/3]
Create a multidimensional attribute of given name and shape. The datatype is derived from the template parameter.
- Exceptions
-
std::runtime_error | in case of a failure |
- Template Parameters
-
- Parameters
-
name | the name for the attribute |
shape | the number of elements along each dimension |
acpl | attribute creation property list |
- Returns
- instance of the newly created attribute
◆ create() [3/3]
Create a scalar attribute of given name. The datatype is determined from the templat parameter.
- Exceptions
-
std::runtime_error | in case of an error |
- Template Parameters
-
T | element data type of the attribute |
- Parameters
-
name | the name of the attribute |
acpl | attribute creation property list |
- Returns
- instance of the newly created attribute
◆ create_from()
template<typename T >
Attribute hdf5::attribute::AttributeManager::create_from |
( |
const std::string & |
name, |
|
|
const T & |
value |
|
) |
| |
This is a convenience method to create a new attribute with a given value. Technically this is a create() including a subsequent call to write.
Node n = ....;
n.attributes.create_from("date","12-03-2017");
- Exceptions
-
std::runtime_error | in case of a failure |
- Parameters
-
name | the name of the attribute |
value | reference to the new value |
- Returns
- new instance of Attribute
◆ end()
◆ exists()
bool hdf5::attribute::AttributeManager::exists |
( |
const std::string & |
name | ) |
const |
Returns true if an attribute of given name exists. Otherwise false is returned.
◆ iterator_config() [1/2]
const IteratorConfig& hdf5::attribute::AttributeManager::iterator_config |
( |
| ) |
const |
|
noexcept |
◆ iterator_config() [2/2]
IteratorConfig& hdf5::attribute::AttributeManager::iterator_config |
( |
| ) |
|
|
noexcept |
Use this method to get a reference to the iterator configuration for the attributes of a node.
- Returns
- reference to iterator configuration
◆ node()
const node::Node& hdf5::attribute::AttributeManager::node |
( |
| ) |
const |
|
noexcept |
Return a reference to the parent node of the manager instance.
◆ operator[]() [1/2]
Attribute hdf5::attribute::AttributeManager::operator[] |
( |
const std::string & |
name | ) |
const |
◆ operator[]() [2/2]
Attribute hdf5::attribute::AttributeManager::operator[] |
( |
size_t |
index | ) |
const |
◆ remove() [1/2]
void hdf5::attribute::AttributeManager::remove |
( |
const std::string & |
name | ) |
const |
◆ remove() [2/2]
void hdf5::attribute::AttributeManager::remove |
( |
size_t |
index | ) |
const |
- Exceptions
-
std::runtime_error | in case of a failure |
- Precondition
index
must be < size()
◆ rename()
void hdf5::attribute::AttributeManager::rename |
( |
const std::string & |
old_name, |
|
|
const std::string & |
new_name |
|
) |
| const |
- Exceptions
-
std::runtime_error | in case of a failure |
- Parameters
-
old_name | old name of the attribute |
new_name | new name of the attribute |
◆ size()
size_t hdf5::attribute::AttributeManager::size |
( |
| ) |
const |
The documentation for this class was generated from the following file: