ppap4lmp  0.7.2
pro_data.h
Go to the documentation of this file.
1 
9 #ifndef PRO_DATA_H
10 #define PRO_DATA_H
11 
12 #include <processors/processor.h>
13 
23 class ProData : public Processor {
35  protected:
42  virtual void run_impl(
43  const int index) override;
44  public:
54  ProData(
55  const ElPtr &elem);
67  ProData(
68  const Vec<ElPtr> &elems);
69  virtual ~ProData() = default;
74  virtual void prepare() override;
87  void select(
88  const py::args &args);
95  const Vec<Json> &get_results();
96 };
97 
98 #endif
Vec< Str > selected_keys
Definition: pro_data.h:28
ShPtr< Element > ElPtr
An alias for a shared pointer of Element class.
Definition: element.h:378
virtual void prepare() override
Clear and resize results.
Definition: pro_data.cpp:72
void select(const py::args &args)
Specify string keys for properties to be copied.
Definition: pro_data.cpp:80
std::vector< T > Vec
Vec is an alias for vector (same as list in Python).
Definition: std.h:27
virtual void run_impl(const int index) override
Implementation of analysis using an element of generators.
Definition: pro_data.cpp:34
Vec< Json > results
Definition: pro_data.h:34
ProData copies Element::data from Element objects.
Definition: pro_data.h:23
This file has a definition of Processor class, where an analysis process is programmed.
Processor analyzes data contained in one or more Generator objects.
Definition: processor.h:18
const Vec< Json > & get_results()
Get list of Json objects consisting of all or some properties of Element objects stored in this objec...
Definition: pro_data.cpp:88
ProData(const ElPtr &elem)
Constructor of ProData class for one Element object.
Definition: pro_data.cpp:18