-
Notifications
You must be signed in to change notification settings - Fork 0
/
IObserve.h
52 lines (42 loc) · 1.41 KB
/
IObserve.h
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
50
51
52
//---------------------------------------------------------------------------
#pragma once
#ifndef IObserveH
#define IObserveH
#include <vector>
#include <iostream>
#include "Util.h"
using namespace std;
//-------------------------------------------------------------------------
enum Message_Notify{
Update_measure_fromGatePair = 1,
Update_calculate_fromGatePair = 2,
Update_measure_fromHandledPairDose = 3,
Update_calculate_fromHandledPairDose = 4,
Update_CAX_from_operator = 5,
Update_rotation = 6,
Update_leftToRightChange = 7,
Update_topToBottomChange = 8,
Update_Segments = 9,
};
enum Observer_Id{
HANDLEPAIRDOSE = 1,
DISPLAYPAIRDOSE = 2,
};
//-------------------------------------------Interface: IObserver----------------------------------------
class IObserver{
public:
virtual ~IObserver() = 0;
virtual void update(Message_Notify message) = 0;
Observer_Id identify;
};
//-------------------------------------------Interface: IObject----------------------------------------
class IObject{
public:
virtual ~IObject() = 0;
virtual void Notify(Message_Notify message) = 0;
virtual void AddObserver(IObserver *pObserver) = 0;
virtual void DeleteObserver(IObserver *pObserver) = 0;
virtual bool SEHNotify(IObserver* observer, Message_Notify message) = 0;
};
//---------------------------------------------------------------------------
#endif