Source-highlight Library
/home/bettini/work/source-highlight/src-highlite/lib/srchilite/highlightstateprinter.h
00001 //
00002 // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008
00003 //
00004 // Copyright: See COPYING file that comes with this distribution
00005 //
00006 
00007 
00008 #ifndef HIGHLIGHTSTATEPRINTER_H_
00009 #define HIGHLIGHTSTATEPRINTER_H_
00010 
00011 #include <set>
00012 #include <iostream>
00013 
00014 namespace srchilite {
00015 
00016 class HighlightState;
00017 class HighlightRule;
00018 struct HighlightToken;
00019 
00020 typedef std::set<int> StateIdSet;
00021 
00025 class HighlightStatePrinter {
00026 private:
00028     int indent;
00030     StateIdSet stateidset;
00032     std::ostream &stream;
00033 
00034 public:
00035     HighlightStatePrinter(std::ostream &s = std::cout);
00036     ~HighlightStatePrinter();
00037 
00038     void printHighlightState(const HighlightState *state);
00039     void printHighlightRule(const HighlightRule *rule);
00040     void printHighlightToken(const HighlightToken *token);
00041 };
00042 
00043 }
00044 
00045 #endif /*HIGHLIGHTSTATEPRINTER_H_*/