ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Description and getter/setter for a parameter. More...
#include <AutoParameter.hpp>
Classes | |
struct | ReadOnly |
struct | WriteError |
Public Member Functions | |
template<typename T , class O > | |
AutoParameter (const char *name, std::shared_ptr< O > &obj, void(O::*setter)(T const &), T const &(O::*getter)() const) | |
Read-write parameter that is bound to an object. | |
template<typename T , class O > | |
AutoParameter (const char *name, std::shared_ptr< O > &obj, void(O::*setter)(T const &), T(O::*getter)() const) | |
Read-write parameter that is bound to an object. | |
template<typename T , class O > | |
AutoParameter (const char *name, std::shared_ptr< O > &obj, T const &(O::*getter)()) | |
Read-only parameter that is bound to an object. | |
template<typename T , class O > | |
AutoParameter (const char *name, std::shared_ptr< O > &obj, T(O::*getter)() const) | |
Read-only parameter that is bound to an object. | |
template<typename T , class O > | |
AutoParameter (const char *name, std::shared_ptr< O > &obj, T O::*getter) | |
Read-only parameter that is bound to an object. | |
template<typename T , class O > | |
AutoParameter (const char *name, std::shared_ptr< O > &obj, T &(O::*getter_setter)()) | |
Read-write parameter that is bound to an object. | |
template<typename T > | |
AutoParameter (const char *name, T &binding) | |
Read-write parameter that is bound to an object. | |
template<typename T > | |
AutoParameter (const char *name, T const &binding) | |
Read-only parameter that is bound to an object. | |
template<typename Setter , typename Getter > | |
AutoParameter (const char *name, Setter const &set, Getter const &get) | |
Read-write parameter with a user-provided getter and setter. | |
template<typename Getter > | |
AutoParameter (const char *name, ReadOnly, Getter const &get) | |
Read-only parameter with a user-provided getter. | |
void | set (Variant const &v) const |
Variant | get () const |
Public Attributes | |
const std::string | name |
The interface name. | |
const std::function< void(Variant const &)> | setter_ |
Set the parameter. | |
const std::function< Variant()> | getter_ |
Get the parameter. | |
Static Public Attributes | |
static constexpr const ReadOnly | read_only = ReadOnly{} |
Description and getter/setter for a parameter.
This is to be used with AutoParameters
.
Definition at line 36 of file AutoParameter.hpp.
|
inline |
Read-write parameter that is bound to an object.
name | The name the parameter should be bound to in the interface. |
obj | The object the parameter should be bound to. |
setter | The setter. |
getter | The getter. |
Definition at line 52 of file AutoParameter.hpp.
|
inline |
Read-write parameter that is bound to an object.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 63 of file AutoParameter.hpp.
|
inline |
Read-only parameter that is bound to an object.
name | The name the parameter should be bound to in the interface. |
obj | The object the parameter should be bound to. |
getter | The getter. |
Definition at line 77 of file AutoParameter.hpp.
|
inline |
Read-only parameter that is bound to an object.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 86 of file AutoParameter.hpp.
|
inline |
Read-only parameter that is bound to an object.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 95 of file AutoParameter.hpp.
|
inline |
Read-write parameter that is bound to an object.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 103 of file AutoParameter.hpp.
|
inline |
Read-write parameter that is bound to an object.
name | The name the parameter should be bound to in the interface. |
binding | The reference the parameter should be bound to. |
Definition at line 118 of file AutoParameter.hpp.
|
inline |
Read-only parameter that is bound to an object.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 127 of file AutoParameter.hpp.
|
inline |
Read-write parameter with a user-provided getter and setter.
name | The name the parameter should be bound to in the interface. |
set | A setter, which can be a Functor, a Lambda or a std::function that accepts a Variant const&. |
get | A getter, which can be a Functor, a Lambda or a std::function that return the parameter. The return type must be convertible to Variant. |
Definition at line 142 of file AutoParameter.hpp.
|
inline |
Read-only parameter with a user-provided getter.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 150 of file AutoParameter.hpp.
|
inline |
Definition at line 168 of file AutoParameter.hpp.
References getter_.
|
inline |
Definition at line 166 of file AutoParameter.hpp.
References setter_.
const std::function<Variant()> ScriptInterface::AutoParameter::getter_ |
const std::string ScriptInterface::AutoParameter::name |
The interface name.
Definition at line 155 of file AutoParameter.hpp.
Definition at line 42 of file AutoParameter.hpp.
Referenced by ScriptInterface::Coulomb::Actor< SIClass, CoreClass >::Actor(), ScriptInterface::Dipoles::Actor< SIClass, CoreClass >::Actor(), ScriptInterface::CollisionDetection::BindAtPointOfCollision::BindAtPointOfCollision(), ScriptInterface::CollisionDetection::BindCenters::BindCenters(), ScriptInterface::CellSystem::CellSystem::CellSystem(), ScriptInterface::Coulomb::CoulombMMM1D::CoulombMMM1D(), ScriptInterface::Coulomb::CoulombP3M< Architecture >::CoulombP3M(), ScriptInterface::Coulomb::CoulombScafacos::CoulombScafacos(), ScriptInterface::Observables::CylindricalLBProfileObservable< CoreCylLBObs >::CylindricalLBProfileObservable(), ScriptInterface::Observables::CylindricalPidProfileObservable< CoreObs >::CylindricalPidProfileObservable(), ScriptInterface::Math::CylindricalTransformationParameters::CylindricalTransformationParameters(), ScriptInterface::Coulomb::DebyeHueckel::DebyeHueckel(), ScriptInterface::Dipoles::DipolarDirectSum::DipolarDirectSum(), ScriptInterface::Dipoles::DipolarLayerCorrection::DipolarLayerCorrection(), ScriptInterface::Dipoles::DipolarP3M< Architecture >::DipolarP3M(), ScriptInterface::Dipoles::DipolarScafacos::DipolarScafacos(), ScriptInterface::walberla::EKNone::do_construct(), ScriptInterface::walberla::EKReactant::do_construct(), ScriptInterface::walberla::EKContainer::EKContainer(), ScriptInterface::walberla::EKFFT::EKFFT(), ScriptInterface::walberla::EKIndexedReaction::EKIndexedReaction(), ScriptInterface::walberla::EKSpecies::EKSpecies(), ScriptInterface::walberla::EKSpeciesNode::EKSpeciesNode(), ScriptInterface::Coulomb::ElectrostaticLayerCorrection::ElectrostaticLayerCorrection(), ScriptInterface::CollisionDetection::GlueToSurface::GlueToSurface(), ScriptInterface::Writer::H5md::H5md(), ScriptInterface::Coulomb::ICCStar::ICCStar(), ScriptInterface::Interactions::InteractionDPD::InteractionDPD(), ScriptInterface::Thermostat::Interface< CoreClass >::Interface(), ScriptInterface::walberla::LatticeWalberla::LatticeWalberla(), ScriptInterface::walberla::LBFluid::LBFluid(), ScriptInterface::walberla::LBFluidNode::LBFluidNode(), ScriptInterface::Observables::LBProfileObservable< CoreLBObs >::LBProfileObservable(), ScriptInterface::LeesEdwards::LeesEdwards::LeesEdwards(), ScriptInterface::Interactions::InteractionPotentialInterface< CoreIA >::make_autoparameter(), ScriptInterface::ObjectList< ManagedType, BaseType >::ObjectList(), ScriptInterface::ObjectMap< ManagedType, BaseType, KeyType >::ObjectMap(), ScriptInterface::Particles::ParticleSlice::ParticleSlice(), ScriptInterface::Observables::PidObservable< CorePidObs >::PidObservable(), ScriptInterface::Observables::PidProfileObservable< CoreObs >::PidProfileObservable(), ScriptInterface::Observables::RDF::RDF(), ScriptInterface::ReactionMethods::ReactionAlgorithm::ReactionAlgorithm(), ScriptInterface::Coulomb::ReactionField::ReactionField(), ScriptInterface::ReactionMethods::SingleReaction::SingleReaction(), ScriptInterface::Integrators::SteepestDescent::SteepestDescent(), ScriptInterface::Integrators::StokesianDynamics::StokesianDynamics(), ScriptInterface::Thermostat::Thermostat::Thermostat(), ScriptInterface::Integrators::VelocityVerletIsoNPT::VelocityVerletIsoNPT(), and ScriptInterface::walberla::VTKHandleBase< Field >::VTKHandleBase().
const std::function<void(Variant const &)> ScriptInterface::AutoParameter::setter_ |