changeset 4296:3b70a2e6a06c

moving inline methods to source files for ABI compatibility
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 05 Nov 2020 15:52:28 +0100
parents 90f91b78d708
children 785a2713323e
files OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake OrthancFramework/Sources/Compression/GzipCompressor.cpp OrthancFramework/Sources/Compression/GzipCompressor.h OrthancFramework/Sources/Compression/HierarchicalZipWriter.cpp OrthancFramework/Sources/Compression/HierarchicalZipWriter.h OrthancFramework/Sources/Compression/IBufferCompressor.cpp OrthancFramework/Sources/Compression/IBufferCompressor.h OrthancFramework/Sources/Compression/ZipWriter.cpp OrthancFramework/Sources/Compression/ZipWriter.h OrthancFramework/Sources/Compression/ZlibCompressor.cpp OrthancFramework/Sources/Compression/ZlibCompressor.h OrthancFramework/Sources/DicomFormat/DicomArray.cpp OrthancFramework/Sources/DicomFormat/DicomArray.h OrthancFramework/Sources/DicomFormat/DicomInstanceHasher.cpp OrthancFramework/Sources/DicomFormat/DicomInstanceHasher.h OrthancFramework/Sources/DicomFormat/DicomMap.cpp OrthancFramework/Sources/DicomFormat/DicomMap.h OrthancFramework/Sources/DicomFormat/DicomValue.cpp OrthancFramework/Sources/DicomFormat/DicomValue.h OrthancFramework/Sources/DicomFormat/StreamBlockReader.cpp OrthancFramework/Sources/DicomFormat/StreamBlockReader.h OrthancFramework/Sources/DicomNetworking/DicomAssociationParameters.cpp OrthancFramework/Sources/DicomNetworking/DicomAssociationParameters.h OrthancFramework/Sources/DicomNetworking/DicomFindAnswers.cpp OrthancFramework/Sources/DicomNetworking/DicomFindAnswers.h OrthancFramework/Sources/DicomNetworking/DicomStoreUserConnection.cpp OrthancFramework/Sources/DicomNetworking/DicomStoreUserConnection.h OrthancFramework/Sources/DicomNetworking/RemoteModalityParameters.cpp OrthancFramework/Sources/DicomNetworking/RemoteModalityParameters.h OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp OrthancFramework/Sources/DicomParsing/ParsedDicomFile.h
diffstat 31 files changed, 527 insertions(+), 333 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake	Thu Nov 05 15:52:28 2020 +0100
@@ -363,6 +363,7 @@
   list(APPEND ORTHANC_CORE_SOURCES_INTERNAL
     ${CMAKE_CURRENT_LIST_DIR}/../../Sources/Compression/DeflateBaseCompressor.cpp
     ${CMAKE_CURRENT_LIST_DIR}/../../Sources/Compression/GzipCompressor.cpp
+    ${CMAKE_CURRENT_LIST_DIR}/../../Sources/Compression/IBufferCompressor.cpp
     ${CMAKE_CURRENT_LIST_DIR}/../../Sources/Compression/ZlibCompressor.cpp
     )
 
--- a/OrthancFramework/Sources/Compression/GzipCompressor.cpp	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/Compression/GzipCompressor.cpp	Thu Nov 05 15:52:28 2020 +0100
@@ -75,6 +75,11 @@
   }
 
 
+  Orthanc::GzipCompressor::GzipCompressor()
+  {
+    SetPrefixWithUncompressedSize(false);
+  }
+
 
   void GzipCompressor::Compress(std::string& compressed,
                                 const void* uncompressed,
--- a/OrthancFramework/Sources/Compression/GzipCompressor.h	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/Compression/GzipCompressor.h	Thu Nov 05 15:52:28 2020 +0100
@@ -34,10 +34,7 @@
                                    size_t compressedSize);
 
   public:
-    GzipCompressor()
-    {
-      SetPrefixWithUncompressedSize(false);
-    }
+    GzipCompressor();
 
     virtual void Compress(std::string& compressed,
                           const void* uncompressed,
--- a/OrthancFramework/Sources/Compression/HierarchicalZipWriter.cpp	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/Compression/HierarchicalZipWriter.cpp	Thu Nov 05 15:52:28 2020 +0100
@@ -153,6 +153,36 @@
     writer_.Close();
   }
 
+  void Orthanc::HierarchicalZipWriter::SetZip64(bool isZip64)
+  {
+    writer_.SetZip64(isZip64);
+  }
+
+  bool HierarchicalZipWriter::IsZip64() const
+  {
+    return writer_.IsZip64();
+  }
+
+  void HierarchicalZipWriter::SetCompressionLevel(uint8_t level)
+  {
+    writer_.SetCompressionLevel(level);
+  }
+
+  uint8_t HierarchicalZipWriter::GetCompressionLevel() const
+  {
+    return writer_.GetCompressionLevel();
+  }
+
+  void HierarchicalZipWriter::SetAppendToExisting(bool append)
+  {
+    writer_.SetAppendToExisting(append);
+  }
+
+  bool HierarchicalZipWriter::IsAppendToExisting() const
+  {
+    return writer_.IsAppendToExisting();
+  }
+
   void HierarchicalZipWriter::OpenFile(const char* name)
   {
     std::string p = indexer_.OpenFile(name);
@@ -168,4 +198,19 @@
   {
     indexer_.CloseDirectory();
   }
+
+  std::string HierarchicalZipWriter::GetCurrentDirectoryPath() const
+  {
+    return indexer_.GetCurrentDirectoryPath();
+  }
+
+  void HierarchicalZipWriter::Write(const void *data, size_t length)
+  {
+    writer_.Write(data, length);
+  }
+
+  void HierarchicalZipWriter::Write(const std::string &data)
+  {
+    writer_.Write(data);
+  }
 }
