EPICS ARCHIVER V4
|
Helper class for programming an ASCII-file parser. More...
#include <ASCIIParser.h>
Public Member Functions | |
bool | open (const stdString &file_name) |
Open file for parsing. More... | |
bool | nextLine () |
Read next line from file, skipping comment lines. More... | |
const stdString & | getLine () const |
Get current line as string, excluding ' '. | |
size_t | getLineNo () const |
Get number of current line. | |
bool | getParameter (stdString ¶meter, stdString &value) |
Try to extract parameter=value pair from current line. More... | |
Helper class for programming an ASCII-file parser.
The ASCIIParser assists in writing an ASCII file parser:
bool ASCIIParser::getParameter | ( | stdString & | parameter, |
stdString & | value | ||
) |
Try to extract parameter=value pair from current line.
Result: found parameter?
bool ASCIIParser::nextLine | ( | ) |
Read next line from file, skipping comment lines.
Result: false for error, hit end of file, ...
bool ASCIIParser::open | ( | const stdString & | file_name | ) |
Open file for parsing.
Only opens the file, does not read the first line. Result: true for success