24 #include <pni/core/error.hpp>
25 #include "../nxobject.hpp"
26 #include "../nxobject_traits.hpp"
48 template<nximp_code>
class OTYPE,
54 typedef typename trait_type::field_type field_type;
55 typedef typename trait_type::attribute_type attribute_type;
57 static_assert(std::is_same<field_type,OTYPE<IMPID>>::value ||
58 std::is_same<attribute_type,OTYPE<IMPID>>::value,
59 "THE RANK CAN ONLY BE OBTAINED FROM FIELDS AND"
108 throw type_error(EXCEPTION_RECORD,
109 "Groups do not have a shape!");
158 throw type_error(EXCEPTION_RECORD,
"Links do not have a rank!");
199 return boost::apply_visitor(visitor_type(),o);
GTYPE group_type
Nexus group type.
Definition: get_rank.hpp:87
get rank visitor
Definition: get_rank.hpp:81
Definition: cbf_reader.hpp:41
result_type operator()(const link_type &) const
process nxlink instances
Definition: get_rank.hpp:155
LTYPE link_type
NeXus link type.
Definition: get_rank.hpp:93
nximp_code
implementation codes
Definition: nximp_code.hpp:40
result_type operator()(const field_type &f) const
process field instances
Definition: get_rank.hpp:125
size_t get_rank(const OTYPE< IMPID > &o)
get rank
Definition: get_rank.hpp:51
result_type operator()(const group_type &) const
process group instances
Definition: get_rank.hpp:105
FTYPE field_type
Nexus field type.
Definition: get_rank.hpp:89
ATYPE attribute_type
Nexus attribute type.
Definition: get_rank.hpp:91
size_t result_type
result type
Definition: get_rank.hpp:85
result_type operator()(const attribute_type &a) const
process attribute instances
Definition: get_rank.hpp:142
boost::variant< GTYPE, FTYPE, ATYPE, LTYPE > nxobject
Definition: nxobject.hpp:44