Mercurial > hg > orthanc
diff UnitTestsSources/MultiThreadingTests.cpp @ 2924:22524fd06225
macros ORTHANC_OVERRIDE and ORTHANC_FINAL
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 09 Nov 2018 09:06:46 +0100 |
parents | 9d08edde614b |
children | dc18d5804746 |
line wrap: on
line diff
--- a/UnitTestsSources/MultiThreadingTests.cpp Thu Nov 08 17:26:17 2018 +0100 +++ b/UnitTestsSources/MultiThreadingTests.cpp Fri Nov 09 09:06:46 2018 +0100 @@ -93,15 +93,15 @@ { } - virtual void Start() + virtual void Start() ORTHANC_OVERRIDE { } - virtual void Reset() + virtual void Reset() ORTHANC_OVERRIDE { } - virtual JobStepResult Step() + virtual JobStepResult Step() ORTHANC_OVERRIDE { if (fails_) { @@ -118,28 +118,28 @@ } } - virtual void Stop(JobStopReason reason) + virtual void Stop(JobStopReason reason) ORTHANC_OVERRIDE { } - virtual float GetProgress() + virtual float GetProgress() ORTHANC_OVERRIDE { return static_cast<float>(count_) / static_cast<float>(steps_ - 1); } - virtual void GetJobType(std::string& type) + virtual void GetJobType(std::string& type) ORTHANC_OVERRIDE { type = "DummyJob"; } - virtual bool Serialize(Json::Value& value) + virtual bool Serialize(Json::Value& value) ORTHANC_OVERRIDE { value = Json::objectValue; value["Type"] = "DummyJob"; return true; } - virtual void GetPublicContent(Json::Value& value) + virtual void GetPublicContent(Json::Value& value) ORTHANC_OVERRIDE { value["hello"] = "world"; } @@ -152,12 +152,12 @@ bool trailingStepDone_; protected: - virtual bool HandleInstance(const std::string& instance) + virtual bool HandleInstance(const std::string& instance) ORTHANC_OVERRIDE { return (instance != "nope"); } - virtual bool HandleTrailingStep() + virtual bool HandleTrailingStep() ORTHANC_OVERRIDE { if (HasTrailingStep()) { @@ -201,11 +201,11 @@ return trailingStepDone_; } - virtual void Stop(JobStopReason reason) + virtual void Stop(JobStopReason reason) ORTHANC_OVERRIDE { } - virtual void GetJobType(std::string& s) + virtual void GetJobType(std::string& s) ORTHANC_OVERRIDE { s = "DummyInstancesJob"; } @@ -215,7 +215,7 @@ class DummyUnserializer : public GenericJobUnserializer { public: - virtual IJob* UnserializeJob(const Json::Value& value) + virtual IJob* UnserializeJob(const Json::Value& value) ORTHANC_OVERRIDE { if (SerializationToolbox::ReadString(value, "Type") == "DummyInstancesJob") { @@ -1286,7 +1286,7 @@ context_->SetupJobsEngine(true, false); } - virtual ~OrthancJobsSerialization() + virtual ~OrthancJobsSerialization() ORTHANC_OVERRIDE { context_->Stop(); context_.reset(NULL);