ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Script interface wrapper for a component of the system class. More...
#include <Leaf.hpp>
Public Member Functions | |
void | bind_system (std::shared_ptr<::System::System > const &system) |
void | detach_system () |
Public Member Functions inherited from ScriptInterface::ObjectHandle | |
ObjectHandle ()=default | |
ObjectHandle (ObjectHandle const &)=delete | |
ObjectHandle & | operator= (ObjectHandle const &)=delete |
virtual | ~ObjectHandle ()=default |
boost::string_ref | name () const |
Context * | context () const |
Responsible context. | |
void | construct (VariantMap const ¶ms) |
Construct the handled object. | |
virtual void | do_construct (VariantMap const ¶ms) |
VariantMap | get_parameters () const |
Get current parameters. | |
virtual std::span< const boost::string_ref > | valid_parameters () const |
Get required and optional parameters for class. | |
auto | get_valid_parameters () const |
virtual Variant | get_parameter (std::string const &name) const |
Get single parameter. | |
void | set_parameter (const std::string &name, const Variant &value) |
Set single parameter. | |
Variant | call_method (const std::string &name, const VariantMap ¶ms) |
Call a method on the object. | |
virtual Variant | do_call_method (const std::string &, const VariantMap &) |
Local implementation of call_method . | |
std::string | serialize () const |
virtual std::vector< std::pair< std::string, Variant > > | serialize_parameters () const |
Serialize parameters. | |
Protected Member Functions | |
auto const & | get_system () const |
auto & | get_system () |
Protected Attributes | |
std::weak_ptr<::System::System > | m_system |
Private Member Functions | |
virtual void | on_bind_system (::System::System &) |
Callback triggered upon binding a leaf to a system. | |
virtual void | on_detach_system (::System::System &) |
Callback triggered upon detaching a leaf from a system. | |
Additional Inherited Members | |
Static Public Member Functions inherited from ScriptInterface::ObjectHandle | |
static ObjectRef | deserialize (const std::string &state, Context &ctx) |
Make object from serialized state. | |
Script interface wrapper for a component of the system class.
This class manages a core leaf object. A leaf can exist without a system, in which case the managed object cannot be fully initialized and has nothing to act upon. Binding a leaf to a system triggers an initialization of the managed object. Detaching a leaf may trigger a memory deallocation of the managed object resources, without deallocating the managed object itself. This behavior can be leveraged to implement move semantics. See System class design for more details.
Definition at line 44 of file script_interface/system/Leaf.hpp.
|
inline |
Definition at line 66 of file script_interface/system/Leaf.hpp.
References ScriptInterface::get_value(), m_system, and on_bind_system().
Referenced by ScriptInterface::Thermostat::Interface< CoreClass >::update_and_bind().
|
inline |
Definition at line 72 of file script_interface/system/Leaf.hpp.
References ScriptInterface::get_value(), m_system, and on_detach_system().
Referenced by ScriptInterface::Integrators::Integrator::deactivate().
|
inlineprotected |
Definition at line 59 of file script_interface/system/Leaf.hpp.
References ScriptInterface::get_value(), and m_system.
Definition at line 53 of file script_interface/system/Leaf.hpp.
References ScriptInterface::get_value(), and m_system.
Referenced by ScriptInterface::CellSystem::CellSystem::CellSystem(), ScriptInterface::Interactions::NonBondedInteractions::do_call_method(), ScriptInterface::Analysis::Analysis::do_call_method(), ScriptInterface::Analysis::ObservableStat::do_call_method(), ScriptInterface::CellSystem::CellSystem::do_call_method(), ScriptInterface::Coulomb::ICCStar::do_call_method(), ScriptInterface::Galilei::Galilei::do_call_method(), ScriptInterface::LeesEdwards::LeesEdwards::do_call_method(), ScriptInterface::Thermostat::Thermostat::do_call_method(), ScriptInterface::Integrators::Integrator::integrate(), ScriptInterface::Integrators::IntegratorHandle::IntegratorHandle(), ScriptInterface::LeesEdwards::LeesEdwards::LeesEdwards(), and ScriptInterface::Thermostat::Thermostat::update_global_kT().
|
inlineprivatevirtual |
Callback triggered upon binding a leaf to a system.
Reimplemented in ScriptInterface::Analysis::Analysis, ScriptInterface::Coulomb::Actor< SIClass, CoreClass >, ScriptInterface::Coulomb::Container, ScriptInterface::Dipoles::Actor< SIClass, CoreClass >, ScriptInterface::Dipoles::Container, ScriptInterface::CellSystem::CellSystem, ScriptInterface::CollisionDetection::CollisionDetection, ScriptInterface::Galilei::ComFixed, ScriptInterface::Galilei::Galilei, ScriptInterface::Integrators::IntegratorHandle, ScriptInterface::Interactions::NonBondedInteractions, ScriptInterface::LeesEdwards::LeesEdwards, ScriptInterface::Thermostat::Interface< CoreClass >, and ScriptInterface::Thermostat::Thermostat.
Definition at line 46 of file script_interface/system/Leaf.hpp.
Referenced by bind_system().
|
inlineprivatevirtual |
Callback triggered upon detaching a leaf from a system.
Reimplemented in ScriptInterface::Thermostat::Interface< CoreClass >.
Definition at line 48 of file script_interface/system/Leaf.hpp.
Referenced by detach_system().
|
protected |
Definition at line 51 of file script_interface/system/Leaf.hpp.
Referenced by bind_system(), ScriptInterface::Coulomb::Container::Container(), ScriptInterface::Dipoles::Container::Container(), detach_system(), ScriptInterface::Coulomb::ICCStar::do_call_method(), get_system(), get_system(), ScriptInterface::Integrators::IntegratorHandle::IntegratorHandle(), ScriptInterface::Analysis::Analysis::on_bind_system(), ScriptInterface::Coulomb::Actor< SIClass, CoreClass >::on_bind_system(), ScriptInterface::Dipoles::Actor< SIClass, CoreClass >::on_bind_system(), ScriptInterface::CellSystem::CellSystem::on_bind_system(), ScriptInterface::CollisionDetection::CollisionDetection::on_bind_system(), ScriptInterface::Interactions::NonBondedInteractions::on_bind_system(), and ScriptInterface::Thermostat::Thermostat::setup_thermostat().