11 #ifndef __ASCII_PARSER__
12 #define __ASCII_PARSER__
18 #include "tools/ToolsConfig.h"
19 #include "tools/AutoFilePtr.h"
20 #include "tools/NoCopy.h"
41 bool open(
const stdString &file_name);
49 const stdString &
getLine()
const;
57 bool getParameter(stdString ¶meter, stdString &value);
bool nextLine()
Read next line from file, skipping comment lines.
bool open(const stdString &file_name)
Open file for parsing.
Helper class for programming an ASCII-file parser.
Definition: ASCIIParser.h:32
Auto-close FILE pointer wrapper.
Definition: AutoFilePtr.h:15
bool getParameter(stdString ¶meter, stdString &value)
Try to extract parameter=value pair from current line.
const stdString & getLine() const
Get current line as string, excluding ' '.
Definition: ASCIIParser.h:66
size_t getLineNo() const
Get number of current line.
Definition: ASCIIParser.h:69