Source-highlight Library
highlightstateprinter.h
1 //
2 // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008
3 //
4 // Copyright: See COPYING file that comes with this distribution
5 //
6 
7 
8 #ifndef HIGHLIGHTSTATEPRINTER_H_
9 #define HIGHLIGHTSTATEPRINTER_H_
10 
11 #include <set>
12 #include <iostream>
13 
14 namespace srchilite {
15 
16 class HighlightState;
17 class HighlightRule;
18 struct HighlightToken;
19 
20 typedef std::set<int> StateIdSet;
21 
26 private:
28  int indent;
30  StateIdSet stateidset;
32  std::ostream &stream;
33 
34 public:
35  HighlightStatePrinter(std::ostream &s = std::cout);
37 
38  void printHighlightState(const HighlightState *state);
39  void printHighlightRule(const HighlightRule *rule);
40  void printHighlightToken(const HighlightToken *token);
41 };
42 
43 }
44 
45 #endif /*HIGHLIGHTSTATEPRINTER_H_*/
std::ostream & stream
the stream to print the state (default cout)
Definition: highlightstateprinter.h:32
Prints an HighlightState (and all its rules)
Definition: highlightstateprinter.h:25
int indent
the indentation level
Definition: highlightstateprinter.h:28
Represents a state during the highlighting (e.g., comment state, string state, etc.)
Definition: highlightstate.h:47
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13
StateIdSet stateidset
to avoid infinite loops due to recursive states
Definition: highlightstateprinter.h:30
Base class for highlight rules.
Definition: highlightrule.h:27
Token containing information for performing the highlight.
Definition: highlighttoken.h:33