libpniio
|
read and write field data
#include <field.hpp>
Static Public Member Functions | |
static pni::core::string | unit (const node &field_node) |
return field unit More... | |
static pni::core::string | long_name (const node &field_node) |
return long name More... | |
static pni::core::shape_t | chunk (const node &field_node) |
get chunk shape More... | |
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 &field_node) |
create field from XML More... | |
template<typename GTYPE , typename FTYPE , typename ATYPE , typename LTYPE > | |
static node | object_to_xml (const nxobject< GTYPE, FTYPE, ATYPE, LTYPE > &f) |
create XML object from field More... | |
![]() | |
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... | |
|
static |
Retrieve the chunk shape from the field tag. If the field has no chunk tag an empty shape_t instance will be returned.
parser_error | in case of an error field_node the XML node with the field specification |
|
static |
Obtain the long name from the XML node.
parser_error | in case of an error |
field_node | the XML node with the field information |
|
inlinestatic |
Creates a new field object below parent according to the information stored in the actual XML node. The data stored in the XML node is not copied to the field automatically.
parser_error | if XML parsing operations fail |
invalid_object_error | if the parent is not valid |
type_error | if the data type is not supported |
io_error | if metadata cannot be written |
object_error | in case of any other error |
shape_mismatch_error | if chunk and dimensions tag rank do not match |
GTYPE | group type |
parent | the parent group for the new field |
field_node | XML node with field information |
|
inlinestatic |
Create an XML object from a field. No data is included in the XML output. But it could easily be added with the data_to_xml function. No data is copied from the field instance to the XML node.
parser_error | in case of IO errors on the XML side |
invalid_object_error | if the field is not valid |
io_error | in case of metadata retrieval fails |
type_error | if data type of the field cannot be handled |
object_error | in case of any other error |
FTYPE | field type |
field | reference to the field instance |
|
static |
parser_error | in case of an error |
field_node | XML node with field information |