00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef STATELANGELEM_H
00013 #define STATELANGELEM_H
00014
00015 #include "statestartlangelem.h"
00016 #include "langelems.h"
00017
00018 namespace srchilite {
00019
00020 class StringDef;
00021 class StringDefs;
00022 class StateStartLangElem;
00023
00031
00032 class HighlightState;
00033 class HighlightStateBuilder;
00034 class LangElemsPrinter;
00035
00036
00037 class StateLangElem : public LangElem
00038 {
00039 private:
00040 StateStartLangElem *statestartlangelem;
00041 LangElems *langelems;
00042 bool state;
00043
00044 public:
00045 StateLangElem(const std::string &n, StateStartLangElem *start, LangElems *elems, bool st = false);
00046
00047 ~StateLangElem();
00048
00049 void set_elems(LangElems *elems) { langelems = elems; }
00050 void set_state() { state = true; }
00051
00052 virtual const std::string toString() const;
00053
00054 virtual const std::string toStringOriginal() const;
00055
00056 StateStartLangElem *getStateStart() const { return statestartlangelem; }
00057 bool isState() const { return state; }
00058 LangElems *getElems() const { return langelems; }
00059
00060 public:
00061 virtual void dispatch_build(HighlightStateBuilder *, HighlightState * state);
00062 virtual void dispatch_collect_const(LangElemsPrinter *);
00063
00064 };
00065
00066 }
00067
00068 #endif