24 #include <pni/core/error.hpp>
25 #include "../nxobject.hpp"
26 #include "../nxobject_traits.hpp"
61 template<nximp_code>
class OTYPE,
66 typedef OTYPE<IMPID> object_type;
69 typedef std::is_same<object_type,field_type> field_check_type;
70 typedef std::is_same<object_type,attribute_type> attribute_check_type;
71 static_assert(field_check_type::value || attribute_check_type::value,
72 "OBJECT MUST BE A FIELD OR ATTRIBUTE TYPE!");
74 return object.template shape<CTYPE>();
127 throw type_error(EXCEPTION_RECORD,
128 "A group does not have a shape!");
146 return f.template shape<CTYPE>();
163 return a.template shape<CTYPE>();
177 throw type_error(EXCEPTION_RECORD,
178 "A link does not have a shape!");
221 return boost::apply_visitor(visitor_type(),o);
ATYPE attribute_type
Nexus attribute type.
Definition: get_shape.hpp:111
GTYPE group_type
Nexus group type.
Definition: get_shape.hpp:107
result_type operator()(const attribute_type &a) const
process attribute instances
Definition: get_shape.hpp:161
result_type operator()(const field_type &f) const
process field instances
Definition: get_shape.hpp:144
result_type operator()(const link_type &) const
process nxlink instances
Definition: get_shape.hpp:174
nexus object traits
Definition: nxobject_traits.hpp:44
FTYPE field_type
Nexus field type.
Definition: get_shape.hpp:109
Definition: cbf_reader.hpp:41
nximp_code
implementation codes
Definition: nximp_code.hpp:40
CTYPE get_shape(const OTYPE< IMPID > &object)
get shape
Definition: get_shape.hpp:64
result_type operator()(const group_type &) const
process group instances
Definition: get_shape.hpp:124
CTYPE result_type
result type
Definition: get_shape.hpp:105
boost::variant< GTYPE, FTYPE, ATYPE, LTYPE > nxobject
Definition: nxobject.hpp:44
LTYPE link_type
Nexus link type.
Definition: get_shape.hpp:113
get shape visitor
Definition: get_shape.hpp:101