Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/Messages/IMessage.h @ 1571:85e117739eca
cppcheck
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 21 Sep 2020 17:46:39 +0200 |
parents | 244ad1e4e76a |
children | 8563ea5d8ae4 |
comparison
equal
deleted
inserted
replaced
1570:9a04f42098a3 | 1571:85e117739eca |
---|---|
113 { | 113 { |
114 private: | 114 private: |
115 const TOrigin& origin_; | 115 const TOrigin& origin_; |
116 | 116 |
117 public: | 117 public: |
118 OriginMessage(const TOrigin& origin) : | 118 explicit OriginMessage(const TOrigin& origin) : |
119 origin_(origin) | 119 origin_(origin) |
120 { | 120 { |
121 } | 121 } |
122 | 122 |
123 const TOrigin& GetOrigin() const | 123 const TOrigin& GetOrigin() const |
134 { \ | 134 { \ |
135 static const ::OrthancStone::MessageIdentifier id(FILE, LINE); \ | 135 static const ::OrthancStone::MessageIdentifier id(FILE, LINE); \ |
136 return id; \ | 136 return id; \ |
137 } \ | 137 } \ |
138 \ | 138 \ |
139 virtual const ::OrthancStone::MessageIdentifier& GetIdentifier() const \ | 139 virtual const ::OrthancStone::MessageIdentifier& GetIdentifier() const ORTHANC_OVERRIDE \ |
140 { \ | 140 { \ |
141 return GetStaticIdentifier(); \ | 141 return GetStaticIdentifier(); \ |
142 } | 142 } |
143 | 143 |
144 | 144 |
145 #define ORTHANC_STONE_DEFINE_ORIGIN_MESSAGE(FILE, LINE, NAME, ORIGIN) \ | 145 #define ORTHANC_STONE_DEFINE_ORIGIN_MESSAGE(FILE, LINE, NAME, ORIGIN) \ |
146 class NAME : public ::OrthancStone::OriginMessage<ORIGIN> \ | 146 class NAME : public ::OrthancStone::OriginMessage<ORIGIN> \ |
147 { \ | 147 { \ |
148 ORTHANC_STONE_MESSAGE(FILE, LINE); \ | 148 ORTHANC_STONE_MESSAGE(FILE, LINE); \ |
149 \ | 149 \ |
150 NAME(const ORIGIN& origin) : \ | 150 explicit NAME(const ORIGIN& origin) : \ |
151 OriginMessage(origin) \ | 151 OriginMessage(origin) \ |
152 { \ | 152 { \ |
153 } \ | 153 } \ |
154 }; | 154 }; |
155 | 155 |