Class ParameterValue¶
Defined in File parameter.hpp
Nested Relationships¶
Nested Types¶
Class Documentation¶
-
class ParameterValue¶
An owned parameter value.
Public Functions
-
explicit ParameterValue(double value)¶
Constructor for a floating point value.
-
explicit ParameterValue(bool value)¶
Constructor for a boolean value.
-
explicit ParameterValue(std::string_view value)¶
Constructor for a string value.
-
inline explicit ParameterValue(const char *value)¶
Constructor for a string value from a C-style string.
-
explicit ParameterValue(std::vector<ParameterValue> values)¶
Constructor for an array value.
-
explicit ParameterValue(std::map<std::string, ParameterValue> values)¶
Constructor for an dict value.
-
~ParameterValue() = default¶
-
ParameterValue(ParameterValue &&other) noexcept = default¶
Default move constructor.
-
ParameterValue &operator=(ParameterValue &&other) noexcept = default¶
Default move assignment.
-
ParameterValue(const ParameterValue&) = delete¶
-
ParameterValue &operator=(const ParameterValue&) = delete¶
-
inline ParameterValue clone() const¶
Creates a deep clone of this parameter value.
-
ParameterValueView view() const noexcept¶
Returns an immutable view of this parameter value.
-
template<typename T>
inline bool is() const¶ Checks whether the parameter value matches the specified type.
- Template Parameters:
T – The expected type of the parameter value.
-
template<typename T>
inline T get() const¶ Extracts a value from the parameter.
This method will throw an exception if the type does not match. You can use
ParameterValue::is<T>()
to check that the type matches before calling this method.- Template Parameters:
T – The type of the value to extract.
-
explicit ParameterValue(double value)¶