24 #include <pni/core/types.hpp>
25 #include <pni/core/error.hpp>
26 #include "../nxobject.hpp"
27 #include "../nxobject_traits.hpp"
57 template<nximp_code>
class PTYPE,
64 typedef typename CTYPE::value_type value_type;
66 static_assert(std::is_same<value_type,object_type>::value ||
67 std::is_same<value_type,attribute_type>::value,
68 "The containers value_type must be either an attribute"
69 " or an object type!");
73 std::copy(parent.attributes.begin(),parent.attributes.end(),
74 std::back_inserter(attributes));
127 return get_attributes<result_type>(g);
143 return get_attributes<result_type>(f);
161 throw type_error(EXCEPTION_RECORD,
162 "Attributes cannot have attributes by themself!");
180 throw type_error(EXCEPTION_RECORD,
181 "Instances of link do not have attributes!");
215 return boost::apply_visitor(visitor_type(),parent);
result_type operator()(const group_type &g) const
process groups
Definition: get_attributes.hpp:125
GTYPE group_type
Nexus group type.
Definition: get_attributes.hpp:106
nexus object traits
Definition: nxobject_traits.hpp:44
CTYPE get_attributes(const PTYPE< IMPID > &parent)
get attributes from an object
Definition: get_attributes.hpp:60
result_type operator()(const attribute_type &) const
process attributes
Definition: get_attributes.hpp:158
result_type operator()(const field_type &f) const
process fields
Definition: get_attributes.hpp:141
result_type operator()(const link_type &) const
process link
Definition: get_attributes.hpp:177
Definition: cbf_reader.hpp:41
ATYPE attribute_type
Nexus attribute type.
Definition: get_attributes.hpp:110
LTYPE link_type
NeXus link type.
Definition: get_attributes.hpp:112
CTYPE result_type
result type
Definition: get_attributes.hpp:104
nximp_code
implementation codes
Definition: nximp_code.hpp:40
get attribute visitor
Definition: get_attributes.hpp:100
FTYPE field_type
Nexus field type.
Definition: get_attributes.hpp:108
boost::variant< GTYPE, FTYPE, ATYPE, LTYPE > nxobject
Definition: nxobject.hpp:44