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
14namespace srchilite {
15
16class HighlightState;
17class HighlightRule;
18struct HighlightToken;
19
20typedef std::set<int> StateIdSet;
21
26private:
28 int indent;
30 StateIdSet stateidset;
32 std::ostream &stream;
33
34public:
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_*/
Base class for highlight rules.
Definition: highlightrule.h:27
Prints an HighlightState (and all its rules)
Definition: highlightstateprinter.h:25
std::ostream & stream
the stream to print the state (default cout)
Definition: highlightstateprinter.h:32
StateIdSet stateidset
to avoid infinite loops due to recursive states
Definition: highlightstateprinter.h:30
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
Token containing information for performing the highlight.
Definition: highlighttoken.h:33