--- a/OrthancFramework/Sources/Compression/HierarchicalZipWriter.h	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/Compression/HierarchicalZipWriter.h	Thu Nov 05 15:52:28 2020 +0100
@@ -88,35 +88,17 @@
 
     ~HierarchicalZipWriter();
 
-    void SetZip64(bool isZip64)
-    {
-      writer_.SetZip64(isZip64);
-    }
+    void SetZip64(bool isZip64);
 
-    bool IsZip64() const
-    {
-      return writer_.IsZip64();
-    }
+    bool IsZip64() const;
 
-    void SetCompressionLevel(uint8_t level)
-    {
-      writer_.SetCompressionLevel(level);
-    }
+    void SetCompressionLevel(uint8_t level);
 
-    uint8_t GetCompressionLevel() const
-    {
-      return writer_.GetCompressionLevel();
-    }
+    uint8_t GetCompressionLevel() const;
 
-    void SetAppendToExisting(bool append)
-    {
-      writer_.SetAppendToExisting(append);
-    }
+    void SetAppendToExisting(bool append);
     
-    bool IsAppendToExisting() const
-    {
-      return writer_.IsAppendToExisting();
-    }
+    bool IsAppendToExisting() const;
     
     void OpenFile(const char* name);
 
@@ -124,19 +106,10 @@
 
     void CloseDirectory();
 
-    std::string GetCurrentDirectoryPath() const
-    {
-      return indexer_.GetCurrentDirectoryPath();
-    }
+    std::string GetCurrentDirectoryPath() const;
 
-    void Write(const void* data, size_t length)
-    {
-      writer_.Write(data, length);
-    }
+    void Write(const void* data, size_t length);
 
-    void Write(const std::string& data)
-    {
-      writer_.Write(data);
-    }
+    void Write(const std::string& data);
   };
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OrthancFramework/Sources/Compression/IBufferCompressor.cpp	Thu Nov 05 15:52:28 2020 +0100
@@ -0,0 +1,46 @@
+/**
+ * Orthanc - A Lightweight, RESTful DICOM Store
+ * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
+ * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017-2020 Osimis S.A., Belgium
+ *
+ * This program is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation, either version 3 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/>.
+ **/
+
+
+#include "../PrecompiledHeaders.h"
+#include "IBufferCompressor.h"
+
+
+namespace Orthanc
+{
+  void IBufferCompressor::Compress(std::string& compressed,
+                                   IBufferCompressor& compressor,
+                                   const std::string& uncompressed)
+  {
+    compressor.Compress(compressed, 
+                        uncompressed.size() == 0 ? NULL : uncompressed.c_str(), 
+                        uncompressed.size());
+  }
+
+  void IBufferCompressor::Uncompress(std::string& uncompressed,
+                                     IBufferCompressor& compressor,
+                                     const std::string& compressed)
+  {
+    compressor.Uncompress(uncompressed, 
+                          compressed.size() == 0 ? NULL : compressed.c_str(), 
+                          compressed.size());
+  }
+}
--- a/OrthancFramework/Sources/Compression/IBufferCompressor.h	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/Compression/IBufferCompressor.h	Thu Nov 05 15:52:28 2020 +0100
@@ -46,20 +46,10 @@
 
     static void Compress(std::string& compressed,
                          IBufferCompressor& compressor,
-                         const std::string& uncompressed)
-    {
-      compressor.Compress(compressed, 
-                          uncompressed.size() == 0 ? NULL : uncompressed.c_str(), 
-                          uncompressed.size());
-    }
+                         const std::string& uncompressed);
 
     static void Uncompress(std::string& uncompressed,
                            IBufferCompressor& compressor,
-                           const std::string& compressed)
-    {
-      compressor.Uncompress(uncompressed, 
-                            compressed.size() == 0 ? NULL : compressed.c_str(), 
-                            compressed.size());
-    }
+                           const std::string& compressed);
   };
 }
--- a/OrthancFramework/Sources/Compression/ZipWriter.cpp	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/Compression/ZipWriter.cpp	Thu Nov 05 15:52:28 2020 +0100
@@ -148,6 +148,11 @@
     path_ = path;
   }
 
+  const std::string &ZipWriter::GetOutputPath() const
+  {
+    return path_;
+  }
+
   void ZipWriter::SetZip64(bool isZip64)
   {
     Close();
@@ -167,6 +172,11 @@
     compressionLevel_ = level;
   }
 
+  uint8_t ZipWriter::GetCompressionLevel() const
+  {
+    return compressionLevel_;
+  }
+
   void ZipWriter::OpenFile(const char* path)
   {
     Open();
@@ -248,4 +258,15 @@
     Close();
     append_ = append;
   }
+
+  bool ZipWriter::IsAppendToExisting() const
+  {
+    return append_;
+  }
+
+  bool Orthanc::ZipWriter::IsZip64() const
+  {
+    return isZip64_;
+  }
+
 }
--- a/OrthancFramework/Sources/Compression/ZipWriter.h	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/Compression/ZipWriter.h	Thu Nov 05 15:52:28 2020 +0100
@@ -59,24 +59,15 @@
 
     void SetZip64(bool isZip64);
 
-    bool IsZip64() const
-    {
-      return isZip64_;
-    }
+    bool IsZip64() const;
 
     void SetCompressionLevel(uint8_t level);
 
