comparison Framework/dev.h @ 267:89d02de83c03 am-2

added declaretion of messages handled/emitted
author am@osimis.io
date Wed, 22 Aug 2018 14:59:20 +0200
parents c9cf95b49a86
children 3897f9f28cfa
comparison
equal deleted inserted replaced
266:c9cf95b49a86 267:89d02de83c03
201 201
202 virtual void HandleMessage(const IObservable& from, const IMessage& message) 202 virtual void HandleMessage(const IObservable& from, const IMessage& message)
203 { 203 {
204 switch (message.GetType()) 204 switch (message.GetType())
205 { 205 {
206 case MessageType_SliceGeometryReady: 206 case MessageType_SliceLoader_GeometryReady:
207 OnSliceGeometryReady(dynamic_cast<const OrthancSlicesLoader&>(from)); 207 OnSliceGeometryReady(dynamic_cast<const OrthancSlicesLoader&>(from));
208 case MessageType_SliceGeometryError: 208 case MessageType_SliceLoader_GeometryError:
209 { 209 {
210 LOG(ERROR) << "Unable to download a volume image"; 210 LOG(ERROR) << "Unable to download a volume image";
211 SlicedVolumeBase::NotifyGeometryError(); 211 SlicedVolumeBase::NotifyGeometryError();
212 }; break; 212 }; break;
213 case MessageType_SliceImageReady: 213 case MessageType_SliceLoader_ImageReady:
214 { 214 {
215 const OrthancSlicesLoader::SliceImageReadyMessage& msg = dynamic_cast<const OrthancSlicesLoader::SliceImageReadyMessage&>(message); 215 const OrthancSlicesLoader::SliceImageReadyMessage& msg = dynamic_cast<const OrthancSlicesLoader::SliceImageReadyMessage&>(message);
216 OnSliceImageReady(dynamic_cast<const OrthancSlicesLoader&>(from), 216 OnSliceImageReady(dynamic_cast<const OrthancSlicesLoader&>(from),
217 msg.sliceIndex_, 217 msg.sliceIndex_,
218 msg.slice_, 218 msg.slice_,
219 msg.image_, 219 msg.image_,
220 msg.effectiveQuality_); 220 msg.effectiveQuality_);
221 }; break; 221 }; break;
222 case MessageType_SliceImageError: 222 case MessageType_SliceLoader_ImageError:
223 { 223 {
224 const OrthancSlicesLoader::SliceImageErrorMessage& msg = dynamic_cast<const OrthancSlicesLoader::SliceImageErrorMessage&>(message); 224 const OrthancSlicesLoader::SliceImageErrorMessage& msg = dynamic_cast<const OrthancSlicesLoader::SliceImageErrorMessage&>(message);
225 LOG(ERROR) << "Cannot download slice " << msg.sliceIndex_ << " in a volume image"; 225 LOG(ERROR) << "Cannot download slice " << msg.sliceIndex_ << " in a volume image";
226 ScheduleSliceDownload(); 226 ScheduleSliceDownload();
227 }; break; 227 }; break;