37 void parseLines(
const std::string &lines);
38 std::string outputLines()
const;
41 bool hasLine(
const std::string &name)
const;
42 bool hasSection(
const std::string &name)
const;
44 std::vector<std::string> values(
const std::string &name,
const size_t i = 0)
const;
47 val.reserve(m_curValues.size() - m_curIndex);
49 for (
size_t i = m_curIndex; i < m_curValues.size(); ++i) {
50 auto valStr = m_curValues.at(i);
51 std::stringstream valSS(valStr);
54 val.emplace_back(ret);
69 template <
typename T>
void parseLines(
const std::string &name, std::vector<T> &container) {
77 parseLines(name, container, extractor);
90 template <
typename T,
typename Extractor>
91 void parseLines(
const std::string &name, std::vector<T> &container, Extractor &&extractor) {
93 while (selectLine(name,
index)) {
94 auto value = std::forward<Extractor>(extractor)(*this);
95 container.emplace_back(
value);
100 std::vector<std::string> sections(
const std::string &name)
const;
102 std::string lineAsString(
const std::string &name,
const size_t i = 0)
const;
103 QString lineAsQString(
const std::string &name,
const size_t i = 0)
const;
105 bool selectLine(
const std::string &name,
const size_t i = 0);
106 bool selectSection(
const std::string &name,
const size_t i = 0);
108 void storeDouble(
const double val);
109 void storeInt(
const int val);
110 void storeString(
const std::string &val);
111 void storeBool(
const bool val);
115 std::string readString();
118 int asInt(
const size_t i)
const;
119 size_t asSize_t(
const size_t i)
const;
120 double asDouble(
const size_t i)
const;
121 float asFloat(
const size_t i)
const;
122 std::string asString(
const size_t i)
const;
123 QString asQString(
const size_t i)
const;
124 bool asBool(
const size_t i)
const;
125 QRect asQRect(
const size_t i);
126 QColor asQColor(
const size_t i);
127 QPoint asQPoint(
const size_t i);
128 QPointF asQPointF(
const size_t i);
156 void writeRaw(
const std::string &raw);
157 void writeSection(
const std::string &name,
const std::string &body);
158 void writeInlineSection(
const std::string &name,
const std::string &body);
#define EXPORT_OPT_MANTIDQT_COMMON
double value
The value of the point.
std::ostream & operator<<(std::ostream &out, const MantidQt::MantidWidgets::IndexType< i > &index)
std::map< DeltaEMode::Type, std::string > index
Mantid::Kernel::CaseInsensitiveMap< std::vector< std::string > > m_sections
std::vector< std::string > m_curValues
void parseLines(const std::string &name, std::vector< T > &container, Extractor &&extractor)
Parse all lines matching a name and extract the values to a vector.
TSVSerialiser & operator>>(std::vector< T > &val)
Mantid::Kernel::CaseInsensitiveMap< std::vector< std::string > > m_lines
void parseLines(const std::string &name, std::vector< T > &container)
Parse all lines matching a name and extract the values to a vector.
std::stringstream m_output
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...
std::map< std::string, T, CaseInsensitiveStringComparator > CaseInsensitiveMap
Alias template for a map data structure that has case insensitive string comparision with a variable ...