Logo Search packages:      
Sourcecode: poco version File versions  Download package

Poco::Formatter Class Reference

#include <Formatter.h>

Inheritance diagram for Poco::Formatter:
Collaboration diagram for Poco::Formatter:

List of all members.

Public Member Functions

void duplicate () const
virtual void format (const Message &msg, std::string &text)=0
 Destroys the formatter.
std::string getProperty (const std::string &name) const
 Throws a PropertyNotSupportedException.
int referenceCount () const
void release () const
 Increments the object's reference count.
void setProperty (const std::string &name, const std::string &value)
virtual ~Formatter ()
 Creates the formatter.

Detailed Description

The base class for all Formatter classes.

A formatter basically takes a Message object and formats it into a string. How the formatting is exactly done is up to the implementation of Formatter. For example, a very simple implementation might simply take the message's Text (see Message::getText()). A useful implementation should at least take the Message's Time, Priority and Text fields and put them into a string.

The Formatter class supports the Configurable interface, so the behaviour of certain formatters is configurable.

Trivial implementations of of getProperty() and setProperty() are provided.

Subclasses must at least provide a format() method.

Definition at line 54 of file Formatter.h.

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

Generated by  Doxygen 1.6.0   Back to index