25 #include <pni/core/utilities.hpp>
27 #include "../exceptions.hpp"
41 template<
typename OTYPE>
52 typedef pni::core::container_iterator<const manager_type>
iterator;
90 attribute_type
create(
const pni::core::string &n,
91 const CTYPE &s,
bool ov=
false)
const
97 type_imp::to_index_vector(s),
119 attribute_type
create(
const pni::core::string &n,
122 return create<T>(n,pni::core::shape_t{1},ov);
179 void remove(
const pni::core::string &n)
const
197 bool exists(
const pni::core::string &n)
const
199 return _imp.has_attr(n);
213 size_t size()
const {
return _imp.nattr(); }
attribute manager template
Definition: nxattribute_manager.hpp:42
attribute_type operator[](size_t i) const
open an attribute by index
Definition: nxattribute_manager.hpp:162
nxattribute_manager< OTYPE > manager_type
self-reference to this manager type
Definition: nxattribute_manager.hpp:46
attribute_type operator[](const pni::core::string &n) const
open an existing attribute by name
Definition: nxattribute_manager.hpp:141
nxattribute_manager(imp_type &imp)
constructor
Definition: nxattribute_manager.hpp:66
bool exists(const pni::core::string &n) const
checks for attribute existance
Definition: nxattribute_manager.hpp:197
attribute_type value_type
alias to the attribute type
Definition: nxattribute_manager.hpp:50
pni::core::type_id_t type_id(const h5datatype &o)
get type code
Definition: h5datatype.cpp:240
attribute_type create(const pni::core::string &n, bool ov=false) const
create scalar attribute
Definition: nxattribute_manager.hpp:119
Definition: cbf_reader.hpp:41
size_t size() const
get number of attributes
Definition: nxattribute_manager.hpp:213
OTYPE::attribute_type attribute_type
the attribute type
Definition: nxattribute_manager.hpp:48
iterator begin() const
iterator to frist attribute
Definition: nxattribute_manager.hpp:224
pni::core::container_iterator< const manager_type > iterator
iterator type
Definition: nxattribute_manager.hpp:52
imp_type & _imp
reference to the implementation of the parent
Definition: nxattribute_manager.hpp:59
OTYPE::type_type type_imp
implementation of the type traits
Definition: nxattribute_manager.hpp:57
attribute_type create(const pni::core::string &n, const CTYPE &s, bool ov=false) const
create an array attribute
Definition: nxattribute_manager.hpp:90
iterator end() const
iterator to last attribute
Definition: nxattribute_manager.hpp:235
OTYPE::imp_type imp_type
implementation type for the parent object of the manager
Definition: nxattribute_manager.hpp:54