aGrUM  0.20.2
a C++ library for (probabilistic) graphical models
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 58 of file progressNotification.h.

Constructor & Destructor Documentation

◆ ProgressListener() [1/2]

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

Class constructor.

Parameters
theprogress notifier.

Definition at line 33 of file progressNotification.cpp.

References gum::Set< Key, Alloc >::emplace().

33  : notif__(notif) {
34  GUM_CONSTRUCTOR(ProgressListener);
35 
36  GUM_CONNECT((notif__), onProgress, (*this), ProgressListener::whenProgress);
37  GUM_CONNECT((notif__), onStop, (*this), ProgressListener::whenStop);
38  }
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.
ProgressNotifier & notif__
The scheme configuration.
#define GUM_CONNECT(sender, signal, receiver, target)
Definition: listener.h:97
+ Here is the call graph for this function:

◆ ~ProgressListener()

gum::ProgressListener::~ProgressListener ( )
virtual

Class destructor.

Definition at line 46 of file progressNotification.cpp.

References gum::Set< Key, Alloc >::emplace().

46 { GUM_DESTRUCTOR(ProgressListener); }
ProgressListener(ProgressNotifier &notif)
Class constructor.
+ Here is the call graph for this function:

◆ ProgressListener() [2/2]

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

Copy constructor.

Definition at line 40 of file progressNotification.cpp.

References gum::Set< Key, Alloc >::emplace().

40  :
41  notif__(other.notif__) {
42  GUM_CONS_CPY(ProgressListener);
43  GUM_ERROR(OperationNotAllowed, "No copy constructor for ProgressListener");
44  }
ProgressListener(ProgressNotifier &notif)
Class constructor.
ProgressNotifier & notif__
The scheme configuration.
#define GUM_ERROR(type, msg)
Definition: exceptions.h:54
+ Here is the call graph for this function:

Member Function Documentation

◆ attachSignal__()

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

Definition at line 35 of file listener_inl.h.

References gum::Set< Key, Alloc >::emplace().

35  {
36  senders__.push_back(sender);
37  }
Senders_list senders__
Definition: listener.h:93
+ Here is the call graph for this function:

◆ detachSignal__()

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

Definition at line 39 of file listener_inl.h.

References gum::Set< Key, Alloc >::emplace().

39  {
40  auto del = std::remove(senders__.begin(), senders__.end(), sender);
41 
42  if (del != senders__.end()) senders__.erase(del, senders__.end());
43  }
Senders_list senders__
Definition: listener.h:93
+ Here is the call graph for this function:

◆ operator=()

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

Copy operator.

Definition at line 48 of file progressNotification.cpp.

References gum::Set< Key, Alloc >::emplace().

48  {
49  GUM_CONS_CPY(ProgressListener);
50  GUM_ERROR(OperationNotAllowed, "No copy constructor for ProgressListener");
51  }
ProgressListener(ProgressNotifier &notif)
Class constructor.
#define GUM_ERROR(type, msg)
Definition: exceptions.h:54
+ Here is the call graph for this function:

◆ 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.

◆ whenStop()

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

When it stops.

Parameters
srcThe signal source.
messageA message.

Member Data Documentation

◆ notif__

ProgressNotifier& gum::ProgressListener::notif__
private

The scheme configuration.

Definition at line 100 of file progressNotification.h.


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