Confdump Agent
1.4.0
|
Machine-readable output. More...
#include <XmlFormatter.hpp>
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_ |
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.
Definition at line 52 of file XmlFormatter.cpp.
Confdump::XmlFormatter::~XmlFormatter | ( | ) | [virtual] |
Definition at line 56 of file XmlFormatter.cpp.
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] |
Implements Confdump::Formatter.
Definition at line 73 of file XmlFormatter.cpp.
References Confdump::Result::propertyNames(), Confdump::Result::propertyValues(), and writer_.
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.
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.
title | The table title |
result | The 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_.
boost::shared_ptr<QXmlStreamWriter> Confdump::XmlFormatter::writer_ [private] |
Definition at line 50 of file XmlFormatter.hpp.
Referenced by doPrintFooter(), doPrintHeader(), and doPrintTable().