24 #include <pni/core/types.hpp>
25 #include <pni/core/error.hpp>
26 #include "../nxobject.hpp"
27 #include "../nxobject_traits.hpp"
49 template<nximp_code>
class OTYPE,
52 void grow(OTYPE<IMPID> &o,
size_t dimension=0,
size_t extend=1)
56 static_assert(std::is_same<field_type,OTYPE<IMPID>>::value,
57 "Growing requires a field type!");
59 o.grow(dimension,extend);
121 throw type_error(EXCEPTION_RECORD,
122 "One cannot grow a group object!");
140 f.grow(_dim,_extent);
155 throw type_error(EXCEPTION_RECORD,
156 "An attribute cannot be grown!");
168 throw type_error(EXCEPTION_RECORD,
169 "A link cannot be grown!");
209 return boost::apply_visitor(visitor_type(d,e),o);
ATYPE attribute_type
Nexus attribute type.
Definition: grow.hpp:93
nexus object traits
Definition: nxobject_traits.hpp:44
GTYPE group_type
Nexus group type.
Definition: grow.hpp:89
grow visitor
Definition: grow.hpp:78
size_t _dim
the index of the dimension along which to grow
Definition: grow.hpp:82
result_type operator()(field_type &f) const
process field instances
Definition: grow.hpp:138
Definition: cbf_reader.hpp:41
result_type operator()(const attribute_type &) const
process attribute instances
Definition: grow.hpp:152
nximp_code
implementation codes
Definition: nximp_code.hpp:40
result_type operator()(const group_type &) const
process group instances
Definition: grow.hpp:118
LTYPE link_type
NeXus link type.
Definition: grow.hpp:95
FTYPE field_type
Nexus field type.
Definition: grow.hpp:91
result_type operator()(const link_type &) const
process link instances
Definition: grow.hpp:165
grow_visitor(size_t d, size_t e)
constructor
Definition: grow.hpp:104
boost::variant< GTYPE, FTYPE, ATYPE, LTYPE > nxobject
Definition: nxobject.hpp:44
void result_type
result type
Definition: grow.hpp:87
void grow(OTYPE< IMPID > &o, size_t dimension=0, size_t extend=1)
grow a field
Definition: grow.hpp:52
size_t _extent
the number of elements to grow along the desired dimension
Definition: grow.hpp:84