Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
qi::ProgressNotifier Class Referenceabstract

#include <file.hpp>

Inheritance diagram for qi::ProgressNotifier:
Inheritance graph
[legend]

Public Types

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

Public Member Functions

virtual bool isRunning () const =0
 
virtual void notifyCanceled ()=0
 
virtual void notifyFailed ()=0
 
virtual void notifyFinished ()=0
 
virtual void notifyProgressed (double newProgress)=0
 
virtual void notifyRunning ()=0
 
 QI_API_DEPRECATED_MSG (Use 'notifyCanceled' instead) virtual void _notifyCanceled()=0
 
 QI_API_DEPRECATED_MSG (Use 'notifyFailed' instead) virtual void _notifyFailed()=0
 
 QI_API_DEPRECATED_MSG (Use 'notifyFinished' instead) virtual void _notifyFinished()=0
 
 QI_API_DEPRECATED_MSG (Use 'notifyProgressed' instead) virtual void _notifyProgressed(double new Progress)=0
 
 QI_API_DEPRECATED_MSG (Use 'notifyRunning' instead) virtual void _notifyRunning()=0
 
 QI_API_DEPRECATED_MSG (Use 'reset' instead) virtual void _reset()=0
 
virtual void reset ()=0
 
virtual Future< void > waitForFinished ()=0
 
virtual ~ProgressNotifier ()=default
 

Public Attributes

Property< double > progress
 
Property< Statusstatus
 

Protected Member Functions

 ProgressNotifier ()=default
 

Detailed Description

Provide information about the state of a potentially long remote or async operation. @includename{qicore/file.hpp}

Definition at line 26 of file file.hpp.

Member Enumeration Documentation

◆ Status

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_Canceled 

The operation has been canceled by the user.

Definition at line 35 of file file.hpp.

Constructor & Destructor Documentation

◆ ProgressNotifier()

qi::ProgressNotifier::ProgressNotifier ( )
protecteddefault

◆ ~ProgressNotifier()

virtual qi::ProgressNotifier::~ProgressNotifier ( )
virtualdefault

Member Function Documentation

◆ isRunning()

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.

Implemented in qi::ProgressNotifierImpl, and qi::ProgressNotifierProxy.

◆ notifyCanceled()

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

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

Remarks
This function is reserved to be used by the implementation of the associated operations.

Implemented in qi::ProgressNotifierImpl, and qi::ProgressNotifierProxy.

◆ notifyFailed()

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

Notify the observers that the operation has failed.

Remarks
This function is reserved to be used by the implementation of the associated operations.

Implemented in qi::ProgressNotifierImpl, and qi::ProgressNotifierProxy.

◆ notifyFinished()

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

Notify the observers that the operation has successfully ended.

Remarks
This function is reserved to be used by the implementation of the associated operations.

Implemented in qi::ProgressNotifierImpl, and qi::ProgressNotifierProxy.

◆ notifyProgressed()

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

Notify the observers that the operation progressed.

Remarks
This function is reserved to be used by the implementation of the associated operations.
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.

Implemented in qi::ProgressNotifierImpl, and qi::ProgressNotifierProxy.

◆ notifyRunning()

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

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

Remarks
This function is reserved to be used by the implementation of the associated operations.

Implemented in qi::ProgressNotifierImpl, and qi::ProgressNotifierProxy.

◆ QI_API_DEPRECATED_MSG() [1/6]

qi::ProgressNotifier::QI_API_DEPRECATED_MSG ( Use 'notifyCanceled instead)
pure virtual

◆ QI_API_DEPRECATED_MSG() [2/6]

qi::ProgressNotifier::QI_API_DEPRECATED_MSG ( Use 'notifyFailed instead)
pure virtual

◆ QI_API_DEPRECATED_MSG() [3/6]

qi::ProgressNotifier::QI_API_DEPRECATED_MSG ( Use 'notifyFinished instead)
pure virtual

◆ QI_API_DEPRECATED_MSG() [4/6]

qi::ProgressNotifier::QI_API_DEPRECATED_MSG ( Use 'notifyProgressed instead)
newpure virtual

◆ QI_API_DEPRECATED_MSG() [5/6]

qi::ProgressNotifier::QI_API_DEPRECATED_MSG ( Use 'notifyRunning instead)
pure virtual

◆ QI_API_DEPRECATED_MSG() [6/6]

qi::ProgressNotifier::QI_API_DEPRECATED_MSG ( Use 'reset instead)
pure virtual
Deprecated:
since 2.5

◆ reset()

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

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

Remarks
This function is reserved to be used by the implementation of the associated operations.

Implemented in qi::ProgressNotifierImpl, and qi::ProgressNotifierProxy.

◆ waitForFinished()

virtual Future<void> qi::ProgressNotifier::waitForFinished ( )
pure virtual

Member Data Documentation

◆ progress

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 55 of file file.hpp.

◆ status

Property<Status> qi::ProgressNotifier::status

Current status of the operation associated to this notifier.

See also
ProgressNotifier::Status

Definition at line 47 of file file.hpp.


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


naoqi_libqicore
Author(s): Aldebaran
autogenerated on Wed Sep 14 2022 02:22:41