libpniio
|
attribute manager template More...
#include <nxattribute_manager.hpp>
Public Types | |
typedef nxattribute_manager < OTYPE > | manager_type |
self-reference to this manager type More... | |
typedef OTYPE::attribute_type | attribute_type |
the attribute type More... | |
typedef attribute_type | value_type |
alias to the attribute type More... | |
typedef pni::core::container_iterator < const manager_type > | iterator |
iterator type More... | |
typedef OTYPE::imp_type | imp_type |
implementation type for the parent object of the manager More... | |
Public Member Functions | |
nxattribute_manager (imp_type &imp) | |
constructor More... | |
template<typename T , typename CTYPE > | |
attribute_type | create (const pni::core::string &n, const CTYPE &s, bool ov=false) const |
create an array attribute More... | |
template<typename T > | |
attribute_type | create (const pni::core::string &n, bool ov=false) const |
create scalar attribute More... | |
attribute_type | operator[] (const pni::core::string &n) const |
open an existing attribute by name More... | |
attribute_type | operator[] (size_t i) const |
open an attribute by index More... | |
void | remove (const pni::core::string &n) const |
delete an attribute More... | |
bool | exists (const pni::core::string &n) const |
checks for attribute existance More... | |
size_t | size () const |
get number of attributes More... | |
iterator | begin () const |
iterator to frist attribute More... | |
iterator | end () const |
iterator to last attribute More... | |
Private Types | |
typedef OTYPE::type_type | type_imp |
implementation of the type traits More... | |
Private Attributes | |
imp_type & | _imp |
reference to the implementation of the parent More... | |
Provides attribute functionality to other objects that are capable of holding attributes.
OTYPE | parent object type |
typedef OTYPE::attribute_type pni::io::nx::nxattribute_manager< OTYPE >::attribute_type |
typedef OTYPE::imp_type pni::io::nx::nxattribute_manager< OTYPE >::imp_type |
typedef pni::core::container_iterator<const manager_type> pni::io::nx::nxattribute_manager< OTYPE >::iterator |
typedef nxattribute_manager<OTYPE> pni::io::nx::nxattribute_manager< OTYPE >::manager_type |
|
private |
typedef attribute_type pni::io::nx::nxattribute_manager< OTYPE >::value_type |
|
inline |
imp | reference to the parent implementation |
|
inline |
Return an iterator to the first attribute attached to the object.
|
inline |
Template method creating a multidimensional attribute of type T and shape s. By default an exception will be thrown if an attribute of same name already exists. If ov=true an existing attribute will be overwritten
invalid_object_error | in case of an invalid parent |
type_error | if data type is not supported |
object_error | in case of errors |
n | name of the attribute |
s | shape of the array |
ov | overwrite flag |
|
inline |
Template method creating a scalar atribute of type T. By default an exception is raised if an attribute of same name already exists. If ov=true the existing attribute will be overwritten and no exeption will be thrown.
invalid_object_error | in case of an invalid parent |
type_error | if data type is not supported |
object_error | in case of attribute related errors |
n | name of the attribute |
ov | overwrite flag |
|
inline |
Return an iterator to the last attribute attached to the object.
|
inline |
Checks whether or not an attribute with a particular name exits. If it does true is returned otherwise false.
invalid_object_error | if parent is not valid |
object_error | in case of any other error |
n | name of the attribute |
|
inline |
Opens an existing attribute of name n and returns an instance of nxattribute<> to the callee. An exception will be thrown if the attribute does not exist.
invalid_object_error | if the parent is not valid |
key_error | in case the requested attribute does not exist |
object_error | in case of problems |
n | name of the attribute |
|
inline |
Opens an existing attribute by its index. If the index exceeds the total number of attributes attached to this object an exception will be thrown.
invalid_object_error | if the parent is not valid |
index_error | if i exceeds the total number of attributes |
object_error | in case of errors |
i | index of the attribute |
|
inline |
Deletes an attribute attached to this object.
invalid_object_error | if parent is not valid |
key_error | if attribute does not exist |
object_error | in case of any errors |
n | name of the attribute |
|
inline |
Returns the number of attributes attached to this object.
invalid_object_error | if parent is not valid |
object_error | in case of any other error |
|
private |