Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/Loaders/BasicFetchingItemsSorter.h @ 1571:85e117739eca
cppcheck
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 21 Sep 2020 17:46:39 +0200 |
parents | 244ad1e4e76a |
children | 4fb8fdf03314 |
comparison
equal
deleted
inserted
replaced
1570:9a04f42098a3 | 1571:85e117739eca |
---|---|
21 | 21 |
22 #pragma once | 22 #pragma once |
23 | 23 |
24 #include "IFetchingItemsSorter.h" | 24 #include "IFetchingItemsSorter.h" |
25 | 25 |
26 #include <Compatibility.h> // For ORTHANC_OVERRIDE | |
27 | |
26 namespace OrthancStone | 28 namespace OrthancStone |
27 { | 29 { |
28 class BasicFetchingItemsSorter : public IFetchingItemsSorter | 30 class BasicFetchingItemsSorter : public IFetchingItemsSorter |
29 { | 31 { |
30 private: | 32 private: |
32 | 34 |
33 public: | 35 public: |
34 class Factory : public IFactory | 36 class Factory : public IFactory |
35 { | 37 { |
36 public: | 38 public: |
37 virtual IFetchingItemsSorter* CreateSorter(unsigned int itemsCount) const | 39 virtual IFetchingItemsSorter* CreateSorter(unsigned int itemsCount) const ORTHANC_OVERRIDE |
38 { | 40 { |
39 return new BasicFetchingItemsSorter(itemsCount); | 41 return new BasicFetchingItemsSorter(itemsCount); |
40 } | 42 } |
41 }; | 43 }; |
42 | 44 |
43 BasicFetchingItemsSorter(unsigned int itemsCount); | 45 explicit BasicFetchingItemsSorter(unsigned int itemsCount); |
44 | 46 |
45 virtual unsigned int GetItemsCount() const | 47 virtual unsigned int GetItemsCount() const ORTHANC_OVERRIDE |
46 { | 48 { |
47 return itemsCount_; | 49 return itemsCount_; |
48 } | 50 } |
49 | 51 |
50 virtual void Sort(std::vector<unsigned int>& target, | 52 virtual void Sort(std::vector<unsigned int>& target, |
51 unsigned int current); | 53 unsigned int current) ORTHANC_OVERRIDE; |
52 }; | 54 }; |
53 } | 55 } |