libpniio
Static Public Member Functions | Static Private Member Functions
pni::io::nx::xml::link Class Reference

manages links in XML More...

#include <link.hpp>

Static Public Member Functions

template<typename GTYPE , typename FTYPE , typename ATYPE , typename LTYPE >
static void object_from_xml (const nxobject< GTYPE, FTYPE, ATYPE, LTYPE > &parent, const node &link_node)
 generate HDF5 link More...
 

Static Private Member Functions

static pni::core::string get_link_name (const node &link_node)
 get name of link More...
 
static pni::core::string get_link_target (const node &link_node)
 get link target More...
 

Detailed Description

This class provides a static method to create a link described by XML. There is no method to generate a link from an existing NeXus object as this is beyond the scope of libpniio's XML stack.

Member Function Documentation

pni::core::string pni::io::nx::xml::link::get_link_name ( const node link_node)
staticprivate

Return the name of the link from the link node.

Exceptions
key_errorif the name attribute does not exist
parser_errorin case of any other XML parsing error
Parameters
link_nodethe XML node describing the link
Returns
string with the name of the link
pni::core::string pni::io::nx::xml::link::get_link_target ( const node link_node)
staticprivate

Return the path to the target from the link node.

Exceptions
key_errorif the target attribute does not exist
parser_errorin case of any other XML parsing error
Parameters
link_nodeXML node describing the link
Returns
string with the path to the link target
template<typename GTYPE , typename FTYPE , typename ATYPE , typename LTYPE >
void pni::io::nx::xml::link::object_from_xml ( const nxobject< GTYPE, FTYPE, ATYPE, LTYPE > &  parent,
const node link_node 
)
static

Generate an HDF5 link within a NeXus file according to the information provided by the link node.

Exceptions
parser_errorin case of XML parsing problems
invalid_object_errorif the parent object is not valid
io_errorif data or metadata write failed
type_errorif the parent object is not a group type
key_errorif one of the required attribute tags does not exist
object_errorin case of any other error
Template Parameters
GTYPEgroup type
FTYPEfield type
ATYPEattribute type
LTYPElink type
Parameters
parentthe parent below which the link should be established
link_nodereference the the XML node providing the link information

The documentation for this class was generated from the following files: