ppap4lmp
0.7.2
|
AddChildIDs adds id
property of a child Element object to a parent Element object.
More...
#include <add_child_ids.h>
Public Member Functions | |
AddChildIDs (const ElPtr &elem, const Str &child_name_, const Str &key_for_parent_id_) | |
Constructor of AddChildIDs class. More... | |
![]() | |
Updater ()=default | |
Constructor of Updater class. More... | |
![]() | |
Updater ()=default | |
Constructor of Updater class. More... | |
void | compute (const ElPtr &elem, const int elementid, Json &data) |
Managing computation to update Element::data. More... | |
void | remove_from_skippable_elementids (const int elementid) |
Remove Element::elementid from skippable_elementids. More... | |
const ShPtr< Generator > & | get_ext_generator () |
Get ext_generator of this object. More... | |
Protected Member Functions | |
virtual void | compute_impl (Json &data, JsonToVoidFunc check_required_keys, JsonToBoolFunc check_optional_keys) override |
This method overrides Updater::compute_impl. More... | |
![]() | |
virtual void | compute_body (const ElPtr &elem, Json &data) override |
Compute properties and add them to Element::data given as a mutable reference. More... | |
![]() | |
virtual void | compute_common (const ElPtr &elem, Json &data) |
Common part of compute_body. More... | |
Private Attributes | |
Str | child_name |
Str | key_for_parent_id |
Additional Inherited Members | |
![]() | |
ShPtr< Generator > | ext_generator |
AddChildIDs adds id
property of a child Element object to a parent Element object.
An object of this class owns a child Element object as ext_generator, and is appended to a parent object using its Element::append_updater. The object of this class appends values for id
property of the child object to an array belonging to the parent object. An example of child is an Element object containing data for atoms, and an example of parent* is an Element object containing data for molecules.
The terms child and parent are used because a parent object consists of a child object. In terms of time series, however, the child is created earlier than the parent.
About usage in Python, please see pybind::py_add_child_ids.
Definition at line 33 of file add_child_ids.h.
AddChildIDs::AddChildIDs | ( | const ElPtr & | elem, |
const Str & | child_name_, | ||
const Str & | key_for_parent_id_ | ||
) |
Constructor of AddChildIDs class.
elem | A child Element object. This parameter is assigned to ext_generator.
|
child_name_ | A string for naming the child object. This parameter is assigned to child_name. |
key_for_parent_id_ | A string for key in the child object corresponding to id of parent object. This parameter is assigned to key_for_parent_id. |
Definition at line 17 of file add_child_ids.cpp.
|
overrideprotectedvirtual |
This method overrides Updater::compute_impl.
[child_name]-ids
: array of integers id
: integer Implements Updater.
Definition at line 29 of file add_child_ids.cpp.
|
private |
Name of child object stored as ext_generator. Key for property added by this class is named as [child_name]-ids
.
Definition at line 38 of file add_child_ids.h.
|
private |
Key in ext_generator corresponding to id
of parent object.
Definition at line 42 of file add_child_ids.h.