24 #include <pni/core/error.hpp>
25 #include "../nxobject.hpp"
26 #include "../nxobject_traits.hpp"
43 template<nximp_code>
class OTYPE,
46 auto begin(
const OTYPE<IMPID> &group) -> decltype(group.begin())
49 static_assert(std::is_same<group_type,OTYPE<IMPID>>::value,
50 "Object must be a group type!");
66 template<nximp_code>
class OTYPE,
69 auto end(
const OTYPE<IMPID> &group) -> decltype(group.end())
72 static_assert(std::is_same<group_type,OTYPE<IMPID>>::value,
73 "Object must be a group type!");
98 class begin_visitor :
public boost::static_visitor<typename GTYPE::iterator>
135 throw type_error(EXCEPTION_RECORD,
136 "Fields do not have children!");
152 throw type_error(EXCEPTION_RECORD,
153 "Attributes do not have children!");
168 throw type_error(EXCEPTION_RECORD,
169 "links do not have children!");
198 typename GTYPE::iterator
202 return boost::apply_visitor(visitor_type(),o);
226 class end_visitor :
public boost::static_visitor<typename GTYPE::iterator>
261 throw type_error(EXCEPTION_RECORD,
262 "Fields do not have children!");
276 throw type_error(EXCEPTION_RECORD,
277 "Attributes do not have children!");
290 throw type_error(EXCEPTION_RECORD,
291 "Links do not have children!");
319 typename GTYPE::iterator
323 return boost::apply_visitor(visitor_type(),o);
FTYPE field_type
Nexus field type.
Definition: iterators.hpp:234
ATYPE attribute_type
Nexus attribute type.
Definition: iterators.hpp:108
GTYPE group_type
Nexus group type.
Definition: iterators.hpp:232
result_type operator()(const field_type &) const
process fields
Definition: iterators.hpp:258
GTYPE group_type
Nexus group type.
Definition: iterators.hpp:104
result_type operator()(const link_type &) const
process links
Definition: iterators.hpp:165
result_type operator()(const group_type &g) const
process groups
Definition: iterators.hpp:244
ATYPE attribute_type
Nexus attribute type.
Definition: iterators.hpp:236
nexus object traits
Definition: nxobject_traits.hpp:44
FTYPE field_type
Nexus field type.
Definition: iterators.hpp:106
result_type operator()(const group_type &g) const
process groups
Definition: iterators.hpp:116
Definition: cbf_reader.hpp:41
auto begin(const OTYPE< IMPID > &group) -> decltype(group.begin())
get iterator to first element
Definition: iterators.hpp:46
LTYPE link_type
NeXus link type.
Definition: iterators.hpp:110
nximp_code
implementation codes
Definition: nximp_code.hpp:40
typename GTYPE::iterator result_type
result type
Definition: iterators.hpp:230
result_type operator()(const attribute_type &) const
process attributes
Definition: iterators.hpp:273
auto end(const OTYPE< IMPID > &group) -> decltype(group.end())
get iterator to last element
Definition: iterators.hpp:69
result_type operator()(const attribute_type &) const
process attributes
Definition: iterators.hpp:149
result_type operator()(const link_type &) const
process links
Definition: iterators.hpp:287
result_type operator()(const field_type &) const
process fields
Definition: iterators.hpp:132
typename GTYPE::iterator result_type
result type
Definition: iterators.hpp:102
boost::variant< GTYPE, FTYPE, ATYPE, LTYPE > nxobject
Definition: nxobject.hpp:44
get iterator to last element
Definition: iterators.hpp:226
LTYPE link_type
NeXus link type.
Definition: iterators.hpp:238
get iterator to first element
Definition: iterators.hpp:98