-    uint8_t GetCompressionLevel() const
-    {
-      return compressionLevel_;
-    }
+    uint8_t GetCompressionLevel() const;
 
     void SetAppendToExisting(bool append);
     
-    bool IsAppendToExisting() const
-    {
-      return append_;
-    }
+    bool IsAppendToExisting() const;
     
     void Open();
 
@@ -86,10 +77,7 @@
 
     void SetOutputPath(const char* path);
 
-    const std::string& GetOutputPath() const
-    {
-      return path_;
-    }
+    const std::string& GetOutputPath() const;
 
     void OpenFile(const char* path);
 
--- a/OrthancFramework/Sources/Compression/ZlibCompressor.cpp	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/Compression/ZlibCompressor.cpp	Thu Nov 05 15:52:28 2020 +0100
@@ -32,6 +32,11 @@
 
 namespace Orthanc
 {
+  Orthanc::ZlibCompressor::ZlibCompressor()
+  {
+    SetPrefixWithUncompressedSize(true);
+  }
+
   void ZlibCompressor::Compress(std::string& compressed,
                                 const void* uncompressed,
                                 size_t uncompressedSize)
--- a/OrthancFramework/Sources/Compression/ZlibCompressor.h	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/Compression/ZlibCompressor.h	Thu Nov 05 15:52:28 2020 +0100
@@ -30,10 +30,7 @@
   class ORTHANC_PUBLIC ZlibCompressor : public DeflateBaseCompressor
   {
   public:
-    ZlibCompressor()
-    {
-      SetPrefixWithUncompressedSize(true);
-    }
+    ZlibCompressor();
 
     virtual void Compress(std::string& compressed,
                           const void* uncompressed,
--- a/OrthancFramework/Sources/DicomFormat/DicomArray.cpp	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/DicomFormat/DicomArray.cpp	Thu Nov 05 15:52:28 2020 +0100
@@ -48,6 +48,18 @@
   }
 
 
+  size_t Orthanc::DicomArray::GetSize() const
+  {
+    return elements_.size();
+  }
+
+
+  const DicomElement &DicomArray::GetElement(size_t i) const
+  {
+    return *elements_[i];
+  }
+
+
   void DicomArray::Print(FILE* fp) const
   {
     for (size_t  i = 0; i < elements_.size(); i++)
--- a/OrthancFramework/Sources/DicomFormat/DicomArray.h	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/DicomFormat/DicomArray.h	Thu Nov 05 15:52:28 2020 +0100
@@ -41,15 +41,9 @@
 
     ~DicomArray();
 
-    size_t GetSize() const
-    {
-      return elements_.size();
-    }
+    size_t GetSize() const;
 
-    const DicomElement& GetElement(size_t i) const
-    {
-      return *elements_[i];
-    }
+    const DicomElement& GetElement(size_t i) const;
 
     void Print(FILE* fp) const;  // For debugging only
   };
--- a/OrthancFramework/Sources/DicomFormat/DicomInstanceHasher.cpp	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/DicomFormat/DicomInstanceHasher.cpp	Thu Nov 05 15:52:28 2020 +0100
@@ -56,6 +56,34 @@
           instance.GetValue(DICOM_TAG_SOP_INSTANCE_UID).GetContent());
   }
 
+  Orthanc::DicomInstanceHasher::DicomInstanceHasher(const std::string &patientId,
+                                                    const std::string &studyUid,
+                                                    const std::string &seriesUid,
+                                                    const std::string &instanceUid)
+  {
+    Setup(patientId, studyUid, seriesUid, instanceUid);
+  }
+
+  const std::string &DicomInstanceHasher::GetPatientId() const
+  {
+    return patientId_;
+  }
+
+  const std::string &DicomInstanceHasher::GetStudyUid() const
+  {
+    return studyUid_;
+  }
+
+  const std::string &DicomInstanceHasher::GetSeriesUid() const
+  {
+    return seriesUid_;
+  }
+
+  const std::string &DicomInstanceHasher::GetInstanceUid() const
+  {
+    return instanceUid_;
+  }
+
   const std::string& DicomInstanceHasher::HashPatient()
   {
     if (patientHash_.size() == 0)
--- a/OrthancFramework/Sources/DicomFormat/DicomInstanceHasher.h	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/DicomFormat/DicomInstanceHasher.h	Thu Nov 05 15:52:28 2020 +0100
@@ -60,30 +60,15 @@
     DicomInstanceHasher(const std::string& patientId,
                         const std::string& studyUid,
                         const std::string& seriesUid,
-                        const std::string& instanceUid)
-    {
-      Setup(patientId, studyUid, seriesUid, instanceUid);
-    }
+                        const std::string& instanceUid);
 
-    const std::string& GetPatientId() const
-    {
-      return patientId_;
-    }
+    const std::string& GetPatientId() const;
 
-    const std::string& GetStudyUid() const
-    {
-      return studyUid_;
-    }
+    const std::string& GetStudyUid() const;
 
-    const std::string& GetSeriesUid() const
-    {
-      return seriesUid_;
-    }
+    const std::string& GetSeriesUid() const;
 
-    const std::string& GetInstanceUid() const
-    {
-      return instanceUid_;
-    }
+    const std::string& GetInstanceUid() const;
 
     const std::string& HashPatient();
 
--- a/OrthancFramework/Sources/DicomFormat/DicomMap.cpp	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/DicomFormat/DicomMap.cpp	Thu Nov 05 15:52:28 2020 +0100
@@ -247,6 +247,51 @@
     content_.clear();
   }
 
