Skip to content

Commit 35ae3af

Browse files
author
Christoph
committed
documentation for public interface of observer class
1 parent 24f3a17 commit 35ae3af

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

cppgp/util/observer.hpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55

66
namespace gp::util {
77

8+
/**
9+
* Interface to allow observation of a ISubject class.
10+
* This class can subscribe at an ISubject and the provided function
11+
* gets called by ISubject at certain events.
12+
*/
813
class IObserver {
914
public:
1015
/**
@@ -23,10 +28,17 @@ class IObserver {
2328
};
2429

2530

31+
/**
32+
* Interface to allow notification of subscribed IObserver classes.
33+
* It provides public functions for IObserver classes to subscribe
34+
* and unsubscribe. Further, this class provides a protected member
35+
* function notifyAll that notifies all subscribed IObserver classes.
36+
*/
2637
class ISubject {
2738
public:
2839
ISubject();
2940
~ISubject();
41+
3042
/**
3143
* \brief
3244
*/
@@ -38,6 +50,9 @@ class ISubject {
3850
bool unsubscribe(const IObserver* const observer);
3951

4052
protected:
53+
/**
54+
*
55+
*/
4156
void notifyAll();
4257

4358
private:

0 commit comments

Comments
 (0)