Source-highlight Library
/home/bettini/work/source-highlight/src-highlite/lib/srchilite/delimitedlangelem.h
00001 //
00002 // C++ Interface: delimitedlangelem
00003 //
00004 // Description:
00005 //
00006 //
00007 // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2009
00008 //
00009 // Copyright: See COPYING file that comes with this distribution
00010 //
00011 //
00012 #ifndef DELIMITEDLANGELEM_H
00013 #define DELIMITEDLANGELEM_H
00014 
00015 #include "statestartlangelem.h"
00016 
00017 namespace srchilite {
00018 
00019 class StringDef;
00020 
00026 // doublecpp: forward declarations, DO NOT MODIFY
00027 class HighlightState; // file: highlightstate.h
00028 class HighlightStateBuilder; // file: highlightstatebuilder.h
00029 // doublecpp: end, DO NOT MODIFY
00030 
00031 class DelimitedLangElem : public StateStartLangElem
00032 {
00033 private:
00034     StringDef *start;
00035     StringDef *end;
00036     StringDef *escape;
00037     bool multiline;
00038     bool nested;
00039 
00040 public:
00049     DelimitedLangElem(const std::string &n, StringDef *s, StringDef *e,
00050             StringDef *es, bool multi, bool nes);
00051 
00052     ~DelimitedLangElem();
00053 
00058     virtual const std::string toString() const;
00059 
00065     virtual const std::string toStringOriginal() const;
00066 
00070     StringDef *getStart() const {
00071         return start;
00072     }
00073 
00077     StringDef *getEnd() const {
00078         return end;
00079     }
00080 
00084     StringDef *getEscape() const {
00085         return escape;
00086     }
00087 
00091     bool isMultiline() const {
00092         return multiline;
00093     }
00094 
00098     bool isNested() const {
00099         return nested;
00100     }
00101 // doublecpp: dispatch methods, DO NOT MODIFY
00102 public:
00103 virtual void dispatch_build(HighlightStateBuilder *, HighlightState * state);
00104 // doublecpp: end, DO NOT MODIFY
00105 };
00106 
00107 }
00108 
00109 #endif