Source-highlight Library
|
00001 // 00002 // C++ Interface: %{MODULE} 00003 // 00004 // Description: 00005 // 00006 // 00007 // Author: %{AUTHOR} <%{EMAIL}>, (C) %{YEAR} 00008 // 00009 // Copyright: See COPYING file that comes with this distribution 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 // doublecpp: forward declarations, DO NOT MODIFY 00032 class HighlightState; // file: highlightstate.h 00033 class HighlightStateBuilder; // file: highlightstatebuilder.h 00034 class LangElemsPrinter; // file: langelemsprinter.h 00035 // doublecpp: end, DO NOT MODIFY 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 // doublecpp: dispatch methods, DO NOT MODIFY 00060 public: 00061 virtual void dispatch_build(HighlightStateBuilder *, HighlightState * state); 00062 virtual void dispatch_collect_const(LangElemsPrinter *); 00063 // doublecpp: end, DO NOT MODIFY 00064 }; 00065 00066 } 00067 00068 #endif