16#include <boost/lexical_cast.hpp>
25 const unsigned int direction)
26 : m_name(
std::move(name)),
m_value(
std::move(
value)), m_type(
std::move(type)), m_isDefault(isdefault),
27 m_direction(direction) {}
30 : m_name(prop->name()),
m_value(prop->valueAsPrettyStr(0, true)), m_type(prop->type()),
31 m_isDefault(prop->isDefault()), m_direction(prop->direction()) {}
41 os << std::string(indent,
' ') <<
"Name: " <<
m_name;
42 if ((maxPropertyLength > 0) && (
m_value.size() > maxPropertyLength)) {
47 os <<
", Default?: " << (
m_isDefault ?
"Yes" :
"No");
65 bool emptyDefault =
false;
68 static std::vector<std::string> numberTypes, emptyValues;
70 if (numberTypes.empty()) {
76 if (emptyValues.empty()) {
78 emptyValues.emplace_back(boost::lexical_cast<std::string>(
EMPTY_DBL()));
84 if (std::find(numberTypes.begin(), numberTypes.end(),
m_type) != numberTypes.end()) {
85 if (std::find(emptyValues.begin(), emptyValues.end(),
m_value) != emptyValues.end()) {
const std::string & m_value
double value
The value of the point.
This class stores information about the parameters used by an algorithm.
bool m_isDefault
flag defining if the parameter is a default or a user-defined parameter
std::string m_name
The name of the parameter.
std::string m_value
The value of the parameter.
PropertyHistory(std::string name, std::string value, std::string type, const bool isdefault, const unsigned int direction=99)
Constructor.
bool isEmptyDefault() const
get whether algorithm parameter was left as default EMPTY_INT,LONG,DBL const
void printSelf(std::ostream &, const int indent=0, const size_t maxPropertyLength=0) const
print contents of object
std::string m_type
The type of the parameter.
unsigned int m_direction
direction of parameter
Base class for properties.
MANTID_KERNEL_DLL std::string shorten(const std::string &input, const size_t max_length)
Converts long strings into "start ... end".
MANTID_KERNEL_DLL std::ostream & operator<<(std::ostream &, CPUTimer &)
Convenience function to provide for easier debug printing.
MANTID_KERNEL_DLL std::string getUnmangledTypeName(const std::type_info &type)
Return the name corresponding to the mangled string given by typeid.
constexpr int EMPTY_INT() noexcept
Returns what we consider an "empty" integer within a property.
constexpr long EMPTY_LONG() noexcept
Returns what we consider an "empty" long within a property.
constexpr double EMPTY_DBL() noexcept
Returns what we consider an "empty" double within a property.
std::string to_string(const wide_integer< Bits, Signed > &n)
@ Output
An output workspace.
static const std::string asText(const unsigned int &direction)
Returns a text representation of the input Direction enum.