Source-highlight Library
srchilite::FormatterFactory Class Referenceabstract

The generic abstract factory to create Formatter objects, during the parsing of style files. More...

#include <formatterfactory.h>

Inheritance diagram for srchilite::FormatterFactory:

Public Member Functions

virtual bool createFormatter (const string &key, const string &color, const string &bgcolor, StyleConstantsPtr styleconstants)=0
 Creates a formatter for the specific language element (identified by key) with the passed style parameters. More...
 

Detailed Description

The generic abstract factory to create Formatter objects, during the parsing of style files.

Note that creation methods do not return a specific object, so that the implementation of where to store the Formatter objects themselves is left completely to the programmer (and does not couple the factory to a specific collection).

Member Function Documentation

virtual bool srchilite::FormatterFactory::createFormatter ( const string &  key,
const string &  color,
const string &  bgcolor,
StyleConstantsPtr  styleconstants 
)
pure virtual

Creates a formatter for the specific language element (identified by key) with the passed style parameters.

Parameters
keythe language element represented
colorthe color
bgcolorthe background color
styleconstantsadditional formatting information (e.g., bold, italics, etc.)
Returns
false if a formatter for the specific key is already present

Implemented in srchilite::TextStyleFormatterFactory.


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