Mercurial > hg > orthanc
comparison OrthancServer/Database/ResourcesContent.cpp @ 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 |
---|---|
60 it = metadata_.begin(); it != metadata_.end(); ++it) | 60 it = metadata_.begin(); it != metadata_.end(); ++it) |
61 { | 61 { |
62 compatibility.SetMetadata(it->resourceId_, it->metadata_, it->value_); | 62 compatibility.SetMetadata(it->resourceId_, it->metadata_, it->value_); |
63 } | 63 } |
64 } | 64 } |
65 | |
66 | |
67 void ResourcesContent::EncodeForPlugins( | |
68 std::vector<OrthancPluginResourcesContentTags>& identifierTags, | |
69 std::vector<OrthancPluginResourcesContentTags>& mainDicomTags, | |
70 std::vector<OrthancPluginResourcesContentMetadata>& metadata) const | |
71 { | |
72 identifierTags.reserve(tags_.size()); | |
73 mainDicomTags.reserve(tags_.size()); | |
74 metadata.reserve(metadata_.size()); | |
75 | |
76 for (std::list<TagValue>::const_iterator | |
77 it = tags_.begin(); it != tags_.end(); ++it) | |
78 { | |
79 OrthancPluginResourcesContentTags tmp; | |
80 tmp.resource = it->resourceId_; | |
81 tmp.group = it->tag_.GetGroup(); | |
82 tmp.element = it->tag_.GetElement(); | |
83 tmp.value = it->value_.c_str(); | |
84 | |
85 if (it->isIdentifier_) | |
86 { | |
87 identifierTags.push_back(tmp); | |
88 } | |
89 else | |
90 { | |
91 mainDicomTags.push_back(tmp); | |
92 } | |
93 } | |
94 | |
95 for (std::list<Metadata>::const_iterator | |
96 it = metadata_.begin(); it != metadata_.end(); ++it) | |
97 { | |
98 OrthancPluginResourcesContentMetadata tmp; | |
99 tmp.resource = it->resourceId_; | |
100 tmp.metadata = it->metadata_; | |
101 tmp.value = it->value_.c_str(); | |
102 metadata.push_back(tmp); | |
103 } | |
104 | |
105 assert(identifierTags.size() + mainDicomTags.size() == tags_.size() && | |
106 metadata.size() == metadata_.size()); | |
107 } | |
108 } | 65 } |