changeset 4520:f5cb0c0ffbed

added unit test OrthancFramework.SizeOf to dump sizeof all the public classes in the Orthanc framework
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 22 Feb 2021 18:30:31 +0100
parents a3c6678aa7b1
children 60e4f94ec30f
files OrthancFramework/Resources/CheckOrthancFrameworkSymbols.py OrthancFramework/Sources/FileStorage/FilesystemStorage.cpp OrthancFramework/Sources/FileStorage/FilesystemStorage.h OrthancServer/CMakeLists.txt OrthancServer/UnitTestsSources/SizeOfTests.cpp OrthancServer/UnitTestsSources/SizeOfTests.impl.h
diffstat 6 files changed, 347 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Resources/CheckOrthancFrameworkSymbols.py	Mon Feb 22 16:51:23 2021 +0100
+++ b/OrthancFramework/Resources/CheckOrthancFrameworkSymbols.py	Mon Feb 22 18:30:31 2021 +0100
@@ -53,6 +53,9 @@
 parser.add_argument('--libclang',
                     default = '',
                     help = 'manually provides the path to the libclang shared library')
+parser.add_argument('--target-cpp-size',
+                    default = '',
+                    help = 'where to store C++ source to display the size of each public class')
 
 args = parser.parse_args()
 
@@ -107,6 +110,7 @@
 
 FILES = []
 COUNT = 0
+ALL_TYPES = []
 
 def ReportProblem(message, fqn, cursor):
     global FILES, COUNT
@@ -141,6 +145,9 @@
     if not visible:
         return
 
+    global ALL_TYPES
+    ALL_TYPES.append('::'.join(fqn))
+    
     
     ##
     ## Ignore pure abstract interfaces, by checking the following
@@ -206,6 +213,9 @@
     
     isPublic = (child.kind == clang.cindex.CursorKind.STRUCT_DECL)
 
+    membersCount = 0
+    membersSize = 0
+
     for i in child.get_children():
         if (i.kind == clang.cindex.CursorKind.VISIBILITY_ATTR or    # "default"
             i.kind == clang.cindex.CursorKind.CXX_BASE_SPECIFIER):  # base class
@@ -232,8 +242,7 @@
                     ReportProblem('Exported public method with an implementation', fqn, i)
 
         elif i.kind == clang.cindex.CursorKind.VAR_DECL:
-            if isPublic:
-                ReportProblem('Exported public member variable', fqn, i)
+            raise Exception('Unsupported: %s, %s' % (i.kind, i.location))
 
         elif i.kind == clang.cindex.CursorKind.FUNCTION_TEMPLATE:
             # An inline function template is OK, as it is not added to
@@ -261,11 +270,19 @@
                      'operator<<(std::ostream &, const Orthanc::DicomTag &)',
                  ])):
                 raise Exception('Unsupported: %s, %s' % (i.kind, i.location))
+
+        elif i.kind == clang.cindex.CursorKind.FIELD_DECL:
+            # TODO
+            if i.type.get_size() > 0:
+                membersSize += i.type.get_size()
+            membersCount += 1
             
         else:
             if isPublic:
                 raise Exception('Unsupported: %s, %s' % (i.kind, i.location))
 
+    #print('Size of %s => (%d,%d)' % ('::'.join(fqn), membersCount, membersSize))
+
 
 def ExploreNamespace(node, namespace):
     for child in node.get_children():
@@ -301,6 +318,12 @@
         ExploreNamespace(node, [ 'Orthanc' ])
 
 
+if args.target_cpp_size != '':
+    with open(args.target_cpp_size, 'w') as f:
+        for t in sorted(ALL_TYPES):
+            f.write('  printf("sizeof(::%s) == %%d\\n", static_cast<int>(sizeof(::%s)));\n' % (t, t))
+
+
 print('\nTotal of possibly problematic methods: %d' % COUNT)
 
 print('\nProblematic files:\n')
--- a/OrthancFramework/Sources/FileStorage/FilesystemStorage.cpp	Mon Feb 22 16:51:23 2021 +0100
+++ b/OrthancFramework/Sources/FileStorage/FilesystemStorage.cpp	Mon Feb 22 18:30:31 2021 +0100
@@ -183,6 +183,12 @@
   }
 
 
+  bool FilesystemStorage::HasReadRange() const
+  {
+    return true;
+  }
+
+
   uintmax_t FilesystemStorage::GetSize(const std::string& uuid) const
   {
     boost::filesystem::path path = GetPath(uuid);
--- a/OrthancFramework/Sources/FileStorage/FilesystemStorage.h	Mon Feb 22 16:51:23 2021 +0100
+++ b/OrthancFramework/Sources/FileStorage/FilesystemStorage.h	Mon Feb 22 18:30:31 2021 +0100
@@ -86,10 +86,7 @@
                                      uint64_t start /* inclusive */,
                                      uint64_t end /* exclusive */) ORTHANC_OVERRIDE;
 
