changeset 3021:2cbafb5d5a62

renamed LookupResource::IVisitor as ServerContext::ILookupVisitor
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 15 Dec 2018 16:29:50 +0100
parents abe49ca61cd5
children 5db446c6b2dd c9c2faf76bec
files OrthancServer/OrthancFindRequestHandler.cpp OrthancServer/OrthancRestApi/OrthancRestResources.cpp OrthancServer/Search/LookupResource.h OrthancServer/ServerContext.cpp OrthancServer/ServerContext.h
diffstat 5 files changed, 23 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/OrthancFindRequestHandler.cpp	Fri Dec 14 12:10:03 2018 +0100
+++ b/OrthancServer/OrthancFindRequestHandler.cpp	Sat Dec 15 16:29:50 2018 +0100
@@ -472,7 +472,7 @@
   }
 
 
-  class OrthancFindRequestHandler::LookupVisitor : public LookupResource::IVisitor
+  class OrthancFindRequestHandler::LookupVisitor : public ServerContext::ILookupVisitor
   {
   private:
     DicomFindAnswers&           answers_;
--- a/OrthancServer/OrthancRestApi/OrthancRestResources.cpp	Fri Dec 14 12:10:03 2018 +0100
+++ b/OrthancServer/OrthancRestApi/OrthancRestResources.cpp	Sat Dec 15 16:29:50 2018 +0100
@@ -1271,7 +1271,7 @@
 
   namespace 
   {
-    class FindVisitor : public LookupResource::IVisitor
+    class FindVisitor : public ServerContext::ILookupVisitor
     {
     private:
       bool                    isComplete_;
--- a/OrthancServer/Search/LookupResource.h	Fri Dec 14 12:10:03 2018 +0100
+++ b/OrthancServer/Search/LookupResource.h	Sat Dec 15 16:29:50 2018 +0100
@@ -84,23 +84,6 @@
                     IDatabaseWrapper& database) const;
 
   public:
-    class IVisitor : public boost::noncopyable
-    {
-    public:
-      virtual ~IVisitor()
-      {
-      }
-
-      virtual bool IsDicomAsJsonNeeded() const = 0;
-      
-      virtual void MarkAsComplete() = 0;
-
-      virtual void Visit(const std::string& publicId,
-                         const std::string& instanceId,
-                         const DicomMap& mainDicomTags,
-                         const Json::Value* dicomAsJson) = 0;
-    };
-
     LookupResource(ResourceType level);
 
     ~LookupResource();
--- a/OrthancServer/ServerContext.cpp	Fri Dec 14 12:10:03 2018 +0100
+++ b/OrthancServer/ServerContext.cpp	Sat Dec 15 16:29:50 2018 +0100
@@ -773,7 +773,7 @@
   }
 
 
-  void ServerContext::Apply(LookupResource::IVisitor& visitor,
+  void ServerContext::Apply(ILookupVisitor& visitor,
                             const ::Orthanc::LookupResource& lookup,
                             size_t since,
                             size_t limit)
--- a/OrthancServer/ServerContext.h	Fri Dec 14 12:10:03 2018 +0100
+++ b/OrthancServer/ServerContext.h	Sat Dec 15 16:29:50 2018 +0100
@@ -63,6 +63,25 @@
    **/
   class ServerContext : private JobsRegistry::IObserver
   {
+  public:
+    class ILookupVisitor : public boost::noncopyable
+    {
+    public:
+      virtual ~ILookupVisitor()
+      {
+      }
+
+      virtual bool IsDicomAsJsonNeeded() const = 0;
+      
+      virtual void MarkAsComplete() = 0;
+
+      virtual void Visit(const std::string& publicId,
+                         const std::string& instanceId,
+                         const DicomMap& mainDicomTags,
+                         const Json::Value* dicomAsJson) = 0;
+    };
+    
+    
   private:
     enum LookupMode
     {
@@ -343,7 +362,7 @@
 
     void Stop();
 
-    void Apply(LookupResource::IVisitor& visitor,
+    void Apply(ILookupVisitor& visitor,
                const ::Orthanc::LookupResource& lookup,
                size_t since,
                size_t limit);