Deepsolver
Public Member Functions
Deepsolver::ConfigFile Class Reference

The configuration file format parser. More...

List of all members.

Public Member Functions

 ConfigFile (AbstractConfigFileHandler &handler, const std::string fileName)
 The constructor.
void processLine (const std::string &line)
 Processes one configuration file line.
virtual ~ConfigFile ()
 The destructor.

Detailed Description

This class performs general configuration file syntax parsing but don't take care about configuration data semantics. That means the another handler must be used in addition to this class to process semantics.

This parser doesn't read file from disk by itself. The client implementation should provide content line-by-line receiving parsed data back through special callback interface. However the configuration file name must be provided since it is used in syntax error messages construction. One instance of this parser may be used only for one file because it has internal line counter. By the same reason the empty lines must be given as well as lines with any content.

See also:
ConfigCenter AbstractConfigHandler ConfigFileException

Constructor & Destructor Documentation

Deepsolver::ConfigFile::ConfigFile ( AbstractConfigFileHandler handler,
const std::string  fileName 
) [inline]
Parameters:
[in]handlerThe reference to the handler object for parsed data processing
[in]fileNameThe name of the file being parsed

Member Function Documentation

void ConfigFile::processLine ( const std::string &  line)

Use this method to parse one line and receive parsed data back.

Parameters:
[in]Thecontent of the line to process