PhasicFlow
v0.1
www.cemf.ir
eventSubscriber.hpp
Go to the documentation of this file.
1
/*------------------------------- phasicFlow ---------------------------------
2
O C enter of
3
O O E ngineering and
4
O O M ultiscale modeling of
5
OOOOOOO F luid flow
6
------------------------------------------------------------------------------
7
Copyright (C): www.cemf.ir
8
email: hamid.r.norouzi AT gmail.com
9
------------------------------------------------------------------------------
10
Licence:
11
This file is part of phasicFlow code. It is a free software for simulating
12
granular and multiphase flows. You can redistribute it and/or modify it under
13
the terms of GNU General Public License v3 or any other later versions.
14
15
phasicFlow is distributed to help others in their research in the field of
16
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
17
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
19
-----------------------------------------------------------------------------*/
20
21
22
#ifndef __eventSubscriber_hpp__
23
#define __eventSubscriber_hpp__
24
25
#include "
List.hpp
"
26
#include "
eventObserver.hpp
"
27
#include "
eventMessage.hpp
"
28
29
namespace
pFlow
30
{
31
32
33
34
class
eventSubscriber
35
{
36
protected
:
37
38
// - list of subsribed objectd that recieve updage messages
39
mutable
List<eventObserver*>
observerList_
;
40
41
public
:
42
43
eventSubscriber
()
44
{}
45
46
virtual
~eventSubscriber
();
47
48
virtual
bool
subscribe
(
eventObserver
* observer)
const
;
49
50
virtual
bool
unsubscribe
(
eventObserver
* observer)
const
;
51
52
bool
notify
(
const
eventMessage
& msg);
53
54
bool
notify
(
const
eventMessage
& msg,
const
List<eventObserver*>
& exclutionList );
55
56
57
58
};
59
60
}
// pFlow
61
62
63
64
#endif // __eventSubscriber_hpp__
pFlow::List
Definition:
List.hpp:39
pFlow::eventSubscriber
Definition:
eventSubscriber.hpp:34
pFlow::eventMessage
Definition:
eventMessage.hpp:29
pFlow::eventSubscriber::notify
bool notify(const eventMessage &msg)
Definition:
eventSubscriber.cpp:62
pFlow::eventSubscriber::eventSubscriber
eventSubscriber()
Definition:
eventSubscriber.hpp:43
List.hpp
pFlow::eventSubscriber::observerList_
List< eventObserver * > observerList_
Definition:
eventSubscriber.hpp:39
eventObserver.hpp
pFlow::eventObserver
Definition:
eventObserver.hpp:33
pFlow
Definition:
demComponent.hpp:28
pFlow::eventSubscriber::subscribe
virtual bool subscribe(eventObserver *observer) const
Definition:
eventSubscriber.cpp:34
pFlow::eventSubscriber::~eventSubscriber
virtual ~eventSubscriber()
Definition:
eventSubscriber.cpp:25
pFlow::eventSubscriber::unsubscribe
virtual bool unsubscribe(eventObserver *observer) const
Definition:
eventSubscriber.cpp:50
eventMessage.hpp
src
phasicFlow
eventSubscriber
eventSubscriber.hpp
Generated by
1.8.17