gatb.core-API-0.0.0
XmlDumpPropertiesVisitor Class Reference

XML serialization of a IProperties instance. More...

#include <Property.hpp>

Inherits AbstractOutputPropertiesVisitor.

Public Member Functions

 XmlDumpPropertiesVisitor (const std::string &filename, bool propertiesAsRoot=true, bool shouldIndent=true)
 
 XmlDumpPropertiesVisitor (std::ostream &aStream, bool propertiesAsRoot=true, bool shouldIndent=true)
 
virtual ~XmlDumpPropertiesVisitor ()
 
void visitBegin ()
 
void visitEnd ()
 
void visitProperty (IProperty *prop)
 

Detailed Description

XML serialization of a IProperties instance.

This kind of visitor serializes into a file the content of a IProperties instance.

The output format is XML; the 'depth' attribute of each IProperty instance is used as a basis for building the XML tree.

Constructor & Destructor Documentation

XmlDumpPropertiesVisitor ( const std::string &  filename,
bool  propertiesAsRoot = true,
bool  shouldIndent = true 
)

Constructor.

Parameters
[in]filename: uri of the file where to serialize the instance.
[in]propertiesAsRoot
[in]shouldIndent: tells whether we should use indentation
XmlDumpPropertiesVisitor ( std::ostream &  aStream,
bool  propertiesAsRoot = true,
bool  shouldIndent = true 
)

Constructor.

Parameters
[in]aStream: output stream
[in]propertiesAsRoot
[in]shouldIndent: tells whether we should use indentation

Desctructor.

Member Function Documentation

void visitBegin ( )
virtual

Called before the true visit of the IProperty instance.

Implements IPropertiesVisitor.

void visitEnd ( )
virtual

Called after the true visit of the IProperty instance.

Implements IPropertiesVisitor.

void visitProperty ( IProperty prop)
virtual

Visit of the IProperty instance.

Parameters
[in]prop: the instance to be visited.

Implements IPropertiesVisitor.


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