ot::XMLWriter Class Reference

#include <XMLWriter.h>

Collaboration diagram for ot::XMLWriter:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class writes out the contents of the Context as a valid XML file. It can be used to store a changed tracker graph in a file or some other device accessible by an output stream. It can be reused on a context as often as desired and will allways record the current status of the context, as stored in the XML elements.
Author:
Gerhard Reitmayr


Public Types

typedef std::map< std::string,
Node * > 
DefDict

Public Member Functions

 XMLWriter (Context &context_, unsigned int indent_=2)
virtual ~XMLWriter ()
void write (const char *file)
unsigned int getIndent ()
void setIndent (unsigned int ind)

Public Attributes

DefDict defnodes

Protected Attributes

Contextcontext
 the context to write out
unsigned int indent
 amount of indentation per level


Member Typedef Documentation

typedef std::map<std::string, Node *> ot::XMLWriter::DefDict
 


Constructor & Destructor Documentation

ot::XMLWriter::XMLWriter Context context_,
unsigned int  indent_ = 2
 

constructor, takes a context to work with.

Parameters:
context_ the context to write out
indent_ the indentation step to use, default value is 2

virtual ot::XMLWriter::~XMLWriter  )  [virtual]
 


Member Function Documentation

unsigned int ot::XMLWriter::getIndent  )  [inline]
 

returns the current indentation step

Returns:
indentation step

void ot::XMLWriter::setIndent unsigned int  ind  )  [inline]
 

sets the indentation step

Parameters:
ind the new value

void ot::XMLWriter::write const char *  file  ) 
 

writes the tracker graph and configuration to a file given as the parameter. It creates the file if necessary. If the file exists, it will be overwritten by the new configuration data.

Parameters:
file char array containing the file name.


Member Data Documentation

Context& ot::XMLWriter::context [protected]
 

the context to write out

DefDict ot::XMLWriter::defnodes
 

unsigned int ot::XMLWriter::indent [protected]
 

amount of indentation per level


The documentation for this class was generated from the following file:
Generated on Wed Feb 28 15:33:26 2007 for NaviTrack by  doxygen 1.4.6