Source-highlight Library
srchilite::DebugListener Class Reference

Implementation of highlight events that prints debug information. More...

#include <debuglistener.h>

Inheritance diagram for srchilite::DebugListener:
Collaboration diagram for srchilite::DebugListener:

Public Member Functions

 DebugListener (std::ostream &_os=std::cout)
 
virtual void notify (const HighlightEvent &event)
 The method called to notify the listener about an event. More...
 
void setInteractive (bool i=true)
 
void step ()
 Waits for the user to press ENTER (in case of interactive debugging)
 

Private Attributes

std::ostream & os
 where to output debug info (default stdout)
 
bool interactive
 whether to act in step mode (wait for the user ENTER after each step)
 

Detailed Description

Implementation of highlight events that prints debug information.

In interactive mode, after each event, it will wait for the user to press ENTER to go on.

Constructor & Destructor Documentation

srchilite::DebugListener::DebugListener ( std::ostream &  _os = std::cout)
Parameters
osthe output stream to print debug information (default std::cout)

Member Function Documentation

void srchilite::DebugListener::notify ( const HighlightEvent event)
virtual

The method called to notify the listener about an event.

This must be implemented by subclasses.

Parameters
eventthe generated event

Implements srchilite::HighlightEventListener.


The documentation for this class was generated from the following files: