Mercurial > hg > orthanc
comparison OrthancServer/Database/ResourcesContent.h @ 3099:9c71abbff70f db-changes
removing build dependency on plugins
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 07 Jan 2019 16:13:16 +0100 |
parents | 61da3c9b4121 |
children | 94f4a18a79cc |
comparison
equal
deleted
inserted
replaced
3098:717efd0989f9 | 3099:9c71abbff70f |
---|---|
34 #pragma once | 34 #pragma once |
35 | 35 |
36 #include "../../Core/DicomFormat/DicomMap.h" | 36 #include "../../Core/DicomFormat/DicomMap.h" |
37 #include "../ServerEnumerations.h" | 37 #include "../ServerEnumerations.h" |
38 | 38 |
39 #include <orthanc/OrthancCDatabasePlugin.h> | |
40 | |
41 #include <boost/noncopyable.hpp> | 39 #include <boost/noncopyable.hpp> |
42 #include <list> | 40 #include <list> |
41 | |
43 | 42 |
44 namespace Orthanc | 43 namespace Orthanc |
45 { | 44 { |
46 namespace Compatibility | 45 namespace Compatibility |
47 { | 46 { |
48 class ISetResourcesContent; | 47 class ISetResourcesContent; |
49 } | 48 } |
50 | 49 |
51 class ResourcesContent : public boost::noncopyable | 50 class ResourcesContent : public boost::noncopyable |
52 { | 51 { |
53 private: | 52 public: |
54 struct TagValue | 53 struct TagValue |
55 { | 54 { |
56 int64_t resourceId_; | 55 int64_t resourceId_; |
57 bool isIdentifier_; | 56 bool isIdentifier_; |
58 DicomTag tag_; | 57 DicomTag tag_; |
84 value_(value) | 83 value_(value) |
85 { | 84 { |
86 } | 85 } |
87 }; | 86 }; |
88 | 87 |
89 std::list<TagValue> tags_; | 88 typedef std::list<TagValue> ListTags; |
90 std::list<Metadata> metadata_; | 89 typedef std::list<Metadata> ListMetadata; |
90 | |
91 private: | |
92 ListTags tags_; | |
93 ListMetadata metadata_; | |
91 | 94 |
92 public: | 95 public: |
93 void AddMainDicomTag(int64_t resourceId, | 96 void AddMainDicomTag(int64_t resourceId, |
94 const DicomTag& tag, | 97 const DicomTag& tag, |
95 const std::string& value) | 98 const std::string& value) |
116 const DicomMap& dicomSummary); | 119 const DicomMap& dicomSummary); |
117 | 120 |
118 // WARNING: The database should be locked with a transaction! | 121 // WARNING: The database should be locked with a transaction! |
119 void Store(Compatibility::ISetResourcesContent& target) const; | 122 void Store(Compatibility::ISetResourcesContent& target) const; |
120 | 123 |
121 // WARNING: The resulting C structure will contain pointers to the | 124 const ListTags& GetListTags() const |
122 // current object. Don't delete or modify it! | 125 { |
123 void EncodeForPlugins( | 126 return tags_; |
124 std::vector<OrthancPluginResourcesContentTags>& identifierTags, | 127 } |
125 std::vector<OrthancPluginResourcesContentTags>& mainDicomTags, | 128 |
126 std::vector<OrthancPluginResourcesContentMetadata>& metadata) const; | 129 const ListMetadata& GetListMetadata() const |
130 { | |
131 return metadata_; | |
132 } | |
127 }; | 133 }; |
128 } | 134 } |