Mercurial > hg > orthanc-stone
annotate Framework/Messages/IObserver.h @ 632:500c3f70b6c2
- Added a ClearAllChains method to PolylineSceneLayer --> revision must change
when calling it ==> BumpRevision has been added to base class
- Added some docs
= Added GetMinDepth + GetMaxDepth to Scene2D (to alleviate the need for app-
specific "Z depth registry" : clients may simply add a new layer on top or at
the bottom of the existing layer set.
- Added the line tracker measurement tools, commands and trackers. Generic base
classes + Line measure
- started work on the line measure handles
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Thu, 09 May 2019 10:41:31 +0200 |
parents | b70e9be013e4 |
children | 38409549db43 |
rev | line source |
---|---|
250
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
1 /** |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
2 * Stone of Orthanc |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
439 | 5 * Copyright (C) 2017-2019 Osimis S.A., Belgium |
250
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
6 * |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
7 * This program is free software: you can redistribute it and/or |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
8 * modify it under the terms of the GNU Affero General Public License |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
9 * as published by the Free Software Foundation, either version 3 of |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
10 * the License, or (at your option) any later version. |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
11 * |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, but |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
13 * WITHOUT ANY WARRANTY; without even the implied warranty of |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
15 * Affero General Public License for more details. |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
16 * |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
17 * You should have received a copy of the GNU Affero General Public License |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
19 **/ |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
20 |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
21 |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
22 #pragma once |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
23 |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
24 #include "MessageBroker.h" |
251
192e6e349e69
first usage of new message system (in SDL only)
am@osimis.io
parents:
250
diff
changeset
|
25 #include "IMessage.h" |
250
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
26 |
393
e7a494bdd956
removed Messages/MessageType.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
300
diff
changeset
|
27 namespace OrthancStone |
e7a494bdd956
removed Messages/MessageType.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
300
diff
changeset
|
28 { |
250
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
29 class IObserver : public boost::noncopyable |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
30 { |
393
e7a494bdd956
removed Messages/MessageType.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
300
diff
changeset
|
31 private: |
e7a494bdd956
removed Messages/MessageType.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
300
diff
changeset
|
32 MessageBroker& broker_; |
250
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
33 |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
34 public: |
393
e7a494bdd956
removed Messages/MessageType.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
300
diff
changeset
|
35 IObserver(MessageBroker& broker) : |
e7a494bdd956
removed Messages/MessageType.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
300
diff
changeset
|
36 broker_(broker) |
250
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
37 { |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
38 broker_.Register(*this); |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
39 } |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
40 |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
41 virtual ~IObserver() |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
42 { |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
43 broker_.Unregister(*this); |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
44 } |
393
e7a494bdd956
removed Messages/MessageType.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
300
diff
changeset
|
45 |
e7a494bdd956
removed Messages/MessageType.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
300
diff
changeset
|
46 MessageBroker& GetBroker() const |
e7a494bdd956
removed Messages/MessageType.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
300
diff
changeset
|
47 { |
e7a494bdd956
removed Messages/MessageType.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
300
diff
changeset
|
48 return broker_; |
e7a494bdd956
removed Messages/MessageType.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
300
diff
changeset
|
49 } |
250
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
50 }; |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
51 } |