-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSignaller.h
More file actions
49 lines (37 loc) · 1.17 KB
/
Copy pathSignaller.h
File metadata and controls
49 lines (37 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#pragma once
#include"RxSignal/CommonDefines.h"
#include"RxSignal/SignalSlotBase.h"
#include"RxSignal/SignallerAlgorithms.h"
#include"RxSignal/Export.h"
namespace BaseLib { namespace Concurrent
{
/**
* @brief The Signaller class, aka. Publisher, EventDispatcher, to be used by Subject.
*
* TODO:
* - Add support for any number of arguments by using NoArgFunctionPointerInvoker, OneArgFunctionPointerInvoker, TwoArgFunctionPointerInvoker, etc ...
* - Add support for replay of events
* - Add support for scalable asynchronous dispatch of events.
* - Add a baseclass "class Event" or similar with support for invoke or dispatch of event to handler/observer.
* - Add event meta data for monitoring: timestamp, etc
*/
class DLL_STATE Signaller
: public SignallerBase
, public SignallerAlgorithms
{
public:
Signaller();
virtual ~Signaller();
friend class SignallerAlgorithms;
CLASS_TRAITS(Signaller)
virtual void Block();
virtual void Unblock();
virtual bool IsBlocked() const;
InstanceHandle Handle() const;
protected:
void incHandle();
private:
InstanceHandle handle_;
Templates::ProtectedBool block_;
};
}}