![]() |
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Script interface wrapper for a component of the system class. More...
#include <Leaf.hpp>
Inheritance diagram for ScriptInterface::System::Leaf:
Collaboration diagram for ScriptInterface::System::Leaf:Public Member Functions | |
| ~Leaf () override=default | |
| 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 |
| std::string_view | 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::vector< std::string_view > | valid_parameters () const |
| Get required and optional parameters for class. | |
| virtual bool | has_parameter (std::string const &needle) 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. | |
| virtual void | do_set_parameter (const std::string &, const Variant &) |
| Local implementation of set_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.
|
overridedefault |
|
inline |
Definition at line 68 of file script_interface/system/Leaf.hpp.
References m_system, on_bind_system(), and stream.
Referenced by ScriptInterface::Thermostat::Interface< CoreClass >::update_and_bind().
|
inline |
Definition at line 74 of file script_interface/system/Leaf.hpp.
References m_system, on_detach_system(), and stream.
Referenced by ScriptInterface::Integrators::Integrator::deactivate().
|
inlineprotected |
Definition at line 59 of file script_interface/system/Leaf.hpp.
Definition at line 53 of file script_interface/system/Leaf.hpp.
References m_system, and stream.
Referenced by ScriptInterface::CellSystem::CellSystem::CellSystem(), ScriptInterface::Interactions::NonBondedInteractions::do_call_method(), ScriptInterface::Coulomb::ICCStar::do_call_method(), ScriptInterface::Analysis::Analysis::do_call_method(), ScriptInterface::Analysis::ObservableStat::do_call_method(), ScriptInterface::CellSystem::CellSystem::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::CellSystem::CellSystem::configure(), ScriptInterface::CellSystem::CellSystem::configure(), 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().