# HG changeset patch # User Sebastien Jodogne # Date 1719932756 -7200 # Node ID 14af12f73fb51952b9517ca30a852d1fd4617952 # Parent 08ea8401f7b205a953690bee57bdc3175d247616 added CodeGeneration/README.txt diff -r 08ea8401f7b2 -r 14af12f73fb5 CodeGeneration/README.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CodeGeneration/README.txt Tue Jul 02 17:05:56 2024 +0200 @@ -0,0 +1,26 @@ + +Introduction +============ + +This folder contains the two Python scripts that analyze the header of +the Orthanc Plugin SDK using clang, then extract the code model of the +SDK as a JSON file, and finally create the Java wrapper. + +The code model is written to: ../CodeGeneration/CodeModel.json + +The Java wrapper is written to: ../JavaSDK/be/uclouvain/orthanc/ + +The C++ interface is written to: ../Plugin/NativeSDK.cpp + +Note that the generated code model is also used in the orthanc-python +project, starting with its release 4.3. + + +Usage on Ubuntu 22.04 +===================== + +$ sudo apt-get install python3-clang-14 python3-pystache +$ python3 ./ParseOrthancSDK.py --libclang=libclang-14.so.1 \ + --source ../Resources/Orthanc/Sdk-1.10.0/orthanc/OrthancCPlugin.h \ + --target ./CodeModel.json +$ python3 ./CodeGeneration.py --source ./CodeModel.json