-    virtual bool HasReadRange() const ORTHANC_OVERRIDE
-    {
-      return true;
-    }
+    virtual bool HasReadRange() const ORTHANC_OVERRIDE;
 
     virtual void Remove(const std::string& uuid,
                         FileContentType type) ORTHANC_OVERRIDE;
--- a/OrthancServer/CMakeLists.txt	Mon Feb 22 16:51:23 2021 +0100
+++ b/OrthancServer/CMakeLists.txt	Mon Feb 22 18:30:31 2021 +0100
@@ -175,6 +175,7 @@
   ${CMAKE_SOURCE_DIR}/UnitTestsSources/PluginsTests.cpp
   ${CMAKE_SOURCE_DIR}/UnitTestsSources/ServerIndexTests.cpp
   ${CMAKE_SOURCE_DIR}/UnitTestsSources/ServerJobsTests.cpp
+  ${CMAKE_SOURCE_DIR}/UnitTestsSources/SizeOfTests.cpp
   ${CMAKE_SOURCE_DIR}/UnitTestsSources/UnitTestsMain.cpp
   ${CMAKE_SOURCE_DIR}/UnitTestsSources/VersionsTests.cpp
   )
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OrthancServer/UnitTestsSources/SizeOfTests.cpp	Mon Feb 22 18:30:31 2021 +0100
@@ -0,0 +1,201 @@
+/**
+ * Orthanc - A Lightweight, RESTful DICOM Store
+ * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
+ * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017-2021 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 "PrecompiledHeadersUnitTests.h"
+#include <gtest/gtest.h>
+
+#include "../../OrthancFramework/Sources/Cache/ICachePageProvider.h"
+#include "../../OrthancFramework/Sources/Cache/ICacheable.h"
+#include "../../OrthancFramework/Sources/Cache/LeastRecentlyUsedIndex.h"
+#include "../../OrthancFramework/Sources/Cache/MemoryCache.h"
+#include "../../OrthancFramework/Sources/Cache/MemoryObjectCache.h"
+#include "../../OrthancFramework/Sources/Cache/MemoryStringCache.h"
+#include "../../OrthancFramework/Sources/Cache/SharedArchive.h"
+#include "../../OrthancFramework/Sources/ChunkedBuffer.h"
+#include "../../OrthancFramework/Sources/Compatibility.h"
+#include "../../OrthancFramework/Sources/Compression/DeflateBaseCompressor.h"
+#include "../../OrthancFramework/Sources/Compression/GzipCompressor.h"
+#include "../../OrthancFramework/Sources/Compression/HierarchicalZipWriter.h"
+#include "../../OrthancFramework/Sources/Compression/IBufferCompressor.h"
+#include "../../OrthancFramework/Sources/Compression/ZipReader.h"
+#include "../../OrthancFramework/Sources/Compression/ZipWriter.h"
+#include "../../OrthancFramework/Sources/Compression/ZlibCompressor.h"
+#include "../../OrthancFramework/Sources/DicomFormat/DicomArray.h"
+#include "../../OrthancFramework/Sources/DicomFormat/DicomElement.h"
+#include "../../OrthancFramework/Sources/DicomFormat/DicomImageInformation.h"
+#include "../../OrthancFramework/Sources/DicomFormat/DicomInstanceHasher.h"
+#include "../../OrthancFramework/Sources/DicomFormat/DicomIntegerPixelAccessor.h"
+#include "../../OrthancFramework/Sources/DicomFormat/DicomMap.h"
+#include "../../OrthancFramework/Sources/DicomFormat/DicomStreamReader.h"
+#include "../../OrthancFramework/Sources/DicomFormat/DicomTag.h"
+#include "../../OrthancFramework/Sources/DicomFormat/DicomValue.h"
+#include "../../OrthancFramework/Sources/DicomFormat/StreamBlockReader.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/DicomAssociation.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/DicomAssociationParameters.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/DicomControlUserConnection.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/DicomFindAnswers.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/DicomServer.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/DicomStoreUserConnection.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/IApplicationEntityFilter.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/IFindRequestHandler.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/IFindRequestHandlerFactory.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/IGetRequestHandler.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/IGetRequestHandlerFactory.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/IMoveRequestHandler.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/IMoveRequestHandlerFactory.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/IStorageCommitmentRequestHandler.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/IStorageCommitmentRequestHandlerFactory.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/IStoreRequestHandler.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/IStoreRequestHandlerFactory.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/IWorklistRequestHandler.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/IWorklistRequestHandlerFactory.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/Internals/CommandDispatcher.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/Internals/DicomTls.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/Internals/FindScp.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/Internals/GetScp.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/Internals/MoveScp.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/Internals/StoreScp.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/NetworkingCompatibility.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/RemoteModalityParameters.h"
+#include "../../OrthancFramework/Sources/DicomNetworking/TimeoutDicomConnectionManager.h"
+#include "../../OrthancFramework/Sources/DicomParsing/DcmtkTranscoder.h"
+#include "../../OrthancFramework/Sources/DicomParsing/DicomDirWriter.h"
+#include "../../OrthancFramework/Sources/DicomParsing/DicomModification.h"
+#include "../../OrthancFramework/Sources/DicomParsing/DicomWebJsonVisitor.h"
+#include "../../OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.h"
+#include "../../OrthancFramework/Sources/DicomParsing/IDicomTranscoder.h"
+#include "../../OrthancFramework/Sources/DicomParsing/ITagVisitor.h"
+#include "../../OrthancFramework/Sources/DicomParsing/Internals/DicomFrameIndex.h"
+#include "../../OrthancFramework/Sources/DicomParsing/Internals/DicomImageDecoder.h"
+#include "../../OrthancFramework/Sources/DicomParsing/MemoryBufferTranscoder.h"
+#include "../../OrthancFramework/Sources/DicomParsing/ParsedDicomCache.h"
+#include "../../OrthancFramework/Sources/DicomParsing/ParsedDicomDir.h"
+#include "../../OrthancFramework/Sources/DicomParsing/ParsedDicomFile.h"
+#include "../../OrthancFramework/Sources/DicomParsing/ToDcmtkBridge.h"
+#include "../../OrthancFramework/Sources/Endianness.h"
+#include "../../OrthancFramework/Sources/EnumerationDictionary.h"
+#include "../../OrthancFramework/Sources/Enumerations.h"
+#include "../../OrthancFramework/Sources/FileBuffer.h"
+#include "../../OrthancFramework/Sources/FileStorage/FileInfo.h"
+#include "../../OrthancFramework/Sources/FileStorage/FilesystemStorage.h"
+#include "../../OrthancFramework/Sources/FileStorage/IStorageArea.h"
+#include "../../OrthancFramework/Sources/FileStorage/MemoryStorageArea.h"
+#include "../../OrthancFramework/Sources/FileStorage/StorageAccessor.h"
+#include "../../OrthancFramework/Sources/HttpClient.h"
+#include "../../OrthancFramework/Sources/HttpServer/BufferHttpSender.h"
+#include "../../OrthancFramework/Sources/HttpServer/FilesystemHttpHandler.h"
+#include "../../OrthancFramework/Sources/HttpServer/FilesystemHttpSender.h"
+#include "../../OrthancFramework/Sources/HttpServer/HttpContentNegociation.h"
+#include "../../OrthancFramework/Sources/HttpServer/HttpFileSender.h"
+#include "../../OrthancFramework/Sources/HttpServer/HttpOutput.h"
+#include "../../OrthancFramework/Sources/HttpServer/HttpServer.h"
+#include "../../OrthancFramework/Sources/HttpServer/HttpStreamTranscoder.h"
+#include "../../OrthancFramework/Sources/HttpServer/HttpToolbox.h"
+#include "../../OrthancFramework/Sources/HttpServer/IHttpHandler.h"
+#include "../../OrthancFramework/Sources/HttpServer/IHttpOutputStream.h"
+#include "../../OrthancFramework/Sources/HttpServer/IHttpStreamAnswer.h"
+#include "../../OrthancFramework/Sources/HttpServer/IIncomingHttpRequestFilter.h"
+#include "../../OrthancFramework/Sources/HttpServer/IWebDavBucket.h"
+#include "../../OrthancFramework/Sources/HttpServer/MultipartStreamReader.h"
+#include "../../OrthancFramework/Sources/HttpServer/StringHttpOutput.h"
+#include "../../OrthancFramework/Sources/HttpServer/StringMatcher.h"
+#include "../../OrthancFramework/Sources/HttpServer/WebDavStorage.h"
+#include "../../OrthancFramework/Sources/IDynamicObject.h"
+#include "../../OrthancFramework/Sources/IMemoryBuffer.h"
+#include "../../OrthancFramework/Sources/Images/Font.h"
+#include "../../OrthancFramework/Sources/Images/FontRegistry.h"
+#include "../../OrthancFramework/Sources/Images/IImageWriter.h"
+#include "../../OrthancFramework/Sources/Images/Image.h"
+#include "../../OrthancFramework/Sources/Images/ImageAccessor.h"
+#include "../../OrthancFramework/Sources/Images/ImageBuffer.h"
+#include "../../OrthancFramework/Sources/Images/ImageProcessing.h"
+#include "../../OrthancFramework/Sources/Images/ImageTraits.h"
+#include "../../OrthancFramework/Sources/Images/JpegErrorManager.h"
+#include "../../OrthancFramework/Sources/Images/JpegReader.h"
+#include "../../OrthancFramework/Sources/Images/JpegWriter.h"
+#include "../../OrthancFramework/Sources/Images/PamReader.h"
+#include "../../OrthancFramework/Sources/Images/PamWriter.h"
+#include "../../OrthancFramework/Sources/Images/PixelTraits.h"
+#include "../../OrthancFramework/Sources/Images/PngReader.h"
+#include "../../OrthancFramework/Sources/Images/PngWriter.h"
+#include "../../OrthancFramework/Sources/JobsEngine/GenericJobUnserializer.h"
+#include "../../OrthancFramework/Sources/JobsEngine/IJob.h"
+#include "../../OrthancFramework/Sources/JobsEngine/IJobUnserializer.h"
+#include "../../OrthancFramework/Sources/JobsEngine/JobInfo.h"
+#include "../../OrthancFramework/Sources/JobsEngine/JobStatus.h"
+#include "../../OrthancFramework/Sources/JobsEngine/JobStepResult.h"
+#include "../../OrthancFramework/Sources/JobsEngine/JobsEngine.h"
+#include "../../OrthancFramework/Sources/JobsEngine/JobsRegistry.h"
+#include "../../OrthancFramework/Sources/JobsEngine/Operations/IJobOperation.h"
+#include "../../OrthancFramework/Sources/JobsEngine/Operations/IJobOperationValue.h"
+#include "../../OrthancFramework/Sources/JobsEngine/Operations/JobOperationValues.h"
+#include "../../OrthancFramework/Sources/JobsEngine/Operations/LogJobOperation.h"
+#include "../../OrthancFramework/Sources/JobsEngine/Operations/NullOperationValue.h"
+#include "../../OrthancFramework/Sources/JobsEngine/Operations/SequenceOfOperationsJob.h"
+#include "../../OrthancFramework/Sources/JobsEngine/Operations/StringOperationValue.h"
+#include "../../OrthancFramework/Sources/JobsEngine/SetOfCommandsJob.h"
+#include "../../OrthancFramework/Sources/JobsEngine/SetOfInstancesJob.h"
+#include "../../OrthancFramework/Sources/Logging.h"
+#include "../../OrthancFramework/Sources/Lua/LuaContext.h"
+#include "../../OrthancFramework/Sources/Lua/LuaFunctionCall.h"
+#include "../../OrthancFramework/Sources/MallocMemoryBuffer.h"
+#include "../../OrthancFramework/Sources/MetricsRegistry.h"
+#include "../../OrthancFramework/Sources/MultiThreading/IRunnableBySteps.h"
+#include "../../OrthancFramework/Sources/MultiThreading/RunnableWorkersPool.h"
+#include "../../OrthancFramework/Sources/MultiThreading/Semaphore.h"
+#include "../../OrthancFramework/Sources/MultiThreading/SharedMessageQueue.h"
+#include "../../OrthancFramework/Sources/OrthancException.h"
+#include "../../OrthancFramework/Sources/OrthancFramework.h"
+#include "../../OrthancFramework/Sources/RestApi/RestApi.h"
+#include "../../OrthancFramework/Sources/RestApi/RestApiCall.h"
+#include "../../OrthancFramework/Sources/RestApi/RestApiCallDocumentation.h"
+#include "../../OrthancFramework/Sources/RestApi/RestApiDeleteCall.h"
+#include "../../OrthancFramework/Sources/RestApi/RestApiGetCall.h"
+#include "../../OrthancFramework/Sources/RestApi/RestApiHierarchy.h"
+#include "../../OrthancFramework/Sources/RestApi/RestApiOutput.h"
+#include "../../OrthancFramework/Sources/RestApi/RestApiPath.h"
+#include "../../OrthancFramework/Sources/RestApi/RestApiPostCall.h"
+#include "../../OrthancFramework/Sources/RestApi/RestApiPutCall.h"
+#include "../../OrthancFramework/Sources/SQLite/Connection.h"
+#include "../../OrthancFramework/Sources/SQLite/FunctionContext.h"
+#include "../../OrthancFramework/Sources/SQLite/IScalarFunction.h"
+#include "../../OrthancFramework/Sources/SQLite/ITransaction.h"
+#include "../../OrthancFramework/Sources/SQLite/NonCopyable.h"
+#include "../../OrthancFramework/Sources/SQLite/OrthancSQLiteException.h"
+#include "../../OrthancFramework/Sources/SQLite/SQLiteTypes.h"
+#include "../../OrthancFramework/Sources/SQLite/Statement.h"
+#include "../../OrthancFramework/Sources/SQLite/StatementId.h"
+#include "../../OrthancFramework/Sources/SQLite/StatementReference.h"
+#include "../../OrthancFramework/Sources/SQLite/Transaction.h"
+#include "../../OrthancFramework/Sources/SerializationToolbox.h"
+#include "../../OrthancFramework/Sources/SharedLibrary.h"
+#include "../../OrthancFramework/Sources/StringMemoryBuffer.h"
+#include "../../OrthancFramework/Sources/SystemToolbox.h"
+#include "../../OrthancFramework/Sources/TemporaryFile.h"
+#include "../../OrthancFramework/Sources/Toolbox.h"
+#include "../../OrthancFramework/Sources/WebServiceParameters.h"
+
+
+TEST(OrthancFramework, SizeOf)
+{
+#include "SizeOfTests.impl.h"
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OrthancServer/UnitTestsSources/SizeOfTests.impl.h	Mon Feb 22 18:30:31 2021 +0100
@@ -0,0 +1,113 @@
+  printf("sizeof(::Orthanc::BufferHttpSender) == %d\n", static_cast<int>(sizeof(::Orthanc::BufferHttpSender)));
+  printf("sizeof(::Orthanc::ChunkedBuffer) == %d\n", static_cast<int>(sizeof(::Orthanc::ChunkedBuffer)));
+  printf("sizeof(::Orthanc::DcmtkTranscoder) == %d\n", static_cast<int>(sizeof(::Orthanc::DcmtkTranscoder)));
+  printf("sizeof(::Orthanc::DeflateBaseCompressor) == %d\n", static_cast<int>(sizeof(::Orthanc::DeflateBaseCompressor)));
+  printf("sizeof(::Orthanc::Deprecated::MemoryCache) == %d\n", static_cast<int>(sizeof(::Orthanc::Deprecated::MemoryCache)));
+  printf("sizeof(::Orthanc::DicomArray) == %d\n", static_cast<int>(sizeof(::Orthanc::DicomArray)));
+  printf("sizeof(::Orthanc::DicomAssociationParameters) == %d\n", static_cast<int>(sizeof(::Orthanc::DicomAssociationParameters)));
+  printf("sizeof(::Orthanc::DicomElement) == %d\n", static_cast<int>(sizeof(::Orthanc::DicomElement)));
+  printf("sizeof(::Orthanc::DicomFindAnswers) == %d\n", static_cast<int>(sizeof(::Orthanc::DicomFindAnswers)));
+  printf("sizeof(::Orthanc::DicomImageDecoder) == %d\n", static_cast<int>(sizeof(::Orthanc::DicomImageDecoder)));
+  printf("sizeof(::Orthanc::DicomImageInformation) == %d\n", static_cast<int>(sizeof(::Orthanc::DicomImageInformation)));
+  printf("sizeof(::Orthanc::DicomInstanceHasher) == %d\n", static_cast<int>(sizeof(::Orthanc::DicomInstanceHasher)));
+  printf("sizeof(::Orthanc::DicomMap) == %d\n", static_cast<int>(sizeof(::Orthanc::DicomMap)));
+  printf("sizeof(::Orthanc::DicomModification) == %d\n", static_cast<int>(sizeof(::Orthanc::DicomModification)));
+  printf("sizeof(::Orthanc::DicomStoreUserConnection) == %d\n", static_cast<int>(sizeof(::Orthanc::DicomStoreUserConnection)));
+  printf("sizeof(::Orthanc::DicomStreamReader) == %d\n", static_cast<int>(sizeof(::Orthanc::DicomStreamReader)));
+  printf("sizeof(::Orthanc::DicomTag) == %d\n", static_cast<int>(sizeof(::Orthanc::DicomTag)));
+  printf("sizeof(::Orthanc::DicomValue) == %d\n", static_cast<int>(sizeof(::Orthanc::DicomValue)));
+  printf("sizeof(::Orthanc::DicomWebJsonVisitor) == %d\n", static_cast<int>(sizeof(::Orthanc::DicomWebJsonVisitor)));
+  printf("sizeof(::Orthanc::FileBuffer) == %d\n", static_cast<int>(sizeof(::Orthanc::FileBuffer)));
+  printf("sizeof(::Orthanc::FileInfo) == %d\n", static_cast<int>(sizeof(::Orthanc::FileInfo)));
+  printf("sizeof(::Orthanc::FilesystemHttpSender) == %d\n", static_cast<int>(sizeof(::Orthanc::FilesystemHttpSender)));
+  printf("sizeof(::Orthanc::FilesystemStorage) == %d\n", static_cast<int>(sizeof(::Orthanc::FilesystemStorage)));
+  printf("sizeof(::Orthanc::Font) == %d\n", static_cast<int>(sizeof(::Orthanc::Font)));
+  printf("sizeof(::Orthanc::FontRegistry) == %d\n", static_cast<int>(sizeof(::Orthanc::FontRegistry)));
+  printf("sizeof(::Orthanc::FromDcmtkBridge) == %d\n", static_cast<int>(sizeof(::Orthanc::FromDcmtkBridge)));
+  printf("sizeof(::Orthanc::GenericJobUnserializer) == %d\n", static_cast<int>(sizeof(::Orthanc::GenericJobUnserializer)));
+  printf("sizeof(::Orthanc::GzipCompressor) == %d\n", static_cast<int>(sizeof(::Orthanc::GzipCompressor)));
+  printf("sizeof(::Orthanc::HierarchicalZipWriter) == %d\n", static_cast<int>(sizeof(::Orthanc::HierarchicalZipWriter)));
+  printf("sizeof(::Orthanc::HttpClient) == %d\n", static_cast<int>(sizeof(::Orthanc::HttpClient)));
+  printf("sizeof(::Orthanc::HttpContentNegociation) == %d\n", static_cast<int>(sizeof(::Orthanc::HttpContentNegociation)));
+  printf("sizeof(::Orthanc::HttpFileSender) == %d\n", static_cast<int>(sizeof(::Orthanc::HttpFileSender)));
+  printf("sizeof(::Orthanc::HttpOutput) == %d\n", static_cast<int>(sizeof(::Orthanc::HttpOutput)));
+  printf("sizeof(::Orthanc::HttpServer) == %d\n", static_cast<int>(sizeof(::Orthanc::HttpServer)));
+  printf("sizeof(::Orthanc::HttpStreamTranscoder) == %d\n", static_cast<int>(sizeof(::Orthanc::HttpStreamTranscoder)));
+  printf("sizeof(::Orthanc::HttpToolbox) == %d\n", static_cast<int>(sizeof(::Orthanc::HttpToolbox)));
+  printf("sizeof(::Orthanc::IBufferCompressor) == %d\n", static_cast<int>(sizeof(::Orthanc::IBufferCompressor)));
+  printf("sizeof(::Orthanc::IDicomTranscoder) == %d\n", static_cast<int>(sizeof(::Orthanc::IDicomTranscoder)));
+  printf("sizeof(::Orthanc::IDicomTranscoder::DicomImage) == %d\n", static_cast<int>(sizeof(::Orthanc::IDicomTranscoder::DicomImage)));
+  printf("sizeof(::Orthanc::IDynamicObject) == %d\n", static_cast<int>(sizeof(::Orthanc::IDynamicObject)));
+  printf("sizeof(::Orthanc::IImageWriter) == %d\n", static_cast<int>(sizeof(::Orthanc::IImageWriter)));
+  printf("sizeof(::Orthanc::IJob) == %d\n", static_cast<int>(sizeof(::Orthanc::IJob)));
+  printf("sizeof(::Orthanc::IJobOperation) == %d\n", static_cast<int>(sizeof(::Orthanc::IJobOperation)));
+  printf("sizeof(::Orthanc::IJobOperationValue) == %d\n", static_cast<int>(sizeof(::Orthanc::IJobOperationValue)));
+  printf("sizeof(::Orthanc::IJobUnserializer) == %d\n", static_cast<int>(sizeof(::Orthanc::IJobUnserializer)));
+  printf("sizeof(::Orthanc::Image) == %d\n", static_cast<int>(sizeof(::Orthanc::Image)));
+  printf("sizeof(::Orthanc::ImageAccessor) == %d\n", static_cast<int>(sizeof(::Orthanc::ImageAccessor)));
+  printf("sizeof(::Orthanc::ImageBuffer) == %d\n", static_cast<int>(sizeof(::Orthanc::ImageBuffer)));
+  printf("sizeof(::Orthanc::ImageProcessing) == %d\n", static_cast<int>(sizeof(::Orthanc::ImageProcessing)));
+  printf("sizeof(::Orthanc::ImageProcessing::ImagePoint) == %d\n", static_cast<int>(sizeof(::Orthanc::ImageProcessing::ImagePoint)));
+  printf("sizeof(::Orthanc::JobInfo) == %d\n", static_cast<int>(sizeof(::Orthanc::JobInfo)));
+  printf("sizeof(::Orthanc::JobOperationValues) == %d\n", static_cast<int>(sizeof(::Orthanc::JobOperationValues)));
+  printf("sizeof(::Orthanc::JobStepResult) == %d\n", static_cast<int>(sizeof(::Orthanc::JobStepResult)));
+  printf("sizeof(::Orthanc::JobsEngine) == %d\n", static_cast<int>(sizeof(::Orthanc::JobsEngine)));
+  printf("sizeof(::Orthanc::JobsRegistry) == %d\n", static_cast<int>(sizeof(::Orthanc::JobsRegistry)));
+  printf("sizeof(::Orthanc::JobsRegistry::IObserver) == %d\n", static_cast<int>(sizeof(::Orthanc::JobsRegistry::IObserver)));
+  printf("sizeof(::Orthanc::JobsRegistry::RunningJob) == %d\n", static_cast<int>(sizeof(::Orthanc::JobsRegistry::RunningJob)));
+  printf("sizeof(::Orthanc::JpegReader) == %d\n", static_cast<int>(sizeof(::Orthanc::JpegReader)));
+  printf("sizeof(::Orthanc::JpegWriter) == %d\n", static_cast<int>(sizeof(::Orthanc::JpegWriter)));
+  printf("sizeof(::Orthanc::LogJobOperation) == %d\n", static_cast<int>(sizeof(::Orthanc::LogJobOperation)));
+  printf("sizeof(::Orthanc::Logging::InternalLogger) == %d\n", static_cast<int>(sizeof(::Orthanc::Logging::InternalLogger)));
+  printf("sizeof(::Orthanc::LuaContext) == %d\n", static_cast<int>(sizeof(::Orthanc::LuaContext)));
+  printf("sizeof(::Orthanc::LuaFunctionCall) == %d\n", static_cast<int>(sizeof(::Orthanc::LuaFunctionCall)));
+  printf("sizeof(::Orthanc::MemoryObjectCache) == %d\n", static_cast<int>(sizeof(::Orthanc::MemoryObjectCache)));
+  printf("sizeof(::Orthanc::MemoryStringCache) == %d\n", static_cast<int>(sizeof(::Orthanc::MemoryStringCache)));
+  printf("sizeof(::Orthanc::MetricsRegistry) == %d\n", static_cast<int>(sizeof(::Orthanc::MetricsRegistry)));
+  printf("sizeof(::Orthanc::MetricsRegistry::ActiveCounter) == %d\n", static_cast<int>(sizeof(::Orthanc::MetricsRegistry::ActiveCounter)));
+  printf("sizeof(::Orthanc::MetricsRegistry::SharedMetrics) == %d\n", static_cast<int>(sizeof(::Orthanc::MetricsRegistry::SharedMetrics)));
+  printf("sizeof(::Orthanc::MetricsRegistry::Timer) == %d\n", static_cast<int>(sizeof(::Orthanc::MetricsRegistry::Timer)));
+  printf("sizeof(::Orthanc::MultipartStreamReader) == %d\n", static_cast<int>(sizeof(::Orthanc::MultipartStreamReader)));
+  printf("sizeof(::Orthanc::NullOperationValue) == %d\n", static_cast<int>(sizeof(::Orthanc::NullOperationValue)));
+  printf("sizeof(::Orthanc::OrthancException) == %d\n", static_cast<int>(sizeof(::Orthanc::OrthancException)));
+  printf("sizeof(::Orthanc::PamReader) == %d\n", static_cast<int>(sizeof(::Orthanc::PamReader)));
+  printf("sizeof(::Orthanc::PamWriter) == %d\n", static_cast<int>(sizeof(::Orthanc::PamWriter)));
+  printf("sizeof(::Orthanc::ParsedDicomCache) == %d\n", static_cast<int>(sizeof(::Orthanc::ParsedDicomCache)));
+  printf("sizeof(::Orthanc::ParsedDicomCache::Accessor) == %d\n", static_cast<int>(sizeof(::Orthanc::ParsedDicomCache::Accessor)));
+  printf("sizeof(::Orthanc::ParsedDicomDir) == %d\n", static_cast<int>(sizeof(::Orthanc::ParsedDicomDir)));
+  printf("sizeof(::Orthanc::ParsedDicomFile) == %d\n", static_cast<int>(sizeof(::Orthanc::ParsedDicomFile)));
+  printf("sizeof(::Orthanc::PngReader) == %d\n", static_cast<int>(sizeof(::Orthanc::PngReader)));
+  printf("sizeof(::Orthanc::PngWriter) == %d\n", static_cast<int>(sizeof(::Orthanc::PngWriter)));
+  printf("sizeof(::Orthanc::RemoteModalityParameters) == %d\n", static_cast<int>(sizeof(::Orthanc::RemoteModalityParameters)));
+  printf("sizeof(::Orthanc::RestApiHierarchy) == %d\n", static_cast<int>(sizeof(::Orthanc::RestApiHierarchy)));
+  printf("sizeof(::Orthanc::RestApiHierarchy::Resource) == %d\n", static_cast<int>(sizeof(::Orthanc::RestApiHierarchy::Resource)));
+  printf("sizeof(::Orthanc::RestApiPath) == %d\n", static_cast<int>(sizeof(::Orthanc::RestApiPath)));
+  printf("sizeof(::Orthanc::SQLite::Connection) == %d\n", static_cast<int>(sizeof(::Orthanc::SQLite::Connection)));
+  printf("sizeof(::Orthanc::SQLite::FunctionContext) == %d\n", static_cast<int>(sizeof(::Orthanc::SQLite::FunctionContext)));
+  printf("sizeof(::Orthanc::SQLite::Statement) == %d\n", static_cast<int>(sizeof(::Orthanc::SQLite::Statement)));
+  printf("sizeof(::Orthanc::SQLite::StatementId) == %d\n", static_cast<int>(sizeof(::Orthanc::SQLite::StatementId)));
+  printf("sizeof(::Orthanc::SQLite::StatementReference) == %d\n", static_cast<int>(sizeof(::Orthanc::SQLite::StatementReference)));
+  printf("sizeof(::Orthanc::SQLite::Transaction) == %d\n", static_cast<int>(sizeof(::Orthanc::SQLite::Transaction)));
+  printf("sizeof(::Orthanc::Semaphore) == %d\n", static_cast<int>(sizeof(::Orthanc::Semaphore)));
+  printf("sizeof(::Orthanc::SequenceOfOperationsJob) == %d\n", static_cast<int>(sizeof(::Orthanc::SequenceOfOperationsJob)));
+  printf("sizeof(::Orthanc::SequenceOfOperationsJob::IObserver) == %d\n", static_cast<int>(sizeof(::Orthanc::SequenceOfOperationsJob::IObserver)));
+  printf("sizeof(::Orthanc::SequenceOfOperationsJob::Lock) == %d\n", static_cast<int>(sizeof(::Orthanc::SequenceOfOperationsJob::Lock)));
+  printf("sizeof(::Orthanc::SerializationToolbox) == %d\n", static_cast<int>(sizeof(::Orthanc::SerializationToolbox)));
+  printf("sizeof(::Orthanc::SetOfCommandsJob) == %d\n", static_cast<int>(sizeof(::Orthanc::SetOfCommandsJob)));
+  printf("sizeof(::Orthanc::SetOfInstancesJob) == %d\n", static_cast<int>(sizeof(::Orthanc::SetOfInstancesJob)));
+  printf("sizeof(::Orthanc::SharedArchive) == %d\n", static_cast<int>(sizeof(::Orthanc::SharedArchive)));
+  printf("sizeof(::Orthanc::SharedArchive::Accessor) == %d\n", static_cast<int>(sizeof(::Orthanc::SharedArchive::Accessor)));
+  printf("sizeof(::Orthanc::SharedLibrary) == %d\n", static_cast<int>(sizeof(::Orthanc::SharedLibrary)));
+  printf("sizeof(::Orthanc::SharedMessageQueue) == %d\n", static_cast<int>(sizeof(::Orthanc::SharedMessageQueue)));
+  printf("sizeof(::Orthanc::StorageAccessor) == %d\n", static_cast<int>(sizeof(::Orthanc::StorageAccessor)));
+  printf("sizeof(::Orthanc::StreamBlockReader) == %d\n", static_cast<int>(sizeof(::Orthanc::StreamBlockReader)));
+  printf("sizeof(::Orthanc::StringMatcher) == %d\n", static_cast<int>(sizeof(::Orthanc::StringMatcher)));
+  printf("sizeof(::Orthanc::StringOperationValue) == %d\n", static_cast<int>(sizeof(::Orthanc::StringOperationValue)));
+  printf("sizeof(::Orthanc::SystemToolbox) == %d\n", static_cast<int>(sizeof(::Orthanc::SystemToolbox)));
+  printf("sizeof(::Orthanc::TemporaryFile) == %d\n", static_cast<int>(sizeof(::Orthanc::TemporaryFile)));
+  printf("sizeof(::Orthanc::Toolbox) == %d\n", static_cast<int>(sizeof(::Orthanc::Toolbox)));
+  printf("sizeof(::Orthanc::Toolbox::LinesIterator) == %d\n", static_cast<int>(sizeof(::Orthanc::Toolbox::LinesIterator)));
+  printf("sizeof(::Orthanc::WebServiceParameters) == %d\n", static_cast<int>(sizeof(::Orthanc::WebServiceParameters)));
+  printf("sizeof(::Orthanc::ZipReader) == %d\n", static_cast<int>(sizeof(::Orthanc::ZipReader)));
+  printf("sizeof(::Orthanc::ZipWriter) == %d\n", static_cast<int>(sizeof(::Orthanc::ZipWriter)));
+  printf("sizeof(::Orthanc::ZlibCompressor) == %d\n", static_cast<int>(sizeof(::Orthanc::ZlibCompressor)));