Source-highlight Library
stringlistlangelem.h
1 //
2 // C++ Interface: stringlistlangelem
3 //
4 // Description:
5 //
6 //
7 // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2009
8 //
9 // Copyright: See COPYING file that comes with this distribution
10 //
11 //
12 #ifndef STRINGLISTLANGELEM_H
13 #define STRINGLISTLANGELEM_H
14 
15 #include "statestartlangelem.h"
16 
17 namespace srchilite {
18 
19 class StringDefs;
20 
25 // doublecpp: forward declarations, DO NOT MODIFY
26 class HighlightState; // file: highlightstate.h
27 class HighlightStateBuilder; // file: highlightstatebuilder.h
28 // doublecpp: end, DO NOT MODIFY
29 
31 {
32 private:
33  StringDefs *alternatives;
34  bool nonsensitive;
35 
36 public:
42  StringListLangElem(const std::string &n, StringDefs *defs, bool nons);
43 
44  virtual ~StringListLangElem();
45 
46  virtual const std::string toString() const;
47 
48  virtual const std::string toStringOriginal() const;
49 
54  return alternatives;
55  }
56 
60  bool isCaseSensitive() const {
61  return !nonsensitive;
62  }
63 // doublecpp: dispatch methods, DO NOT MODIFY
64 public:
65 virtual void dispatch_build(HighlightStateBuilder *, HighlightState * state);
66 // doublecpp: end, DO NOT MODIFY
67 };
68 
69 }
70 
71 #endif
Builds an HighlightState from the language definition file collected structures.
Definition: highlightstatebuilder.h:22
A collection (list) of StringDef's.
Definition: stringdef.h:110
bool isCaseSensitive() const
Definition: stringlistlangelem.h:60
A language element consisting of a list of strings.
Definition: stringlistlangelem.h:30
Represents a state during the highlighting (e.g., comment state, string state, etc.)
Definition: highlightstate.h:47
StringListLangElem(const std::string &n, StringDefs *defs, bool nons)
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13
virtual const std::string toString() const
return the string representation (with preprocessing)
A language element that may start a new state/environment.
Definition: statestartlangelem.h:25
StringDefs * getAlternatives() const
Definition: stringlistlangelem.h:53
virtual const std::string toStringOriginal() const
return the original representation (without any preprocessing); this is useful for printing errors ...