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 
14 using std::string;
15 
16 namespace srchilite {
17 
20  ISBOLD = 1,
26 };
27 
29 typedef std::list<StyleConstant> StyleConstants;
30 
32 typedef boost::shared_ptr<StyleConstants> StyleConstantsPtr;
33 
35 typedef StyleConstants::const_iterator StyleConstantsIterator;
36 
45 public:
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_*/
std::list< StyleConstant > StyleConstants
collection of StyleConstant objects
Definition: formatterfactory.h:29
must not contain references
Definition: formatterfactory.h:25
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13
italics
Definition: formatterfactory.h:21
non fixed size
Definition: formatterfactory.h:24
underline
Definition: formatterfactory.h:22
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...
boost::shared_ptr< StyleConstants > StyleConstantsPtr
shared pointer for StyleConstants
Definition: formatterfactory.h:32
StyleConstant
constants indicating boldface, italics, etc.
Definition: formatterfactory.h:19
The generic abstract factory to create Formatter objects, during the parsing of style files...
Definition: formatterfactory.h:44
StyleConstants::const_iterator StyleConstantsIterator
iterator for StyleConstants
Definition: formatterfactory.h:35
fixed size
Definition: formatterfactory.h:23
bold
Definition: formatterfactory.h:20