12 #include "../utils/pyargs_to_vec.h" 38 auto &data = elem->get_data();
48 auto json = Json::array();
52 json.get_ref<Json::array_t&>().reserve(data.size());
55 for (
const auto &d : data.is_array() ? data : Json::array({data}))
58 auto &elem = json.back();
66 results[index].swap(data.is_array() ? json : json.front());
Vec< ShPtr< Generator > > generators
ShPtr< Element > ElPtr
An alias for a shared pointer of Element class.
virtual void prepare() override
Clear and resize results.
void select(const py::args &args)
Specify string keys for properties to be copied.
void pyargs_to_vec(const py::args &args, Vec< T > &vec)
Convert a py::args (a variable number arguments) object to a Vec object.
std::vector< T > Vec
Vec is an alias for vector (same as list in Python).
void register_generator(const ShPtr< GEN > &gen)
This file has a definition of ProData class, which is a subclass of Processor class.
virtual void run_impl(const int index) override
Implementation of analysis using an element of generators.
const Vec< Json > & get_results()
Get list of Json objects consisting of all or some properties of Element objects stored in this objec...
ProData(const ElPtr &elem)
Constructor of ProData class for one Element object.
Namespace for utility functions.
void register_generators(const Vec< ShPtr< GEN >> &gens)
This file includes pybind11 and defines an alias for the namespace pybind11.