aGrUM  0.16.0
gum::ProgressListener Class Referenceabstract

The ProgressListener class. More...

#include <progressNotification.h>

+ Inheritance diagram for gum::ProgressListener:
+ Collaboration diagram for gum::ProgressListener:

Public Member Functions

 ProgressListener (ProgressNotifier &notif)
 Class constructor. More...
 
virtual ~ProgressListener ()
 Class destructor. More...
 
virtual void whenProgress (const void *src, const Size step, const double time)=0
 When progress was made. More...
 
virtual void whenStop (const void *src, const std::string &message)=0
 When it stops. More...
 
void attachSignal__ (__sig__::ISignaler *sender)
 
void detachSignal__ (__sig__::ISignaler *sender)
 

Protected Member Functions

 ProgressListener (const ProgressListener &other)
 Copy constructor. More...
 
ProgressListeneroperator= (const ProgressListener &other)
 Copy operator. More...
 

Detailed Description

The ProgressListener class.

Definition at line 59 of file progressNotification.h.

Constructor & Destructor Documentation

◆ ProgressListener() [1/2]

gum::ProgressListener::ProgressListener ( ProgressNotifier notif)
explicit

Class constructor.

Parameters
theprogress notifier.

Definition at line 34 of file progressNotification.cpp.

References __notif, GUM_CONNECT, whenProgress(), and whenStop().

34  : __notif(notif) {
35  GUM_CONSTRUCTOR(ProgressListener);
36 
37  GUM_CONNECT((__notif), onProgress, (*this), ProgressListener::whenProgress);
38  GUM_CONNECT((__notif), onStop, (*this), ProgressListener::whenStop);
39  }
virtual void whenProgress(const void *src, const Size step, const double time)=0
When progress was made.
virtual void whenStop(const void *src, const std::string &message)=0
When it stops.
ProgressListener(ProgressNotifier &notif)
Class constructor.
#define GUM_CONNECT(sender, signal, receiver, target)
Definition: listener.h:98
ProgressNotifier & __notif
The scheme configuration.
+ Here is the call graph for this function:

◆ ~ProgressListener()

gum::ProgressListener::~ProgressListener ( )
virtual

Class destructor.

Definition at line 47 of file progressNotification.cpp.

47 { GUM_DESTRUCTOR(ProgressListener); }
ProgressListener(ProgressNotifier &notif)
Class constructor.

◆ ProgressListener() [2/2]

gum::ProgressListener::ProgressListener ( const ProgressListener other)
protected

Copy constructor.

Definition at line 41 of file progressNotification.cpp.

References GUM_ERROR.

41  :
42  __notif(other.__notif) {
43  GUM_CONS_CPY(ProgressListener);
44  GUM_ERROR(OperationNotAllowed, "No copy constructor for ProgressListener");
45  }
ProgressListener(ProgressNotifier &notif)
Class constructor.
ProgressNotifier & __notif
The scheme configuration.
#define GUM_ERROR(type, msg)
Definition: exceptions.h:55

Member Function Documentation

◆ attachSignal__()

INLINE void gum::Listener::attachSignal__ ( __sig__::ISignaler *  sender)
inherited

Definition at line 36 of file listener_inl.h.

References gum::Listener::__senders.

36  {
37  __senders.push_back(sender);
38  }
Senders_list __senders
Definition: listener.h:94

◆ detachSignal__()

INLINE void gum::Listener::detachSignal__ ( __sig__::ISignaler *  sender)
inherited

Definition at line 40 of file listener_inl.h.

References gum::Listener::__senders.

40  {
41  auto del = std::remove(__senders.begin(), __senders.end(), sender);
42 
43  if (del != __senders.end()) __senders.erase(del, __senders.end());
44  }
Senders_list __senders
Definition: listener.h:94

◆ operator=()

ProgressListener & gum::ProgressListener::operator= ( const ProgressListener other)
protected

Copy operator.

Definition at line 49 of file progressNotification.cpp.

References GUM_ERROR.

49  {
50  GUM_CONS_CPY(ProgressListener);
51  GUM_ERROR(OperationNotAllowed, "No copy constructor for ProgressListener");
52  }
ProgressListener(ProgressNotifier &notif)
Class constructor.
#define GUM_ERROR(type, msg)
Definition: exceptions.h:55

◆ whenProgress()

virtual void gum::ProgressListener::whenProgress ( const void *  src,
const Size  step,
const double  time 
)
pure virtual

When progress was made.

Parameters
srcThe signal source.
stepThe advancement in percent.
timeThe time.

Referenced by ProgressListener().

+ Here is the caller graph for this function:

◆ whenStop()

virtual void gum::ProgressListener::whenStop ( const void *  src,
const std::string &  message 
)
pure virtual

When it stops.

Parameters
srcThe signal source.
messageA message.

Referenced by ProgressListener().

+ Here is the caller graph for this function:

Member Data Documentation

◆ __notif

ProgressNotifier& gum::ProgressListener::__notif
private

The scheme configuration.

Definition at line 101 of file progressNotification.h.

Referenced by ProgressListener().


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