diff 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
line wrap: on
line diff
--- a/OrthancServer/Database/ResourcesContent.h	Sun Jan 06 12:43:19 2019 +0100
+++ b/OrthancServer/Database/ResourcesContent.h	Mon Jan 07 16:13:16 2019 +0100
@@ -36,11 +36,10 @@
 #include "../../Core/DicomFormat/DicomMap.h"
 #include "../ServerEnumerations.h"
 
-#include <orthanc/OrthancCDatabasePlugin.h>
-
 #include <boost/noncopyable.hpp>
 #include <list>
 
+
 namespace Orthanc
 {
   namespace Compatibility
@@ -50,7 +49,7 @@
   
   class ResourcesContent : public boost::noncopyable
   {
-  private:
+  public:
     struct TagValue
     {
       int64_t      resourceId_;
@@ -86,8 +85,12 @@
       }
     };
 
-    std::list<TagValue>  tags_;
-    std::list<Metadata>  metadata_;
+    typedef std::list<TagValue>  ListTags;
+    typedef std::list<Metadata>  ListMetadata;
+    
+  private:
+    ListTags       tags_;
+    ListMetadata   metadata_;
 
   public:
     void AddMainDicomTag(int64_t resourceId,
@@ -118,11 +121,14 @@
     // WARNING: The database should be locked with a transaction!
     void Store(Compatibility::ISetResourcesContent& target) const;
 
-    // WARNING: The resulting C structure will contain pointers to the
-    // current object. Don't delete or modify it!
-    void EncodeForPlugins(
-      std::vector<OrthancPluginResourcesContentTags>& identifierTags,
-      std::vector<OrthancPluginResourcesContentTags>& mainDicomTags,
-      std::vector<OrthancPluginResourcesContentMetadata>& metadata) const;
+    const ListTags& GetListTags() const
+    {
+      return tags_;
+    }
+
+    const ListMetadata& GetListMetadata() const
+    {
+      return metadata_;
+    }
   };
 }