Mercurial > hg > orthanc-databases
annotate Framework/Plugins/IdentifierTag.h @ 447:5881e4af5799 pg-transactions
measure DB latency
author | Alain Mazy <am@osimis.io> |
---|---|
date | Mon, 15 Jan 2024 18:27:20 +0100 |
parents | 91124cc8a8c7 |
children | ecd0b719cff5 |
rev | line source |
---|---|
403
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 /** |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 * Orthanc - A Lightweight, RESTful DICOM Store |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 * |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 * This program is free software: you can redistribute it and/or |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 * modify it under the terms of the GNU Affero General Public License |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 * as published by the Free Software Foundation, either version 3 of |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 * the License, or (at your option) any later version. |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 * |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 * This program is distributed in the hope that it will be useful, but |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 * WITHOUT ANY WARRANTY; without even the implied warranty of |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 * Affero General Public License for more details. |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 * |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 * You should have received a copy of the GNU Affero General Public License |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 **/ |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 #pragma once |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 #include <DicomFormat/DicomTag.h> |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 namespace OrthancDatabases |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 { |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 class IdentifierTag |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 { |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 private: |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 Orthanc::ResourceType level_; |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 Orthanc::DicomTag tag_; |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 std::string name_; |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 public: |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 IdentifierTag(Orthanc::ResourceType level, |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 const Orthanc::DicomTag& tag, |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 const std::string& name) : |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 level_(level), |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 tag_(tag), |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 name_(name) |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 { |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 } |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
46 |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 Orthanc::ResourceType GetLevel() const |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 { |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 return level_; |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 } |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 const Orthanc::DicomTag& GetTag() const |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 { |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 return tag_; |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
55 } |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
56 |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
57 const std::string& GetName() const |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
58 { |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
59 return name_; |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
60 } |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
61 }; |
91124cc8a8c7
database plugins are informed about the identifier tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
62 } |