40 #ifndef __COLFILEPARSER_HPP__
41 #define __COLFILEPARSER_HPP__
49 namespace openfluid {
namespace tools {
62 std::string m_Delimiter;
63 std::string m_CommentSymbol;
65 unsigned int m_LinesCount;
66 unsigned int m_ColsCount;
68 std::vector<std::vector<std::string> > m_Contents;
70 std::vector<std::string> tokenizeLine(
const std::string& Line);
74 bool isCommentLineStr(
const std::string& LineStr);
76 bool isEmptyLineStr(
const std::string& LineStr);
84 ColumnTextParser(
const std::string& CommentLineSymbol =
"",
const std::string& Delimiter =
" \t\r\n");
97 bool loadFromFile(
const std::string& Filename);
106 bool setFromString(
const std::string& Contents,
unsigned int ColumnsNbr);
114 std::string getValue(
unsigned int Line,
unsigned int Column);
123 bool getStringValue(
unsigned int Line,
unsigned int Column, std::string *Value);
132 bool getLongValue(
unsigned int Line,
unsigned int Column,
long* Value);
142 bool getDoubleValue(
unsigned int Line,
unsigned int Column,
double* Value);
149 std::vector<std::string> getValues(
unsigned int Line);
163 void streamContents(std::ostream& OStream);
Definition: ColTextParser.hpp:55
unsigned int getColsCount() const
Definition: ColTextParser.hpp:161
unsigned int getLinesCount() const
Definition: ColTextParser.hpp:155
#define DLLEXPORT
Definition: dllexport.hpp:51