EPICS ARCHIVER V4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
Public Member Functions | List of all members
ASCIIParser Class Reference

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 &parameter, stdString &value)
 Try to extract parameter=value pair from current line. More...
 

Detailed Description

Helper class for programming an ASCII-file parser.

The ASCIIParser assists in writing an ASCII file parser:

Member Function Documentation

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


The documentation for this class was generated from the following file: