PWToolBox::Configuration::XMLConfigurationWriter Class Reference

Writes a configuration in XML format. More...

#include <XMLConfigurationWriter.h>

Inheritance diagram for PWToolBox::Configuration::XMLConfigurationWriter:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 XMLConfigurationWriter (std::ostream &outputStream)
virtual ~XMLConfigurationWriter ()
virtual bool _writeBegin (ConfigurationSection const &configuration)
 This is called once at the beginning of the write.
virtual bool _writeEnd (ConfigurationSection const &configuration)
 This is called once at the end of the write.
virtual bool _writeSectionBegin (ConfigurationSection const &configuration, std::string const &key, ConfigurationSetting::AttributeList const &attrs)
 This is called at the beginning of each section.
virtual bool _writeSettingBegin (ConfigurationSection const &configuration, std::string const &key, ConfigurationSetting::AttributeList const &attrs)
 This is called at the beginning of each setting.
virtual bool _writeData (ConfigurationSection const &configuration, std::string const &data)
 This is called when writing the data.
virtual bool _writeSectionEnd (ConfigurationSection const &configuration, std::string const &key)
 This is called at the end of each section.
virtual bool _writeSettingEnd (ConfigurationSection const &configuration, std::string const &key)
 This is called at the end of each setting.
virtual void _writeComment (ConfigurationSection const &configuration, std::string const &comment)
 This is called for each comment.

Protected Types

typedef boost::shared_ptr<
TiXmlDocument > 
TiXmlDocumentPtr
typedef std::stack< TiXmlElement * > TiXmlElementStack

Protected Attributes

TiXmlDocumentPtr m_document
 A pointer to the XML document.
TiXmlElementStack m_elementStack
 A stack representing the current location in the document.

Detailed Description

Writes a configuration in XML format.


Member Typedef Documentation

typedef boost::shared_ptr<TiXmlDocument> PWToolBox::Configuration::XMLConfigurationWriter::TiXmlDocumentPtr [protected]

typedef std::stack<TiXmlElement*> PWToolBox::Configuration::XMLConfigurationWriter::TiXmlElementStack [protected]


Constructor & Destructor Documentation

PWToolBox::Configuration::XMLConfigurationWriter::XMLConfigurationWriter ( std::ostream &  outputStream  )  [inline]

Parameters:
outputStream The output stream to use for writing.

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


Member Function Documentation

virtual bool PWToolBox::Configuration::XMLConfigurationWriter::_writeBegin ( ConfigurationSection const &  configuration  )  [virtual]

This is called once at the beginning of the write.

This function should not be called directly.

Parameters:
configuration The ConfigurationSection being written
Returns:
true if writing should continue, false otherwise

Reimplemented from PWToolBox::Configuration::ConfigurationWriter.

virtual bool PWToolBox::Configuration::XMLConfigurationWriter::_writeEnd ( ConfigurationSection const &  configuration  )  [virtual]

This is called once at the end of the write.

This function should not be called directly.

Parameters:
configuration The ConfigurationSection being written
Returns:
true if writing should continue, false otherwise

Reimplemented from PWToolBox::Configuration::ConfigurationWriter.

virtual bool PWToolBox::Configuration::XMLConfigurationWriter::_writeSectionBegin ( ConfigurationSection const &  configuration,
std::string const &  key,
ConfigurationSetting::AttributeList const &  attrs 
) [virtual]

This is called at the beginning of each section.

This function should not be called directly.

Parameters:
configuration The ConfigurationSection being written
key The section name
attrs The attributes of the section
Returns:
true if writing should continue, false otherwise

Reimplemented from PWToolBox::Configuration::ConfigurationWriter.

virtual bool PWToolBox::Configuration::XMLConfigurationWriter::_writeSettingBegin ( ConfigurationSection const &  configuration,
std::string const &  key,
ConfigurationSetting::AttributeList const &  attrs 
) [virtual]

This is called at the beginning of each setting.

This function should not be called directly.

Parameters:
configuration The ConfigurationSection being written
key The setting name
attrs The attributes of the section
Returns:
true if writing should continue, false otherwise

Reimplemented from PWToolBox::Configuration::ConfigurationWriter.

virtual bool PWToolBox::Configuration::XMLConfigurationWriter::_writeData ( ConfigurationSection const &  configuration,
std::string const &  data 
) [virtual]

This is called when writing the data.

This function should not be called directly.

Parameters:
configuration The ConfigurationSection being written
data The data to write
Returns:
true if writing should continue, false otherwise

Reimplemented from PWToolBox::Configuration::ConfigurationWriter.

virtual bool PWToolBox::Configuration::XMLConfigurationWriter::_writeSectionEnd ( ConfigurationSection const &  configuration,
std::string const &  key 
) [virtual]

This is called at the end of each section.

This function should not be called directly.

Parameters:
configuration The ConfigurationSection being written
key The section name
Returns:
true if writing should continue, false otherwise

Reimplemented from PWToolBox::Configuration::ConfigurationWriter.

virtual bool PWToolBox::Configuration::XMLConfigurationWriter::_writeSettingEnd ( ConfigurationSection const &  configuration,
std::string const &  key 
) [virtual]

This is called at the end of each setting.

This function should not be called directly.

Parameters:
configuration The ConfigurationSection being written
key The setting name
Returns:
true if writing should continue, false otherwise

Reimplemented from PWToolBox::Configuration::ConfigurationWriter.

virtual void PWToolBox::Configuration::XMLConfigurationWriter::_writeComment ( ConfigurationSection const &  configuration,
std::string const &  comment 
) [virtual]

This is called for each comment.

This function is not supported yet

Parameters:
configuration The ConfigurationSection being written
comment The comment being written

Reimplemented from PWToolBox::Configuration::ConfigurationWriter.


Member Data Documentation

TiXmlDocumentPtr PWToolBox::Configuration::XMLConfigurationWriter::m_document [protected]

A pointer to the XML document.

TiXmlElementStack PWToolBox::Configuration::XMLConfigurationWriter::m_elementStack [protected]

A stack representing the current location in the document.


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