Mercurial > hg > orthanc
annotate OrthancServer/Sources/Database/FindResponse.h @ 5565:def06a42e5ef find-refactoring
Updated FindRequest & FindResponse definitions
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Tue, 23 Apr 2024 13:07:38 +0200 |
parents | 12d8a1a266e9 |
children | b0b5546f1b9f |
rev | line source |
---|---|
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 /** |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 * Orthanc - A Lightweight, RESTful DICOM Store |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 * Copyright (C) 2017-2024 Osimis S.A., Belgium |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 * |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 * This program is free software: you can redistribute it and/or |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 * modify it under the terms of the GNU General Public License as |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 * published by the Free Software Foundation, either version 3 of the |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 * License, or (at your option) any later version. |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 * |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 * This program is distributed in the hope that it will be useful, but |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 * WITHOUT ANY WARRANTY; without even the implied warranty of |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 * General Public License for more details. |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 * |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 * You should have received a copy of the GNU General Public License |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 **/ |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 #pragma once |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 #include "../../../OrthancFramework/Sources/DicomFormat/DicomMap.h" |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 #include "../ServerEnumerations.h" |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 #include "OrthancIdentifiers.h" |
5565
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
28 #include "FindRequest.h" |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 #include <boost/noncopyable.hpp> |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 #include <deque> |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 #include <map> |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 #include <set> |
5565
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
34 #include <list> |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 namespace Orthanc |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 { |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 class FindResponse : public boost::noncopyable |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 { |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 public: |
5565
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
42 class StringWithRevision |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
43 { |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
44 private: |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
45 std::string value_; |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
46 int64_t revision_; |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
47 public: |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
48 StringWithRevision(const std::string& value, |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
49 int64_t revision) : |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
50 value_(value), |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
51 revision_(revision) |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
52 { |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
53 } |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
54 |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
55 StringWithRevision(const StringWithRevision& other) : |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
56 value_(other.value_), |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
57 revision_(other.revision_) |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
58 { |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
59 } |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
60 |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
61 StringWithRevision() : |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
62 revision_(-1) |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
63 { |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
64 } |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
65 |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
66 const std::string& GetValue() const |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
67 { |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
68 return value_; |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
69 } |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
70 |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
71 int64_t GetRevision() const |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
72 { |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
73 return revision_; |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
74 } |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
75 }; |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
76 |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
77 |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
78 class Item : public boost::noncopyable |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
79 { |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
80 private: |
5565
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
81 FindRequest::ResponseContent responseContent_; // what has been requested |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
82 ResourceType level_; |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
83 OrthancIdentifiers identifiers_; |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
84 std::unique_ptr<DicomMap> dicomMap_; |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
85 std::list<std::string> children_; |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
86 std::string childInstanceId_; |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
87 std::list<std::string> labels_; |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
88 std::map<MetadataType, StringWithRevision> metadata_; |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
89 std::map<uint16_t, StringWithRevision> attachments_; |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
90 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
91 public: |
5565
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
92 Item(FindRequest::ResponseContent responseContent, |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
93 ResourceType level, |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
94 const OrthancIdentifiers& identifiers) : |
5565
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
95 responseContent_(responseContent), |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
96 level_(level), |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
97 identifiers_(identifiers) |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
98 { |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
99 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
100 |
5565
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
101 Item(FindRequest::ResponseContent responseContent, |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
102 ResourceType level, |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
103 DicomMap* dicomMap /* takes ownership */); |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
104 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
105 ResourceType GetLevel() const |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
106 { |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
107 return level_; |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
108 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
109 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
110 const OrthancIdentifiers& GetIdentifiers() const |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
111 { |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
112 return identifiers_; |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
113 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
114 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
115 void AddMetadata(MetadataType metadata, |
5565
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
116 const std::string& value, |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
117 int64_t revision); |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
118 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
119 bool HasMetadata(MetadataType metadata) const |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
120 { |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
121 return metadata_.find(metadata) != metadata_.end(); |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
122 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
123 |
5565
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
124 bool LookupMetadata(std::string& value, int64_t revision, |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
125 MetadataType metadata) const; |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
126 |
5565
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
127 void ListMetadata(std::set<MetadataType>& metadata) const; |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
128 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
129 bool HasDicomMap() const |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
130 { |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
131 return dicomMap_.get() != NULL; |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
132 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
133 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
134 const DicomMap& GetDicomMap() const; |
5565
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
135 |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
136 |
def06a42e5ef
Updated FindRequest & FindResponse definitions
Alain Mazy <am@orthanc.team>
parents:
5554
diff
changeset
|
137 // TODO: add other getters and setters |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
138 }; |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
139 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
140 private: |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
141 std::deque<Item*> items_; |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
142 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
143 public: |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
144 ~FindResponse(); |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
145 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
146 void Add(Item* item /* takes ownership */); |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
147 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
148 size_t GetSize() const |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
149 { |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
150 return items_.size(); |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
151 } |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
152 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
153 const Item& GetItem(size_t index) const; |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
154 }; |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
155 } |