fw4spl
fwTools::ProgressAdviser Class Reference

Subclasses Inherited from ProgressAdviser can notify progression This class is used as base class to add the functionalities of progress notification. To notify a progress then simply call notifyProgress() method by given the progression [0, 1.0] and a message. The ProgressAdviser will automatically call handler (=Observer). Handlers can be added using addHandler(). the Handler of type ProgessHandler can be a function or functor or boost::signal with a signature ( float, std::string ) and returning nothing. More...

#include <ProgressAdviser.hpp>

+ Inheritance diagram for fwTools::ProgressAdviser:
+ Collaboration diagram for fwTools::ProgressAdviser:

Public Types

typedef ::boost::signals2::signal< void(float, std::string) > ProgessSignal
 define a boost signal signature for the ProgessHandler
 
typedef ProgessSignal::slot_type ProgessHandler
 define the ProgessHandler type
 

Public Member Functions

FWTOOLS_API void addHandler (const ProgessHandler &handler)
 
FWTOOLS_API void notifyProgress (float percent, const std::string &msg="") const
 notify modification for all handler
 

Protected Attributes

ProgessSignal m_progressSignal
 to notify progress simply use m_progressSignal( percent,msg ) to notify to Handler
 

Detailed Description

Subclasses Inherited from ProgressAdviser can notify progression This class is used as base class to add the functionalities of progress notification. To notify a progress then simply call notifyProgress() method by given the progression [0, 1.0] and a message. The ProgressAdviser will automatically call handler (=Observer). Handlers can be added using addHandler(). the Handler of type ProgessHandler can be a function or functor or boost::signal with a signature ( float, std::string ) and returning nothing.

Definition at line 31 of file ProgressAdviser.hpp.


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