+  void DicomMap::SetNullValue(uint16_t group, uint16_t element)
+  {
+    SetValueInternal(group, element, new DicomValue);
+  }
+
+  void DicomMap::SetNullValue(const DicomTag &tag)
+  {
+    SetValueInternal(tag.GetGroup(), tag.GetElement(), new DicomValue);
+  }
+
+  void DicomMap::SetValue(uint16_t group, uint16_t element, const DicomValue &value)
+  {
+    SetValueInternal(group, element, value.Clone());
+  }
+
+  void DicomMap::SetValue(const DicomTag &tag, const DicomValue &value)
+  {
+    SetValueInternal(tag.GetGroup(), tag.GetElement(), value.Clone());
+  }
+
+  void DicomMap::SetValue(const DicomTag &tag, const std::string &str, bool isBinary)
+  {
+    SetValueInternal(tag.GetGroup(), tag.GetElement(), new DicomValue(str, isBinary));
+  }
+
+  void DicomMap::SetValue(uint16_t group, uint16_t element, const std::string &str, bool isBinary)
+  {
+    SetValueInternal(group, element, new DicomValue(str, isBinary));
+  }
+
+  bool DicomMap::HasTag(uint16_t group, uint16_t element) const
+  {
+    return HasTag(DicomTag(group, element));
+  }
+
+  bool DicomMap::HasTag(const DicomTag &tag) const
+  {
+    return content_.find(tag) != content_.end();
+  }
+
+  const DicomValue &DicomMap::GetValue(uint16_t group, uint16_t element) const
+  {
+    return GetValue(DicomTag(group, element));
+  }
+
 
   static void ExtractTags(DicomMap& result,
                           const DicomMap::Content& source,
@@ -287,6 +332,16 @@
   }
 
 
+  Orthanc::DicomMap::~DicomMap()
+  {
+    Clear();
+  }
+
+  size_t DicomMap::GetSize() const
+  {
+    return content_.size();
+  }
+
 
   DicomMap* DicomMap::Clone() const
   {
@@ -326,6 +381,11 @@
     }
   }
 
+  const DicomValue *DicomMap::TestAndGetValue(uint16_t group, uint16_t element) const
+  {
+    return TestAndGetValue(DicomTag(group, element));
+  }
+
 
   const DicomValue* DicomMap::TestAndGetValue(const DicomTag& tag) const
   {
--- a/OrthancFramework/Sources/DicomFormat/DicomMap.h	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/DicomFormat/DicomMap.h	Thu Nov 05 15:52:28 2020 +0100
@@ -53,19 +53,9 @@
                                          ResourceType level);
 
   public:
-    DicomMap()
-    {
-    }
+    ~DicomMap();
 
-    ~DicomMap()
-    {
-      Clear();
-    }
-
-    size_t GetSize() const
-    {
-      return content_.size();
-    }
+    size_t GetSize() const;
     
     DicomMap* Clone() const;
 
@@ -73,67 +63,37 @@
 
     void Clear();
 
-    void SetNullValue(uint16_t group, 
-                      uint16_t element)
-    {
-      SetValueInternal(group, element, new DicomValue);
-    }
+    void SetNullValue(uint16_t group,
+                      uint16_t element);
     
-    void SetNullValue(const DicomTag& tag)
-    {
-      SetValueInternal(tag.GetGroup(), tag.GetElement(), new DicomValue);
-    }
+    void SetNullValue(const DicomTag& tag);
     
-    void SetValue(uint16_t group, 
-                  uint16_t element, 
-                  const DicomValue& value)
-    {
-      SetValueInternal(group, element, value.Clone());
-    }
+    void SetValue(uint16_t group,
+                  uint16_t element,
+                  const DicomValue& value);
 
     void SetValue(const DicomTag& tag,
-                  const DicomValue& value)
-    {
-      SetValueInternal(tag.GetGroup(), tag.GetElement(), value.Clone());
-    }
+                  const DicomValue& value);
 
     void SetValue(const DicomTag& tag,
                   const std::string& str,
-                  bool isBinary)
-    {
-      SetValueInternal(tag.GetGroup(), tag.GetElement(), new DicomValue(str, isBinary));
-    }
-
-    void SetValue(uint16_t group, 
-                  uint16_t element, 
-                  const std::string& str,
-                  bool isBinary)
-    {
-      SetValueInternal(group, element, new DicomValue(str, isBinary));
-    }
+                  bool isBinary);
 
-    bool HasTag(uint16_t group, uint16_t element) const
-    {
-      return HasTag(DicomTag(group, element));
-    }
+    void SetValue(uint16_t group,
+                  uint16_t element,
+                  const std::string& str,
+                  bool isBinary);
 
-    bool HasTag(const DicomTag& tag) const
-    {
-      return content_.find(tag) != content_.end();
-    }
+    bool HasTag(uint16_t group, uint16_t element) const;
 
-    const DicomValue& GetValue(uint16_t group, uint16_t element) const
-    {
-      return GetValue(DicomTag(group, element));
-    }
+    bool HasTag(const DicomTag& tag) const;
+
+    const DicomValue& GetValue(uint16_t group, uint16_t element) const;
 
     const DicomValue& GetValue(const DicomTag& tag) const;
 
     // DO NOT delete the returned value!
-    const DicomValue* TestAndGetValue(uint16_t group, uint16_t element) const
-    {
-      return TestAndGetValue(DicomTag(group, element));
-    }       
+    const DicomValue* TestAndGetValue(uint16_t group, uint16_t element) const;
 
     // DO NOT delete the returned value!
     const DicomValue* TestAndGetValue(const DicomTag& tag) const;
