ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Context of an object handle. More...
#include <Context.hpp>
Public Member Functions | |
virtual void | notify_call_method (const ObjectHandle *self, std::string const &name, VariantMap const &arguments)=0 |
Call method on remote instances. | |
virtual void | notify_set_parameter (const ObjectHandle *self, std::string const &name, Variant const &value)=0 |
Set a parameter on remote instances. | |
virtual std::shared_ptr< ObjectHandle > | make_shared (std::string const &name, const VariantMap ¶meters)=0 |
Get a new reference counted instance of a script interface by name. | |
virtual std::shared_ptr< ObjectHandle > | make_shared_local (std::string const &name, VariantMap const ¶meters)=0 |
Get a new reference counted instance of a script interface by name. | |
virtual boost::string_ref | name (const ObjectHandle *o) const =0 |
Get the class name for an ObjectHandle instance. | |
virtual bool | is_head_node () const =0 |
virtual void | parallel_try_catch (std::function< void()> const &cb) const =0 |
virtual boost::mpi::communicator const & | get_comm () const =0 |
virtual | ~Context ()=default |
Protected Member Functions | |
void | set_context (ObjectHandle *o) |
Set the context of an object to this. | |
Context of an object handle.
Each instance of ObjectHandle can have an attached context, which can e.g. synchronize distributed copies of the instance. The context does also provide facilities for serializing Objects into a string representation.
Definition at line 54 of file Context.hpp.
|
virtualdefault |
Implemented in ScriptInterface::GlobalContext, and ScriptInterface::LocalContext.
Referenced by ScriptInterface::Observables::Observable::do_call_method(), ScriptInterface::CellSystem::CellSystem::do_call_method(), ScriptInterface::walberla::load_checkpoint_common(), ScriptInterface::walberla::save_checkpoint_common(), and ScriptInterface::walberla::LatticeSlice< FieldSerializer >::scatter_3d().
Implemented in ScriptInterface::GlobalContext, and ScriptInterface::LocalContext.
Referenced by ScriptInterface::System::CudaInitHandle::CudaInitHandle(), ScriptInterface::Accumulators::Correlator::do_call_method(), ScriptInterface::ReactionMethods::ReactionAlgorithm::do_call_method(), ScriptInterface::walberla::load_checkpoint_common(), and ScriptInterface::walberla::save_checkpoint_common().
|
pure virtual |
Get a new reference counted instance of a script interface by name.
Objects created thru a Context get shared ownership of that context, e.g. the lifetime of the context is at least as long as the objects created by it. Therefore the object can always assume that the context is present.
Implemented in ScriptInterface::GlobalContext, and ScriptInterface::LocalContext.
Referenced by ScriptInterface::ObjectHandle::deserialize(), ScriptInterface::Particles::ParticleList::do_call_method(), ScriptInterface::Particles::ParticleSlice::do_call_method(), and ScriptInterface::ContextManager::make_shared().
|
pure virtual |
Get a new reference counted instance of a script interface by name.
Objects created thru a Context get shared ownership of that context, e.g. the lifetime of the context is at least as long as the objects created by it. Therefore the object can always assume that the context is present.
Implemented in ScriptInterface::GlobalContext, and ScriptInterface::LocalContext.
|
pure virtual |
Get the class name for an ObjectHandle instance.
This returns the name by which the object can be created.
Implemented in ScriptInterface::GlobalContext, and ScriptInterface::LocalContext.
|
pure virtual |
Call method on remote instances.
self | Internal identifier of the instance |
name | Name of the method to call |
arguments | Arguments to the call |
Implemented in ScriptInterface::LocalContext, and ScriptInterface::GlobalContext.
|
pure virtual |
Set a parameter on remote instances.
self | Internal identifier of the instance to be modified |
name | Name of the parameter to change |
value | Value to set it to |
Implemented in ScriptInterface::LocalContext, and ScriptInterface::GlobalContext.
|
pure virtual |
Implemented in ScriptInterface::GlobalContext, and ScriptInterface::LocalContext.
Referenced by ScriptInterface::CellSystem::CellSystem::CellSystem(), ScriptInterface::CollisionDetection::CollisionDetection::CollisionDetection(), ScriptInterface::Accumulators::Correlator::do_call_method(), ScriptInterface::Accumulators::MeanVarianceCalculator::do_call_method(), ScriptInterface::Accumulators::TimeSeries::do_call_method(), ScriptInterface::Observables::Observable::do_call_method(), ScriptInterface::walberla::LatticeModel< Method, VTKHandle >::do_call_method(), ScriptInterface::Analysis::Analysis::do_call_method(), ScriptInterface::Particles::Polymer::do_call_method(), ScriptInterface::CellSystem::CellSystem::do_call_method(), ScriptInterface::Coulomb::CoulombScafacos::do_call_method(), ScriptInterface::Coulomb::ICCStar::do_call_method(), ScriptInterface::Interactions::InteractionPotentialInterface< CoreIA >::do_call_method(), ScriptInterface::LeesEdwards::LeesEdwards::do_call_method(), ScriptInterface::ReactionMethods::ReactionAlgorithm::do_call_method(), ScriptInterface::ReactionMethods::WidomInsertion::do_call_method(), ScriptInterface::Thermostat::Thermostat::do_call_method(), ScriptInterface::walberla::EKSpeciesSlice::do_call_method(), ScriptInterface::walberla::LBFluid::do_call_method(), ScriptInterface::walberla::LBFluidSlice::do_call_method(), ScriptInterface::walberla::VTKHandleBase< Field >::do_call_method(), ScriptInterface::Accumulators::Correlator::do_construct(), ScriptInterface::walberla::LatticeWalberla::do_construct(), ScriptInterface::Interactions::InteractionPotentialInterface< CoreIA >::do_construct(), ScriptInterface::Coulomb::CoulombMMM1D::do_construct(), ScriptInterface::Coulomb::CoulombP3M< Architecture >::do_construct(), ScriptInterface::Coulomb::CoulombScafacos::do_construct(), ScriptInterface::Coulomb::DebyeHueckel::do_construct(), ScriptInterface::Coulomb::ElectrostaticLayerCorrection::do_construct(), ScriptInterface::Coulomb::ICCStar::do_construct(), ScriptInterface::Coulomb::ReactionField::do_construct(), ScriptInterface::Dipoles::DipolarDirectSum::do_construct(), ScriptInterface::Dipoles::DipolarDirectSumGpu::do_construct(), ScriptInterface::Dipoles::DipolarLayerCorrection::do_construct(), ScriptInterface::Dipoles::DipolarP3M< Architecture >::do_construct(), ScriptInterface::Dipoles::DipolarScafacos::do_construct(), ScriptInterface::Observables::CylindricalLBProfileObservable< CoreCylLBObs >::do_construct(), ScriptInterface::Observables::CylindricalPidProfileObservable< CoreObs >::do_construct(), ScriptInterface::Observables::LBProfileObservable< CoreLBObs >::do_construct(), ScriptInterface::Observables::PidObservable< CorePidObs >::do_construct(), ScriptInterface::Observables::PidProfileObservable< CoreObs >::do_construct(), ScriptInterface::ReactionMethods::ConstantpHEnsemble::do_construct(), ScriptInterface::ReactionMethods::ReactionEnsemble::do_construct(), ScriptInterface::ReactionMethods::SingleReaction::do_construct(), ScriptInterface::ReactionMethods::WidomInsertion::do_construct(), ScriptInterface::walberla::EKSpecies::do_construct(), ScriptInterface::walberla::LBFluid::do_construct(), ScriptInterface::walberla::VTKHandleBase< Field >::do_construct(), ScriptInterface::walberla::EKSpecies::EKSpecies(), ScriptInterface::Thermostat::Interface< CoreClass >::get_member_handle(), ScriptInterface::ReactionMethods::ReactionAlgorithm::get_reaction_index(), ScriptInterface::Integrators::Integrator::integrate(), ScriptInterface::Integrators::IntegratorHandle::IntegratorHandle(), ScriptInterface::Thermostat::Interface< CoreClass >::Interface(), ScriptInterface::walberla::LBFluid::LBFluid(), ScriptInterface::Thermostat::LBThermostat::LBThermostat(), ScriptInterface::LeesEdwards::LeesEdwards::LeesEdwards(), ScriptInterface::Thermostat::Interface< CoreClass >::make_autogamma(), ScriptInterface::Thermostat::Interface< CoreClass >::make_autoparameter(), ScriptInterface::ReactionMethods::ReactionAlgorithm::ReactionAlgorithm(), and ScriptInterface::Thermostat::Thermostat::setup_thermostat().
|
inlineprotected |
Set the context of an object to this.
o | Object to set the context for. |
Definition at line 102 of file Context.hpp.
References ScriptInterface::get_value().
Referenced by ScriptInterface::GlobalContext::make_shared(), ScriptInterface::LocalContext::make_shared(), and ScriptInterface::GlobalContext::make_shared_local().