annotate OrthancStone/Sources/Messages/IMessage.h @ 1615:f5d4bd7b5593

new class: OsiriXLayerFactory
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 30 Oct 2020 17:26:44 +0100
parents 8563ea5d8ae4
children 9ac2a65d4172
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
1270
2d8ab34c8c91 upgrade to year 2020
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 643
diff changeset
5 * Copyright (C) 2017-2020 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
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
8 * 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
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
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
14 * 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
15 * Lesser General Public License for more details.
250
5e642859267e added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff changeset
16 *
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
17 * 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
18 * 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
19 * <http://www.gnu.org/licenses/>.
250
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
5e642859267e added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff changeset
23 #pragma once
5e642859267e added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff changeset
24
1098
17660df24c36 simplification of IOracleRunner
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1059
diff changeset
25 #include <boost/lexical_cast.hpp>
643
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
26 #include <boost/noncopyable.hpp>
250
5e642859267e added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff changeset
27
643
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
28 #include <string.h>
251
192e6e349e69 first usage of new message system (in SDL only)
am@osimis.io
parents: 250
diff changeset
29
393
e7a494bdd956 removed Messages/MessageType.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 377
diff changeset
30 namespace OrthancStone
e7a494bdd956 removed Messages/MessageType.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 377
diff changeset
31 {
643
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
32 class MessageIdentifier
250
5e642859267e added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff changeset
33 {
377
8eb4fe74000f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 304
diff changeset
34 private:
643
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
35 const char* file_;
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
36 int line_;
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
37
1059
e713f1a99861 replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 643
diff changeset
38 bool IsEqual(const MessageIdentifier& other) const
e713f1a99861 replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 643
diff changeset
39 {
e713f1a99861 replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 643
diff changeset
40 return (line_ == other.line_ &&
e713f1a99861 replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 643
diff changeset
41 strcmp(file_, other.file_) == 0);
e713f1a99861 replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 643
diff changeset
42 }
e713f1a99861 replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 643
diff changeset
43
643
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
44 public:
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
45 MessageIdentifier(const char* file,
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
46 int line) :
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
47 file_(file),
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
48 line_(line)
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
49 {
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 MessageIdentifier() :
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
53 file_(NULL),
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
54 line_(0)
377
8eb4fe74000f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 304
diff changeset
55 {
8eb4fe74000f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 304
diff changeset
56 }
643
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
57
1098
17660df24c36 simplification of IOracleRunner
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1059
diff changeset
58 std::string AsString() const
17660df24c36 simplification of IOracleRunner
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1059
diff changeset
59 {
17660df24c36 simplification of IOracleRunner
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1059
diff changeset
60 return std::string(file_) + ":" + boost::lexical_cast<std::string>(line_);
17660df24c36 simplification of IOracleRunner
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1059
diff changeset
61 }
17660df24c36 simplification of IOracleRunner
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1059
diff changeset
62
643
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
63 bool operator< (const MessageIdentifier& other) const
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
64 {
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
65 if (file_ == NULL)
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
66 {
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
67 return false;
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
68 }
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
69 else if (line_ != other.line_)
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
70 {
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
71 return line_ < other.line_;
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
72 }
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
73 else
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
74 {
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
75 return strcmp(file_, other.file_) < 0;
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
76 }
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
77 }
1059
e713f1a99861 replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 643
diff changeset
78
e713f1a99861 replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 643
diff changeset
79 bool operator== (const MessageIdentifier& other) const
e713f1a99861 replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 643
diff changeset
80 {
e713f1a99861 replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 643
diff changeset
81 return IsEqual(other);
e713f1a99861 replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 643
diff changeset
82 }
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 bool operator!= (const MessageIdentifier& other) const
e713f1a99861 replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 643
diff changeset
85 {
e713f1a99861 replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 643
diff changeset
86 return !IsEqual(other);
e713f1a99861 replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 643
diff changeset
87 }
643
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
88 };
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
89
377
8eb4fe74000f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 304
diff changeset
90
643
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
91 /**
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
92 * Base messages that are exchanged between IObservable and
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
93 * IObserver. Messages are distinguished by the "__FILE__" and
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
94 * "__LINE__" macro, as in "Orthanc::SQLite::StatementId".
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
95 **/
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
96 class IMessage : public boost::noncopyable
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
97 {
299
3897f9f28cfa backup work in progress: updated messaging framework with ICallable
am@osimis.io
parents: 251
diff changeset
98 public:
377
8eb4fe74000f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 304
diff changeset
99 virtual ~IMessage()
8eb4fe74000f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 304
diff changeset
100 {
8eb4fe74000f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 304
diff changeset
101 }
250
5e642859267e added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff changeset
102
643
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
103 virtual const MessageIdentifier& GetIdentifier() const = 0;
250
5e642859267e added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff changeset
104 };
5e642859267e added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff changeset
105
299
3897f9f28cfa backup work in progress: updated messaging framework with ICallable
am@osimis.io
parents: 251
diff changeset
106
643
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
107 /**
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
108 * 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
109 * origin is required. Sample usage:
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
110 * typedef OriginMessage<OrthancSlicesLoader> SliceGeometryErrorMessage;
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
111 **/
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
112 template <typename TOrigin>
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
113 class OriginMessage : public IMessage
299
3897f9f28cfa backup work in progress: updated messaging framework with ICallable
am@osimis.io
parents: 251
diff changeset
114 {
377
8eb4fe74000f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 304
diff changeset
115 private:
643
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
116 const TOrigin& origin_;
299
3897f9f28cfa backup work in progress: updated messaging framework with ICallable
am@osimis.io
parents: 251
diff changeset
117
377
8eb4fe74000f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 304
diff changeset
118 public:
1571
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1512
diff changeset
119 explicit OriginMessage(const TOrigin& origin) :
377
8eb4fe74000f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 304
diff changeset
120 origin_(origin)
8eb4fe74000f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 304
diff changeset
121 {
8eb4fe74000f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 304
diff changeset
122 }
299
3897f9f28cfa backup work in progress: updated messaging framework with ICallable
am@osimis.io
parents: 251
diff changeset
123
406
5d359b115b29 use of callables in OrthancVolumeImage
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 397
diff changeset
124 const TOrigin& GetOrigin() const
377
8eb4fe74000f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 304
diff changeset
125 {
8eb4fe74000f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 304
diff changeset
126 return origin_;
8eb4fe74000f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 304
diff changeset
127 }
8eb4fe74000f refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 304
diff changeset
128 };
250
5e642859267e added new Observable/Observer & MessageBroker (not used yet)
am@osimis.io
parents:
diff changeset
129 }
643
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
130
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 #define ORTHANC_STONE_MESSAGE(FILE, LINE) \
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
133 public: \
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
134 static const ::OrthancStone::MessageIdentifier& GetStaticIdentifier() \
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
135 { \
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
136 static const ::OrthancStone::MessageIdentifier id(FILE, LINE); \
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
137 return id; \
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
138 } \
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
139 \
1571
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1512
diff changeset
140 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
141 { \
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
142 return GetStaticIdentifier(); \
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
143 }
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 #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
147 class NAME : public ::OrthancStone::OriginMessage<ORIGIN> \
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
148 { \
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
149 ORTHANC_STONE_MESSAGE(FILE, LINE); \
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
150 \
1571
85e117739eca cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1512
diff changeset
151 explicit NAME(const ORIGIN& origin) : \
643
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
152 OriginMessage(origin) \
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
153 { \
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 #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
159 class NAME : public ::OrthancStone::IMessage \
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
160 { \
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
161 ORTHANC_STONE_MESSAGE(FILE, LINE); \
f0008c55e5f7 getting rid of MessageType enumeration
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 619
diff changeset
162 };