Confdump Agent  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Public Member Functions | Private Member Functions | Private Attributes
Confdump::XmlFormatter Class Reference

Machine-readable output. More...

#include <XmlFormatter.hpp>

Inheritance diagram for Confdump::XmlFormatter:
Confdump::Formatter

List of all members.

Public Member Functions

 XmlFormatter ()
virtual ~XmlFormatter ()
void printHeader (QString identifier)
 Call this once before printing the tables.
void printTable (QString title, const Result &result)
 Call this for each table to format.
void printFooter ()
 Call this once after printing the tables.
void setDevice (boost::shared_ptr< QIODevice >)
 A QIODevice to write to.
boost::shared_ptr< QIODevice > device () const
 A QIODevice to write to.

Private Member Functions

virtual void doPrintHeader (QString macAddress)
 Default implementation: no-op.
virtual void doPrintTable (QString title, const Result &result)
virtual void doPrintFooter ()
 Default implementation: no-op.

Private Attributes

boost::shared_ptr
< QXmlStreamWriter > 
writer_

Detailed Description

Machine-readable output.

The XML schema produced is not formally defined yet. It is a "de facto" agreement between Confdump-Importer and Confdump-Agent.

The interface is documented in the base class, Formatter.

Definition at line 39 of file XmlFormatter.hpp.


Constructor & Destructor Documentation

Definition at line 52 of file XmlFormatter.cpp.

Definition at line 56 of file XmlFormatter.cpp.


Member Function Documentation

boost::shared_ptr< QIODevice > Confdump::Formatter::device ( ) const [inherited]

A QIODevice to write to.

Definition at line 38 of file Formatter.cpp.

References Confdump::Formatter::device_.

Referenced by doPrintHeader(), and Confdump::Formatter::setDevice().

void Confdump::XmlFormatter::doPrintFooter ( ) [private, virtual]

Default implementation: no-op.

Reimplemented from Confdump::Formatter.

Definition at line 115 of file XmlFormatter.cpp.

References writer_.

void Confdump::XmlFormatter::doPrintHeader ( QString  identifier) [private, virtual]

Default implementation: no-op.

Reimplemented from Confdump::Formatter.

Definition at line 60 of file XmlFormatter.cpp.

References Confdump::Formatter::device(), and writer_.

void Confdump::XmlFormatter::doPrintTable ( QString  title,
const Result result 
) [private, virtual]
void Confdump::Formatter::printFooter ( ) [inherited]

Call this once after printing the tables.

Definition at line 53 of file Formatter.cpp.

References Confdump::Formatter::doPrintFooter().

void Confdump::Formatter::printHeader ( QString  identifier) [inherited]

Call this once before printing the tables.

  • identifier A unique computer identifier

Definition at line 43 of file Formatter.cpp.

References Confdump::Formatter::doPrintHeader().

void Confdump::Formatter::printTable ( QString  title,
const Result result 
) [inherited]

Call this for each table to format.

Parameters:
titleThe table title
resultThe table itself

Definition at line 48 of file Formatter.cpp.

References Confdump::Formatter::doPrintTable().

void Confdump::Formatter::setDevice ( boost::shared_ptr< QIODevice >  device) [inherited]

A QIODevice to write to.

Definition at line 33 of file Formatter.cpp.

References Confdump::Formatter::device(), and Confdump::Formatter::device_.


Member Data Documentation

boost::shared_ptr<QXmlStreamWriter> Confdump::XmlFormatter::writer_ [private]

Definition at line 50 of file XmlFormatter.hpp.

Referenced by doPrintFooter(), doPrintHeader(), and doPrintTable().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends