changeset 243:f5dc59c56e65

simplification
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 13 Apr 2021 17:53:53 +0200
parents b97a537f4613
children 02cd7254c949
files Framework/Common/BinaryStringValue.cpp Framework/Common/BinaryStringValue.h Framework/Common/FileValue.cpp Framework/Common/FileValue.h Framework/Common/IValue.h Framework/Common/Integer64Value.cpp Framework/Common/Integer64Value.h Framework/Common/NullValue.h Framework/Common/Utf8StringValue.h MySQL/NEWS PostgreSQL/NEWS
diffstat 11 files changed, 2 insertions(+), 70 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Common/BinaryStringValue.cpp	Tue Apr 13 17:00:02 2021 +0200
+++ b/Framework/Common/BinaryStringValue.cpp	Tue Apr 13 17:53:53 2021 +0200
@@ -44,10 +44,4 @@
         throw Orthanc::OrthancException(Orthanc::ErrorCode_BadParameterType);
     }
   }
-
-
-  std::string BinaryStringValue::Format() const
-  {
-    return "(binary - " + boost::lexical_cast<std::string>(content_.size()) + " bytes)";
-  }
 }
--- a/Framework/Common/BinaryStringValue.h	Tue Apr 13 17:00:02 2021 +0200
+++ b/Framework/Common/BinaryStringValue.h	Tue Apr 13 17:53:53 2021 +0200
@@ -33,26 +33,11 @@
     std::string  content_;
 
   public:
-    explicit BinaryStringValue()
-    {
-    }
-
     explicit BinaryStringValue(const std::string& content) :
       content_(content)
     {
     }
 
-    BinaryStringValue(const void* content,
-                      size_t size)
-    {
-      content_.assign(reinterpret_cast<const char*>(content), size);
-    }
-
-    std::string& GetContent()
-    {
-      return content_;
-    }
-
     const std::string& GetContent() const
     {
       return content_;
@@ -74,7 +59,5 @@
     }
     
     virtual IValue* Convert(ValueType target) const ORTHANC_OVERRIDE;
-
-    virtual std::string Format() const ORTHANC_OVERRIDE;
   };
 }
--- a/Framework/Common/FileValue.cpp	Tue Apr 13 17:00:02 2021 +0200
+++ b/Framework/Common/FileValue.cpp	Tue Apr 13 17:53:53 2021 +0200
@@ -44,9 +44,4 @@
         throw Orthanc::OrthancException(Orthanc::ErrorCode_BadParameterType);
     }
   }
-
-  std::string FileValue::Format() const
-  {
-    return "(file - " + boost::lexical_cast<std::string>(content_.size()) + " bytes)";
-  }
 }
--- a/Framework/Common/FileValue.h	Tue Apr 13 17:00:02 2021 +0200
+++ b/Framework/Common/FileValue.h	Tue Apr 13 17:53:53 2021 +0200
@@ -48,16 +48,6 @@
       content_.assign(reinterpret_cast<const char*>(buffer), size);
     }
     
-    void SwapContent(std::string& content)
-    {
-      content_.swap(content);
-    }
-
-    void SetContent(const std::string& content)
-    {
-      content_ = content;
-    }
-
     std::string& GetContent()
     {
       return content_;
@@ -84,7 +74,5 @@
     }
     
     virtual IValue* Convert(ValueType target) const ORTHANC_OVERRIDE;
-
-    virtual std::string Format() const ORTHANC_OVERRIDE;
   };
 }
--- a/Framework/Common/IValue.h	Tue Apr 13 17:00:02 2021 +0200
+++ b/Framework/Common/IValue.h	Tue Apr 13 17:53:53 2021 +0200
@@ -38,7 +38,5 @@
     virtual ValueType GetType() const = 0;
 
     virtual IValue* Convert(ValueType target) const = 0;
-
-    virtual std::string Format() const = 0;
   };
 }
--- a/Framework/Common/Integer64Value.cpp	Tue Apr 13 17:00:02 2021 +0200
+++ b/Framework/Common/Integer64Value.cpp	Tue Apr 13 17:53:53 2021 +0200
@@ -54,9 +54,4 @@
         throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange);
     }
   }
-
-  std::string Integer64Value::Format() const
-  {
-    return boost::lexical_cast<std::string>(value_);
-  }
 }
--- a/Framework/Common/Integer64Value.h	Tue Apr 13 17:00:02 2021 +0200
+++ b/Framework/Common/Integer64Value.h	Tue Apr 13 17:53:53 2021 +0200
@@ -51,7 +51,5 @@
     }
     
     virtual IValue* Convert(ValueType target) const ORTHANC_OVERRIDE;
-
-    virtual std::string Format() const ORTHANC_OVERRIDE;
   };
 }
--- a/Framework/Common/NullValue.h	Tue Apr 13 17:00:02 2021 +0200
+++ b/Framework/Common/NullValue.h	Tue Apr 13 17:53:53 2021 +0200
@@ -36,10 +36,5 @@
     }
 
     virtual IValue* Convert(ValueType target) const ORTHANC_OVERRIDE;
-
-    virtual std::string Format() const ORTHANC_OVERRIDE
-    {
-      return "(null)";
-    }
   };
 }
--- a/Framework/Common/Utf8StringValue.h	Tue Apr 13 17:00:02 2021 +0200
+++ b/Framework/Common/Utf8StringValue.h	Tue Apr 13 17:53:53 2021 +0200
@@ -34,20 +34,11 @@
     std::string  utf8_;
 
   public:
-    explicit Utf8StringValue()
-    {
-    }
-
     explicit Utf8StringValue(const std::string& utf8) :
       utf8_(utf8)
     {
     }
 
-    explicit Utf8StringValue(const char* utf8) :
-      utf8_(utf8)
-    {
-    }
-
     const std::string& GetContent() const
     {
       return utf8_;
@@ -59,10 +50,5 @@
     }
     
     virtual IValue* Convert(ValueType target) const ORTHANC_OVERRIDE;
-
-    virtual std::string Format() const ORTHANC_OVERRIDE
-    {
-      return "[" + utf8_ + "]";
-    }
   };
 }
--- a/MySQL/NEWS	Tue Apr 13 17:00:02 2021 +0200
+++ b/MySQL/NEWS	Tue Apr 13 17:53:53 2021 +0200
@@ -1,7 +1,7 @@
 Pending changes in the mainline
 ===============================
 
-* Support of retries for collisions between multiple writers, from Orthanc SDK 1.9.2
+* Support of multiple readers/writers, by handling retries in Orthanc SDK 1.9.2
 * Support of range reads for the storage area, from Orthanc SDK 1.9.0
 
 
--- a/PostgreSQL/NEWS	Tue Apr 13 17:00:02 2021 +0200
+++ b/PostgreSQL/NEWS	Tue Apr 13 17:53:53 2021 +0200
@@ -1,7 +1,7 @@
 Pending changes in the mainline
 ===============================
 
-* Support of retries for collisions between multiple writers, from Orthanc SDK 1.9.2
+* Support of multiple readers/writers, by handling retries in Orthanc SDK 1.9.2
 * Support of "OrthancPluginRegisterStorageArea2()" from Orthanc SDK 1.9.0