19 template <
typename TEnum>
30 const std::string& name,
41 virtual bool set(
const Value& value)
override {
42 const Interval i = settings.template get<Interval>(
id);
55 const Interval i = settings.template get<Interval>(
id);
71 virtual std::string
getName()
const override {
76 template <
typename TEnum>
79 const std::string& name,
81 return makeAuto<IntervalEntry<TEnum>>(settings, id, name, bound);
99 virtual std::string
toString()
const override;
101 virtual void fromString(
const std::string& s)
override;
double Float
Precision used withing the code. Use Float instead of float or double where precision is important.
#define INLINE
Macros for conditional compilation based on selected compiler.
#define NAMESPACE_SPH_END
INLINE AutoPtr< IVirtualEntry > makeEntry(Settings< TEnum > &settings, const TEnum id, const std::string &name, const IntervalBound bound)
Object providing connection between component parameters and values exposed to the user.
Wrapper of pointer that deletes the resource from destructor.
Special entry allowing to access and (de)serialize a curve.
CurveEntry(const Curve &curve)
virtual void fromString(const std::string &s) override
virtual AutoPtr< IExtraEntry > clone() const override
virtual std::string toString() const override
Represents a user-defined function, defined by a set of points interpolated by either piecewise linea...
Represents a virtual entry in the settings.
Entry connecting to either lower or upper bound of an interval stored in settings.
virtual Value get() const override
Returns the currently stored value.
virtual std::string getName() const override
Returns a descriptive name of the entry.
virtual bool isValid(const Value &UNUSED(value)) const override
virtual bool enabled() const override
Returns if this entry is currently enabled.
virtual Type getType() const override
Returns the type of this entry.
IntervalEntry(Settings< TEnum > &settings, const TEnum id, const std::string &name, const IntervalBound bound)
virtual bool set(const Value &value) override
Modifies the current value of the entry.
Object representing a 1D interval of real numbers.
INLINE Float lower() const
Returns lower bound of the interval.
INLINE Float upper() const
Returns upper bound of the interval.
Generic object containing various settings and parameters of the run.
Settings & set(const TEnum idx, TValue &&value, std::enable_if_t<!std::is_enum< std::decay_t< TValue >>::value, int >=0)
Saves a value into the settings.
Variant, an implementation of type-safe union, similar to std::variant or boost::variant.
INLINE T & get()
Returns the stored value.