comparison OrthancServer/Sources/Database/FindRequest.h @ 5583:74cc31c8db2b find-refactoring

removed FindResponse::Item::responseContent_
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 27 Apr 2024 22:15:37 +0200
parents 5a13483d12c5
children 0f5586c498d1
comparison
equal deleted inserted replaced
5582:17da828f9443 5583:74cc31c8db2b
78 }; 78 };
79 79
80 80
81 class Key 81 class Key
82 { 82 {
83 private:
83 KeyType type_; 84 KeyType type_;
84 boost::shared_ptr<DicomTag> dicomTag_; 85 boost::shared_ptr<DicomTag> dicomTag_;
85 MetadataType metadata_; 86 MetadataType metadata_;
86 87
87 // TODO-FIND: to execute the query, we actually need: 88 // TODO-FIND: to execute the query, we actually need:
88 // ResourceType level_; 89 // ResourceType level_;
89 // DicomTagType dicomTagType_; 90 // DicomTagType dicomTagType_;
90 // these are however only populated in StatelessDatabaseOperations -> we had to add the normalized lookup arg to ExecuteFind 91 // these are however only populated in StatelessDatabaseOperations -> we had to add the normalized lookup arg to ExecuteFind
91 92
92 public: 93 public:
93 Key(const DicomTag& dicomTag) : 94 explicit Key(const DicomTag& dicomTag) :
94 type_(KeyType_DicomTag), 95 type_(KeyType_DicomTag),
95 dicomTag_(new DicomTag(dicomTag)), 96 dicomTag_(new DicomTag(dicomTag)),
96 metadata_(MetadataType_EndUser) 97 metadata_(MetadataType_EndUser)
97 { 98 {
98 } 99 }
99 100
100 Key(MetadataType metadata) : 101 explicit Key(MetadataType metadata) :
101 type_(KeyType_Metadata), 102 type_(KeyType_Metadata),
102 metadata_(metadata) 103 metadata_(metadata)
103 { 104 {
104 } 105 }
105 106
121 } 122 }
122 }; 123 };
123 124
124 class Ordering : public boost::noncopyable 125 class Ordering : public boost::noncopyable
125 { 126 {
127 private:
126 OrderingDirection direction_; 128 OrderingDirection direction_;
127 Key key_; 129 Key key_;
128 130
129 public: 131 public:
130 Ordering(const Key& key, 132 Ordering(const Key& key,
132 direction_(direction), 134 direction_(direction),
133 key_(key) 135 key_(key)
134 { 136 {
135 } 137 }
136 138
137 public:
138 KeyType GetKeyType() const 139 KeyType GetKeyType() const
139 { 140 {
140 return key_.GetType(); 141 return key_.GetType();
141 } 142 }
142 143
352 bool retrieveInstanceTags_; 353 bool retrieveInstanceTags_;
353 354
354 bool IsCompatibleLevel(ResourceType levelOfInterest) const; 355 bool IsCompatibleLevel(ResourceType levelOfInterest) const;
355 356
356 public: 357 public:
357 FindRequest(ResourceType level); 358 explicit FindRequest(ResourceType level);
358 359
359 ~FindRequest(); 360 ~FindRequest();
360 361
361 ResourceType GetLevel() const 362 ResourceType GetLevel() const
362 { 363 {