diff Plugins/Samples/Common/OrthancPluginCppWrapper.cpp @ 2167:aa2915963531

"Folders" sub-configuration in ServeFolders
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 22 Nov 2016 14:19:42 +0100
parents 82461d1e8e17
children fead5549aaa7
line wrap: on
line diff
--- a/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp	Tue Nov 22 13:38:20 2016 +0100
+++ b/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp	Tue Nov 22 14:19:42 2016 +0100
@@ -368,6 +368,15 @@
   }
 
 
+  bool OrthancConfiguration::IsSection(const std::string& key) const
+  {
+    assert(configuration_.type() == Json::objectValue);
+
+    return (configuration_.isMember(key) &&
+            configuration_[key].type() == Json::objectValue);
+  }
+
+
   void OrthancConfiguration::GetSection(OrthancConfiguration& target,
                                         const std::string& key) const
   {