gatb.core-API-0.0.0
IteratorListener Class Reference

Interface for listening to iteration progress. More...

#include <Iterator.hpp>

Inheritance diagram for IteratorListener:
Inheritance graph

Public Member Functions

virtual ~IteratorListener ()
 
virtual void init ()
 
virtual void finish ()
 
virtual void inc (u_int64_t ntasks_done)
 
virtual void setMessage (const std::string &msg)
 
virtual void set (u_int64_t ntasks_done)
 
virtual void reset (u_int64_t ntasks)
 
- Public Member Functions inherited from SmartPointer
void use ()
 
void forget ()
 
- Public Member Functions inherited from ISmartPointer
virtual ~ISmartPointer ()
 

Additional Inherited Members

- Protected Member Functions inherited from SmartPointer
 SmartPointer ()
 
virtual ~SmartPointer ()
 

Detailed Description

Interface for listening to iteration progress.

This interface is intended to be notified by some progress job, and in particular to the progression of an iteration with an Iterator instance.

It defines 3 methods:

  • init : method called just before the beginning of the iteration
  • finish : method called just after the end of the iteration
  • inc : method called during the iteration; the provided arguments represents the number of iterations before the previous call

Actually, this is a little more than just an interface since it provides empty implementations for the 3 methods; this will ease the development to clients who wants only to get 'inc' notifications but are not interested to do specific actions at the beginning and the end of the iteration.

See also
SubjectIterator

Constructor & Destructor Documentation

virtual ~IteratorListener ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual void finish ( )
inlinevirtual

Finish the progress information.

Reimplemented in Progress.

virtual void inc ( u_int64_t  ntasks_done)
inlinevirtual

Increase the number of currently done tasks.

Reimplemented in Progress.

virtual void init ( )
inlinevirtual

Initialization of the object.

Reimplemented in ProgressTimer, and Progress.

virtual void reset ( u_int64_t  ntasks)
inlinevirtual

Set the total number of tasks done.

Parameters
[in]ntasks: sets the total number of job.

Reimplemented in Progress.

virtual void set ( u_int64_t  ntasks_done)
inlinevirtual

Set the current number of tasks done.

Parameters
[in]ntasks_done: sets the current number of job done.

Reimplemented in Progress.

virtual void setMessage ( const std::string &  msg)
inlinevirtual

Associate a message to the listener.

Parameters
[in]msg: message to be set.

Reimplemented in Progress.


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