Source-highlight Library
|
00001 // 00002 // C++ Interface: statestartlangelem 00003 // 00004 // Description: 00005 // 00006 // 00007 // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004 00008 // 00009 // Copyright: See COPYING file that comes with this distribution 00010 // 00011 // 00012 #ifndef STATESTARTLANGELEM_H 00013 #define STATESTARTLANGELEM_H 00014 00015 #include "langelem.h" 00016 00017 namespace srchilite { 00018 00019 class StringDef; 00020 class StateLangElem; 00021 00025 class StateStartLangElem: public LangElem { 00026 private: 00028 unsigned int exit; 00029 00031 bool exit_all; 00032 00034 StateLangElem *statelangelem; 00035 00036 public: 00042 StateStartLangElem(const std::string &n, unsigned int exit = 0, bool all = 00043 false); 00044 00045 virtual ~StateStartLangElem(); 00046 00047 virtual const std::string toString() const; 00048 00054 void setExit(unsigned int level = 1) { 00055 exit = level; 00056 } 00057 00062 void setExitAll() { 00063 exit_all = true; 00064 } 00065 00069 bool exitAll() const { 00070 return exit_all; 00071 } 00072 00076 unsigned int getExit() const { 00077 return exit; 00078 } 00079 00083 StateLangElem *getStateLangElem() const { 00084 return statelangelem; 00085 } 00086 00091 void setStateLangElem(StateLangElem *s) { 00092 statelangelem = s; 00093 } 00094 }; 00095 00096 } 00097 00098 #endif