Mercurial > hg > orthanc-stone
annotate OrthancStone/Sources/Messages/IMessage.h @ 2069:5956d7357098 deep-learning
macro ORTHANC_HAS_WASM_SIMD has to be manually defined
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 19 May 2023 17:00:17 +0200 |
parents | 7053b8a0aaec |
children | 07964689cb0b |
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 |
1871
7053b8a0aaec
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1870
diff
changeset
|
5 * Copyright (C) 2017-2022 Osimis S.A., Belgium |
7053b8a0aaec
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1870
diff
changeset
|
6 * Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
250
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
7 * |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
8 * This program is free software: you can redistribute it and/or |
1598
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1571
diff
changeset
|
9 * modify it under the terms of the GNU Lesser General Public License |
250
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
10 * 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
|
11 * the License, or (at your option) any later version. |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
12 * |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
13 * 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
|
14 * WITHOUT ANY WARRANTY; without even the implied warranty of |
1598
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1571
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1571
diff
changeset
|
16 * Lesser General Public License for more details. |
250
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
17 * |
1598
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1571
diff
changeset
|
18 * You should have received a copy of the GNU Lesser General Public |
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1571
diff
changeset
|
19 * License along with this program. If not, see |
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1571
diff
changeset
|
20 * <http://www.gnu.org/licenses/>. |
250
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 |
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 #pragma once |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
25 |
1098
17660df24c36
simplification of IOracleRunner
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1059
diff
changeset
|
26 #include <boost/lexical_cast.hpp> |
643
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
27 #include <boost/noncopyable.hpp> |
250
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
28 |
643
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
29 #include <string.h> |
251
192e6e349e69
first usage of new message system (in SDL only)
am@osimis.io
parents:
250
diff
changeset
|
30 |
393
e7a494bdd956
removed Messages/MessageType.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
377
diff
changeset
|
31 namespace OrthancStone |
e7a494bdd956
removed Messages/MessageType.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
377
diff
changeset
|
32 { |
643
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
33 class MessageIdentifier |
250
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
34 { |
377 | 35 private: |
643
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
36 const char* file_; |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
37 int line_; |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
38 |
1059
e713f1a99861
replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
643
diff
changeset
|
39 bool IsEqual(const MessageIdentifier& other) const |
e713f1a99861
replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
643
diff
changeset
|
40 { |
e713f1a99861
replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
643
diff
changeset
|
41 return (line_ == other.line_ && |
e713f1a99861
replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
643
diff
changeset
|
42 strcmp(file_, other.file_) == 0); |
e713f1a99861
replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
643
diff
changeset
|
43 } |
e713f1a99861
replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
643
diff
changeset
|
44 |
643
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
45 public: |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
46 MessageIdentifier(const char* file, |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
47 int line) : |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
48 file_(file), |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
49 line_(line) |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
50 { |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
51 } |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
52 |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
53 MessageIdentifier() : |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
54 file_(NULL), |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
55 line_(0) |
377 | 56 { |
57 } | |
643
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
58 |
1098
17660df24c36
simplification of IOracleRunner
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1059
diff
changeset
|
59 std::string AsString() const |
17660df24c36
simplification of IOracleRunner
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1059
diff
changeset
|
60 { |
17660df24c36
simplification of IOracleRunner
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1059
diff
changeset
|
61 return std::string(file_) + ":" + boost::lexical_cast<std::string>(line_); |
17660df24c36
simplification of IOracleRunner
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1059
diff
changeset
|
62 } |
17660df24c36
simplification of IOracleRunner
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1059
diff
changeset
|
63 |
643
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
64 bool operator< (const MessageIdentifier& other) const |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
65 { |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
66 if (file_ == NULL) |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
67 { |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
68 return false; |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
69 } |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
70 else if (line_ != other.line_) |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
71 { |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
72 return line_ < other.line_; |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
73 } |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
74 else |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
75 { |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
76 return strcmp(file_, other.file_) < 0; |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
77 } |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
78 } |
1059
e713f1a99861
replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
643
diff
changeset
|
79 |
e713f1a99861
replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
643
diff
changeset
|
80 bool operator== (const MessageIdentifier& other) const |
e713f1a99861
replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
643
diff
changeset
|
81 { |
e713f1a99861
replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
643
diff
changeset
|
82 return IsEqual(other); |
e713f1a99861
replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
643
diff
changeset
|
83 } |
e713f1a99861
replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
643
diff
changeset
|
84 |
e713f1a99861
replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
643
diff
changeset
|
85 bool operator!= (const MessageIdentifier& other) const |
e713f1a99861
replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
643
diff
changeset
|
86 { |
e713f1a99861
replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
643
diff
changeset
|
87 return !IsEqual(other); |
e713f1a99861
replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
643
diff
changeset
|
88 } |
643
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
89 }; |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
90 |
377 | 91 |
643
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
92 /** |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
93 * Base messages that are exchanged between IObservable and |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
94 * IObserver. Messages are distinguished by the "__FILE__" and |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
95 * "__LINE__" macro, as in "Orthanc::SQLite::StatementId". |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
96 **/ |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
97 class IMessage : public boost::noncopyable |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
98 { |
299
3897f9f28cfa
backup work in progress: updated messaging framework with ICallable
am@osimis.io
parents:
251
diff
changeset
|
99 public: |
377 | 100 virtual ~IMessage() |
101 { | |
102 } | |
250
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
103 |
643
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
104 virtual const MessageIdentifier& GetIdentifier() const = 0; |
250
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
105 }; |
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
106 |
299
3897f9f28cfa
backup work in progress: updated messaging framework with ICallable
am@osimis.io
parents:
251
diff
changeset
|
107 |
643
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
108 /** |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
109 * Simple message implementation when no payload is needed but the |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
110 * origin is required. Sample usage: |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
111 * typedef OriginMessage<OrthancSlicesLoader> SliceGeometryErrorMessage; |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
112 **/ |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
113 template <typename TOrigin> |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
114 class OriginMessage : public IMessage |
299
3897f9f28cfa
backup work in progress: updated messaging framework with ICallable
am@osimis.io
parents:
251
diff
changeset
|
115 { |
377 | 116 private: |
643
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
117 const TOrigin& origin_; |
299
3897f9f28cfa
backup work in progress: updated messaging framework with ICallable
am@osimis.io
parents:
251
diff
changeset
|
118 |
377 | 119 public: |
1571 | 120 explicit OriginMessage(const TOrigin& origin) : |
377 | 121 origin_(origin) |
122 { | |
123 } | |
299
3897f9f28cfa
backup work in progress: updated messaging framework with ICallable
am@osimis.io
parents:
251
diff
changeset
|
124 |
406
5d359b115b29
use of callables in OrthancVolumeImage
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
397
diff
changeset
|
125 const TOrigin& GetOrigin() const |
377 | 126 { |
127 return origin_; | |
128 } | |
129 }; | |
250
5e642859267e
added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff
changeset
|
130 } |
643
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
131 |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
132 |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
133 #define ORTHANC_STONE_MESSAGE(FILE, LINE) \ |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
134 public: \ |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
135 static const ::OrthancStone::MessageIdentifier& GetStaticIdentifier() \ |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
136 { \ |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
137 static const ::OrthancStone::MessageIdentifier id(FILE, LINE); \ |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
138 return id; \ |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
139 } \ |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
140 \ |
1571 | 141 virtual const ::OrthancStone::MessageIdentifier& GetIdentifier() const ORTHANC_OVERRIDE \ |
643
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
142 { \ |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
143 return GetStaticIdentifier(); \ |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
144 } |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
145 |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
146 |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
147 #define ORTHANC_STONE_DEFINE_ORIGIN_MESSAGE(FILE, LINE, NAME, ORIGIN) \ |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
148 class NAME : public ::OrthancStone::OriginMessage<ORIGIN> \ |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
149 { \ |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
150 ORTHANC_STONE_MESSAGE(FILE, LINE); \ |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
151 \ |
1571 | 152 explicit NAME(const ORIGIN& origin) : \ |
643
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
153 OriginMessage(origin) \ |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
154 { \ |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
155 } \ |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
156 }; |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
157 |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
158 |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
159 #define ORTHANC_STONE_DEFINE_EMPTY_MESSAGE(FILE, LINE, NAME) \ |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
160 class NAME : public ::OrthancStone::IMessage \ |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
161 { \ |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
162 ORTHANC_STONE_MESSAGE(FILE, LINE); \ |
f0008c55e5f7
getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
619
diff
changeset
|
163 }; |