Source-highlight Library
formatterfactory.h
1//
2// Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008
3//
4// Copyright: See COPYING file that comes with this distribution
5//
6
7#ifndef FORMATTERFACTORY_H_
8#define FORMATTERFACTORY_H_
9
10#include <string>
11#include <list>
12#include <boost/shared_ptr.hpp>
13
14using std::string;
15
16namespace srchilite {
17
20 ISBOLD = 1,
25 ISNOREF
26};
27
29typedef std::list<StyleConstant> StyleConstants;
30
32typedef boost::shared_ptr<StyleConstants> StyleConstantsPtr;
33
35typedef StyleConstants::const_iterator StyleConstantsIterator;
36
45public:
46 virtual ~FormatterFactory() {
47 }
48
59 virtual bool createFormatter(const string &key, const string &color,
60 const string &bgcolor, StyleConstantsPtr styleconstants) = 0;
61
62};
63
64}
65
66#endif /*FORMATTERFACTORY_H_*/
The generic abstract factory to create Formatter objects, during the parsing of style files.
Definition: formatterfactory.h:44
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 param...
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13
boost::shared_ptr< StyleConstants > StyleConstantsPtr
shared pointer for StyleConstants
Definition: formatterfactory.h:32
StyleConstants::const_iterator StyleConstantsIterator
iterator for StyleConstants
Definition: formatterfactory.h:35
std::list< StyleConstant > StyleConstants
collection of StyleConstant objects
Definition: formatterfactory.h:29
StyleConstant
constants indicating boldface, italics, etc.
Definition: formatterfactory.h:19
@ ISNOTFIXED
non fixed size
Definition: formatterfactory.h:24
@ ISBOLD
bold
Definition: formatterfactory.h:20
@ ISUNDERLINE
underline
Definition: formatterfactory.h:22
@ ISFIXED
fixed size
Definition: formatterfactory.h:23
@ ISITALIC
italics
Definition: formatterfactory.h:21
@ ISNOREF
must not contain references
Definition: formatterfactory.h:25