28 #ifndef CTextFileLinesParser_H
29 #define CTextFileLinesParser_H
48 CTextFileLinesParser() : m_curLineNum(0), m_filter_MATLAB_comments(true), m_filter_C_comments(true), m_filter_SH_comments(true) { }
51 CTextFileLinesParser(
const std::string &fil) : m_filter_MATLAB_comments(true), m_filter_C_comments(true), m_filter_SH_comments(true) {
56 void open(
const std::string &fil)
62 m_in.open(fil.c_str());
81 inline bool getNextLine(std::string &out_str)
83 std::istringstream buf;
99 bool getNextLine( std::istringstream &buf )
104 std::getline(m_in,lin);
107 if (lin.empty())
continue;
125 inline void enableCommentFilters(
126 bool filter_MATLAB_comments,
127 bool filter_C_comments,
128 bool filter_SH_comments
131 m_filter_MATLAB_comments = filter_MATLAB_comments;
132 m_filter_C_comments = filter_C_comments;
133 m_filter_SH_comments = filter_SH_comments;