12#include <boost/algorithm/string.hpp>
13#include <boost/format.hpp>
34 std::string toXMLString()
const override;
35 Derived &operator=(
const Derived &other);
38 ValType getValue()
const;
39 bool isValid()
const override;
68template <
typename Derived,
typename ValType>
71 this->m_isValid = other.m_isValid;
74 return *(
dynamic_cast<Derived *
>(
this));
82template <
typename Derived,
typename ValType>
84 return other.m_value == this->
m_value;
92template <
typename Derived,
typename ValType>
94 return !(*
this == other);
101template <
typename Derived,
typename ValType>
106template <
typename Derived,
typename ValType>
110 m_isValid = other.m_isValid;
115template <
typename Derived,
typename ValType>
122template <
typename Derived,
typename ValType>
131 return this->parameterXMLTemplate(valueXMLtext);
142#define DECLARE_SINGLE_VALUE_PARAMETER(classname, type_) \
143 class classname : public Mantid::API::SingleValueParameter<classname, type_> { \
145 using SuperType = Mantid::API::SingleValueParameter<classname, type_>; \
146 static std::string parameterName() { return #classname; } \
147 classname(type_ value) : SuperType(value) {} \
148 classname() : SuperType() {} \
149 std::string getName() const override { return #classname; } \
150 classname *clone() const override { return new classname(m_value); } \
const std::string & m_value
double value
The value of the point.
#define DLLExport
Definitions of the DLLImport compiler directives for MSVC.
Abstract parameter type for use with IImplicitFunctions.
SingleValueParameter is a templated base class implementing CRTP.
SingleValueParameter()
Default constructor. Object is created in invalid state.
bool operator!=(const Derived &other) const
bool isValid() const override
bool operator==(const Derived &other) const
SingleValueParameter< Derived, ValType > & operator=(const SingleValueParameter< Derived, ValType > &other)
std::string toXMLString() const override
Helper class which provides the Collimation Length for SANS instruments.
constexpr bool operator==(const wide_integer< Bits, Signed > &lhs, const wide_integer< Bits2, Signed2 > &rhs)
constexpr bool operator!=(const wide_integer< Bits, Signed > &lhs, const wide_integer< Bits2, Signed2 > &rhs)
Default ElementTraits SFINAE Typetraits are used to provide the correct formatting based on the eleme...