ALBA
albaObserver.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaObserver
5 Authors: Marco Petrone
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16#ifndef __albaObserver_h
17#define __albaObserver_h
18//----------------------------------------------------------------------------
19// includes :
20//----------------------------------------------------------------------------
21#include "albaObject.h"
22#include "albaEvent.h"
23
24//------------------------------------------------------------------------------
25// albaObserver
26//------------------------------------------------------------------------------
35class ALBA_EXPORT albaObserver
36{
37public:
39 virtual ~albaObserver() {}
40
42 virtual void OnEvent(albaEventBase *e) = 0;
43};
44
45#endif /* __albaObserver_h */
Implementation of the message object for the Subject/Observer design pattern.
Definition: albaEventBase.h:49
Interface implementing the Observer of the Subject/Observer design pattern.
Definition: albaObserver.h:36
virtual void OnEvent(albaEventBase *e)=0
process the events sent by subjects
virtual ~albaObserver()
Definition: albaObserver.h:39