Source-highlight Library
/home/bettini/work/source-highlight/src-highlite/lib/srchilite/highlightstatebuilder.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 HIGHLIGHTSTATEBUILDER_H_
00008 #define HIGHLIGHTSTATEBUILDER_H_
00009 
00010 #include "highlightstate.h"
00011 
00012 namespace srchilite {
00013 
00014 class LangElems;
00015 class HighlightRuleFactory;
00016 
00022 class HighlightStateBuilder {
00024     HighlightRuleFactory *highlightRuleFactory;
00025 public:
00026     HighlightStateBuilder(HighlightRuleFactory *_highlightRuleFactory);
00027     virtual ~HighlightStateBuilder();
00028 
00036     void build(LangElems *elems, HighlightStatePtr mainState);
00037 
00039     branches build
00040     void (LangElem *elem, HighlightState *state);
00041     void (StringListLangElem *elem, HighlightState *state);
00042     void (DelimitedLangElem *elem, HighlightState *state);
00043     void (NamedSubExpsLangElem *elem, HighlightState *state);
00044     void (StateLangElem *elem, HighlightState *state);
00045     endbranches
00046 };
00047 
00048 }
00049 
00050 #endif /*HIGHLIGHTSTATEBUILDER_H_*/