40 #ifndef __OPENFLUID_TOOLS_COLUMNTEXTPARSER_HPP__
41 #define __OPENFLUID_TOOLS_COLUMNTEXTPARSER_HPP__
63 std::string m_Delimiter;
65 std::string m_CommentSymbol;
67 unsigned int m_LinesCount;
69 unsigned int m_ColsCount;
71 std::vector<std::vector<std::string> > m_Contents;
73 std::vector<std::string> tokenizeLine(
const std::string& Line);
75 std::vector<std::string>
tokenizeString(
const std::string& String);
79 bool isCommentLineStr(
const std::string& LineStr);
81 bool isEmptyLineStr(
const std::string& LineStr);
89 ColumnTextParser(
const std::string& CommentLineSymbol =
"",
const std::string& Delimiter =
" \t\r\n");
102 bool loadFromFile(
const std::string& Filename);
111 bool setFromString(
const std::string& Contents,
unsigned int ColumnsNbr);
119 std::string getValue(
unsigned int Line,
unsigned int Column)
const;
128 bool getStringValue(
unsigned int Line,
unsigned int Column, std::string *Value)
const;
137 bool getLongValue(
unsigned int Line,
unsigned int Column,
long* Value)
const;
147 bool getDoubleValue(
unsigned int Line,
unsigned int Column,
double* Value)
const;
154 std::vector<std::string> getValues(
unsigned int Line)
const;
168 void streamContents(std::ostream& OStream)
const;