PWToolBox::Configuration::ConfigurationReader Class Reference

The base interface used by all readers of configuration files. More...

#include <ConfigurationReader.h>

Inheritance diagram for PWToolBox::Configuration::ConfigurationReader:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 ConfigurationReader (std::istream &inputStream)
 Constructs a new ConfigurationReader, which will read its input from inputStream.
virtual ~ConfigurationReader ()
virtual void read (ConfigurationSection &configuration)=0
 Reads a configuration file from the input stream and puts the parsed file into configuration.
virtual void read (ConfigurationSection::SharedPtr configuration)
 Reads a configuration file from the input stream and puts the parsed file into configuration.

Protected Attributes

std::istream & m_inputStream
 This is the stream that we will read from.

Detailed Description

The base interface used by all readers of configuration files.

Custom configuration readers should implement this class. PWToolBox provides two custom implementations of this class, INIConfigurationReader and XMLConfigurationReader, which read from ini and XML files, respectively.


Constructor & Destructor Documentation

PWToolBox::Configuration::ConfigurationReader::ConfigurationReader ( std::istream &  inputStream  )  [inline]

Constructs a new ConfigurationReader, which will read its input from inputStream.

Parameters:
inputStream The input stream to read from

virtual PWToolBox::Configuration::ConfigurationReader::~ConfigurationReader (  )  [inline, virtual]


Member Function Documentation

virtual void PWToolBox::Configuration::ConfigurationReader::read ( ConfigurationSection configuration  )  [pure virtual]

Reads a configuration file from the input stream and puts the parsed file into configuration.

Parameters:
configuration The configuration section into which the settings will be placed
Exceptions:
IllegalOperationException Thrown if there was a problem parsing the stream

Implemented in PWToolBox::Configuration::INIConfigurationReader, and PWToolBox::Configuration::XMLConfigurationReader.

virtual void PWToolBox::Configuration::ConfigurationReader::read ( ConfigurationSection::SharedPtr  configuration  )  [inline, virtual]

Reads a configuration file from the input stream and puts the parsed file into configuration.

Parameters:
configuration The configuration section into which the settings will be placed
Exceptions:
IllegalOperationException Thrown if there was a problem parsing the stream


Member Data Documentation

std::istream& PWToolBox::Configuration::ConfigurationReader::m_inputStream [protected]

This is the stream that we will read from.


The documentation for this class was generated from the following file:
Generated on Sun Jul 13 14:18:27 2008 for PWToolBox by  doxygen 1.5.1