--- a/OrthancFramework/Sources/DicomFormat/DicomValue.cpp	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/DicomFormat/DicomValue.cpp	Thu Nov 05 15:52:28 2020 +0100
@@ -31,7 +31,13 @@
 
 namespace Orthanc
 {
-  DicomValue::DicomValue(const DicomValue& other) : 
+  Orthanc::DicomValue::DicomValue() :
+    type_(Type_Null)
+  {
+  }
+
+
+  DicomValue::DicomValue(const DicomValue& other) :
     type_(other.type_),
     content_(other.content_)
   {
@@ -67,6 +73,16 @@
     }
   }
 
+  bool DicomValue::IsNull() const
+  {
+    return type_ == Type_Null;
+  }
+
+  bool DicomValue::IsBinary() const
+  {
+    return type_ == Type_Binary;
+  }
+
 
   DicomValue* DicomValue::Clone() const
   {
--- a/OrthancFramework/Sources/DicomFormat/DicomValue.h	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/DicomFormat/DicomValue.h	Thu Nov 05 15:52:28 2020 +0100
@@ -51,9 +51,7 @@
     DicomValue(const DicomValue& other);
 
   public:
-    DicomValue() : type_(Type_Null)
-    {
-    }
+    DicomValue();
     
     DicomValue(const std::string& content,
                bool isBinary);
@@ -64,15 +62,9 @@
     
     const std::string& GetContent() const;
 
-    bool IsNull() const
-    {
-      return type_ == Type_Null;
-    }
+    bool IsNull() const;
 
-    bool IsBinary() const
-    {
-      return type_ == Type_Binary;
-    }
+    bool IsBinary() const;
     
     DicomValue* Clone() const;
 
--- a/OrthancFramework/Sources/DicomFormat/StreamBlockReader.cpp	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/DicomFormat/StreamBlockReader.cpp	Thu Nov 05 15:52:28 2020 +0100
@@ -85,4 +85,9 @@
       return true;
     }
   }
+
+  uint64_t Orthanc::StreamBlockReader::GetProcessedBytes() const
+  {
+    return processedBytes_;
+  }
 }
--- a/OrthancFramework/Sources/DicomFormat/StreamBlockReader.h	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/DicomFormat/StreamBlockReader.h	Thu Nov 05 15:52:28 2020 +0100
@@ -61,9 +61,6 @@
      **/
     bool Read(std::string& block);
     
-    uint64_t GetProcessedBytes() const
-    {
-      return processedBytes_;
-    }
+    uint64_t GetProcessedBytes() const;
   };
 }
--- a/OrthancFramework/Sources/DicomNetworking/DicomAssociationParameters.cpp	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/DicomNetworking/DicomAssociationParameters.cpp	Thu Nov 05 15:52:28 2020 +0100
@@ -71,13 +71,33 @@
     SetRemoteModality(remote);
   }
 
-    
+  const std::string &DicomAssociationParameters::GetLocalApplicationEntityTitle() const
+  {
+    return localAet_;
+  }
+
+  void DicomAssociationParameters::SetLocalApplicationEntityTitle(const std::string &aet)
+  {
+    localAet_ = aet;
+  }
+
+  const RemoteModalityParameters &DicomAssociationParameters::GetRemoteModality() const
+  {
+    return remote_;
+  }
+
+
   void DicomAssociationParameters::SetRemoteModality(const RemoteModalityParameters& remote)
   {
     CheckHost(remote.GetHost());
     remote_ = remote;
   }
 
+  void DicomAssociationParameters::SetRemoteApplicationEntityTitle(const std::string &aet)
+  {
+    remote_.SetApplicationEntityTitle(aet);
+  }
+
 
   void DicomAssociationParameters::SetRemoteHost(const std::string& host)
   {
@@ -85,6 +105,16 @@
     remote_.SetHost(host);
   }
 
+  void DicomAssociationParameters::SetRemotePort(uint16_t port)
+  {
+    remote_.SetPortNumber(port);
+  }
+
+  void DicomAssociationParameters::SetRemoteManufacturer(ModalityManufacturer manufacturer)
+  {
+    remote_.SetManufacturer(manufacturer);
+  }
+
 
   bool DicomAssociationParameters::IsEqual(const DicomAssociationParameters& other) const
   {
@@ -96,6 +126,21 @@
             timeout_ == other.timeout_);
   }
 
+  void DicomAssociationParameters::SetTimeout(uint32_t seconds)
+  {
+    timeout_ = seconds;
+  }
+
+  uint32_t DicomAssociationParameters::GetTimeout() const
+  {
+    return timeout_;
+  }
+
+  bool DicomAssociationParameters::HasTimeout() const
+  {
+    return timeout_ != 0;
+  }
+
 
   static const char* const LOCAL_AET = "LocalAet";
   static const char* const REMOTE = "Remote";
--- a/OrthancFramework/Sources/DicomNetworking/DicomAssociationParameters.h	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/DicomNetworking/DicomAssociationParameters.h	Thu Nov 05 15:52:28 2020 +0100
@@ -45,57 +45,30 @@
     DicomAssociationParameters(const std::string& localAet,
                                const RemoteModalityParameters& remote);
     
-    const std::string& GetLocalApplicationEntityTitle() const
-    {
-      return localAet_;
-    }
+    const std::string& GetLocalApplicationEntityTitle() const;
 
-    void SetLocalApplicationEntityTitle(const std::string& aet)
-    {
-      localAet_ = aet;
-    }
+    void SetLocalApplicationEntityTitle(const std::string& aet);
 
-    const RemoteModalityParameters& GetRemoteModality() const
-    {
-      return remote_;
-    }
+    const RemoteModalityParameters& GetRemoteModality() const;
 
     void SetRemoteModality(const RemoteModalityParameters& parameters);
     
-    void SetRemoteApplicationEntityTitle(const std::string& aet)
-    {
-      remote_.SetApplicationEntityTitle(aet);
-    }
+    void SetRemoteApplicationEntityTitle(const std::string& aet);
 
     void SetRemoteHost(const std::string& host);
 
-    void SetRemotePort(uint16_t port)
-    {
-      remote_.SetPortNumber(port);
-    }
+    void SetRemotePort(uint16_t port);
 
-    void SetRemoteManufacturer(ModalityManufacturer manufacturer)
-    {
-      remote_.SetManufacturer(manufacturer);
-    }
+    void SetRemoteManufacturer(ModalityManufacturer manufacturer);
 
     bool IsEqual(const DicomAssociationParameters& other) const;
 
     // Setting it to "0" disables the timeout (infinite wait)
-    void SetTimeout(uint32_t seconds)
-    {
-      timeout_ = seconds;
-    }
+    void SetTimeout(uint32_t seconds);
 
-    uint32_t GetTimeout() const
-    {
-      return timeout_;
-    }
+    uint32_t GetTimeout() const;
 
-    bool HasTimeout() const
-    {
-      return timeout_ != 0;
-    }
+    bool HasTimeout() const;
 
     void SerializeJob(Json::Value& target) const;
     
--- a/OrthancFramework/Sources/DicomNetworking/DicomFindAnswers.cpp	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/DicomNetworking/DicomFindAnswers.cpp	Thu Nov 05 15:52:28 2020 +0100
@@ -58,6 +58,16 @@
   {
   }
 
+  DicomFindAnswers::~DicomFindAnswers()
+  {
+    Clear();
+  }
+
+  Encoding DicomFindAnswers::GetEncoding() const
+  {
+    return encoding_;
+  }
+
 
   void DicomFindAnswers::SetEncoding(Encoding encoding)
   {
@@ -84,6 +94,11 @@
     }
   }
 
+  bool DicomFindAnswers::IsWorklist() const
+  {
+    return isWorklist_;
+  }
+
 
   void DicomFindAnswers::Clear()
   {
@@ -127,6 +142,11 @@
     AddAnswerInternal(new ParsedDicomFile(dicom, size));
   }
 
+  size_t DicomFindAnswers::GetSize() const
+  {
+    return answers_.size();
+  }
+
 
   ParsedDicomFile& DicomFindAnswers::GetAnswer(size_t index) const
   {
@@ -200,6 +220,17 @@
   }
 
 
+  bool DicomFindAnswers::IsComplete() const
+  {
+    return complete_;
+  }
+
+  void DicomFindAnswers::SetComplete(bool isComplete)
+  {
+    complete_ = isComplete;
+  }
+
+
 #if ORTHANC_BUILDING_FRAMEWORK_LIBRARY == 1
   void DicomFindAnswers::Add(ParsedDicomFile& dicom)
   {
--- a/OrthancFramework/Sources/DicomNetworking/DicomFindAnswers.h	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/DicomNetworking/DicomFindAnswers.h	Thu Nov 05 15:52:28 2020 +0100
@@ -44,24 +44,15 @@
   public:
     explicit DicomFindAnswers(bool isWorklist);
 
-    ~DicomFindAnswers()
-    {
-      Clear();
-    }
+    ~DicomFindAnswers();
 
-    Encoding GetEncoding() const
-    {
-      return encoding_;
-    }
+    Encoding GetEncoding() const;
 
     void SetEncoding(Encoding encoding);
 
     void SetWorklist(bool isWorklist);
 
-    bool IsWorklist() const
-    {
-      return isWorklist_;
-    }
+    bool IsWorklist() const;
 
     void Clear();
 
@@ -74,10 +65,7 @@
     void Add(const void* dicom,
              size_t size);
 
-    size_t GetSize() const
-    {
-      return answers_.size();
-    }
+    size_t GetSize() const;
 
     ParsedDicomFile& GetAnswer(size_t index) const;
 
@@ -90,14 +78,8 @@
                 size_t index,
                 bool simplify) const;
 
-    bool IsComplete() const
-    {
-      return complete_;
-    }
+    bool IsComplete() const;
 
-    void SetComplete(bool isComplete)
-    {
-      complete_ = isComplete;
-    }
+    void SetComplete(bool isComplete);
   };
 }
--- a/OrthancFramework/Sources/DicomNetworking/DicomStoreUserConnection.cpp	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/DicomNetworking/DicomStoreUserConnection.cpp	Thu Nov 05 15:52:28 2020 +0100
@@ -159,7 +159,42 @@
     proposeRetiredBigEndian_(false)
   {
   }
-    
+
+  const DicomAssociationParameters &DicomStoreUserConnection::GetParameters() const
+  {
+    return parameters_;
+  }
+
+  void DicomStoreUserConnection::SetCommonClassesProposed(bool proposed)
+  {
+    proposeCommonClasses_ = proposed;
+  }
+
+  bool DicomStoreUserConnection::IsCommonClassesProposed() const
+  {
+    return proposeCommonClasses_;
+  }
+
+  void DicomStoreUserConnection::SetUncompressedSyntaxesProposed(bool proposed)
+  {
+    proposeUncompressedSyntaxes_ = proposed;
+  }
+
+  bool DicomStoreUserConnection::IsUncompressedSyntaxesProposed() const
+  {
+    return proposeUncompressedSyntaxes_;
+  }
+
+  void DicomStoreUserConnection::SetRetiredBigEndianProposed(bool propose)
+  {
+    proposeRetiredBigEndian_ = propose;
+  }
+
+  bool DicomStoreUserConnection::IsRetiredBigEndianProposed() const
+  {
+    return proposeRetiredBigEndian_;
+  }
+
 
   void DicomStoreUserConnection::RegisterStorageClass(const std::string& sopClassUid,
                                                       DicomTransferSyntax syntax)
