ppap4lmp  0.7.2
py_add_map.cpp
Go to the documentation of this file.
1 
8 #include "py_add_map.h"
9 
10 void pybind::py_add_map(py::module &m)
11 {
12  py::class_<AddMap,PyUpdater<AddMap>,Adder,Updater,ShPtr<AddMap>>(m, "AddMap")
13  .def(py::init<const Str &,const Str &,const Map<Json,Json> &>())
14  .def(
15  "overwrite", &AddMap::overwrite,
16  py::arg("do_overwrite_") = true);
17 }
ShPtr< AddMap > overwrite(bool do_overwrite_=true)
Allow overwriting an existing property by a new property with the same name.
Definition: add_map.cpp:59
This file is for binding AddMap class to Python.
Updater is an abstract class to update data held by an Element object.
Definition: updater.h:34
Adder adds new properties to a non-empty Element object.
Definition: adder.h:24
std::string Str
Str is an alias for string.
Definition: std.h:21
void py_add_map(py::module &m)
Bind AddMap class to Python.
Definition: py_add_map.cpp:10
std::shared_ptr< T > ShPtr
ShPtr is an alias for shared pointer.
Definition: std.h:16
std::unordered_map< T, U > Map
Map is an alias for unordered map (same as dict in Python).
Definition: std.h:38