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");
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;
Definition: ColumnTextParser.hpp:57
bool loadFromFile(const std::string &Filename)
bool getStringValue(unsigned int Line, unsigned int Column, std::string *Value) const
bool setFromString(const std::string &Contents, unsigned int ColumnsNbr)
unsigned int getLinesCount() const
Definition: ColumnTextParser.hpp:160
std::vector< std::string > getValues(unsigned int Line) const
bool getDoubleValue(unsigned int Line, unsigned int Column, double *Value) const
bool getLongValue(unsigned int Line, unsigned int Column, long *Value) const
void streamContents(std::ostream &OStream) const
std::string getValue(unsigned int Line, unsigned int Column) const
ColumnTextParser(const std::string &CommentLineSymbol="", const std::string &Delimiter=" \t\r\n")
unsigned int getColsCount() const
Definition: ColumnTextParser.hpp:166
#define OPENFLUID_API
Definition: dllexport.hpp:86
Definition: ApplicationException.hpp:47