--- a/OrthancFramework/Sources/DicomNetworking/DicomStoreUserConnection.h	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/DicomNetworking/DicomStoreUserConnection.h	Thu Nov 05 15:52:28 2020 +0100
@@ -98,40 +98,19 @@
   public:
     explicit DicomStoreUserConnection(const DicomAssociationParameters& params);
     
-    const DicomAssociationParameters& GetParameters() const
-    {
-      return parameters_;
-    }
+    const DicomAssociationParameters& GetParameters() const;
 
-    void SetCommonClassesProposed(bool proposed)
-    {
-      proposeCommonClasses_ = proposed;
-    }
+    void SetCommonClassesProposed(bool proposed);
 
-    bool IsCommonClassesProposed() const
-    {
-      return proposeCommonClasses_;
-    }
+    bool IsCommonClassesProposed() const;
 
-    void SetUncompressedSyntaxesProposed(bool proposed)
-    {
-      proposeUncompressedSyntaxes_ = proposed;
-    }
+    void SetUncompressedSyntaxesProposed(bool proposed);
 
-    bool IsUncompressedSyntaxesProposed() const
-    {
-      return proposeUncompressedSyntaxes_;
-    }
+    bool IsUncompressedSyntaxesProposed() const;
 
-    void SetRetiredBigEndianProposed(bool propose)
-    {
-      proposeRetiredBigEndian_ = propose;
-    }
+    void SetRetiredBigEndianProposed(bool propose);
 
-    bool IsRetiredBigEndianProposed() const
-    {
-      return proposeRetiredBigEndian_;
-    }      
+    bool IsRetiredBigEndianProposed() const;
 
     void RegisterStorageClass(const std::string& sopClassUid,
                               DicomTransferSyntax syntax);
--- a/OrthancFramework/Sources/DicomNetworking/RemoteModalityParameters.cpp	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/DicomNetworking/RemoteModalityParameters.cpp	Thu Nov 05 15:52:28 2020 +0100
@@ -65,6 +65,16 @@
   }
 
 
+  RemoteModalityParameters::RemoteModalityParameters()
+  {
+    Clear();
+  }
+
+  RemoteModalityParameters::RemoteModalityParameters(const Json::Value &serialized)
+  {
+    Unserialize(serialized);
+  }
+
   RemoteModalityParameters::RemoteModalityParameters(const std::string& aet,
                                                      const std::string& host,
                                                      uint16_t port,
@@ -77,10 +87,35 @@
     SetManufacturer(manufacturer);
   }
 
