Otawa  0.10
otawa::Progress Class Referenceabstract

This class is an interface to get progress information about execution of a processor. More...

#include <otawa/proc/Progress.h>

Inherited by otawa::NullProgress.

Public Types

enum  mode_t { none, living, linear, fixpoint }
 

Public Member Functions

virtual void start (const Processor &processor, mode_t mode, int max=0)=0
 This method is called when the processor is starting. More...
 
virtual void stop (void)=0
 Called at the end of the work. More...
 
virtual void report (string info, int level)=0
 Called each time to inform about the progression. More...
 
virtual void restart (string info)=0
 This method is only called in otawa::Processor::fixpoint mode at each step start. More...
 

Static Public Attributes

static Progressnull = null_progress
 Progress handler that do nothing. More...
 

Detailed Description

This class is an interface to get progress information about execution of a processor.

To use it, you have to overload its pure virtual members and to pass it to the processor configuration via otawa::Processor::PROGRESS property.

Warning
Not all processor supports progress and some of them may ignore it.

Member Enumeration Documentation

Enumerator
none 
living 
linear 
fixpoint 

Member Function Documentation

void otawa::Progress::report ( string  info,
int  level 
)
pure virtual

Called each time to inform about the progression.

Parameters
infoInfo about the report.
levelCurrent level.
void otawa::Progress::restart ( string  info)
pure virtual

This method is only called in otawa::Processor::fixpoint mode at each step start.

Parameters
infoCurrent step information.
void otawa::Progress::start ( const Processor processor,
mode_t  mode,
int  max = 0 
)
pure virtual

This method is called when the processor is starting.

The mode parameter describe the way the processor is working.

A mode otawa::Progess::living can not produce statistics about progress. The report() is called regularly to inform that the processor is living. The max parameter is meaningless.

A mode otawa::Progress::linear says the report() method is called each a progress is performed until the end. max represents the number of stages before end.

A mode otawa::Progress::fixpoint informs the computation produces an undefined number of steps but each step is separated by a call to restart(). max represents the number of level before end.

Parameters
processorCurrent processor.
modeCurrent mode.
maxNumber of levels.
void otawa::Progress::stop ( void  )
pure virtual

Called at the end of the work.

Member Data Documentation

Progress & otawa::Progress::null = null_progress
static

Progress handler that do nothing.


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