ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Bind parameters in the script interface. More...
#include <AutoParameters.hpp>
Classes | |
struct | UnknownParameter |
Exception thrown when accessing an unknown parameter. More... | |
struct | WriteError |
Exception thrown when writing to a read-only parameter. More... | |
Protected Member Functions | |
AutoParameters ()=default | |
AutoParameters (std::vector< AutoParameter > &¶ms) | |
void | add_parameters (std::vector< AutoParameter > &¶ms) |
auto const & | get_parameter_insertion_order () const |
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. | |
Bind parameters in the script interface.
This class implements ScriptInterfaceBase
, binding the parameters added by add_parameters or by the constructor. To use it, derive from this class and add parameters. For example, given a class A
that should have i
exposed, this can be achieved by extending it like this:
If there is more complicated logic needed, specific setters and getters can be provided. E.g. given a class B like
we can use a lambdas to set and get the parameter like this:
(this has to be captured in the lambdas to have access to the member functions of the class).
Definition at line 93 of file AutoParameters.hpp.
|
protecteddefault |
|
inlineexplicitprotected |
Definition at line 111 of file AutoParameters.hpp.
References ScriptInterface::AutoParameters< Derived, Base >::add_parameters(), and params.
|
inlineprotected |
Definition at line 115 of file AutoParameters.hpp.
References ScriptInterface::get_value(), and params.
Referenced by ScriptInterface::AutoParameters< Derived, Base >::AutoParameters(), ScriptInterface::Thermostat::Brownian::Brownian(), ScriptInterface::Coulomb::CoulombMMM1D::CoulombMMM1D(), ScriptInterface::Coulomb::CoulombP3M< Architecture >::CoulombP3M(), ScriptInterface::Coulomb::CoulombScafacos::CoulombScafacos(), ScriptInterface::Coulomb::DebyeHueckel::DebyeHueckel(), ScriptInterface::Dipoles::DipolarDirectSum::DipolarDirectSum(), ScriptInterface::Dipoles::DipolarLayerCorrection::DipolarLayerCorrection(), ScriptInterface::Dipoles::DipolarP3M< Architecture >::DipolarP3M(), ScriptInterface::Dipoles::DipolarScafacos::DipolarScafacos(), ScriptInterface::walberla::EKSpecies::EKSpecies(), ScriptInterface::Coulomb::ElectrostaticLayerCorrection::ElectrostaticLayerCorrection(), ScriptInterface::Interactions::InteractionBMHTF::InteractionBMHTF(), ScriptInterface::Interactions::InteractionBuckingham::InteractionBuckingham(), ScriptInterface::Interactions::InteractionDPD::InteractionDPD(), ScriptInterface::Interactions::InteractionGaussian::InteractionGaussian(), ScriptInterface::Interactions::InteractionGayBerne::InteractionGayBerne(), ScriptInterface::Interactions::InteractionHat::InteractionHat(), ScriptInterface::Interactions::InteractionHertzian::InteractionHertzian(), ScriptInterface::Interactions::InteractionLJ::InteractionLJ(), ScriptInterface::Interactions::InteractionLJcos::InteractionLJcos(), ScriptInterface::Interactions::InteractionLJcos2::InteractionLJcos2(), ScriptInterface::Interactions::InteractionLJGen::InteractionLJGen(), ScriptInterface::Interactions::InteractionMorse::InteractionMorse(), ScriptInterface::Interactions::InteractionSmoothStep::InteractionSmoothStep(), ScriptInterface::Interactions::InteractionSoftSphere::InteractionSoftSphere(), ScriptInterface::Interactions::InteractionTabulated::InteractionTabulated(), ScriptInterface::Interactions::InteractionThole::InteractionThole(), ScriptInterface::Interactions::InteractionWCA::InteractionWCA(), ScriptInterface::Thermostat::IsotropicNpt::IsotropicNpt(), ScriptInterface::Thermostat::Langevin::Langevin(), ScriptInterface::walberla::LBFluid::LBFluid(), ScriptInterface::Thermostat::LBThermostat::LBThermostat(), and ScriptInterface::Coulomb::ReactionField::ReactionField().
|
inlinefinalvirtual |
Reimplemented from ScriptInterface::ObjectHandle.
Definition at line 152 of file AutoParameters.hpp.
References ScriptInterface::ObjectHandle::name().
|
inlinefinalvirtual |
Reimplemented from ScriptInterface::ObjectHandle.
Definition at line 144 of file AutoParameters.hpp.
References ScriptInterface::ObjectHandle::name().
|
inlineprotected |
Definition at line 129 of file AutoParameters.hpp.
|
inlinefinalvirtual |
Reimplemented from ScriptInterface::ObjectHandle.
Definition at line 163 of file AutoParameters.hpp.
References ScriptInterface::ObjectHandle::get_parameters(), ScriptInterface::get_value(), and params.
|
inlinefinalvirtual |
Reimplemented from ScriptInterface::ObjectHandle.
Definition at line 133 of file AutoParameters.hpp.
References ScriptInterface::get_value().