libpniio
Static Public Member Functions
pni::io::nx::xml::attribute Struct Reference

read and write attributes

#include <attribute.hpp>

Inheritance diagram for pni::io::nx::xml::attribute:
Inheritance graph
[legend]
Collaboration diagram for pni::io::nx::xml::attribute:
Collaboration graph
[legend]

Static Public Member Functions

template<typename GTYPE , typename FTYPE , typename ATYPE , typename LTYPE >
static nxobject< GTYPE, FTYPE,
ATYPE, LTYPE > 
object_from_xml (const nxobject< GTYPE, FTYPE, ATYPE, LTYPE > &parent, const node &attr_node)
 create attribute from XML description More...
 
template<typename GTYPE , typename FTYPE , typename ATYPE , typename LTYPE >
static node object_to_xml (const nxobject< GTYPE, FTYPE, ATYPE, LTYPE > &attr)
 write attribute to XML More...
 
- Static Public Member Functions inherited from pni::io::nx::xml::io_node
static size_t size (const node &io_node)
 return object size More...
 
static size_t rank (const node &io_node)
 return object rank More...
 
static pni::core::string name (const node &io_node)
 return object name More...
 
static pni::core::shape_t shape (const node &io_node)
 return object shape More...
 
static pni::core::type_id_t type_id (const node &io_node)
 get type id More...
 
template<typename T >
static T data_from_xml (const node &io_node)
 get data from XML More...
 
template<typename T >
static void data_to_xml (node &io_node, const T &value)
 write data to XML More...
 

Member Function Documentation

template<typename GTYPE , typename FTYPE , typename ATYPE , typename LTYPE >
static nxobject<GTYPE,FTYPE,ATYPE,LTYPE> pni::io::nx::xml::attribute::object_from_xml ( const nxobject< GTYPE, FTYPE, ATYPE, LTYPE > &  parent,
const node attr_node 
)
inlinestatic

Create an attribute attached to a parent according to the information stored in the XML node. The parent must be either a field or a group type. No attribute data is copied from the Nexus object to the XML node.

Exceptions
invalid_object_errorif the parent is not valid
type_errorif the requested data type does not exist
io_errorif the attribute cannot be written
object_errorin case of any other error
Template Parameters
PTYPEparent type
Parameters
parentreference to parent instance
attr_nodeXML node with attribute description
Returns
instance of an attribute type
template<typename GTYPE , typename FTYPE , typename ATYPE , typename LTYPE >
static node pni::io::nx::xml::attribute::object_to_xml ( const nxobject< GTYPE, FTYPE, ATYPE, LTYPE > &  attr)
inlinestatic

Create an XML attribute from a Nexus attribute. No data will be transfered.

Template Parameters
ATYPEattribute type
Parameters
attrattribute instance
Returns
XML node with the attribute metadata

The documentation for this struct was generated from the following file: