changeset 1297:501432928727

refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 06 Feb 2015 14:35:56 +0100
parents 179a3049b942
children cf9779324cbf
files OrthancServer/ServerIndex.cpp OrthancServer/ServerIndex.h Plugins/Engine/PluginsManager.cpp Plugins/Include/OrthancCPlugin.h
diffstat 4 files changed, 14 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/ServerIndex.cpp	Fri Feb 06 14:23:14 2015 +0100
+++ b/OrthancServer/ServerIndex.cpp	Fri Feb 06 14:35:56 2015 +0100
@@ -441,6 +441,15 @@
   }
 
 
+  void ServerIndex::LogChange(int64_t internalId,
+                              ChangeType changeType,
+                              ResourceType resourceType,
+                              const std::string& publicId)
+  {
+    ServerIndexChange change(changeType, resourceType, publicId);
+    db_.LogChange(internalId, change);
+  }
+
 
   uint64_t ServerIndex::IncrementGlobalSequenceInternal(GlobalProperty property)
   {
--- a/OrthancServer/ServerIndex.h	Fri Feb 06 14:23:14 2015 +0100
+++ b/OrthancServer/ServerIndex.h	Fri Feb 06 14:35:56 2015 +0100
@@ -110,11 +110,7 @@
     void LogChange(int64_t internalId,
                    ChangeType changeType,
                    ResourceType resourceType,
-                   const std::string& publicId)
-    {
-      ServerIndexChange change(changeType, resourceType, publicId);
-      db_.LogChange(internalId, change);
-    }
+                   const std::string& publicId);
 
     uint64_t IncrementGlobalSequenceInternal(GlobalProperty property);
 
--- a/Plugins/Engine/PluginsManager.cpp	Fri Feb 06 14:23:14 2015 +0100
+++ b/Plugins/Engine/PluginsManager.cpp	Fri Feb 06 14:35:56 2015 +0100
@@ -296,16 +296,10 @@
         {
           LOG(INFO) << "Found a shared library: " << it->path();
 
-          try
+          SharedLibrary plugin(path);
+          if (IsOrthancPlugin(plugin))
           {
-            SharedLibrary plugin(path);
-            if (IsOrthancPlugin(plugin))
-            {
-              RegisterPlugin(path);
-            }
-          }
-          catch (OrthancException&)
-          {
+            RegisterPlugin(path);
           }
         }
       }
--- a/Plugins/Include/OrthancCPlugin.h	Fri Feb 06 14:23:14 2015 +0100
+++ b/Plugins/Include/OrthancCPlugin.h	Fri Feb 06 14:35:56 2015 +0100
@@ -525,7 +525,7 @@
 
 
   /**
-   * @brief Opaque structure that contains information about the Orthanc core.
+   * @brief Data structure that contains information about the Orthanc core.
    **/
   typedef struct _OrthancPluginContext_t
   {
@@ -2078,8 +2078,6 @@
   }
 
 
-
-
 #ifdef  __cplusplus
 }
 #endif