Source-highlight Library
/home/bettini/work/source-highlight/src-highlite/lib/srchilite/debuglistener.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 #ifndef DEBUGLISTENER_H_
00008 #define DEBUGLISTENER_H_
00009 
00010 #include <iostream>
00011 
00012 #include "highlighteventlistener.h"
00013 
00014 namespace srchilite {
00015 
00016 struct HighlightEvent;
00017 
00023 class DebugListener: public HighlightEventListener {
00025     std::ostream &os;
00026 
00028     bool interactive;
00029 public:
00033     DebugListener(std::ostream &_os = std::cout);
00034     virtual ~DebugListener();
00035 
00036     virtual void notify(const HighlightEvent &event);
00037 
00038     void setInteractive(bool i = true) {
00039         interactive = i;
00040     }
00041 
00045     void step();
00046 };
00047 
00048 }
00049 
00050 #endif /*DEBUGLISTENER_H_*/