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

Human-friendly formatter. More...

#include <TextFormatter.hpp>

Inheritance diagram for Confdump::TextFormatter:
Confdump::Formatter

List of all members.

Public Member Functions

 TextFormatter ()
virtual ~TextFormatter ()
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 doPrintTable (QString title, const Result &result)

Detailed Description

Human-friendly formatter.

This formatter happens to procude an output closely related to YAML (and might actually be valid, although it hasn't been tested for that purpose).

Note that binary data is stripped from the output, while other formatters like XmlFormatter include it.

Example:

 CD_Socket: 
 -
     inode: 0
     localAddressString: 0.0.0.0:22
     protocolName: tcp
     remoteAddressString: 0.0.0.0:0
     stateString: LISTEN

The interface is documented in the Formatter base class.

Definition at line 49 of file TextFormatter.hpp.


Constructor & Destructor Documentation

Definition at line 68 of file TextFormatter.cpp.

Definition at line 72 of file TextFormatter.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 Confdump::XmlFormatter::doPrintHeader(), and Confdump::Formatter::setDevice().

void Confdump::TextFormatter::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_.


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