24 #include <pni/core/types.hpp>
25 #include "../nxobject.hpp"
26 #include "../nxobject_traits.hpp"
56 template<nximp_code>
class OTYPE,
59 pni::core::string
get_path(
const OTYPE<IMPID> &o)
100 const pni::core::string &type)
const
102 pni::core::string ename(name);
104 if((!type.empty()) && (type!=
"NXroot"))
143 pni::core::string group_name = g.name();
147 pni::core::string ename =
element_name(group_name,group_type);
150 if((group_type ==
"NXroot") || (group_name ==
"/"))
153 return get_path(g.parent()) +
"/" + ename;
177 return get_path(f.parent())+
"/"+f.name();
200 return get_path(a.parent())+
"@"+a.name();
205 return get_path(l.parent())+
"/"+l.name();
243 if((path.size()>=2) &&
247 return pni::core::string(path,1,path.size()-1);
pni::core::string result_type
result type
Definition: get_path.hpp:111
pni::core::string element_name(const pni::core::string &name, const pni::core::string &type) const
assembles the group element name
Definition: get_path.hpp:99
result_type operator()(const attribute_type &a) const
process attribute instances
Definition: get_path.hpp:198
GTYPE group_type
Nexus group type.
Definition: get_path.hpp:113
nexus object traits
Definition: nxobject_traits.hpp:44
get path visitor
Definition: get_path.hpp:86
result_type operator()(const link_type &l) const
Definition: get_path.hpp:203
Definition: cbf_reader.hpp:41
ATYPE attribute_type
Nexus attribute type.
Definition: get_path.hpp:117
FTYPE field_type
Nexus field type.
Definition: get_path.hpp:115
nximp_code
implementation codes
Definition: nximp_code.hpp:40
pni::core::string get_class(const OTYPE< IMPID > &group)
get the class of a group
Definition: get_class.hpp:56
LTYPE link_type
NeXus link type.
Definition: get_path.hpp:119
result_type operator()(const field_type &f) const
process field instances
Definition: get_path.hpp:175
pni::core::string get_path(const OTYPE< IMPID > &o)
get object path
Definition: get_path.hpp:59
boost::variant< GTYPE, FTYPE, ATYPE, LTYPE > nxobject
Definition: nxobject.hpp:44
result_type operator()(const group_type &g) const
process group instances
Definition: get_path.hpp:138