solarpowerlog trunk
IFormater Class Reference

#include <IFormater.h>

Inheritance diagram for IFormater:

List of all members.

Public Member Functions

virtual bool Format (const std::string &what, std::string &store, const std::vector< std::string > &parameters)=0
virtual ~IFormater ()

Static Public Member Functions

static IFormaterFactory (const std::string &spec)

Protected Member Functions

 IFormater ()

Detailed Description

IFormater a strategies for reformatting capabilites for the CHTML Writer output. They take a string, a configuration and return the reformatted result.

It also contains its factory as a static member function.

Definition at line 20 of file IFormater.h.


Constructor & Destructor Documentation

virtual IFormater::~IFormater ( ) [inline, virtual]

Definition at line 38 of file IFormater.h.

IFormater::IFormater ( ) [inline, protected]

Definition at line 43 of file IFormater.h.


Member Function Documentation

IFormater * IFormater::Factory ( const std::string &  spec) [static]

Definition at line 12 of file IFormater.cpp.

virtual bool IFormater::Format ( const std::string &  what,
std::string &  store,
const std::vector< std::string > &  parameters 
) [pure virtual]

This is the workhorse of the stragegy pattern: The format takes a refrence string of the content to be modified, a reference where it should suppose to write the result (note: might be same refrence.) and a vector of the formatters' configuration. The vector contains: [0] - formatter name (needed by caller, ignore) [1] - where to stored (needed by caller, ignore) [2...] - parameters supplied by user

Implemented in CFormaterWebRootStrip, and CFormatterSearchCSVEntry.


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