+  const std::string &RemoteModalityParameters::GetApplicationEntityTitle() const
+  {
+    return aet_;
+  }
+
+  void RemoteModalityParameters::SetApplicationEntityTitle(const std::string &aet)
+  {
+    aet_ = aet;
+  }
+
+  const std::string &RemoteModalityParameters::GetHost() const
+  {
+    return host_;
+  }
+
+  void RemoteModalityParameters::SetHost(const std::string &host)
+  {
+    host_ = host;
+  }
+
+  uint16_t RemoteModalityParameters::GetPortNumber() const
+  {
+    return port_;
+  }
+
 
   static void CheckPortNumber(int value)
   {
-    if (value <= 0 || 
+    if (value <= 0 ||
         value >= 65535)
     {
       throw OrthancException(ErrorCode_ParameterOutOfRange,
@@ -127,12 +162,27 @@
     port_ = port;
   }
 
+  ModalityManufacturer RemoteModalityParameters::GetManufacturer() const
+  {
+    return manufacturer_;
+  }
+
+  void RemoteModalityParameters::SetManufacturer(ModalityManufacturer manufacturer)
+  {
+    manufacturer_ = manufacturer;
+  }
+
+  void RemoteModalityParameters::SetManufacturer(const std::string &manufacturer)
+  {
+    manufacturer_ = StringToModalityManufacturer(manufacturer);
+  }
+
 
   void RemoteModalityParameters::UnserializeArray(const Json::Value& serialized)
   {
     assert(serialized.type() == Json::arrayValue);
 
-    if ((serialized.size() != 3 && 
+    if ((serialized.size() != 3 &&
          serialized.size() != 4) ||
         serialized[0].type() != Json::stringValue ||
         serialized[1].type() != Json::stringValue ||
@@ -236,7 +286,7 @@
   {
     switch (type)
     {
-      case DicomRequestType_Echo:
+    case DicomRequestType_Echo:
         return allowEcho_;
 
       case DicomRequestType_Find:
@@ -364,4 +414,14 @@
         throw OrthancException(ErrorCode_BadFileFormat);
     }
   }
+
+  bool RemoteModalityParameters::IsTranscodingAllowed() const
+  {
+    return allowTranscoding_;
+  }
+
+  void RemoteModalityParameters::SetTranscodingAllowed(bool allowed)
+  {
+    allowTranscoding_ = allowed;
+  }
 }
--- a/OrthancFramework/Sources/DicomNetworking/RemoteModalityParameters.h	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/DicomNetworking/RemoteModalityParameters.h	Thu Nov 05 15:52:28 2020 +0100
@@ -53,62 +53,32 @@
     void UnserializeObject(const Json::Value& serialized);
 
   public:
-    RemoteModalityParameters()
-    {
-      Clear();
-    }
+    RemoteModalityParameters();
 
-    explicit RemoteModalityParameters(const Json::Value& serialized)
-    {
-      Unserialize(serialized);
-    }
+    explicit RemoteModalityParameters(const Json::Value& serialized);
 
     RemoteModalityParameters(const std::string& aet,
                              const std::string& host,
                              uint16_t port,
                              ModalityManufacturer manufacturer);
 
-    const std::string& GetApplicationEntityTitle() const
-    {
-      return aet_;
-    }
+    const std::string& GetApplicationEntityTitle() const;
 
-    void SetApplicationEntityTitle(const std::string& aet)
-    {
-      aet_ = aet;
-    }
+    void SetApplicationEntityTitle(const std::string& aet);
 
-    const std::string& GetHost() const
-    {
-      return host_;
-    }
+    const std::string& GetHost() const;
 
-    void SetHost(const std::string& host)
-    {
-      host_ = host;
-    }
+    void SetHost(const std::string& host);
     
-    uint16_t GetPortNumber() const
-    {
-      return port_;
-    }
+    uint16_t GetPortNumber() const;
 
     void SetPortNumber(uint16_t port);
 
-    ModalityManufacturer GetManufacturer() const
-    {
-      return manufacturer_;
-    }
+    ModalityManufacturer GetManufacturer() const;
 
-    void SetManufacturer(ModalityManufacturer manufacturer)
-    {
-      manufacturer_ = manufacturer;
-    }    
+    void SetManufacturer(ModalityManufacturer manufacturer);
 
-    void SetManufacturer(const std::string& manufacturer)
-    {
-      manufacturer_ = StringToModalityManufacturer(manufacturer);
-    }
+    void SetManufacturer(const std::string& manufacturer);
 
     bool IsRequestAllowed(DicomRequestType type) const;
 
@@ -122,14 +92,8 @@
     void Serialize(Json::Value& target,
                    bool forceAdvancedFormat) const;
 
-    bool IsTranscodingAllowed() const
-    {
-      return allowTranscoding_;
-    }
+    bool IsTranscodingAllowed() const;
 
-    void SetTranscodingAllowed(bool allowed)
-    {
-      allowTranscoding_ = allowed;
-    }
+    void SetTranscodingAllowed(bool allowed);
   };
 }
--- a/OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp	Thu Nov 05 15:52:28 2020 +0100
@@ -670,6 +670,16 @@
     }
   }
 
+  void ParsedDicomFile::RemovePrivateTags()
+  {
+    RemovePrivateTagsInternal(NULL);
+  }
+
+  void ParsedDicomFile::RemovePrivateTags(const std::set<DicomTag> &toKeep)
+  {
+    RemovePrivateTagsInternal(&toKeep);
+  }
+
 
   static bool CanReplaceProceed(DcmDataset& dicom,
                                 const DcmTagKey& tag,
@@ -1149,6 +1159,16 @@
     }
   }
 
+  Orthanc::ParsedDicomFile *Orthanc::ParsedDicomFile::AcquireDcmtkObject(DcmFileFormat *dicom)  // No clone here
+  {
+    return new ParsedDicomFile(dicom);
+  }
+
+  DcmFileFormat &ParsedDicomFile::GetDcmtkObject()
+  {
+    return GetDcmtkObjectConst();
+  }
+
 
   DcmFileFormat* ParsedDicomFile::ReleaseDcmtkObject()
   {
@@ -1740,7 +1760,7 @@
 
 #if ORTHANC_BUILDING_FRAMEWORK_LIBRARY == 1
   // Alias for binary compatibility with Orthanc Framework 1.7.2 => don't use it anymore
-  void ParsedDicomFile::DatasetToJson(Json::Value& target, 
+  void ParsedDicomFile::DatasetToJson(Json::Value& target,
                                       DicomToJsonFormat format,
                                       DicomToJsonFlags flags,
                                       unsigned int maxStringLength)
--- a/OrthancFramework/Sources/DicomParsing/ParsedDicomFile.h	Thu Nov 05 12:01:11 2020 +0100
+++ b/OrthancFramework/Sources/DicomParsing/ParsedDicomFile.h	Thu Nov 05 15:52:28 2020 +0100
@@ -137,15 +137,9 @@
 
     explicit ParsedDicomFile(DcmFileFormat& dicom);  // This clones the DCMTK object
 
-    static ParsedDicomFile* AcquireDcmtkObject(DcmFileFormat* dicom)  // No clone here
-    {
-      return new ParsedDicomFile(dicom);
-    }
+    static ParsedDicomFile* AcquireDcmtkObject(DcmFileFormat* dicom);
 
-    DcmFileFormat& GetDcmtkObject()
-    {
-      return GetDcmtkObjectConst();
-    }
+    DcmFileFormat& GetDcmtkObject();
 
     // The "ParsedDicomFile" object cannot be used after calling this method
     DcmFileFormat* ReleaseDcmtkObject();
@@ -190,15 +184,9 @@
     void SetIfAbsent(const DicomTag& tag,
                      const std::string& utf8Value);
 
-    void RemovePrivateTags()
-    {
-      RemovePrivateTagsInternal(NULL);
-    }
+    void RemovePrivateTags();
 
-    void RemovePrivateTags(const std::set<DicomTag>& toKeep)
-    {
-      RemovePrivateTagsInternal(&toKeep);
-    }
+    void RemovePrivateTags(const std::set<DicomTag>& toKeep);
 
     // WARNING: This function handles the decoding of strings to UTF8
     bool GetTagValue(std::string& value,