aGrUM  0.17.2
a C++ library for (probabilistic) graphical models
progressNotification.h
Go to the documentation of this file.
1 
31 #ifndef AGRUM_PROGRESSNOTIFICATION_H
32 #define AGRUM_PROGRESSNOTIFICATION_H
33 
35 #include <agrum/tools/core/timer.h>
36 
37 namespace gum {
38 
46  public:
48  Signaler2< Size, double > onProgress;
49 
51  Signaler1< const std::string& > onStop;
52  };
53 
59  class ProgressListener: public Listener {
60  public:
65  explicit ProgressListener(ProgressNotifier& notif);
66 
70  virtual ~ProgressListener();
71 
78  virtual void
79  whenProgress(const void* src, const Size step, const double time) = 0;
80 
86  virtual void whenStop(const void* src, const std::string& message) = 0;
87 
88  protected:
92  ProgressListener(const ProgressListener& other);
93 
97  ProgressListener& operator=(const ProgressListener& other);
98 
99  private:
102  };
103 } // namespace gum
104 #endif // AGRUM_PROGRESSNOTIFICATION_H
Notification for progress using listener.
Signaler2< Size, double > onProgress
Progression (percent) and time.
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
Definition: agrum.h:25
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
ProgressNotifier & __notif
The scheme configuration.
Signaler1< const std::string &> onStop
with a possible explanation for stopping
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Definition: types.h:48
The ProgressListener class.
Every class who would catch signal from signaler should derive from Listener.
Definition: listener.h:74