24 #include <pni/core/types.hpp>
25 #include <pni/core/error.hpp>
26 #include "../nxobject.hpp"
27 #include "../nxobject_traits.hpp"
55 template<nximp_code>
class OTYPE,
58 bool is_class(
const OTYPE<IMPID> &
object,
const pni::core::string &type)
62 static_assert(std::is_same<group_type,OTYPE<IMPID>>::value,
63 "The object must be a group type!");
138 throw type_error(EXCEPTION_RECORD,
139 "Fields do not have a class!");
154 throw type_error(EXCEPTION_RECORD,
155 "Attributes do not have a class!");
170 throw type_error(EXCEPTION_RECORD,
171 "Links do not have a class!");
205 const pni::core::string &c)
208 return boost::apply_visitor(visitor_type(c),o);
result_type operator()(const group_type &g) const
process groups
Definition: is_class.hpp:122
ATYPE attribute_type
Nexus attribute type.
Definition: is_class.hpp:97
nexus object traits
Definition: nxobject_traits.hpp:44
is_class_visitor(const pni::core::string &s)
constructor
Definition: is_class.hpp:107
is class visitor
Definition: is_class.hpp:85
bool result_type
result type
Definition: is_class.hpp:91
Definition: cbf_reader.hpp:41
result_type operator()(const field_type &) const
process fields
Definition: is_class.hpp:135
result_type operator()(const link_type &) const
process links
Definition: is_class.hpp:167
pni::core::string _class
class type
Definition: is_class.hpp:88
nximp_code
implementation codes
Definition: nximp_code.hpp:40
FTYPE field_type
Nexus field type.
Definition: is_class.hpp:95
GTYPE group_type
Nexus group type.
Definition: is_class.hpp:93
pni::core::string get_class(const OTYPE< IMPID > &group)
get the class of a group
Definition: get_class.hpp:56
result_type operator()(const attribute_type &) const
process attributes
Definition: is_class.hpp:151
LTYPE link_type
NeXus link type.
Definition: is_class.hpp:99
boost::variant< GTYPE, FTYPE, ATYPE, LTYPE > nxobject
Definition: nxobject.hpp:44
bool is_class(const OTYPE< IMPID > &object, const pni::core::string &type)
checks group type
Definition: is_class.hpp:58