Source-highlight Library
/home/bettini/work/source-highlight/src-highlite/lib/srchilite/formatterfactory.h
00001 //
00002 // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008
00003 //
00004 // Copyright: See COPYING file that comes with this distribution
00005 //
00006 
00007 #ifndef FORMATTERFACTORY_H_
00008 #define FORMATTERFACTORY_H_
00009 
00010 #include <string>
00011 #include <list>
00012 #include <boost/shared_ptr.hpp>
00013 
00014 using std::string;
00015 
00016 namespace srchilite {
00017 
00019 enum StyleConstant {
00020     ISBOLD = 1, 
00021     ISITALIC, 
00022     ISUNDERLINE,  
00023     ISFIXED, 
00024     ISNOTFIXED,  
00025     ISNOREF 
00026 };
00027 
00029 typedef std::list<StyleConstant> StyleConstants;
00030 
00032 typedef boost::shared_ptr<StyleConstants> StyleConstantsPtr;
00033 
00035 typedef StyleConstants::const_iterator StyleConstantsIterator;
00036 
00044 class FormatterFactory {
00045 public:
00046     virtual ~FormatterFactory() {
00047     }
00048 
00059     virtual bool createFormatter(const string &key, const string &color,
00060             const string &bgcolor, StyleConstantsPtr styleconstants) = 0;
00061 
00062 };
00063 
00064 }
00065 
00066 #endif /*FORMATTERFACTORY_H_*/