libqicore-api  2.4.3.28
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
qi::ProgressNotifier Class Referenceabstract

#include <file.hpp>

Public Types

enum  Status {
  Status_Idle, Status_Running, Status_Finished, Status_Failed,
  Status_Cancelled
}
 

Public Member Functions

virtual ~ProgressNotifier ()
 
virtual bool isRunning () const =0
 
virtual void _reset ()=0
 
virtual void _notifyRunning ()=0
 
virtual void _notifyFinished ()=0
 
virtual void _notifyCancelled ()=0
 
virtual void _notifyFailed ()=0
 
virtual void _notifyProgressed (double newProgress)=0
 

Public Attributes

Property< Status > status
 
Property< double > progress
 

Protected Member Functions

 ProgressNotifier ()
 

Detailed Description

Provide information about the state of a potentially long remote or async operation.

Definition at line 26 of file file.hpp.

Member Enumeration Documentation

Describe the status of an associated operation.

Enumerator
Status_Idle 

The operation has not start yet.

Status_Running 

The operation is currently running.

Status_Finished 

The operation finished successfully.

Status_Failed 

The operation has failed.

Status_Cancelled 

The operation has been canceled by the user.

Definition at line 39 of file file.hpp.

Constructor & Destructor Documentation

qi::ProgressNotifier::ProgressNotifier ( )
inlineprotected

Definition at line 29 of file file.hpp.

virtual qi::ProgressNotifier::~ProgressNotifier ( )
inlinevirtual

Definition at line 34 of file file.hpp.

Member Function Documentation

virtual void qi::ProgressNotifier::_notifyCancelled ( )
pure virtual

Notify the observers that the operation has been canceled by the user.

virtual void qi::ProgressNotifier::_notifyFailed ( )
pure virtual

Notify the observers that the operation has failed.

virtual void qi::ProgressNotifier::_notifyFinished ( )
pure virtual

Notify the observers that the operation has successfully ended.

virtual void qi::ProgressNotifier::_notifyProgressed ( double  newProgress)
pure virtual

Notify the observers that the operation progressed.

Parameters
newProgressNew value representing the total progress of the operation. By default, uses a range from 0.0 (no work has been done yet) to 1.0 (all work is done). The operation implementation is free to use another range if necessary but should clarify the meaning of this value in its documentation.
virtual void qi::ProgressNotifier::_notifyRunning ( )
pure virtual

Notify the observers that the operation associated with this notifier is now running.

virtual void qi::ProgressNotifier::_reset ( )
pure virtual

Reset the status of the algorithm to the idle state with no progress.

virtual bool qi::ProgressNotifier::isRunning ( ) const
pure virtual
Returns
true if the operation associated to this notifier has started and is neither finished nor canceled nor failed yet, false otherwise.

Member Data Documentation

Property<double> qi::ProgressNotifier::progress

Progress state of the operation associated with this notifier. By default you can assume a normalized value ranging between 0.0 (no work is done) to 1.0 (all work is done). The semantic of this value is defined by the operation implementation and could be different from the default but should then be documented.

Definition at line 59 of file file.hpp.

Property<Status> qi::ProgressNotifier::status

Current status of the operation associated to this notifier.

See Also
ProgressNotifier::Status

Definition at line 51 of file file.hpp.


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