diff --git a/.github/resources/default-linux b/.github/resources/default-linux deleted file mode 100644 index 520ea74..0000000 --- a/.github/resources/default-linux +++ /dev/null @@ -1,12 +0,0 @@ -[settings] -arch=x86_64 -build_type=Release -compiler=gcc -compiler.cppstd=gnu17 -compiler.libcxx=libstdc++11 -compiler.version=11 -os=Linux -popsift/*:build_type=Release -[conf] -tools.system.package_manager:mode=install -tools.system.package_manager:sudo=True \ No newline at end of file diff --git a/.github/resources/default-windows b/.github/resources/default-windows deleted file mode 100644 index 5146bd2..0000000 --- a/.github/resources/default-windows +++ /dev/null @@ -1,11 +0,0 @@ -[settings] -arch=x86_64 -build_type=Release -compiler=msvc -compiler.cppstd=17 -compiler.runtime=dynamic -compiler.version=192 -compiler.cppstd=17 -os=Windows -[conf] -tools.system.package_manager:mode=install diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index d66a245..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,305 +0,0 @@ -name: XPCF CI -run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 -on: - push: - branches: - - develop - - feature/test_new_remotes - - feature/boost_1.84.0 - tags: - - '[0-9]+\.[0-9]+\.[0-9]+' - -env: - tag_version: ${{ github.ref_name == 'develop' && '0.0.0' || github.ref_name }} - -jobs: - windows-ci: - # disable Windows CI - issue with boost fiber : error in shared in boost https://github.com/boostorg/fiber/issues/314 , boost fiber disabled in conan (https://github.com/conan-io/conan-center-index/commit/a73631858a3ee5911cab99e69bac9bcccd2b84fe) - if: false - runs-on: windows-2019 - steps: - # Xpcf - - name: Xpcf code download - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - # Generate xpcf files - - name: Generate xpcf files - run: ./scripts/win/update_version.bat -v ${{ env.tag_version }} - - # Pkgconfig - - name: Pkgconfig - run: choco install -yr --acceptlicense --no-progress --allow-empty-checksums pkgconfiglite - - # Visual Studio 2019 Enterprise comes with the github image windows-2019 - - # Conan v2.2.2 - # - Install - - run: pip install --upgrade conan==2.2.2 - - run: echo "C:\Program Files\Conan\conan" | Out-File -Append -FilePath $Env:GITHUB_PATH -Encoding utf8 - - run: conan --version - - # - run: conan --version - # - Configuration - - run: conan remote add --index 0 conan-solar https://repository.solarframework.org/conan - - run: copy ${{ github.workspace }}/.github/resources/default-windows ./default - - name: conan profile configuration - run: conan config install ./default -tf profiles - # - run: conan profile show default - - # Remaken v1.10.0 - # - Install - - uses: suisei-cn/actions-download-file@v1.3.0 - id: downloadfile # Remember to give an ID if you need the output filename - name: Download the file - with: - url: "https://github.com/b-com-software-basis/remaken/releases/download/1.10.0%2Fwin/Setup_Remaken.exe" - target: ./ - - run: .\Setup_Remaken.exe /S - # - configuration - - run: echo "c:\Program Files\Remaken\" | Out-File -Append -FilePath $Env:GITHUB_PATH -Encoding utf8 - # - run: remaken.exe profile display - - # Qt tools: qmake and jom - - name: install aqt - run: choco install aqt - - name: install Qt kit 5.15.2 msvc2019 64b - run: aqt install-qt windows desktop 5.15.2 win64_msvc2019_64 -O ${{ github.workspace }}/tools/Qt - - name: install jom - uses: suisei-cn/actions-download-file@v1.3.0 - id: downloadJom - with: - url: "http://download.qt.io/official_releases/jom/jom.zip" - target: ./ - - - name: install QtCreator - run: aqt install-tool windows desktop tools_qtcreator -O ${{ github.workspace }}/tools/Qt - - run: echo "${{ github.workspace }}/tools/Qt/5.15.2/msvc2019_64/bin" | Out-File -Append -FilePath $Env:GITHUB_PATH -Encoding utf8 - - # Delete previous latest version - - name: delete previous latest version - uses: dev-drprasad/delete-tag-and-release@v1.0 - with: - tag_name: xpcf/${{ env.tag_version }}/win - github_token: ${{ secrets.GITHUB_TOKEN }} - delete_release: true - - name: delete previous latest version - uses: dev-drprasad/delete-tag-and-release@v1.0 - with: - tag_name: xpcf_static_deps/${{ env.tag_version }}/win - github_token: ${{ secrets.GITHUB_TOKEN }} - delete_release: true - - # Build solution - # - run: dir "${{ github.workspace }}\tools\Qt\Tools\qtcreator\bin\jom" - # - working-directory: ./scripts/win - # run: .\build_remaken_project_package.bat xpcf shared ..\.. 5.15.2 "${{ github.workspace }}\tools\Qt\5.15.2\msvc2019_64\bin" "${{ github.workspace }}\tools\Qt\Tools\qtcreator\bin\jom" - - working-directory: ./scripts/win - run: .\build_remaken_project_package.bat xpcf static ..\.. 5.15.2 "${{ github.workspace }}\tools\Qt\5.15.2\msvc2019_64\bin" "${{ github.workspace }}\tools\Qt\Tools\qtcreator\bin\jom" - - working-directory: ./scripts/win - run: .\build_remaken_project_package.bat xpcf_static_deps shared ..\.. 5.15.2 "${{ github.workspace }}\tools\Qt\5.15.2\msvc2019_64\bin" "${{ github.workspace }}\tools\Qt\Tools\qtcreator\bin\jom" - - # zip results - - name: compress archives - run: | - 7z a -tzip xpcf_${{ env.tag_version }}_x86_64_static_release.zip $env:USERPROFILE\.remaken\packages\win-cl-14.1\static\release\xpcf_${{ env.tag_version }}\xpcf >NUL - 7z a -tzip xpcf_static_deps_${{ env.tag_version }}_x86_64_shared_release.zip $env:USERPROFILE\.remaken\packages\win-cl-14.1\shared\release\xpcf_static_deps_${{ env.tag_version }}\xpcf_static_deps >NUL - 7z a -tzip xpcf_${{ env.tag_version }}_x86_64_static_debug.zip $env:USERPROFILE\.remaken\packages\win-cl-14.1\static\debug\xpcf_${{ env.tag_version }}\xpcf >NUL - 7z a -tzip xpcf_static_deps_${{ env.tag_version }}_x86_64_shared_debug.zip $env:USERPROFILE\.remaken\packages\win-cl-14.1\shared\debug\xpcf_static_deps_${{ env.tag_version }}\xpcf_static_deps >NUL - - # 7z a -tzip xpcf_${{ env.tag_version }}_x86_64_shared_release.zip $env:USERPROFILE\.remaken\packages\win-cl-14.1\shared\release\xpcf_${{ env.tag_version }}\xpcf >NUL - # 7z a -tzip xpcf_${{ env.tag_version }}_x86_64_shared_debug.zip $env:USERPROFILE\.remaken\packages\win-cl-14.1\shared\debug\xpcf_${{ env.tag_version }}\xpcf >NUL - - - uses: "marvinpinto/action-automatic-releases@latest" - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - automatic_release_tag: xpcf/${{ env.tag_version }}/win - prerelease: true - title: xpcf/${{ env.tag_version }}/win - files: | - xpcf_${{ env.tag_version }}_* - - - uses: "marvinpinto/action-automatic-releases@latest" - with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: xpcf_static_deps/${{ env.tag_version }}/win - prerelease: true - title: xpcf_static_deps/${{ env.tag_version }}/win - files: | - xpcf_static_deps_${{ env.tag_version }}_* - - linux-ci: - runs-on: ubuntu-22.04 - steps: - # Xpcf - - name: Xpcf code download - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - # xpcf - #################################################### - - # Generate xpcf files - - name: Generate xpcf files - run: ./scripts/unixes/update_version.sh -v ${{ env.tag_version }} - - # Pkgconfig - - name: Pkgconfig - run: pip install pkgconfig - # - run: pkg-config --version - - # Remaken - - uses: suisei-cn/actions-download-file@v1.3.0 - id: downloadfile # Remember to give an ID if you need the output filename - name: Download Linux setup - with: - url: "https://github.com/b-com-software-basis/remaken/releases/download/1.10.0%2Funixes/remaken-ubuntu22.04" - target: . - # - run: echo "./remaken" >> $GITHUB_PATH - - run: mv ./remaken-ubuntu22.04 ./remaken - - run: chmod +x ./remaken - - run: ls -al . - - # Conan - - name: Conan - run: pip install --upgrade conan==2.2.2 - - run: conan --version - - # Qt tools: qmake and jom - - run: sudo apt-get update - - run: sudo apt-get install qtbase5-dev - # - run: qmake --help - - # Conan v2.2.2 - # - Configuration - - run: conan remote add --index 0 conan-solar https://repository.solarframework.org/conan - - run: cp ${{ github.workspace }}/.github/resources/default-linux ./default - - name: conan profile configuration - run: conan config install ./default -tf profiles - - run: conan profile show - - # Delete previous latest version xpcf - - name: delete previous latest version - uses: dev-drprasad/delete-tag-and-release@v1.0 - with: - tag_name: xpcf/${{ env.tag_version }}/linux - github_token: ${{ secrets.GITHUB_TOKEN }} - delete_release: true - - # Delete previous latest version xpcf_static_deps - - name: delete previous latest version - uses: dev-drprasad/delete-tag-and-release@v1.0 - with: - tag_name: xpcf_static_deps/${{ env.tag_version }}/linux - github_token: ${{ secrets.GITHUB_TOKEN }} - delete_release: true - - # Install dependencies - - run: ./remaken init - - run: ./remaken profile init --cpp-std 17 -b gcc -o linux -a x86_64 - - run: ./remaken profile init --cpp-std 17 -b gcc -o linux -a x86_64 -c debug - - run: ./remaken install -c debug -m static --cpp-std 17 -b gcc -o linux -a x86_64 - - run: ./remaken install -m static --cpp-std 17 -b gcc -o linux -a x86_64 - - # Build solution - - working-directory: ./scripts/unixes - run: ./build_remaken_project_package.sh xpcf static ../.. 5.15.2 /usr/bin - - working-directory: ./scripts/unixes - run: ./build_remaken_project_package.sh xpcf shared ../.. 5.15.2 /usr/bin - - working-directory: ./scripts/unixes - run: ./build_remaken_project_package.sh xpcf_static_deps shared ../.. 5.15.2 /usr/bin - - # Zip results - - run: ls -al ../../../.remaken/packages/linux-gcc/shared/release/xpcf_${{ env.tag_version }} - - name: compress xpcf shared release - working-directory: ../../../.remaken/packages/linux-gcc/shared/release/xpcf_${{ env.tag_version }} - run: zip -r -y xpcf_${{ env.tag_version }}_x86_64_shared_release.zip xpcf - - run: ls -al ../../../.remaken/packages/linux-gcc/static/release/xpcf_${{ env.tag_version }} - - name: compress xpcf static release - working-directory: ../../../.remaken/packages/linux-gcc/static/release/xpcf_${{ env.tag_version }} - run: zip -r -y xpcf_${{ env.tag_version }}_x86_64_static_release.zip xpcf - - name: compress xpcf_static_deps shared release - working-directory: ../../../.remaken/packages/linux-gcc/shared/release/xpcf_static_deps_${{ env.tag_version }} - run: zip -r -y xpcf_static_deps_${{ env.tag_version }}_x86_64_shared_release.zip xpcf_static_deps - - run: ls -al ../../../.remaken/packages/linux-gcc/shared/debug/xpcf_${{ env.tag_version }} - - name: compress xpcf shared debug - working-directory: ../../../.remaken/packages/linux-gcc/shared/debug/xpcf_${{ env.tag_version }} - run: zip -r -y xpcf_${{ env.tag_version }}_x86_64_shared_debug.zip xpcf - - run: ls -al ../../../.remaken/packages/linux-gcc/static/debug/xpcf_${{ env.tag_version }} - - name: compress xpcf static debug - working-directory: ../../../.remaken/packages/linux-gcc/static/debug/xpcf_${{ env.tag_version }} - run: zip -r -y xpcf_${{ env.tag_version }}_x86_64_static_debug.zip xpcf - - name: compress xpcf_static_deps shared debug - working-directory: ../../../.remaken/packages/linux-gcc/shared/debug/xpcf_static_deps_${{ env.tag_version }} - run: zip -r -y xpcf_static_deps_${{ env.tag_version }}_x86_64_shared_debug.zip xpcf_static_deps - - # Create release for xpcf - - run: ls -al ../../../.remaken/packages/linux-gcc/shared/release/xpcf_${{ env.tag_version }} - - run: ls -al ../../../.remaken/packages/linux-gcc/static/release/xpcf_${{ env.tag_version }} - - run: ls -al ../../../.remaken/packages/linux-gcc/shared/debug/xpcf_${{ env.tag_version }} - - run: ls -al ../../../.remaken/packages/linux-gcc/static/debug/xpcf_${{ env.tag_version }} - - uses: "marvinpinto/action-automatic-releases@latest" - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - automatic_release_tag: xpcf/${{ env.tag_version }}/linux - prerelease: true - title: xpcf/${{ env.tag_version }}/linux - files: | - ../../../.remaken/packages/linux-gcc/shared/release/xpcf_${{ env.tag_version }}/xpcf_${{ env.tag_version }}_x86_64_* - ../../../.remaken/packages/linux-gcc/static/release/xpcf_${{ env.tag_version }}/xpcf_${{ env.tag_version }}_x86_64_* - ../../../.remaken/packages/linux-gcc/shared/debug/xpcf_${{ env.tag_version }}/xpcf_${{ env.tag_version }}_x86_64_* - ../../../.remaken/packages/linux-gcc/static/debug/xpcf_${{ env.tag_version }}/xpcf_${{ env.tag_version }}_x86_64_* - - # Create release for xpcf_static_deps - - uses: "marvinpinto/action-automatic-releases@latest" - with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: xpcf_static_deps/${{ env.tag_version }}/linux - prerelease: true - title: xpcf_static_deps/${{ env.tag_version }}/linux - files: | - ../../../.remaken/packages/linux-gcc/shared/release/xpcf_static_deps_${{ env.tag_version }}/xpcf_static_deps_${{ env.tag_version }}_* - ../../../.remaken/packages/linux-gcc/shared/debug/xpcf_static_deps_${{ env.tag_version }}/xpcf_static_deps_${{ env.tag_version }}_* - - # xpcf_grpc_gen - #################################################### - - # Build cppast - - working-directory: ./libs - run: ./build_cppast.sh - - # Install dependencies - # - run: ./remaken init - # - run: ./remaken profile init --cpp-std 17 -b gcc -o linux -a x86_64 - # - run: ./remaken profile init --cpp-std 17 -b gcc -o linux -a x86_64 -c debug - - run: ./remaken install -v -m static --cpp-std 17 -b gcc -o linux -a x86_64 ./tools/generators/grpc/packagedependencies.txt - - run: ./remaken install -v -m static --cpp-std 17 -b gcc -o linux -a x86_64 -c debug ./tools/generators/grpc/packagedependencies.txt - - # Build xpcf_grpc_gen - - working-directory: ./scripts/unixes - run: ./build_remaken_project_package.sh xpcf_grpc_gen static ../../tools/generators/grpc 5.15.2 /usr/bin - - # Delete previous latest version - - name: delete previous latest version - uses: dev-drprasad/delete-tag-and-release@v1.0 - with: - tag_name: xpcf_grpc_gen/${{ env.tag_version }}/linux - github_token: ${{ secrets.GITHUB_TOKEN }} - delete_release: true - - # Compress result - - name: compress xpcf_grpc static release - working-directory: ../../../.remaken/packages/linux-gcc/static/release/xpcf_grpc_gen_${{ env.tag_version }} - run: zip -r -y xpcf_grpc_gen_${{ env.tag_version }}_x86_64_static_release.zip xpcf_grpc_gen - - # Create release for xpcf_static_deps - - uses: "marvinpinto/action-automatic-releases@latest" - with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: xpcf_grpc_gen/${{ env.tag_version }}/linux - prerelease: true - title: xpcf_grpc_gen/${{ env.tag_version }}/linux - files: | - ../../../.remaken/packages/linux-gcc/static/release/xpcf_grpc_gen_${{ env.tag_version }}/xpcf_grpc_gen_${{ env.tag_version }}_* diff --git a/.gitignore b/.gitignore deleted file mode 100644 index d5a95a5..0000000 --- a/.gitignore +++ /dev/null @@ -1,90 +0,0 @@ -# C++ objects and libs -*.slo -*.lo -*.o -*.a -*.la -*.lai -*.so -*.so.* -*.dll -*.dylib - -# Qt-es -object_script.*.Release -object_script.*.Debug -*_plugin_import.cpp -/.qmake.cache -/.qmake.stash -*.pro.user -*.pro.user.* -*.qbs.user -*.qbs.user.* -*.moc -moc_*.cpp -moc_*.h -qrc_*.cpp -ui_*.h -*.qmlc -*.jsc -Makefile* -*build-* -build/ -*.qm -*.prl - -# Qt unit tests -target_wrapper.* - -# QtCreator -*.autosave - -# QtCreator Qml -*.qmlproject.user -*.qmlproject.user.* - -# QtCreator CMake -CMakeLists.txt.user* - -# QtCreator local machine specific files for imported projects -*creator.user* - -*_qmlcache.qrc - -# Template files -samples/sample_component/packagedependencies.txt -samples/xpcfHelloConfigurable/packagedependencies.txt -samples/xpcfHelloInjectableAdapter/packagedependencies.txt -samples/xpcfHelloPeople/packagedependencies.txt -samples/xpcfHelloWithAllComponents/packagedependencies.txt -samples/xpcfHelloWorld/packagedependencies.txt -samples/xpcfSampleRunner/packagedependencies.txt -scripts/swig/packagedependencies.txt -scripts/unixes/build_xpcf_grpc_test_sample.sh -scripts/unixes/package_xpcf.sh -scripts/unixes/xpcf_grpc_gen_bin* -scripts/win/package_xpcf.bat -test/xpcf_registry_test.xml -test/xpcf_xml_test_missing_end_tag.xml -test/xpcf_xml_test_missing_start_tag.xml -test/xpcf_xml_test_module_uuid_format_ko.xml -test/xpcf_xml_test_property_type_invalid.xml -test/xpcf_xml_test_property_unknown_component.xml -test/xpcf_xml_test_unknown_component.xml -test/xpcf_xml_test_unknown_property.xml -test/xpcf_xml_test_valid.xml -tools/generators/grpc/ProjectGenerator.cpp -tools/generators/grpc/packagedependencies.txt -tools/generators/grpc/xpcf_grpc_gen.cpp -tools/packagedependencies.txt -tools/cli/packagedependencies.txt -tools/xpcf_grpc_client/grpc_client_sample.xml -tools/xpcf_grpc_client/packagedependencies.txt -tools/xpcf_grpc_client/xpcfGrpcSampleComponentClient.xml -tools/xpcf_grpc_server/grpc_server_sample.xml -tools/xpcf_grpc_server/packagedependencies.txt -tools/xpcf_grpc_server/xpcfGrpcSampleComponentServer.xml -version.pri - -*conanbuild*.sh -*conanrun*.sh \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index eb685de..88d3c60 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,3 @@ [submodule "builddefs/qmake"] path = builddefs/qmake url=https://github.com/b-com-software-basis/builddefs-qmake.git -[submodule "libs/stduuid"] - path = libs/stduuid - url = https://github.com/mariusbancila/stduuid.git -[submodule "libs/cppast"] - path = libs/cppast - url = https://github.com/b-com-software-basis/cppast.git diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 581aaab..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - // Use IntelliSense to find out which attributes exist for C# debugging - // Use hover for the description of the existing attributes - // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md - "name": ".NET Core Launch (console)", - "type": "coreclr", - "request": "launch", - "preLaunchTask": "build", - // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/scripts/swig/test/bin/Debug/net6.0/testXpcfCsharp.dll", - "args": [], - "cwd": "${workspaceFolder}/scripts/swig/test", - // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console - "console": "internalConsole", - "stopAtEntry": false, - "env": { - "DYLD_LIBRARY_PATH": "bin/Debug/net6.0/." - }, - "nativeDebugging": true - }, - { - "name": ".NET Core Attach", - "type": "coreclr", - "request": "attach" - } - ] -} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index e9b6270..0000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "version": "2.0.0", - "tasks": [ - { - "label": "build", - "command": "dotnet", - "type": "process", - "args": [ - "build", - "${workspaceFolder}/scripts/swig/test/testXpcfCsharp.csproj", - "/property:GenerateFullPaths=true", - "/consoleloggerparameters:NoSummary" - ], - "problemMatcher": "$msCompile" - }, - { - "label": "publish", - "command": "dotnet", - "type": "process", - "args": [ - "publish", - "${workspaceFolder}/scripts/swig/test/testXpcfCsharp.csproj", - "/property:GenerateFullPaths=true", - "/consoleloggerparameters:NoSummary" - ], - "problemMatcher": "$msCompile" - }, - { - "label": "watch", - "command": "dotnet", - "type": "process", - "args": [ - "watch", - "run", - "--project", - "${workspaceFolder}/scripts/swig/test/testXpcfCsharp.csproj" - ], - "problemMatcher": "$msCompile" - } - ] -} \ No newline at end of file diff --git a/BUILD b/BUILD deleted file mode 100644 index ee1e148..0000000 --- a/BUILD +++ /dev/null @@ -1,27 +0,0 @@ -cc_library( - name = "xpcf", - defines = [ - "WITHREMOTING", - "XPCF_USE_BOOST", - "BOOST_ALL_NO_LIB", - "BOOST_ALL_DYN_LINK", - "XPCFSUBDIRSEARCH=\\\"debug\\\"", - "TIXML_USE_STL" - ], - copts = ["-std=c++17"], - hdrs = glob(["interfaces/xpcf/**/*.h", "interfaces/xpcf/**/*.hpp", "interfaces/private/xpcf/*.hpp", "interfaces/private/xpcf/*.h"]), - srcs = ["src/GrpcManager.cpp", "src/AliasManager.cpp","src/Factory.cpp","src/Property.cpp","src/BaseTask.cpp","src/PropertyManager.cpp","src/ComponentBase.cpp","src/InjectableMetadata.cpp","src/PropertyMap.cpp","src/ComponentManager.cpp","src/InterfaceMetadata.cpp","src/Registry.cpp","src/ComponentMetadata.cpp","src/tinyxml2.cpp","src/ConfigurableBase.cpp","src/ModuleManager.cpp","src/tinyxmlhelper.cpp","src/Enumerator.cpp","src/ModuleMetadata.cpp","src/Exception.cpp","src/PathBuilder.cpp"], - strip_include_prefix = "interfaces", - linkstatic = False, - deps = ["@boost//:boost","@grpcpp//:grpcpp"], - alwayslink=1, - visibility = ["//visibility:public"], -) - -cc_binary( - name = "testXpcf", - copts = ["-std=c++17", "-Isamples/sample_component"], - srcs = ["test/xpcf_dynamic_test.cpp", "test/xpcf_properties_test.cpp", "test/xpcf_threading_test.cpp", "test/TestDefines.h"], - deps = ["@boost//:boost","@xpcfSampleComponent//:xpcfSampleComponent"], - linkstatic=False, -) diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 7567b01..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,57 +0,0 @@ -### XPCF evolutions -- CD for xpcf -- CI/CD of xpcf_grpc_gen -- builddefs v4.10.0 -- feat: update to conan v2 -- fix: add pkgconfig template for xpcf_static_deps project -- fix: creation and deletion of a PropertyManager to serialize - -### XPCF remoting features -add new ```grpc``` interfaces in ```interfaces/xpcf/remoting``` to manage ```grpc``` components in ```xpcf``` - -#### xpcf\_grpc\_server application -The purpose is to implement a grpc server entry point which will handle componentized grpc service through ```xpcf/remoting/IGrpcService``` interface. The server address is manually configured in the code. - -add document describing xpcf remoting architecture model - -#### xpcf\_grpc\_gen tool -```xpcf_grpc_gen``` tool purpose is to parse xpcf interfaces to generate two components:a proxy and a server component. Each component is responsible to encrypt/decrypt types towards grpc types. - -```xpcf_grpc_gen``` design consists in: - -- parsing xpcf interfaces interpreting additional attributes using cppast (and under the hood libclang-parser) -- provide several backends to allow either protobuf, flatbuffers or other serialisation protocol (including intrusive protocols based on inheritance) - -```xpcf_grpc_gen``` supports the following custom attributes: - -- ```[[xpcf::in]]```, ```[[xpcf::out]]```, ```[[xpcf::inout]]```: attribute to set at the parameter level to disambiguate mixed or inout types that can't be deduced as in, out or inout -- ```[[grpc::server_streaming]]```, ```[[grpc::client_streaming]]``` or ```[[grpc::streaming]]```: attribute set at the method level to indicate the kind of streaming -- ```[[grpc::request("requestMessageName")]]``` and ```[[grpc::response("responseMessageName")]]```: to optionally set grpc request and response message name at the method level - - **Note**: However, if you set the request and response across several methods, and use the same messages for several methods, you are responsible to ensure that message content are consistent - -When no attribute is provided: - -- request message content is built from input and input/output parameters -- response message content is built from output and input/output parameters - -```xpcf_grpc_gen``` aims to support: - -- analyze template container types: due to the restrictions of the various targeted IDL (no maps, or maps with only base type as keys, no vector of vector ...), use a dedicated set of regexp to find the signature semantic. Any other case will be tougher to serialize, and can in most cases need a refactor, and may come from a non effective design model. -- protobuf type conversion and message generation - -```xpcf_grpc_gen``` provides: - -- both template instantiation parsing mode: - - cppast partial parsing with unexposed arguments - - cppast full parsing with exposed arguments -- ```GRPCFlatBufferGenerator``` xpcf component -- ```GRPCProtoGenerator``` xpcf component -- ```IRPCGenerator``` interface binding toward ```GRPCProtoGenerator``` - -```xpcf_grpc_gen``` uses: - -- cppast -- static xpcf build (provides a standalone application) -Note : grpc++ is still dynamically linked,the grpc++.pc file doesn't provide a solution to use the static version of grpc. Searching for a solution led to meson build system, it as the same limitation : the static keyword for a dependency declaration isn't supported with all backends. - - diff --git a/README.md b/README.md index a360e0d..771ff80 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,10 @@ XPCF Cross-Platform Component Framework ========================================= -[![GitHub version](https://badge.fury.io/gh/b-com-software-basis%2Fxpcf.svg)](https://badge.fury.io/gh/b-com-software-basis%2Fxpcf) -[![LoC](https://tokei.rs/b1/github/b-com-software-basis/xpcf)](https://github.com/b-com-software-basis/xpcf) - XPCF is a lightweight cross platform component framework (it is similar to the well known COM model). It is designed to provide dependency injection, with clarity, simplicity and light code base in mind. -It implements the abstractfactory and the factory design patterns (through the ComponentManager and ComponentFactory classes, and through IFactory interface). - -It also provides a safe toolkit to avoid common c++ design issues such as : - -- ensure use of one unique shared_ptr type (even on platforms with several STLs : the SRef class is guaranteed to be from one source only through boost binary) -- ensure correct memory handling (avoid memory leaks) -- provide parallel helpers such as tasks, fifo, circular buffers, delays.. -- a common configuration design : configuring a component doesn't require to write serialization code - -XPCF also provides remoting automation by generating grpc remoting code from XPCF interfaces, using a dedicated DSL (Domain Specific Language) - see [XPCF remoting architecture](#xpcf-remoting-architecture) chapter. - -## Changelog - -[Learn about the latest improvements][changelog]. +It implements the abstractfactory and the factory design patterns (through the ComponentManager and ComponentFactory classes). ## Definitions @@ -144,298 +128,28 @@ This framework provides the following concepts : - support for Domain Specific Language through the "IFeatures" interface (for instance, a component can declare "opencv" and "cuda" features as it is an opencv/cuda accelerated implementation of a keypointdetector) -**Note**: Variant parameters for configuration are a set of parameters. Each parameter is a pair of type, value. Supported types include long, unsigned long, double, string or another subset of parameters. Each parameter has an access definition : in, out or inout. - -## Aliases -- an ```\``` section can be declared in any ```xpcf-registry``` or ```xpcf-configuration``` node to declare named alias to uuids for an interface, a component or a module. -- aliases can be used in ```...``` or ```...``` sections to refer indifferently to components, interfaces either through their uuids or alias. - Note: an alias name must be unique in a ```ComponentManager``` context. -- autoalias mode: makes an alias between an interface/component name and its uuid. Provides the ability to use the alias in place of the uuid in factory bindings and in properties configuration (only supported with new `````` semantic). -autoalias creates an alias when the first occurence of a name is met (particularly important for interfaces). -This mode is enabled when ```autoAlias``` xml attribute is set to "true" in `````` or `````` -Note: -- when a name is encountered twice, the second occurence is ignored (it should always be the same alias which is true for interfaces) -- any ambiguity must be resolved with explicit aliasing through an xml `````` node -- a potential evolution will be to "namespace" the component name with the module name to reduce naming conflicts - -## Component dependency injection -- compile-time injection is provided through ```IInjectable``` interface -- local components can be used during component injection once registered to XPCF using ```bindLocal``` or ```bind``` methods (components defined in the library's own code or in libraries linked, but not from dynamically loaded modules). The bind method accepts a factory method to create the concrete component instance --> ```ComponentBase``` implements ```IInjectable``` and provides injection capabilities to every xpcf components -- recursive dependency injection and configuration is supported -- injection errors are handled with ```InjectionException```, ```InjectableNotFoundException``` and ```InjectableDeclarationException``` exceptions -- declarative injection (configuration time injection) is provided in registry files through ```...``` declarations (refer to ````doc/xpcf-registry-sample.xml``` for the semantic) -- autobind mode is always enabled. While parsing the `````` nodes, it automatically "wires" (binds) components to their declared interfaces. - autobind also works upon module introspection made at compile time using ```IComponentManager::loadModules``` or ```IComponentManager::loadModuleMetadata```. -Note: as autobind is a default behavior, only redundant/specific binds must be declared in `````` node. -Otherwise, default binds are created from components definitions. -Note: Autobinding ignores ```IComponentIntrospect```, ```IConfigurable``` and ```IInjectable``` XPCF interfaces. Autobinding handles wiring from user's interfaces to components. - -```IComponentManager``` provides: - -- global "inject" methods helper -- dependency injection through default binding while parsing the `````` nodes, or through ```...``` declarations. -- structured injection. See the semantic in xpcf-registry-sample.xml: node ``````. -- named binding injection ability either from configuration (using ```...``` node) or at compile time -- injection from bindings upon ```createComponent``` from component type trait or uuid -- concrete component instance resolution from its interface ( or service ) type traits or uuid (and optional name) -Upon creation of the concrete instance injection of the component injectables is made when needed through "resolve" methods, and each injectable is configured. -Finally the concrete instance is configured and returned to the caller. - -## XPCF Factories -From 2.5.0, XPCF now supports several creation contexts through the "IFactory" concept. -The IComponentManager interface provides access to its inner Factory. -From this factory, it is possible to create new factories. -New factories are created with a context mode within : -- Empty: creates a new and empty factory -- Cloned: creates a factory with a copy of bindings existing in the original factory. Later bindings, configuration ... will only be valid within this cloned factory. -- Shared: creates a factory that shares the bindings, configuration definition. Only component instances are local to the factory. Any later bind or configuration update will be share between the new and the original factory. - -## XPCF remoting architecture -A new feature in xpcf 2.5.0 version is the ability to get remote versions of components almost "out of the box". - -The remoting functionality works for any xpcf interface that : - -- uses datastructures that declare one of the serialization methods exposed through xpcf specifications (one of the methods provided in xpcf/remoting/ISerializable.h) - in 2.5.0 only boost serialization is handled, upcoming minor releases of xpcf will provide support for the other methods -- uses base c++ types only - -Note : pointers are not handled as they can handle arrays ... hence a pointer will need a size, but no presumptions to detect such cases can be done. -Anyway, interfaces represent contracts between a user and a service, hence interfaces should be self explanatory. In this context, relying on pointersd doesn't explicit the expected behavior, hence interfaces should rely on structured types either std ones (string, vectors ...) or user defined ones (struct, classes). - -### xpcf remoting DSL -xpcf provides a Domain specific language through the use of c++ user defined attributes to ease the generation, those attributes can be used on interfaces or on methods of an interface, depending on the attribute. - -#### DSL description - -| Attribute | Argument type | Apply to | Semantic| -|---|---|---|---| -|[[xpcf::ignore]] | none | class or method level | specify that the corresponding class/method must be ignored while generating remoting code| -|[[xpcf::clientUUID("uuid_string")]]| string | class level | specify the xpcf remoting client UUID | -| [[xpcf::serverUUID("uuid_string")]]| string | class level | specify the xpcf remoting server UUID | -| [[grpc::noCompression)]]| none | class or method level | disable grpc compression for a whole interface or for a method (compression code generation is not made for the targeted item) | -| [[grpc::server\_streaming]], [[grpc::client\_streaming]] or [[grpc::streaming]] | none | method level| | -| [[grpc::request("requestMessageName")]] | string | method level | optionally set grpc request message name | -| [[grpc::response("responseMessageName")]] | string | method level | optionally set grpc response message name | -| [[grpc::rpcName("rpcname")]] | string | method level | optionally set grpc method rpc name | - - -### Xpcf remoting tools - -xpcf provides several tools to ease the remoting of components : - -1. xpcf\_grpc\_gen : parses the interfaces and generates the needed remoting code for each inteface in a project. - - From an interface, the tool creates : - - grpc request and response messages with each input/output type translated to grpc types - - a grpc service containing rpc : one for each method of the interface - - a proxy component that inherits from the interface. This component transforms the interface input/output types to grpc request/response and calls the grpc service and rpc method corresponding with the method interface. This component is configured with a channel url (address and port of the server hosting the concrete code) and a grpc credential. - - a server component inheriting from IGrpcService. It also implements the grpc::service class, and the concrete xpcf component is injected to this component. Each rpc method of the grpc::service class is implemented and translates grpc request/response to the xpcf component input/output data types, and calls the xpcf component corresponding method - - From the project the tool creates : - - a Qt creator development project to compile all the generated code in an xpcf module - - a client and a server xpcf xml configuration file - -2. xpcf\_grpc\_server : it is a xpcf application that hosts any IGrpcService enabled component. - -To come: -xpcf\_grpc\_linter : this tool will be used at compilation time to validate the xpcf remoting DSL. - - -## XPCF Qt Creator wizards - -To help developers create efficiently XPCF based applications, several Qt Creator wizards are provided. -Wizards are located in the XPCF release in xpcf/version/wizards, or in the [xpcf github repository](https://github.com/b-com-software-basis/xpcf) in the wizards folder. -To install the wizards, first install Qt Creator, then launch install.bat (windows platform) or install.sh (linux or macosX platforms). - -### XPCF Module wizard -This wizard creates a complete Qt Project to build a shared library containing a xpcf module. It contains a skeleton module_main.cpp file with the main XPCF entry point. It depends on qmake rules (from the [builddefs-qmake github repository](https://github.com/b-com-software-basis/builddefs-qmake), installed with the remaken package manager tool from [remaken github repository](https://github.com/b-com-software-basis/remaken) ). - -### XPCF Interface wizard -This wizard creates a xpcf interface header file. This file is the public API. Any component interested to provide this interface functionality will use this header file. The developer only need to add its methods to the interface. - -### XPCF Component wizard -This wizard creates a xpcf component header and source file. The developer only need to override and implement the methods defined in the interfaces provided by the component. -The component header file doesn't need to be exposed. Only the interfaces implemented are part of the API. - -### XPCF Application wizard -This wizard creates a complete Qt Project to build an application that use xpcf module and components. +NOTE: Variant parameters for configuration are a set of parameters. Each parameter is a pair of type, value. Supported types include long, unsigned long, double, string or another subset of parameters. Each parameter has an access definition : in, out or inout. +## Making a module -## XPCF configuration file format -XPCF components can be found, configured and injected with a xml configuration file. - -###Node tree -The supported xml structure is (in each xml node, **"..."** symbolizes attributes): +The shared library must export the API XPCF_getComponent. ~~~ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ... - - - - - - - +long XPCF_getComponent(const boost::uuids::uuid &, SRef&) ~~~ +You must return an IComponentIntrospect when called. -### Node description - -| Section (parent node) | Node |Attributes | Semantic| -|---|---|---|---| -| document root | xpcf-registry | **autoAlias** = [true, false]
-> set whether XPCF must automatically create aliases while parsing the file between :
component UUID <-> component name
interface UUID <-> interface name | This node declares an xpcf registry file, containing both components and modules structure and their properties| -| document root |xpcf-configuration | | This node declares an xpcf configuration file only, containing components properties| -||||| -| xpcf-registry |module | **uuid** = module is referenced with an uuid. It must be declared here.
**name** = name of the module used
**path** = path to the module used (can contain environment variables)
**description** = the module function description | declares an xpcf module| -| module |component | **uuid** = component is referenced with an uuid. It must be declared here.
**name** = name of the component used
**description** = the component description| declares an xpcf component inside a module| -| component |interface | **uuid** = interface is referenced with an uuid. It must be declared here.
**name** = name of the interface used
**description** = the interface description | declares an xpcf interface implemented by a component| -||||| -| xpcf-registry / xpcf-configuration |aliases | | declares an aliases section. When **autoAlias = true** in **\**, an alias is created for each component/interface in **\** node when the first occurence of a name is met. Hence the **\** section must be used to resolve any name ambiguity, or to simplify a non intuitive name. | -| aliases |alias | **name** = name of the alias
**type**=[component, interface]
**uuid** = the uuid of the component/interface targeted by the **alias**| declares an alias. Alias can be ...| -||||| -| xpcf-registry / xpcf-configuration|factory | | declares the factory section | -| factory |bindings | | declares the bindings section - this section is needed only to overload autobinds made while parsing the **<module>** node| -| bindings |bind | **interface** = interface **alias** or **uuid**
**to** = component **alias** or **uuid**
[optional] **name** = name of the binding
[optional] **range** = [all, default, named, withparents, explicit] the binding range
[optional] **scope** = [transient, singleton] the binding scope: singleton ensure there will be only one instance of the binded component in this factory context. Transient scope ensure a component is created for each resolution made within the factory context.
[optional] **properties** = _name_ - the properties name to use to initialize the binded component| declares a default or named bind between an interface and a component| -| factory |injects | | declares the injects section - used for structured (also called planned) injection for specific component class| -| injects |inject | **to** = component **alias** or **uuid**| declares an injection pattern for a specific component class| -| inject |bind |**interface** = interface **alias** or **uuid**
**to** = component **alias** or **uuid**
[optional] **name** = name of the binding
[optional] **range** = [all, default, named, withparents, explicit] the binding range
[optional] **scope** = [transient, singleton] the binding scope: singleton ensure there will be only one instance of the binded component in this factory context. Transient scope ensure a component is created for each resolution made within the factory context.
[optional] **properties** = _name_ - the properties name to use to initialize the binded component| declares a specific bind (component context bind) between an interface and a component for the specific component class declared in **<inject>**| -||||| -| xpcf-registry / xpcf-configuration|properties | | declares the components properties section. This section defines component parameters values for configurable components.| -| properties |configure | [optional] **uuid** = the component uuid or
**component** = a component alias name| declares the configuration for a specific component | -| configure |property | **name** = property name
**type** = [int, uint, long, ulong, string, wstring, float, double, structure]
**value** = property value (must be a valid value for the type chosen)
**value** can also be declared as sub-nodes for vector properties | declares a component property| -| property |value | | declares a component property value| - -**Note :** -> Aliasing order : an alias declared in the section is added to the list of existing aliases, or replace any existing alias with the same name. section overload autoAlias already declared. - -> Binding order : -> - autobind : during the parsing of the **\** nodes, a bind is added the first time an interface is met. If the same interface is also declared for another component, the first bind is maintained. where a [interface, component] pair is met. -> - factory bindings : when an explicit bind is defined, it replaces any previous autobind made while parsing the **\** nodes. - -### Sample configuration file - -~~~ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0.2 - 0.5 - - - - - - 1.1 - 0.7 - 0.3 - 2.7 - - - - - -~~~ - - - -## How to build XPCF -In order to build XPCF: - -- Install [conan](https://conan.io/) -- Install [QT](https://www.qt.io/) to get QT Creator -- Clone xpcf repository with submodules (```git clone --recursive https://github.com/b-com-software-basis/xpcf.git```). If you have already cloned the repository but not the submodules, run ```git submodule update --init --recursive``` within your xpcf repository folder. -- If you want a specific version of xpcf, you need to generate files from template running in the folder of xpcf.pro the script update_version.sh for Linux or update_version for Windows with the parameter ```-v``` and a version number ```x.y.z``` -- Open xpcf.pro file in QT Creator and configure the project with the compilation kit of your OS (gcc on Linux, clang on mac os X, msvc 2017 for windows) -- Run qmake - this can take a while as it should compile boost from conan. - - if there isn't any file generated from template, qmake will do it with a default version number ```0.0.0``` -- Add an install target for make in "compilation steps" from the "projects" tab in Qt Creator - -You can now build xpcf using Build inside Qt Creator. - -The compilation result will be located in ```$HOME/.remaken/packages/[platform-compiler-version]/xpcf/XPCF\_VERSION``` -(```%USERPROFILE%\\.remaken\packages\\[platform-compiler-version]\xpcf\XPCF\_VERSION``` on windows) +## ContractID verses CID +CID is a number identifying a specific implementation -**Note**: To automatically include and link with xpcf headers and library, use the pkgconfig file bcom-xpcf.pc located at the root of the above folder. +ContractID defines a set of functionalities which may contain one or more CIDs -## Creating your first component -Components are hosted in modules (i.e. shared libraries with special hook methods). -Hence prior to the creation of components, start by creating a module. +ContractID concept may be implemented through the IFeatures interface -To create an XPCF module, interface or component it is recommended to use the QT -Creator wizards located in ```wizards/qtcreator``` folder in xpcf repository. +Purpose of Contract IDs -To install the wizards, please refer to [INSTALL.txt](https://github.com/b-com-software-basis/xpcf/blob/master/wizards/qtcreator/INSTALL.txt). +- implementation independence for clients -[changelog]: https://github.com/b-com-software-basis/xpcf/blob/master/CHANGELOG.md +- functional versioning diff --git a/WORKSPACE b/WORKSPACE deleted file mode 100644 index f1095db..0000000 --- a/WORKSPACE +++ /dev/null @@ -1,7 +0,0 @@ -#WORKSPACE -workspace(name = "xpcf") - -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository", "new_git_repository") -load("//.build-rules/mac-clang-x86_64/shared/debug:dependenciesBuildInfo.bzl", "setup_all_remaken_deps") - -setup_all_remaken_deps() \ No newline at end of file diff --git a/samples/sample_component/remaken-xpcfSampleComponent.pc.in b/bcom-xpcf.pc.in similarity index 100% rename from samples/sample_component/remaken-xpcfSampleComponent.pc.in rename to bcom-xpcf.pc.in diff --git a/builddefs/qmake b/builddefs/qmake index 4163c6f..a9b4274 160000 --- a/builddefs/qmake +++ b/builddefs/qmake @@ -1 +1 @@ -Subproject commit 4163c6fd9c8347ed7c61b09326b74f2176a61843 +Subproject commit a9b4274981c5f0f6298766d84578d13ec8a10c5f diff --git a/configure_conditions.pri b/configure_conditions.pri deleted file mode 100644 index a48da18..0000000 --- a/configure_conditions.pri +++ /dev/null @@ -1 +0,0 @@ -DEFINES += WITHREMOTING diff --git a/doc/models/xpcf_grpc.drawio b/doc/models/xpcf_grpc.drawio deleted file mode 100644 index 7c33520..0000000 --- a/doc/models/xpcf_grpc.drawio +++ /dev/null @@ -1 +0,0 @@ -7Vvbdto4FP0aHmH5DjxiLmmnzWo6mTUleekytgAV23JlkUC+fiRb8p2AifGQleYhsY7kY3ufra2jSzrq2NvdYCtY3yIHuB1FcnYdddJRFFlTDPqHWfaxZajLsWGFocMbpYZ7+AK4UeLWLXRAmGtIEHIJDPJGG/k+sEnOZmGMnvPNlsjNPzWwVqBkuLctt2z9AR2y5lbZGKYVnwBcrfmjB0o/rvAs0Zh/Sbi2HPScManTjjrGCJH4ytuNgcvAE7h8CeX9eLj//NcDchVyN3268R67sbNZnVuST8DAJw275t/2ZLlbDtg9sXzHcpEPqH1+N56xQASBC22LQOTTUkcd0d/bkDWwrejPPXJHf7PwYMsDzwhv2PvCALiQuYnQI3sREgpkwC63njtj7Tuq+byGBNwHls3sz5SJ1LYmnktLMqvmkdMkiVWIcCk6LZ0IDgfxCWACdhlqcLBuAPIAwXvaZJcnMOe9psfF5wyJJNFmnSGQ2uctLc7cVeI6jQ694AGqESylFKvOWOmMTOgTgJcMO1o0KSCGS9/FXGB6tSIRRNwiDJ+/gH2A6H0TQGinQ1i0oO+1SO8qxC0TkEuBPsyDLssVqOsVoAtb45irzWE+AaGNYUDRnu4Itq4JdtW4Nty1S+B+axF7Da4GdUM/AXWjTdRluQw7ByvIwWP83rJhz/QsvIJ+PCBIwS4aHMxo8GT2LkFBXGdk6ig6pGu5cMXvswGLaerzYCSLovUtAP743+poJragaFuXqHLWp7lgSeLKAassvzxr+wo9S5b8uxbYyOGaxE81ESXZ0o2SkSVkITbboGuBrcMyW5WqAXF4MbZWDIiHcg0beQFNaRgi5i9AyF4kgwNhSJJArQaG9bOKMmYVkAkbBi5Nup7yqWwVjvx5d6x7pA/rKlo+h8k7QMtlCEgpDMlLvyEyFcPm9ehIxUD8R0palRJV0Y9rSVXHuJyWVCQcLWuJWhfFD6Il+vvQEp5c/lGSdpMS9YSsRGpVSYz/XUn0uih+DCVRqmY3ByKzdMFuxJYfKezAd/jlxHatMIR2nts0Gng/pwVJFB5YoaeL4mSXrZzsealenyC0i4PX2vGPAU5uQbQc80yUX5vSvzHKSqFfqsNeYV0sRFtsA35bGu2SJ7k4TS67irEpuWqKOEJjMsT57LF15yJ72DCS54bQSD6gqCbrlNC23BGv8KDjsNtNDEL4Yi0iV4wd0VQ3+j7d7OgTanGtBXBNy96sMNr6zhi5CEfPVZfRz+mUUg7pbLIOz1+kk13qrlKOLqW5rg5yARKMfSODxORKhF0rRv2CSlFjZtmGUoAdJHPhg15n7qKl9CZWOE9d4s54XF2OqpB6VSqkFlbxZa0w7J8qQkVHw5YVqExIrkDUn7ThC2Ph+xUk8X1vFiSpJ/Xzk8uu0UzaIiZoggGtiVHVYsrHFiP1RDHSrkqMDK0hMdKLk572M6IyJzN65CST4nesSIeWY85RpMJyl96QIOUTJEVqMUGqWpQpRDqjPwsX2RuKvWOFa+Ak+uPMonUCrjHi8IisFHSK602qMQ9ZianUm1TbUjl7yOpeI1OyozolX3DuluwMvpVGBTHRiucXTp6nHXN0YU0SB3da4eSV8OvUgfCMrLwxfhX2DXX5XH5JRxxdml+Dj8cv/XKJVmP80pvSr+KJr7b1a3icX2fl+Wfk6+0saR7ln1am3/DxZT7aI895+j3/fot+PoboRvi7kjx/OGgoz5elYzOGS6f55RXzTJrvRTte7zjFFx2ugRS/r/SVfKgaErf8Xols9KR+3kkjSf5rvapi49WBT2JXsNfr0TaIROfqpBDgJ2gzTiT7h5m2JaZEEYwGRxbrI4eA62lLjTOnxdm0GAcyatGvUAtDOhzNU3cQvU1/Bu5ulUflq/Lw0N3Pu/LPbnm3YUq/Zh/RUuwXUmZt/ZB58kPosCPYNAIMXHaeunBgexZgRGPCWkfnt3MtHcAC1js40viIgOOxCXkao1X07WjD3SxsFofUFfRX/7C6Sdd4tV9PJ7PRbMxuIhhtQKbGGA+m5iypEbun7I3YFnSVj0uxqJg8aGUSKWoFi4qKfg6L7ozN7PbXC9x+nX+C36Xu/AdWK1g0Rv4SrrZYnOOnEDEGxAcG4jWbBeu6ErDsdYFt25B2U8a2hD/p8X7J8qM6tv7MkKXEoipfHhfqUWqRUOHblkQPiu2OhTffGHtIlHT0JD3ln1I/B6lxaKmgE8khpmOHlgb1Q0yL6T+WxHqe/nuOOv0P7V1bd9q6Ev41rHXOQ1i+gIHHAEmb5tI0pLuXl72ELcCNbbm2CJBfvyVZvknijglt0odiy7Zsz3ya+WY0Vmpmz59/iEA4uUUO9GqG5sxrZr9mGLrVsMgPbVkkLZ2OmTSMI9fhJ+UNA/cF8kaNt05dB8alEzFCHnbDcqONggDauNQGogjNyqeNkFe+awjGUGoY2MCTW7+5Dp7wVt3q5Ac+Qnc84bduG63kgA/Sk/mbxBPgoFmhybyomb0IIZxs+fMe9KjwUrkMPlmzz0/e/SP6fn179+XHy8WVcZZ0drnNJdkrRDDAh+3aSLp+Bt6Uy+sB+gi7wZi0zkN7xDTjhyggt47JTs08Z6oObfIzjSE9DtjPEMQubQwjhNFwOmJN9hMMHC4+vEh1QiQZ0s2p711GwCeb3dnExXAQApu2zwgUSdsE+x7Z0+lhrjpT0+iBVF9mk+yNXM/rIQ9FrHPTAbA9skl7jCP0BAtHLLsNhyNyZEN5crk/wwjDeQFNXL4fIPIhjhZUUnxsJBfwkdJoJruzIuyaHEyTAuSsFj8TcKyPs55zfZINrlK1eg3ce248fTuLfnw1v2ln3xqLb7/PTEm9VKf/UvX9G8OIvBm9axh6rg2wi4IDaMoDQ+h1ieLHEZoGTkH8F/3L88ueUjG99kX3MjuSjlNdVm7WRypUowwICtDK1GuZWknBliYpuGmo9JsqfR/9Kl9B1m+tZ9TOu26AYTSiKiK7XSIQyyPP0h0SdVtjzETEW9KGq2u4CBG5rg8xMcMoSs8gzzXMrxLgUdB7VULXjbLQsxFUGlYKqVcmdEsWOpdVWJKO9XtKXUPXB9HYDRLDqYXzGseolrSfYRQmx6zCMSIcfAY8d8yvsyHVaN7nUj2KaryP0Hyh1mXWFoptEwknO72ZB0c4OdimB+Vnp+euwOYGLeueXsArl2g/ebIuIjAcecynUztTNmTLLM/x3Uq7PAIMUzECOooR0K5qBLQUI2CJ48jIA5HPL4jxIjXu7bQhI1+NzUVobStCXZKYylCnbRH0iDt8LjNIlRT5/e7piMtvdmY0ykSg3AEajWKIJSVkD727XnSZzi1VzMiD83PKr4nUCUfjm33bAzHlcaWhQJQRLb6THS3d+UF36s10tz8vHuwv+N52AwITqwFXnce9HXRKjF/WedEfr3AMe2pZ9EsiiYvRNLIhv6jIy4V+2mI/jbrQUyIYqaeDoUZmEVc+japE6FCnVAZGak+5ezK7dEQSLumd8wO+6zj08m4EY/cFDFlXFBrMSbH3a3Zrzf5K4jhi/7bAUzoMRPOQRZn8QWrFQE5lNs4Ixptmu6SgFK57wkfXy2qXtF6hmWhUZCbmLv5e2C4YCbKX2wi6s5uJSMbUesdwKiaiJXhu0SNvaiPMhtBRS+ioahPRlBDjAAz+XAuRjoC9LYRW11LDn9oH6zAkwiz12jmacWivNw4FQzD0kP1EBO+AeAKdjC84l4xPc06QpgWJYVYajNxI/CjaCKXByLlITj9+FHnKQbjIpoamCs6iWweioc2y0WjqO1qfLLxe1tHhrI/78DD7bloX0XymNyaP7ebjRY/nNf/qLEfHKou4YXGAFXGxylPtE+Mpha7LQj/dLMfnEAa9f/6WNEf5WfdIYVSGViER2lTk5AxVTq5TFVq3CHz3zkisHC5vNyOhFMsGkcbbIhOrwFMkE6sc4WuQibZWHvJtc0cyIXo6qaOKyYScvRedyYcotK/80JMtyMz1PRDQYGWEAjzgRzYKc5j/69oT13NuwAJNqZpjTGKZdK87QZH7QroFKaDJ4QhzsBtW6YwBvZJjkcVN8D7Foi403YJ56cQbEGPeYCPPA2HsDrPXSDxaF2GMfH7S5mnwdBKvKq9jiRypaShsqMKIttoVeR1VHpw6+5ELaZUCpQR4ES5NpC0X4TKhC85fDbI4BLYbjG/YOcyH8ZaHglsr8IYJicBhQAGCMMBLI/AukWyP2kkSixs9sq/n+yw8D1GEeyggbwVcpnlIoDaDMVZiYuXgXI+JNBEi02QlBNLzDg6BzhIIkN4nyPkfVf//35FwBCRsagwqQ4IuR0xSuEldC0WDeT7A0+G7g1E4GKcJ205DNSbaxtC0rAodjJRlVUy0bu1g+N0eaE4xGHvwALcTIQw8AokAYNiladG4CtaknFncx9Vlylym/r/dwOmbw/NUfJ1y3ugAzu4dC1tj4fW9nTwjtGtSlpWZMqd4Rf3jAEbPLrn8VDKzZnkiJpvDKwbZpkL01WVmjzlDcxoJEsVsy0pUHjVDskhJwK7TK0JcK3V0uIxICz1q2q3XICb3x73bn999e/qumF5ZxVvT0flOXU+Juoq5kYNQ102tlBJVqvmjd8K4GUlYOUxPki8qn1hRnf5OF18DCcdki8onlgOHizmGaay6hrgU2IklUZe/YwJIwW9Waf41JoCsTtnDNDqC59iY7mhCVZxlmvWG2Wx3Wsn/lVW/qv2UnNn4GsvGqIBLFDI7IJDmEr3esyjyOPXWa1HZ2pB1vyIqhcqkVmNXDt5a01HFKMy+MS0gjogzpdHEZ0zQGAXAu8hbu6wKkmGOKj8/5wZRD8cQx+oZOEzBFKPl0Z2+jfkrjIYAMdIvBpTk7HsYuUQulPJnEN/aPpMdsZ/dUa42AJ0NYd7ZEOYbQ3o/fi3PPN0hTNPLCaV6nNDt+Al6ENMPOzVWsk1+HUi2SLxDH4q25xVLquq4rJhJc4NfvC62Lid1krvZKLAjiJPNtMqGjnv2OkOY9UJAS/ZZ/JJ8Y0yQSf5b9sifH+jDJjcYueNpxD9WpSAACTR4F2GEnl0HZp0VH6N3M7jqM/lcyi9ARRaQvhz1E9ho6jlMtzakqk0ex3FHIxglvbuE0oHALr+jeJcvU0L0kkdPtAQcx6UNZNTSPYwjdzhlAmSvw6pyEjXl4udPSn6mIetqDAOYiYS9nRic89KngAJk7Re8MfdqjaXcWSDYnDg/MqtzRjnakT4C3s4SbBFNCzMzTcWXvtnXv0UCrYvFLAf7kltRA3s65Zh5BjdN4MLoFgRgzK5+r8k8Rk1mu13+TElvyssPKEsMD5GnVkJWlQFaYpj2rslcOWbebk2mUiyN16GaaxhjRg4bLaNAD/W61j4iQ1QKzJAJ4iq8HZ8grnrq1fyQL+SSrQXip1abru0SC/xs5NK1XDRITl0I3Mr1Qw/6ZDtZOaY8kddjHCahT2M3JnqKE4LmK5jkgciLeQTyUqQo1Zl1ITBVMJGqvgvpf/zyMew5v762on9uA+MD6PqWarboSTFbVGfLAO2pzGGmhM9T7LlBOhXjgOjpM9UbZlagrjX/fM5pCl9r6arlg9oKTVtVaVp21yfgJ3Y37cp3VFTer1pI6fimfdVTF8ZgYs1LKzlpNosbo2nAzO9iNiGhamKMSayaBMksiEX2E7P4Np0+JYMsSk5ifdAThoBeR2dtWJDqA3tCh6Kh1ev1A1nrtxtqikWApoK2qxcNO8Cwt4zZQtNGdy93xmz4E/7UzS8fFQb+ceKyxJELxhHwqb4ndFm+NMcS5SvGEaNvQ5YwQSMGIcjJBeEB9Yx05Ge5eS9xktIY0awThWvOPeKUR3ASATyP3x7V0jXoShcUiQl7OOgtEkyPydBkyRRcy3JFMYd5HiXOiJTOHEjoDsvhFFNgvLbpHfd7L+u1JN9egL2pCr7EhQ92gf30polNhA2gfb2G19ffL66cJxVdhniGoidJ1UU9pktCarXCDJBW22bdgxQ5/nxMV+CsJ4teGnWb4nyK+2g69GC6BAdbhVPXWQadrdGp0y0COpsthtehd6anfoSAzUUdcUW+qpDSlMqkTdlCKqHS2h8q91/tUWSBbgM8zIz45frTwI9SC3lkYqScPUmPHCM2XjVsigRq1XnHJ1A/8cWt1p+CzvDlMb7y73r2h6aCQCmDmFvipUg4HJ9MMMMp8fHCTzEqUSXCVcWvB2EnwYt1NzSnM+vq9zjo4e5AgyeZBz9Ybvh0lhxsCKubtRT1hCpWalSld1UtmTgcX7EEVau9+RJUCTKq5XG3hMzyj6cawvfoLUViTHU3sa7jsN9OKaHb+VPownbIOJwrV8+PtIzyulp6Z8cFFtd2dLjaHqX+ddlnpUGrw3BB7IgMkX3rzbS6oRcnUgixMNewxR2rzo4wA2PKLHOvGZjqK9F2Xh9DrESrcH0MNVplblyYtTk8SreIZpbU6mpr8HlgLGoyFk/nW6S/DYyqL05fm+7/gcUhEjfrvDKd1+WlU86IBIFPaTiXo5b/rYoxLNS5sRo9GzmbLFBcpsE8fC5yZt60ebpOFeWX2VplShRrlDdeL6AyLcpfospaZLkTm/TPaw3etVjWoiJMUs7zVqdFuZJY1iLxxDGf5HmTSit/BK6yn3pVQ2/w8Xpw6c570eLTpTYZfenp+jBlxK8UVBbjiiJnM4wSa2suCw8KVE7TjHK40eq01wUcqq8Ldmd5SvkqWN5pFQaseurCSO4JFfNkAOY1YA6M7cgdsinQq/saK0ePkpnZJDalHyvW0klZCOxJrTAdK7KhXlI/kE/pZtX5sdhHcYaWxML0Vm6Q9y0HGhWm2uNCCq8q+2EK/KuZrue9rjh3hz/hQnbzv0mXEPH8L/uZF/8B7Vtbb9u4Ev41Bs4+ONDFku3H2InbFAmabQq03ZeClmiZLSVqKTqx++t3SFFXypecWOkW2zzI4pAaSnP5ZjhkBu483r7hKF3fsRDTgWOF24F7NXAc2x/58CMpu5wynbo5IeIk1IMqwgP5gTXR0tQNCXHWGCgYo4KkTWLAkgQHokFDnLOn5rAVo81ZUxRhg/AQIGpSP5FQrDXV9qdVx1tMorWeeuKM844YFYP1l2RrFLKnGsm9HrhzzpjI7+LtHFMpvEIu7PbPN4vJ+801Wywvww/R+ubPT8Oc2eI5j5SfwHEizsva08p8RHSjBRZQIqcB6acpJQEShCVaAGJXSBVkkcrbTUwXHMVwO3taE4EfUhRI+hMYE9DWIqbQsuGWoiWmMxR8jzjbJOGcUcYVL/f6anG5mMOQTHD2Hdd6/PnkerYoewr9SXYrQmkXjyc9xrEsOX+hWEe29KdiLvC2ZRxHJGuX6gY/wSzGgu/gOc1lpA1Ee4g3vvBywlNlcKOxHrSu2Zo7doqhSJt5VHKvVAk3Wpt7NHv/F/uSvvvr7ezHty93ozt6yd8WRlNT7Of7+eIMiuxLirbXFKM9sQwpuk6HFO1C/i+SYdcLm86xTYPV14inwdcMc5DBbzc5XcG+21Swb+rX69Kv7/Wm34mh4I9rksloR1AEClOoL0MQBK01hivHMRMkiaQ0OAtwJrvYSl4S2S+tggT4Am4/qgeqUaTikklTkLFM2U+iZASGVT2vyKG8UqqnZ3DZZLj9QMDiFKZWgK1eDlPoncvASx5xIucV+Ws8qjgMjw+kkP2/NzJuzZ5ATMMQr0iCw4oqH0sE5iukvmWPVScw23GLzvKUwB7BvTQq8BV6SUmUAFEwORjpFsUrOXkGrEDEH2Xf1dB/PafoDdmadj8enQhs477svniBmk5xCFmTbjIu1ixiCaLXFXWmRI8lWwkS1ZhbphQlBfsNC7HTKSDagMk2DAFvifgsH4eYl7e+1HqutpqzauxqjXvMCXw35pqWv7t84bMoiWMK4P3YZNYlcv3oPSPK2wpUs5rade2W1jK24QHWT9Xzs+cyEohHWBiMlAWU3/MCo3AMMARAoNIj04atFCARw/sQ8NtL6LXS7UAHDyunD5Vvyz6/1geeJYba32VfgCXM1IHHj/QvzX8XaUVr2WwLNxh47oqqDF16eNP49vm8iRvBBC9XfWaLTgsO3I442IEGTm9oYKY5JuQ/kZiiROLAiiWiQAq7ht5alftAPlgTGt6iHdvI78kEoHnRmq0ZJz+ALSpjBti60ECiTKca8SCf1EjAsQwu94U+7BbpDm0bA29RJjQhYJSiNCPL8jNyq50xIVisB7VsJvTwJBx12czEWbq+/5o205U7PdNm9GQfYNGNkoji+nqmNdv4tNnaeTiiYBAJEngmQ0fWC2iNfpVI9u+KWmPHa6jYnrbWoadGraOM+o5a439h1Fry3uLYqyHM9GdHJXNtNgQJolgGEy1Hq1qOR2qtA1fMAXBCtTIKsSFqqcnW8qQB5gnLY1wN+TXpaJiLSRjSfeuhJuT0psTx8dTCsV5Vi9MTtAiLU8EC4C81+VuLhhY7gn1ZHHsVLRaOf1CLEO0yXRr5TyrNPYqf9qu6nmeu5+YsWZFow3Wx0gJZYxXkZFALcRZwslQ1opt7+UZhyPPSVV6LSiFTGhRVK+2qZRU0RgmK1F2tItWOhnOZwZOkKoRRMJmBLqDdvAGWD2X9q2RTVr84jmC4mkO133y4nxtW9rza1LKsKb3fCEqSYjEQIv79vSxDCZW+XVheVcjqtUY6bu0luB2+73TViibnMKOufQRzcVhYUVWlJMk3uXWn6ootlQO2bwkudVhWFbOfmrfXsvYyUTeydrdI7tsFKFAw332uN77UGxUn1apYyeZZi1kgP5WmH0IBvUDK0/BDAycHDXNoXfgNyxx6uv3ClcjQtlqMndYKgq1WGe5l8VAIp7XBU8EbWPFAFeIgzNWSkjsWbqgZ4QrsifPufYXtW9XKceTE4klfcONMm3DTtSdTbq/V4eYcWzKPnzbCvZuI97b9bvH4lb0LLHvoGxq5KcBluckAoVVAqu96KFwxgaepyMyMK2UCkyyzSsa/AalvQPJOBST/GCBZ1tRpmG8RBP9fSHoFxPEM+66ZtbbZHD/MCPnr4cvUb+KL50xNfOk6GdHblq9nAsx/C/LbKhmdurrsTyVmpcf0iQOJ46+nAyPsWh066MstOsOuucDfK+YVxdtLeTBPRZBQ314FFGUZCVrxrTswXXgHQlMPxfIjNUzvhWGjWLu1zi85o/bhrlOL6vZxVucrq3fag3l6LD97UuZRR4s7pxdt1OYcynfipPJT+VHqM73ZwLsaHDr/sVJ/h1xVnyvV/Afl4rluS/td4lD64XnF+aFi5WKfxY5su6l8Q/dnSU86v7nXkhFGwXqgqr3b3V50+UXrNu0zoK47MhC9t7pNpyr72hcbvWBfjNQI+dqLmq2bItK3K8ytVr7eKzjOqoyhzqDYfFt2bMiR527bvUB8eSpSys8U0M+Z0gJbW7PQ/t/HXYr/yEfL25O2LU86zGduZqrzI/pMoKPbCxQTKl3nLaaPWHIdvM6Z43ag7UrEpudJxKBZ/a9ADtjVf1y41/8AdZFNE4IgEIZ/DXeFPvRsZpdOHjozsgkz6DpIo/Xr0wEzxjqxPPvuN2FZMxaGd/KKAjShkRgJOxFK4316nJ6ZPB1Jkp0DtVHCi1ZQqhd4GHn6UAL6QGgRtVVdCCtsW6hswLgxOISyO+qwasdr2ICy4npLb0pY6Wl8SFfHBVQtfemE+oEbvoj9JL3kAocvxHLCMoNondWMGeh5ecteXNz5j/fTmIHW/giYjDX39AkuxPI3lZHLDoIwEEW/pksToCqwBh8LXRgS1GVDKzQpDCk1PL5eTIvYsNFVp6d3ZnpnEI7K7iBJXZyBMoE8h3YIx8jz3E3oj8eb9JoEwVqDXHJqRDNI+MAMdAx9csoaS6gAhOK1DTOoKpYpixEpobVlDxB215rkbAGSjIglvXKqCuPC82d+ZDwvps7uNtQvJZnExklTEArtF8I7hCMJoHRUdhET7+FNc7mRLB0ujrjHfXq6Pcpj2xxWutj+n5SPBckq9WvpMZi/Nl6sBePdCw== \ No newline at end of file diff --git a/doc/overview.drawio b/doc/overview.drawio deleted file mode 100644 index 0c72573..0000000 --- a/doc/overview.drawio +++ /dev/null @@ -1 +0,0 @@ -7Vxhb6M4E/410dv90IhAQpOPadLcrrQnnbare99vJwcM+AqYNaZp7tffjG0CBNI33Q3pRptWamBsbM/M42fGxunAWSQvvwmSRb9zn8YD2/JfBs5yYNuj2WwMHyjZGsl4MtKSUDDfyCrBI/uHGqFlpAXzad6oKDmPJcuaQo+nKfVkQ0aE4JtmtYDHzV4zEtKW4NEjcSkdTir5f5kvIyMfubOq4CNlYWQ6n9quLlgT7ykUvEhNjwPbCdSPLk5I2ZZRNY+Izzc1kfMwcBaCc6mvkpcFjdG8peHK5+S2HO3AuY9kEsPNCC5V8erAw6NjHgblBE1lvbtD7U3d2cy1Azq988lkPLk1ZnsmcWHaXwmS0A0XTyDmz1Q8M7ppDWITMUkfM+Lh/QZA1RyVMifFLi2421kMb3ySR1WJFPxp5y98MmBxvOAxF6of58HFX5TzVK5IwmJE6J9U+CQlRmzQeFc1WDaQ8hRK7kEJyQAr85iFKYglx+HmMHqWhl/xZjmyOm1prI8N0JeayNj2N8oTKsUWqphS2zHeNhNpYm43dUjOjDCqwbGSEjMVwl3jlTvhwnj0OO/aLe+2PFnz2mE/EWM5DyxDRYdJE+b72CK2kWHLyUuIVDPUk9vWn9jstmz/xVykXHpoGsdqA6fLm/8XM3ere3c038fMVxLxZA8yyut4X3t6pX5ADuP3GW2Uje5d257XypZMAJsxjiagJJcnAtGsCaLRXQeKdtTbQFEfIJr+iiCaOLPp8r4XENnju/vZ2UHkTN8VRKPRr4ii6dKyZ8s+UOROLGv2cHYUTWbHosi2+kDR+FdE0QpmpDXqA0ULAJLlnB1F09H7ctHdr4iih7nVE4rmS2jZPn9aZNnvC6NZC0bt1RroJptro07v1X1lRCW4hFbjMLa61mLHLsAaWPhI42eKfezBYfIaHk7gWMc+It8dd7l12seayWq5tU0PV7e+3a2dGahzNre2E1Dn6tYTuLUzJTzfbG1vcYyvbj2BWztztPO51Wm5dXJ16ylia2fSdD6/HrGAi1lHQjtG69bSypwXKP+eTecOPLyW1P64G/fR1kTpiR0+nu45vCvqdrnb7cPd7dcLV3f36m6nKxqfzd3u1d3ndbdrvae7j9hHubr7lO6edgXvs7n7iBdBV3efNHZbznv6u72/NbDdWKXcoIcb4tWXIpUsoQM82pFk4BFQ3rZiDj5JQ7i6gYrfCjwbcZ/FRcjS6h5KE+7TD2WjML6q3VKYNfBVPoreus2V/+ZQYeRmL/V2m01g5e9v5RZK5nGMJ1TwTItRrq4vFhDsQexsEQieDHCulq2BokVM84byJMVm1kx9yIgmZQeIa/gbaDET8OnTAGYWVmS41RzAgiSv2U2r2FQbxNnPaU3teLAHqqOsN1DHaoRSkK//xhNC9srfpjB1PbQ4S5/Ux1oQNV82DGaDfg5YA6a0VI/+74/FCj7AJ6pWxpkyy+VbySMpQoVq/wueZ2AipbJGJMulBss+Lj3ojmjkfI8ZmoK1eP2xky3PzdEcEEyqO31QB7dnu5fleFYpiFXYiGD5TtO3hJVj4kQZUF4LEzENTvS2YzLaiwUdif20MxaMe4gFZRx6NRYsaUbB3KmHanxK/zYBH4LAl/mnTxfA88tPJSPlRZZxoafYmiuyMZxeY6VdkDNFu+l6IyNAXhjV5mQasLAQBA3yAUlONMIDhkWo5NPGuC6St5QNSSNg+jT3BEP2WrEki2mik4ScwmwgsepOFJ4s9A3UxrmE00dCqEuxmRsvIspGKigKmgPD5WzNYiYBa4uS9XJgheFw+OF9bHelx3PSo9Wkx3HHQnja+XKpF3rsOt20T4+LOgkgXZCUhGYy/OzMmAn+rE54lyyXKwL0wLH/lPqQMpHdTfnMlDRSWUxJNAHcNFPotJnevtMsPqmt6kHQ23N/FSNwCaADSc1sF5ve19QH/yZG92pteNgOz0QwourIbUY1QxCYm1RgY4GKmSTdNtrDwbgkQYZL13n2fYHzx5QuFdIuJHvq+pzm6X/U8pB+K5igZVTcCCBprWSuHzUJQPfor9Gjx+jhdrzsnJ7tpZjTfofdjh73VK3xMkGAUDwzvQxtRDTOqHg1ivz4vKZpXgidzAqhVuhWQhOuzBoBecdmw4c8c+bXC2NKnio2r7KkRqNFvtvz0NsfRcq+FXihNwb+yqSoiOEGUkcVWFSeGBMJ5JDkg93GQJVaPn79jHKtnI5Nj18oduPFJMcile+HBVANhJ5qTb2u7ePoEeW8EJ4aZRpvMYl/s0qFMozRoeK9l8wLcIDOHGvk1WV3B8vajscuXKrrXJLU0y4q1InExv5bUKQqFqFdattQqi747sPRRHqloh6paNqx5dtNRX3s+TrtcxdtKvqo6CbvmW++RoLqBbaqiLlAHKvvLUZl/7BM9yJtAZhPJH/K9WIwYAE3y0ImvCImOBPWRRCopxYq0YrJNoe1YjleAF9a0+HQRNirdnjd15V6nCA9O332gqb+AlQtNX0rRg1F5ulnRFVCCsmTMmlTpOlrWgtpSjGbU7XUo43ndFZTUqnZom3brr6vvVDsWeVT9T3e5eNnpLUljEXtCDxm1GOB2pD5TFLg8RDfKFi3KgrQWlfYEEAqaJgokjJThAsTxl6FED2K9dDDka7Wt/B5m/NAbmB+365JjkqvFFnbDn7cllreEuEhU+EeBm2b2Ohct2WzfulaUrnW8iKSgUWGBzF1ZeEeWXhkjTto2O2i4UkfNHzEManD9n0LBupmjcmaxn/gLpp+T9v6WsPnvQprLoETBge/Ybv3pQcewDylQ8iLRK7/tkDzE0Jj5EzGw1ntZ9JAit2xdJjZHTjp4/tQzhHnqy4WJzn1YFEtt0MJQ2vzy08JlfG0ARWnuUdZfvGokdp1QcXtASpHnM26WKh4HNY9mcyHa1gl/1WtkS8DM/awSSlueY6uTil3bZyUspPC5IgzXZcPE8wdJU3VavkiMDJxm4vEjv8rcdeVnPQSdI44B3b5EOEp8AhNWH4pNHI32stg3TZGJrMOFpm8GSJwW/2/G1VW+79CzsO/ \ No newline at end of file diff --git a/doc/src/xpcf_usage.h b/doc/src/xpcf_usage.h index 17b4af0..2801b8c 100644 --- a/doc/src/xpcf_usage.h +++ b/doc/src/xpcf_usage.h @@ -1,4 +1,4 @@ /** * @page page2 XPCF usage example - * Refer to @link sampleComponent the Sample component module@endlink for a sample module implementation. + * @image html seqdiagram_use.jpg "Sequence diagram: XPCF use example" */ diff --git a/doc/xpcf-registry-sample.xml b/doc/xpcf-registry-sample.xml deleted file mode 100644 index 8cf9ad0..0000000 --- a/doc/xpcf-registry-sample.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/xpcf.adoc b/doc/xpcf.adoc index 1a6e7ba..d7ef5ad 100644 --- a/doc/xpcf.adoc +++ b/doc/xpcf.adoc @@ -1,62 +1,35 @@ -:stylesheet: boot-darkly.css - = XPCF Cross-Platform Component Framework - XPCF is a lightweight cross platform component framework (it is similar to the well known COM model). -It is released under the Apache 2 (http://www.apache.org/licenses/LICENSE-2.0). It is designed to provide dependency injection, with clarity, simplicity and light code base in mind. It implements the abstractfactory and the factory design patterns (through the ComponentManager and ComponentFactory classes). == Definitions -=== Reflection -Reflection is a program ability to inspect, and potentially modify its inner high level structures during runtime. - -It can be used for observing and modifying program execution at runtime. - -This is typically accomplished by dynamically assigning program code at runtime. - -Reflective systems use two paradigms : Introspection and intercession. - -=== Introspection - -Introspection is the ability to inspect a program or a piece of program to figure out the features it provides. - -Introspection can be provided to identify the various functionalities a software component provides, a library content or even a component method signature. - -NOTE: IHM sample and explanation to add - -=== Intercession -Intercession is a program ability to modify its own runtime state or to alter its own interpretation or meaning. - -It allows the program to automatically evolve depending on the needs and the context. -NOTE: Define control and data flow -image::xpcf_decision_sample.png[] === Module -A shared library hosting a set of factories to create components/services +A module consists in a shared library hosting a set of factories to create components/services -=== Component -+ sample +Provides: -- a class that can have several instances over the application lifetime +- introspection to figure out which components are available in the module -- each instance is unloaded (destroyed) when no more reference exists upon one of its interfaces +- separate implementation from interface : creates the concrete implementation and binds it to the IComponentIntrospect interface -=== Service +- component creation -- a component singleton that only has one instance at any given time +- service instanciation -- is never unloaded +=== Component/Service interface +A component/service interface in the component framework context is : -=== Component/Service interface +- based on C++ virtual class -A component/service interface in the component framework context is the published part of the component/service functionality. +- uniquely identified by an UUID (128-bit number guaranteed to be unique based on timestamps, HW addresses, random seeds) -It represents the contract between the component/service user and the component/service provider. +- mandatory derives from *IComponentIntrospect* (the base interface of all XPCF interfaces) === IComponentIntrospect interface @@ -76,37 +49,30 @@ Special Notes about queryInterface : - queryInterface from interface A to the IComponentIntrospect interface, must equal the queryInterface from interface B to the IComponentIntrospect interface -== Framework functionalities -The XPCF framework provides the following concepts : -- provide features available in other languages (Java/C#) to C/C++ -- an "in-code" dependency injection factory to create components and bind them to a specific interface - -- a component abstract factory to load components at runtime from modules (named ComponentManager) - -- increase modularity with better separation of concerns through interface discovery (using component introspection) -- component dynamic loading resolves implementation scope and naming conflicts : a component with the same type declaration in the same namespace can exist in both modules without conflict : it will be differentiated with its UUID, and its creation will occur in the module scope. (component Full qualified name - namespace and type name - is important inside the module boundary, it is not an issue across module boundary) +=== Components and Services -- a centralized description of modules, components and interfaces (a mettre plus loin dans implementation et usages : "with a dedicated configuration file") +An implementation of one or more interfaces identified by a Component UUID -- module introspection to figure out the components contained and the interfaces they implement +NOTE: The introspection interface is the same for both components and services -- secure memory management using smart pointers for components (prevents from memory leaks, dangling null pointer) +==== component -- component and service configuration at creation through abstract properties +- a class that can have several instances over the application lifetime -- support for both components and services +- each instance is unloaded (destroyed) when no more reference exists upon one of its interfaces -- support for Domain Specific Language through the "IFeatures" interface (for instance, a component can declare "opencv" and "cuda" features as it is an opencv/cuda accelerated implementation of a keypointdetector) +==== service -NOTE: Variant properties for configuration are a set of property. Each property is defined as a pair of type, value. Supported types include long, unsigned long, double, string or another subset of properties. Each property has an access definition : in, out or inout. +- a component singleton that only has one instance at any given time +- is never unloaded == Schema ---- ___________________________________________________ -| Module #1 | +| Module #1 | | entry point => XPCF_getComponent | | ______________________________ | | | Component #UUIDC1 | | @@ -140,6 +106,29 @@ NOTE: Variant properties for configuration are a set of property. Each property --------------------------------------------------- ---- +== Framework functionalities +This framework provides the following concepts : + +- an "in-code" dependency injection factory to create components and bind them to a specific interface + +- a component abstract factory to load components at runtime from modules (named ComponentManager) + +- increase modularity with better separation of concerns through interface discovery (using component introspection) + +- a centralized description of modules, components and interfaces (with a dedicated configuration file) + +- module introspection to figure out the components contained and the interfaces they implement + +- secure memory management using smart pointers for components (prevents from memory leaks, dangling null pointer) + +- component and service configuration at creation through abstract variant parameters + +- support for both components and services + +- support for Domain Specific Language through the "IFeatures" interface (for instance, a component can declare "opencv" and "cuda" features as it is an opencv/cuda accelerated implementation of a keypointdetector) + +NOTE: Variant parameters for configuration are a set of parameters. Each parameter is a pair of type, value. Supported types include long, unsigned long, double, string or another subset of parameters. Each parameter has an access definition : in, out or inout. + == Making a module (under construction) The shared library must export the API XPCF_getComponent. @@ -163,67 +152,3 @@ Purpose of Contract IDs - implementation independence for clients - functional versioning - -== Framework implementation details - -=== Module - -A shared library hosting a set of factories to create components/services - -Provides: - -- introspection to figure out which components are available in the module -+ introcession method -- separate implementation from interface : creates the concrete implementation and binds it to the IComponentIntrospect interface - -- component creation - -- service instanciation - -=== Components and Services - -An implementation of one or more interfaces identified by a Component UUID - -NOTE: The introspection interface is the same for both components and services - -==== component -+ sample - -- a class that can have several instances over the application lifetime - -- each instance is unloaded (destroyed) when no more reference exists upon one of its interfaces - -==== service - -- a component singleton that only has one instance at any given time - -- is never unloaded - - -=== Component/Service interface -prog par contrat -A component/service interface in the component framework context is : - -- based on C++ virtual class - -- uniquely identified by an UUID (128-bit number guaranteed to be unique based on timestamps, HW addresses, random seeds) - -- mandatory derives from *IComponentIntrospect* (the base interface of all XPCF interfaces) - -=== IComponentIntrospect interface - -- is a special interface - -- does not derive from any other interface - -Provides: - -- component introspection to query interfaces implemented by the component - -- functional reference counting - -Special Notes about queryInterface : - -- queryInterface from interface A to interface B, must be able to queryInterface back from interface B to interface A - -- queryInterface from interface A to the IComponentIntrospect interface, must equal the queryInterface from interface B to the IComponentIntrospect interface diff --git a/doc/xpcf.dox b/doc/xpcf.dox index 8cc90d3..79ac028 100644 --- a/doc/xpcf.dox +++ b/doc/xpcf.dox @@ -1,4 +1,4 @@ -# Doxyfile 1.8.14 +# Doxyfile 1.8.12 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -20,8 +20,8 @@ # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all text # before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See -# https://www.gnu.org/software/libiconv/ for the list of possible encodings. +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 @@ -38,20 +38,20 @@ PROJECT_NAME = "XPCF Framework" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 2.0.0 +PROJECT_NUMBER = # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. -PROJECT_BRIEF = +PROJECT_BRIEF = # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. -PROJECT_LOGO = +PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is @@ -118,7 +118,7 @@ REPEAT_BRIEF = YES # the entity):The $name class, The $name widget, The $name file, is, provides, # specifies, contains, represents, a, an and the. -ABBREVIATE_BRIEF = +ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # doxygen will generate a detailed section even if there is only a brief @@ -152,7 +152,7 @@ FULL_PATH_NAMES = NO # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. -STRIP_FROM_PATH = +STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which @@ -161,7 +161,7 @@ STRIP_FROM_PATH = # specify the list of include paths that are normally passed to the compiler # using the -I flag. -STRIP_FROM_INC_PATH = +STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't @@ -226,16 +226,15 @@ TAB_SIZE = 8 # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading # "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines (in the resulting output). You can put ^^ in the value part of an -# alias to insert a newline as if a physical newline was in the original file. +# newlines. -ALIASES = +ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" # will allow you to use the command class in the itcl::class meaning. -TCL_SUBST = +TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For @@ -282,7 +281,7 @@ OPTIMIZE_OUTPUT_VHDL = NO # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. -EXTENSION_MAPPING = +EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable @@ -328,7 +327,7 @@ BUILTIN_STL_SUPPORT = NO CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. @@ -438,7 +437,7 @@ EXTRACT_PRIVATE = YES # scope will be included in the documentation. # The default value is: NO. -EXTRACT_PACKAGE = YES +EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. @@ -639,7 +638,7 @@ GENERATE_DEPRECATEDLIST= YES # sections, marked by \if ... \endif and \cond # ... \endcond blocks. -ENABLED_SECTIONS = +ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have for it to appear in the @@ -681,7 +680,7 @@ SHOW_NAMESPACES = YES # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. -FILE_VERSION_FILTER = +FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated @@ -694,17 +693,17 @@ FILE_VERSION_FILTER = # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. -LAYOUT_FILE = +LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. -CITE_BIB_FILES = +CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages @@ -769,7 +768,7 @@ WARN_FORMAT = "$file:$line: $text" # messages should be written. If left blank the output is written to standard # error (stderr). -WARN_LOGFILE = +WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files @@ -783,22 +782,12 @@ WARN_LOGFILE = INPUT = src \ ../interfaces \ - ../src \ - ../sample_component/C1.h \ - ../sample_component/C0.h \ - ../sample_component/xpcfSampleComponent_main.cpp \ - ../sample_component/xpcfSampleComponent_traits.h \ - ../sample_component/I2.h \ - ../sample_component/I1.h \ - ../sample_component/I0.h \ - ../sample_component/C0.cpp \ - ../sample_component/C1.cpp \ - ../sample_component/xpcfSampleComponentAPI.h + ../src # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: https://www.gnu.org/software/libiconv/) for the list of +# documentation (see: http://www.gnu.org/software/libiconv) for the list of # possible encodings. # The default value is: UTF-8. @@ -818,7 +807,7 @@ INPUT_ENCODING = UTF-8 # *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, # *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf. -FILE_PATTERNS = +FILE_PATTERNS = # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. @@ -833,8 +822,7 @@ RECURSIVE = YES # Note that relative paths are relative to the directory from which doxygen is # run. -EXCLUDE = ../src/tinyxml2.h \ - ../src/tinyxml2.cpp +EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded @@ -850,7 +838,7 @@ EXCLUDE_SYMLINKS = NO # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* -EXCLUDE_PATTERNS = +EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the @@ -861,20 +849,20 @@ EXCLUDE_PATTERNS = # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* -EXCLUDE_SYMBOLS = +EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include # command). -EXAMPLE_PATH = +EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank all # files are included. -EXAMPLE_PATTERNS = +EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude commands @@ -887,7 +875,7 @@ EXAMPLE_RECURSIVE = NO # that contain images that are to be included in the documentation (see the # \image command). -IMAGE_PATH = +IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program @@ -908,7 +896,7 @@ IMAGE_PATH = # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. -INPUT_FILTER = +INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the @@ -921,7 +909,7 @@ INPUT_FILTER = # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. -FILTER_PATTERNS = +FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will also be used to filter the input files that are used for @@ -936,14 +924,14 @@ FILTER_SOURCE_FILES = NO # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. -FILTER_SOURCE_PATTERNS = +FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. -USE_MDFILE_AS_MAINPAGE = +USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- # Configuration options related to source browsing @@ -1004,7 +992,7 @@ SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system -# (see https://www.gnu.org/software/global/global.html). You will need version +# (see http://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: @@ -1048,18 +1036,7 @@ CLANG_ASSISTED_PARSING = NO # specified with INPUT and INCLUDE_PATH. # This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. -CLANG_OPTIONS = - -# If clang assisted parsing is enabled you can provide the clang parser with the -# path to the compilation database (see: -# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) used when the files -# were built. This is equivalent to specifying the "-p" option to a clang tool, -# such as clang-check. These options will then be passed to the parser. -# Note: The availability of this option depends on whether or not doxygen was -# generated with the -Duse-libclang=ON option for CMake. -# The default value is: 0. - -CLANG_COMPILATION_DATABASE_PATH= 0 +CLANG_OPTIONS = #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index @@ -1085,7 +1062,7 @@ COLS_IN_ALPHA_INDEX = 5 # while generating the index headers. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. -IGNORE_PREFIX = +IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output @@ -1129,7 +1106,7 @@ HTML_FILE_EXTENSION = .html # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_HEADER = +HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard @@ -1139,7 +1116,7 @@ HTML_HEADER = # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_FOOTER = +HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of @@ -1151,7 +1128,7 @@ HTML_FOOTER = # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_STYLESHEET = +HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined # cascading style sheets that are included after the standard style sheets @@ -1164,7 +1141,7 @@ HTML_STYLESHEET = # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_STYLESHEET = +HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note @@ -1174,12 +1151,12 @@ HTML_EXTRA_STYLESHEET = # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_FILES = +HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see -# https://en.wikipedia.org/wiki/Hue for more information. For instance the value +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. @@ -1215,17 +1192,6 @@ HTML_COLORSTYLE_GAMMA = 80 HTML_TIMESTAMP = NO -# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML -# documentation will contain a main index with vertical navigation menus that -# are dynamically created via Javascript. If disabled, the navigation index will -# consists of multiple levels of tabs that are statically embedded in every HTML -# page. Disable this option to support browsers that do not have Javascript, -# like the Qt help browser. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_MENUS = YES - # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. @@ -1249,12 +1215,12 @@ HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: https://developer.apple.com/tools/xcode/), introduced with +# environment (see: http://developer.apple.com/tools/xcode/), introduced with # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a # Makefile in the HTML output directory. Running make will produce the docset in # that directory and running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See https://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1314,7 +1280,7 @@ GENERATE_HTMLHELP = NO # written to the html output directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. -CHM_FILE = +CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path # including file name) of the HTML help compiler (hhc.exe). If non-empty, @@ -1322,7 +1288,7 @@ CHM_FILE = # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. -HHC_LOCATION = +HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated # (YES) or that it should be included in the master .chm file (NO). @@ -1335,7 +1301,7 @@ GENERATE_CHI = NO # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. -CHM_INDEX_ENCODING = +CHM_INDEX_ENCODING = # The BINARY_TOC flag controls whether a binary table of contents is generated # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it @@ -1366,11 +1332,11 @@ GENERATE_QHP = NO # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. -QCH_FILE = +QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace -# (see: http://doc.qt.io/qt-4.8/qthelpproject.html#namespace). +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1378,7 +1344,8 @@ QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://doc.qt.io/qt-4.8/qthelpproject.html#virtual-folders). +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1386,31 +1353,33 @@ QHP_VIRTUAL_FOLDER = doc # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://doc.qt.io/qt-4.8/qthelpproject.html#custom-filters). +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://doc.qt.io/qt-4.8/qthelpproject.html#custom-filters). +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_CUST_FILTER_ATTRS = +QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://doc.qt.io/qt-4.8/qthelpproject.html#filter-attributes). +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_SECT_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location of Qt's # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the # generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. -QHG_LOCATION = +QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To @@ -1493,7 +1462,7 @@ EXT_LINKS_IN_WINDOW = NO FORMULA_FONTSIZE = 10 -# Use the FORMULA_TRANSPARENT tag to determine whether or not the images +# Use the FORMULA_TRANPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # @@ -1505,7 +1474,7 @@ FORMULA_FONTSIZE = 10 FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# https://www.mathjax.org) which uses client side Javascript for the rendering +# http://www.mathjax.org) which uses client side Javascript for the rendering # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path @@ -1532,8 +1501,8 @@ MATHJAX_FORMAT = HTML-CSS # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of -# MathJax from https://www.mathjax.org before deployment. -# The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/. +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest @@ -1543,7 +1512,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_EXTENSIONS = +MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site @@ -1551,7 +1520,7 @@ MATHJAX_EXTENSIONS = # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_CODEFILE = +MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and @@ -1594,7 +1563,7 @@ SERVER_BASED_SEARCH = NO # # Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library -# Xapian (see: https://xapian.org/). +# Xapian (see: http://xapian.org/). # # See the section "External Indexing and Searching" for details. # The default value is: NO. @@ -1607,11 +1576,11 @@ EXTERNAL_SEARCH = NO # # Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library -# Xapian (see: https://xapian.org/). See the section "External Indexing and +# Xapian (see: http://xapian.org/). See the section "External Indexing and # Searching" for details. # This tag requires that the tag SEARCHENGINE is set to YES. -SEARCHENGINE_URL = +SEARCHENGINE_URL = # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed # search data is written to a file for indexing by an external tool. With the @@ -1627,7 +1596,7 @@ SEARCHDATA_FILE = searchdata.xml # projects and redirect the results back to the right project. # This tag requires that the tag SEARCHENGINE is set to YES. -EXTERNAL_SEARCH_ID = +EXTERNAL_SEARCH_ID = # The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen # projects other than the one defined by this configuration file, but that are @@ -1637,7 +1606,7 @@ EXTERNAL_SEARCH_ID = # EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ... # This tag requires that the tag SEARCHENGINE is set to YES. -EXTRA_SEARCH_MAPPINGS = +EXTRA_SEARCH_MAPPINGS = #--------------------------------------------------------------------------- # Configuration options related to the LaTeX output @@ -1701,7 +1670,7 @@ PAPER_TYPE = a4wide # If left blank no extra packages will be included. # This tag requires that the tag GENERATE_LATEX is set to YES. -EXTRA_PACKAGES = +EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for the # generated LaTeX document. The header should contain everything until the first @@ -1717,7 +1686,7 @@ EXTRA_PACKAGES = # to HTML_HEADER. # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_HEADER = +LATEX_HEADER = # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the # generated LaTeX document. The footer should contain everything after the last @@ -1728,7 +1697,7 @@ LATEX_HEADER = # Note: Only use a user-defined footer if you know what you are doing! # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_FOOTER = +LATEX_FOOTER = # The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined # LaTeX style sheets that are included after the standard style sheets created @@ -1739,7 +1708,7 @@ LATEX_FOOTER = # list). # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_EXTRA_STYLESHEET = +LATEX_EXTRA_STYLESHEET = # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the LATEX_OUTPUT output @@ -1747,7 +1716,7 @@ LATEX_EXTRA_STYLESHEET = # markers available. # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_EXTRA_FILES = +LATEX_EXTRA_FILES = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is # prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will @@ -1794,7 +1763,7 @@ LATEX_SOURCE_CODE = NO # The LATEX_BIB_STYLE tag can be used to specify the style to use for the # bibliography, e.g. plainnat, or ieeetr. See -# https://en.wikipedia.org/wiki/BibTeX and \cite for more info. +# http://en.wikipedia.org/wiki/BibTeX and \cite for more info. # The default value is: plain. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1855,14 +1824,14 @@ RTF_HYPERLINKS = NO # default style sheet that doxygen normally uses. # This tag requires that the tag GENERATE_RTF is set to YES. -RTF_STYLESHEET_FILE = +RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an RTF document. Syntax is # similar to doxygen's config file. A template extensions file can be generated # using doxygen -e rtf extensionFile. # This tag requires that the tag GENERATE_RTF is set to YES. -RTF_EXTENSIONS_FILE = +RTF_EXTENSIONS_FILE = # If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code # with syntax highlighting in the RTF output. @@ -1907,7 +1876,7 @@ MAN_EXTENSION = .3 # MAN_EXTENSION with the initial . removed. # This tag requires that the tag GENERATE_MAN is set to YES. -MAN_SUBDIR = +MAN_SUBDIR = # If the MAN_LINKS tag is set to YES and doxygen generates man output, then it # will generate one additional man file for each entity documented in the real @@ -1977,9 +1946,9 @@ DOCBOOK_PROGRAMLISTING = NO #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an -# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures -# the structure of the code including all documentation. Note that this feature -# is still experimental and incomplete at the moment. +# AutoGen Definitions (see http://autogen.sf.net) file that captures the +# structure of the code including all documentation. Note that this feature is +# still experimental and incomplete at the moment. # The default value is: NO. GENERATE_AUTOGEN_DEF = NO @@ -2020,7 +1989,7 @@ PERLMOD_PRETTY = YES # overwrite each other's variables. # This tag requires that the tag GENERATE_PERLMOD is set to YES. -PERLMOD_MAKEVAR_PREFIX = +PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor @@ -2061,7 +2030,7 @@ SEARCH_INCLUDES = YES # preprocessor. # This tag requires that the tag SEARCH_INCLUDES is set to YES. -INCLUDE_PATH = +INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the @@ -2069,7 +2038,7 @@ INCLUDE_PATH = # used. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -INCLUDE_FILE_PATTERNS = +INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that are # defined before the preprocessor is started (similar to the -D option of e.g. @@ -2079,7 +2048,7 @@ INCLUDE_FILE_PATTERNS = # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -PREDEFINED = +PREDEFINED = # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The @@ -2088,7 +2057,7 @@ PREDEFINED = # definition found in the source code. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -EXPAND_AS_DEFINED = +EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will # remove all references to function-like macros that are alone on a line, have @@ -2117,13 +2086,13 @@ SKIP_FUNCTION_MACROS = YES # the path). If a tag file is not located in the directory in which doxygen is # run, you must also specify the path to the tagfile here. -TAGFILES = +TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create a # tag file that is based on the input files it reads. See section "Linking to # external documentation" for more information about the usage of tag files. -GENERATE_TAGFILE = +GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES, all external class will be listed in # the class index. If set to NO, only the inherited external classes will be @@ -2172,14 +2141,14 @@ CLASS_DIAGRAMS = YES # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. -MSCGEN_PATH = +MSCGEN_PATH = # You can include diagrams made with dia in doxygen documentation. Doxygen will # then run dia to produce the diagram and insert it in the documentation. The # DIA_PATH tag allows you to specify the directory where the dia binary resides. # If left empty dia is assumed to be found in the default search path. -DIA_PATH = +DIA_PATH = # If set to YES the inheritance and collaboration graphs will hide inheritance # and usage relations if the target is undocumented or is not a class. @@ -2228,7 +2197,7 @@ DOT_FONTSIZE = 10 # the path where dot can find it using this tag. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_FONTPATH = +DOT_FONTPATH = # If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for # each documented class showing the direct and indirect inheritance relations. @@ -2372,26 +2341,26 @@ INTERACTIVE_SVG = NO # found. If left blank, it is assumed the dot tool can be found in the path. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_PATH = +DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the \dotfile # command). # This tag requires that the tag HAVE_DOT is set to YES. -DOTFILE_DIRS = +DOTFILE_DIRS = # The MSCFILE_DIRS tag can be used to specify one or more directories that # contain msc files that are included in the documentation (see the \mscfile # command). -MSCFILE_DIRS = +MSCFILE_DIRS = # The DIAFILE_DIRS tag can be used to specify one or more directories that # contain dia files that are included in the documentation (see the \diafile # command). -DIAFILE_DIRS = +DIAFILE_DIRS = # When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the # path where java can find the plantuml.jar file. If left blank, it is assumed @@ -2399,17 +2368,12 @@ DIAFILE_DIRS = # generate a warning when it encounters a \startuml command in this case and # will not generate output for the diagram. -PLANTUML_JAR_PATH = - -# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a -# configuration file for plantuml. - -PLANTUML_CFG_FILE = +PLANTUML_JAR_PATH = # When using plantuml, the specified paths are searched for files specified by # the !include statement in a plantuml block. -PLANTUML_INCLUDE_PATH = +PLANTUML_INCLUDE_PATH = # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes # that will be shown in the graph. If the number of nodes in a graph becomes diff --git a/doc/xpcf_decision_sample.png b/doc/xpcf_decision_sample.png deleted file mode 100644 index 1614e64..0000000 Binary files a/doc/xpcf_decision_sample.png and /dev/null differ diff --git a/doc/xpcf_decision_sample.xml b/doc/xpcf_decision_sample.xml deleted file mode 100644 index dc89a29..0000000 --- a/doc/xpcf_decision_sample.xml +++ /dev/null @@ -1 +0,0 @@ -1VlNc6M4EP01XFMGDNjH2El2p2qmKlU5zOxRhga0EYgScmzPr18JxJcQHtZxJp4cEmhajXjvdaulWO42O/7FUJF+oxEQy1lER8t9sBzHdn1H/JGWU21ZO0FtSBiOlFNneME/QRkXyrrHEZQDR04p4bgYGkOa5xDygQ0xRg9Dt5iS4VsLlMDI8BIiMrZ+xxFPa+uq+Qpp/xtwkjZvtv11/WSHwteE0X2u3mc5blz91I8z1MRSH1qmKKKHnsl9tNwto5TXV9lxC0Ri28BWj3uaeNrOm0HO5wxw6wFviOyhmbFPxNBNWaBcXCfy+hviYQpsS7OC5jKy8hFx+26Necd0S98LZwWBTEQppUAgL0GSRhLKME+zydAVWvzUMFRyRl9bcgRum5RnRFza8nUpKqRfdkykPu9iQg9hihi/KxgNoRTq2BxSzOGlQKF0PAi39i1vwDgcJwG1W5qE/IFmwNlJuKgBjuvVQ5Tyl0vF9KHTkR0oW9rTUOOHlHSTNnRHn7hQDJrZ9EZsTjHXUTSgQ0DOzHz0Of1DqGgQ/Qwm7LWZCpwnEryQMhjhCJGoQeqWMp7ShOaIPHbWTVVYQL5iMUQZjpj/6F3/I13uPHmXi5n/UCOqm/6z6F4WS2HYERq+1qYnTJqw/wLnJ1Wd0Z5TYeom9pXSQvnVnyLnf54q8bl0z0LltVKFHbEElJezNDPKgCCO34bhTfxUQ8VHoVPPoaC4kncb+VkaOqF4i6FS3IWncV1H7JhvpzZLDKtxkd061v1GTAJYLGUvbjdnyueuMXz5komlRyX1Gf+RRUxxN5nAPSFdowLaQzSdlSHvbEPeedfIO3uE9XbPqqkLJwnejII2TDNTdbouYhpgrmMAzDEA5l4DMGcE2DODN0z35Z+DmOP/TsRMPZO+JKpVLyZwVCW2X21DgsoSh0NYYlF3t5RQVoVo2sbpCh54Zwv/ZTW5yZ9+UV6Zqehh7Z3J5v9Xuke12Xa15PA1CuvZq1H9TlcPtNIC2Vqg+pNHgS6o9/byNhTiTCskeIdEnFuTSKAxqzdwcyXS7sqasrL+MIk0bzonkV/JoaNdMd0w3+8IVafXEK+un4FhMVtgynaZErwbE8Ko43cuFcJaU1TwcULwR0LAebmPYxziumtRmwVB0738PVqMGRRELrW93VvYbfcE9AL5bqPde3T97YdBbJ1GBxJdfP72w1nOlu9sXc7tIZz1R8Bv2v3dHMT1GdpvwNgdbwUSSiM9o/R0iik7ICbdsmqbJdtggYsp83I4ygwrcAEE51UGcijKGf0ylyMHHDIo8U+0qxwkvWrPKry9jeU9CAsiOMnlWgB5Vbg3soPGISL36kGGo6gSCkE7IJv2JNLUMlhTPbg6UVUzsdqFqs90rd7J5nxxt/D9YFBA7ffV98aFxnEJ7664pu5sfEz5okTyACEuMc2HtXPeISVLabbbTx1xXXdL5OnNi6+W597auzKsvasrbIkMB4/v6WaCT+lm3BvrZrQ9rqcfj8xtZlz9dEtvj6/YzARjHVx60vVMS3jCYsFj5jOsX9bY66aX72u9ZYPqB5xqidvuP0A1Dd2/2dzH/wA= \ No newline at end of file diff --git a/doc/xpcf_overview.pptx b/doc/xpcf_overview.pptx deleted file mode 100644 index 6633e31..0000000 Binary files a/doc/xpcf_overview.pptx and /dev/null differ diff --git a/interfaces/ComponentBase.h b/interfaces/ComponentBase.h new file mode 100644 index 0000000..e0a0075 --- /dev/null +++ b/interfaces/ComponentBase.h @@ -0,0 +1,88 @@ +/** + * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @author Loïc Touraine + * + * @file + * @brief description of file + * @date 2017-04-28 + */ + +#ifndef __ComponentBase_H__ +#define __ComponentBase_H__ + +#include +#include +#include +#include "ComponentFactory.h" + +namespace org { +namespace bcom { +namespace xpcf { + +class XPCF_EXPORT_API ComponentBase : public virtual IComponentIntrospect +{ + friend class ComponentFactory; +public: + ComponentBase(); + virtual ~ComponentBase(); + const uuids::uuid & getUUID() const { return m_UUID; } + + // IComponentIntrospect + // + int getNbInterfaces() const final; + void getInterfaces(uuids::uuid* interfacesArray) const final; + const char* getDescription(const uuids::uuid& interfaceUUID) const final; + + // It is the component that decides if it must or must not unload when all + // refs are out + virtual void unloadComponent() = 0; + +protected : + template + void addInterface(T* componentThis, const char * interfaceID, const char * name); + void setUUID(const uuids::uuid& componentUUID); + void setUUID(const char * componentUUID); + +private: + SRef introspect() final; + void addComponentRef() final; + void releaseComponentRef() final; + void addInterface(uuids::uuid& interfaceUUID, utils::any componentThis, const char * name); + + utils::any queryInterface(const uuids::uuid& interfaceUUID) const final; + + class InternalImpl; + SRef m_internalImpl; + + uuids::uuid m_UUID; + unsigned long m_count; +}; + +template +void ComponentBase::addInterface(T* componentThis, const char * interfaceUUID, const char * name) +{ + if (utils::is_base_of::value) { + uuids::uuid interfaceId = toUUID(interfaceUUID); + addInterface(interfaceId, componentThis,name); + } + else { + //TODO :handle error + } +} + +}}} //namespace org::bcom::xpcf + +#endif diff --git a/interfaces/ComponentFactory.h b/interfaces/ComponentFactory.h new file mode 100644 index 0000000..d4ce5c2 --- /dev/null +++ b/interfaces/ComponentFactory.h @@ -0,0 +1,133 @@ +/** + * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @author Loïc Touraine + * + * @file + * @brief description of file + * @date 2017-04-28 + */ + +#ifndef __ComponentFactory_H__ +#define __ComponentFactory_H__ + +#include +#include "IComponentIntrospect.h" +// NOTE : ALL COMPONENTS MUST THROW EXCEPTIONS DERIVED from std::exception, in order to be able to catch all exceptions in a uniform way +// OR NO exceptions ? + +namespace org { +namespace bcom { +namespace xpcf { + +// Other shared rI counting solution : +// Add virtual release method upon interface, for each shared returned provide this method as custom deleter +// Increment count for each shared (rI or concrete) returned +// decrement count foreach release call +// inside concrete release impl, delete this when count == 0 from Unload() + +/** @class ComponentFactory +* @brief Specifies the ComponentFactory class. +* +* This class provides factory method definitions to handle component creation. +* The ComponentFactory class is a friend class of IComponentIntrospect interface + */ +class ComponentFactory { +public: + /** + * Creates a component of type T. T must be an IComponentIntrospect derived class. T must meet the is_class requirement from std::type_traits library. + * @param [inout] an empty IComponentIntrospect smart reference that will be initialized with the component created + * @return FAILS when T doesn't fulfill req ? + */ + template static void createComponent(SRef & componentRef); + + /** + * Creates a component of type T and retrieve the component as a smart reference to interface U. + * T must be an U derived class. U must be an IComponentIntrospect derived class. + * T and U must meet the is_class requirement from std::type_traits library. + * @param [inout] an empty U smart reference that will be initialized with the component created + * @return FAILS when T doesn't fulfill req ? + */ + template static void createComponent(const uuids::uuid& interfaceUUID, SRef & componentRef); + + template static void createComponent(const char * interfaceUUID, SRef & componentRef); + + // The method below MUST BE specialized in the component implementation + // + +/** + * Delegates a T component creation. + * This method MUST BE specialized for the concrete T component type - i.e. it must be specialized in the component implementation. + * This mechanism insures that component allocation takes place in the same translation unit where deallocation will occur. + * @return a pointer on the component created + */ + template static T* createInstance(); +}; + +template void ComponentFactory::createComponent(SRef & componentRef) +{ + if (utils::is_base_of::value) { + T* component = ComponentFactory::createInstance(); + componentRef = IComponentIntrospect::acquireComponentRef(component); + } +} + +template void ComponentFactory::createComponent(const char * interfaceUUID, SRef & componentRef) +{ + createComponent(toUUID(interfaceUUID), componentRef); +} +template void ComponentFactory::createComponent(const uuids::uuid& interfaceUUID, SRef & componentRef) +{ + if ((utils::is_base_of::value) && (utils::is_base_of::value)) { + SRef iRef; + createComponent(iRef); + iRef->queryInterface(interfaceUUID,componentRef); + } +} + + +/** + * Provides a helper to define the UUID symbol of a component. + * This macro must be used inside the component body (i.e. the .cpp file), to insure the respect of the ODR rule. + * + * @param fullComponentType the full component type, for instance namespace::componentClass + */ +#define XPCF_DEFINE_UUID_SYMBOL(fullComponentType) constexpr const char * fullComponentType::UUID + +/** + * Default definition for ComponentFactory::createInstance. + * This definition provides the dynamic creation of the component instance. + * If the component must provide a different strategy, specialize the ComponentFactory::createInstance method and override ComponentBase::unloadComponent directly inside the component body + * This macro must be used inside the component body (i.e. the .cpp file), to insure the respect of the ODR rule. + * Moreover the creation must occur inside the translation unit of the component. + * + * @param fullComponentType the full component type, for instance namespace::componentClass + * @return the pointer on the new object created + */ +#define XPCF_DEFINE_FACTORY_CREATE_INSTANCE(fullComponentType) \ +namespace org { namespace bcom { namespace xpcf { \ +template<> XPCF_EXPORT_API fullComponentType* ComponentFactory::createInstance() { \ + return new fullComponentType(); \ +}\ +}}} \ +void fullComponentType::unloadComponent () \ +{\ + delete this; \ +}\ +XPCF_DEFINE_UUID_SYMBOL(fullComponentType) + +}}} //namespace org::bcom::xpcf + +#endif diff --git a/interfaces/ComponentMetadata.h b/interfaces/ComponentMetadata.h new file mode 100644 index 0000000..525cc16 --- /dev/null +++ b/interfaces/ComponentMetadata.h @@ -0,0 +1,59 @@ +/** + * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @author Loïc Touraine + * + * @file + * @brief description of file + * @date 2017-04-28 + */ + +#ifndef __ComponentMetadata_H__ +#define __ComponentMetadata_H__ + +#include "XPCF_definitions.h" +#include + +#include +#include +#include "InterfaceMetadata.h" + +namespace org { +namespace bcom { +namespace xpcf { + +class XPCF_EXPORT_API ComponentMetadata : public InterfaceMetadata { +public: + ComponentMetadata() = delete; + ComponentMetadata(const char* name, const uuids::uuid& componentID, const uuids::uuid& containerUUID); + ComponentMetadata(const char* name, const char *componentID, const char *containerUUID); + virtual ~ComponentMetadata(); + + void addInterface(const uuids::uuid& interfaceUUID); + uuids::uuid getInterface(int i) const; + int getNbInterfaces() const; + + uuids::uuid getContainerUUID() const; + + +private: + void setContainerUUID(const char * containerUUID); + std::vector m_interfaceUUIDs; + uuids::uuid m_containerUUID; +}; + +}}} //namespace org::bcom::xpcf + +#endif diff --git a/interfaces/ContainerFactory.h b/interfaces/ContainerFactory.h new file mode 100644 index 0000000..1d0da22 --- /dev/null +++ b/interfaces/ContainerFactory.h @@ -0,0 +1,99 @@ +/** + * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @author Loïc Touraine + * + * @file + * @brief description of file + * @date 2017-04-28 + */ + +#ifndef __ContainerFactory_H__ +#define __ContainerFactory_H__ + +#include +#include +#include + +namespace org { +namespace bcom { +namespace xpcf { +#define XPCF_GETCOMPONENT "XPCF_getComponent" +#define XPCF_GETNBCOMPONENTS "XPCF_getNbComponents" +#define XPCF_GETCOMPONENTUUID "XPCF_getComponentUUID" +#define XPCF_GETCOMPONENTNAME "XPCF_getComponentName" +#define XPCF_GETCONTAINERUUID "XPCF_getContainerUUID" +#define XPCF_GETCONTAINERNAME "XPCF_getContainerName" + +// getComponent signature is : long XPCF_getComponent(const uuids::uuid &, SRef&) + +#define EXPORT_XPCF_getNbComponents_FUNCTION extern "C" XPCF_EXPORT_API unsigned long XPCF_getNbComponents() \ +{ \ + if (containerComponentUUIDArray.empty()) { \ + for (auto componentItem : containerComponentMap) { \ + containerComponentUUIDArray.push_back(componentItem.first); \ + } \ + } \ + return containerComponentUUIDArray.size(); \ +} + +#define EXPORT_XPCF_getComponentUUID_FUNCTION extern "C" XPCF_EXPORT_API const char * XPCF_getComponentUUID(unsigned long index) \ +{ \ + const char * componentUUID = nullptr; \ + if (index < containerComponentUUIDArray.size()) { \ + componentUUID = containerComponentUUIDArray[index].c_str(); \ + } \ + return componentUUID; \ +} + + +#define EXPORT_XPCF_getComponentName_FUNCTION extern "C" XPCF_EXPORT_API const char * XPCF_getComponentName(const char * componentUUID) \ +{ \ + std::string componentStrUUID = componentUUID; \ + if (containerComponentMap.find(componentStrUUID) != containerComponentMap.end()) { \ + return containerComponentMap.at(componentStrUUID).c_str(); \ + } \ + return nullptr; \ +} + +#define EXPORT_XPCF_getContainerUUID_FUNCTION extern "C" XPCF_EXPORT_API const char * XPCF_getContainerUUID() \ +{ \ + return containerUUID.c_str(); \ +} + + +#define EXPORT_XPCF_getContainerName_FUNCTION extern "C" XPCF_EXPORT_API const char * XPCF_getContainerName() \ +{ \ + return containerName.c_str(); \ +} + +#define XPCF_BEGIN_COMPONENTS_DECLARATION static std::map containerComponentMap = { + +#define XPCF_ADD_COMPONENT(componentID,componentName) {componentID,componentName}, + +#define XPCF_END_COMPONENTS_DECLARATION }; \ +static std::vector containerComponentUUIDArray; \ +EXPORT_XPCF_getNbComponents_FUNCTION \ +EXPORT_XPCF_getComponentUUID_FUNCTION \ +EXPORT_XPCF_getComponentName_FUNCTION + +#define XPCF_DECLARE_CONTAINER(UUID,name) static std::string containerUUID = UUID; \ +static std::string containerName = name; \ +EXPORT_XPCF_getContainerUUID_FUNCTION \ +EXPORT_XPCF_getContainerName_FUNCTION + +}}} //namespace org::bcom::xpcf + +#endif diff --git a/interfaces/ContainerMetadata.h b/interfaces/ContainerMetadata.h new file mode 100644 index 0000000..c7427ff --- /dev/null +++ b/interfaces/ContainerMetadata.h @@ -0,0 +1,58 @@ +/** + * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @author Loïc Touraine + * + * @file + * @brief description of file + * @date 2017-04-28 + */ + +#ifndef __ContainerMetadata_H__ +#define __ContainerMetadata_H__ + +#include "XPCF_definitions.h" +#include + +#include +#include +#include "InterfaceMetadata.h" + +namespace org { +namespace bcom { +namespace xpcf { + +class XPCF_EXPORT_API ContainerMetadata : public InterfaceMetadata { +public: + ContainerMetadata() = delete; + ContainerMetadata(const char* name, const uuids::uuid& containerID, const char *containerPath); + ContainerMetadata(const char* name, const char *containerID, const char *containerPath); + virtual ~ContainerMetadata(); + + void addComponent(const uuids::uuid& componentUUID); + uuids::uuid getComponent(int i) const; + int getNbComponents() const; + + const char *getPath() const; + +private: + void setPath(const char* containerPath); + std::vector m_componentUUIDs; + std::basic_string m_containerPath; +}; + +}}} //namespace org::bcom::xpcf + +#endif diff --git a/interfaces/ICloneable.h b/interfaces/ICloneable.h deleted file mode 100644 index db5d584..0000000 --- a/interfaces/ICloneable.h +++ /dev/null @@ -1,44 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2018-07-13 - */ - -#ifndef ORG_BCOM_XPCF_ICLONEABLE_H -#define ORG_BCOM_XPCF_ICLONEABLE_H -#include "IComponentIntrospect.h" - -namespace org { namespace bcom { namespace xpcf { - -class ICloneable : virtual public IComponentIntrospect { -public: - virtual ~ICloneable() = default; - //deep clone - virtual SRef clone () = 0; -}; - -template <> struct InterfaceTraits -{ - static constexpr const char * UUID = "79CD3C44-5418-4FBF-945A-2D841A05A369"; - static constexpr const char * DESCRIPTION = "XPCF::ICloneable interface"; -}; - -}}} - -#endif // ICLONEABLE_H diff --git a/interfaces/IComponentIntrospect.h b/interfaces/IComponentIntrospect.h new file mode 100644 index 0000000..f2aba9c --- /dev/null +++ b/interfaces/IComponentIntrospect.h @@ -0,0 +1,192 @@ +/** + * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @author Loïc Touraine + * + * @file + * @brief description of file + * @date 2017-04-28 + */ + +#ifndef __IComponentIntrospect_H__ +#define __IComponentIntrospect_H__ + +#include "XPCF_definitions.h" +#include + +// NOTE : ALL COMPONENTS MUST THROW EXCEPTIONS DERIVED from std::exception, in order to be able to catch all exceptions in a uniform way +//TODO : namespacing normalization +namespace org { +namespace bcom { +namespace xpcf { +/*$ + * @class IComponentIntrospect + * @brief Specifies the IComponentIntrospect interface. + * + * This interface provides method definitions to handle component introspection. + * The ComponentFactory class is a friend class to allow access to protected and private methods of IComponentIntrospect + */ +class IComponentIntrospect { + friend class ComponentFactory; +public: + /** + * Virtual destructor of IComponentIntrospect + */ + virtual ~IComponentIntrospect() = default; + + /** + * Returns the number of interfaces the component implements + * @return the number of interfaces + */ + virtual int getNbInterfaces() const = 0; + + /** + * Fills the array interfacesArray with the interface UUIDs' list. + * @note The array must be allocated on the user side. It must be allocated with the number of interfaces retrieved with @fn getNbInterfaces() + * @param [in] interfacesArray + * @return NULLobject if interfacesArray is null + */ + virtual void getInterfaces(uuids::uuid* interfacesArray) const = 0; + +/** + * Retrieves an interface description from its UUID + * @param [in] interfaceUUID the interface unique ID + * @return the interface description + */ + virtual const char* getDescription(const uuids::uuid& interfaceUUID) const = 0; + + // Naming : queryInterface or bindTo ? +/** + * [queryInterface description] + * @param interfaceUUID [description] + * @param aRef [description] + * @return [description] + */ + template + unsigned long queryInterface(const uuids::uuid& interfaceUUID, SRef& aRef); + + template + SRef queryInterface(const uuids::uuid& interfaceUUID); + + static constexpr const char * UUID = "125f2007-1bf9-421d-9367-fbdc1210d006"; + +protected: + /** + * Retrieve a component or interface smart reference from its pointer, incrementing the component reference counter with @fn addComponentRef. + * The smart reference created is initialized with the IComponentIntrospectDeleter custom deleter. + * This deleter calls @fn releaseComponentRef when the smart reference is destroyed. + * @param component the component or interface pointer + * @param aRef the component smart reference + */ + template static void acquireComponentRef(T* component,SRef& aRef); + + template static SRef acquireComponentRef(T* component); + + /** + * [queryInterface description] + * @param interfaceUUID [description] + * @return [description] + */ + virtual utils::any queryInterface(const uuids::uuid & interfaceUUID) const = 0; + +private: + /** + * @return the smart reference on the IComponentIntrospect interface of the underlying component + */ + virtual SRef introspect() = 0; + + /** + * Increment the reference counter of the component + */ + virtual void addComponentRef() = 0; + + /** + * Decrement the reference counter of the component + */ + virtual void releaseComponentRef() = 0; + + template + class IComponentIntrospectDeleter + { + public: + void operator()(T * p) + { + if (p) { + static_cast(p)->releaseComponentRef(); + } + } + }; +}; + +template void IComponentIntrospect::acquireComponentRef(T* component,SRef& componentRef) { + componentRef = SRef(component,IComponentIntrospectDeleter()); + static_cast>(componentRef)->addComponentRef(); +} + +template SRef IComponentIntrospect::acquireComponentRef(T* component) { + SRef componentRef = SRef(component,IComponentIntrospectDeleter()); + static_cast>(componentRef)->addComponentRef(); + return componentRef; +} + + +template +unsigned long IComponentIntrospect::queryInterface(const uuids::uuid& interfaceUUID, SRef& aRef) +{ + aRef = queryInterface(interfaceUUID); + + if (!aRef) { + return XPCF_FAIL; + } + + return XPCF_OK; +} + +template +SRef IComponentIntrospect::queryInterface(const uuids::uuid& interfaceUUID) +{ + SRef componentRef; + utils::any obj = queryInterface(interfaceUUID); + if (obj.empty()) { + return componentRef; + } + + //Use a custom deleter and component ref counter + try { + //IComponentIntrospect::acquireComponentRef(utils::any_cast(obj),componentRef); + componentRef = IComponentIntrospect::acquireComponentRef(utils::any_cast(obj)); + } + catch (const utils::bad_any_cast &) { + // continue to function end : reference will be empty + } + return componentRef; +} + +inline uuids::uuid toUUID(const char * uuidString) +{ + uuids::string_generator gen; + return gen(uuidString); +} + +/** + * [XPCF_DECLARE_UUID description] + * @param uuid [description] + * @return [description] + */ +#define XPCF_DECLARE_UUID(uuid) static constexpr const char * UUID = uuid + +}}} //namespace org::bcom::xpcf + +#endif diff --git a/interfaces/IComponentManager.h b/interfaces/IComponentManager.h new file mode 100644 index 0000000..65a716e --- /dev/null +++ b/interfaces/IComponentManager.h @@ -0,0 +1,92 @@ +/** + * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @author Loïc Touraine + * + * @file + * @brief description of file + * @date 2017-04-28 + */ + +#ifndef __IComponentManager_H__ +#define __IComponentManager_H__ + +#include "XPCF_definitions.h" +#include "ComponentMetadata.h" +#include "ContainerMetadata.h" +#include "InterfaceMetadata.h" +#include "IComponentIntrospect.h" + +#include +#include + +#include + +namespace org { +namespace bcom { +namespace xpcf { + +//TODO : +// - multi configuration files support : implemented TO TEST !!(now isLoaded is set once a first configuration file is successfully loaded, but doesn't prevent from loading other configuration files) +// - configuration file generation from : 1/ a container 2/ a path to search containers for + +class IComponentManager : public virtual IComponentIntrospect { +public: + virtual ~IComponentManager() = default; + virtual unsigned long load() = 0; + virtual unsigned long load(const char* libraryFilePath) = 0; + + virtual bool isLoaded() const = 0; + + //virtual SPtr introspectContainer(const char* containerFilePath) = 0; + virtual SPtr introspectContainer(const char* containerFilePath) = 0; + virtual SPtr getContainerComponentList(const uuids::uuid& componentUUID) = 0; + virtual void addContainerRef(const uuids::uuid& containerUUID) = 0; + virtual void releaseContainerRef(const uuids::uuid& containerUUID) = 0; + + template + unsigned long createComponent(const uuids::uuid& componentUUID,const uuids::uuid& interfaceUUID, SRef & componentRef); + virtual unsigned long createComponent(const uuids::uuid& componentUUID, SRef & componentRef) = 0; + + virtual int getNbComponentMetadatas() const = 0; + virtual SPtr getComponentMetadata(int) const = 0; + virtual SPtr findComponentMetadata(const uuids::uuid &) const = 0; + + virtual int getNbInterfaceMetadatas() const = 0; + virtual SPtr getInterfaceMetadata(int) const = 0; + virtual SPtr findInterfaceMetadata(const uuids::uuid&) const = 0; + + static constexpr const char * UUID = "F3DBCB05-B8C6-47FB-BF80-E86D97DA46B8"; + +}; + +template +unsigned long IComponentManager::createComponent(const uuids::uuid& componentUUID,const uuids::uuid& interfaceUUID,SRef& componentRef) +{ + SRef rICIntrospect; + unsigned long result = createComponent(componentUUID, rICIntrospect); + if (result != XPCF_OK) { + return result; + } + rICIntrospect->queryInterface(interfaceUUID, componentRef); + return XPCF_OK; +} + + +XPCF_EXPORT_API SRef getComponentManagerInstance(); + +}}} //namespace org::bcom::xpcf + +#endif diff --git a/interfaces/InterfaceMetadata.h b/interfaces/InterfaceMetadata.h new file mode 100644 index 0000000..a4087a6 --- /dev/null +++ b/interfaces/InterfaceMetadata.h @@ -0,0 +1,53 @@ +/** + * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @author Loïc Touraine + * + * @file + * @brief description of file + * @date 2017-04-28 + */ + +#ifndef __InterfaceMetadata_H__ +#define __InterfaceMetadata_H__ + +#include "XPCF_definitions.h" +#include +#include + +namespace org { +namespace bcom { +namespace xpcf { + +class XPCF_EXPORT_API InterfaceMetadata { +public: + InterfaceMetadata() = delete; + InterfaceMetadata(const char * name, const uuids::uuid& interfaceUUID); + InterfaceMetadata(const char * name, const char * interfaceUUID); + virtual ~InterfaceMetadata() = default; + + const char * getDescription() const { return m_description.c_str(); } + + inline uuids::uuid getUUID() const { return m_uuid; } + +private: + void setUUID(const char * elementUUID); + std::basic_string m_description; + uuids::uuid m_uuid; +}; + +}}} //namespace org::bcom::xpcf + +#endif diff --git a/interfaces/MethodMetadata.h b/interfaces/MethodMetadata.h index 5473009..4af7abc 100644 --- a/interfaces/MethodMetadata.h +++ b/interfaces/MethodMetadata.h @@ -20,26 +20,14 @@ * @date 2017-04-28 */ -#ifndef ORG_BCOM_XPCF_METHODMETADATA_H -#define ORG_BCOM_XPCF_METHODMETADATA_H +#ifndef __MethodMetadata_H__ +#define __MethodMetadata_H__ -#include -#include "xpcf/core/uuid.h" - -namespace org { namespace bcom { namespace xpcf { class MethodMetadata { public: MethodMetadata(); - const char * getDescription() const { return m_description.c_str(); } - MethodMetadata(const char * name, const uuids::uuid& interfaceUUID); - -private: - std::basic_string m_description; - uuids::uuid m_interfaceUuid; }; -}}} //namespace org::bcom::xpcf - -#endif // METHODMETADATA_H +#endif // __MethodMetadata_H__ diff --git a/interfaces/XPCF_definitions.h b/interfaces/XPCF_definitions.h new file mode 100644 index 0000000..d6d5c24 --- /dev/null +++ b/interfaces/XPCF_definitions.h @@ -0,0 +1,107 @@ +/** + * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @author Loïc Touraine + * + * @file + * @brief description of file + * @date 2017-04-28 + */ + +#ifndef _XPCF_ComDefine_HeaderFile__ +#define _XPCF_ComDefine_HeaderFile__ + +#if _WIN32 +#define XPCF_EXPORT_API __declspec(dllexport) +#else +#define XPCF_EXPORT_API +#endif + +#ifdef _WIN32 +#define XPCF_IMPORT_API __declspec(dllimport) +#else +#define IMPORT_API +#endif + +enum class XPCFErrorCode : long { + _SUCCESS = 0, /**< Operation successfull */ + _FAIL = -1, /**< Operation failed */ + _ERROR_INVALID_ARGUMENT = -10, /**< */ + _ERROR_DOMAIN = -11, /**< */ + _ERROR_NOT_IMPLEMENTED = -12, /**< */ + _ERROR_NULL_POINTER = -13, /**< */ + _ERROR_OUT_OF_RANGE = -14, /**< */ + _ERROR_OVERFLOW = -20, /**< */ + _ERROR_UNDERFLOW = -21, /**< */ + _ERROR_OUT_OF_MEMORY = -22, /**< */ + _ERROR_RANGE = -23, /**< */ + _ERROR_SYSTEM = -24 /**< */ +}; + + +#define XPCF_FAIL 0x00000000L +#define XPCF_OK 0x00000001L + +#define XPCF_ERROR 0x00000002L + +#define XPCF_NOINTERFACE 0x00000002L + +#define XPCF_NOGETCOMPONENT XPCF_FAIL+1 + +#define XPCF_NAME_LENGTH 128 +#define XPCF_PATH_LENGTH 256 +#define XPCF_ERROR_MSG_LENGTH 128 + + +#ifndef XPCF_MANAGED_CPP_ENABLED +#ifndef XPCF_STD_SHAREDPTR +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace sptrnms = boost; +namespace org {namespace bcom { namespace xpcf { +namespace utils = boost; +namespace uuids = boost::uuids; +namespace unixpcf = boost::movelib; +}}} +#else +#include +#include +#include +namespace utils = std; +namespace unixpcf = std; +#endif +#else +//#define SPtr(N) N * +#define SPtr(N) SPtr_##N +#define SRef(N) N * +#endif + +template +using SRef = org::bcom::xpcf::utils::shared_ptr; +template +using SPtr = org::bcom::xpcf::utils::shared_ptr; + +template +using UniqueRef = org::bcom::xpcf::unixpcf::unique_ptr; + +#endif //_XPCF_ComDefine_HeaderFile__ diff --git a/interfaces/private/xpcf/AliasManager.h b/interfaces/private/xpcf/AliasManager.h deleted file mode 100644 index 047f45a..0000000 --- a/interfaces/private/xpcf/AliasManager.h +++ /dev/null @@ -1,108 +0,0 @@ -/** - * @copyright Copyright (c) 2019 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2019-06-13 - */ - -#ifndef ORG_BCOM_XPCF_ALIASMANAGER_H -#define ORG_BCOM_XPCF_ALIASMANAGER_H - -//#define BOOST_ALL_DYN_LINK 1 - - -#include -#include -#include "tinyxmlhelper.h" - -#ifdef XPCF_WITH_LOGS -#include -#include -#include -#endif - -#include -#include -#include - -namespace org { namespace bcom { namespace xpcf { - -struct AliasContext { - std::map componentResolverMap; - std::map interfaceResolverMap; - std::map moduleResolverMap; - void clear(); -}; - -class AbstractAliasManager : virtual public IAliasManager { -public: - virtual ~AbstractAliasManager() override = default; - virtual void clear() = 0; - virtual void declareAliases(tinyxml2::XMLElement * xmlModuleElt) = 0; - virtual SRef getContext() const = 0; - virtual SRef context() = 0; - virtual void setContext(SRef context) = 0; -}; - -template <> struct InterfaceTraits -{ - static constexpr const char * UUID = "A05EB0B3-682E-4FAB-82B7-A3CBCAADE866"; - static constexpr const char * NAME = "XPCF::AbstractAliasManager"; - static constexpr const char * DESCRIPTION = "AbstractAliasManager interface.\nProvides named alias handling towards uuids (component, interface or module uuid) "; -}; - - -class AliasManager : public ComponentBase, - virtual public AbstractAliasManager { -public: - AliasManager(); - ~AliasManager() override = default; - void clear() override; - void declareAliases(tinyxml2::XMLElement * xmlModuleElt) override; - bool aliasExists(Type type, const std::string & name) override; - void declareAlias(Type type, const std::string & name, const uuids::uuid & uuid) override; - const uuids::uuid & resolveComponentAlias(const std::string & name) override; - const uuids::uuid & resolveInterfaceAlias(const std::string & name) override; - const uuids::uuid & resolveModuleAlias(const std::string & name) override; - SRef getContext() const override; - SRef context() override { return m_context; } - void setContext(SRef context) override; - void unloadComponent () override final; - -private: - void declareExplicitAlias(Type type, const std::string & name, const uuids::uuid & uuid); - void declareAliasNode(tinyxml2::XMLElement * xmlAliasElt); - const uuids::uuid & resolveAlias(const std::string & name, const std::map & elementMap); - - SRef m_context; - std::map> m_addAliasFunction; -#ifdef XPCF_WITH_LOGS - boost::log::sources::severity_logger< boost::log::trivial::severity_level > m_logger; -#endif -}; - -template <> struct ComponentTraits -{ - static constexpr const char * UUID = "007AF927-A585-4D2C-B604-9CF25B4B191A"; - static constexpr const char * NAME = "XPCF::AliasManager"; - static constexpr const char * DESCRIPTION = "XPCF::AliasManager"; -}; - -}}} //namespace org::bcom::xpcf - -#endif diff --git a/interfaces/private/xpcf/ComponentManager.h b/interfaces/private/xpcf/ComponentManager.h deleted file mode 100644 index abac1ff..0000000 --- a/interfaces/private/xpcf/ComponentManager.h +++ /dev/null @@ -1,100 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-08-18 - */ - -#ifndef ORG_BCOM_XPCF_COMPONENTMANAGER_H -#define ORG_BCOM_XPCF_COMPONENTMANAGER_H - -//#define BOOST_ALL_DYN_LINK 1 - -#include -#include -#include -#include "tinyxmlhelper.h" - -#ifdef XPCF_WITH_LOGS -#include -#include -#include -#endif - -#include -#include "Factory.h" -#include "Registry.h" -#include "AliasManager.h" - -#include -#include -#include -#include - -namespace org { namespace bcom { namespace xpcf { - -class XPCF_EXPORT_API ComponentManager : public ComponentBase, - virtual public IComponentManager { -public: - static ComponentManager* instance(); - SRef getFactory() override; - XPCFErrorCode load() override; - XPCFErrorCode load(const char* libraryFilePath) override; - XPCFErrorCode load(const char* folderPathStr, bool bRecurse) override; - - void clear() override; - SRef createComponent(const uuids::uuid & componentUUID) final; - SRef createComponent(const char * instanceName, const uuids::uuid& componentUUID) override; - - void unloadComponent () override final; - void releaseComponent(uuids::uuid componentUUID); - - const IEnumerable> & getModulesMetadata() const override; - SPtr findComponentMetadata(const uuids::uuid &) const override; - uuids::uuid getModuleUUID(const uuids::uuid & componentUUID) const override; - SPtr findModuleMetadata(const uuids::uuid &) const override; - - const IEnumerable> & getInterfacesMetadata() const override; - SPtr findInterfaceMetadata(const uuids::uuid&) const override; - -private: - ComponentManager(); - ~ComponentManager() override = default; - ComponentManager(const ComponentManager&)= delete; - ComponentManager& operator=(const ComponentManager&)= delete; - static std::atomic m_instance; - static std::mutex m_mutex; -#ifdef XPCF_WITH_LOGS - boost::log::sources::severity_logger< boost::log::trivial::severity_level > m_logger; -#endif - SRef m_factory; - SRef m_propertyManager; - - bool m_libraryLoaded; -}; - -template <> struct ComponentTraits -{ - static constexpr const char * UUID = "F905BCCD-9658-4871-87B8-B328C27675E0"; - static constexpr const char * NAME = "XPCF::ComponentManager"; - static constexpr const char * DESCRIPTION = "XPCF::ComponentManager"; -}; - -}}} //namespace org::bcom::xpcf - -#endif diff --git a/interfaces/private/xpcf/Factory.h b/interfaces/private/xpcf/Factory.h deleted file mode 100644 index f086fed..0000000 --- a/interfaces/private/xpcf/Factory.h +++ /dev/null @@ -1,309 +0,0 @@ -/** - * @copyright Copyright (c) 2019 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2019-06-05 - */ - -#ifndef ORG_BCOM_XPCF_FACTORY_H -#define ORG_BCOM_XPCF_FACTORY_H - -//#define BOOST_ALL_DYN_LINK 1 -#include -#include - -#include -#include "AliasManager.h" -#include "Registry.h" -#include "PropertyManager.h" -#include -#include "tinyxmlhelper.h" -#include - -#ifdef XPCF_WITH_LOGS -#include -#include -#include -#endif - -#include -#include -#include - -namespace org { namespace bcom { namespace xpcf { - -struct FactoryBindInfos { - uuids::uuid componentUUID; - BindingScope scope; - uint8_t bindingRangeMask = 0; - std::string properties; -}; - -constexpr uint8_t BindingRange_Core = 0; - -struct FactoryContext { - // interface Uuid resolves to [ component Uuid , scope ] - std::map autoBindings; - std::map defaultBindings; - std::map> multiBindings; - - // default and multibind properties association - // [interface UUID, component UUID] => properties name - std::map, std::string > bindingsProperties; - std::map, std::string > multiBindingsProperties; - - - // [interface Uuid, name] resolves to [ component Uuid , scope ] - std::map, FactoryBindInfos > namedBindings; - std::map, std::string > namedBindingsProperties; - // component UUID resolves to create function - std::map(void)>> factoryMethods; - // component Uuid resolves to [ Interface, [component Uuid , scope] ] - // Note : when a specific binding already exists in defaultBindings, it is not added in m_specificBindings - std::map > specificBindings; - - // component Uuid resolves to [ [interface Uuid , name] , [component Uuid , scope] ] - std::map, FactoryBindInfos> > specificNamedBindings; - - void clear(); - -}; - -enum class ContextType { - Component, - Named, - Specific, - Multi -}; - -using BindContext = std::pair; - -inline bool operator==(const FactoryBindInfos& lhs, const FactoryBindInfos& rhs) -{ - return lhs.componentUUID == rhs.componentUUID && - lhs.scope == rhs.scope && - lhs.properties == rhs.properties; -} - -class AbstractFactory : virtual public IFactory { -public: - virtual ~AbstractFactory() override = default; - virtual void autobind(const uuids::uuid & interfaceUUID, const uuids::uuid & instanceUUID) = 0; - virtual void inject(SRef component, std::deque contextLevels = {}) = 0; - virtual void declareFactory(tinyxml2::XMLElement * xmlModuleElt) = 0; -}; - -template <> struct InterfaceTraits -{ - static constexpr const char * UUID = "701F105A-C2A1-4939-96D9-754C9A087144"; - static constexpr const char * NAME = "XPCF::AbstractFactory"; - static constexpr const char * DESCRIPTION = "AbstractFactory interface.\nProvides binding between interfaces uuid and concrete components uuid for injection patterns"; -}; - -class Factory : public ComponentBase, - virtual public AbstractFactory, virtual public IAliasManager, virtual public IRegistryManager { -public: - Factory(); - ~Factory() override = default; - void clear() override; - void autobind(const uuids::uuid & interfaceUUID, const uuids::uuid & instanceUUID) override; - void bind(const uuids::uuid & interfaceUUID, const uuids::uuid & instanceUUID, - BindingScope scope, - uint8_t bindingRangeMask) override; - void bind(const std::string & name, const uuids::uuid & interfaceUUID, const uuids::uuid & instanceUUID, - BindingScope scope, - uint8_t bindingRangeMask) override; - void bind(const uuids::uuid & targetComponentUUID, const uuids::uuid & interfaceUUID, - const uuids::uuid & instanceUUID, BindingScope scope, - uint8_t bindingRangeMask) override; - void bind(const uuids::uuid & targetComponentUUID, const std::string & name, const uuids::uuid & interfaceUUID, - const uuids::uuid & instanceUUID, BindingScope scope, - uint8_t bindingRangeMask) override; - void bind(const uuids::uuid & interfaceUUID, const uuids::uuid & instanceUUID, - const std::function(void)> & factoryFunc, - BindingScope scope, - uint8_t bindingRangeMask) override; - void bind(const std::string & name, const uuids::uuid & interfaceUUID, const uuids::uuid & instanceUUID, - const std::function(void)> & factoryFunc, - BindingScope scope, - uint8_t bindingRangeMask) override; - void bind(const uuids::uuid & targetComponentUUID, const uuids::uuid & interfaceUUID, - const std::function(void)> & factoryFunc, - const uuids::uuid & instanceUUID, BindingScope scope, - uint8_t bindingRangeMask) override; - void bind(const uuids::uuid & targetComponentUUID, const std::string & name, const uuids::uuid & interfaceUUID, - const std::function(void)> & factoryFunc, - const uuids::uuid & instanceUUID, BindingScope scope, - uint8_t bindingRangeMask) override; - - void bind(const uuids::uuid & interfaceUUID, const FactoryBindInfos & bindInfos); - void bind(const std::string & name, const uuids::uuid & interfaceUUID, const FactoryBindInfos & bindInfos); - void bind(const uuids::uuid & targetComponentUUID, const uuids::uuid & interfaceUUID, const FactoryBindInfos & bindInfos); - void bind(const uuids::uuid & targetComponentUUID, const std::string & name, const uuids::uuid & interfaceUUID, - const FactoryBindInfos & bindInfos); - void bind(const uuids::uuid & interfaceUUID, - const std::function(void)> & factoryFunc, - const FactoryBindInfos & bindInfos); - void bind(const std::string & name, const uuids::uuid & interfaceUUID, - const std::function(void)> & factoryFunc, - const FactoryBindInfos & bindInfos); - void bind(const uuids::uuid & targetComponentUUID, const uuids::uuid & interfaceUUID, - const std::function(void)> & factoryFunc, - const FactoryBindInfos & bindInfos); - void bind(const uuids::uuid & targetComponentUUID, const std::string & name, const uuids::uuid & interfaceUUID, - const std::function(void)> & factoryFunc, - const FactoryBindInfos & bindInfos); - - XPCFErrorCode load() override; - XPCFErrorCode load(const char* libraryFilePath) override; - XPCFErrorCode load(const char* folderPathStr, bool bRecurse) override; - - void declareFactory(tinyxml2::XMLElement * xmlModuleElt) override; - SRef resolve(const SPtr & injectableInfo) override - { return resolve(injectableInfo, {}); } - SRef resolve(const uuids::uuid & interfaceUUID) override - { return resolve(interfaceUUID, std::deque()); } - SRef resolve(const uuids::uuid & interfaceUUID, const std::string & name) override - { return resolve(interfaceUUID, name, {}); } - const SRef>> resolveAll(const SPtr & injectableInfo) override - { return resolveAll(injectableInfo, {}); } - const SRef>> resolveAll(const uuids::uuid & interfaceUUID) override - { return resolveAll(interfaceUUID, {}); } - - SRef resolve(const SPtr & injectableInfo, - std::deque contextLevels); - SRef resolve(const uuids::uuid & interfaceUUID, - std::deque contextLevels); - SRef resolve(const uuids::uuid & interfaceUUID, const std::string & name, - std::deque contextLevels); - const SRef>> resolveAll(const SPtr & injectableInfo, - std::deque contextLevels); - const SRef>> resolveAll(const uuids::uuid & interfaceUUID, - std::deque contextLevels); - uuids::uuid getComponentUUID(const uuids::uuid & interfaceUUID) override; - uuids::uuid getComponentUUID(const uuids::uuid & interfaceUUID, const std::string & name) override; - - SRef createNewFactoryContext(ContextMode ctxMode) override; - - // IComponentManager methods - SRef createComponent(const uuids::uuid & componentUUID) override; - SRef createComponent(const char * instanceName, const uuids::uuid & componentUUID) override; - - // IAliasManager methods - bool aliasExists(Type type, const std::string & name) override - { return m_aliasManager->aliasExists(type, name); } - - void declareAlias(Type type, const std::string & name, const uuids::uuid & uuid) override - { return m_aliasManager->declareAlias(type, name, uuid); } - - const uuids::uuid & resolveComponentAlias(const std::string & name) override - { return m_aliasManager->resolveComponentAlias(name); } - - const uuids::uuid & resolveInterfaceAlias(const std::string & name) override - { return m_aliasManager->resolveInterfaceAlias(name); } - - const uuids::uuid & resolveModuleAlias(const std::string & name) override - { return m_aliasManager->resolveModuleAlias(name); } - - // IRegistryManager methods - - XPCFErrorCode loadModules(const char* folderPathStr, bool bRecurse) override - { return m_resolver->loadModules(folderPathStr, bRecurse); } - - XPCFErrorCode loadModuleMetadata(const char* moduleName, - const char* moduleFilePath) override - { return m_resolver->loadModuleMetadata(moduleName, moduleFilePath); } - - const IEnumerable> & getModulesMetadata() const override - { return m_resolver->getModulesMetadata(); } - - SPtr findComponentMetadata(const uuids::uuid & componentUUID) const override - { return m_resolver->findComponentMetadata(componentUUID); } - - uuids::uuid getModuleUUID(const uuids::uuid & componentUUID) const override - { return m_resolver->getModuleUUID(componentUUID); } - - SPtr findModuleMetadata(const uuids::uuid & moduleUUID) const override - { return m_resolver->findModuleMetadata(moduleUUID); } - - const IEnumerable> & getInterfacesMetadata() const override - { return m_resolver->getInterfacesMetadata(); } - - SPtr findInterfaceMetadata(const uuids::uuid & interfaceUUID) const override - { return m_resolver->findInterfaceMetadata(interfaceUUID); } - - void unloadComponent () override final; - -private: - template < typename I, typename C, BindingScope scope = BindingScope::Transient > void bindCore(); - void bindCore(const uuids::uuid & interfaceUUID, const FactoryBindInfos & bindInfos); - void declareBindings(tinyxml2::XMLElement * xmlModuleElt); - void declareInjects(tinyxml2::XMLElement * xmlModuleElt); - void declareBind(tinyxml2::XMLElement * xmlBindElt); - void declareSingleBind(const uuids::uuid & interfaceUUID, tinyxml2::XMLElement * xmlBindElt); - void declareMultiBind(const uuids::uuid & interfaceUUID, tinyxml2::XMLElement * xmlBindElt); - void declareInject(tinyxml2::XMLElement * xmlBindElt); - void declareSpecificBind(tinyxml2::XMLElement * xmlBindElt, const uuids::uuid & targetComponentUUID); - FactoryBindInfos getComponentBindingInfos(tinyxml2::XMLElement * xmlBindElt); - SRef create(const uuids::uuid& componentUUID); - XPCFErrorCode loadLibrary(fs::path configurationFilePath); - template XPCFErrorCode load(fs::path folderPath); - SRef resolveFromModule(const uuids::uuid & componentUUID); - SRef resolveComponent(const FactoryBindInfos & bindInfos, - std::deque contextLevels); - void inject(SRef component, - std::deque contextLevels={}) final; - SPtr resolveMetadataFromComponentUUID(const uuids::uuid & componentUUID) { - return m_resolver->findModuleMetadata(m_resolver->getModuleUUID(componentUUID)); - } - FactoryBindInfos resolveBind(const uuids::uuid & interfaceUUID, std::deque contextLevels); - FactoryBindInfos resolveBind(const uuids::uuid & interfaceUUID, const std::string & name, std::deque contextLevels ); -#ifdef XPCF_WITH_LOGS - boost::log::sources::severity_logger< boost::log::trivial::severity_level > m_logger; - std::stringstream log(const FactoryBindInfos & bindInfos); -#endif - // The factory context contains every declared bind - SRef m_context; - - // component Uuid resolves to IComponentIntrospect reference - std::map > m_singletonInstances; - - // [component Uuid, name] resolves to IComponentIntrospect reference - std::map,SRef > m_namedSingletonInstances; - - std::map m_coreBindings; - std::map > m_coreInstances; - // component UUID resolves to create function - std::map(void)>> m_coreFactoryMethods; - - SRef m_resolver; - SRef m_aliasManager; - SRef m_propertyManager; -}; - -template <> struct ComponentTraits -{ - static constexpr const char * UUID = "D6B80168-5E3D-4CB8-B7DF-1261FFE67E9E"; - static constexpr const char * NAME = "XPCF::Factory"; - static constexpr const char * DESCRIPTION = "XPCF::Factory"; -}; - - -}}} //namespace org::bcom::xpcf - -#endif diff --git a/interfaces/private/xpcf/GrpcManager.h b/interfaces/private/xpcf/GrpcManager.h deleted file mode 100644 index 0dc9dad..0000000 --- a/interfaces/private/xpcf/GrpcManager.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef GRPCMANAGER_H -#define GRPCMANAGER_H -#include -#include -#include - -namespace org { namespace bcom { namespace xpcf { - -class GrpcManager: public org::bcom::xpcf::ConfigurableBase, - virtual public IGrpcServerManager -{ -public: - GrpcManager(); - ~GrpcManager() override; - void unloadComponent () override; - - void registerService(grpc::Service * service) override; - void registerService(const std::string & host, grpc::Service * service) override; - void registerService(SRef service) override; - void registerService(const std::string & host, SRef service) override; - - void runServer() override; - - org::bcom::xpcf::XPCFErrorCode onConfigured() override; - -private: - std::string m_serverAddress; - grpc::ServerBuilder m_serverBuilder; -}; - -}}} - -template <> struct org::bcom::xpcf::ComponentTraits -{ - static constexpr const char * UUID = "{cda197f0-db7a-4922-b280-ebf53f4fe790}"; - static constexpr const char * NAME = "GrpcManager"; - static constexpr const char * DESCRIPTION = "GrpcManager implements None interface"; -}; -#endif // GRPCMANAGER_H diff --git a/interfaces/private/xpcf/MethodMetadata.h b/interfaces/private/xpcf/MethodMetadata.h deleted file mode 100644 index ced2078..0000000 --- a/interfaces/private/xpcf/MethodMetadata.h +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-04-28 - */ - -#ifndef ORG_BCOM_XPCF_METHODMETADATA_H -#define ORG_BCOM_XPCF_METHODMETADATA_H - - -#include "xpcf/xpcf_api_define.h" -#include "xpcf/core/uuid.h" -#include "xpcf/core/refs.h" -#include "xpcf/api/InterfaceMetadata.h" -#include "xpcf/collection/IEnumerable.h" - -#include -#include - -namespace org { namespace bcom { namespace xpcf { -/** - * @class MethodMetadata - * @brief Specifies the MethodMetadata class. - * - * This class provides XPCF method metadata informations. - */ -class XPCF_EXPORT_API MethodMetadata : public InterfaceMetadata { -public: - MethodMetadata() = delete; - MethodMetadata(const MethodMetadata & other); - MethodMetadata(MethodMetadata && other); - virtual ~MethodMetadata(); - - - MethodMetadata& operator=(const MethodMetadata & other); - MethodMetadata& operator=(MethodMetadata && other); - bool operator==(const MethodMetadata & other); - -}; - -}}} //namespace org::bcom::xpcf - -#endif diff --git a/interfaces/private/xpcf/ModuleManager.h b/interfaces/private/xpcf/ModuleManager.h deleted file mode 100644 index 22a5ae7..0000000 --- a/interfaces/private/xpcf/ModuleManager.h +++ /dev/null @@ -1,93 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-11-22 - */ - - -#ifndef ORG_BCOM_XPCF_MODULEMANAGER_H -#define ORG_BCOM_XPCF_MODULEMANAGER_H - -#include "xpcf/api/IModuleManager.h" -#include "xpcf/component/ComponentBase.h" -#include "xpcf/api/ComponentMetadata.h" -#include -#include -#include - -#ifdef XPCF_WITH_LOGS -#include -#include -#include -#endif - -#include - -#include -namespace fs = boost::filesystem; - -namespace org { namespace bcom { namespace xpcf { - -class ModuleManager : public ComponentBase, - virtual public IModuleManager { -public: - static ModuleManager* instance(); - bool isXpcfModule(const char* modulePath) override; - bool isXpcfModule(const char* moduleName, const char* moduleFolderPath) override; - bool isXpcfModule(SPtr moduleInfos) override; - const char * getXpcfVersion(const char* moduleName, const char* moduleFolderPath) override; - SPtr introspectModule(const char* moduleFilePath) override; - SPtr introspectModule(const char* moduleName, const char* moduleFolderPath) override; - XPCFErrorCode saveModuleInformations(const char * xmlFilePath, - const SPtr & moduleInfos) override; - SRef createComponent(SPtr moduleInfos, const uuids::uuid& componentUUID) override; - - void unloadComponent () override final; - void releaseModuleRef(const uuids::uuid& moduleUUID); - -private: - ModuleManager(); - ~ModuleManager() override = default; - ModuleManager(const ModuleManager&)= delete; - ModuleManager& operator=(const ModuleManager&)= delete; - void addModuleRef(const uuids::uuid& moduleUUID); - // void releaseModuleRef(const uuids::uuid& moduleUUID); - bool isXpcfModule(fs::path modulePath); - SPtr introspectModule(fs::path modulePath); - std::vector> getComponentInterfaceList(SPtr moduleInfos, - const uuids::uuid& componentUUID); - static std::atomic m_instance; - static std::mutex m_mutex; -#ifdef XPCF_WITH_LOGS - boost::log::sources::severity_logger< boost::log::trivial::severity_level > m_logger; -#endif - - std::map> m_moduleMap; - std::map&)>> m_funcMap; -}; - -template <> struct ComponentTraits -{ - static constexpr const char * UUID = "AF5F7F91-492D-4693-929F-4852C721AC63"; - static constexpr const char * DESCRIPTION = "XPCF::ModuleManager"; -}; - -}}} - -#endif // MODULEMANAGER_H diff --git a/interfaces/private/xpcf/PathBuilder.h b/interfaces/private/xpcf/PathBuilder.h deleted file mode 100644 index db7e0a8..0000000 --- a/interfaces/private/xpcf/PathBuilder.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-11-23 - */ - -#ifndef ORG_BCOM_XPCF_PATHBUILDER_H -#define ORG_BCOM_XPCF_PATHBUILDER_H - -#include -#include - -namespace fs = boost::filesystem; - -namespace org { namespace bcom { namespace xpcf { - -class PathBuilder -{ -public: - PathBuilder(); - fs::path findRegistries(); - static fs::path getUTF8PathObserver(const std::string & sourcePath); - static fs::path getUTF8PathObserver(const char * sourcePath); - static fs::path replaceRootEnvVars(const std::string & sourcePath); - static fs::path buildModuleFilePath(const std::string & moduleName,const std::string & filePath); - static fs::path buildModuleFolderPath(const std::string & filePath); - static fs::path getHomePath(); - static fs::path getXPCFHomePath(); - static fs::path appendModuleDecorations(const fs::path & sl); - static fs::path appendModuleDecorations(const char * sl); - static inline bool is_shared_library(const std::string& s) { - fs::detail::utf8_codecvt_facet utf8; - fs::path libPath(s,utf8); - auto linkStatus = fs::symlink_status(libPath); - if (linkStatus.type() == fs::symlink_file) { - return false; - } - return (s.find(".dll") != std::string::npos || s.find(".so") != std::string::npos || s.find(".dylib") != std::string::npos); - // side effects on path typically toto.app/contents/... - /* && s.find(".lib") == std::string::npos - && s.find(".exp") == std::string::npos - && s.find(".pdb") == std::string::npos - && s.find(".manifest") == std::string::npos - && s.find(".rsp") == std::string::npos - && s.find(".obj") == std::string::npos - && s.find(".a") == std::string::npos;*/ - } - - static inline bool is_shared_library(const char* p) { - return is_shared_library(std::string(p)); - } - - static inline bool is_shared_library(const fs::path& p) { - return is_shared_library(p.string()); - } - -}; - -}}} - -#endif // PATHBUILDER_H diff --git a/interfaces/private/xpcf/Property.h b/interfaces/private/xpcf/Property.h deleted file mode 100644 index 1c09fb1..0000000 --- a/interfaces/private/xpcf/Property.h +++ /dev/null @@ -1,124 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-10-27 - */ - -#ifndef ORG_BCOM_XPCF_PROPERTY_H -#define ORG_BCOM_XPCF_PROPERTY_H - -#include "xpcf/properties/IProperty.h" -#include "xpcf/xpcf_api_define.h" - -#include -#include - -namespace org { namespace bcom { namespace xpcf { -// idea : it is possible to create a matrix structure param with uint cols uint rows Type vector ? -// note : accessors' methods throw std::out_of_range when itemIndex exceeds the underlying container boundary -class XPCF_EXPORT_API Property : public IProperty -{ - -public: - Property (); - - Property (const char* name, uint32_t numberOfItem, IProperty::AccessSpecifier iotype = IProperty_INOUT); - - ~Property () override; - - const char* getName () const override; - - IProperty::PropertyType getType () override; - - uint32_t size () override; - - void setIntegerValue (int32_t val, uint32_t itemIndex = 0) override; - - void setUnsignedIntegerValue (uint32_t val, uint32_t itemIndex = 0) override; - - void setLongValue (int64_t val, uint32_t itemIndex = 0 ) override; - - void setUnsignedLongValue (uint64_t val, uint32_t itemIndex = 0 ) override; - - void setFloatingValue (float val, uint32_t itemIndex = 0 ) override; - - void setDoubleValue (double val, uint32_t itemIndex = 0 ) override; - - void setStringValue (const char * val, uint32_t itemIndex = 0) override; - - void setUnicodeStringValue (const wchar_t * val, uint32_t itemIndex = 0) override; - - void setStructureValue (SRef val, uint32_t itemIndex = 0) override; - - int32_t getIntegerValue (uint32_t itemIndex = 0) const override; - - uint32_t getUnsignedIntegerValue (uint32_t) const override; - - int64_t getLongValue (uint32_t itemIndex = 0) const override; - - uint64_t getUnsignedLongValue (uint32_t) const override; - - const char* getStringValue (uint32_t itemIndex = 0) const override; - - const wchar_t* getUnicodeStringValue (uint32_t itemIndex = 0) const override; - - float getFloatingValue (uint32_t itemIndex = 0) const override; - - double getDoubleValue (uint32_t itemIndex = 0) const override; - - SRef getStructureValue (uint32_t itemIndex = 0) const override; - - XPCFErrorCode setProperties (const char* name, uint32_t numberOfValues = 1L, IProperty::AccessSpecifier iotype = IProperty_INOUT) override; - - XPCFErrorCode copyTo (SRef dest) override; - - void setName (const char *name) override; - - IProperty::AccessSpecifier getAccessSpecifier () const override; - - void setAccessSpecifier (IProperty::AccessSpecifier iotype) override; - - static SRef CreateInstance (); - - static SRef CreateInstance (const char* name, uint32_t numberOfValues = 1L, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT); - - static Property * CreateConcreteInstance (); - - static Property * CreateConcreteInstance (const char* name, uint32_t numberOfValues = 1L, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT); - - -private: - int init (); - void clear (); - void checkType (IProperty::PropertyType newtype); - template void checkType (); - template T getValue(uint32_t, IProperty::PropertyType valueType) const; - template const T * getValue(uint32_t, IProperty::PropertyType valueType) const; - template void setValue(uint32_t, const T * value); - template void setValue(uint32_t, T value); - - std::string m_name; - IProperty::PropertyType m_type; - std::deque m_queue; - IProperty::AccessSpecifier m_attribute; -}; - -}}} - -#endif diff --git a/interfaces/private/xpcf/PropertyManager.h b/interfaces/private/xpcf/PropertyManager.h deleted file mode 100644 index a8a938a..0000000 --- a/interfaces/private/xpcf/PropertyManager.h +++ /dev/null @@ -1,129 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-08-18 - */ - -#ifndef ORG_BCOM_XPCF_PROPERTYMANAGER_H -#define ORG_BCOM_XPCF_PROPERTYMANAGER_H - -//#define BOOST_ALL_DYN_LINK 1 -#include -#include -#include -#include "AliasManager.h" -#include "Registry.h" - -#ifdef XPCF_WITH_LOGS -#include -#include -#include -#endif - -#include -#include -#include - -#include -namespace fs = boost::filesystem; - -namespace org { namespace bcom { namespace xpcf { - -class IPropertyManager : virtual public IComponentIntrospect { - public: - virtual ~IPropertyManager() = default; - virtual void clear() = 0; - virtual XPCFErrorCode configure(const uuids::uuid & componentUUID, SRef componentRef,const char * filepath) = 0; - virtual XPCFErrorCode configure(const char * instanceName, const uuids::uuid & componentUUID, SRef componentRef,const char * filepath) = 0; - virtual XPCFErrorCode serialize(const uuids::uuid & componentUUID, SRef componentRef, const char * filepath, uint32_t mode) = 0; - virtual fs::path getConfigPath(uuids::uuid componentUUID) const = 0; -}; - - -template <> struct InterfaceTraits -{ - static constexpr const char * UUID = "C939A7FB-B0C2-47BA-9458-48F4AB228D92"; - static constexpr const char * NAME = "XPCF::IPropertyManager"; - static constexpr const char * DESCRIPTION = "Configuration and serialization functionality for component properties"; -}; - -struct PropertyContext { - std::map moduleConfigMap; - std::map componentConfigMap; - void clear(); -}; - - -class AbstractPropertyManager : virtual public IPropertyManager { - public: - virtual ~AbstractPropertyManager() override = default; - virtual void declareConfiguration(tinyxml2::XMLElement * xmlElt, const fs::path & configFilePath) = 0; - virtual void declareProperties(tinyxml2::XMLElement * xmlElt, const fs::path & configFilePath) = 0; - virtual SRef getContext() const = 0; - virtual SRef context() = 0; - virtual void setContext(SRef context) = 0; -}; - - -template <> struct InterfaceTraits -{ - static constexpr const char * UUID = "A92925F0-CA11-4A2D-AB84-B1A39511841F"; - static constexpr const char * NAME = "XPCF::AbstractPropertyManager"; - static constexpr const char * DESCRIPTION = "Configuration and serialization functionality for component properties"; -}; - -class XPCF_EXPORT_API PropertyManager : public ComponentBase, - virtual public AbstractPropertyManager { -public: - PropertyManager(); - ~PropertyManager() override = default; - void unloadComponent () final; - void clear() final; - XPCFErrorCode configure(const uuids::uuid & componentUUID, SRef componentRef,const char * filepath) final; - XPCFErrorCode configure(const char * instanceName, const uuids::uuid & componentUUID, SRef componentRef,const char * filepath) final; - XPCFErrorCode serialize(const uuids::uuid & componentUUID, SRef componentRef, const char * filepath, uint32_t mode) final; - void declareConfiguration(tinyxml2::XMLElement * xmlElt, const fs::path & configFilePath) override; - void declareProperties(tinyxml2::XMLElement * xmlElt, const fs::path & configFilePath) override; - fs::path getConfigPath(uuids::uuid componentUUID) const final; - SRef getContext() const final; - SRef context() override { return m_context; } - void setContext(SRef context) final; - -private: - XPCFErrorCode configure(std::function xmlNodePredicate, const uuids::uuid & componentUUID, SRef componentRef,const char * filepath); - void declareComponent(tinyxml2::XMLElement * xmlElt, const fs::path & configFilePath); - void declareConfigure(tinyxml2::XMLElement * xmlElt, const fs::path & configFilePath); -#ifdef XPCF_WITH_LOGS - boost::log::sources::severity_logger< boost::log::trivial::severity_level > m_logger; -#endif - SRef m_aliasManager; - SRef m_registry; - SRef m_context; -}; - -template <> struct ComponentTraits -{ - static constexpr const char * UUID = "FF18E038-8D17-41FF-AFEB-5927DF713DD2"; - static constexpr const char * NAME = "XPCF::PropertyManager"; - static constexpr const char * DESCRIPTION = "Property manager component"; -}; - -}}} //namespace org::bcom::xpcf - -#endif diff --git a/interfaces/private/xpcf/PropertyMap.h b/interfaces/private/xpcf/PropertyMap.h deleted file mode 100644 index a0c6c7b..0000000 --- a/interfaces/private/xpcf/PropertyMap.h +++ /dev/null @@ -1,112 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-10-27 - */ - -#ifndef ORG_BCOM_XPCF_PROPERTYMAP_H -#define ORG_BCOM_XPCF_PROPERTYMAP_H - - -#include -#include "xpcf/properties/IPropertyMap.h" -#include "PropertyWrapper.h" -#include "PropertySequenceWrapper.h" -#include - -namespace org { namespace bcom { namespace xpcf { - -class XPCF_EXPORT_API PropertyMap : public IPropertyMap { - - public: - - PropertyMap (); - - ~PropertyMap () override; - - // IPropertyMap - XPCFErrorCode addProperty (SRef p) override; - - XPCFErrorCode setProperty (const SRef p) override; - - IEnumerable> & getProperties() override; - - const SRef at (const char *name) override; - - XPCFErrorCode wrapInteger(const char * name, int32_t & wrappedValue, IProperty::AccessSpecifier iotype) override; - XPCFErrorCode wrapUnsignedInteger(const char * name, uint32_t & wrappedValue, IProperty::AccessSpecifier iotype) override; - XPCFErrorCode wrapLong(const char * name, int64_t & wrappedValue, IProperty::AccessSpecifier iotype) override; - XPCFErrorCode wrapUnsignedLong(const char * name, uint64_t & wrappedValue, IProperty::AccessSpecifier iotype) override; - XPCFErrorCode wrapFloat(const char * name, float & wrappedValue, IProperty::AccessSpecifier iotype) override; - XPCFErrorCode wrapDouble(const char * name, double & wrappedValue, IProperty::AccessSpecifier iotype) override; - XPCFErrorCode wrapString(const char * name, std::string & wrappedValue, IProperty::AccessSpecifier iotype) override; - XPCFErrorCode wrapUnicodeString(const char * name, std::wstring & wrappedValue, IProperty::AccessSpecifier iotype) override; - XPCFErrorCode wrapStructure(const char * name, SRef & wrappedValue, IProperty::AccessSpecifier iotype) override; - - XPCFErrorCode wrapIntegerVector(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype) override; - XPCFErrorCode wrapUnsignedIntegerVector(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype) override; - XPCFErrorCode wrapLongVector(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype) override; - XPCFErrorCode wrapUnsignedLongVector(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype) override; - XPCFErrorCode wrapFloatVector(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype) override; - XPCFErrorCode wrapDoubleVector(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype) override; - XPCFErrorCode wrapStringVector(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype) override; - XPCFErrorCode wrapUnicodeStringVector(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype) override; - XPCFErrorCode wrapStructureVector(const char * name, std::vector> & wrappedValue, IProperty::AccessSpecifier iotype) override; - - static SRef CreateInstance (); - - static PropertyMap * CreateConcreteInstance (); - - - private: - template - inline XPCFErrorCode wrap(const char * name, HoldingType & wrappedValue, IProperty::AccessSpecifier iotype); - - template class Sequence, class ExternType, class HoldingType> - inline XPCFErrorCode wrap(const char * name, Sequence> & wrappedValue, IProperty::AccessSpecifier iotype); - - std::map> m_propertyMap; - Collection,std::vector> m_collectionPropertyMap; -}; - -template< class ExternType, class HoldingType > -XPCFErrorCode PropertyMap::wrap(const char * name, HoldingType & wrappedValue, IProperty::AccessSpecifier iotype) -{ - if (name == nullptr) { - return XPCFErrorCode::_ERROR_INVALID_ARGUMENT; - } - - SRef wrappedRef = utils::make_shared>(name, wrappedValue, iotype); - return addProperty(wrappedRef); -} - -template class Sequence, class ExternType, class HoldingType > -XPCFErrorCode PropertyMap::wrap(const char * name, Sequence> & wrappedValue, IProperty::AccessSpecifier iotype) -{ - if (name == nullptr) { - return XPCFErrorCode::_ERROR_INVALID_ARGUMENT; - } - - SRef wrappedRef = utils::make_shared >(name, wrappedValue, iotype); - return addProperty(wrappedRef); -} - -}}} - -#endif diff --git a/interfaces/private/xpcf/PropertySequenceWrapper.h b/interfaces/private/xpcf/PropertySequenceWrapper.h deleted file mode 100644 index 921c87b..0000000 --- a/interfaces/private/xpcf/PropertySequenceWrapper.h +++ /dev/null @@ -1,621 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-10-27 - */ - -#ifndef ORG_BCOM_XPCF_PROPERTYSEQUENCEWRAPPER_H -#define ORG_BCOM_XPCF_PROPERTYSEQUENCEWRAPPER_H - - -#include "xpcf/properties/IProperty.h" -#include "PropertyWrapper.h" -#include -#include - -namespace org { namespace bcom { namespace xpcf { -// TODO : implement nocopy accessors for PropertyMap or a propertymapwrapper - -template class Sequence, class ExternType, class HoldingType = typename deduce_from::InnerType> -class PropertySequenceWrapper : public IProperty {// T in uint64_t double int64_t char* wchar* -public: - static_assert(std::is_same::value || std::is_same::value || std::is_same::value - || std::is_same::value || std::is_same::value || std::is_same::value - || std::is_same::value || std::is_same::value || std::is_same>::value, - "type not allowed for PropertySequenceWrapper"); - static_assert(std::is_same>, std::vector>>::value || - std::is_same>, std::deque>>::value, - "Sequence type not allowed for PropertySequenceWrapper"); - PropertySequenceWrapper(const char* name, Sequence> & paramWrapped, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT); // single value wrapper - ~PropertySequenceWrapper () override; - - const char* getName () const override; - - IProperty::PropertyType getType () override; - - uint32_t size () override; - - void setIntegerValue (int32_t val, uint32_t itemIndex = 0) override; - - void setUnsignedIntegerValue (uint32_t val, uint32_t itemIndex = 0) override; - - void setLongValue (int64_t val, uint32_t itemIndex = 0 ) override; - - void setUnsignedLongValue (uint64_t val, uint32_t itemIndex = 0 ) override; - - void setFloatingValue (float val, uint32_t itemIndex = 0 ) override; - - void setDoubleValue (double val, uint32_t itemIndex = 0 ) override; - - void setStringValue (const char * val, uint32_t itemIndex) override; - - void setUnicodeStringValue (const wchar_t * val, uint32_t itemIndex) override; - - void setStructureValue (SRef val, uint32_t itemIndex) override; - - int32_t getIntegerValue (uint32_t itemIndex = 0) const override; - - uint32_t getUnsignedIntegerValue (uint32_t) const override; - - int64_t getLongValue (uint32_t itemIndex = 0) const override; - - uint64_t getUnsignedLongValue (uint32_t) const override; - - const char* getStringValue (uint32_t itemIndex) const override; - - const wchar_t* getUnicodeStringValue (uint32_t itemIndex) const override; - - float getFloatingValue (uint32_t itemIndex = 0) const override; - - double getDoubleValue (uint32_t itemIndex = 0) const override; - - SRef getStructureValue (uint32_t itemIndex) const override; - - XPCFErrorCode setProperties (const char* name, uint32_t numberOfValues = 1L, IProperty::AccessSpecifier iotype = IProperty::IProperty_INOUT) override; - - XPCFErrorCode copyTo (SRef dest) override; - - void setName (const char *name) override; - - // SRef clone () override; - - IProperty::AccessSpecifier getAccessSpecifier () const override; - - void setAccessSpecifier (IProperty::AccessSpecifier iotype) override; - - // void unloadComponent () override final; - -private: - static constexpr IProperty::PropertyType m_type = inferPropertyType(); - - Sequence> & m_wrappedValue; - std::string m_name; - - IProperty::AccessSpecifier m_accessSpecifier; - - ExternType getValue(uint32_t itemIndex) const; - void setValue(uint32_t itemIndex, ExternType value); - -}; - -// TODO : add method to check accessspecifier upon setter/getters - -template class Sequence, class ExternType, class HoldingType> -PropertySequenceWrapper::PropertySequenceWrapper(const char* name, Sequence> & paramWrapped, IProperty::AccessSpecifier iotype):m_wrappedValue(paramWrapped), m_name(name), m_accessSpecifier(iotype) -{ -} - -template class Sequence, class ExternType, class HoldingType> -PropertySequenceWrapper::~PropertySequenceWrapper () -{ -} - -template class Sequence, class ExternType, class HoldingType> -const char* PropertySequenceWrapper::getName () const -{ - return m_name.c_str(); -} - -template class Sequence, class ExternType, class HoldingType> -IProperty::PropertyType PropertySequenceWrapper::getType () -{ - return m_type; -} - -template class Sequence, class ExternType, class HoldingType> -uint32_t PropertySequenceWrapper::size () -{ - return m_wrappedValue.size(); -} - - -template class Sequence, class ExternType, class HoldingType> -void PropertySequenceWrapper::setValue(uint32_t itemIndex, ExternType value) -{ - m_wrappedValue.at(itemIndex) = value; -} - -template class Sequence, class ExternType, class HoldingType> -ExternType PropertySequenceWrapper::getValue(uint32_t itemIndex) const -{ - return m_wrappedValue.at(itemIndex); -} - -template<> -inline const char * PropertySequenceWrapper::getValue(uint32_t itemIndex) const -{ - return m_wrappedValue.at(itemIndex).c_str(); -} - -template<> -inline const char * PropertySequenceWrapper::getValue(uint32_t itemIndex) const -{ - return m_wrappedValue.at(itemIndex).c_str(); -} - -template<> -inline const wchar_t * PropertySequenceWrapper::getValue(uint32_t itemIndex) const -{ - return m_wrappedValue.at(itemIndex).c_str(); -} - -template<> -inline const wchar_t * PropertySequenceWrapper::getValue(uint32_t itemIndex) const -{ - return m_wrappedValue.at(itemIndex).c_str(); -} - -template class Sequence, class ExternType, class HoldingType> -void PropertySequenceWrapper::setIntegerValue (int32_t , uint32_t ) -{ -} - -template<> -inline void PropertySequenceWrapper::setIntegerValue (int32_t value, uint32_t itemIndex) -{ - setValue(itemIndex, value); -} - -template<> -inline void PropertySequenceWrapper::setIntegerValue (int32_t value, uint32_t itemIndex) -{ - setValue(itemIndex, value); -} - -template class Sequence, class ExternType, class HoldingType> -void PropertySequenceWrapper::setUnsignedIntegerValue (uint32_t , uint32_t ) -{ -} - -template<> -inline void PropertySequenceWrapper::setUnsignedIntegerValue (uint32_t value, uint32_t itemIndex) -{ - setValue(itemIndex, value); -} - -template<> -inline void PropertySequenceWrapper::setUnsignedIntegerValue (uint32_t value, uint32_t itemIndex) -{ - setValue(itemIndex, value); -} - -template class Sequence, class ExternType, class HoldingType> -void PropertySequenceWrapper::setLongValue (int64_t , uint32_t ) -{ -} - -template<> -inline void PropertySequenceWrapper::setLongValue (int64_t value, uint32_t itemIndex) -{ - setValue(itemIndex, value); -} - -template<> -inline void PropertySequenceWrapper::setLongValue (int64_t value, uint32_t itemIndex) -{ - setValue(itemIndex, value); -} - -template class Sequence, class ExternType, class HoldingType> -void PropertySequenceWrapper::setUnsignedLongValue (uint64_t , uint32_t ) -{ -} - -template<> -inline void PropertySequenceWrapper::setUnsignedLongValue (uint64_t value, uint32_t itemIndex) -{ - setValue(itemIndex, value); -} - -template<> -inline void PropertySequenceWrapper::setUnsignedLongValue (uint64_t value, uint32_t itemIndex) -{ - setValue(itemIndex, value); -} - -template class Sequence, class ExternType, class HoldingType> -void PropertySequenceWrapper::setFloatingValue (float , uint32_t ) -{ -} - -template<> -inline void PropertySequenceWrapper::setFloatingValue (float value, uint32_t itemIndex) -{ - setValue(itemIndex, value); -} - -template<> -inline void PropertySequenceWrapper::setFloatingValue (float value, uint32_t itemIndex) -{ - setValue(itemIndex, value); -} - -template class Sequence, class ExternType, class HoldingType> -void PropertySequenceWrapper::setDoubleValue (double , uint32_t ) -{ -} - -template<> -inline void PropertySequenceWrapper::setDoubleValue (double value, uint32_t itemIndex) -{ - setValue(itemIndex, value); -} - -template<> -inline void PropertySequenceWrapper::setDoubleValue (double value, uint32_t itemIndex) -{ - setValue(itemIndex, value); -} - -template < template class Sequence, class ExternType, class HoldingType> -void PropertySequenceWrapper::setStringValue (const char* , uint32_t ) -{ -} - -template<> -inline void PropertySequenceWrapper::setStringValue (const char* value, uint32_t itemIndex) -{ - m_wrappedValue.at(itemIndex) = value; -} - -template<> -inline void PropertySequenceWrapper::setStringValue (const char* value, uint32_t itemIndex) -{ - m_wrappedValue.at(itemIndex) = value; -} - - -template class Sequence, class ExternType, class HoldingType> -void PropertySequenceWrapper::setUnicodeStringValue (const wchar_t* , uint32_t ) -{ -} - -template<> -inline void PropertySequenceWrapper::setUnicodeStringValue (const wchar_t* value, uint32_t itemIndex) -{ - m_wrappedValue.at(itemIndex) = value; -} - -template<> -inline void PropertySequenceWrapper::setUnicodeStringValue (const wchar_t* value, uint32_t itemIndex) -{ - m_wrappedValue.at(itemIndex) = value; -} - -template class Sequence, class ExternType, class HoldingType> -void PropertySequenceWrapper::setStructureValue (SRef , uint32_t ) -{ -} - -template<> -inline void PropertySequenceWrapper>::setStructureValue (SRef value, uint32_t itemIndex) -{ - setValue(itemIndex, value); -} - -template<> -inline void PropertySequenceWrapper>::setStructureValue (SRef value, uint32_t itemIndex) -{ - setValue(itemIndex, value); -} - -template class Sequence, class ExternType, class HoldingType> -int32_t PropertySequenceWrapper::getIntegerValue (uint32_t ) const -{ - return 0; -} - -template<> -inline int32_t PropertySequenceWrapper::getIntegerValue (uint32_t itemIndex) const -{ - return getValue(itemIndex); -} - -template<> -inline int32_t PropertySequenceWrapper::getIntegerValue (uint32_t itemIndex) const -{ - return getValue(itemIndex); -} - - -template class Sequence, class ExternType, class HoldingType> -uint32_t PropertySequenceWrapper::getUnsignedIntegerValue (uint32_t ) const -{ - return 0; -} - -template<> -inline uint32_t PropertySequenceWrapper::getUnsignedIntegerValue (uint32_t itemIndex) const -{ - return getValue(itemIndex); -} - -template<> -inline uint32_t PropertySequenceWrapper::getUnsignedIntegerValue (uint32_t itemIndex) const -{ - return getValue(itemIndex); -} - -template class Sequence, class ExternType, class HoldingType> -int64_t PropertySequenceWrapper::getLongValue (uint32_t ) const -{ - return 0; -} - -template<> -inline int64_t PropertySequenceWrapper::getLongValue (uint32_t itemIndex) const -{ - return getValue(itemIndex); -} - -template<> -inline int64_t PropertySequenceWrapper::getLongValue (uint32_t itemIndex) const -{ - return getValue(itemIndex); -} - - -template class Sequence, class ExternType, class HoldingType> -uint64_t PropertySequenceWrapper::getUnsignedLongValue (uint32_t ) const -{ - return 0; -} - -template<> -inline uint64_t PropertySequenceWrapper::getUnsignedLongValue (uint32_t itemIndex) const -{ - return getValue(itemIndex); -} - -template<> -inline uint64_t PropertySequenceWrapper::getUnsignedLongValue (uint32_t itemIndex) const -{ - return getValue(itemIndex); -} - -template class Sequence, class ExternType, class HoldingType> -const char* PropertySequenceWrapper::getStringValue (uint32_t ) const -{ - return nullptr; -} - -template<> -inline const char* PropertySequenceWrapper::getStringValue (uint32_t itemIndex) const -{ - return getValue(itemIndex); -} - -template<> -inline const char* PropertySequenceWrapper::getStringValue (uint32_t itemIndex) const -{ - return getValue(itemIndex); -} - - -template class Sequence, class ExternType, class HoldingType> -const wchar_t* PropertySequenceWrapper::getUnicodeStringValue (uint32_t ) const -{ - return nullptr; -} - -template<> -inline const wchar_t* PropertySequenceWrapper::getUnicodeStringValue (uint32_t itemIndex) const -{ - return getValue(itemIndex); -} - -template<> -inline const wchar_t* PropertySequenceWrapper::getUnicodeStringValue (uint32_t itemIndex) const -{ - return getValue(itemIndex); -} - -template class Sequence, class ExternType, class HoldingType> -float PropertySequenceWrapper::getFloatingValue (uint32_t ) const -{ - return 0; -} - -template<> -inline float PropertySequenceWrapper::getFloatingValue (uint32_t itemIndex) const -{ - return getValue(itemIndex); -} - -template<> -inline float PropertySequenceWrapper::getFloatingValue (uint32_t itemIndex) const -{ - return getValue(itemIndex); -} - -template class Sequence, class ExternType, class HoldingType> -double PropertySequenceWrapper::getDoubleValue (uint32_t ) const -{ - return 0; -} - -template<> -inline double PropertySequenceWrapper::getDoubleValue (uint32_t itemIndex) const -{ - return getValue(itemIndex); -} - -template<> -inline double PropertySequenceWrapper::getDoubleValue (uint32_t itemIndex) const -{ - return getValue(itemIndex); -} - -template class Sequence, class ExternType, class HoldingType> -SRef PropertySequenceWrapper::getStructureValue (uint32_t ) const -{ - return nullptr; -} - -template<> -inline SRef PropertySequenceWrapper>::getStructureValue (uint32_t itemIndex) const -{ - return m_wrappedValue.at(itemIndex); -} - -template<> -inline SRef PropertySequenceWrapper>::getStructureValue (uint32_t itemIndex) const -{ - return m_wrappedValue.at(itemIndex); -} - - -template class Sequence, class ExternType, class HoldingType> -XPCFErrorCode PropertySequenceWrapper::setProperties (const char* name, uint32_t numberOfValues, IProperty::AccessSpecifier iotype) -{ - if (name==nullptr) { - return XPCFErrorCode::_FAIL; - } - - if (strlen(name) == 0) { - return XPCFErrorCode::_FAIL; - } - m_wrappedValue.resize(numberOfValues); - m_name = name; - m_accessSpecifier = iotype; - return XPCFErrorCode::_SUCCESS; -} - -template class Sequence, class ExternType, class HoldingType> -XPCFErrorCode PropertySequenceWrapper::copyTo (SRef dest) -{ - if (dest==nullptr) - { - throw std::invalid_argument("Argument is a null pointer"); - } - - XPCFErrorCode res=XPCFErrorCode::_FAIL; - dest->setProperties (m_name.c_str(), m_wrappedValue.size(), m_accessSpecifier); - switch(m_type) - { - case IProperty_INTEGER: - { - uint32_t i = 0; - for (i=0; isetIntegerValue(getIntegerValue(i), i); - } - }break; - case IProperty_UINTEGER: - { - uint32_t i = 0; - for (i=0; isetUnsignedIntegerValue(getUnsignedIntegerValue(i), i); - } - }break; - case IProperty_FLOAT: - { - uint32_t i = 0; - for (i=0; isetFloatingValue(getFloatingValue(i), i); - } - - }break; - case IProperty_CHARSTR: - { - uint32_t i = 0; - for (i=0; isetStringValue(getStringValue(i), i); - } - - }break; - case IProperty_UNICODESTR: - { - uint32_t i = 0; - for (i=0; isetUnicodeStringValue(getUnicodeStringValue(i), i); - } - - }break; - case IProperty_STRUCTURE: - { - uint32_t i = 0; - for (i=0; isetStructureValue(getStructureValue(i), i); - } - }break; - default:{return res;}break; - } - - - return XPCFErrorCode::_SUCCESS; -} - -template class Sequence, class ExternType, class HoldingType> -void PropertySequenceWrapper::setName (const char *name) -{ - if (name==nullptr) - { - throw std::invalid_argument("Argument is a null pointer"); - } - // TODO : check non empty name is set !! - m_name = name; -} - -template class Sequence, class ExternType, class HoldingType> -IProperty::AccessSpecifier PropertySequenceWrapper::getAccessSpecifier () const -{ - return m_accessSpecifier; -} - -template class Sequence, class ExternType, class HoldingType> -void PropertySequenceWrapper::setAccessSpecifier (IProperty::AccessSpecifier iotype) -{ - m_accessSpecifier = iotype; -} - -}}} - -#endif diff --git a/interfaces/private/xpcf/PropertyWrapper.h b/interfaces/private/xpcf/PropertyWrapper.h deleted file mode 100644 index cf742fd..0000000 --- a/interfaces/private/xpcf/PropertyWrapper.h +++ /dev/null @@ -1,638 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-10-27 - */ - -#ifndef ORG_BCOM_XPCF_PROPERTYWRAPPER_H -#define ORG_BCOM_XPCF_PROPERTYWRAPPER_H - - -#include "xpcf/properties/IProperty.h" -// NOTE : use template specialization - -namespace org { namespace bcom { namespace xpcf { - -// TODO : implement nocopy accessors for PropertyMap or a propertymapwrapper -template inline static constexpr IProperty::PropertyType inferPropertyType(); - -template <> inline constexpr IProperty::PropertyType inferPropertyType() -{ - return IProperty::IProperty_FLOAT; -} - -template <> inline constexpr IProperty::PropertyType inferPropertyType() -{ - return IProperty::IProperty_DOUBLE; -} - -template <> inline constexpr IProperty::PropertyType inferPropertyType() -{ - return IProperty::IProperty_INTEGER; -} - -template <> inline constexpr IProperty::PropertyType inferPropertyType() -{ - return IProperty::IProperty_UINTEGER; -} - -template <> inline constexpr IProperty::PropertyType inferPropertyType() -{ - return IProperty::IProperty_LONG; -} - -template <> inline constexpr IProperty::PropertyType inferPropertyType() -{ - return IProperty::IProperty_ULONG; -} - -template <> inline constexpr IProperty::PropertyType inferPropertyType() -{ - return IProperty::IProperty_UNICODESTR; -} - -template <> inline constexpr IProperty::PropertyType inferPropertyType() -{ - return IProperty::IProperty_CHARSTR; -} - -template <> inline constexpr IProperty::PropertyType inferPropertyType>() -{ - return IProperty::IProperty_STRUCTURE; -} - -// Primary template -template -struct deduce_from -{ -}; - -// Specialization for double: U -> double -template<> -struct deduce_from -{ - typedef double InnerType; -}; - -template<> -struct deduce_from -{ - typedef float InnerType; -}; - -template<> -struct deduce_from -{ - typedef int32_t InnerType; -}; - -template<> -struct deduce_from -{ - typedef uint32_t InnerType; -}; - -template<> -struct deduce_from -{ - typedef int64_t InnerType; -}; - -template<> -struct deduce_from -{ - typedef uint64_t InnerType; -}; - -template<> -struct deduce_from> -{ - typedef SRef InnerType; -}; - -template<> -struct deduce_from -{ - typedef std::string InnerType; -}; - -template<> -struct deduce_from -{ - typedef std::wstring InnerType; -}; - - -template ::InnerType > -class PropertyWrapper : public IProperty {// T in uint64_t double int64_t char* wchar* -public: - static_assert(std::is_same::value || std::is_same::value || std::is_same::value - || std::is_same::value || std::is_same::value || std::is_same::value - || std::is_same::value || std::is_same::value || std::is_same>::value, - "type not allowed for PropertyWrapper"); - PropertyWrapper(const char* name, HoldingType & paramWrapped, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT); // single value wrapper - ~PropertyWrapper () override; - - const char* getName () const override; - - IProperty::PropertyType getType () override; - - uint32_t size () override; - - void setIntegerValue (int32_t val, uint32_t itemIndex = 0) override; - - void setUnsignedIntegerValue (uint32_t val, uint32_t itemIndex = 0) override; - - void setLongValue (int64_t val, uint32_t itemIndex = 0 ) override; - - void setUnsignedLongValue (uint64_t val, uint32_t itemIndex = 0 ) override; - - void setFloatingValue (float val, uint32_t itemIndex = 0 ) override; - - void setDoubleValue (double val, uint32_t itemIndex = 0 ) override; - - void setStringValue (const char * val, uint32_t itemIndex = 0) override; - - void setUnicodeStringValue (const wchar_t * val, uint32_t itemIndex = 0) override; - - void setStructureValue (SRef val, uint32_t itemIndex = 0) override; - - int32_t getIntegerValue (uint32_t itemIndex = 0) const override; - - uint32_t getUnsignedIntegerValue (uint32_t) const override; - - int64_t getLongValue (uint32_t itemIndex = 0) const override; - - uint64_t getUnsignedLongValue (uint32_t) const override; - - const char* getStringValue (uint32_t itemIndex = 0) const override; - - const wchar_t* getUnicodeStringValue (uint32_t itemIndex = 0) const override; - - float getFloatingValue (uint32_t itemIndex = 0) const override; - - double getDoubleValue (uint32_t itemIndex = 0) const override; - - SRef getStructureValue (uint32_t itemIndex = 0) const override; - - XPCFErrorCode setProperties (const char* name, uint32_t numberOfValues = 1L, IProperty::AccessSpecifier iotype = IProperty::IProperty_INOUT) override; - - XPCFErrorCode copyTo (SRef dest) override; - - void setName (const char *name) override; - - //SRef clone () ;//override; - - IProperty::AccessSpecifier getAccessSpecifier () const override; - - void setAccessSpecifier (IProperty::AccessSpecifier iotype) override; - - //void unloadComponent () override final; - -private: - static constexpr IProperty::PropertyType m_type = inferPropertyType(); - - HoldingType & m_wrappedValue; - std::string m_name; - - IProperty::AccessSpecifier m_accessSpecifier; - const uint32_t m_size = 1; - - ExternType getValue(uint32_t itemIndex) const; - void setValue(uint32_t itemIndex, ExternType value); - -}; - -// TODO : add method to check accessspecifier upon setter/getters - -template -PropertyWrapper::PropertyWrapper(const char* name, HoldingType & paramWrapped, - IProperty::AccessSpecifier iotype):m_wrappedValue(paramWrapped), m_name(name),m_accessSpecifier(iotype) -{ -} - -template -PropertyWrapper::~PropertyWrapper () -{ -} - -template -inline const char* PropertyWrapper::getName () const -{ - return m_name.c_str(); -} - -template -IProperty::PropertyType PropertyWrapper::getType () -{ - return m_type; -} - -template -inline uint32_t PropertyWrapper::size () -{ - return m_size; -} - - -template -void PropertyWrapper::setValue(uint32_t itemIndex, ExternType value) -{ - if (itemIndex >= m_size) { - throw std::out_of_range("itemIndex is greater than container size"); - } - m_wrappedValue = value; -} - -template -ExternType PropertyWrapper::getValue(uint32_t itemIndex) const -{ - if (itemIndex >= m_size) - { - throw std::out_of_range("itemIndex is greater than container size"); - } - return m_wrappedValue; -} - -template<> -inline const char * PropertyWrapper::getValue(uint32_t itemIndex) const -{ - if (itemIndex >= m_size) - { - throw std::out_of_range("itemIndex is greater than container size"); - } - return m_wrappedValue.c_str(); -} - -template<> -inline const wchar_t * PropertyWrapper::getValue(uint32_t itemIndex) const -{ - if (itemIndex >= m_size) - { - throw std::out_of_range("itemIndex is greater than container size"); - } - return m_wrappedValue.c_str(); -} - - -template -void PropertyWrapper::setIntegerValue (int32_t , uint32_t ) -{ - -} - -template<> -inline void PropertyWrapper::setIntegerValue (int32_t value, uint32_t itemIndex) -{ - setValue(itemIndex, value); -} - - -template -void PropertyWrapper::setUnsignedIntegerValue (uint32_t , uint32_t ) -{ - -} - -template<> -inline void PropertyWrapper::setUnsignedIntegerValue (uint32_t value, uint32_t itemIndex) -{ - setValue(itemIndex, value); -} - -template -void PropertyWrapper::setLongValue (int64_t , uint32_t ) -{ - -} - -template<> -inline void PropertyWrapper::setLongValue (int64_t value, uint32_t itemIndex) -{ - setValue(itemIndex, value); -} - -template -void PropertyWrapper::setUnsignedLongValue (uint64_t , uint32_t ) -{ - -} - -template<> -inline void PropertyWrapper::setUnsignedLongValue (uint64_t value, uint32_t itemIndex) -{ - setValue(itemIndex, value); -} - -template -void PropertyWrapper::setFloatingValue (float , uint32_t ) -{ - -} - -template<> -inline void PropertyWrapper::setFloatingValue (float value, uint32_t itemIndex) -{ - setValue(itemIndex, value); -} - -template -void PropertyWrapper::setDoubleValue (double , uint32_t ) -{ - -} - -template<> -inline void PropertyWrapper::setDoubleValue (double value, uint32_t itemIndex) -{ - setValue(itemIndex, value); -} - - -template < class ExternType, class HoldingType> -void PropertyWrapper::setStringValue (const char* , uint32_t ) -{ - -} - -template<> -inline void PropertyWrapper::setStringValue (const char* value, uint32_t ) -{ - m_wrappedValue = value; -} - - -template -void PropertyWrapper::setUnicodeStringValue (const wchar_t* , uint32_t ) -{ - -} - -template<> -inline void PropertyWrapper::setUnicodeStringValue (const wchar_t* value, uint32_t ) -{ - m_wrappedValue = value; -} - - - -template -void PropertyWrapper::setStructureValue (SRef , uint32_t ) -{ - -} - -template<> -inline void PropertyWrapper>::setStructureValue (SRef value, uint32_t itemIndex) -{ - setValue(itemIndex, value); -} - - -template -int32_t PropertyWrapper::getIntegerValue (uint32_t ) const -{ - return 0; -} - -template<> -inline int32_t PropertyWrapper::getIntegerValue (uint32_t itemIndex) const -{ - return getValue(itemIndex); -} - - -template -uint32_t PropertyWrapper::getUnsignedIntegerValue (uint32_t ) const -{ - return 0; -} - -template<> -inline uint32_t PropertyWrapper::getUnsignedIntegerValue (uint32_t itemIndex) const -{ - return getValue(itemIndex); -} - -template -int64_t PropertyWrapper::getLongValue (uint32_t ) const -{ - return 0; -} - -template<> -inline int64_t PropertyWrapper::getLongValue (uint32_t itemIndex) const -{ - return getValue(itemIndex); -} - - -template -uint64_t PropertyWrapper::getUnsignedLongValue (uint32_t ) const -{ - return 0; -} - -template<> -inline uint64_t PropertyWrapper::getUnsignedLongValue (uint32_t itemIndex) const -{ - return getValue(itemIndex); -} - -template -const char* PropertyWrapper::getStringValue (uint32_t ) const -{ - return nullptr; -} - -template<> -inline const char* PropertyWrapper::getStringValue (uint32_t itemIndex) const -{ - return getValue(itemIndex); -} - - -template -const wchar_t* PropertyWrapper::getUnicodeStringValue (uint32_t ) const -{ - return nullptr; -} - -template<> -inline const wchar_t* PropertyWrapper::getUnicodeStringValue (uint32_t itemIndex) const -{ - return getValue(itemIndex); -} - -template -float PropertyWrapper::getFloatingValue (uint32_t ) const -{ - return 0; -} - -template<> -inline float PropertyWrapper::getFloatingValue (uint32_t itemIndex) const -{ - return getValue(itemIndex); -} - -template -double PropertyWrapper::getDoubleValue (uint32_t ) const -{ - return 0; -} - -template<> -inline double PropertyWrapper::getDoubleValue (uint32_t itemIndex) const -{ - return getValue(itemIndex); -} - -template -SRef PropertyWrapper::getStructureValue (uint32_t ) const -{ - return nullptr; -} - -template<> -inline SRef PropertyWrapper>::getStructureValue (uint32_t ) const -{ - return m_wrappedValue; -} - -template -XPCFErrorCode PropertyWrapper::setProperties (const char* name, uint32_t numberOfValues, IProperty::AccessSpecifier iotype) -{ - if (name==nullptr) { - return XPCFErrorCode::_FAIL; - } - - if (strlen(name) == 0) { - return XPCFErrorCode::_FAIL; - } - if (numberOfValues > m_size) { - return XPCFErrorCode::_FAIL; - } - m_name = name; - m_accessSpecifier = iotype; - return XPCFErrorCode::_SUCCESS; -} - -template -XPCFErrorCode PropertyWrapper::copyTo (SRef dest) -{ - if (dest==nullptr) - { - throw std::invalid_argument("Argument is a null pointer"); - } - - XPCFErrorCode res=XPCFErrorCode::_FAIL; - dest->setProperties (m_name.c_str(), m_size, m_accessSpecifier); - switch (m_type) - { - case IProperty_INTEGER: - { - uint32_t i = 0; - for (i=0; isetIntegerValue(getIntegerValue(i), i); - } - }break; - case IProperty_UINTEGER: - { - uint32_t i = 0; - for (i=0; isetUnsignedIntegerValue(getUnsignedIntegerValue(i), i); - } - }break; - case IProperty_FLOAT: - { - uint32_t i = 0; - for (i=0; isetFloatingValue(getFloatingValue(i), i); - } - - }break; - case IProperty_CHARSTR: - { - uint32_t i = 0; - for (i=0; isetStringValue(getStringValue(i), i); - } - - }break; - case IProperty_UNICODESTR: - { - uint32_t i = 0; - for (i=0; isetUnicodeStringValue(getUnicodeStringValue(i), i); - } - - }break; - case IProperty_STRUCTURE: - { - uint32_t i = 0; - for (i=0; isetStructureValue(getStructureValue(i), i); - } - }break; - default:{return res;}break; - } - - - return XPCFErrorCode::_SUCCESS; -} - -template -void PropertyWrapper::setName (const char *name) -{ - if (name==nullptr) - { - throw std::invalid_argument("Argument is a null pointer"); - } - // TODO : check non empty name is set !! - m_name = name; -} - -template -IProperty::AccessSpecifier PropertyWrapper::getAccessSpecifier () const -{ - return m_accessSpecifier; -} - -template -void PropertyWrapper::setAccessSpecifier (IProperty::AccessSpecifier iotype) -{ - m_accessSpecifier = iotype; -} - -}}} - -#endif diff --git a/interfaces/private/xpcf/Registry.h b/interfaces/private/xpcf/Registry.h deleted file mode 100644 index 71850e5..0000000 --- a/interfaces/private/xpcf/Registry.h +++ /dev/null @@ -1,138 +0,0 @@ -/** - * @copyright Copyright (c) 2019 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2019-06-05 - */ - -#ifndef ORG_BCOM_XPCF_REGISTRY_H -#define ORG_BCOM_XPCF_REGISTRY_H - -//#define BOOST_ALL_DYN_LINK 1 - -#include -#include "tinyxmlhelper.h" -#include -#include -#include "AliasManager.h" - -#ifdef XPCF_WITH_LOGS -#include -#include -#include -#endif - -#include - -#include -#include -#include -#include - -namespace fs = boost::filesystem; - -namespace org { namespace bcom { namespace xpcf { - -struct RegistryContext { - Collection,std::vector> modulesVector; - Collection,std::vector> interfacesVector; - std::map componentModuleUUIDMap; - std::map> interfacesMap; - std::map> modulesMap; - void clear(); -}; - -class AbstractRegistry : virtual public IRegistryManager { -public: - ~AbstractRegistry() override = default; - virtual void clear() = 0; - virtual void setBinder(const std::function & bindFunc) = 0; - virtual void declareModule(tinyxml2::XMLElement * xmlModuleElt) = 0; - virtual void declareModuleMetadata(SPtr moduleInfos) = 0; - virtual void enableAutoAlias(bool enabled) = 0; - virtual SRef getContext() const = 0; - virtual SRef context() = 0; - virtual void setContext(SRef context) = 0; -}; - -template <> struct InterfaceTraits -{ - static constexpr const char * UUID = "5FF5FABF-14A6-44A2-9E2A-2D124369FBBF"; - static constexpr const char * NAME = "XPCF::AbstractRegistry"; - static constexpr const char * DESCRIPTION = "AbstractRegistry interface.\nProvides components/modules registry"; -}; - -class Registry : public ComponentBase, - virtual public AbstractRegistry { -public: - Registry(); - //Registry(const std::function & bindFunc):m_autobind(bindFunc) {} - ~Registry() override = default; - void clear() override; - - XPCFErrorCode loadModules(const char* folderPathStr, bool bRecurse) override; - XPCFErrorCode loadModuleMetadata(const char* moduleName, - const char* moduleFilePath) override; - void declareModuleMetadata(SPtr moduleInfos) override; - const IEnumerable> & getModulesMetadata() const override; - SPtr findComponentMetadata(const uuids::uuid & componentUUID) const override; - uuids::uuid getModuleUUID(const uuids::uuid & componentUUID) const override; - SPtr findModuleMetadata(const uuids::uuid & moduleUUID) const override; - - const IEnumerable> & getInterfacesMetadata() const override; - SPtr findInterfaceMetadata(const uuids::uuid & interfaceUUID) const override; - void enableAutoAlias(bool enabled) override { m_autoAlias = enabled; } - void setBinder(const std::function & bindFunc) override { m_autobind = bindFunc; } - void declareModule(tinyxml2::XMLElement * xmlModuleElt) override; - SRef getContext() const final; - SRef context() override { return m_context; } - void setContext(SRef context) final; - void unloadComponent () override final; - -private: - template XPCFErrorCode load(fs::path folderPath); - template XPCFErrorCode loadModules(fs::path folderPath); - void addModuleMetadata(SPtr metadata); - void addInterfaceMetadata(SPtr metadata); - void declareInterfaceNode(SRef componentInfo, tinyxml2::XMLElement *interfaceElt); - void declareComponent(SRef moduleInfo, tinyxml2::XMLElement *componentElt); - void autobind(const uuids::uuid & interfaceUUID, const uuids::uuid & componentUUID) { m_autobind(interfaceUUID,componentUUID); } - -#ifdef XPCF_WITH_LOGS - boost::log::sources::severity_logger< boost::log::trivial::severity_level > m_logger; -#endif - - SRef m_context; - std::function m_autobind = [](const uuids::uuid &, const uuids::uuid &) -> void {}; - SRef m_aliasManager; - bool m_libraryLoaded; - bool m_autoAlias = false; -}; - - -template <> struct ComponentTraits -{ - static constexpr const char * UUID = "C79C683D-64F4-4F7F-B43A-EF8F368F9940"; - static constexpr const char * NAME = "XPCF::Registry"; - static constexpr const char * DESCRIPTION = "XPCF::Registry"; -}; - - -}}} //namespace org::bcom::xpcf - -#endif diff --git a/interfaces/private/xpcf/tinyxmlhelper.h b/interfaces/private/xpcf/tinyxmlhelper.h deleted file mode 100644 index 7826e5a..0000000 --- a/interfaces/private/xpcf/tinyxmlhelper.h +++ /dev/null @@ -1,68 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-04-28 - */ - -#ifndef ORG_BCOM_XPCF_TINYXMLHELPER_H -#define ORG_BCOM_XPCF_TINYXMLHELPER_H - -#include -#include "tinyxml2.h" -#include -#include -#include - -std::string xmlGetTextSecure(tinyxml2::XMLElement * elt, const std::string & nodeName, - bool optional = false, const std::string & defaultValue = ""); - -namespace org { namespace bcom { namespace xpcf { - -inline void processXmlNode(tinyxml2::XMLElement * xmlElt, const char * nodeName, std::function func) -{ - tinyxml2::XMLElement *element = xmlElt->FirstChildElement(nodeName); - while (element != nullptr) { - func(element); - element = element->NextSiblingElement(nodeName); - } -} - - -template -inline void processXmlNode(tinyxml2::XMLElement * xmlElt, const char * nodeName, std::function func, Args&&...args) -{ - tinyxml2::XMLElement *element = xmlElt->FirstChildElement(nodeName); - while (element != nullptr) { - func(element, std::forward< Args >(args)...); - element = element->NextSiblingElement(nodeName); - } -} -/* -template -void processXmlNode(SRef element, tinyxml2::XMLElement * xmlParentElt, const char * nodeName, std::function, tinyxml2::XMLElement*)> func) -{ - tinyxml2::XMLElement *xmlElt = xmlParentElt->FirstChildElement(nodeName); - while (xmlElt != nullptr) { - func(element, xmlElt); - element = element->NextSiblingElement(nodeName); - } -}*/ - -}}} -#endif // TINYXMLHELPER_H diff --git a/interfaces/swig/XPCF_Api.i b/interfaces/swig/XPCF_Api.i deleted file mode 100644 index 102adaf..0000000 --- a/interfaces/swig/XPCF_Api.i +++ /dev/null @@ -1,152 +0,0 @@ -%module XPCF_Api -%{ -#include "xpcf/api/ComponentMetadata.h" -#include "xpcf/api/IComponentIntrospect.h" -#include "xpcf/api/IFactory.h" -#include "xpcf/api/IAliasManager.h" -#include "xpcf/api/IRegistryManager.h" -#include "xpcf/api/IComponentManager.h" -#include "xpcf/api/IConfigurable.h" -#include "xpcf/module/IModuleIndex.h" -#include "xpcf/api/IModuleManager.h" -#include "xpcf/api/InterfaceMetadata.h" -#include "xpcf/api/ModuleMetadata.h" -#include "xpcf/xpcf.h" -#include "xpcf/api/IInjectable.h" -#include "xpcf/api/InjectableMetadata.h" -%} - -%include "swig.i" - -%import (module="XPCF.Core") "XPCF_Core.i" -%import (module="XPCF.Collection") "XPCF_Collection.i" -%import (module="XPCF.Properties") "XPCF_Properties.i" -%import (module="XPCF.Traits") "XPCF_Traits.i" - -%pragma(csharp) moduleimports= -%{ - using XPCF.Core; - using XPCF.Collection; - using XPCF.Properties; - using XPCF.Traits; -%} - -%typemap(csimports) SWIGTYPE -%{ - using XPCF.Core; - using XPCF.Collection; - using XPCF.Properties; - using XPCF.Traits; -%} - -/// - -%shared_ptr(org::bcom::xpcf::ComponentMetadata) -%shared_ptr(org::bcom::xpcf::IComponentIntrospect) -%shared_ptr(org::bcom::xpcf::InjectableMetadata) -%shared_ptr(org::bcom::xpcf::Injector) -%shared_ptr(org::bcom::xpcf::IFactory) -%shared_ptr(org::bcom::xpcf::IAliasManager) -%shared_ptr(org::bcom::xpcf::IRegistryManager) -%shared_ptr(org::bcom::xpcf::IComponentManager) -%shared_ptr(org::bcom::xpcf::IConfigurable) -%shared_ptr(org::bcom::xpcf::IInjectable) -%shared_ptr(org::bcom::xpcf::IModuleManager) -%shared_ptr(org::bcom::xpcf::InterfaceMetadata) -%shared_ptr(org::bcom::xpcf::ModuleMetadata) - -/// - -%ignore org::bcom::xpcf::InterfaceMetadata::InterfaceMetadata(const InterfaceMetadata & other); -%ignore org::bcom::xpcf::InterfaceMetadata::operator=; -%ignore org::bcom::xpcf::InterfaceMetadata::operator==; -//%nodefaultctor org::bcom::xpcf::InterfaceMetadata; -%include "xpcf/api/InterfaceMetadata.h" - -//#include "xpcf/api/InterfaceMetadata.i" -namespace boost{namespace filesystem{}} -%ignore org::bcom::xpcf::ComponentMetadata::ComponentMetadata(const ComponentMetadata & other); -%ignore org::bcom::xpcf::ComponentMetadata::operator=; -%ignore org::bcom::xpcf::ComponentMetadata::operator==; -%include "xpcf/api/ComponentMetadata.h" - -//#include "xpcf/api/ComponentMetadata.i" -%ignore org::bcom::xpcf::IModuleIndex; //TODO Multiple inheritance -//%interface_impl(org::bcom::xpcf::IModuleIndex); -//%shared_ptr(org::bcom::xpcf::IModuleIndex) -%include "xpcf/module/IModuleIndex.h" - -//#include "xpcf/api/IModuleIndex.i" -//#include "xpcf/api/InterfaceMetadata.i" -%ignore org::bcom::xpcf::ModuleMetadata::getFullPath() const; -%include "xpcf/api/ModuleMetadata.h" - -//#include "xpcf/api/InterfaceMetadata.i" -//%ignore org::bcom::xpcf::IComponentIntrospect::getMetadata; -%include "xpcf/api/IComponentIntrospect.h" - -//#include -//#include -//#include -//#include -//TODO instanciate templates -%ignore org::bcom::xpcf::IInjectable::getInjectables; -%ignore org::bcom::xpcf::IInjectable::inject; -%ignore org::bcom::xpcf::IInjectable::injectExists; -%include "xpcf/api/IInjectable.h" -/* -%template(inject) org::bcom::xpcf::IInjectable::inject(SRef instance); -template void inject(SRef instance); -template void inject(SRef instance); -template void inject(SRef instance, const char * name); -template void inject(SRef instance, const char * name); -template bool injectExists() const; -template bool injectExists(const char * name) const; -*/ - -//#include "IComponentIntrospect.h" -//#include -%include "xpcf/api/InjectableMetadata.h" - -//#include "xpcf/api/IInjectable.i" -//#include "xpcf/api/InterfaceMetadata.i" -//#include "xpcf/api/ComponentMetadata.i" -//#include "xpcf/api/ModuleMetadata.i" -%include "xpcf/api/IFactory.h" -%include "xpcf/api/IAliasManager.h" -%include "xpcf/api/IRegistryManager.h" -%include "xpcf/api/IComponentManager.h" - -//#include "xpcf/api/IComponentIntrospect.i" -%include "xpcf/api/IConfigurable.h" -//#include "xpcf/api/IComponentIntrospect.i" -//#include "xpcf/api/ModuleMetadata.i" -%include "xpcf/api/IModuleManager.h" - -//#include "xpcf/api/IComponentManager.i" -//#include "xpcf/api/IConfigurable.i" -%include "xpcf/xpcf.h" - - - -//#include "xpcf/core/uuid.i" -//#include "xpcf/core/xpcf_api_define.i" -//#include "xpcf/core/XPCFErrorCode.i" -//#include "xpcf/api/InjectableMetadata.h" -%ignore std::runtime_error; -namespace std{class runtime_error {};} -%ignore org::bcom::xpcf::Exception::Exception(const std::string & what, XPCFErrorCode errCode = XPCFErrorCode::_FAIL); -%ignore org::bcom::xpcf::AccessDeniedException::AccessDeniedException(const std::string & what); -%ignore org::bcom::xpcf::IllegalStateException::IllegalStateException(const std::string & what); -%ignore org::bcom::xpcf::ModuleException::ModuleException(const std::string & what, XPCFErrorCode errCode = XPCFErrorCode::_FAIL); -%ignore org::bcom::xpcf::NotImplementedException::NotImplementedException(const std::string & what); -%ignore org::bcom::xpcf::NullPointerException::NullPointerException(const std::string & what); -%ignore org::bcom::xpcf::TimeoutException::TimeoutException(const std::string & what); -%ignore org::bcom::xpcf::UUIDNotFoundException::UUIDNotFoundException(const std::string & what, XPCFErrorCode errCode = XPCFErrorCode::_FAIL); -%ignore org::bcom::xpcf::ComponentNotFoundException::ComponentNotFoundException(const std::string & what); -%ignore org::bcom::xpcf::InterfaceNotImplementedException::InterfaceNotImplementedException(const std::string & what); -%ignore org::bcom::xpcf::ModuleNotFoundException::ModuleNotFoundException(const std::string & what); -%ignore org::bcom::xpcf::InjectionException::InjectionException(const std::string & what, XPCFErrorCode errCode = XPCFErrorCode::_FAIL); -%ignore org::bcom::xpcf::InjectableNotFoundException::InjectableNotFoundException(const std::string & what); -%ignore org::bcom::xpcf::InjectableDeclarationException::InjectableDeclarationException(const std::string & what); -%include "xpcf/core/Exception.h" diff --git a/interfaces/swig/XPCF_Bindings.i b/interfaces/swig/XPCF_Bindings.i deleted file mode 100644 index 666b389..0000000 --- a/interfaces/swig/XPCF_Bindings.i +++ /dev/null @@ -1,54 +0,0 @@ -//This module is the C# bindTo entry point for the whole xpcf and modules interfaces wrapping -%module XPCF_Bindings -%{ -#include -#include "xpcf/api/IComponentIntrospect.h" -#include "xpcf/api/IFactory.h" -#include "xpcf/api/IAliasManager.h" -#include "xpcf/api/IRegistryManager.h" -#include "xpcf/api/IComponentManager.h" -#include "xpcf/api/IConfigurable.h" -#include "xpcf/api/IInjectable.h" -#include "IGuitar.h" -#include "IMusician.h" -#include "IHuman.h" -#include "IGuitarist.h" -%} - -%include "swig.i" - -%import (module="XPCF.Api") "XPCF_Api.i" -%import (module="XPCF.SampleComponent") "XPCF_SampleComponent.i" - -%pragma(csharp) moduleimports=%{ - using XPCF.Api; - using XPCF.SampleComponent; -%} - -%typemap(csimports) SWIGTYPE -%{ - using XPCF.Api; - using XPCF.SampleComponent; -%} - -%define XPCF_BIND_TO(NAME, TYPE) -%template(bindTo_ ## NAME) org::bcom::xpcf::bindTo; -%template(resolve_ ## NAME) org::bcom::xpcf::resolve; -%template(resolveAll_ ## NAME) org::bcom::xpcf::resolveAll; -%enddef - -// Base XPCF interfaces bindTo wrapping -XPCF_BIND_TO(IAliasManager, org::bcom::xpcf::IAliasManager) -XPCF_BIND_TO(IRegistryManager, org::bcom::xpcf::IRegistryManager) -XPCF_BIND_TO(IInjectable, org::bcom::xpcf::IInjectable) -XPCF_BIND_TO(IConfigurable, org::bcom::xpcf::IConfigurable) -XPCF_BIND_TO(IInjectable, org::bcom::xpcf::IConfigurable) -// Add dedicated other framework interfaces bindTo wrapping below -// sample wrapping for xpcfSampleComponent interfaces -XPCF_BIND_TO(IGuitar, IGuitar) -XPCF_BIND_TO(IElectricGuitar, IElectricGuitar) -XPCF_BIND_TO(IGuitarist, IGuitarist) -XPCF_BIND_TO(ITuner, ITuner) -XPCF_BIND_TO(IHuman, IHuman) -XPCF_BIND_TO(IMusician, IMusician) -// xpcfSampleComponent sample wrapping end diff --git a/interfaces/swig/XPCF_Collection.i b/interfaces/swig/XPCF_Collection.i deleted file mode 100644 index 7a7f6f9..0000000 --- a/interfaces/swig/XPCF_Collection.i +++ /dev/null @@ -1,82 +0,0 @@ -%module XPCF_Collection -%{ -#include "xpcf/collection/ICollection.h" -#include "xpcf/collection/IEnumerable.h" -#include "xpcf/collection/IEnumerator.h" -%} - -%include "swig.i" - -%import (module="XPCF.Core") "XPCF_Core.i" -%import (module="XPCF.Api") "XPCF_Api.i" - -%typemap(csimports) SWIGTYPE -%{ - using XPCF.Core; - using XPCF.Api; -%} - -/// - -%typemap(csimports) org::bcom::xpcf::IEnumerator -%{ - using System.Collections; - using System.Collections.Generic; - using XPCF.Core; - using XPCF.Api; - using XPCF.Properties; -%} -%extend org::bcom::xpcf::IEnumerator -{ - %typemap(csinterfaces) org::bcom::xpcf::IEnumerator %{global::System.IDisposable, IEnumerator<$typemap(cstype, T)>%} - %proxycode %{ - public $typemap(cstype, T) Current { get { return current(); } } - object IEnumerator.Current { get { return current(); } } - %} -} -%rename(MoveNext) org::bcom::xpcf::IEnumerator::moveNext(); -%rename(Reset) org::bcom::xpcf::IEnumerator::reset(); -%ignore org::bcom::xpcf::IEnumerator::operator==; -%ignore org::bcom::xpcf::Iterator::operator=; -%ignore org::bcom::xpcf::Iterator::operator++; -%include "xpcf/collection/IEnumerator.h" - -//%include "xpcf/collection/IEnumerator.i" -%typemap(csimports) org::bcom::xpcf::IEnumerable -%{ - using System.Collections; - using System.Collections.Generic; - using XPCF.Core; - using XPCF.Api; - using XPCF.Properties; -%} -%extend org::bcom::xpcf::IEnumerable -{ - %typemap(csinterfaces) org::bcom::xpcf::IEnumerable %{global::System.IDisposable, IEnumerable<$typemap(cstype, T)>%} - %proxycode %{ - public IEnumerator<$typemap(cstype, T)> GetEnumerator() { return getEnumerator(); } - IEnumerator IEnumerable.GetEnumerator() { return getEnumerator(); } - %} -} -#pragma SWIG nowarn=320 //Explicit template instantiation ignored. -%include "xpcf/collection/IEnumerable.h" - -//%include "xpcf/collection/IEnumerable.i" -%include "xpcf/collection/ICollection.h" - -/// - -%define ENUMERABLE(NAME, TYPE) -%shared_ptr(org::bcom::xpcf::IEnumerator) -%rename(NAME ## Enumerator) org::bcom::xpcf::IEnumerator; -%template(NAME ## Enumerator) org::bcom::xpcf::IEnumerator; -%rename(NAME ## Enumerable) org::bcom::xpcf::IEnumerable; -%template(NAME ## Enumerable) org::bcom::xpcf::IEnumerable; -%enddef - -ENUMERABLE(UUID, org::bcom::xpcf::uuids::uuid) -ENUMERABLE(ComponentMetadata, SRef) -ENUMERABLE(InterfaceMetadata, SRef) -ENUMERABLE(Property, SRef) -ENUMERABLE(ModuleMetadata, SRef) -ENUMERABLE(IComponentIntrospect,SRef) diff --git a/interfaces/swig/XPCF_Component.i b/interfaces/swig/XPCF_Component.i deleted file mode 100644 index 4bf3295..0000000 --- a/interfaces/swig/XPCF_Component.i +++ /dev/null @@ -1,31 +0,0 @@ -%module XPCF_Component -%{ -#include "xpcf/component/ComponentBase.h" -#include "xpcf/component/ComponentFactory.h" -#include "xpcf/component/ConfigurableBase.h" -%} - -%include "swig.i" - -%import (module="XPCF.Core") "XPCF_Core.i" -%import (module="XPCF.Api") "XPCF_Api.i" - -%typemap(csimports) SWIGTYPE -%{ - using XPCF.Core; - using XPCF.Api; -%} - -/// - -%shared_ptr(org::bcom::xpcf::ComponentBase) - -/// - -%include "xpcf/component/ComponentFactory.h" - -//%include "xpcf/component/ComponentFactory.i" -%include "xpcf/component/ComponentBase.h" - -//%include "xpcf/component/ComponentBase.i" -//%include "xpcf/component/ConfigurableBase.h" diff --git a/interfaces/swig/XPCF_Core.i b/interfaces/swig/XPCF_Core.i deleted file mode 100644 index 3ca6d4f..0000000 --- a/interfaces/swig/XPCF_Core.i +++ /dev/null @@ -1,47 +0,0 @@ -%module XPCF_Core -%{ -#include "xpcf/core/helpers.h" -#include "xpcf/core/refs.h" -#include "xpcf/core/Result.h" -#include "xpcf/core/uuid.h" -#include "xpcf/core/traits.h" -#include "xpcf/xpcf_api_define.h" -#include "xpcf/core/XPCFErrorCode.h" -%} - -%include "swig.i" - -/// - -%include "xpcf/core/helpers.h" - -%include "xpcf/xpcf_api_define.h" - -%rename (UUID) boost::uuids::uuid; -namespace boost {namespace uuids {class uuid{};}} -%csmethodmodifiers boost::uuids::uuid::ToString %{public override%}; -%extend boost::uuids::uuid -{ - %proxycode - %{ - public static implicit operator UUID(string uuidString) {return new UUID(uuidString);} - public static implicit operator string(UUID uuid) {return uuid.ToString();} - %} - uuid(const char* uuidString) {return new boost::uuids::uuid(org::bcom::xpcf::toUUID(uuidString));} - const std::string ToString() {return boost::uuids::to_string(*self);} -} -%ignore org::bcom::xpcf::toUUID(const char * uuidString); -%ignore org::bcom::xpcf::toUUID(const std::string & uuidString); -%include "xpcf/core/uuid.h" - -%include "xpcf/core/traits.h" - -namespace boost {namespace movelib {}} -%include "xpcf/core/refs.h" -#define SRef boost::shared_ptr -#define SPtr boost::shared_ptr - -%include "xpcf/core/XPCFErrorCode.h" - -//#include "xpcf/core/XPCFErrorCode.i" -%include "xpcf/core/Result.h" diff --git a/interfaces/swig/XPCF_Module.i b/interfaces/swig/XPCF_Module.i deleted file mode 100644 index efa9d07..0000000 --- a/interfaces/swig/XPCF_Module.i +++ /dev/null @@ -1,21 +0,0 @@ -%module XPCF_Module -%{ -#include "xpcf/module/ModuleFactory.h" -%} - -%include "swig.i" - -%import (module="XPCF.Core") "XPCF_Core.i" -%import (module="XPCF.Component") "XPCF_Component.i" -%import (module="XPCF.Api") "XPCF_Api.i" - -%typemap(csimports) SWIGTYPE -%{ - using XPCF.Core; - using XPCF.Component; - using XPCF.Api; -%} - -/// - -%include "xpcf/module/ModuleFactory.h" diff --git a/interfaces/swig/XPCF_Properties.i b/interfaces/swig/XPCF_Properties.i deleted file mode 100644 index b58f0fc..0000000 --- a/interfaces/swig/XPCF_Properties.i +++ /dev/null @@ -1,30 +0,0 @@ -%module XPCF_Properties -%{ -#include "xpcf/properties/IProperty.h" -#include "xpcf/properties/IPropertyMap.h" -%} - -%include "swig.i" - -%import (module="XPCF.Core") "XPCF_Core.i" -%import (module="XPCF.Collection") "XPCF_Collection.i" - -%typemap(csimports) SWIGTYPE -%{ - using XPCF.Core; - using XPCF.Collection; -%} - -/// - -%shared_ptr(org::bcom::xpcf::IProperty) -%shared_ptr(org::bcom::xpcf::IPropertyMap) - -/// - -%include "xpcf/properties/IProperty.h" - -//%include "xpcf/properties/IProperty.i" -//ignore wrapping methods -%rename("$ignore", regextarget=1, fullname=1) "org::bcom::xpcf::IPropertyMap::wrap.*$"; -%include "xpcf/properties/IPropertyMap.h" diff --git a/interfaces/swig/XPCF_Threading.i b/interfaces/swig/XPCF_Threading.i deleted file mode 100644 index 3a5f7a1..0000000 --- a/interfaces/swig/XPCF_Threading.i +++ /dev/null @@ -1,55 +0,0 @@ -//%module XPCF_Threading -//%{ -//#include "xpcf/threading/ITask.h" -//#include "xpcf/threading/SharedFifo.h" -//#include "xpcf/threading/SharedLifo.h" -//#include "xpcf/threading/BaseTask.h" -//#include "xpcf/threading/DropBuffer.h" -//#include "xpcf/threading/SharedBuffer.h" -//#include "xpcf/threading/SharedCircularBuffer.h" -//#include "xpcf/threading/FiberFifos.h" -//%} - -//%include "swig.i" - -//%import (module="XPCF.Core") "XPCF_Core.i" - -//%typemap(csimports) SWIGTYPE -//%{ -// using XPCF.Core; -//%} - -/// - -//%shared_ptr(org::bcom::xpcf::ITask) -//%shared_ptr(org::bcom::xpcf::AbstractTask) -//%shared_ptr(org::bcom::xpcf::BaseTask) -//%shared_ptr(org::bcom::xpcf::AbstractDelegateTask) -//%shared_ptr(org::bcom::xpcf::DelegateTask) -//%shared_ptr(org::bcom::xpcf::FiberTask) - -/// - -//%include "xpcf/threading/ITask.h" - -//%include "xpcf/threading/SharedFifo.h" //TODO Error - -//%include "xpcf/threading/SharedFifo.i" -//%include "xpcf/threading/SharedLifo.h" - -//%include "xpcf/threading/ITask.i" -//%include "xpcf/threading/SharedFifo.i" -//%ignore org::bcom::xpcf::DelegateTask; //TODO Multiple inheritance -//%include "xpcf/threading/BaseTask.h" - -//%include "xpcf/threading/SharedLifo.i" -//%include "xpcf/threading/DropBuffer.h" - -//%include "xpcf/threading/SharedFifo.i" -//%include "xpcf/threading/SharedBuffer.h" - -//%include "xpcf/threading/SharedFifo.i" -//%include "xpcf/threading/SharedCircularBuffer.h" - -//%include "xpcf/threading/SharedCircularBuffer.i" -//%include "xpcf/threading/FiberFifos.h" //TODO Error diff --git a/interfaces/swig/XPCF_Traits.i b/interfaces/swig/XPCF_Traits.i deleted file mode 100644 index ccffc8f..0000000 --- a/interfaces/swig/XPCF_Traits.i +++ /dev/null @@ -1,25 +0,0 @@ -%module XPCF_Traits -%{ -#include "xpcf/component/ComponentTraits.h" -#include "xpcf/api/InterfaceTraits.h" -#include "xpcf/core/traits.h" -%} - -%include "swig.i" - -%import (module="XPCF.Core") "XPCF_Core.i" - -%typemap(csimports) SWIGTYPE -%{ - using XPCF.Core; -%} - -/// - -%include "xpcf/api/InterfaceTraits.h" - -%include "xpcf/component/ComponentTraits.h" - -//%include "xpcf/traits/InterfaceTraits.i" -//%include "xpcf/traits/ComponentTraits.i" -%include "xpcf/core/traits.h" diff --git a/interfaces/swig/swig.i b/interfaces/swig/swig.i deleted file mode 100644 index 011eaa8..0000000 --- a/interfaces/swig/swig.i +++ /dev/null @@ -1,79 +0,0 @@ -// Fix warnings -%include "std_except.i" // Typemaps used by the STL wrappers that throw exceptions -//%include "director.swg" // support for director classes - -// Common -%include "stdint.i" // SWIG library file for ISO C99 types: 7.18 Integer types -%include "exception.i" // SWIG library file providing language independent exception handling -%include "swiginterface.i" // SWIG interface feature and typemaps implementation -%include "swigtype_inout.i" // support for input/output arguments -%include "typemaps.i" // Pointer and reference handling typemap library -%include "attribute.i" // convert a pair of set/get methods into a "native" attribute - -// STD -%include "stl.i" // Initial STL definition -%include "std_array.i" // SWIG typemaps for std::array -%include "std_auto_ptr.i" // allow to handle functions returning std::auto_ptr<> -%include "std_common.i" // define size_t -//%include "std_complex.i" // Typemaps for handling std::complex and std::complex -%include "std_deque.i" -%include "std_map.i" // SWIG typemaps for std::map< K, T, C > -%include "std_pair.i" // SWIG typemaps for std::pair -%include "std_set.i" // SWIG typemaps for std::set -//%include "std_shared_ptr.i" // boost_shared_ptr using std -%include "std_string.i" // Typemaps for std::string and const std::string& -%include "std_vector.i" // SWIG typemaps for std::vector -%include "std_wstring.i" // Typemaps for std::wstring and const std::wstring& - -// C# -%include "arrays_csharp.i" // two approaches to marshaling arrays -//%include "complex.i" // Typemaps for handling std::complex and std::complex -%include "csharp.swg" // C# typemaps -%include "csharphead.swg" // Support code for exceptions and strings if ... -%include "csharpkw.swg" // Warnings for C# keywords -//%include "director.swg" // support for director classes -%include "enums.swg" // C/C++ enums to be wrapped by proper C# enums -//%include "enumsimple.swg" // backwards compatible: Enums declared within a C++ class were wrapped by constant integers -//%include "enumtypesafe.swg" // Converts enum into class -%include "wchar.i" // Typemaps for the wchar_t type - -// BOOST -%include "boost_intrusive_ptr.i" // SWIG_INTRUSIVE_PTR_TYPEMAPS SWIG_INTRUSIVE_PTR_TYPEMAPS_NO_WRAP -%include "boost_shared_ptr.i" // SWIG_SHARED_PTR_TYPEMAPS - -// To use non-const std::string references -%apply const std::string & {std::string &}; - -%{ -#include -%} - -// Use System.IntPtr from C# for void* pointers -%apply void *VOID_INT_PTR { void * } -%apply void *VOID_INT_PTR { float * } -//%apply void *VOID_INT_PTR { char * } -%apply void *VOID_INT_PTR { unsigned char * } - -%exception { - try { - $action - } - SWIG_CATCH_UNKNOWN // catch generic exception -} - -/* -%exception { - try { - $action - } - catch(org::bcom::xpcf::Exception& e) { - SWIG_exception(SWIG_RuntimeError, e.what()); - } - SWIG_CATCH_STDEXCEPT // catch std::exception - catch (...) { - SWIG_exception(SWIG_UnknownError, "Unknown exception"); - } -} -*/ - -//%rename("%(camelcase)s") ""; //TODO diff --git a/interfaces/xpcf/api/ComponentMetadata.h b/interfaces/xpcf/api/ComponentMetadata.h deleted file mode 100644 index b523d77..0000000 --- a/interfaces/xpcf/api/ComponentMetadata.h +++ /dev/null @@ -1,75 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-04-28 - */ - -#ifndef ORG_BCOM_XPCF_COMPONENTMETADATA_H -#define ORG_BCOM_XPCF_COMPONENTMETADATA_H - - -#include "xpcf/xpcf_api_define.h" -#include "xpcf/core/uuid.h" -#include "xpcf/core/refs.h" -#include "xpcf/api/InterfaceMetadata.h" -#include "xpcf/collection/IEnumerable.h" - -#include -#include - -namespace org { namespace bcom { namespace xpcf { -/** - * @class ComponentMetadata - * @brief Specifies the ComponentMetadata class. - * - * This class provides XPCF component metadata informations. - * Informations about the interfaces UUIDs provided by the component can be retrieved with getInterfaces(). - */ -class XPCF_EXPORT_API ComponentMetadata : public InterfaceMetadata { -public: - ComponentMetadata() = delete; - ComponentMetadata(const ComponentMetadata & other); - ComponentMetadata(ComponentMetadata && other); - ComponentMetadata(const char* name, const uuids::uuid& componentID, const char* description); - ComponentMetadata(const char* name, const char *componentID, const char* description); - virtual ~ComponentMetadata(); - - void addInterface(const uuids::uuid& interfaceUUID); - const IEnumerable & getInterfaces() const; - - ComponentMetadata& operator=(const ComponentMetadata & other); - ComponentMetadata& operator=(ComponentMetadata && other); - bool operator==(const ComponentMetadata & other); - -private: - class ComponentMetadataImpl; - UniqueRef m_pimpl; - -}; - - -//template -//struct inferTrait -//{ -// typedef ComponentTraits InnerType; -//}; - -}}} //namespace org::bcom::xpcf - -#endif diff --git a/interfaces/xpcf/api/IAliasManager.h b/interfaces/xpcf/api/IAliasManager.h deleted file mode 100644 index 15042de..0000000 --- a/interfaces/xpcf/api/IAliasManager.h +++ /dev/null @@ -1,79 +0,0 @@ -/** - * @copyright Copyright (c) 2021 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2021-09-14 - */ - -#ifndef IALIASMANAGER_H -#define IALIASMANAGER_H - -#include - -namespace org { namespace bcom { namespace xpcf { - -/** - * @class IAliasManager - * @brief Specifies the IAliasManager interface. - * - * This interface provides method definitions to handle XPCF aliases. - * An alias allows to associate a name with an uuid. - * Its main purpose is to facilitate configuration handling, using names being easier than uuids throughout the configuration file. - * Once defined, the alias name can be used instead of the uuid in the various sections of the configuration file, or across configuration files. - * An alias is declared for an XPCF element, either a module, a component or an interface. - */ -class IAliasManager : virtual public IComponentIntrospect { -public: - typedef enum { - Interface, - Component, - Module - } Type; - - virtual ~IAliasManager() override = default; - virtual bool aliasExists(Type type, const std::string & name) = 0; - virtual void declareAlias(Type type, const std::string & name, const uuids::uuid & uuid) = 0; - virtual const uuids::uuid & resolveComponentAlias(const std::string & name) = 0; - virtual const uuids::uuid & resolveInterfaceAlias(const std::string & name) = 0; - virtual const uuids::uuid & resolveModuleAlias(const std::string & name) = 0; - - template void declareInterfaceAlias(const std::string & name); - template void declareComponentAlias(const std::string & name); -}; - -template void IAliasManager::declareInterfaceAlias(const std::string & name) -{ - declareAlias(IAliasManager::Type::Interface, name, toUUID()); -} - -template void IAliasManager::declareComponentAlias(const std::string & name) -{ - declareAlias(IAliasManager::Type::Component, name, toUUID()); -} - -template <> struct InterfaceTraits -{ - static constexpr const char * UUID = "2855F879-52AA-42F6-A84A-D9D3FD37D28F"; - static constexpr const char * NAME = "XPCF::IAliasManager"; - static constexpr const char * DESCRIPTION = "Alias manager interface.\nProvides named alias handling towards uuids (component, interface or module uuid) "; -}; - -}}} - - -#endif // IALIASMANAGER_H diff --git a/interfaces/xpcf/api/IComponentIntrospect.h b/interfaces/xpcf/api/IComponentIntrospect.h deleted file mode 100644 index 97440a9..0000000 --- a/interfaces/xpcf/api/IComponentIntrospect.h +++ /dev/null @@ -1,217 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-04-28 - */ - -#ifndef ORG_BCOM_XPCF_ICOMPONENTINTROSPECT_H -#define ORG_BCOM_XPCF_ICOMPONENTINTROSPECT_H - -#include "xpcf/collection/IEnumerable.h" -#include "xpcf/core/traits.h" -#include "xpcf/api/InterfaceMetadata.h" - -// NOTE : ALL COMPONENTS MUST THROW EXCEPTIONS DERIVED from std::exception, -// in order to be able to catch all exceptions in a uniform way -//TODO : namespacing normalization -namespace org { namespace bcom { namespace xpcf { - -/** - * @class IComponentIntrospect - * @brief Specifies the IComponentIntrospect interface. - * - * This interface provides method definitions to handle component introspection. - * The ComponentFactory class is a friend class to allow access to protected - * and private methods of IComponentIntrospect - */ -class IComponentIntrospect -{ - friend class ComponentFactory; -public: - /** - * Virtual destructor of IComponentIntrospect - */ - virtual ~IComponentIntrospect() = default; - - /** - * Returns the number of interfaces the component implements - * @return the number of interfaces - */ - virtual uint32_t getNbInterfaces() const = 0; - - /** - * Retrieve the enumerator upon interface UUIDs' implemented by the underlying component. - * @return a unique pointer on the UUIDs' enumerator - */ - virtual const IEnumerable & getInterfaces() const = 0; - - /** - * Runtime checks whether the component implements an interface - * @param [in] interfaceUUID the interface unique ID - * @return true when the component implements the interface @em interfaceUUID, false otherwise. - */ - virtual bool implements(const uuids::uuid& interfaceUUID) const = 0; - - /** - * Retrieves an interface description from its UUID - * @param [in] interfaceUUID the interface unique ID - * @return the interface description - */ - virtual const char* getDescription(const uuids::uuid& interfaceUUID) const = 0; - - /** - * Retrieves an interface metadata from its UUID - * @param [in] interfaceUUID the interface unique ID - * @throws InterfaceNotImplementedException when there is no interface metadata for @em interfaceUUID - * @return the interface metadata - */ - virtual const InterfaceMetadata & getMetadata(const uuids::uuid& interfaceUUID) const = 0; - - /** - * Queries the interface referenced with @em interfaceUUID and returns a reference to the interface I. - * @param interfaceUUID [description] - * @param aRef [description] - * @throws InterfaceNotImplementedException when the component doesn't implement interface @em interfaceUUID - * @throws utils::bad_any_cast when @em interfaceUUID requested is not the UUID of interface @em I - * @return the shared reference upon the requested interface @em I - */ - - template - SRef queryInterface(const uuids::uuid& interfaceUUID); - - /** - * Binds the component to the requested interface. - * This method uses the InterfaceTraits defined for I to retrieve the interface UUID. - * @throws InterfaceNotImplementedException when the component doesn't implement interface @em interfaceUUID - * @throws utils::bad_any_cast when @em interfaceUUID requested is not the UUID of interface @em I - * @return the shared reference upon the requested interface @em I - */ - template - SRef bindTo(); - - template - bool implements() const; - -protected: - /** - * Retrieve a component or interface smart reference from its pointer, - * incrementing the component reference counter with @fn addComponentRef. - * The smart reference created is initialized with the - * IComponentIntrospectDeleter custom deleter. - * This deleter calls @fn releaseComponentRef when the smart reference is destroyed. - * @param component the component or interface pointer - * @param aRef the component smart reference - */ - template static void acquireComponentRef(T* component, SRef& aRef); - - template static SRef acquireComponentRef(T* component); - - /** - * [queryInterface description] - * @param interfaceUUID [description] - * @return [description] - */ - virtual utils::any queryInterface(const uuids::uuid & interfaceUUID) const = 0; - -private: - /** - * @return the smart reference on the IComponentIntrospect interface of the underlying component - */ - virtual SRef introspect() = 0; - - /** - * Increment the reference counter of the component - */ - virtual void addComponentRef() = 0; - - /** - * Decrement the reference counter of the component - */ - virtual void releaseComponentRef() = 0; - - template - class IComponentIntrospectDeleter - { - public: - void operator()(T * p) - { - if (p) { - static_cast(p)->releaseComponentRef(); - } - } - }; -}; - -template <> struct InterfaceTraits -{ - static constexpr const char * UUID = "125f2007-1bf9-421d-9367-fbdc1210d006"; - static constexpr const char * NAME = "XPCF::IComponentIntrospect"; - static constexpr const char * DESCRIPTION = "Component introspection interface.\nProvides:\n- browsing of component interfaces'\n- component binding to its implemented interfaces"; -}; - - -template void IComponentIntrospect::acquireComponentRef(T* component, - SRef& componentRef) -{ - componentRef = SRef(component, IComponentIntrospectDeleter()); - static_cast< SRef >(componentRef)->addComponentRef(); -} - -template SRef IComponentIntrospect::acquireComponentRef(T* component) -{ - SRef componentRef = SRef(component, IComponentIntrospectDeleter()); - static_cast< SRef >(componentRef)->addComponentRef(); - return componentRef; -} - -template -SRef IComponentIntrospect::queryInterface(const uuids::uuid& interfaceUUID) -{ - static_assert(utils::is_base_of::value, - "Interface type passed to createComponent is not a derived class of IComponentIntrospect !!"); - SRef componentRef; - utils::any obj = queryInterface(interfaceUUID); - componentRef = IComponentIntrospect::acquireComponentRef(utils::any_cast(obj)); - return componentRef; -} - -template -SRef IComponentIntrospect::bindTo() -{ - static_assert(is_interface::value, - "Type I passed to bindTo is not an interface" - "or InterfaceTraits is not defined for I !!"); - return queryInterface(toUUID()); -} - -template -bool IComponentIntrospect::implements() const -{ - return implements(toUUID()); -} - -template -SRef bindTo(SRef component) -{ - return component->bindTo(); -}; - -}}} //namespace org::bcom::xpcf - -#endif diff --git a/interfaces/xpcf/api/IComponentManager.h b/interfaces/xpcf/api/IComponentManager.h deleted file mode 100644 index be34957..0000000 --- a/interfaces/xpcf/api/IComponentManager.h +++ /dev/null @@ -1,473 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-04-28 - */ - -#ifndef ORG_BCOM_XPCF_ICOMPONENTMANAGER_H -#define ORG_BCOM_XPCF_ICOMPONENTMANAGER_H - -#include -#include -#include -#include -#include -#include -#include - -namespace org { namespace bcom { namespace xpcf { - -/** - * @class IComponentManager - * @brief Specifies the IComponentManager interface. - * - * This interface provides method definitions to handle component description - * file loading and component creation. - * The ComponentManaager is a singleton service. - * Its instance can be retrieved with the dedicated getComponentManagerInstance() function. - */ -class IComponentManager : virtual public IComponentIntrospect { -public: - /** - * Virtual destructor of IComponentManager - */ - virtual ~IComponentManager() = default; - - virtual SRef getFactory() = 0; - /** - * Clear all previously loaded registries. - * @note created components are not released, and their module counterparts are still loaded in memory. - */ - virtual void clear() = 0; - - /** - * Search the registry file and load it with all the components - * The method tries to read the "XPCF_REGISTRY_PATH" environment variable - * It loads the file provided in the variable when it exists. - * Otherwise, the method loads all xpcf compatible xml files recursively found in xpcf home path (%USERPROFILE%/.xpcf on windows, $HOME/.xpcf on other platforms). - * @return - */ - virtual XPCFErrorCode load() = 0; - - /** - * Search the registry file and load it with all the components - * @return - */ - virtual XPCFErrorCode load(const char* libraryFilePath) = 0; - - /** - * Find registry files from a root folder and load each registry file with its components - * @param [in] folderPathStr : the root path to search xml registry's file for - * @param [in] bRecurse : indicates to search recursively in subfolder [true] or only in @p folderPathStr [false] - * @return - */ - virtual XPCFErrorCode load(const char* folderPathStr, bool bRecurse) = 0; - - /** - * - * @param [in] componentUUID - * @return - * @throws InjectableNotFoundException when the component declares injectable(s) and there was missing bind(s) to resolve them - */ - virtual SRef createComponent(const uuids::uuid & componentUUID) = 0; - - /** - * - * @note with @fn createComponent() - * @param [in] - * @param [in] - * @return - * @throws InjectableNotFoundException when the component declares injectable(s) and there was missing bind(s) to resolve them - */ - virtual SRef createComponent(const char * instanceName, const uuids::uuid & componentUUID) = 0; - - /** - * Retrieve every module metadata registered in the ComponentManager - * @return the collection of modules metadata - */ - virtual const IEnumerable> & getModulesMetadata() const = 0; - - /** - * Search a component metadata. - * @param [in] the component UUID to search for - * @throws ComponentNotFoundException - * @return the component metadata for the component UUID provided - */ - virtual SPtr findComponentMetadata(const uuids::uuid & componentUUID) const = 0; - - /** - * Search the module containing the component provided. - * @param [in] the component UUID - * @throws ComponentNotFoundException - * @return the module UUID containing the component provided - */ - virtual uuids::uuid getModuleUUID(const uuids::uuid & componentUUID) const = 0; - - /** - * Search a module metadata. - * @param [in] the module UUID to search for - * @throws ModuleNotFoundException - * @return the module metadata for the module UUID provided - */ - virtual SPtr findModuleMetadata(const uuids::uuid & moduleUUID) const = 0; - - /** - * Retrieve every interface metadata registered in the ComponentManager - * @return the collection of interfaces metadata - */ - virtual const IEnumerable> & getInterfacesMetadata() const = 0; - - /** - * deprecatd ?? TODO : check - * @param [in] - * @return - */ -#ifndef SWIG - [[deprecated]] -#endif - virtual SPtr findInterfaceMetadata(const uuids::uuid & interfaceUUID) const = 0; - - template < typename I, BindingScope scope = BindingScope::Transient, - uint8_t bindingRangeMask = BindingRange::Default|BindingRange::All > void bind(const uuids::uuid& componentUUID); - - template < typename T, typename I, BindingScope scope = BindingScope::Transient, - uint8_t bindingRangeMask = BindingRange::Explicit> void bind(const uuids::uuid& componentUUID); - - template < typename I, typename C, BindingScope scope = BindingScope::Transient, - uint8_t bindingRangeMask = BindingRange::Default|BindingRange::All > void bind(); - - template < typename T, typename I, typename C, BindingScope scope = BindingScope::Transient, - uint8_t bindingRangeMask = BindingRange::Explicit> void bind(); - - template < typename I, BindingScope scope = BindingScope::Transient, - uint8_t bindingRangeMask = BindingRange::Named > void bind(const char * name, const uuids::uuid& componentUUID); - - template < typename T, typename I, BindingScope scope = BindingScope::Transient, - uint8_t bindingRangeMask = BindingRange::Explicit > void bind(const char * name, const uuids::uuid& componentUUID); - - template < typename I, typename C, BindingScope scope = BindingScope::Transient, - uint8_t bindingRangeMask = BindingRange::Named > void bind(const char * name); - - template < typename T, typename I, typename C, BindingScope scope = BindingScope::Transient, - uint8_t bindingRangeMask = BindingRange::Explicit > void bind(const char * name); - - template < typename I, typename C, BindingScope scope = BindingScope::Transient, - uint8_t bindingRangeMask = BindingRange::Default|BindingRange::All > void bindLocal(); - - template < typename T, typename I, typename C, BindingScope scope = BindingScope::Transient, - uint8_t bindingRangeMask = BindingRange::Explicit > void bindLocal(); - - template < typename I, typename C, BindingScope scope = BindingScope::Transient, - uint8_t bindingRangeMask = BindingRange::Named > void bindLocal(const char * name); - - template < typename T, typename I, typename C, BindingScope scope = BindingScope::Transient, - uint8_t bindingRangeMask = BindingRange::Explicit > void bindLocal(const char * name); - - /** - * - * @note with @fn createComponent() - * @param [in] - * @return - * @throws InjectableNotFoundException when the component declares injectable(s) and there was missing bind(s) to resolve them - */ - template < typename I> SRef createComponent(const uuids::uuid & componentUUID); - - /** - * - * @note with @fn createComponent() - * @param [in] - * @param [in] - * @return - * @throws InjectableNotFoundException when the component declares injectable(s) and there was missing bind(s) to resolve them - */ - template < typename I> SRef createComponent(const char * instanceName, const uuids::uuid & componentUUID); - - /** - * - * @note with @fn resolve() - * @return - * @throws InjectableNotFoundException when no bind was found to resolve an instance for I - * or when the component resolved for I declares injectable(s) and there was missing bind(s) to resolve them - */ - template < typename I> SRef resolve(); - - /** - * - * @note with @fn resolve() - * @param [in] - * @return - * @throws InjectableNotFoundException when no bind was found to resolve an instance for {I, name} - * or when the component resolved for {I, name} declares injectable(s) and there was missing bind(s) to resolve them - */ - template < typename I> SRef resolve(const char * name); - - /** - * - * @note with @fn resolve() - * @return - * @throws InjectableNotFoundException when no bind was found to resolve an instance for I - * or when the component resolved for I declares injectable(s) and there was missing bind(s) to resolve them - */ - template < typename I> const SRef>> resolveAll(); - - /** - * - * @note with @fn resolve() - * @return - * @throws InjectableNotFoundException when the component declares injectable(s) and there was missing bind(s) to resolve them - */ - template < typename C> SRef create(); - - /** - * - * @note with @fn resolve() - * @param [in] - * @return - * @throws InjectableNotFoundException when the component declares injectable(s) and there was missing bind(s) to resolve them - */ - template < typename C> SRef create(const char * instanceName); - -}; - -template <> struct InterfaceTraits -{ - static constexpr const char * UUID = "F3DBCB05-B8C6-47FB-BF80-E86D97DA46B8"; - static constexpr const char * NAME = "XPCF::IComponentManager"; - static constexpr const char * DESCRIPTION = "Provides component factory facility to create components from modules declared in a registry"; -}; - -template < typename I > -SRef IComponentManager::createComponent(const uuids::uuid& componentUUID) -{ - SRef rICIntrospect = createComponent(componentUUID); - return rICIntrospect->bindTo(); -} - -template < typename C > -SRef IComponentManager::create() -{ - return createComponent(toUUID()); -} - -template < typename I> SRef IComponentManager::resolve() -{ - return getFactory()->resolve(); -} - -template < typename I> const SRef>> IComponentManager::resolveAll() -{ - return getFactory()->resolveAll(); -} - -template < typename I> SRef IComponentManager::resolve(const char * name) -{ - return getFactory()->resolve(name); -} - -template < typename I > -SRef IComponentManager::createComponent(const char * instanceName, const uuids::uuid & componentUUID) -{ - SRef rICIntrospect = createComponent(instanceName,componentUUID); - return rICIntrospect->bindTo(); -} - -template < typename C > -SRef IComponentManager::create(const char * instanceName) -{ - return createComponent(instanceName,toUUID()); -} - -template < typename I, BindingScope scope, - uint8_t bindingRangeMask> void IComponentManager::bind(const uuids::uuid & componentUUID) -{ - getFactory()->bind(toUUID(), componentUUID, scope, bindingRangeMask); -} - -template < typename T, typename I, BindingScope scope, - uint8_t bindingRangeMask> void IComponentManager::bind(const uuids::uuid & componentUUID) -{ - getFactory()->bind(toUUID(), toUUID(), componentUUID, scope, bindingRangeMask); -} - -template < typename I, typename C, BindingScope scope, - uint8_t bindingRangeMask> void IComponentManager::bind() -{ - - getFactory()->bind(); -} - -template < typename T, typename I, typename C, BindingScope scope, - uint8_t bindingRangeMask > void IComponentManager::bind() -{ - getFactory()->bind(); -} - -template < typename I, BindingScope scope, - uint8_t bindingRangeMask> void IComponentManager::bind(const char * name, const uuids::uuid & componentUUID) -{ - getFactory()->bind(name, toUUID(), componentUUID, scope, bindingRangeMask); -} - -template < typename T, typename I, BindingScope scope, - uint8_t bindingRangeMask> void IComponentManager::bind(const char * name, const uuids::uuid & componentUUID) -{ - getFactory()->bind(toUUID(), name, toUUID(), componentUUID, scope); -} - -template < typename I, typename C, BindingScope scope, - uint8_t bindingRangeMask> void IComponentManager::bind(const char * name) -{ - getFactory()->bind(name); -} - -template < typename T, typename I, typename C, BindingScope scope, - uint8_t bindingRangeMask> void IComponentManager::bind(const char * name) -{ - getFactory()->bind(name); -} - -template < typename I, typename C, BindingScope scope, - uint8_t bindingRangeMask> void IComponentManager::bindLocal() -{ - getFactory()->bindLocal(); -} - -template < typename T, typename I, typename C, BindingScope scope, - uint8_t bindingRangeMask> void IComponentManager::bindLocal() -{ - getFactory()->bindLocal(); -} - -template < typename I, typename C, BindingScope scope, - uint8_t bindingRangeMask> void IComponentManager::bindLocal(const char * name) -{ - getFactory()->bindLocal(name); -} - -template < typename T, typename I, typename C, BindingScope scope, - uint8_t bindingRangeMask> void IComponentManager::bindLocal(const char * name) -{ - getFactory()->bindLocal(name); -} - -/** - * Retrieve the component manager instance. - * @return the smart reference on the ComponentManager interface - */ -XPCF_EXPORT_API SRef getComponentManagerInstance(); - -/** - * Creates the component identified by componentUUID. - * @note this method uses the ComponentManager, - * hence the ComponentManager must be filled first with informations from either an xml or a module with one of load() methods. - * @param [in] componentUUID the component unique identifier - * @return the smart reference on the created component - * @throws InjectableNotFoundException when the component to create declares injectables and no bind exists for an injectable - */ -XPCF_EXPORT_API SRef createInstance(const uuids::uuid & componentUUID); - -/** - * Creates the component identified by {instanceName, componentUUID}. - * @note this method uses the ComponentManager, - * hence the ComponentManager must be filled first with informations from either an xml or a module with one of load() methods. - * @param [in] componentUUID the component unique identifier - * @param [in] instanceName the component instance name to create (used for specific configuration of a component) - * @return the smart reference on the created component - * @throws InjectableNotFoundException when the component to create declares injectables and no bind exists for an injectable - */ -XPCF_EXPORT_API SRef createInstance(const char * instanceName, const uuids::uuid & componentUUID); - -/** - * Injects @p instance referenced with @p IInjected to @p component - * @param [in] component the component to which @p instance is injected - * @param [in] instance the injected component instance - * @tparam IInjected the injected @p instance interface type - * @tparam I the @p component interface type - * @note component must have an injectable declared for @p IInjected - * @throws InjectionException - */ -template -void inject(SRef component, SRef instance) -{ - static_assert(utils::is_base_of::value, - "Component type passed to inject is not a derived class of IComponentIntrospect !!"); - component->template bindTo()->template inject(instance); -} - - -/** - * Injects @p instance referenced with { @p IInjected, @p name} to @p component - * @param [in] component the component to which @p instance is injected - * @param [in] instance the injected component instance UUID - * @param [in] name the injectable name - * @tparam IInjected the injected @p instance interface type - * @tparam I the @p component interface type - * @note component must have an injectable declared for { @p IInjected, @p name} - * @throws InjectionException - */ -template -void inject(SRef component, SRef instance, const char * name) -{ - static_assert(utils::is_base_of::value, - "Component type passed to inject is not a derived class of IComponentIntrospect !!"); - component->template bindTo()->template inject(instance, name); -} - -/** -* Create a @p C instance for @p IInjected service and inject the created instance to declared @p IInjected injectable for @p component -* @param [in] target the component to which @p instance is injected -* @tparam C the @p component type to create (forward declaration is allowed in this place) -> used to find the ComponentTraits type - * @tparam IInjected the interface type used to bind the created component - * @tparam I the @p target interface type -* @note target must have an injectable declared for @p IInjected -* @throws InjectionException -*/ -template < typename C, typename IInjected, typename I = IComponentIntrospect > -inline void inject(SRef target) -{ - static_assert(utils::is_base_of::value, - "Component type passed to inject is not a derived class of IComponentIntrospect !!"); - SRef instance = createInstance(toUUID())->template bindTo(); - inject(target, instance); -} - -/** - * Create a @p C instance for @p IInjected service and inject the created instance to declared { @p IInjected, @p name} injectable for @p component - * @param [in] target the component to which @p instance is injected - * @param [in] name the injectable name (the name is also used to configure the component) - * @tparam C the @p component type to create (forward declaration is allowed in this place) -> used to find the ComponentTraits type - * @tparam IInjected the interface type used to bind the created component - * @tparam I the @p target interface type - * @note component must have an injectable declared for { @p IInjected, @p name} - * @throws InjectionException - */ -template < typename C, typename IInjected, typename I = IComponentIntrospect > -inline void inject(SRef target, const char * name) -{ - static_assert(utils::is_base_of::value, - "Component type passed to inject is not a derived class of IComponentIntrospect !!"); - SRef instance = createInstance(name, toUUID())->template bindTo(); - inject(target, instance, name); -} - - - -}}} //namespace org::bcom::xpcf - -#endif diff --git a/interfaces/xpcf/api/IConfigurable.h b/interfaces/xpcf/api/IConfigurable.h deleted file mode 100644 index 9595591..0000000 --- a/interfaces/xpcf/api/IConfigurable.h +++ /dev/null @@ -1,134 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-11-11 - */ - -#ifndef ORG_BCOM_XPCF_ICONFIGURABLE_H -#define ORG_BCOM_XPCF_ICONFIGURABLE_H - -#include "xpcf/api/IComponentIntrospect.h" -#include "xpcf/properties/IPropertyMap.h" - -namespace org { namespace bcom { namespace xpcf { - -/** - * @class IConfigurable - * @brief Specifies the IConfigurable interface. - * - * This interface provides method definitions to handle XPCF component configuration. - */ -class IConfigurable : virtual public IComponentIntrospect { -public: - virtual ~IConfigurable() = default; - - /** - * Configure the component from the given configuration declared in the xml file @em filepath - * @param [in] filepath the xml configuration file - * @return - */ - virtual XPCFErrorCode configure(const char * filepath) = 0; - - /** - * Configure the component from the given configuration declared in the node @em xpath from xml file @em filepath - * @param [in] filepath the xml configuration file - * @param [in] xpath the xpath to seach for component configuration - * @return - */ - virtual XPCFErrorCode configure(const char * filepath, const char * xpath) = 0; - - /** - * onConfigured is called after configuration step has occurred. - * It can be overriden in concrete components to add post-configuration code, - * for instance code that relies on xml properties. - * @return XPCFErrorCode::_SUCCESS upon successfull completion, one of the other - * XPCFErrorCode error otherwise (it's up to the component implementation to return appropriate error code). - */ - virtual XPCFErrorCode onConfigured() = 0; - - /** - * - * @param [in] filepath - * @param [in] mode append, create - * @return - */ - virtual XPCFErrorCode serialize(const char * filepath, uint32_t mode) = 0; - - /** - * Checks if the root property node contains properties - * @return true when the root property node contains properties, false otherwise - */ - - virtual bool hasProperties() const = 0; - - /** - * Get a property from its name. The property is searched in the property root node. - * Properties contained in sub-property node are not found with this method (i.e. a property map itself contained in the property root node). - * Sub-property node properties must be searched from the sub-property node using the @em at() method on this node. - * - * @param [in] the property name - * @return the corresponding property - */ - virtual SRef getProperty(const char * name) const = 0; - - /** - * Retrieves the properties root node (the IPropertyMap properties entry point). - * - * @return the property root node - */ - virtual SRef getPropertyRootNode() const = 0; - - /** - * Retrieves the properties collection contained in the propertyRootNode. - * - * @return the properties' collection - */ - virtual const IEnumerable> & getProperties() const = 0; - - /** - * Retrieve an enumerator above properties contained in the propertyRootNode. - * - * @return the properties' enumerator - */ - virtual SRef>> getPropertiesEnumerator() const = 0; - -protected: - virtual XPCFErrorCode addProperty(SRef property) = 0; - - virtual void declarePropertyNode(const char * name, SRef & wrappedValue, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT) = 0; -}; - -#ifndef SWIG -template -SRef getProperty(SRef instance, const char * propertyName) -{ - return instance->template bindTo()->getProperty(propertyName); -} -#endif - -template <> struct InterfaceTraits -{ - static constexpr const char * UUID = "98DBA14F-6EF9-462E-A387-34756B4CBA80"; - static constexpr const char * NAME = "XPCF::IConfigurable"; - static constexpr const char * DESCRIPTION = "Provides generic configuration ability to any component through metadata parameters"; -}; - -}}} - -#endif // ICLONEABLE_H diff --git a/interfaces/xpcf/api/IFactory.h b/interfaces/xpcf/api/IFactory.h deleted file mode 100644 index bb18037..0000000 --- a/interfaces/xpcf/api/IFactory.h +++ /dev/null @@ -1,389 +0,0 @@ -/** - * @copyright Copyright (c) 2019 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2019-06-05 - */ - -#ifndef ORG_BCOM_XPCF_IFACTORY_H -#define ORG_BCOM_XPCF_IFACTORY_H - -//#define BOOST_ALL_DYN_LINK 1 -#include -#include - -namespace org { namespace bcom { namespace xpcf { - - -typedef enum { - Transient, - Singleton -} BindingScope; - - -typedef enum { - Explicit = 1, - WithParents = 2, - Named = 4, - Default = 8, - All = 16 -} BindingRange; - -typedef enum { - Empty, - Cloned, - Shared -} ContextMode; - -/** - * @class IFactory - * @brief Specifies the IFactory interface. - * - * This interface provides method definitions to handle XPCF factories. - * A factory is ... - * Several factories (contexts) can be created. - * - */ -class IFactory : virtual public IComponentIntrospect { -public: - virtual ~IFactory() override = default; - virtual void clear() = 0; - virtual SRef createNewFactoryContext(ContextMode ctxMode = ContextMode::Empty) = 0; - - - /** - * - * @param [in] componentUUID - * @return - * @throws InjectableNotFoundException when the component declares injectable(s) and there was missing bind(s) to resolve them - */ - virtual SRef createComponent(const uuids::uuid & componentUUID) = 0; - - /** - * - * @note with @fn createComponent() - * @param [in] - * @param [in] - * @return - * @throws InjectableNotFoundException when the component declares injectable(s) and there was missing bind(s) to resolve them - */ - virtual SRef createComponent(const char * instanceName, const uuids::uuid & componentUUID) = 0; - - /** - * Search the registry file and load it with all the components - * The method tries to read the "XPCF_REGISTRY_PATH" environment variable - * It loads the file provided in the variable when it exists. - * Otherwise, the method loads all xpcf compatible xml files recursively found in xpcf home path (%USERPROFILE%/.xpcf on windows, $HOME/.xpcf on other platforms). - * @return - */ - virtual XPCFErrorCode load() = 0; - - /** - * Search the registry file and load it with all the components - * @return - */ - virtual XPCFErrorCode load(const char* libraryFilePath) = 0; - - /** - * Find registry files from a root folder and load each registry file with its components - * @param [in] folderPathStr : the root path to search xml registry's file for - * @param [in] bRecurse : indicates to search recursively in subfolder [true] or only in @p folderPathStr [false] - * @return - */ - virtual XPCFErrorCode load(const char* folderPathStr, bool bRecurse) = 0; - - /** - * Declare a binding from the service identified with @p interfaceUUID to the concrete component identified with @p instanceUUID. - * @param [in] interfaceUUID : the interface identifier - * @param [in] instanceUUID : the component identifier - * @param [in] scope : the creation scope used to determine the lifetime of the object retrieved with resolve - * @note bindings can come from in-code calls to bind, from autobinds or bindings declared in an xml configuration file or from autobinds while introspecting a module - */ - virtual void bind(const uuids::uuid & interfaceUUID, const uuids::uuid & instanceUUID, - BindingScope scope, - uint8_t bindingRangeMask) = 0; - virtual void bind(const std::string & name, const uuids::uuid & interfaceUUID, const uuids::uuid & instanceUUID, - BindingScope scope, - uint8_t bindingRangeMask) = 0; - virtual void bind(const uuids::uuid & targetComponentUUID, const uuids::uuid & interfaceUUID, - const uuids::uuid & instanceUUID, BindingScope scope, - uint8_t bindingRangeMask) = 0; - virtual void bind(const uuids::uuid & targetComponentUUID, const std::string & name, const uuids::uuid & interfaceUUID, - const uuids::uuid & instanceUUID, BindingScope scope, - uint8_t bindingRangeMask) = 0; - virtual void bind(const uuids::uuid & interfaceUUID, const uuids::uuid & instanceUUID, - const std::function(void)> & factoryFunc, - BindingScope scope, - uint8_t bindingRangeMask) = 0; - virtual void bind(const std::string & name, const uuids::uuid & interfaceUUID, const uuids::uuid & instanceUUID, - const std::function(void)> & factoryFunc, - BindingScope scope, - uint8_t bindingRangeMask) = 0; - virtual void bind(const uuids::uuid & targetComponentUUID, const uuids::uuid & interfaceUUID, - const std::function(void)> & factoryFunc, - const uuids::uuid & instanceUUID, BindingScope scope, - uint8_t bindingRangeMask) = 0; - virtual void bind(const uuids::uuid & targetComponentUUID, const std::string & name, const uuids::uuid & interfaceUUID, - const std::function(void)> & factoryFunc, - const uuids::uuid & instanceUUID, BindingScope scope, - uint8_t bindingRangeMask) = 0; - - virtual SRef resolve(const SPtr & injectableInfo) = 0; - - /** - * - * @note with @fn resolve() - * @param [in] - * @return - * @throws InjectableNotFoundExceptionwhen no bind was found to resolve an instance for I - * or when the component resolved for I declares injectable(s) and there was missing bind(s) to resolve them - */ - virtual SRef resolve(const uuids::uuid & interfaceUUID) = 0; - - /** - * - * @note with @fn resolve() - * @param [in] - * @param [in] - * @return - * @throws InjectableNotFoundException when no bind was found to resolve an instance for {I, name} - * or when the component resolved for {I, name} declares injectable(s) and there was missing bind(s) to resolve them - */ - virtual SRef resolve(const uuids::uuid & interfaceUUID, const std::string & name) = 0; - virtual const SRef>> resolveAll(const SPtr & injectableInfo) = 0; - virtual const SRef>> resolveAll(const uuids::uuid & interfaceUUID) = 0; - virtual uuids::uuid getComponentUUID(const uuids::uuid & interfaceUUID) = 0; - virtual uuids::uuid getComponentUUID(const uuids::uuid & interfaceUUID, const std::string & name) = 0; - - /** - * - * @note with @fn createComponent() - * @param [in] - * @return - * @throws InjectableNotFoundException when the component declares injectable(s) and there was missing bind(s) to resolve them - */ - template < typename I> SRef createComponent(const uuids::uuid & componentUUID); - - /** - * - * @note with @fn createComponent() - * @param [in] - * @param [in] - * @return - * @throws InjectableNotFoundException when the component declares injectable(s) and there was missing bind(s) to resolve them - */ - template < typename I> SRef createComponent(const char * instanceName, const uuids::uuid & componentUUID); - /** - * - * @note with @fn resolve() - * @return - * @throws InjectableNotFoundException when the component declares injectable(s) and there was missing bind(s) to resolve them - */ - template < typename C> SRef create(); - - /** - * - * @note with @fn resolve() - * @param [in] - * @return - * @throws InjectableNotFoundException when the component declares injectable(s) and there was missing bind(s) to resolve them - */ - template < typename C> SRef create(const char * instanceName); - - template SRef resolve(); - template SRef resolve(const std::string & name); - template < typename I> const SRef>> resolveAll(); - template < typename I, BindingScope scope = BindingScope::Transient, - uint8_t bindingRangeMask = BindingRange::Default|BindingRange::All > void bind(const uuids::uuid& componentUUID); - - template < typename T, typename I, BindingScope scope = BindingScope::Transient, - uint8_t bindingRangeMask = BindingRange::Explicit> void bind(const uuids::uuid& componentUUID); - - template < typename I, typename C, BindingScope scope = BindingScope::Transient, - uint8_t bindingRangeMask = BindingRange::Default|BindingRange::All > void bind(); - - template < typename T, typename I, typename C, BindingScope scope = BindingScope::Transient, - uint8_t bindingRangeMask = BindingRange::Explicit> void bind(); - - template < typename I, BindingScope scope = BindingScope::Transient, - uint8_t bindingRangeMask = BindingRange::Named > void bind(const char * name, const uuids::uuid& componentUUID); - - template < typename T, typename I, BindingScope scope = BindingScope::Transient, - uint8_t bindingRangeMask = BindingRange::Explicit > void bind(const char * name, const uuids::uuid& componentUUID); - - template < typename I, typename C, BindingScope scope = BindingScope::Transient, - uint8_t bindingRangeMask = BindingRange::Named > void bind(const char * name); - - template < typename T, typename I, typename C, BindingScope scope = BindingScope::Transient, - uint8_t bindingRangeMask = BindingRange::Explicit > void bind(const char * name); - template < typename I, typename C, BindingScope scope = BindingScope::Transient, - uint8_t bindingRangeMask = BindingRange::Default|BindingRange::All > void bindLocal(); - template < typename I, typename C, BindingScope scope = BindingScope::Transient, - uint8_t bindingRangeMask = BindingRange::Named > void bindLocal(const char * name); - template < typename T, typename I, typename C, BindingScope scope = BindingScope::Transient, - uint8_t bindingRangeMask = BindingRange::Explicit > void bindLocal(); - template < typename T, typename I, typename C, BindingScope scope = BindingScope::Transient, - uint8_t bindingRangeMask = BindingRange::Explicit > void bindLocal(const char * name); - - -}; - - -template < typename I > -SRef IFactory::createComponent(const uuids::uuid& componentUUID) -{ - SRef rICIntrospect = createComponent(componentUUID); - return rICIntrospect->bindTo(); -} - -template < typename C > -SRef IFactory::create() -{ - return createComponent(toUUID()); -} - -template < typename I > -SRef IFactory::createComponent(const char * instanceName, const uuids::uuid & componentUUID) -{ - SRef rICIntrospect = createComponent(instanceName,componentUUID); - return rICIntrospect->bindTo(); -} - -template < typename C > -SRef IFactory::create(const char * instanceName) -{ - return createComponent(instanceName,toUUID()); -} - -template -SRef IFactory::resolve() -{ - return resolve(toUUID())->template bindTo(); -} - -template -SRef IFactory::resolve(const std::string & name) -{ - return resolve(toUUID(), name)->template bindTo(); -} - -template < typename I> -const SRef>> IFactory::resolveAll() -{ - return resolveAll(toUUID()); -} - -template < typename I, BindingScope scope, - uint8_t bindingRangeMask> void IFactory::bind(const uuids::uuid & componentUUID) -{ - bind(toUUID(), componentUUID, scope, bindingRangeMask); -} - -template < typename T, typename I, BindingScope scope, - uint8_t bindingRangeMask> void IFactory::bind(const uuids::uuid & componentUUID) -{ - bind(toUUID(), toUUID(), componentUUID, scope, bindingRangeMask); -} - -template < typename I, typename C, BindingScope scope, - uint8_t bindingRangeMask> void IFactory::bind() -{ - - bind(toUUID()); -} - -template < typename T, typename I, typename C, BindingScope scope, - uint8_t bindingRangeMask > void IFactory::bind() -{ - bind(toUUID()); -} - -template < typename I, BindingScope scope, - uint8_t bindingRangeMask> void IFactory::bind(const char * name, const uuids::uuid & componentUUID) -{ - bind(name, toUUID(), componentUUID, scope, bindingRangeMask); -} - -template < typename T, typename I, BindingScope scope, - uint8_t bindingRangeMask> void IFactory::bind(const char * name, const uuids::uuid & componentUUID) -{ - bind(toUUID(), name, toUUID(), componentUUID, scope); -} - -template < typename I, typename C, BindingScope scope, - uint8_t bindingRangeMask> void IFactory::bind(const char * name) -{ - bind(name, toUUID()); -} - -template < typename T, typename I, typename C, BindingScope scope, - uint8_t bindingRangeMask> void IFactory::bind(const char * name) -{ - bind(name, toUUID()); -} - -template < typename I, typename C, BindingScope scope, - uint8_t bindingRangeMask> void IFactory::bindLocal() -{ - bind(toUUID(), toUUID(), &ComponentFactory::create, scope, bindingRangeMask); -} - -template < typename T, typename I, typename C, BindingScope scope, - uint8_t bindingRangeMask> void IFactory::bindLocal() -{ - bind(toUUID(), toUUID(), &ComponentFactory::create, toUUID(), scope, bindingRangeMask); -} - -template < typename I, typename C, BindingScope scope, - uint8_t bindingRangeMask> void IFactory::bindLocal(const char * name) -{ - bind(name, toUUID(), toUUID(), &ComponentFactory::create, scope, bindingRangeMask); -} - -template < typename T, typename I, typename C, BindingScope scope, - uint8_t bindingRangeMask> void IFactory::bindLocal(const char * name) -{ - bind(toUUID(), name, toUUID(), &ComponentFactory::create, toUUID(), scope, bindingRangeMask); -} - -template <> struct InterfaceTraits -{ - static constexpr const char * UUID = "DE0ABC12-7850-4798-848A-07C646881A20"; - static constexpr const char * NAME = "XPCF::IFactory"; - static constexpr const char * DESCRIPTION = "Factory interface.\nProvides binding between interfaces uuid and concrete components uuid for injection patterns"; -}; - -template SRef resolve(SRef factory) -{ - return factory->resolve(); -} - -template SRef resolve(SRef factory, const std::string & name) -{ - return factory->resolve(name); -} - -template const SRef>> resolveAll(SRef factory) -{ - return factory->resolveAll(); -} - - -}}} //namespace org::bcom::xpcf - -#endif diff --git a/interfaces/xpcf/api/IInjectable.h b/interfaces/xpcf/api/IInjectable.h deleted file mode 100644 index 6aa1569..0000000 --- a/interfaces/xpcf/api/IInjectable.h +++ /dev/null @@ -1,187 +0,0 @@ -/** - * @copyright Copyright (c) 2019 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2019-05-27 - */ - -#ifndef ORG_BCOM_XPCF_IINJECTABLE_H -#define ORG_BCOM_XPCF_IINJECTABLE_H - -#include -#include -#include -#include -#include -#include - -namespace org { namespace bcom { namespace xpcf { - -/** - * @class IInjectable - * @brief Specifies the IInjectable interface. - * - * This interface provides method definitions to handle XPCF component injection. - * Every component inheriting ComponentBase implicitly implements this interface. - * - */ -class IInjectable : virtual public IComponentIntrospect { -public: - virtual ~IInjectable() = default; - - /** - * Retrieve the enumerator upon injectables interface UUIDs' the underlying component expects. - * @return a unique pointer on the UUIDs' enumerator - */ - virtual const IEnumerable> & getInjectables() const = 0; - - /** - * Inject concrete @em instance to service @em I - * @throws InjectionException when the underlying component doesn't have an injectable for @em I - */ - template void inject(SRef instance); - - template void inject(SRef>> & instance); - - /** - * Bind concrete instance @em instance from IComponentIntrospect to service @em I and inject instance to I - * @throws InjectionException when the underlying component doesn't have an injectable for @em I - */ - template void inject(SRef instance); - - /** - * Bind concrete instance @em instance to service @em I and inject instance to injectable {name, I} - * @throws InjectionException when the underlying component doesn't have an injectable for @em {I, name} - */ - template void inject(SRef instance, const char * name); - - /** - * Bind concrete instance @em instance from IComponentIntrospect to service @em I and inject instance to injectable {name, I} - * @throws InjectionException when the underlying component doesn't have an injectable for @em {I, name} - */ - template - void inject(SRef instance, const char * name); - - template - bool injectExists() const; - - template - bool injectExists(const char * name) const; - - virtual bool injectExists(const uuids::uuid & interfaceUUID) const = 0; - - virtual bool injectExists(const uuids::uuid & interfaceUUID, const char * name) const = 0; - - /** - * onInjected is called after injection step has occurred. - * It can be overriden in concrete components to add post-injection code, - * for instance code that relies on xml properties. - * @return XPCFErrorCode::_SUCCESS upon successfull completion, one of the other - * XPCFErrorCode error otherwise (it's up to the component implementation to return appropriate error code). - */ - virtual void onInjected() = 0; - -protected: - /** - * Retrieve the unnamed injectable referenced with @em interfaceUUID - * @return an any holding the address of the injectable - * @throws InjectionException when the underlying component doesn't have an injectable for @em interfaceUUID - */ - virtual utils::any retrieveInjectable(const uuids::uuid & interfaceUUID) const = 0; - - /** - * Retrieve the named injectable referenced with @em [name, interfaceUUID] - * @return an any holding the address of the injectable - * @throws InjectionException when the underlying component doesn't have an injectable for @em {interfaceUUID, name} - */ - virtual utils::any retrieveInjectable(const uuids::uuid & interfaceUUID, const char * name) const = 0; - - virtual utils::any retrieveMultiInjectable(const uuids::uuid & interfaceUUID) = 0; -}; - -template -void IInjectable::inject(SRef instance) -{ - static_assert(utils::is_base_of::value, - "Interface type passed to createComponent is not a derived class of IComponentIntrospect !!"); - utils::any obj = retrieveInjectable(toUUID()); - SRef * injectable = utils::any_cast*>(obj); - *injectable = instance; -} - -template -void IInjectable::inject(SRef instance) -{ - inject(instance->bindTo()); -} - -template -void IInjectable::inject(SRef>> & instanceCollection) -{ - static_assert(utils::is_base_of::value, - "Interface type passed to createComponent is not a derived class of IComponentIntrospect !!"); - utils::any objSet = retrieveMultiInjectable(toUUID()); - SRef>> injectableSet = utils::any_cast>>>(objSet); - if (injectableSet->size() > instanceCollection->size()) { - //throw - return; - } - - for (auto instance : *instanceCollection) { - injectableSet->add(instance->bindTo()); - } -} - -template -void IInjectable::inject(SRef instance, const char * name) -{ - static_assert(utils::is_base_of::value, - "Interface type passed to createComponent is not a derived class of IComponentIntrospect !!"); - utils::any obj = retrieveInjectable(toUUID(), name); - SRef * injectable = utils::any_cast*>(obj); - *injectable = instance; -} - -template -void IInjectable::inject(SRef instance, const char * name) -{ - inject(instance->bindTo(), name); -} - -template -bool IInjectable::injectExists() const -{ - return injectExists(toUUID()); -} - -template -bool IInjectable::injectExists(const char * name) const -{ - return injectExists(toUUID(), name); -} - -template <> struct InterfaceTraits -{ - static constexpr const char * UUID = "6C5B9EDC-C78B-47FD-8CB2-2BF8D7EDE4EA"; - static constexpr const char * NAME = "XPCF::IInjectable"; - static constexpr const char * DESCRIPTION = "Provides dependency injection interface"; -}; - -}}} - -#endif // ORG_BCOM_XPCF_IINJECTABLE_H diff --git a/interfaces/xpcf/api/IModuleManager.h b/interfaces/xpcf/api/IModuleManager.h deleted file mode 100644 index 12087b3..0000000 --- a/interfaces/xpcf/api/IModuleManager.h +++ /dev/null @@ -1,111 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-04-28 - */ - -#ifndef ORG_BCOM_XPCF_IMODULEMANAGER_H -#define ORG_BCOM_XPCF_IMODULEMANAGER_H - -#include "xpcf/api/IComponentIntrospect.h" -#include "xpcf/api/ModuleMetadata.h" - -#include "xpcf/core/XPCFErrorCode.h" - -namespace org { namespace bcom { namespace xpcf { - -//TODO : -// - multi configuration files support : implemented TO TEST !! -// (now isLoaded is set once a first configuration file is successfully loaded, -// but doesn't prevent from loading other configuration files) -// - configuration file generation from : 1/ a module 2/ a path to search modules for -/** - * @class IComponentManager - * @brief Specifies the IComponentManager interface. - * - * This interface provides method definitions to handle component description file - * loading and component creation. - * The ComponentManaager is a singleton service. - * Its instance can be retrieved with the dedicated getComponentManagerInstance() function. - */ -class IModuleManager : virtual public IComponentIntrospect { -public: - /** - * Virtual destructor of IComponentManager - */ - virtual ~IModuleManager() = default; - - - virtual bool isXpcfModule(const char* modulePath) = 0; - virtual bool isXpcfModule(const char* moduleName, const char* moduleFolderPath) = 0; - virtual bool isXpcfModule(SPtr moduleInfos) = 0; - virtual const char * getXpcfVersion(const char* moduleName, const char* moduleFolderPath) = 0; - //virtual SPtr introspectModule(const char* moduleFilePath) = 0; - /** - * Instropect the module to list‡ the components contained in the module - * @param [in] the module complete file path - * @throw ModuleException - * @return the module metadata - */ - virtual SPtr introspectModule(const char* moduleFilePath) = 0; - - /** - * Instropect the module to list the components contained in the module - * @param [in] the module name - * @param [in] the module folder path - * @throw ModuleException - * @return the module metadata - */ - virtual SPtr introspectModule(const char* moduleName, - const char* moduleFolderPath) = 0; - - virtual XPCFErrorCode saveModuleInformations(const char * xmlFilePath, - const SPtr & moduleInfos) = 0; - - /** - * Create a component identified with @em componentUUID from the module information - * provided in @em moduleInfos metadata. - * - * @param [in] moduleInfos : the module metadata information - * @param [in] componentUUID : the component unique identifier - * @note : the reference can be empty if no @em componentUUID exists in @em moduleInfos - * @return the reference on the created component - */ - virtual SRef createComponent(SPtr moduleInfos, - const uuids::uuid& componentUUID) = 0; - -}; - -template <> struct InterfaceTraits -{ - static constexpr const char * UUID = "5FE6CCDF-2938-41C7-83F4-43C773AF0B05"; - static constexpr const char * NAME = "XPCF::IModuleManager"; - static constexpr const char * DESCRIPTION = "Provides module management functionality to introspect module content and component creation from an XPCF module"; - -}; - -/** - * Retrieve the module manager instance. - * @return the smart reference on the ModuleManager interface - */ -XPCF_EXPORT_API SRef getModuleManagerInstance(); - -}}} //namespace org::bcom::xpcf - -#endif diff --git a/interfaces/xpcf/api/IRegistryManager.h b/interfaces/xpcf/api/IRegistryManager.h deleted file mode 100644 index 67276f2..0000000 --- a/interfaces/xpcf/api/IRegistryManager.h +++ /dev/null @@ -1,128 +0,0 @@ -/** - * @copyright Copyright (c) 2021 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2021-09-14 - */ - -#ifndef IREGISTRYMANAGER_H -#define IREGISTRYMANAGER_H - -#include -#include -#include -#include -#include - -namespace org { namespace bcom { namespace xpcf { - -/** - * @class IRegistryManager - * @brief Specifies the IRegistryManager interface. - * - * This interface provides method definitions to handle XPCF registries. - */ -class IRegistryManager : virtual public IComponentIntrospect { -public: - ~IRegistryManager() override = default; - - /** - * Read a module metadata and add the metadata to the componentmanager registry - * @param [in] the module name - * @param [in] the module file path - * @return - */ - virtual XPCFErrorCode loadModuleMetadata(const char* moduleName, - const char* moduleFilePath) = 0; - - /** - * Find module files from a root folder and load each module metadata in XPCF registry - * @param [in] folderPathStr : the root path to search module files' for - * @param [in] bRecurse : indicates to search recursively in subfolder [true] or only in @p folderPathStr [false] - * @return - */ - virtual XPCFErrorCode loadModules(const char* folderPathStr, bool bRecurse = false) = 0; - - /** - * Retrieve every module metadata registered in the ComponentManager - * @return the collection of modules metadata - */ - virtual const IEnumerable> & getModulesMetadata() const = 0; - - /** - * Search a component metadata. - * @param [in] the component UUID to search for - * @throws ComponentNotFoundException - * @return the component metadata for the component UUID provided - */ - virtual SPtr findComponentMetadata(const uuids::uuid & componentUUID) const = 0; - - /** - * Search the module containing the component provided. - * @param [in] the component UUID - * @throws ComponentNotFoundException - * @return the module UUID containing the component provided - */ - virtual uuids::uuid getModuleUUID(const uuids::uuid & componentUUID) const = 0; - - /** - * Search a module metadata. - * @param [in] the module UUID to search for - * @throws ModuleNotFoundException - * @return the module metadata for the module UUID provided - */ - virtual SPtr findModuleMetadata(const uuids::uuid & moduleUUID) const = 0; - - /** - * Retrieve every interface metadata registered in the ComponentManager - * @return the collection of interfaces metadata - */ - virtual const IEnumerable> & getInterfacesMetadata() const = 0; - - /** - * deprecated ?? TODO : check - * @param [in] - * @return - */ - virtual SPtr findInterfaceMetadata(const uuids::uuid & interfaceUUID) const = 0; - - template SPtr findInterfaceMetadata(); - template SPtr findComponentMetadata(); -}; - -template SPtr IRegistryManager::findInterfaceMetadata() -{ - return findInterfaceMetadata( toUUID() ); -} - -template SPtr IRegistryManager::findComponentMetadata() -{ - return findComponentMetadata( toUUID() ); -} - -template <> struct InterfaceTraits -{ - static constexpr const char * UUID = "3AE3A5D2-F200-4078-89EF-5AE1F5EF1A17"; - static constexpr const char * NAME = "XPCF::IRegistryManager"; - static constexpr const char * DESCRIPTION = "RegistryManager interface.\nProvides components/modules registry"; -}; - -}}} - - -#endif // IREGISTRYMANAGER_H diff --git a/interfaces/xpcf/api/InjectableMetadata.h b/interfaces/xpcf/api/InjectableMetadata.h deleted file mode 100644 index 72cc930..0000000 --- a/interfaces/xpcf/api/InjectableMetadata.h +++ /dev/null @@ -1,79 +0,0 @@ -/** - * @copyright Copyright (c) 2019 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2019-06-17 - */ - -#ifndef ORG_BCOM_XPCF_IINJECTABLEMETADATA_H -#define ORG_BCOM_XPCF_IINJECTABLEMETADATA_H - -#include "IComponentIntrospect.h" -#include -#include - -namespace org { namespace bcom { namespace xpcf { - -/** - * @class InjectableMetadata - * @brief Specifies the InjectableMetadata class. - * - * This class provides XPCF injectable metadata informations. - * Informations about the interfaces UUIDs provided by the component can be retrieved with getInterfaces(). - */ -class XPCF_EXPORT_API InjectableMetadata { -public: - InjectableMetadata(const uuids::uuid & serviceUUID, bool optional = false); - InjectableMetadata(const uuids::uuid & serviceUUID, const char * name, bool optional = false); - virtual ~InjectableMetadata(); - bool optional() const; - bool isNamed(); - const char * getName() const; - const uuids::uuid & getUuid() const ; - -private: - class InjectableMetadataImpl; - UniqueRef m_pimpl; -}; - - -/** - * @class Injector - * @brief Specifies the Injector class. - * - */ -class XPCF_EXPORT_API Injector : public InjectableMetadata { -public: - Injector( const std::function)> & injector, uuids::uuid serviceUUID, bool optional = false); - Injector( const std::function)> & injector, uuids::uuid serviceUUID, const char * name, bool optional = false); - Injector( const std::function>>)> & injector, uuids::uuid serviceUUID, bool optional = false); - Injector( const std::function>>)> & injector, uuids::uuid serviceUUID, const char * name, bool optional = false); - virtual ~Injector() override; - void inject(SRef instance); - void inject(SRef>> instance); - bool isMulti(); - - -private: - class InjectorImpl; - UniqueRef m_pimpl; -}; - -}}} - -#endif // ORG_BCOM_XPCF_IINJECTABLEMETADATA_H diff --git a/interfaces/xpcf/api/InterfaceMetadata.h b/interfaces/xpcf/api/InterfaceMetadata.h deleted file mode 100644 index cc4d8c2..0000000 --- a/interfaces/xpcf/api/InterfaceMetadata.h +++ /dev/null @@ -1,79 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-04-28 - */ - -#ifndef ORG_BCOM_XPCF_INTERFACEMETADATA_H -#define ORG_BCOM_XPCF_INTERFACEMETADATA_H - -#include "xpcf/core/uuid.h" -#include "xpcf/xpcf_api_define.h" -#include "xpcf/core/refs.h" -#include "xpcf/core/traits.h" - -namespace org { namespace bcom { namespace xpcf { - -class XPCF_EXPORT_API InterfaceMetadata { -public: - InterfaceMetadata() = delete; - InterfaceMetadata(const InterfaceMetadata & other); - InterfaceMetadata(InterfaceMetadata && other); - InterfaceMetadata(const char * name, const uuids::uuid& interfaceUUID, const char * description); - InterfaceMetadata(const char * name, const char * interfaceUUID, const char * description); - virtual ~InterfaceMetadata(); - const char * name() const; - const char * description() const; - uuids::uuid getUUID() const; - - InterfaceMetadata & operator=(const InterfaceMetadata & other); - InterfaceMetadata & operator=(InterfaceMetadata && other); - bool operator==(const InterfaceMetadata & other); - -private: - class InterfaceMetadataImpl; - UniqueRef m_pimpl; -}; - - -template -struct inferTrait -{ -}; - -template -struct inferTrait -{ - typedef InterfaceTraits InnerType; -}; - -template ::InnerType> -M to_metadata() -{ - static_assert(is_interface::value || is_component::value, - "Type passed to to_metadata is not an interface neither a component" - "or Traits not defined !!"); - return M( T::NAME, toUUID(), T::DESCRIPTION); -} - - - -}}} //namespace org::bcom::xpcf - -#endif diff --git a/interfaces/xpcf/api/InterfaceTraits.h b/interfaces/xpcf/api/InterfaceTraits.h deleted file mode 100644 index b936cbc..0000000 --- a/interfaces/xpcf/api/InterfaceTraits.h +++ /dev/null @@ -1,54 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-12-10 - */ - -#ifndef ORG_BCOM_XPCF_INTERFACETRAITS_H -#define ORG_BCOM_XPCF_INTERFACETRAITS_H - -namespace org { namespace bcom { namespace xpcf { - -/** - * @class InterfaceTraits - * @brief Specifies the InterfaceTraits template class. - * - * This template class must be used to describe an XPCF interface. - * A class "ISrv" is considered to be an XPCF interface when it implements IComponentIntrospect - * and it instantiates the InterfaceTraits class. - * It is mandatory to have a newly and unique generated UUID for each interface. - */ -template -struct InterfaceTraits -{ - static constexpr const char * UUID = nullptr; - static constexpr const char * NAME = nullptr; - static constexpr const char * DESCRIPTION = nullptr; -}; - -template -struct is_interface -{ - static const bool value = (InterfaceTraits::UUID != nullptr); -}; - -}}} - - -#endif // INTERFACETRAITS_H diff --git a/interfaces/xpcf/api/ModuleMetadata.h b/interfaces/xpcf/api/ModuleMetadata.h deleted file mode 100644 index 0097532..0000000 --- a/interfaces/xpcf/api/ModuleMetadata.h +++ /dev/null @@ -1,69 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-04-28 - */ - -#ifndef ORG_BCOM_XPCF_MODULEMETADATA_H -#define ORG_BCOM_XPCF_MODULEMETADATA_H - -#include "xpcf/module/IModuleIndex.h" -#include "xpcf/api/InterfaceMetadata.h" - -#include -#include -#include - -namespace org { namespace bcom { namespace xpcf { - -/** - * @class ModuleMetadata - * @brief Specifies the ModuleMetadata class. - * - * This class provides XPCF module metadata informations. - * A module contains components implementing one or several XPCF interfaces. - * Informations about the components hosted in the module can be retrieved with getComponentMetadata(). - */ -class XPCF_EXPORT_API ModuleMetadata : public InterfaceMetadata, public IModuleIndex -{ -public: - ModuleMetadata() = delete; - ModuleMetadata(const char* name, const uuids::uuid& moduleID, const char * description, const char *modulePath); - ModuleMetadata(const char* name, const char *moduleID, const char * description, const char *modulePath); - virtual ~ModuleMetadata() override; - - void addComponent(SPtr componentInfo); - void removeComponent(const uuids::uuid & componentUUID); - const char * getPath() const; - const char * getFullPath() const; - - const IEnumerable & getComponents() const override; - const IEnumerable> & getComponentsMetadata() const override; - SPtr getComponentMetadata(const uuids::uuid & componentUUID) const override; - void declareComponent(const char * uuid, const char * name, const char * description) override; - -private: - void setPath(const char* modulePath); - class ModuleMetadataImpl; - UniqueRef m_pimpl; -}; - -}}} //namespace org::bcom::xpcf - -#endif diff --git a/interfaces/xpcf/collection/BlockEnumerator.h b/interfaces/xpcf/collection/BlockEnumerator.h deleted file mode 100644 index b33ac78..0000000 --- a/interfaces/xpcf/collection/BlockEnumerator.h +++ /dev/null @@ -1,118 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-12-11 - */ - -#ifndef ORG_BCOM_XPCF_BlockEnumerator_H -#define ORG_BCOM_XPCF_BlockEnumerator_H - -#include "Enumerator.h" - -namespace org { namespace bcom { namespace xpcf { - -template class S> -class BlockEnumerator : public Enumerator { -public: - static_assert(std::is_same>, std::vector>>::value || - std::is_same>, std::deque>>::value, - "Sequence type not allowed for BlockEnumerator"); - BlockEnumerator() = delete; - BlockEnumerator(S> & seq, uint32_t offset, uint32_t size); - ~BlockEnumerator() override = default; - void reset() override; - -private: - int64_t computeSize() override; - using Enumerator::m_sequence; - using Enumerator::m_index; - using Enumerator::m_endReached; - uint32_t m_offset = 0; - uint32_t m_size; -}; - -template class S> -BlockEnumerator::BlockEnumerator(S> & seq, uint32_t offset, uint32_t chunkSize):Enumerator(seq),m_offset(offset) -{ - m_size = m_offset + chunkSize; - if (m_sequence.size() < m_size) { - throw std::out_of_range("offset + size > sequence size"); - } - m_index = m_offset - static_cast(1); -} - -template class S> -inline int64_t BlockEnumerator::computeSize() -{ - return static_cast(m_size); -} - - -template class S> -inline void BlockEnumerator::reset() { - m_endReached = false; - m_index = m_offset - static_cast(1); -} - - -template class S> -class BlockEnumerator : public Enumerator { -public: - static_assert(std::is_same>, std::vector>>::value || - std::is_same>, std::deque>>::value, - "Sequence type not allowed for BlockEnumerator"); - BlockEnumerator() = delete; - BlockEnumerator(S> & seq, uint32_t offset, uint32_t size); - ~BlockEnumerator() override = default; - void reset() override; - -private: - int64_t computeSize() override; - using Enumerator::m_sequence; - using Enumerator::m_index; - using Enumerator::m_endReached; - uint32_t m_offset = 0; - uint32_t m_size; -}; - -template class S> -BlockEnumerator::BlockEnumerator(S> & seq, uint32_t offset, uint32_t chunkSize):Enumerator(seq),m_offset(offset) -{ - m_size = m_offset + chunkSize; - if (m_sequence.size() < m_size) { - throw std::out_of_range("offset + size > sequence size"); - } - m_index = m_offset - static_cast(1); -} - -template class S> -inline int64_t BlockEnumerator::computeSize() -{ - return static_cast(m_size); -} - -template class S> -inline void BlockEnumerator::reset() { - m_endReached = false; - m_index = m_offset - static_cast(1); -} - -}}} - -#endif diff --git a/interfaces/xpcf/collection/Collection.h b/interfaces/xpcf/collection/Collection.h deleted file mode 100644 index 18567e0..0000000 --- a/interfaces/xpcf/collection/Collection.h +++ /dev/null @@ -1,211 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-12-11 - */ - -#ifndef ORG_BCOM_XPCF_COLLECTION_H -#define ORG_BCOM_XPCF_COLLECTION_H - -#include -#include -#include -#include - -namespace org { namespace bcom { namespace xpcf { - -template class S> -class Collection : public ICollection { -public: - static_assert(std::is_same>, std::vector>>::value || - std::is_same>, std::deque>>::value, - "Sequence type not allowed for Collection"); - Collection() { m_enumerator = unixpcf::make_unique>(m_sequence); } - Collection(const Collection & other) { this->m_sequence = other.m_sequence; } - ~Collection() override = default; - - //ICollection - void add(T value) override; - void clear() override; - bool contains(T value) override; - bool remove(T value) override; - - // IEnumerable - SRef> getEnumerator() const override; - SRef> getEnumerator(uint32_t offset, uint32_t chunkSize) const override; - - template - UniqueRef> getEnumerator() const; - - uint32_t size() const override; - // void unloadComponent() override final; - Collection operator = (Collection collection) { Collection coll; coll.m_sequence = collection.m_sequence; return coll; } - -private: - mutable S> m_sequence; - UniqueRef> m_enumerator; -}; - -template class S> -inline void Collection::add(T value) { - m_sequence.push_back(value); -} - -template class S> -inline void Collection::clear() { m_sequence.clear(); } - -template class S> -inline bool Collection::contains(T value) -{ - return std::find(m_sequence.begin(), m_sequence.end(), value) != m_sequence.end(); -} - -template class S> -inline bool Collection::remove(T value) -{ - if ( !contains(value) ) { - return false; - } - - m_sequence.erase(std::remove(m_sequence.begin(), m_sequence.end(), value), m_sequence.end()); - return true; -} - -template class S> -inline SRef> Collection::getEnumerator() const -{ - return utils::make_shared>(m_sequence); -} - -template class S> -inline SRef> Collection::getEnumerator(uint32_t offset, uint32_t chunkSize) const -{ - return utils::make_shared>(m_sequence,offset,chunkSize); -} - -template class S> -template -inline UniqueRef> Collection::getEnumerator() const -{ - //return unixpcf::make_unique>(m_sequence); - UniqueRef> ref; - Enumerator * penum = new Enumerator(m_sequence); - ref.reset(penum); - return ref; -} - - -template class S> -inline uint32_t Collection::size() const -{ - return m_sequence.size(); -} - -template class S> -class Collection : public ICollection { -public: - static_assert(std::is_same>, std::vector>>::value || - std::is_same>, std::deque>>::value, - "Sequence type not allowed for Collection"); - Collection() { m_enumerator = unixpcf::make_unique>(m_sequence); } - ~Collection() override = default; - - //ICollection - void add(const char * value) override; - void clear() override; - bool contains(const char * value) override; - bool remove(const char * value) override; - - // IEnumerable - SRef> getEnumerator() const override; - SRef> getEnumerator(uint32_t offset, uint32_t chunkSize) const override; - - template - UniqueRef> getEnumerator() const; - - uint32_t size() const override; - // void unloadComponent() override final; - -private: - mutable S> m_sequence; - UniqueRef> m_enumerator; -}; - -template class S> -inline void Collection::add(const char * value) { - m_sequence.push_back(value); -} - -template class S> -inline void Collection::clear() { m_sequence.clear(); } - -template class S> -inline bool Collection::contains(const char * value) -{ - std::string strValue = value; - return std::find(m_sequence.begin(), m_sequence.end(), strValue) != m_sequence.end(); -} - -template class S> -inline bool Collection::remove(const char * value) -{ - if ( !contains(value) ) { - return false; - } - std::string strValue = value; - m_sequence.erase(std::remove(m_sequence.begin(), m_sequence.end(), strValue), m_sequence.end()); - return true; -} - -template class S> -inline SRef> Collection::getEnumerator() const -{ - return utils::make_shared>(m_sequence); -} - -template class S> -inline SRef> Collection::getEnumerator(uint32_t offset, uint32_t chunkSize) const -{ - return utils::make_shared>(m_sequence,offset,chunkSize); -} - -template class S> -template -inline UniqueRef> Collection::getEnumerator() const -{ - //return unixpcf::make_unique>(m_sequence); - UniqueRef> ref; - Enumerator * penum = new Enumerator(m_sequence); - ref.reset(penum); - return ref; -} - -template class S> -inline uint32_t Collection::size() const -{ - return m_sequence.size(); -} - -template -using VectorCollection = Collection; - -extern template class Collection; -}}} - -#endif diff --git a/interfaces/xpcf/collection/Enumerator.h b/interfaces/xpcf/collection/Enumerator.h deleted file mode 100644 index 4592a55..0000000 --- a/interfaces/xpcf/collection/Enumerator.h +++ /dev/null @@ -1,164 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-12-11 - */ - -#ifndef ORG_BCOM_XPCF_ENUMERATOR_H -#define ORG_BCOM_XPCF_ENUMERATOR_H - -#include "xpcf/collection/IEnumerator.h" -#include "xpcf/core/refs.h" -#include "xpcf/core/uuid.h" -#include -#include - -namespace org { namespace bcom { namespace xpcf { - -template class S> -class Enumerator : public IEnumerator { -public: - static_assert(std::is_same>, std::vector>>::value || - std::is_same>, std::deque>>::value, - "Sequence type not allowed for Enumerator"); - Enumerator() = delete; - Enumerator(S> & seq); - virtual ~Enumerator() override = default; - bool moveNext() override; - void reset() override; - T current() override; - bool endReached() override; - bool operator ==(IEnumerator & it) const override; - // void unloadComponent() override final; - -protected: - virtual int64_t computeSize(); - S> & m_sequence; - int64_t m_index = -1; - bool m_endReached = false; -}; - -template class S> -Enumerator::Enumerator(S> & seq):m_sequence(seq) -{ -} - -template class S> -inline int64_t Enumerator::computeSize() -{ - return static_cast(m_sequence.size()); -} - -template class S> -inline bool Enumerator::moveNext() { - if (m_index < (computeSize() - 1)) { - m_index++; - return true; - } - m_endReached = true; - return false; -} - -template class S> -inline void Enumerator::reset() { - m_endReached = false; - m_index = -1; -} - -template class S> -inline T Enumerator::current() { return m_sequence.at(m_index) ; } - -template class S> -inline bool Enumerator::endReached() { - return m_endReached; -} -template class S> -bool Enumerator::operator ==(IEnumerator & ) const { -return false; -} - -template class S> -class Enumerator : public IEnumerator { -public: - static_assert(std::is_same>, std::vector>>::value || - std::is_same>, std::deque>>::value, - "Sequence type not allowed for Enumerator"); - Enumerator() = delete; - Enumerator(S> & seq); - ~Enumerator() = default; - bool moveNext() override; - void reset() override; - const char * current() override; - bool endReached() override; - bool operator ==(IEnumerator & it) const override; - // void unloadComponent() override final; - -protected: - int64_t computeSize(); - S> & m_sequence; - int64_t m_index = -1; - bool m_endReached = false; -}; - -/*template -void Enumerator::unloadComponent() { delete this;};*/ -template class S> -Enumerator::Enumerator(S> & seq):m_sequence(seq) -{ -} - -template class S> -inline int64_t Enumerator::computeSize() -{ - return static_cast(m_sequence.size()); -} - -template class S> -inline bool Enumerator::moveNext() { - if (m_index < (computeSize() - 1)) { - m_index++; - return true; - } - m_endReached = true; - return false; -} - -template class S> -inline void Enumerator::reset() { - m_endReached = false; - m_index = -1; -} - -template class S> -inline const char * Enumerator::current() { return m_sequence.at(m_index).c_str() ; } - -template class S> -inline bool Enumerator::endReached() { - return m_endReached; -} - -template class S> -bool Enumerator::operator ==(IEnumerator & it) const { -return false; -} - -}}} - -extern template class org::bcom::xpcf::Enumerator; -#endif diff --git a/interfaces/xpcf/collection/ICollection.h b/interfaces/xpcf/collection/ICollection.h deleted file mode 100644 index 87088e3..0000000 --- a/interfaces/xpcf/collection/ICollection.h +++ /dev/null @@ -1,45 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-12-11 - */ - - -#ifndef ORG_BCOM_XPCF_ICOLLECTION_H -#define ORG_BCOM_XPCF_ICOLLECTION_H - -#include "xpcf/collection/IEnumerable.h" - -namespace org { namespace bcom { namespace xpcf { - -template -class ICollection : virtual public IEnumerable { -public: - virtual ~ICollection() = default; - virtual void add(T value) = 0; - virtual void clear() = 0; - virtual bool contains(T value) = 0; - virtual bool remove(T value) = 0; -}; - -extern template class ICollection; - -}}} - -#endif diff --git a/interfaces/xpcf/collection/IEnumerable.h b/interfaces/xpcf/collection/IEnumerable.h deleted file mode 100644 index 7817738..0000000 --- a/interfaces/xpcf/collection/IEnumerable.h +++ /dev/null @@ -1,71 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-12-11 - */ - - -#ifndef ORG_BCOM_XPCF_IENUMERABLE_H -#define ORG_BCOM_XPCF_IENUMERABLE_H -#include "xpcf/collection/IEnumerator.h" -#include "xpcf/core/refs.h" -#include "xpcf/core/uuid.h" - -namespace org { namespace bcom { namespace xpcf { - -template -class IEnumerable -{ -public: - virtual ~IEnumerable() = default; - virtual SRef> getEnumerator() const = 0; - virtual SRef> getEnumerator(uint32_t offset, uint32_t chunkSize) const = 0; - virtual uint32_t size() const = 0; -}; - - -template -const Iterator begin(const IEnumerable & ref) -{ - return begin(ref.getEnumerator()); -} - -template -const Iterator end(const IEnumerable & ref) -{ - return end(ref.getEnumerator()); -} - -template -Iterator begin(IEnumerable & ref) -{ - return begin(ref.getEnumerator()); -} - -template -Iterator end(IEnumerable & ref) -{ - return end(ref.getEnumerator()); -} - -extern template class IEnumerable; - -}}} - -#endif diff --git a/interfaces/xpcf/collection/IEnumerator.h b/interfaces/xpcf/collection/IEnumerator.h deleted file mode 100644 index 85c4439..0000000 --- a/interfaces/xpcf/collection/IEnumerator.h +++ /dev/null @@ -1,99 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-12-11 - */ - - -#ifndef ORG_BCOM_XPCF_IENUMERATOR_H -#define ORG_BCOM_XPCF_IENUMERATOR_H -#include - -#include "xpcf/core/refs.h" - -namespace org { namespace bcom { namespace xpcf { - -template -class IEnumerator { -public: - virtual ~IEnumerator() = default; - virtual bool moveNext() = 0; - virtual void reset() = 0; - virtual T current() = 0; - virtual bool endReached() = 0; - virtual bool operator ==(IEnumerator & it) const = 0; -}; - -template -class Iterator { -public: - Iterator(SRef> enumerator):m_enumerator(enumerator) {} - Iterator(const Iterator & it) = default; - Iterator(Iterator && it) = default; - Iterator & operator=(const Iterator & other) = default; - Iterator & operator=(Iterator && other) = default; - - using value_type = T; - using difference_type = std::ptrdiff_t; - using iterator_category = std::input_iterator_tag ; - using pointer = T*; - using reference = T&; - - difference_type operator- (Iterator const &rhs) const - { - return 0;//sm_it - rhs.m_it; - } - - inline bool operator !=(const Iterator & ) { - return !m_enumerator->endReached(); - } - - inline bool operator ==(const Iterator & it) { - return m_enumerator == it.m_enumerator; - } - - inline T operator*() { - return m_enumerator->current(); - } - - inline void operator++() { - m_enumerator->moveNext(); - } - -private: - SRef> m_enumerator; -}; - -template -Iterator begin(SRef> ref) -{ - ref->reset(); - ref->moveNext(); - return Iterator(ref); -} - -template -Iterator end(SRef> ref) -{ - return Iterator(ref); -} - -}}} - -#endif diff --git a/interfaces/xpcf/component/ComponentBase.h b/interfaces/xpcf/component/ComponentBase.h deleted file mode 100644 index 5013a98..0000000 --- a/interfaces/xpcf/component/ComponentBase.h +++ /dev/null @@ -1,192 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-04-28 - */ - -#ifndef ORG_BCOM_XPCF_COMPONENTBASE_H -#define ORG_BCOM_XPCF_COMPONENTBASE_H - -#include "xpcf/component/ComponentFactory.h" -#include "xpcf/api/IInjectable.h" -#include "xpcf/xpcf_api_define.h" -#include -#include -#include - -namespace org { namespace bcom { namespace xpcf { - -class XPCF_EXPORT_API ComponentBase : virtual public IInjectable -{ - // friend class ComponentFactory; -public: - ComponentBase() = delete; - ComponentBase(const uuids::uuid & uuid); - ComponentBase(std::map componentTrait); - virtual ~ComponentBase() override; - - const uuids::uuid & getUUID() const { return m_UUID; } - - // IComponentIntrospect - uint32_t getNbInterfaces() const final; - const IEnumerable & getInterfaces() const final; - //IInjectable - const IEnumerable> & getInjectables() const override; - - const char* getDescription(const uuids::uuid& interfaceUUID) const final; - const InterfaceMetadata & getMetadata(const uuids::uuid& interfaceUUID) const final; - - virtual void onInjected() override; - // It is the component that decides if it must or must not unload when all - // refs are out - virtual void unloadComponent() = 0; - - -protected: - template -#ifndef SWIG - [[deprecated]] -#endif - void addInterface(T* componentThis); - - /** - * - * @param [in] - * @param [in] - * @return - */ - template void declareInterface(T* componentThis); - - /** - * - * @param [in] - * @param [in] - * @return - * @throws InjectableDeclarationException when another injectable has already been declared for I - */ - template void declareInjectable(SRef & injectable, bool optional = false); - - /** - * - * @param [in] - * @param [in] - * @return - * @throws InjectableDeclarationException when another injectable has already been declared for {I, name} - */ - template void declareInjectable(SRef & injectable, const char * name, bool optional = false); - - template void declareInjectable(SRef>> & injectable, bool optional = false); - -private: - SRef introspect() final; - void addComponentRef() final; - void releaseComponentRef() final; - void declareInterface(const uuids::uuid& interfaceUUID, utils::any componentThis, const char * name, const char * description); - void declareInjectable(const uuids::uuid& interfaceUUID, utils::any injectable, const std::function)> & injector, const char * instanceName, bool optional = false); - void declareInjectable(const uuids::uuid& interfaceUUID, utils::any injectable, const std::function)> & injector, bool optional = false); - void declareMultiInjectable(const uuids::uuid& interfaceUUID, utils::any injectable, const std::function>>)> & injector, bool optional = false); - utils::any queryInterface(const uuids::uuid& interfaceUUID) const final; - utils::any retrieveInjectable(const uuids::uuid & interfaceUUID) const final; - utils::any retrieveInjectable(const uuids::uuid & interfaceUUID, const char * instanceName) const final; - utils::any retrieveMultiInjectable(const uuids::uuid & interfaceUUID) final; - bool injectExists(const uuids::uuid & interfaceUUID) const final; - bool injectExists(const uuids::uuid & interfaceUUID, const char * name) const final; - - bool implements(const uuids::uuid& interfaceUUID) const final; - - class InternalImpl; - UniqueRef m_pimpl; - - std::map m_componentTrait; - - const uuids::uuid m_UUID; - uint32_t m_usageRefCount; -}; - - -template -void ComponentBase::declareInterface(T* componentThis) -{ - static_assert(is_interface::value, - "Type passed to addInterface is not an interface " - "or InterfaceTraits not defined !!"); - - static_assert(utils::is_base_of::value, - "Interface type passed to addInterface is not a derived class of IComponentIntrospect !!"); - - uuids::uuid interfaceId = toUUID(); - declareInterface(interfaceId, componentThis, InterfaceTraits::NAME, InterfaceTraits::DESCRIPTION); -} - -template -void ComponentBase::addInterface(T* componentThis) -{ - declareInterface(componentThis); -} - - -template -void ComponentBase::declareInjectable(SRef & injectable, bool optional) -{ - static_assert(is_interface::value, - "Type passed to declareInjectable is not an interface " - "or InterfaceTraits not defined !!"); - - static_assert(utils::is_base_of::value, - "Interface type passed to declareInjectable is not a derived class of IComponentIntrospect !!"); - uuids::uuid interfaceId = toUUID(); - std::function)> injector = [this] (SRef instance) { inject(instance); }; - declareInjectable(interfaceId, &injectable, injector, optional); -} - -template -void ComponentBase::declareInjectable(SRef>> & injectable, bool optional) -{ - static_assert(is_interface::value, - "Type passed to declareInjectable is not an interface " - "or InterfaceTraits not defined !!"); - - static_assert(utils::is_base_of::value, - "Interface type passed to declareInjectable is not a derived class of IComponentIntrospect !!"); - uuids::uuid interfaceId = toUUID(); - injectable = utils::make_shared>>(); - std::function>>)> injector = [this] (SRef>> instance) { inject(instance); }; - declareMultiInjectable(interfaceId, injectable, injector, optional); -} - - -template -void ComponentBase::declareInjectable(SRef & injectable, const char * instanceName, bool optional) -{ - static_assert(is_interface::value, - "Type passed to declareInjectable is not an interface " - "or InterfaceTraits not defined !!"); - - static_assert(utils::is_base_of::value, - "Interface type passed to declareInjectable is not a derived class of IComponentIntrospect !!"); - uuids::uuid interfaceId = toUUID(); - const std::string name(instanceName); - std::function)> injector = [this, name] (SRef instance) { - inject(instance, name.c_str()); }; - declareInjectable(interfaceId, &injectable, injector, instanceName, optional); -} - -}}} //namespace org::bcom::xpcf - -#endif diff --git a/interfaces/xpcf/component/ComponentFactory.h b/interfaces/xpcf/component/ComponentFactory.h deleted file mode 100644 index c8e4348..0000000 --- a/interfaces/xpcf/component/ComponentFactory.h +++ /dev/null @@ -1,120 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-04-28 - */ - -#ifndef ORG_BCOM_XPCF_COMPONENTFACTORY_H -#define ORG_BCOM_XPCF_COMPONENTFACTORY_H - -#include "xpcf/api/IComponentIntrospect.h" -// NOTE : ALL COMPONENTS MUST THROW EXCEPTIONS DERIVED from std::exception, -// in order to be able to catch all exceptions in a uniform way - -namespace org { namespace bcom { namespace xpcf { - -// Other shared rI counting solution : -// Add virtual release method upon interface, -// for each shared returned provide this method as custom deleter -// Increment count for each shared (rI or concrete) returned -// decrement count foreach release call -// inside concrete release impl, delete this when count == 0 from Unload() - -/** @class ComponentFactory -* @brief Specifies the ComponentFactory class. -* -* This class provides factory method definitions to handle component creation. -* The ComponentFactory class is a friend class of IComponentIntrospect interface - */ - -class ComponentFactory { -public: - /** - * Creates a component of type C. C must be an IComponentIntrospect derived class. - * C must meet the is_class requirement from std::type_traits library. - * @param [inout] an empty IComponentIntrospect smart reference that will be initialized - * with the component created - * @throws - * @return FAILS when T doesn't fulfill req ? - */ - template static SRef create(); - - /** - * Delegates a T component creation. - * This method MUST BE specialized for the concrete T component type - i.e. it must be specialized - * in the component implementation. - * This mechanism insures that component allocation takes place in the same translation unit where - * deallocation will occur. - * @return a pointer on the component created - */ - template static T* createInstance(); -}; - -//can throw std::bad_alloc -template -SRef ComponentFactory::create() -{ - static_assert(utils::is_base_of::value, - "Type passed to createComponent is not a derived class of IComponentIntrospect !!"); - - C* component = ComponentFactory::createInstance(); - return IComponentIntrospect::acquireComponentRef(component); -} - - -template -T* ComponentFactory::createInstance() -{ - static_assert (utils::is_default_constructible::value,"Type passed to createInstance is not default constructible" ); - return new T(); -} - -#if _WIN32 -// XPCF_MODULEHOOKS_API is always defined as __declspec(dllexport) : -// the macro is included as part of the client module, -// those methods are not intended to be imported at link phase, -// only dynamically binded through dlopen/LoadLibrary mechanisms -#define XPCF_MODULEHOOKS_API __declspec(dllexport) -#else -#define XPCF_MODULEHOOKS_API -#endif - -/** - * Default definition for ComponentFactory::createInstance. - * This definition provides the dynamic creation of the component instance. - * If the component must provide a different strategy, specialize the - * ComponentFactory::createInstance method and override ComponentBase::unloadComponent - * directly inside the component body - * This macro must be used inside the component body (i.e. the .cpp file), to insure the respect - * of the ODR rule. - * Moreover the creation must occur inside the translation unit of the component. - * - * @param fullComponentType the full component type, for instance namespace::componentClass - * @return the pointer on the new object created - */ -#define XPCF_DEFINE_FACTORY_CREATE_INSTANCE(fullComponentType) \ -template<> fullComponentType* org::bcom::xpcf::ComponentFactory::createInstance(); \ -void fullComponentType::unloadComponent () \ -{\ - delete this; \ -} - -}}} //namespace org::bcom::xpcf - -#endif diff --git a/interfaces/xpcf/component/ComponentTraits.h b/interfaces/xpcf/component/ComponentTraits.h deleted file mode 100644 index a472206..0000000 --- a/interfaces/xpcf/component/ComponentTraits.h +++ /dev/null @@ -1,53 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-12-10 - */ - -#ifndef ORG_BCOM_XPCF_COMPONENTTRAITS_H -#define ORG_BCOM_XPCF_COMPONENTTRAITS_H - -namespace org { namespace bcom { namespace xpcf { - -/** - * @class ComponentTraits - * @brief Specifies the ComponentTraits template class. - * - * This template class must be used to describe an XPCF component. - * A class "SrvComponent" is considered to be an XPCF component when it inherits ComponentBase or ConfigurableBase - * and it instantiates the ComponentTraits class. - * It is mandatory to have a newly and unique generated UUID for each component. - */ -template -struct ComponentTraits -{ - static constexpr const char * UUID = nullptr; - static constexpr const char * NAME = nullptr; - static constexpr const char * DESCRIPTION = nullptr; -}; - -template -struct is_component -{ - static const bool value = (ComponentTraits::UUID != nullptr); -}; - -}}} - -#endif // COMPONENTTRAITS_H diff --git a/interfaces/xpcf/component/ConfigurableBase.h b/interfaces/xpcf/component/ConfigurableBase.h deleted file mode 100644 index e645521..0000000 --- a/interfaces/xpcf/component/ConfigurableBase.h +++ /dev/null @@ -1,118 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-04-28 - */ - -#ifndef ORG_BCOM_XPCF_ConfigurableBase_H -#define ORG_BCOM_XPCF_ConfigurableBase_H - -#include "xpcf/api/IConfigurable.h" -#include "xpcf/component/ComponentBase.h" - -namespace org { namespace bcom { namespace xpcf { - -class XPCF_EXPORT_API ConfigurableBase : public ComponentBase, - virtual public IConfigurable -{ -public: - ConfigurableBase() = delete; - ConfigurableBase(const uuids::uuid & uuid, const SRef configuration = nullptr); - ConfigurableBase(std::map componentTrait, const SRef configuration = nullptr); - virtual ~ConfigurableBase() override; - - // It is the component that decides if it must or must not unload when all - // refs are out - virtual void unloadComponent() override = 0; - - // IConfigurable - XPCFErrorCode configure(const char * filepath) final; - XPCFErrorCode configure(const char * filepath, const char * xpath) final; - inline virtual XPCFErrorCode onConfigured() override { return XPCFErrorCode::_SUCCESS; } - XPCFErrorCode serialize(const char * filepath, uint32_t mode) final; - SRef getPropertyRootNode() const final; - SRef getProperty(const char * name) const final; - IEnumerable> & getProperties() const final; - SRef>> getPropertiesEnumerator() const final; - bool hasProperties() const final; - - virtual void onInjected() override; - -protected: - XPCFErrorCode addProperty(SRef property) override final; - void declarePropertyNode(const char * name, SRef & wrappedValue, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT) override final; - template - XPCFErrorCode declareProperty(const char * name, T & wrappedValue, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT); - - template class Sequence, typename T> - XPCFErrorCode declarePropertySequence(const char * name, Sequence> & wrappedValue, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT); - - template - XPCFErrorCode declareProperty(SRef node, const char * name, T & wrappedValue, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT); - - template class Sequence, typename T> - XPCFErrorCode declarePropertySequence(SRef node, const char * name, Sequence> & wrappedValue, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT); - - -private: - class InternalImpl; - UniqueRef m_internalImpl; -}; - -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declareProperty(const char * name, uint32_t & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declareProperty(const char * name, int32_t & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declareProperty(const char * name, uint64_t & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declareProperty(const char * name, int64_t & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declareProperty(const char * name, float & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declareProperty(const char * name, double & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declareProperty(const char * name, std::string & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declareProperty(const char * name, std::wstring & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declareProperty>(const char * name, SRef & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declarePropertySequence(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declarePropertySequence(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declarePropertySequence(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declarePropertySequence(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declarePropertySequence(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declarePropertySequence(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declarePropertySequence(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declarePropertySequence(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declarePropertySequence>(const char * name, std::vector> & wrappedValue, IProperty::AccessSpecifier iotype); - -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declareProperty(SRef node, const char * name, uint32_t & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declareProperty(SRef node, const char * name, int32_t & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declareProperty(SRef node, const char * name, uint64_t & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declareProperty(SRef node, const char * name, int64_t & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declareProperty(SRef node, const char * name, float & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declareProperty(SRef node, const char * name, double & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declareProperty(SRef node, const char * name, std::string & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declareProperty(SRef node, const char * name, std::wstring & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declareProperty>(SRef node, const char * name, SRef & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declarePropertySequence(SRef node, const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declarePropertySequence(SRef node, const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declarePropertySequence(SRef node, const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declarePropertySequence(SRef node, const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declarePropertySequence(SRef node, const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declarePropertySequence(SRef node, const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declarePropertySequence(SRef node, const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declarePropertySequence(SRef node, const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -extern template XPCF_EXPORT_API XPCFErrorCode ConfigurableBase::declarePropertySequence>(SRef node, const char * name, std::vector> & wrappedValue, IProperty::AccessSpecifier iotype); - -}}} //namespace org::bcom::xpcf - -#endif diff --git a/interfaces/xpcf/core/BaseException.h b/interfaces/xpcf/core/BaseException.h deleted file mode 100644 index 6c88a4f..0000000 --- a/interfaces/xpcf/core/BaseException.h +++ /dev/null @@ -1,88 +0,0 @@ -#ifndef ORG_BCOM_XPCF_BASEEXCEPTION_H -#define ORG_BCOM_XPCF_BASEEXCEPTION_H - -#include "xpcf/xpcf_api_define.h" -#include "xpcf/core/XPCFErrorCode.h" - -#include -#include -#include - -namespace org { namespace bcom { namespace xpcf { - -// the base xpcf exception can serve as a base that holds also an error code. -// It allows to create a Facade interface that return an error code from an underlying exception (for example a C ABI facade). -class XPCF_EXPORT_API Exception : public std::runtime_error { -public: - Exception(XPCFErrorCode errCode); - Exception(const char * what, XPCFErrorCode errCode = XPCFErrorCode::_FAIL); - Exception(const std::string & what, XPCFErrorCode errCode = XPCFErrorCode::_FAIL); - virtual ~Exception(); - - inline XPCFErrorCode getErrorCode() const { - return m_errCode; - } - -private: - XPCFErrorCode m_errCode; -}; - -class XPCF_EXPORT_API ConfigurationException : public Exception { -public: - ConfigurationException(XPCFErrorCode errCode); - ConfigurationException(const char * what, XPCFErrorCode errCode = XPCFErrorCode::_FAIL); - ConfigurationException(const std::string & what, XPCFErrorCode errCode = XPCFErrorCode::_FAIL); - virtual ~ConfigurationException() = default; -}; - -class XPCF_EXPORT_API AccessDeniedException : public Exception { -public: - AccessDeniedException(); - AccessDeniedException(const char * what); - AccessDeniedException(const std::string & what); - virtual ~AccessDeniedException() = default; -}; - -class XPCF_EXPORT_API IllegalStateException : public Exception { -public: - IllegalStateException(); - IllegalStateException(const char * what); - IllegalStateException(const std::string & what); - virtual ~IllegalStateException() = default; -}; - -class XPCF_EXPORT_API NotImplementedException : public Exception { -public: - NotImplementedException(); - NotImplementedException(const char * what); - NotImplementedException(const std::string & what); - virtual ~NotImplementedException() = default; -}; - -class XPCF_EXPORT_API NullPointerException : public Exception { -public: - NullPointerException(); - NullPointerException(const char * what); - NullPointerException(const std::string & what); - virtual ~NullPointerException() = default; -}; - -class XPCF_EXPORT_API TimeoutException : public Exception { -public: - TimeoutException(); - TimeoutException(const char * what); - TimeoutException(const std::string & what); - virtual ~TimeoutException() = default; -}; - -class XPCF_EXPORT_API RemotingException : public Exception { -public: - RemotingException(const std::string & componentName, const std::string & rpcName, uint32_t status = 0); - RemotingException(const char * what); - RemotingException(const std::string & what); - virtual ~RemotingException() = default; -}; - -}}} - -#endif diff --git a/interfaces/xpcf/core/ErrorMessage.h b/interfaces/xpcf/core/ErrorMessage.h deleted file mode 100644 index 4c242dc..0000000 --- a/interfaces/xpcf/core/ErrorMessage.h +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @copyright Copyright (c) 2023 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Adrien Schadle - * - * @file - * @brief description of file - * @date 2023-03-30 - */ - -#ifndef ORG_BCOM_XPCF_ERROR_MESSAGE_H -#define ORG_BCOM_XPCF_ERROR_MESSAGE_H - -#include -#include - -namespace org { namespace bcom { namespace xpcf { - -/** - * @class XmlErrorMessage - * @brief Specifies messages for xml error. - */ -class XmlErrorMessage { -public: - XmlErrorMessage(std::string tag, std::string whatError, bool subElementError); - - ~XmlErrorMessage(); - - // Add Xml attributes of the tag - void addAttribute(std::string name, std::string value); - - // Write error message into a string - std::string write(); -private: - std::string _tag; - - std::string _whatError; - - bool _subElementError; - - std::vector> _tagAttributes; -}; - -}}} - - -#endif diff --git a/interfaces/xpcf/core/Exception.h b/interfaces/xpcf/core/Exception.h deleted file mode 100644 index fb62ee3..0000000 --- a/interfaces/xpcf/core/Exception.h +++ /dev/null @@ -1,77 +0,0 @@ -#ifndef ORG_BCOM_XPCF_EXCEPTION_H -#define ORG_BCOM_XPCF_EXCEPTION_H - -#include "xpcf/core/BaseException.h" -#include "xpcf/core/uuid.h" -#include "xpcf/api/InjectableMetadata.h" - -namespace org { namespace bcom { namespace xpcf { - -class XPCF_EXPORT_API UUIDNotFoundException : public Exception { -protected: - UUIDNotFoundException(const uuids::uuid & uuid); - UUIDNotFoundException(const char * what, XPCFErrorCode errCode = XPCFErrorCode::_FAIL); - UUIDNotFoundException(const std::string & what, XPCFErrorCode errCode = XPCFErrorCode::_FAIL); - virtual ~UUIDNotFoundException() = default; -}; - -class XPCF_EXPORT_API ComponentNotFoundException : public UUIDNotFoundException { -public: - ComponentNotFoundException(const uuids::uuid & componentUUID); - ComponentNotFoundException(const char * what); - ComponentNotFoundException(const std::string & what); - virtual ~ComponentNotFoundException() = default; -}; - -class XPCF_EXPORT_API InterfaceNotImplementedException : public Exception { -public: - InterfaceNotImplementedException(const uuids::uuid & componentUUID, const uuids::uuid & interfaceUUID); - InterfaceNotImplementedException(const char * what); - InterfaceNotImplementedException(const std::string & what); - virtual ~InterfaceNotImplementedException() = default; -}; - -// TODO : provide modulemetadata to exception ??? -class XPCF_EXPORT_API ModuleException : public Exception { -public: - ModuleException(); - ModuleException(const char * what, XPCFErrorCode errCode = XPCFErrorCode::_FAIL); - ModuleException(const std::string & what, XPCFErrorCode errCode = XPCFErrorCode::_FAIL); - virtual ~ModuleException() = default; -}; - -class XPCF_EXPORT_API ModuleNotFoundException : public UUIDNotFoundException { -public: - ModuleNotFoundException(const uuids::uuid & moduleUUID); - ModuleNotFoundException(const char * what); - ModuleNotFoundException(const std::string & what); - virtual ~ModuleNotFoundException() = default; -}; - -class XPCF_EXPORT_API InjectionException : public UUIDNotFoundException { -public: - InjectionException(const SRef injectableInfo, XPCFErrorCode errCode = XPCFErrorCode::_ERROR_INJECTION_FAILED, const char * what = "" ); - InjectionException(const char * what, XPCFErrorCode errCode = XPCFErrorCode::_FAIL); - InjectionException(const std::string & what, XPCFErrorCode errCode = XPCFErrorCode::_FAIL); - virtual ~InjectionException() = default; -}; - -class XPCF_EXPORT_API InjectableNotFoundException : public InjectionException { -public: - InjectableNotFoundException(const SRef injectableInfo); - InjectableNotFoundException(const char * what); - InjectableNotFoundException(const std::string & what); - virtual ~InjectableNotFoundException() = default; -}; - -class XPCF_EXPORT_API InjectableDeclarationException : public InjectionException { -public: - InjectableDeclarationException(const SRef injectableInfo); - InjectableDeclarationException(const char * what); - InjectableDeclarationException(const std::string & what); - virtual ~InjectableDeclarationException() = default; -}; - -}}} - -#endif diff --git a/interfaces/xpcf/core/Result.h b/interfaces/xpcf/core/Result.h deleted file mode 100644 index 8406403..0000000 --- a/interfaces/xpcf/core/Result.h +++ /dev/null @@ -1,76 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-12-05 - */ - -#ifndef ORG_BCOM_XPCF_RESULT_H -#define ORG_BCOM_XPCF_RESULT_H - - -#include "xpcf/core/XPCFErrorCode.h" - -#include - -namespace org { namespace bcom { namespace xpcf { - -template bool hasError(E e){}; - -template <> inline bool hasError(XPCFErrorCode e) -{ - if (static_cast(e) < 0) { - return true; - } - return false; -} - -/** - * @brief Specifies the result template class - * @tparam T : the type value the result class will handle - */ -template -class result -{ -public: - result(std::string contextName, E errCode, - std::string message = "FAILED"): m_context(contextName) { setResult(errCode, message); } - result(T value, std::string contextName, E errCode, - std::string message = "FAILED"):m_context(contextName), m_value(value) { setResult(errCode, message); } - ~result() {} - inline bool hasError() const { if (static_cast(m_result.first) < 0) { return true; } return false;} - inline void setValue(T value) { m_value = value; } - inline T getValue() const { return m_value; } - inline E errCode() const { return m_result.first; } - inline void errCode(E err) { m_result.first = err; } - inline std::string errMessage() const { return m_context+ " " +m_result.second; } - inline std::string errContext() const { return m_context; } - inline void errMessage(const std::string & msg) { m_result.second = msg; } - inline void setResult(E err, const std::string & msg) { m_result.second = msg; m_result.first = err; } - inline void setResult(E err, const std::string & msg, T value) { m_result.second = msg; m_result.first = err; m_value = value; } - -private: - std::pair m_result; - std::string m_context; - T m_value; -}; - -}}} - - -#endif diff --git a/interfaces/xpcf/core/XPCFErrorCode.h b/interfaces/xpcf/core/XPCFErrorCode.h deleted file mode 100644 index 7b25a77..0000000 --- a/interfaces/xpcf/core/XPCFErrorCode.h +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-04-28 - */ - -#ifndef ORG_BCOM_XPCF_XPCFERRORCODE_H -#define ORG_BCOM_XPCF_XPCFERRORCODE_H - -namespace org {namespace bcom { namespace xpcf { - -typedef enum { - _SUCCESS = 0, /**< Operation successfull */ - _FAIL = -1, /**< Operation failed */ - _ERROR_INVALID_ARGUMENT = -10, /**< */ - _ERROR_DOMAIN = -11, /**< */ - _ERROR_NOT_IMPLEMENTED = -12, /**< */ - _ERROR_NULL_POINTER = -13, /**< */ - _ERROR_OUT_OF_RANGE = -14, /**< */ - _ERROR_TYPE = -15, /**< */ - _ERROR_OVERFLOW = -20, /**< */ - _ERROR_UNDERFLOW = -21, /**< */ - _ERROR_OUT_OF_MEMORY = -22, /**< */ - _ERROR_RANGE = -23, /**< */ - _ERROR_SYSTEM = -24, /**< */ - _ERROR_UNKNOWN = -25, /**< */ - _ERROR_ACCESS_DENIED = -26, /**< */ - _ERROR_TIMEOUT = -27, /**< */ - _ERROR_ILLEGAL_STATE = -28, /**< */ - _ERROR_COMPONENT_UNKNOWN = -30, - _ERROR_INTERFACE_UNKNOWN = -40, - _ERROR_MODULE_UNKNOWN = -50, - _ERROR_MODULE_MISSINGXPCF_ENTRY = -51, - _ERROR_INJECTION_FAILED = -60, - _ERROR_INJECTABLE_ALREADY_DECLARED = -61, - _ERROR_INJECTABLE_UNKNOWN = -62 , - _ERROR_INJECTABLE_NOBIND = -63, - _ERROR_REMOTING = -70 -} XPCFErrorCode; - -}}} - -#endif //_XPCF_ComDefine_HeaderFile__ diff --git a/interfaces/xpcf/core/helpers.h b/interfaces/xpcf/core/helpers.h deleted file mode 100644 index 8639a01..0000000 --- a/interfaces/xpcf/core/helpers.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef HELPERS_H -#define HELPERS_H - -#include -#include -#include - -#ifndef SWIG -namespace org { namespace bcom { namespace xpcf { - -template < typename Key, typename T> bool mapContains(const std::map & mapContainer, Key k) -{ - if (mapContainer.find(k) != mapContainer.end()) { - return true; - } - return false; -} - -template < typename Key, typename T> bool mapContains(SRef> mapContainer, Key k) -{ - if (mapContainer->find(k) != mapContainer->end()) { - return true; - } - return false; -} - - -class ScopeExit { -public: - ScopeExit(const std::function & f):m_func(f) {} - ~ScopeExit () { - m_func(); - } - -private: - const std::function & m_func; -}; - -}}} -#endif // SWIG - -#ifndef SWIG - #define ATTRIBUTE(X) [[X]] - #define ATTRIB_1ARG(X, ARG) [[X(ARG)]] - #define XPCF_IGNORE [[xpcf::ignore]] - #define XPCF_IN [[xpcf::in]] - #define XPCF_OUT [[xpcf::out]] - #define XPCF_INOUT [[xpcf::inout]] - #define XPCF_CLIENTUUID(uuid_string) [[xpcf::clientUUID(uuid_string)]] - #define XPCF_SERVERUUID(uuid_string) [[xpcf::serverUUID(uuid_string)]] - #define XPCF_GRPC_RPCNAME(rpcNameString) [[grpc::rpcName(rpcNameString)]] - #define XPCF_GRPC_REQUEST(requestNameString) [[grpc::request(requestNameString)]] - #define XPCF_GRPC_RESPONSE(responseNameString) [[grpc::response(responseNameString)]] - #define XPCF_GRPC_STREAMING [[grpc::streaming]] - #define XPCF_GRPC_CLIENT_STREAMING [[grpc::client_streaming]] - #define XPCF_GRPC_SERVER_STREAMING [[grpc::server_streaming]] - #define XPCF_GRPC_CLIENT_RECV_SIZE(size) [[grpc::client_receiveSize(size)]] - #define XPCF_GRPC_CLIENT_SEND_SIZE(size) [[grpc::client_sendSize(size)]] -#else - #define ATTRIBUTE(X) - #define ATTRIB_1ARG(X, ARG) - #define XPCF_IGNORE - #define XPCF_IN - #define XPCF_OUT - #define XPCF_INOUT - #define XPCF_CLIENTUUID(uuid_string) - #define XPCF_SERVERUUID(uuid_string) - #define XPCF_GRPC_RPCNAME(rpcNameString) - #define XPCF_GRPC_REQUEST(requestNameString) - #define XPCF_GRPC_RESPONSE(responseNameString) - #define XPCF_GRPC_STREAMING - #define XPCF_GRPC_CLIENT_STREAMING - #define XPCF_GRPC_SERVER_STREAMING - #define XPCF_GRPC_CLIENT_RECV_SIZE(size) - #define XPCF_GRPC_CLIENT_SEND_SIZE(size) -#endif - -#endif // HELPERS_H diff --git a/interfaces/xpcf/core/refs.h b/interfaces/xpcf/core/refs.h deleted file mode 100644 index 77ef311..0000000 --- a/interfaces/xpcf/core/refs.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef REFS_H -#define REFS_H - -#ifndef ORG_BCOM_XPCF_XPCF_MANAGED_CPP_ENABLED -#ifdef XPCF_USE_BOOST -#include -#include -#include -#include -#include -#include -#include -#include -#include -namespace org {namespace bcom { namespace xpcf { -namespace utils = boost; -namespace unixpcf = boost::movelib; -}}} -#else -#include -#include -#include -#include -namespace org {namespace bcom { namespace xpcf { -namespace utils = std; -namespace unixpcf = std; -}}} -#endif - -#else -//#define SPtr(N) N * -#define SPtr(N) SPtr_##N -#define SRef(N) N * -#endif - -template -using SRef = org::bcom::xpcf::utils::shared_ptr; -template -using SPtr = org::bcom::xpcf::utils::shared_ptr; - -template -using UniqueRef = org::bcom::xpcf::unixpcf::unique_ptr; - -#endif // REFS_H diff --git a/interfaces/xpcf/core/traits.h b/interfaces/xpcf/core/traits.h deleted file mode 100644 index af4fc82..0000000 --- a/interfaces/xpcf/core/traits.h +++ /dev/null @@ -1,93 +0,0 @@ -#ifndef TRAITS_H -#define TRAITS_H - -#include "xpcf/core/uuid.h" -#include "xpcf/api/InterfaceTraits.h" -#include "xpcf/component/ComponentTraits.h" -#include - -namespace org {namespace bcom { namespace xpcf { - -#ifdef XPCF_USE_BOOST -namespace uuids = boost::uuids; -#endif - -template < typename T > -inline uuids::uuid toUUID() -{ - static_assert(is_interface::value || is_component::value, - "Type passed to toUUID is neither a component nor an interface " - "or [Interface/Component]Traits not defined for T !!"); - std::string uuidString; - if (is_interface::value) { - uuidString = InterfaceTraits::UUID; - } - if (is_component::value) { - uuidString = ComponentTraits::UUID; - } - return toUUID(uuidString); -} - -template std::map toMap() { - static_assert(is_interface::value || is_component::value, - "Type passed to toMap is neither a component nor an interface " - "or [Interface/Component]Traits not defined for T !!"); - std::map traitMap; - if (is_interface::value) { - traitMap["UUID"] = InterfaceTraits::UUID; - traitMap["NAME"] = InterfaceTraits::NAME; - traitMap["DESCRIPTION"] = InterfaceTraits::DESCRIPTION; - } - if (is_component::value) { - traitMap["UUID"] = ComponentTraits::UUID; - traitMap["NAME"] = ComponentTraits::NAME; - traitMap["DESCRIPTION"] = ComponentTraits::DESCRIPTION; - } - return traitMap; -} - -struct Traits { - std::string uuid; - std::string name; - std::string description; -}; - -template Traits toStruct() { - static_assert(is_interface::value || is_component::value, - "Type passed to toMap is neither a component nor an interface " - "or [Interface/Component]Traits not defined for T !!"); - Traits traits; - if (is_interface::value) { - traits.uuid = InterfaceTraits::UUID; - traits.name = InterfaceTraits::NAME; - traits.description = InterfaceTraits::DESCRIPTION; - } - if (is_component::value) { - traits.uuid = ComponentTraits::UUID; - traits.name = ComponentTraits::NAME; - traits.description = ComponentTraits::DESCRIPTION; - } - return traits; -} - -}}} - - -#define XPCF_DEFINE_INTERFACE_TRAITS(fullComponentType,uuidString,nameString,descriptionString) \ -template <> struct org::bcom::xpcf::InterfaceTraits \ -{ \ - static constexpr const char * UUID = uuidString; \ - static constexpr const char * NAME = nameString; \ - static constexpr const char * DESCRIPTION = descriptionString; \ -}; - -#define XPCF_DEFINE_COMPONENT_TRAITS(fullComponentType,uuidString,nameString,descriptionString) \ -template <> struct org::bcom::xpcf::ComponentTraits \ -{ \ - static constexpr const char * UUID = uuidString; \ - static constexpr const char * NAME = nameString; \ - static constexpr const char * DESCRIPTION = descriptionString; \ -}; - - -#endif // TRAITS_H diff --git a/interfaces/xpcf/core/uuid.h b/interfaces/xpcf/core/uuid.h deleted file mode 100644 index dd1fad7..0000000 --- a/interfaces/xpcf/core/uuid.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef UUID_H -#define UUID_H - -#ifdef XPCF_USE_BOOST -#include -#include -#include -#else -#include -#endif -#include - -namespace org {namespace bcom { namespace xpcf { - -#ifdef XPCF_USE_BOOST -namespace uuids = boost::uuids; -#else -namespace uuids = ::uuids; -#endif - -inline uuids::uuid toUUID(const char * uuidString) -{ -#ifdef XPCF_USE_BOOST - uuids::string_generator gen; - return gen(uuidString); -#else - return uuids::uuid::from_string(uuidString).value(); -#endif -} - -inline uuids::uuid toUUID(const std::string & uuidString) -{ - return toUUID(uuidString.c_str()); -} - -}}} - -#endif diff --git a/interfaces/xpcf/module/IModuleIndex.h b/interfaces/xpcf/module/IModuleIndex.h deleted file mode 100644 index db533ac..0000000 --- a/interfaces/xpcf/module/IModuleIndex.h +++ /dev/null @@ -1,57 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-04-28 - */ - -#ifndef ORG_BCOM_XPCF_IMODULEINDEX_H -#define ORG_BCOM_XPCF_IMODULEINDEX_H - -#include "xpcf/core/uuid.h" -#include "xpcf/api/ComponentMetadata.h" -#include "xpcf/collection/IEnumerable.h" - -namespace org { namespace bcom { namespace xpcf { - -class IModuleIndex { -public: - virtual ~IModuleIndex() = default; - virtual const IEnumerable & getComponents() const = 0; - virtual const IEnumerable> & getComponentsMetadata() const = 0; - virtual SPtr getComponentMetadata(const uuids::uuid & componentUUID) const = 0; - virtual void declareComponent(const char * uuid, const char * name, const char * description) = 0; - template void declareComponent(); -}; -//todo: add ComponentMetadata from traits and provide getComponentMetadata method -// Remove moduleuuid from CompMdata and configpath -// study moduleuuid binding with componentuuid outside of compmdata ?? -// study method introspection with boost::XXX to generate declarative method description : clang frontend ?? - -template -inline void IModuleIndex::declareComponent() -{ - static_assert(is_component::value, - "Type passed to declareComponent is not a component " - "or componentTraits not defined !!"); - declareComponent(ComponentTraits::UUID, ComponentTraits::NAME, ComponentTraits::DESCRIPTION); -} - -}}} - -#endif diff --git a/interfaces/xpcf/module/ModuleFactory.h b/interfaces/xpcf/module/ModuleFactory.h deleted file mode 100644 index 5a596c6..0000000 --- a/interfaces/xpcf/module/ModuleFactory.h +++ /dev/null @@ -1,105 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-04-28 - */ - -#ifndef ORG_BCOM_XPCF_MODULEFACTORY_H -#define ORG_BCOM_XPCF_MODULEFACTORY_H - -#include "xpcf/core/XPCFErrorCode.h" -#include "xpcf/component/ComponentFactory.h" -#include "xpcf/module/IModuleIndex.h" - -#include - -namespace org { namespace bcom { namespace xpcf { - -#define XPCF_GETCOMPONENT "XPCF_getComponent" -#define XPCF_GETMODULEUUID "XPCF_getModuleUUID" -#define XPCF_GETMODULENAME "XPCF_getModuleName" -#define XPCF_GETMODULEDESCRIPTION "XPCF_getModuleDescription" -#define XPCF_GETMODULEINDEX "XPCF_getModuleIndex" -#define XPCF_GETXPCFVERSION "XPCF_getVersion" - -// getComponent signature is : -// XPCFErrorCode XPCF_getComponent(const uuids::uuid &, SRef&) - -#define EXPORT_XPCF_getModuleUUID_FUNCTION \ -extern "C" XPCF_MODULEHOOKS_API const char * XPCF_getModuleUUID() \ -{ \ - return moduleUUID.c_str(); \ -} - -#define EXPORT_XPCF_getModuleName_FUNCTION \ -extern "C" XPCF_MODULEHOOKS_API const char * XPCF_getModuleName() \ -{ \ - return moduleName.c_str(); \ -} - -#define EXPORT_XPCF_getModuleDescription_FUNCTION \ -extern "C" XPCF_MODULEHOOKS_API const char * XPCF_getModuleDescription() \ -{ \ - return moduleDescription.c_str(); \ -} - -#define EXPORT_XPCF_getVersion_FUNCTION \ -extern "C" XPCF_MODULEHOOKS_API const char * XPCF_getVersion() \ -{ \ - return xpcfVersion.c_str(); \ -} - -#define XPCF_BEGIN_COMPONENTS_DECLARATION \ -extern "C" XPCF_MODULEHOOKS_API \ -void XPCF_getModuleIndex(SRef moduleIndexRef) { - -#define XPCF_ADD_COMPONENT(fullComponentType) \ -moduleIndexRef->declareComponent(); - -#define XPCF_END_COMPONENTS_DECLARATION } - -#define XPCF_DECLARE_MODULE(UUID, name, description) static std::string moduleUUID = UUID; \ - static std::string moduleName = name; \ - static std::string moduleDescription = description; \ - static std::string xpcfVersion = XPCFVERSION; \ - EXPORT_XPCF_getModuleUUID_FUNCTION \ - EXPORT_XPCF_getModuleName_FUNCTION \ - EXPORT_XPCF_getModuleDescription_FUNCTION \ - EXPORT_XPCF_getVersion_FUNCTION - - -template XPCFErrorCode tryCreateComponent(const uuids::uuid& expectedComponentUUID, - SRef& interfaceRef) -{ - XPCFErrorCode result = XPCFErrorCode::_FAIL; - uuids::uuid declaredComponentUUID = toUUID(); - if (expectedComponentUUID == declaredComponentUUID) - { - interfaceRef = ComponentFactory::create(); - if (interfaceRef) { - result = XPCFErrorCode::_SUCCESS; - } - } - return result; -} - - -}}} //namespace org::bcom::xpcf - -#endif diff --git a/interfaces/xpcf/properties/IProperty.h b/interfaces/xpcf/properties/IProperty.h deleted file mode 100644 index 8e562f1..0000000 --- a/interfaces/xpcf/properties/IProperty.h +++ /dev/null @@ -1,336 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-10-27 - */ - -#ifndef ORG_BCOM_XPCF_IPROPERTY_H -#define ORG_BCOM_XPCF_IPROPERTY_H - -#include "xpcf/core/refs.h" -#include "xpcf/core/XPCFErrorCode.h" - -namespace org { namespace bcom { namespace xpcf { - -class IPropertyMap; - -class IProperty { -public: - enum PropertyType { - IProperty_NONE=0, - IProperty_INTEGER, - IProperty_UINTEGER, - IProperty_LONG, - IProperty_ULONG, - IProperty_CHARSTR, - IProperty_UNICODESTR, - IProperty_FLOAT, - IProperty_DOUBLE, - IProperty_STRUCTURE - }; - - typedef enum { - IProperty_IN =0x01, - IProperty_OUT = 0x02, - IProperty_INOUT= 0x04 - } AccessSpecifier; - - virtual ~IProperty() = default; - - /** - * To get the name of the property. - * @return The name of the property. The string must be copied and not deleted by the component user. - * The pointer can be null (i.e. if no name is already specified). - */ - virtual const char* getName () const = 0; - - /** - * To get the type of the property. - * - * @return A value from the enumeration IProperty_PropertyType that correspond to the property's type. - * @par - * These values are: - *
    - *
  • IProperty_INTEGER: for integer value.
  • - *
  • IProperty_UINTEGER: for unsigned integer value.
  • - *
  • IProperty_CHARSTR: for string value.
  • - *
  • IProperty_UNICODESTR: for Unicode string value.
  • - *
  • IProperty_FLOAT: for floating point value.
  • - *
  • IProperty_NONE: default value.
  • - *
  • IProperty_STRUCTURE: a IPropertyMap interface.
  • - *
- */ - virtual IProperty::PropertyType getType () = 0; - - /** - * That method does a copy of the property (property1) - * in the property (property2) referenced by "dest". - * A shallow copy is done. - * The IPropertyMap contained in the source are not explored, - * only their references will be copied in the destination. - * - * @param dest [inout] the caller must provide destination reference. - * @return @b XPCFErrorCode::_FAIL if the copy fails otherwise @b XPCFErrorCode::_SUCCESS. - * @throws std::invalid_argument if "dest" is null. - */ - virtual XPCFErrorCode copyTo (SRef dest) = 0; - - /** - * To set the name of the property. - * @param name This is the name of the property. - * That string is copied and not deleted by the component. - * - * @throws std::invalid_argument if "name" is null. - */ - virtual void setName (const char *name) = 0; - - /** - * To get the number of values that the property contains (the property can be an array). - * At least 1 value is present in the property. - * - * @return The number of values. - */ - virtual uint32_t size () = 0; - - /** - * To set an integer value. The property's type is automatically initialized. - * @param itemIndex the index of the values to retrieve that begin at 0 and end at [size() - 1]. - * @param val The value. - * - */ - virtual void setIntegerValue (int32_t val, uint32_t itemIndex = 0 ) = 0; - - /** - * To set an unsigned integer value. The property's type is automatically initialised. - * @param itemIndex the index of the values to retrieve that begin at 0 and end at [size() - 1]. - * @param val The value. - * - * @throws std::out_of_range if "anIndex" is out of range (See [BASIC_ERROR]). - */ - virtual void setUnsignedIntegerValue (uint32_t val, uint32_t itemIndex = 0 ) = 0; - - /** - * To set an integer value. The property's type is automatically initialized. - * @param itemIndex the index of the values to retrieve that begin at 0 and end at [size() - 1]. - * @param val The value. - * - */ - - virtual void setLongValue (int64_t val, uint32_t itemIndex = 0 ) = 0; - - /** - * To set an unsigned integer value. The property's type is automatically initialised. - * @param itemIndex the index of the values to retrieve that begin at 0 and end at [size() - 1]. - * @param val The value. - * - * @throws std::out_of_range if "anIndex" is out of range (See [BASIC_ERROR]). - */ - virtual void setUnsignedLongValue (uint64_t val, uint32_t itemIndex = 0 ) = 0; - - /** - * To set a float value. The property's type is automatically initialized. - * @param itemIndex the index of the values to retrieve that begin at 0 and end at [size() - 1]. - * @param val The value is a double float. - * - */ - virtual void setFloatingValue (float val, uint32_t itemIndex = 0 ) = 0; - - /** - * To set a double value. The property's type is automatically initialized. - * @param itemIndex the index of the values to retrieve that begin at 0 and end at [size() - 1]. - * @param val The value is a double float. - * - */ - virtual void setDoubleValue (double val, uint32_t itemIndex = 0 ) = 0; - - /** - * To set a string value. The property's type is automatically initialized. The value will be copied. - * @param itemIndex the index of the values to retrieve that begin at 0 and end at [size() - 1]. - * @param val The value is an ASCII string ended by a null character. The string is copied. - * - * @throws std::out_of_range if "anIndex" is out of range (See [BASIC_ERROR]). - * @throws std::invalid_argument if "val" is null. - */ - virtual void setStringValue (const char * val, uint32_t itemIndex = 0 ) = 0; - - /** - * @param itemIndex the index of the values to retrieve that begin at 0 and end at [size() - 1]. - * @param val The value is a Unicode string ended by a null Unicode character. The string is copied. - * - * @throws std::out_of_range if "anIndex" is out of range (See [BASIC_ERROR]). - */ - virtual void setUnicodeStringValue (const wchar_t * val, uint32_t itemIndex = 0 ) = 0; - - - /** - * @param itemIndex the index of the values to retrieve that begin at 0 and end at [size() - 1]. - * @param val The value. The IPropertyMap object is not copied, only the reference on it is copied. - * - * @throws std::out_of_range if "anIndex" is out of range (See [BASIC_ERROR]). - * @throws std::invalid_argument if "val" is null. - */ - virtual void setStructureValue (SRef val, uint32_t itemIndex = 0 ) = 0; - - /** - * - * @param itemIndex the index of the values to retrieve that begin at 0 and end at [size() - 1]. - * - * @return A reference to a IPropertyMap interface. - * @throws std::out_of_range if "anIndex" is out of range (See [BASIC_ERROR]). - */ - virtual SRef getStructureValue (uint32_t itemIndex = 0) const = 0; - - - /** - * To set the name and the number of values that the property contains (the property can be an array). - * At least 1 value is present in the property. That method can be called more than one time. - * The method must resize its collection (array, list or whatever collection). - * The values do not have to be initialised. - * It is the client's responsibility to set a default value for each index. - * @param name This is the name of the property. (ASCII, null terminated, 64 characters maximum) - * @param numberOfValues the number of values. - * @param iotype A value from the enumeration IProperty_AccessSpecifier that corresponds to the - * property's access specifier. - * @par - * These values are: - *
    - *
  • @b IProperty_IN: The user application modifies the value
  • - *
  • @b IProperty_OUT: The interface implementation modifies the value
  • - *
  • @b IProperty_INOUT: The user application and the interface implementation modify the value
  • - *
- * @return - *
    - *
  • @b XPCFErrorCode::_ERROR_OUT_OF_RANGE if the size of "name" is > 64 characters.
  • - *
  • @b XPCFErrorCode::_SUCCESS if no error occurs.
  • - *
  • @b XPCFErrorCode::_FAIL otherwise.
  • - *
- */ - virtual XPCFErrorCode setProperties (const char* name, uint32_t numberOfValues = 1L, IProperty::AccessSpecifier iotype = IProperty_INOUT) = 0; - - /** - * To get an integer value. - * @param itemIndex the index of the values to retrieve that begin at 0 and end at [size() - 1]. - * - * @return An integer value. - * @throws std::out_of_range if "anIndex" is out of range (See [BASIC_ERROR]). - */ - virtual int32_t getIntegerValue (uint32_t itemIndex = 0) const = 0; - - /** - * To get an unsigned integer value. - * @param itemIndex the index of the values to retrieve that begin at 0 and end at [size() - 1]. - * - * @return An unsigned integer value. - * @throws std::out_of_range if "anIndex" is out of range (See [BASIC_ERROR]). - */ - virtual uint32_t getUnsignedIntegerValue (uint32_t itemIndex = 0) const = 0; - - /** - * To get an integer value. - * @param itemIndex the index of the values to retrieve that begin at 0 and end at [size() - 1]. - * - * @return An integer value. - * @throws std::out_of_range if "anIndex" is out of range (See [BASIC_ERROR]). - */ - virtual int64_t getLongValue (uint32_t itemIndex = 0) const = 0; - - /** - * To get an unsigned integer value. - * @param itemIndex the index of the values to retrieve that begin at 0 and end at [size() - 1]. - * - * @return An unsigned integer value. - * @throws std::out_of_range if "anIndex" is out of range (See [BASIC_ERROR]). - */ - virtual uint64_t getUnsignedLongValue (uint32_t) const = 0; - - /** - * To get a string value. The string will be delete when the IProperty will be deleted. - * @param itemIndex the index of the values to retrieve that begin at 0 and end at [size() - 1]. - * - * @return A string value. - * @throws std::out_of_range if "anIndex" is out of range (See [BASIC_ERROR]). - */ - virtual const char* getStringValue (uint32_t itemIndex = 0) const = 0; - - /** - * To get a Unicode string value. The string will be deleted when the IProperty will be deleted. - * @param itemIndex the index of the values to retrieve that begin at 0 and end at [size() - 1]. - * - * @return An Unicode string value. - * @throws std::out_of_range if "anIndex" is out of range (See [BASIC_ERROR]). - */ - virtual const wchar_t* getUnicodeStringValue (uint32_t itemIndex = 0) const = 0; - - /** - * @param itemIndex the index of the values to retrieve that begin at 0 and end at [size() - 1]. - * - * @return A double float value. - * @throws std::out_of_range if "anIndex" is out of range (See [BASIC_ERROR]). - */ - virtual float getFloatingValue (uint32_t itemIndex = 0) const = 0; - - /** - * @param itemIndex the index of the values to retrieve that begin at 0 and end at [size() - 1]. - * - * @return A double float value. - * @throws std::out_of_range if "anIndex" is out of range (See [BASIC_ERROR]). - */ - virtual double getDoubleValue (uint32_t itemIndex = 0) const = 0; - - /** - * To set the access specifier of the property. - * That access specifier determines who from the user application and - * the interface implementation modifies the property value. - * @param iotype A value from the enumeration IProperty_AccessSpecifier that corresponds to the - * property's access specifier. - * @par - * These values are: - *
    - *
  • @b IProperty_IN: The user application modifies the value
  • - *
  • @b IProperty_OUT: The interface implementation modifies the value
  • - *
  • @b IProperty_INOUT: The user application and the interface implementation modify the value
  • - *
- * - */ - - virtual void setAccessSpecifier (IProperty::AccessSpecifier iotype) = 0; - - /** - * To get the access specifier of the property. - * That access specifier determines who from the user application and - * the interface implementation modifies the property value. - * - * @return A value from the enumeration IProperty_AccessSpecifier that corresponds to the - * property's access specifier. - * @par - * These values are: - *
    - *
  • @b IProperty_IN: The user application modifies the value
  • - *
  • @b IProperty_OUT: The interface implementation modifies the value
  • - *
  • @b IProperty_INOUT: The user application and the interface implementation modify the value
  • - *
- */ - virtual IProperty::AccessSpecifier getAccessSpecifier () const = 0; - -}; - -}}} - - -#endif diff --git a/interfaces/xpcf/properties/IPropertyMap.h b/interfaces/xpcf/properties/IPropertyMap.h deleted file mode 100644 index ebcf18a..0000000 --- a/interfaces/xpcf/properties/IPropertyMap.h +++ /dev/null @@ -1,133 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-10-27 - */ - -#ifndef ORG_BCOM_XPCF_IPROPERTYMAP_H -#define ORG_BCOM_XPCF_IPROPERTYMAP_H - -#include "xpcf/properties/IProperty.h" -#include "xpcf/collection/IEnumerable.h" -#include - -namespace org { namespace bcom { namespace xpcf { - -/** - * @interface IPropertyMap - * The concept is very simple. The properties are described as a - * set of {names, type, value(s), attribute}. - * @par - * The @b type describes the kind of data that the property uses. It - * can be a string, an integer, a float... - * @par - * The application that uses the component can set a particular - * @b value but it is up to the component to check its validity. - * A property is always an array. However, it can contain a single value. - * @par - * The @b access @b specifier depicts the modification right that a user - * application has on the component properties. That access specifier can - * be @b in, @b out or @b inout. - *
    - *
  • An @b in property will only be modified by the user application.
  • - *
  • An @b out property is only modified by the component that - * implements the IPropertyMap interface. For the user - * application, an @b out property is a read-only property.
  • - *
  • An @b inout can be modified by the user application and the component.
  • - *
- */ - - -class IPropertyMap -{ -public: - typedef enum { - IPropertyMap_IN =0x01, - IPropertyMap_OUT = 0x02, - IPropertyMap_INOUT= 0x04, - IPropertyMap_ALL= 0x07 //IN|OUT|INOUT - - } AccessSpecifier; - - virtual ~IPropertyMap() = default; - - virtual XPCFErrorCode addProperty (SRef p) = 0; - - /** - * @fn virtual XPCFErrorCode setProperty (const SRef p) = 0 - * To set a property. - * The property must be a property recognised by the @b IPropertyMap implementation. - * The property will be added to the IPropertyMap implementation. - * - * @param p is a class that implements the interface @b IProperty. - * The component must verify the validity of the value. - * - * @return - *
    - *
  • @b IPropertyMap_UNKNOWNPROPERTY : must be returned when the property is not supported by the component.
  • - *
  • @b IPropertyMap_INVALIDTYPE: must be returned when the property is not of the good type.
  • - *
  • @b IPropertyMap_INVALIDSIZE: must be returned when the property has not the good number of values.
  • - *
  • @b IPropertyMap_ACCESSDENIED: must be returned when the property attribute is IProperty_OUT - * when it is obtained with the methods getProperty or getPropertys. - * The value of attribute checked is not the value of the argument property.
  • - *
  • @b XPCFErrorCode::_SUCCESS is returned otherwise.
  • - *
- * @throws XPCF_NullObject if "p" is null - */ - virtual XPCFErrorCode setProperty (const SRef p) = 0; - - /** - * To get the properties held by the object that implements this interface. - * - * @return an IEnumerable collection upon IProperty's references - */ - virtual IEnumerable> & getProperties() = 0; - - virtual const SRef at (const char *name) = 0; - - virtual XPCFErrorCode wrapInteger(const char * name, int32_t & wrappedValue, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT) = 0; - virtual XPCFErrorCode wrapUnsignedInteger(const char * name, uint32_t & wrappedValue, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT) = 0; - virtual XPCFErrorCode wrapLong(const char * name, int64_t & wrappedValue, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT) = 0; - virtual XPCFErrorCode wrapUnsignedLong(const char * name, uint64_t & wrappedValue, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT) = 0; - virtual XPCFErrorCode wrapFloat(const char * name, float & wrappedValue, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT) = 0; - virtual XPCFErrorCode wrapDouble(const char * name, double & wrappedValue, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT) = 0; - virtual XPCFErrorCode wrapString(const char * name, std::string & wrappedValue, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT) = 0; - virtual XPCFErrorCode wrapUnicodeString(const char * name, std::wstring & wrappedValue, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT) = 0; - virtual XPCFErrorCode wrapStructure(const char * name, SRef & wrappedValue, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT) = 0; - - virtual XPCFErrorCode wrapIntegerVector(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT) = 0; - virtual XPCFErrorCode wrapUnsignedIntegerVector(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT) = 0; - virtual XPCFErrorCode wrapLongVector(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT) = 0; - virtual XPCFErrorCode wrapUnsignedLongVector(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT) = 0; - virtual XPCFErrorCode wrapFloatVector(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT) = 0; - virtual XPCFErrorCode wrapDoubleVector(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT) = 0; - virtual XPCFErrorCode wrapStringVector(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT) = 0; - virtual XPCFErrorCode wrapUnicodeStringVector(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT) = 0; - virtual XPCFErrorCode wrapStructureVector(const char * name, std::vector> & wrappedValue, IProperty::AccessSpecifier iotype = IProperty::AccessSpecifier::IProperty_INOUT) = 0; - -}; - -#include "xpcf/xpcf_api_define.h" - -XPCF_EXPORT_API SRef getPropertyMapInstance(); - -}}} - - -#endif diff --git a/interfaces/xpcf/remoting/BaseBuffer.h b/interfaces/xpcf/remoting/BaseBuffer.h deleted file mode 100644 index 61a2184..0000000 --- a/interfaces/xpcf/remoting/BaseBuffer.h +++ /dev/null @@ -1,104 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2020-09-12 - */ - -#ifndef BASEBUFFER_H -#define BASEBUFFER_H - -#include - -namespace org { namespace bcom { namespace xpcf { - -/** - * @class BaseBuffer - * @brief A Buffer used to store any data such as descriptors. - */ - - -class BaseBuffer { -public: - BaseBuffer () = default; - - BaseBuffer (uint32_t size) { - setSize(size); - } - - /** - * @brief BaseBuffer - * copy initialise the buffer - * @param buffer - */ - /// TODO: add a owned/non-owned parameter/other constructor with no copy, just reference holding - BaseBuffer (const std::vector & buffer) { - setSize(buffer.size()); - m_storageData.insert(m_storageData.begin(), buffer.data(), buffer.data() + m_bufferSize); - } - - BaseBuffer (void* data, uint32_t size) { - setData(data,size); - } - - ~BaseBuffer () = default; - - void setSize (uint32_t size) { - m_bufferSize = size; - if (m_bufferSize == 0) { // invalid size - return; - } - // The reserve + memset do no really create the elements. - m_storageData.resize(m_bufferSize); - /* - m_storageData.reserve(m_bufferSize); - memset(m_storageData.data(),0,m_bufferSize); - */ - } - - uint32_t getSize () { return m_bufferSize; } - - void setData (void * data, uint32_t size) { - if (m_bufferSize < size) { - setSize(size); - } - m_storageData.insert(m_storageData.begin(), static_cast(data), static_cast(data) + m_bufferSize); - } - - void appendData (const void * data, uint32_t size) { - uint32_t endOffset = m_bufferSize; - setSize(m_bufferSize + size); - auto startIt = std::next(m_storageData.begin(), endOffset); - m_storageData.insert(startIt, static_cast(data), static_cast(data) + size); - } - - void* data () { return m_storageData.data(); } - const void* data () const { return m_storageData.data(); } - - std::string encode(); - void decode(const std::string & str); - -private: - std::vector m_storageData; - uint32_t m_bufferSize = 0; - -}; - -}}} - -#endif // BASEBUFFER_H diff --git a/interfaces/xpcf/remoting/GrpcHelper.h b/interfaces/xpcf/remoting/GrpcHelper.h deleted file mode 100644 index 13ee2e9..0000000 --- a/interfaces/xpcf/remoting/GrpcHelper.h +++ /dev/null @@ -1,227 +0,0 @@ -#ifndef GRPCHELPER_H -#define GRPCHELPER_H -#include -#include -#include -#include -#include -#include -#include - -namespace org { namespace bcom { namespace xpcf { - -typedef enum { - InsecureChannelCredentials = 0, - SslCredentials = 1, - GoogleDefaultCredentials = 2 -} grpcCredentials; - -typedef enum { - client =0x01, - server = 0x02, - bidir = 0x03 -} grpcCompressDirection; - -typedef enum { - unspecified = 0x00, - none = 0x10, - deflate = 0x20, - gzip=0x40 -} grpcCompressType; - -typedef struct grpcCompressionInfos { - grpcCompressType request = unspecified; - grpcCompressType response = unspecified; -} grpcCompressionInfos; - -typedef struct grpcServerCompressionInfos { - bool force = false; - grpcCompressType type = unspecified; -} grpcServerCompressionInfos; - -static const std::map translateCompressionConfigMap = {{"none",grpcCompressType::none}, - {"unspecified",grpcCompressType::unspecified}, - {"deflate",grpcCompressType::deflate}, - {"gzip",grpcCompressType::gzip}}; - -class GrpcHelper -{ -public: - static std::shared_ptr< ::grpc::ChannelCredentials > getCredentials(grpcCredentials channelCredentials) { - switch (channelCredentials) { - case GoogleDefaultCredentials: - return ::grpc::GoogleDefaultCredentials(); - case SslCredentials: - return ::grpc::SslCredentials(::grpc::SslCredentialsOptions()); - case InsecureChannelCredentials: - return ::grpc::InsecureChannelCredentials(); - default: - return nullptr; - } - return nullptr; - } - - static std::shared_ptr< ::grpc::ServerCredentials > getServerCredentials(grpcCredentials serverCredentials) { - switch (serverCredentials) { - case GoogleDefaultCredentials: - return nullptr; - case SslCredentials: - return ::grpc::SslServerCredentials(::grpc::SslServerCredentialsOptions()); - case InsecureChannelCredentials: - return ::grpc::InsecureServerCredentials(); - default: - return nullptr; - } - return nullptr; - } - - static grpc_compression_algorithm getCompressionType(unsigned long compressMask) - { - grpc_compression_algorithm algo = GRPC_COMPRESS_NONE; - switch(compressMask & 0xF0) { - case grpcCompressType::deflate : algo = GRPC_COMPRESS_DEFLATE; - break; - case grpcCompressType::gzip : algo = GRPC_COMPRESS_GZIP; - break; - default: algo = GRPC_COMPRESS_NONE; - break; - } - return algo; - } - - -private: - GrpcHelper() = default; -}; - -inline grpcCompressionInfos deduceClientCompressionInfo(const grpcCompressionInfos & serviceInfos, const std::string & methodName, - const std::map & methodCompressionInfos) -{ - grpcCompressionInfos infos; - if (methodCompressionInfos.find(methodName) != methodCompressionInfos.end()) { - if (methodCompressionInfos.at(methodName).request != grpcCompressType::unspecified) { - infos.request = methodCompressionInfos.at(methodName).request; - } - else { - infos.request = serviceInfos.request; - } - if (methodCompressionInfos.at(methodName).response != grpcCompressType::unspecified) { - infos.response = methodCompressionInfos.at(methodName).response; - } - else { - infos.response = serviceInfos.response; - } - return infos; - } - infos.request = serviceInfos.request; - infos.response = serviceInfos.response; - return infos; -} - -inline grpcCompressType translateCompression(const std::string & compressionStr) { - if (translateCompressionConfigMap.find(compressionStr) == translateCompressionConfigMap.end()) { - return grpcCompressType::unspecified; - } - return translateCompressionConfigMap.at(compressionStr); -} - -inline void translateServerConfiguration(const std::string & grpcCompressionLine, grpcServerCompressionInfos & serviceInfos, - std::map & methodCompressionInfos) { - std::string compressionLine = grpcCompressionLine; - boost::erase_all(compressionLine, "\r"); - std::vector compressDetails; - boost::split(compressDetails, compressionLine, [&](char c) {return c == '|';}); - if (compressDetails.size() > 1) { - if (compressDetails[0] == "service") { - serviceInfos.type = translateCompression(compressDetails[1]); - if (compressDetails.size() == 3) { - serviceInfos.force = std::atol(compressDetails[2].c_str()); - } - } - if (compressDetails[0] == "method") { - if (compressDetails.size() > 2) { - std::string methodName = compressDetails[1]; - xpcf::grpcServerCompressionInfos infos; - infos.type = translateCompression(compressDetails[2]); - if (compressDetails.size() == 4) { - infos.force = std::atol(compressDetails[3].c_str()); - } - methodCompressionInfos.insert({methodName, infos}); - } - } - } -} - -inline void translateClientConfiguration(const std::string & grpcCompressionLine, grpcCompressionInfos & serviceInfos, - std::map & methodCompressionInfos) { - std::string compressionLine = grpcCompressionLine; - boost::erase_all(compressionLine, "\r"); - std::vector compressDetails; - boost::split(compressDetails, compressionLine, [&](char c) {return c == '|';}); - if (compressDetails.size() > 1) { - if (compressDetails[0] == "service") { - serviceInfos.request = translateCompression(compressDetails[1]); - if (compressDetails.size() == 3) { - serviceInfos.response = translateCompression(compressDetails[2]); - } - } - if (compressDetails[0] == "method") { - if (compressDetails.size() > 2) { - std::string methodName = compressDetails[1]; - xpcf::grpcCompressionInfos infos; - infos.request = translateCompression(compressDetails[2]); - if (compressDetails.size() == 4) { - infos.response = translateCompression(compressDetails[3]); - } - methodCompressionInfos.insert({methodName, infos}); - } - } - } -} - -inline grpcServerCompressionInfos deduceServerCompressionType(grpcCompressType askedCompressType, const grpcServerCompressionInfos & serviceInfos, const std::string & methodName, - const std::map & methodCompressionInfos) -{ - grpcServerCompressionInfos infos; - if (askedCompressType != grpcCompressType::unspecified) { - infos.type = askedCompressType; - } - if (serviceInfos.type != grpcCompressType::unspecified && (serviceInfos.force||askedCompressType == grpcCompressType::unspecified)) { - infos = serviceInfos; - } - if (methodCompressionInfos.find(methodName) != methodCompressionInfos.end()) { - auto & compressInfo = methodCompressionInfos.at(methodName); - if (compressInfo.type != grpcCompressType::unspecified && (compressInfo.force||askedCompressType == grpcCompressType::unspecified)) { - infos = compressInfo; - } - } - return infos; -} - - -inline grpcCompressType prepareClientCompressionContext(::grpc::ClientContext & context, const grpcCompressionInfos & infos) -{ - // try to set service compression first - if (infos.request != grpcCompressType::unspecified) { - context.set_compression_algorithm(xpcf::GrpcHelper::getCompressionType(infos.request)); - } - - if (infos.response != grpcCompressType::unspecified) { - return infos.response; - } - return grpcCompressType::unspecified; -} - -inline void prepareServerCompressionContext(::grpc::ServerContext* context, const grpcServerCompressionInfos & infos) -{ - if (infos.type != grpcCompressType::unspecified) { - context->set_compression_algorithm(xpcf::GrpcHelper::getCompressionType(infos.type)); - } -} - - -}}} - - - -#endif // GRPCHELPER_H diff --git a/interfaces/xpcf/remoting/IGrpcServerManager.h b/interfaces/xpcf/remoting/IGrpcServerManager.h deleted file mode 100644 index 855b59b..0000000 --- a/interfaces/xpcf/remoting/IGrpcServerManager.h +++ /dev/null @@ -1,52 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-04-28 - */ - -#ifndef IGRPCSERVERMANAGER_H -#define IGRPCSERVERMANAGER_H - - -#include -#include - -namespace org { namespace bcom { namespace xpcf { - -class IGrpcServerManager: virtual public org::bcom::xpcf::IComponentIntrospect -{ -public: - virtual ~IGrpcServerManager() override = default; - virtual void registerService(grpc::Service * service) = 0; - virtual void registerService(const std::string & host, grpc::Service * service) = 0; - virtual void registerService(SRef service) = 0; - virtual void registerService(const std::string & host, SRef service) = 0; - virtual void runServer() = 0; -}; - -}}} - -template <> struct org::bcom::xpcf::InterfaceTraits -{ - static constexpr const char * UUID = "{8f0952bb-c064-4bcc-9030-51236b9126d5}"; - static constexpr const char * NAME = "IGrpcServerManager"; - static constexpr const char * DESCRIPTION = "IGrpcServerManager interface description"; -}; - -#endif // IGRPCSERVERMANAGER_H diff --git a/interfaces/xpcf/remoting/IGrpcService.h b/interfaces/xpcf/remoting/IGrpcService.h deleted file mode 100644 index 749956a..0000000 --- a/interfaces/xpcf/remoting/IGrpcService.h +++ /dev/null @@ -1,51 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-04-28 - */ - -#ifndef IGRPCSERVICE_H -#define IGRPCSERVICE_H - -#include - -namespace grpc -{ - class Service; -} - -namespace org { namespace bcom { namespace xpcf { - -class IGrpcService: virtual public org::bcom::xpcf::IComponentIntrospect -{ -public: - virtual ~IGrpcService() override = default; - virtual ::grpc::Service * getService() = 0; - virtual const char * getServiceName() = 0; -}; - -}}} - -template <> struct org::bcom::xpcf::InterfaceTraits -{ - static constexpr const char * UUID = "{baab5e42-2c24-48de-953b-07237af419e4}"; - static constexpr const char * NAME = "IGrpcService"; - static constexpr const char * DESCRIPTION = "IGrpcService interface description"; -}; -#endif // IGRPCSERVICE_H diff --git a/interfaces/xpcf/remoting/ISerializable.h b/interfaces/xpcf/remoting/ISerializable.h deleted file mode 100644 index 70d6692..0000000 --- a/interfaces/xpcf/remoting/ISerializable.h +++ /dev/null @@ -1,174 +0,0 @@ -#ifndef ISERIALIZABLE_H -#define ISERIALIZABLE_H - - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// template typename T to_proto/from_proto OR another solution with IGrpcProtoInterface / IRemotingBufferInterface ?? -// Simple backend [proto|flat] buffers -// Data class C either : -// - inherits from [proto|flat] buffer message class. C.[proto|fbs] file exists -// - can be converted to [proto|flat]::C class with template methods : a C.proto or C.fbs file must exists in the source folder -// - inherits ISerializable ([de]serialize from/to bytes buffer) -// - can be serialized to bytes buffer with template overload - -//XPCF remoting study -//Message options: -//1/ custom buffered messages -//- serialisation interface -//- serialisation generation from cppast using flexbuffers, capnproto. ... or dedicated serialisation type - -//2/ standard messages based upon proto/flat buffers -//- proto/flat buffers file generation - -//Service : -//1 -> type agnostic in/out service for serialisation generation/interface -//2 -> proto/flat based service for proto/flat defined SolAR::datastructure - -//serialisation generation/interface : -//-> pros : -//- allows an easier integration in existing c++ code - -//-> cons : -//- needs to generate deserialisation code in other languages too - -//proto/flat buffers messages : -//-> pros : -//- cross languages deserialisation is provided out of the box - -//-> cons : -//- needs to generate/create proto files -//- adds a dependency toward proto/flat buffers plugin for grpc - -//Endpoint notion ? Interface with destination configuration ? -namespace org { namespace bcom { namespace xpcf { - - -class Serializable -{ -public: - virtual ~Serializable() = default; - virtual std::string serialize() = 0; - virtual void deserialize(const std::string & buffer) = 0; -}; - -class ISerializable: virtual public org::bcom::xpcf::IComponentIntrospect -{ -public: - virtual ~ISerializable() override = default; - virtual std::string serialize() = 0; - virtual void deserialize(const std::string & buffer) = 0; -}; - -template std::string serialize(const T & object) -{ - std::stringstream ss; - S oa(ss); - oa << object; -#ifdef WITHGRPCPROBES - std::cout << "xpcf::serialize = " << ss.str().length() << " bytes"< T deserialize(const std::string & buffer) -{ - static_assert (utils::is_default_constructible::value, "Type passed to deserialize is not default constructible" ); -#ifdef WITHGRPCPROBES - std::cout << "xpcf::deserialize = " << buffer.length() << " bytes"<> obj; - return obj; -} - -template <> struct InterfaceTraits -{ - static constexpr const char * UUID = "{dfac12dd-a4be-4594-be28-f06949ca97b3}"; - static constexpr const char * NAME = "ISerializable"; - static constexpr const char * DESCRIPTION = "ISerializable interface description"; -}; - -}}} - - - - -// outside of any namespace -BOOST_SERIALIZATION_SPLIT_FREE(std::chrono::system_clock::time_point) - -namespace boost { -namespace serialization { - -template -struct Serialize -{ - template - static void serialize(Archive & ar, std::tuple & t, const unsigned int version) - { - ar & std::get(t); - Serialize::serialize(ar, t, version); - } -}; - -template<> -struct Serialize<0> -{ - template - static void serialize(Archive & ar, std::tuple & t, const unsigned int version) - { - (void) ar; - (void) t; - (void) version; - } -}; - -template -void serialize(Archive & ar, std::tuple & t, const unsigned int version) -{ - Serialize::serialize(ar, t, version); -} - -template -void save(Archive & ar, const std::chrono::system_clock::time_point & t, const unsigned int version) -{ - // duration for std::chrono is in microsecond on MacOS, nanoseconds on linux and nanoseconds on win - // keep nanoseconds resolution - std::chrono::duration nsDuration = std::chrono::duration_cast (t.time_since_epoch()); - int64_t nanoSeconds = nsDuration.count(); - ar & nanoSeconds; -} - - -template -void load(Archive & ar, std::chrono::system_clock::time_point & t, const unsigned int version) -{ - int64_t nanoSeconds; - ar & nanoSeconds; - std::chrono::nanoseconds nsDuration (nanoSeconds); - // duration_cast toward system_clock duration resolutionis needed as it depends on the platform resolution - std::chrono::system_clock::time_point n(std::chrono::duration_cast(nsDuration)); - t = n; -} - -} -} - - -#endif // ISERIALIZABLE_H diff --git a/interfaces/xpcf/threading/BaseTask.h b/interfaces/xpcf/threading/BaseTask.h deleted file mode 100644 index 50d5174..0000000 --- a/interfaces/xpcf/threading/BaseTask.h +++ /dev/null @@ -1,162 +0,0 @@ -/** - * @copyright Copyright (c) 2018 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @date 2018-07-10 - */ - -#ifndef ORG_BCOM_XPCF_BASETASK_H -#define ORG_BCOM_XPCF_BASETASK_H - -#include "xpcf/threading/ITask.h" -#include "xpcf/threading/SharedFifo.h" -#include "xpcf/core/refs.h" - -#include -#include -#include -#include - -namespace org { namespace bcom { namespace xpcf { - -class XPCF_EXPORT_API AbstractTask : virtual public ITask -{ -public: - AbstractTask(bool joinable = true): m_joinable(joinable) {} - virtual ~AbstractTask() override = default; - virtual bool started() const override { return !m_stop; } - virtual bool stopped() const override { return m_stop; } - virtual void cleanup() override; - virtual void declareFinalizer(const SRef & fifo) override; - virtual void signalRunning() = 0; - -protected: - std::atomic m_stop = false; - std::atomic m_joinable = true; - std::vector> m_finalizers; -}; - -class XPCF_EXPORT_API BaseTask : virtual public AbstractTask -{ -public: - BaseTask(bool joinable = true): AbstractTask(joinable) {} - virtual ~BaseTask() override; - void start() override; - void stop() override; - void awaitRunning() override; - void signalRunning() override; - static void yield(); - -private: - std::promise m_startedPromise; - std::thread m_thread; - -}; - -class XPCF_EXPORT_API AbstractDelegateTask : public AbstractTask -{ -public: - AbstractDelegateTask(std::function processingFunction, bool joinable): AbstractTask (joinable), - m_processFunc(processingFunction), m_stopPredicate( [&]() -> auto { return AbstractTask::stopped(); }) {} - AbstractDelegateTask(std::function processingFunction, std::function stopPredicate, bool joinable): AbstractTask (joinable), - m_processFunc(processingFunction), m_stopPredicate( [&]() -> auto { return stopPredicate() | AbstractTask::stopped(); }) {} - virtual ~AbstractDelegateTask() override = default; - void process() override; - bool stopped() const override { return m_stopPredicate(); } - -protected: - std::function m_processFunc; - std::function m_stopPredicate; -}; - -class XPCF_EXPORT_API DelegateTask : public AbstractDelegateTask -{ -public: - DelegateTask(std::function processingFunction, bool joinable = true): AbstractDelegateTask(processingFunction, joinable) {} - DelegateTask(std::function processingFunction,std::function stopPredicate, bool joinable): - AbstractDelegateTask(processingFunction, stopPredicate, joinable) {} - virtual ~DelegateTask() override = default; - void start() override; - void stop() override; - void awaitRunning() override; - void signalRunning() override; - static void yield(); - -private: - std::promise m_startedPromise; - std::future m_startedFuture; - std::thread m_thread; -}; - -#ifdef XPCF_USE_BOOST - -class XPCF_EXPORT_API FiberTask : public AbstractDelegateTask -{ -public: - FiberTask(std::function processingFunction, bool joinable = true); - virtual ~FiberTask() override; - void start() override; - void stop() override; - void awaitRunning() override; - void signalRunning() override; - static void yield(); - -private: - class FiberTaskImpl; - UniqueRef m_pimpl; -}; - -#endif -// TBB task ?? - -template -SRef createDelegateTask(std::function callable, bool joinable = true) { - //TODO : every task based on delegate callable must have an abstract base class with a common constructor semantic - static_assert(utils::is_base_of::value, - "Class type passed to createTask is not a derived class of AbstractDelegateTask !!"); - return utils::make_shared(callable, joinable); -} - -template -SRef createDelegateTask(std::function callable, std::function stopPredicate, bool joinable) { - //TODO : every task based on delegate callable must have an abstract base class with a common constructor semantic - static_assert(utils::is_base_of::value, - "Class type passed to createTask is not a derived class of AbstractDelegateTask !!"); - return utils::make_shared(callable,stopPredicate,joinable); -} - - -// Sample use: -// #define TASKMODEL DelegateTask or FiberTask -// std::function f = ... -// SRef task = createDelegateTask(f); - -// TODOS: -// #define TASKMODELNSPACE fibers -// SRef task = createTask(f); -// using yield = TASKMODEL::yield; -// using mutex = TASKMODELNSPACE::mutex; -// Add boost::future (for wait_all/any...) and boost::fiber::future wrapping -// Add scheduling feature introspection and configuration (properties?) -// Add mutex type declaration upon FIFOs instanciation -// Add FIFOs finalize methods to end threading properly (through signal/slot?) -// fifo finalize slot should be signalled by stop() from the thread -// Needs to expose join() ? - -}}} - -#endif diff --git a/interfaces/xpcf/threading/DropBuffer.h b/interfaces/xpcf/threading/DropBuffer.h deleted file mode 100644 index 2269179..0000000 --- a/interfaces/xpcf/threading/DropBuffer.h +++ /dev/null @@ -1,69 +0,0 @@ -/** - * @copyright Copyright (c) 2018 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @date 2018-07-10 - */ - -#ifndef ORG_BCOM_XPCF_DROPBUFFER_H -#define ORG_BCOM_XPCF_DROPBUFFER_H - -#include "xpcf/threading/SharedLifo.h" - - -namespace org { namespace bcom { namespace xpcf { - -template -class DropBuffer : public SharedLifo -{ -public: - DropBuffer() = default; - ~DropBuffer() = default; - - virtual inline void push(const T & value) override { - std::unique_lock lock(m_mutex); - if (m_nbNotified > 0) { - m_data.clear(); - m_nbNotified = 0; - } - m_data.push_front(value); - m_nbNotified++; - m_condQueueNotEmpty.notify_one(); - } - -protected: - using SharedFifo::m_condQueueNotEmpty; - using SharedFifo::m_nbNotified; - using SharedFifo::m_data; - using SharedFifo::m_mutex; - - - virtual inline void doPop( T& value ) - { - value = m_data.front(); - m_data.pop_front(); - m_nbNotified--; - } -}; - -template < class T, class NS = StdThreadedNamespace> SRef> createDropBuffer() { - return utils::make_shared>(); -} - -}}} - -#endif diff --git a/interfaces/xpcf/threading/FiberFifos.h b/interfaces/xpcf/threading/FiberFifos.h deleted file mode 100644 index 5573257..0000000 --- a/interfaces/xpcf/threading/FiberFifos.h +++ /dev/null @@ -1,53 +0,0 @@ -/** - * @copyright Copyright (c) 2018 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @date 2018-07-10 - */ - -#ifndef ORG_BCOM_XPCF_FIBERFIFOS_H -#define ORG_BCOM_XPCF_FIBERFIFOS_H - -#ifdef XPCF_USE_BOOST -#include "xpcf/threading/SharedCircularBuffer.h" -#include "xpcf/core/refs.h" -#include "boost/fiber/mutex.hpp" -#include "boost/fiber/condition_variable.hpp" - -namespace org { namespace bcom { namespace xpcf { - -//template class FIFO, class T> SRef> createFiberFifo() { -// return utils::make_shared>(); -//} -#ifdef XPCF_USE_BOOST -using FiberThreadedNamespace = TemplatedThreadedNamespace; -#else -using FiberThreadedNamespace = TemplatedThreadedNamespace; -#endif -template class FIFO, class T> SRef> createFiberFifo() { - return utils::make_shared>(); -} -/* -template SRef> createFiberFifo() { - return utils::make_shared>(); -}*/ - -}}} - -#endif - -#endif diff --git a/interfaces/xpcf/threading/ITask.h b/interfaces/xpcf/threading/ITask.h deleted file mode 100644 index c289778..0000000 --- a/interfaces/xpcf/threading/ITask.h +++ /dev/null @@ -1,65 +0,0 @@ -/** - * @copyright Copyright (c) 2018 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @date 2018-07-10 - */ - -#ifndef ORG_BCOM_XPCF_ITASK_H -#define ORG_BCOM_XPCF_ITASK_H - -#include "xpcf/xpcf_api_define.h" -#include -#include - -#include - -namespace org { namespace bcom { namespace xpcf { - -class XPCF_EXPORT_API ITask -{ -public: - ITask() = default; - virtual ~ITask() = default; - virtual void start() = 0; - virtual void stop() = 0; - virtual void process() = 0; - virtual void awaitRunning() = 0; - virtual bool started() const = 0; - virtual bool stopped() const = 0; - virtual void cleanup() = 0; - virtual void declareFinalizer(const SRef & fifo) = 0; -}; - -class XPCF_EXPORT_API ITaskFactory -{ -public: - ITaskFactory() = default; - virtual ~ITaskFactory() = default; - virtual SRef newTask(std::function command) = 0; -}; - -class XPCF_EXPORT_API IExecutor -{ -public: - IExecutor() = default; - virtual ~IExecutor() = default; - virtual void execute(std::function command) = 0; -}; - -}}} -#endif diff --git a/interfaces/xpcf/threading/MultiConsumer.h b/interfaces/xpcf/threading/MultiConsumer.h deleted file mode 100644 index 8f6df13..0000000 --- a/interfaces/xpcf/threading/MultiConsumer.h +++ /dev/null @@ -1,109 +0,0 @@ -/** - * @copyright Copyright (c) 2018 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @date 2018-07-10 - */ - -#ifndef ORG_BCOM_XPCF_MULTICONSUMER_HPP -#define ORG_BCOM_XPCF_MULTICONSUMER_HPP - -#include -#include -#include -#include "xpcf/core/refs.h" -#include "xpcf/core/BaseException.h" -#include "xpcf/threading/SharedBuffer.h" - -namespace org { namespace bcom { namespace xpcf { - -/** - * @class MultiConsumer - * @brief Specifies the MultiConsumer class. - * - * This class allows several consumers to get data from a unique synchronized queue (i.e. any class derived from IFifo). - * Each item in the source queue is popped once all consumers have popped its value. - */ -template -class MultiConsumer : public IFinalize { -public: - MultiConsumer(size_t nbConsumers, const SRef> & fifo): m_fifo(fifo),m_nbConsumers(nbConsumers) { - m_consumersBuffers.resize(nbConsumers); - } - - void release() override { - for (auto & buffer : m_consumersBuffers) { - buffer.release(); - } - } - - uint64_t subscribe() { - std::unique_lock lock(m_mutex); - if (m_currentSubscriberID< m_nbConsumers) { - return m_currentSubscriberID++; - } - throw xpcf::Exception("all consumers already subscribed !!!"); - } - - void init() - { - T value; - m_nbConsumed = 0; - m_fifo->pop(value); - for (auto & buffer : m_consumersBuffers) { - buffer.push(value); - } - } - - T pop(uint64_t consumerID) - { - T value; - if (consumerID >= m_nbConsumers) { - throw xpcf::Exception("Invalid consumer ID"); - } - - { - std::unique_lock lock(m_mutex); - if (m_bFirstInit) { - init(); - m_bFirstInit = false; - } - } - - value = m_consumersBuffers.at(consumerID).pop(); - std::unique_lock lock(m_mutex); - m_nbConsumed++; - if (m_nbConsumed == m_nbConsumers) { - init(); - } - return value; - } - -private: - typename NS::MutexType m_mutex; - uint64_t m_currentSubscriberID = 0; - size_t m_nbConsumers; - SRef> m_fifo; - std::vector> m_consumersBuffers; - std::atomic m_nbConsumed = 0; - std::atomic m_bFirstInit = true; - -}; - -}}} - -#endif diff --git a/interfaces/xpcf/threading/SharedBuffer.h b/interfaces/xpcf/threading/SharedBuffer.h deleted file mode 100644 index fb79270..0000000 --- a/interfaces/xpcf/threading/SharedBuffer.h +++ /dev/null @@ -1,103 +0,0 @@ -/** - * @copyright Copyright (c) 2018 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @date 2018-07-10 - */ - -#ifndef ORG_BCOM_XPCF_SHAREDBUFFER_HPP -#define ORG_BCOM_XPCF_SHAREDBUFFER_HPP - -#include "xpcf/threading/SharedFifo.h" - -namespace org { namespace bcom { namespace xpcf { - -template -class SharedBuffer : public SharedFifo -{ -public: - SharedBuffer(std::size_t max, std::size_t startAt = 0) : - m_maxSize(max), - m_bufferedStartOffset( max < startAt ? max : startAt), - m_started(startAt == 0 ? true : false) {} - - SharedBuffer(const SharedBuffer & other) { - // Call to base class copy constructor is not done to ensure atomicity while copy constructor is called - std::unique_lock lock(const_cast(other).m_mutex); - m_nbNotified = other.m_nbNotified; - m_data.assign(other.m_data.begin(),other.m_data.end()); - m_bReleased = other.m_bReleased; - m_maxSize = other.m_maxSize; - m_bufferedStartOffset = other.m_bufferedStartOffset; - m_started = other.m_started; - } - - ~SharedBuffer() = default; - - virtual void push(const T & value) override { - std::unique_lock lock(m_mutex); - - while(!m_bReleased && (m_nbNotified >= m_maxSize)) { - m_condQueueNotFull.wait(lock); - } - if (m_bReleased && m_nbNotified >= m_maxSize) { - throw Exception("IFifo::push aborted"); - } - - m_data.push_front(value); - m_nbNotified++; - - if (m_started) { - m_condQueueNotEmpty.notify_one(); - } - else { - if (m_nbNotified >= m_bufferedStartOffset) { - m_started = true; - } - } - } - - bool isFull() { - std::unique_lock lock(m_mutex); - return m_nbNotified >= m_maxSize; - } - -private: - std::size_t m_maxSize; - std::size_t m_bufferedStartOffset; - bool m_started = false; - typename NS::ConditionVariableType m_condQueueNotFull; - using SharedFifo::m_condQueueNotEmpty; - using SharedFifo::m_nbNotified; - using SharedFifo::m_data; - using SharedFifo::m_mutex; - using SharedFifo::m_bReleased; - - virtual void doPop( T& value ) override - { - SharedFifo::doPop(value); - m_condQueueNotFull.notify_one(); - } -}; - -template < class T, class NS = StdThreadedNamespace> SRef> createSharedBuffer(std::size_t max, std::size_t startAt = 0) { - return utils::make_shared>(max, startAt); -} - -}}} - -#endif diff --git a/interfaces/xpcf/threading/SharedCircularBuffer.h b/interfaces/xpcf/threading/SharedCircularBuffer.h deleted file mode 100644 index 049df12..0000000 --- a/interfaces/xpcf/threading/SharedCircularBuffer.h +++ /dev/null @@ -1,87 +0,0 @@ -/** - * @copyright Copyright (c) 2018 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @date 2018-07-10 - */ - -#ifndef ORG_BCOM_XPCF_SHAREDCIRCULARBUFFER_HPP -#define ORG_BCOM_XPCF_SHAREDCIRCULARBUFFER_HPP - -#include "xpcf/threading/SharedFifo.h" - -namespace org { namespace bcom { namespace xpcf { - -template -class SharedCircularBuffer : public SharedFifo -{ -public: - SharedCircularBuffer( unsigned int size ) - : SharedFifo() - , m_pushCursor( 0 ) - , m_popCursor( 0 ) - { - m_data = std::deque( size ); - } - - ~SharedCircularBuffer() = default; - - virtual void push(const T & value) override - { - std::unique_lock lock(m_mutex); - m_data[m_pushCursor] = value; - increaseCursor( m_pushCursor ); - ++m_nbNotified; - - if( m_nbNotified > m_data.size() ) - { - increaseCursor(m_popCursor); - --m_nbNotified; - } - - m_condQueueNotEmpty.notify_one(); - } - -protected: - using SharedFifo::m_condQueueNotEmpty; - using SharedFifo::m_nbNotified; - using SharedFifo::m_data; - using SharedFifo::m_mutex; - - std::size_t m_pushCursor; - std::size_t m_popCursor; - - inline void increaseCursor( std::size_t& cursor ) - { - ++cursor; - if( cursor == m_data.size() ) - { - cursor = 0; - } - } - - virtual void doPop( T& value ) - { - value = m_data[m_popCursor]; - increaseCursor(m_popCursor); - --m_nbNotified; - } -}; - -}}} - -#endif //__SHAREDCIRCULARBUFFER_HPP__ diff --git a/interfaces/xpcf/threading/SharedFifo.h b/interfaces/xpcf/threading/SharedFifo.h deleted file mode 100644 index 08ce303..0000000 --- a/interfaces/xpcf/threading/SharedFifo.h +++ /dev/null @@ -1,243 +0,0 @@ -/** - * @copyright Copyright (c) 2018 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @date 2018-07-10 - */ - -#ifndef ORG_BCOM_XPCF_SHAREDFIFO_HPP -#define ORG_BCOM_XPCF_SHAREDFIFO_HPP - -#include -#include -#include -#include "xpcf/core/refs.h" -#include "xpcf/core/BaseException.h" - -namespace org { namespace bcom { namespace xpcf { - -class IFinalize { -public: - IFinalize() = default; - virtual ~IFinalize() = default; - virtual void release() = 0 ; -}; - -template -class IFifo : public IFinalize -{ -public: - IFifo() = default; - virtual ~IFifo() = default; - virtual inline void push(const T & value) = 0; - - virtual const T back() = 0 ; - - virtual bool back(T & value) = 0 ; - - virtual const T pop() = 0 ; - - virtual bool pop(T & value) = 0 ; - - virtual bool tryPop( T & value ) = 0; - - virtual bool pop( T & value , std::chrono::milliseconds duration) = 0; - - virtual bool empty() const = 0 ; - - virtual void clear() = 0; -}; - -template //, class TaskClass > -struct TemplatedThreadedNamespace { - typedef MutexClass MutexType; - typedef ConditionVariableClass ConditionVariableType; - typedef CVStatusClass CVStatusType; -// typedef TaskClass TaskType; -}; - -using StdThreadedNamespace = TemplatedThreadedNamespace; - -template -struct FifoCleaner -{ - static void cleanup([[maybe_unused]] const std::deque & data) {} -}; - -template -struct FifoCleaner>> -{ - static void cleanup(const std::deque & data) { - for (auto element: data) { - delete element; - } - } -}; - -//template -template -class SharedFifo : public IFifo -{ -public: - SharedFifo() = default; - ~SharedFifo() = default; - SharedFifo(const SharedFifo & other) { - std::unique_lock lock(const_cast(other).m_mutex); - m_nbNotified = other.m_nbNotified; - m_data.assign(other.m_data.begin(),other.m_data.end()); - m_bReleased = other.m_bReleased; - } - - virtual void push(const T & value) override { - std::unique_lock lock(m_mutex); - m_data.push_front(value); - m_nbNotified++; - m_condQueueNotEmpty.notify_one(); - } - - bool back(T & value) override { - std::unique_lock lock(m_mutex); - while (!m_bReleased && (m_nbNotified == 0)) { // loop to avoid spurious wakeups - m_condQueueNotEmpty.wait(lock); - } - if (m_nbNotified != 0) { - value = m_data.back(); - } - return m_bReleased; - } - - const T back() override { - std::unique_lock lock(m_mutex); - while (!m_bReleased && (m_nbNotified == 0)) { // loop to avoid spurious wakeups - m_condQueueNotEmpty.wait(lock); - } - if (m_bReleased && (m_nbNotified == 0)) { - throw Exception("IFifo::back aborted"); - } - return m_data.back(); - } - - const T pop() override { - std::unique_lock lock(m_mutex); - while (!m_bReleased && (m_nbNotified == 0)) { // loop to avoid spurious wakeups - m_condQueueNotEmpty.wait(lock); - } - if (m_bReleased && (m_nbNotified == 0)) { - throw Exception("IFifo::pop aborted"); - } - T value; - doPop(value); - return value; - } - - bool pop(T & value) override { - std::unique_lock lock(m_mutex); - while (!m_bReleased && (m_nbNotified == 0)) { // loop to avoid spurious wakeups - m_condQueueNotEmpty.wait(lock); - } - if (m_bReleased && (m_nbNotified == 0)) { - return false; - } - doPop(value); - return true; - } - - bool tryPop( T & value ) override - { - std::unique_lock tryLock(m_mutex, std::defer_lock); - bool popSuccessful = false; - - if( tryLock.try_lock() ) - { - if( m_nbNotified > 0) - { - doPop(value); - popSuccessful = true; - } - } - return popSuccessful; - } - - bool pop( T & value , std::chrono::milliseconds duration) override - { - typename NS::CVStatusType status = NS::CVStatusType::no_timeout; - std::unique_lock lock(m_mutex); - while (!m_bReleased && m_nbNotified == 0 && status != NS::CVStatusType::timeout) { // loop to avoid spurious wakeups - status = m_condQueueNotEmpty.wait_for(lock,duration); - } - if ((status != NS::CVStatusType::no_timeout || m_bReleased) && (m_nbNotified == 0) ) { - return false; - } - doPop(value); - return true; - } - - std::size_t size() const { - return m_data.size(); - } - - bool empty() const override { - return m_data.empty(); - } - - void release() override { - m_bReleased = true; - m_condQueueNotEmpty.notify_all(); - } - - void clear() override { - FifoCleaner::cleanup(m_data); - m_nbNotified = 0; - m_data.clear(); - } - - inline void for_each(const std::function & f) { - // CAUTION : no synchro for now : to study - for (auto element: m_data) { - f(element); - } - } - -protected: - typename NS::ConditionVariableType m_condQueueNotEmpty; - std::size_t m_nbNotified = 0; - std::deque m_data; - volatile bool m_bReleased = false; - typename NS::MutexType m_mutex; - - virtual inline void doPop( T& value ) - { - value = m_data.back(); - m_data.pop_back(); - m_nbNotified--; - } -}; - - -template SRef> createFifo() { - return utils::make_shared>(); -} - -#ifndef SWIG -template class FIFO, class T, class NS = StdThreadedNamespace, typename ... Args2> SRef> createFifo(Args2&&... args) { - return utils::make_shared>(std::forward< Args2 >(args)...); -} -#endif - -}}} - -#endif diff --git a/interfaces/xpcf/threading/SharedLifo.h b/interfaces/xpcf/threading/SharedLifo.h deleted file mode 100644 index da2bc68..0000000 --- a/interfaces/xpcf/threading/SharedLifo.h +++ /dev/null @@ -1,60 +0,0 @@ -/** - * @copyright Copyright (c) 2018 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @date 2018-07-10 - */ - -#ifndef ORG_BCOM_XPCF_SHAREDLIFO_HPP -#define ORG_BCOM_XPCF_SHAREDLIFO_HPP - -#include "xpcf/threading/SharedFifo.h" - - -namespace org { namespace bcom { namespace xpcf { - -//template -template -class SharedLifo : public SharedFifo -{ -public: - SharedLifo() = default; - ~SharedLifo() = default; - -protected: - using SharedFifo::m_condQueueNotEmpty; - using SharedFifo::m_nbNotified; - using SharedFifo::m_data; - using SharedFifo::m_mutex; - - - virtual inline void doPop( T& value ) - { - value = m_data.front(); - m_data.pop_front(); - m_nbNotified--; - } -}; - - -template SRef> createLifo() { - return utils::make_shared>(); -} - -}}} - -#endif diff --git a/interfaces/xpcf/xpcf.h b/interfaces/xpcf/xpcf.h deleted file mode 100644 index dfe5fb7..0000000 --- a/interfaces/xpcf/xpcf.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef ORG_BCOM_XPCF_XPCF_H -#define ORG_BCOM_XPCF_XPCF_H - -#include "xpcf/api/IComponentManager.h" -#include "xpcf/api/IConfigurable.h" -#include "xpcf/core/Exception.h" - -#endif // XPCF_H diff --git a/interfaces/xpcf/xpcf_api_define.h b/interfaces/xpcf/xpcf_api_define.h deleted file mode 100644 index 1cac36c..0000000 --- a/interfaces/xpcf/xpcf_api_define.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef XPCF_API_DEFINE_H -#define XPCF_API_DEFINE_H - -#if _WIN32 -#if XPCF_SHARED -#ifdef xpcf_API_DLLEXPORT -#define XPCF_EXPORT_API __declspec(dllexport) -#else -#ifdef xpcf_static_deps_API_DLLEXPORT -#define XPCF_EXPORT_API __declspec(dllexport) -#else -#define XPCF_EXPORT_API __declspec(dllimport) -#endif -#endif -#else -#define XPCF_EXPORT_API -#endif -#else -#define XPCF_EXPORT_API -#endif - -#endif // XPCF_API_DEFINE_H diff --git a/libs/README.md b/libs/README.md deleted file mode 100644 index 8fe7e36..0000000 --- a/libs/README.md +++ /dev/null @@ -1,42 +0,0 @@ -Cppast project build -========================================= -This README describes how to build cppast with clang 13.0.0. - -# llvm-config.exe generation -Usually llvm-config.exe is already built and stored on [github](https://github.com/b-com-software-basis/thirdparties-binaries). -This chapter describes how to build a specific version. - - - Get llvm-project source code - -1/ Clone the git repository llvm-project - git clone https://github.com/llvm/llvm-project.git -2/ Checkout to your specific version. Tags are commonly like llvmorg- (tag llvmorg-13.0.0 for clang version 13.0.0). - git checkout llvmorg-13.0.0 - - - generate the visual studio solution to compile the binary - -1/ cd llvm-project -2/ mkdir build -3/ cd build - -vs2017 4/ cmake -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_TARGETS_TO_BUILD="X86" -G "Visual Studio 15 2017" -Thost=x64 ..\llvm -vs2022 4/ cmake -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_TARGETS_TO_BUILD="X86" -G "Visual Studio 17 2022" -Thost=x64 ..\llvm - - - generate llvm-config.exe - -1/ open llvm.sln with the good visual studio application -2/ change configuration to Release -3/ generate the project Tools\llvm-config - -You will find llvm-config.exe in the folder **build/Release/bin**. - - - store llvm-config.exe - -To be used by the script below, you need to store your specific version on github [github](https://github.com/b-com-software-basis/thirdparties-binaries). - -# cppast projet build -You will find two scripts to build cppast project: - * Linux: use **/libs/build_cppast.sh** - * Windows: use **/libs/build_cppast.bat** (**/!\** Administrator rights are needed to install packages **/!\**) - -This two scripts need to be executed in the folder **/libs**. \ No newline at end of file diff --git a/libs/build_cppast.bat b/libs/build_cppast.bat deleted file mode 100644 index f18fe1d..0000000 --- a/libs/build_cppast.bat +++ /dev/null @@ -1,58 +0,0 @@ -@echo off - -set BUILDFOLDER=build-cppast -set BUILDTYPE=release - -@REM Check parameters -set argc=0 -for %%x in (%*) do set /A argc+=1 -if %argc% gtr 0 ( - goto display_usage -) - -@REM ##################################################### -@REM Configure LLVM -@REM ##################################################### - -@REM Install llvm 14.0.0 because we already compiled llvm-config for this version. -call choco install llvm -y --version 14.0.0 - -@REM Get llvm-config.exe -call choco install curl -y -call curl https://github.com/b-com-software-basis/thirdparties-binaries/releases/download/llvm-config/13.0.0/win/llvm-config.exe -O -L -J - -call move llvm-config.exe "c:\Program Files\LLVM\bin\" -if not exist "c:\Program Files\LLVM\bin\llvm-config.exe" ( - goto error_llvm_config -) - -@REM ##################################################### -@REM Build cppast -@REM ##################################################### -@REM Patche cppast - - -@REM Compile cppAst -call choco install cmake - -set BUILDPATH=%BUILDFOLDER%-%BUILDTYPE%\%TARGETPLATFORM% -mkdir %BUILDPATH% -cd %BUILDPATH% - -call cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDANT_CODE=ON -G "Unix Makefiles" ..\cppast -call make -call make install -goto end - -:error_llvm_config -echo Error - Enable to find llvm path to copy llvm-config.exe. - -:display_usage -echo Batch to compile cppast project. -echo /!\ Must be executed with administrator rights to install LLVM, curl and cmake. /!\ -goto bad_end - -:end -echo cppast build finished - -:bad_end \ No newline at end of file diff --git a/libs/build_cppast.sh b/libs/build_cppast.sh deleted file mode 100755 index 2056e0e..0000000 --- a/libs/build_cppast.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash - -BUILDFOLDER=build-cppast - -LLVMBREWPATH=/usr/local -LLVMVERSION=15 -TARGETPLATFORM=mac-clang -if [[ "$OSTYPE" == "linux-gnu" ]]; then - VERSIONID=`cat /etc/os-release | grep -i "VERSION_ID"` - arr=(${VERSIONID//=/ }) - LINUXVERSION=${arr[1]} - if [ ${LINUXVERSION} = "\"18.04\"" ]; then - LLVMVERSION=10 - fi - if [ ${LINUXVERSION} = "\"20.04\"" ]; then - LLVMVERSION=11 - fi - if [ ${LINUXVERSION} = "\"22.04\"" ]; then - LLVMVERSION=14 - fi - sudo apt-get install -y llvm-${LLVMVERSION} clang-${LLVMVERSION} libclang-${LLVMVERSION}-dev - LLVMCONFIGPATH=/usr/bin/llvm-config-${LLVMVERSION} - TARGETPLATFORM=linux-gcc - CPPASTCMAKECOMPILER="-DCMAKE_CXX_COMPILER=clang++-${LLVMVERSION}" -elif [[ "$OSTYPE" == "darwin"* ]]; then - # Mac OSX - if test ! $(which brew); then - echo "brew is not installed, first install brew then relaunch this script\n"; - exit 1 - fi - echo "installing llvm" - brew install llvm - LLVMCONFIGPATH=${LLVMBREWPATH}/opt/llvm/bin/llvm-config - #next line is mandatory for configure to find the include and libraries files from the command line - #NOTE : once compilation is done, you should unlink with brew unlink openssl to avoid conflict in macosX - echo "Before compilation, do \nbrew link --force openssl\nOnce compilation is finalized do\nbrew unlink openssl\n to avoid conflict with mac OS X openssl version\n" -elif [[ "$OSTYPE" == "cygwin" ]]; then - # POSIX compatibility layer and Linux environment emulation for Windows - echo "cygwin build not available for the moment" -elif [[ "$OSTYPE" == "msys" ]]; then - # Lightweight shell and GNU utilities compiled for Windows (part of MinGW) - echo "msys build not available for the moment" -elif [[ "$OSTYPE" == "win32" ]]; then - # I'm not sure this can happen. - echo "win32 build not available for the moment" -elif [[ "$OSTYPE" == "freebsd"* ]]; then - # ... - echo "freebsd build not available for the moment" -else - # Unknown. - echo "Unknown OS" -fi - -build_cppast() { - BUILDTYPE=$1 - BUILDPATH=${BUILDFOLDER}-${BUILDTYPE}/${TARGETPLATFORM} - if [ ! -d ${BUILDPATH} ]; then - echo "Creating ${BUILDFOLDER}-${BUILDTYPE} folder" - mkdir -p ${BUILDPATH} - fi - - echo "Building cppast in ${BUILDTYPE} mode" - - pushd ${BUILDPATH} - cmake -DCMAKE_BUILD_TYPE=${BUILDTYPE} ${CPPASTCMAKECOMPILER} -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DLLVM_CONFIG_BINARY=${LLVMCONFIGPATH} ../../cppast/ - make - popd -} - -build_cppast "Debug" -build_cppast "Release" \ No newline at end of file diff --git a/libs/cppast b/libs/cppast deleted file mode 160000 index 7c1b33d..0000000 --- a/libs/cppast +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7c1b33d3b7bb7e0a847ece7710bf32c6c8fe450e diff --git a/libs/stduuid b/libs/stduuid deleted file mode 160000 index 207f06b..0000000 --- a/libs/stduuid +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 207f06bd56b5d02b8bf4c4305e91f0da8fedbcb4 diff --git a/packagedependencies-android.txt b/packagedependencies-android.txt deleted file mode 100644 index affd587..0000000 --- a/packagedependencies-android.txt +++ /dev/null @@ -1,2 +0,0 @@ -boost#stable|1.84.0|boost|conan|conan-center|default|without_stacktrace=True -grpc|1.37.1|grpc++%WITHREMOTING|http|https://github.com/b-com-software-basis/thirdparties-binaries/releases/download|shared diff --git a/packagedependencies-linux.txt b/packagedependencies-linux.txt deleted file mode 100644 index a2228dd..0000000 --- a/packagedependencies-linux.txt +++ /dev/null @@ -1,2 +0,0 @@ -boost#stable|1.84.0|boost|conan|conan-center|default| -grpc|1.71.0|grpc++%WITHREMOTING|conan|conan-center|default|secure=True \ No newline at end of file diff --git a/packagedependencies-mac.txt b/packagedependencies-mac.txt deleted file mode 100644 index f14d73a..0000000 --- a/packagedependencies-mac.txt +++ /dev/null @@ -1,2 +0,0 @@ -boost#stable|1.84.0|boost|conan|conan-center|default| -grpc|1.44.0|grpc++%WITHREMOTING|brew@system| diff --git a/packagedependencies-win.txt b/packagedependencies-win.txt deleted file mode 100644 index b26b3ed..0000000 --- a/packagedependencies-win.txt +++ /dev/null @@ -1,2 +0,0 @@ -boost#stable|1.84.0|boost|conan|conan-center|default| -grpc|1.71.0|grpc++%WITHREMOTING|conan|conan-center|static|secure=True diff --git a/packagedependencies.txt b/packagedependencies.txt index e69de29..d318766 100644 --- a/packagedependencies.txt +++ b/packagedependencies.txt @@ -0,0 +1 @@ +boost|1.64.0|boost|thirdParties|http://repository.b-com.com/amc-generic diff --git a/remaken-xpcf-std.pc.in b/remaken-xpcf-std.pc.in deleted file mode 100644 index e894849..0000000 --- a/remaken-xpcf-std.pc.in +++ /dev/null @@ -1,14 +0,0 @@ -libname=@TARGET@ -prefix=/usr/local -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${prefix}/interfaces - -Name: @TARGET@ -Description: -Version: @VERSION@ -Requires: -Libs: -L${libdir} -l${libname} -Libs.private: ${libdir}/${pfx}${libname}.${lext} -Cflags: -I${includedir} -I${includedir}/xpcf/core/stduuid -DXPCFVERSION=\"@VERSION@\" - diff --git a/remaken-xpcf.pc.in b/remaken-xpcf.pc.in deleted file mode 100644 index cf3477e..0000000 --- a/remaken-xpcf.pc.in +++ /dev/null @@ -1,14 +0,0 @@ -libname=@TARGET@ -prefix=/usr/local -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${prefix}/interfaces - -Name: @TARGET@ -Description: -Version: @VERSION@ -Requires: -Libs: -L${libdir} -l${libname} -Libs.private: ${libdir}/${pfx}${libname}.${lext} -Cflags: -I${includedir} -DXPCF_USE_BOOST -DWITH_REMOTING -DXPCFVERSION=\"@VERSION@\" - diff --git a/remaken-xpcf_static_deps.pc.in b/remaken-xpcf_static_deps.pc.in deleted file mode 100644 index cf3477e..0000000 --- a/remaken-xpcf_static_deps.pc.in +++ /dev/null @@ -1,14 +0,0 @@ -libname=@TARGET@ -prefix=/usr/local -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${prefix}/interfaces - -Name: @TARGET@ -Description: -Version: @VERSION@ -Requires: -Libs: -L${libdir} -l${libname} -Libs.private: ${libdir}/${pfx}${libname}.${lext} -Cflags: -I${includedir} -DXPCF_USE_BOOST -DWITH_REMOTING -DXPCFVERSION=\"@VERSION@\" - diff --git a/sample_component/.deps/C0.Po b/sample_component/.deps/C0.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/sample_component/.deps/C0.Po @@ -0,0 +1 @@ +# dummy diff --git a/sample_component/.deps/C0_main.Po b/sample_component/.deps/C0_main.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/sample_component/.deps/C0_main.Po @@ -0,0 +1 @@ +# dummy diff --git a/sample_component/.deps/scp_guide_test.Po b/sample_component/.deps/scp_guide_test.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/sample_component/.deps/scp_guide_test.Po @@ -0,0 +1 @@ +# dummy diff --git a/sample_component/C0.cpp b/sample_component/C0.cpp new file mode 100644 index 0000000..91f7570 --- /dev/null +++ b/sample_component/C0.cpp @@ -0,0 +1,124 @@ +/** + * @copyright Copyright (c) 2015 All Right Reserved, B-com http://www.b-com.com/ + * + * This file is subject to the B<>Com License. + * All other rights reserved. + * + * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY + * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A + * PARTICULAR PURPOSE. + * + * @author Loïc Touraine + * + * @file + * @brief description of file + * @date 2015-09-18 + */ + +#include +#include "C0.h" +#include "InterfaceMetadata.h" + +template<> XPCF_EXPORT_API C0* org::bcom::xpcf::ComponentFactory::createInstance() { + return new C0(); +} + + +constexpr const char * C0::UUID; + +C0::C0 () +{ + setUUID(C0::UUID); + addInterface(this,I0::UUID, "interface I0"); + addInterface(this,I1::UUID, "interface I1"); + addInterface(this,I2::UUID, "interface I2"); + printf("Constructor C0::C0 () called!\n"); + +} + +C0::~C0 () +{ + printf("Destructor C0::C0 () called!\n"); +} + +void C0::unloadComponent () +{ + printf("C0::unload () called!\n"); + + delete this; + return; +} + +void C0::I0_opname () +{ + + printf(" C0::I0_opname () called!\n"); + +} + +void C0::I0_opname2 () +{ + + printf(" C0::I0_opname2 () called!\n"); + +} + +void C0::I0_opname3 () +{ + + printf(" C0::I0_opname3 () called!\n"); + + +} + +void C0::I0_opname4 () +{ + + + printf(" C0::I0_opname4 () called!\n"); + + +} + +void C0::I0_opname5 () +{ + + printf(" C0::I0_opname5 () called!\n"); + +} + +void C0::I1_opname () +{ + + printf(" C0::I1_opname () called!\n"); + +} + +void C0::I1_opname2 () +{ + + printf(" C0::I1_opname2 () called!\n"); + +} + +void C0::I1_opname3 () +{ + + printf(" C0::I1_opname3 () called!\n"); + +} + +void C0::I1_opname4 () +{ + + printf(" C0::I1_opname4 () called!\n"); + +} + +void C0::I1_opname5 () +{ + + printf(" C0::I1_opname5 () called!\n"); + +} diff --git a/samples/sample_component/C0Bis.h b/sample_component/C0.h similarity index 69% rename from samples/sample_component/C0Bis.h rename to sample_component/C0.h index 9816aac..e20e0e9 100644 --- a/samples/sample_component/C0Bis.h +++ b/sample_component/C0.h @@ -16,24 +16,31 @@ * @date 2015-09-18 */ -#ifndef C0Bis_H -#define C0Bis_H 1 +#ifndef C0_h +#define C0_h 1 +// I0 +#include "I0.h" // I1 #include "I1.h" #include "I2.h" // XPCF_ComponentBase #include "ComponentBase.h" -#include - class C0 : public org::bcom::xpcf::ComponentBase, + public I0, +// public I1, public I2 { public: C0 (); ~C0(); void unloadComponent () override final; + void I0_opname () override; + void I0_opname2 () override; + void I0_opname3 () override; + void I0_opname4 () override; + void I0_opname5 () override; void I1_opname () override; void I1_opname2 () override; @@ -41,22 +48,13 @@ class C0 : public org::bcom::xpcf::ComponentBase, void I1_opname4 () override; void I1_opname5 () override; - void I2_opname () override; - - void I2_opname2 () override; + void I2_opname () override {}; + void I2_opname2 () override {}; + static constexpr const char * UUID = "ae9d10bb-4bd1-462b-8c01-43f1815c6ae0"; -private: - std::string m_name; // Data Members for Class Attributes }; -template <> struct org::bcom::xpcf::ComponentTraits -{ - static constexpr const char * UUID = "6B8F2FAD-5DFD-4390-B12E-B600C9FC5B12"; - static constexpr const char * DESCRIPTION = "C0 component"; -}; - - #endif diff --git a/samples/sample_component/C0Bis_main.cpp b/sample_component/C0_main.cpp similarity index 52% rename from samples/sample_component/C0Bis_main.cpp rename to sample_component/C0_main.cpp index 6b248f9..8968f09 100644 --- a/samples/sample_component/C0Bis_main.cpp +++ b/sample_component/C0_main.cpp @@ -16,23 +16,28 @@ * @date 2015-09-18 */ -#include "C0Bis.h" +#include "C0.h" #include "ComponentBase.h" -#include "ModuleFactory.h" +#include "ContainerFactory.h" #include namespace xpcf=org::bcom::xpcf; -XPCF_DECLARE_MODULE("A56027E1-B826-40DD-A47E-511E224BB6B9","Feature XXX container") +XPCF_DECLARE_CONTAINER("3b899ff0-e098-4218-bdaa-82abdec22960","Feature XXX container") -extern "C" XPCF_MODULEHOOKS_API xpcf::XPCFErrorCode XPCF_getComponent(const xpcf::uuids::uuid& componentUUID,SRef& interfaceRef) +extern "C" XPCF_EXPORT_API void XPCF_getComponent(const xpcf::uuids::uuid& componentUUID,SRef& interfaceRef) { - xpcf::XPCFErrorCode errCode = xpcf::XPCFErrorCode::_FAIL; - errCode = xpcf::tryCreateComponent(componentUUID,interfaceRef); - return errCode; + xpcf::uuids::uuid uuidOf_XPCF_CID_C0 = xpcf::toUUID( C0::UUID ); + // Test the UUID to be sure that this library implements this component. + if (componentUUID == uuidOf_XPCF_CID_C0 ) + { + xpcf::ComponentFactory::createComponent(interfaceRef); + } } XPCF_BEGIN_COMPONENTS_DECLARATION -XPCF_ADD_COMPONENT(C0) +XPCF_ADD_COMPONENT(C0::UUID,"Class C0") XPCF_END_COMPONENTS_DECLARATION + + diff --git a/sample_component/I0.h b/sample_component/I0.h new file mode 100644 index 0000000..6cc52f7 --- /dev/null +++ b/sample_component/I0.h @@ -0,0 +1,38 @@ +/** + * @copyright Copyright (c) 2015 All Right Reserved, B-com http://www.b-com.com/ + * + * This file is subject to the B<>Com License. + * All other rights reserved. + * + * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY + * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A + * PARTICULAR PURPOSE. + * + * @author Loïc Touraine + * + * @file + * @brief description of file + * @date 2015-09-18 + */ + +#ifndef I0_h +#define I0_h 1 + +#include "IComponentIntrospect.h" + +class I0 : public virtual org::bcom::xpcf::IComponentIntrospect +{ + + public: + virtual ~I0() {} + virtual void I0_opname () = 0; + virtual void I0_opname2 () = 0; + virtual void I0_opname3 () = 0; + virtual void I0_opname4 () = 0; + virtual void I0_opname5 () = 0; + + static constexpr const char * UUID = "46333fd5-9eeb-4c9a-9912-b7df96ccf5fc"; + +}; +#endif diff --git a/sample_component/I1.h b/sample_component/I1.h new file mode 100644 index 0000000..1af6d73 --- /dev/null +++ b/sample_component/I1.h @@ -0,0 +1,39 @@ +/** + * @copyright Copyright (c) 2015 All Right Reserved, B-com http://www.b-com.com/ + * + * This file is subject to the B<>Com License. + * All other rights reserved. + * + * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY + * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A + * PARTICULAR PURPOSE. + * + * @author Loïc Touraine + * + * @file + * @brief description of file + * @date 2015-09-18 + */ + +#ifndef I1_h +#define I1_h 1 + +#include "IComponentIntrospect.h" + +class I1 : public virtual org::bcom::xpcf::IComponentIntrospect +{ + public: + virtual ~I1() {} + virtual void I1_opname () = 0; + virtual void I1_opname2 () = 0; + virtual void I1_opname3 () = 0; + virtual void I1_opname4 () = 0; + virtual void I1_opname5 () = 0; + + static constexpr const char * UUID = "3bc8f5ea-ee24-473e-8afd-4f5b1b21c018"; + + +}; + +#endif diff --git a/interfaces/ManagedCppAspects.h b/sample_component/I2.h similarity index 51% rename from interfaces/ManagedCppAspects.h rename to sample_component/I2.h index 1e07122..02cabef 100644 --- a/interfaces/ManagedCppAspects.h +++ b/sample_component/I2.h @@ -13,25 +13,22 @@ * * @file * @brief description of file - * @date 2017-09-18 + * @date 2015-09-18 */ -#ifndef XPCF_MANAGEDCPPASPECTS_H -#define XPCF_MANAGEDCPPASPECTS_H +#ifndef I2_H +#define I2_H +#include "I1.h" -#ifdef XPCF_MANAGED_CPP_ENABLED -#define interface public __gc __interface -#define gc_class public __gc class -#define gc_struct public __gc struct -#define unmanaged_const_method -#using -#else -#define interface class -#define gc_class class -#define gc_struct struct -#define __nogc -#define __gc -#define unmanaged_const_method const -#endif +class I2 : public I1 +{ +public: + virtual ~I2() {} + virtual void I2_opname () = 0; -#endif + virtual void I2_opname2 () = 0; + static constexpr const char * UUID = "41348765-1017-47a7-ab9F-6b59d39e4b95"; +}; + + +#endif // I2_H diff --git a/samples/sample_component/remaken-xpcfSampleComponentBis.pc.in b/sample_component/bcom-xpcfSampleComponent.pc.in similarity index 100% rename from samples/sample_component/remaken-xpcfSampleComponentBis.pc.in rename to sample_component/bcom-xpcfSampleComponent.pc.in diff --git a/sample_component/packagedependencies.txt b/sample_component/packagedependencies.txt new file mode 100644 index 0000000..05f5e2b --- /dev/null +++ b/sample_component/packagedependencies.txt @@ -0,0 +1,2 @@ +xpcf|1.0.0|xpcf|bcomBuild|http://repository.b-com.com/amc-generic +boost|1.64.0|boost-include|thirdParties|http://repository.b-com.com/amc-generic diff --git a/samples/sample_component/xpcfSampleComponentBis.pro b/sample_component/xpcfSampleComponent.pro similarity index 87% rename from samples/sample_component/xpcfSampleComponentBis.pro rename to sample_component/xpcfSampleComponent.pro index 5510d0f..ec800be 100644 --- a/samples/sample_component/xpcfSampleComponentBis.pro +++ b/sample_component/xpcfSampleComponent.pro @@ -1,7 +1,7 @@ QT -= core gui CONFIG -= app_bundle qt -TARGET = xpcfSampleComponentBis +TARGET = xpcfSampleComponent INSTALLSUBDIR = bcomBuild FRAMEWORK = $${TARGET} VERSION=1.0.0 @@ -15,15 +15,22 @@ DEPENDENCIESCONFIG = sharedlib #NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibbundle.pri inclusion include (../builddefs/qmake/templatelibconfig.pri) +staticlib { + DEFINES += XPCF_STATIC +} else { + DEFINES += XPCF_SHARED +} + SOURCES += \ - C0Bis.cpp \ - C0Bis_main.cpp + C0_main.cpp \ + C0.cpp HEADERS += \ + C0.h \ + I0.h \ I1.h \ - I2.h \ - C0Bis.h + I2.h unix { diff --git a/samples/interfaces/IMessage.h b/samples/interfaces/IMessage.h deleted file mode 100644 index 9f63c0b..0000000 --- a/samples/interfaces/IMessage.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef IMESSAGE_H -#define IMESSAGE_H - - -#include - - - -class IMessage: virtual public org::bcom::xpcf::IComponentIntrospect -{ -public: - virtual ~IMessage() override = default; - virtual void print() = 0; -}; - - - -template <> struct org::bcom::xpcf::InterfaceTraits -{ - static constexpr const char * UUID = "9E04C615-8EE7-4C52-83A4-8104A209CAFC"; - static constexpr const char * NAME = "IMessage"; - static constexpr const char * DESCRIPTION = "IMessage interface description"; -}; - -#endif // IMESSAGE_H diff --git a/samples/sample_component/BUILD b/samples/sample_component/BUILD deleted file mode 100644 index f82176b..0000000 --- a/samples/sample_component/BUILD +++ /dev/null @@ -1,15 +0,0 @@ -cc_library( - name = "xpcfSampleComponent", - defines = [ - "BOOST_ALL_NO_LIB", - "BOOST_ALL_DYN_LINK", - "XPCFSUBDIRSEARCH=\\\"debug\\\"", - "TIXML_USE_STL" - ], - copts = ["-std=c++17"], - hdrs = glob(["*.h"]), - srcs = ["Guitar.cpp", "HumanMusician.cpp", "Ibanez7ElectricGuitar.cpp", "JacksonDinky6ElectricGuitar.cpp", "TakamineFolkGuitar.cpp", "Tuner.cpp", "VirtualGuitarist.cpp"], - linkstatic = False, - deps = ["@boost//:boost","@xpcf//:xpcf"], - visibility = ["//visibility:public"], -) \ No newline at end of file diff --git a/samples/sample_component/C0Bis.cpp b/samples/sample_component/C0Bis.cpp deleted file mode 100644 index b1f11dd..0000000 --- a/samples/sample_component/C0Bis.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/** - * @copyright Copyright (c) 2015 All Right Reserved, B-com http://www.b-com.com/ - * - * This file is subject to the B<>Com License. - * All other rights reserved. - * - * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY - * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A - * PARTICULAR PURPOSE. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2015-09-18 - */ - -#include -#include "C0Bis.h" -#include "InterfaceMetadata.h" -#include - -template<> XPCF_EXPORT_API C0* org::bcom::xpcf::ComponentFactory::createInstance() { - return new C0(); -} - -C0::C0 ():m_name("C0Bis") -{ - setMetadata(); - addInterface(this); - addInterface(this); - std::cout< -#include "I0.h" -#include "I0.pb.h" -#include "I0.grpc.pb.h" - -#include "GrpcManager.h" - -using namespace std; - - virtual void I0_opname () = 0 -{ - - GrpcManager::getInstance().initialize(); - I0::I0Service_Stub * grpcStub = GrpcManager::getInstance().getServiceStub(); - I0::I0_opnameRequest request; - I0::I0_opnameResponse response; - try{ - grpcStub->I0_opnameStub(request, &response, GrpcManager::getInstance().getTimeOut()); - cout << response.DebugString() << endl; - return static_cast(response.result()); - } catch (grpc::rpc_error &e) { - cout << "Error: " << e.what() << endl; - } -} // virtual void I0_opname () = 0 - - - virtual void I0_opname2 () = 0 -{ - - GrpcManager::getInstance().initialize(); - I0::I0Service_Stub * grpcStub = GrpcManager::getInstance().getServiceStub(); - I0::I0_opname2Request request; - I0::I0_opname2Response response; - try{ - grpcStub->I0_opname2Stub(request, &response, GrpcManager::getInstance().getTimeOut()); - cout << response.DebugString() << endl; - return static_cast(response.result()); - } catch (grpc::rpc_error &e) { - cout << "Error: " << e.what() << endl; - } -} // virtual void I0_opname2 () = 0 - - - virtual void I0_opname3 () = 0 -{ - - GrpcManager::getInstance().initialize(); - I0::I0Service_Stub * grpcStub = GrpcManager::getInstance().getServiceStub(); - I0::I0_opname3Request request; - I0::I0_opname3Response response; - try{ - grpcStub->I0_opname3Stub(request, &response, GrpcManager::getInstance().getTimeOut()); - cout << response.DebugString() << endl; - return static_cast(response.result()); - } catch (grpc::rpc_error &e) { - cout << "Error: " << e.what() << endl; - } -} // virtual void I0_opname3 () = 0 - - - virtual void I0_opname4 () = 0 -{ - - GrpcManager::getInstance().initialize(); - I0::I0Service_Stub * grpcStub = GrpcManager::getInstance().getServiceStub(); - I0::I0_opname4Request request; - I0::I0_opname4Response response; - try{ - grpcStub->I0_opname4Stub(request, &response, GrpcManager::getInstance().getTimeOut()); - cout << response.DebugString() << endl; - return static_cast(response.result()); - } catch (grpc::rpc_error &e) { - cout << "Error: " << e.what() << endl; - } -} // virtual void I0_opname4 () = 0 - - - virtual void I0_opname5 () = 0 -{ - - GrpcManager::getInstance().initialize(); - I0::I0Service_Stub * grpcStub = GrpcManager::getInstance().getServiceStub(); - I0::I0_opname5Request request; - I0::I0_opname5Response response; - try{ - grpcStub->I0_opname5Stub(request, &response, GrpcManager::getInstance().getTimeOut()); - cout << response.DebugString() << endl; - return static_cast(response.result()); - } catch (grpc::rpc_error &e) { - cout << "Error: " << e.what() << endl; - } -} // virtual void I0_opname5 () = 0 - - diff --git a/samples/sample_component/Guitar.cpp b/samples/sample_component/Guitar.cpp deleted file mode 100644 index 6a2f888..0000000 --- a/samples/sample_component/Guitar.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2018-06-25 - */ - -#include -#include "Guitar.h" -#include -#include "xpcfSampleComponentAPI.h" - -namespace xpcf = org::bcom::xpcf; - -namespace component { - -Guitar::Guitar (std::map componentInfosMap):xpcf::ComponentBase(componentInfosMap) -{ - declareInterface(this); - declareInjectable(m_tuner); - /* declareProperty("brand",m_brandName); - declareProperty("numberOfStrings",m_nbStrings); - declareProperty("guitarType",m_type);*/ - std::cout<<"Constructor Guitar::Guitar () called!"< -/** - * @ingroup components - */ -namespace component { - -/** - * @class Guitar - * This component shows the implementation of a configurable component. - * It inherits the ConfigurableBase class, hence it provides IConfigurable capabilities. - * Guitar implementation wraps some of its inner members' data as IProperties, giving a generic and public access to those members. - * Guitar configuration is declared in the components' configuration file. - * - * @note When a Guitar component is created through the XPCF ComponentManager it is also configured with the default values declared in the xpcf_registry_test.xml. - * @note The needed ComponentTraits template struct defining the Guitar UUID and description is located - * in the xpcfSampleComponent_traits.h header file. - * It allows Guitar users to use directly a forward declared type - * to invoke Guitar creation without depending on the concrete implementation. - */ -class Guitar : public org::bcom::xpcf::ComponentBase, - virtual public IGuitar - -{ -public: - Guitar(std::map componentInfosMap); - virtual ~Guitar() override; - void unloadComponent () override final; - const char * getGuitarBrand () override { return m_brandName.c_str(); } - uint32_t getNbStrings () override { return m_nbStrings; } - GuitarType getGuitarType () override { return static_cast(m_type); } - ITuner::TuneType getTuneType () override { return m_tuner->getTuneType(); } - -protected: - // Component properties defined as members' data - SRef m_tuner; - std::string m_brandName; - uint32_t m_nbStrings; - uint32_t m_type; -}; - -} - - -#endif diff --git a/samples/sample_component/HumanMusician.cpp b/samples/sample_component/HumanMusician.cpp deleted file mode 100755 index 41802bb..0000000 --- a/samples/sample_component/HumanMusician.cpp +++ /dev/null @@ -1,145 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-03-07 - */ - -#include -#include "HumanMusician.h" -#include -#include "xpcfSampleComponentAPI.h" - -namespace xpcf = org::bcom::xpcf; - -template<> component::HumanMusician* xpcf::ComponentFactory::createInstance(); - -namespace component { -HumanMusician::HumanMusician ():xpcf::ComponentBase(xpcf::toMap()),m_name("HumanMusician") -{ - declareInterface(this); - declareInterface(this); - std::cout< -/** - * @ingroup components - */ -namespace component { - - -/** - * @class HumanMusician - * This component shows the implementation of a simple component. - * It inherits the ComponentBase class, hence it does not provide IConfigurable capabilities (no property handling). - * ComponentBase provides the minimum implementation for interface introspection. - * - * @note The needed ComponentTraits template struct defining the HumanMusician UUID and description is located - * in the xpcfSampleComponent_traits.h header file. - * It allows HumanMusician users to use directly a forward declared type - * to invoke HumanMusician creation without depending on the concrete implementation. - */ -class HumanMusician : public org::bcom::xpcf::ComponentBase, - public IHuman, - public IMusician - -{ -public: - HumanMusician (); - ~HumanMusician() override; - void unloadComponent () override final; - void play () override; - void eat () override; - void sleep () override; - void kiss () override; - void work () override; - - void learn () override; - void playMusic (const MusicScore & score) override; - void playScore (std::vector> & score) override; - void playModifyScore (std::vector> & score) override; - void listen () override; - void practice () override; - void party () override; - -private: - std::string m_name; -}; - -} -#endif diff --git a/samples/sample_component/IGuitar.h b/samples/sample_component/IGuitar.h deleted file mode 100644 index d0da865..0000000 --- a/samples/sample_component/IGuitar.h +++ /dev/null @@ -1,118 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-03-07 - */ - -#ifndef IGUITAR_H -#define IGUITAR_H -#include "xpcf/api/IComponentIntrospect.h" -/** - * @ingroup interfaces - */ -/** - * @class IGuitar - * This interface declares a set of methods describing a musical instrument. - * It inherits from org::bcom::xpcf::IComponentIntrospect to provide introspection capabilities. - * - * @note The InterfaceTraits template struct defines the IGuitar UUID and description. - * It allows IGuitar users to use directly the I0 type instead of its UUID to bind the component to this interface. - */ - -/** - * @ingroup interfaces - */ - -class -#ifndef SWIG - [[xpcf::clientUUID("fe931815-479c-4659-96c3-09074747796d")]] [[xpcf::serverUUID("2ee889a4-bb14-46a0-b6e9-a391f61e4ad0")]] -#endif -ITuner : - virtual public org::bcom::xpcf::IComponentIntrospect -{ -public: - enum TuneType { - Standard = 0, - Nashville = 1, - HalfTuneLower = 2, - OneTuneLower = 3, - TuneDADGAD = 4, - dropD = 5 - }; - - virtual ~ITuner() = default; - virtual TuneType getTuneType () = 0; - virtual void setTuneType(const TuneType & tuneType) = 0; -}; - - -class -#ifndef SWIG - [[xpcf::clientUUID("734ee845-fa91-49b3-8a9b-37338f8a40cf")]] [[xpcf::serverUUID("3e6ff511-ced5-440e-b101-880862726a30")]] [[grpc::noCompression]] -#endif -IGuitar : - virtual public org::bcom::xpcf::IComponentIntrospect -{ -public: - enum GuitarType { - Acoustic = 0, - Folk = 1, - Electric = 2 - }; - virtual ~IGuitar() = default; - virtual const char * getGuitarBrand () = 0; - virtual uint32_t getNbStrings () = 0; - virtual GuitarType getGuitarType () = 0; - virtual ITuner::TuneType getTuneType () = 0; -}; - -class -#ifndef SWIG - [[xpcf::clientUUID("b433029e-a2cb-4ef1-8c06-e4aff4b24bd3")]] [[xpcf::serverUUID("b2ff5795-69ba-42e2-b3bf-417ad6fd023f")]] -#endif -IElectricGuitar : virtual public org::bcom::xpcf::IComponentIntrospect -{ -public: - virtual ~IElectricGuitar() = default; - virtual void setDistortionLevel (uint32_t level) = 0; - virtual uint32_t getDistortionLevel () = 0; -}; - -template <> struct org::bcom::xpcf::InterfaceTraits -{ - static constexpr const char * UUID = "6279BB1D-69B5-42BD-9DA1-743C8922BCB9"; - static constexpr const char * NAME = "IGuitar"; - static constexpr const char * DESCRIPTION = "provides instrument specific methods"; -}; - -template <> struct org::bcom::xpcf::InterfaceTraits -{ - static constexpr const char * UUID = "93E50702-41BA-4497-9BBE-C918C1A87814"; - static constexpr const char * NAME = "IElectricGuitar"; - static constexpr const char * DESCRIPTION = "provides electric guitar specific methods"; -}; - -template <> struct org::bcom::xpcf::InterfaceTraits -{ - static constexpr const char * UUID = "1FC313B3-FAE3-4BCA-B4BE-222EFD24E607"; - static constexpr const char * NAME = "ITuner"; - static constexpr const char * DESCRIPTION = "defines guitar tune modes"; -}; - -#endif // IGUITAR_H diff --git a/samples/sample_component/IGuitarist.h b/samples/sample_component/IGuitarist.h deleted file mode 100644 index 1fe4390..0000000 --- a/samples/sample_component/IGuitarist.h +++ /dev/null @@ -1,63 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-03-07 - */ - -#ifndef IGUITARIST_H -#define IGUITARIST_H -#include "IMusician.h" -#include "IGuitar.h" -/** - * @ingroup interfaces - */ - -/** - * @class IGuitarist - * This interface declares a set of methods describing a guitarist. - * It inherits from org::bcom::xpcf::IComponentIntrospect to provide introspection capabilities. - * - * @note The InterfaceTraits template struct defines the IGuitarist UUID and description. - * It allows IGuitarist users to use directly the IGuitarist type instead of its UUID to bind the component to this interface. - */ - - -class -#ifndef SWIG - [[xpcf::clientUUID("824b6642-ad39-476a-80c1-8ee16614f9fc")]] [[xpcf::serverUUID("acacf288-ee43-494b-a4a0-c30737bc150f")]] -#endif -IGuitarist : virtual public IMusician -{ -public: - virtual ~IGuitarist() = default; - virtual void playSolo (MusicScore & score) = 0; - virtual void playRhythm () = 0; - virtual SRef getGuitar() = 0; - virtual SRef getGuitar(IGuitar::GuitarType type) = 0; - virtual std::vector getGuitarCollection() = 0; -}; - -template <> struct org::bcom::xpcf::InterfaceTraits -{ - static constexpr const char * UUID = "{41348765-1017-47a7-ab9F-6b59d39e4b95}"; - static constexpr const char * NAME = "IGuitarist"; - static constexpr const char * DESCRIPTION = "provides guitar player specific methods"; -}; - -#endif // IGUITARIST_H diff --git a/samples/sample_component/IHuman.h b/samples/sample_component/IHuman.h deleted file mode 100644 index 0c07eb8..0000000 --- a/samples/sample_component/IHuman.h +++ /dev/null @@ -1,71 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-03-07 - */ - -#ifndef IHUMAN_H -#define IHUMAN_H 1 - -#include "xpcf/api/IComponentIntrospect.h" -/** - * @ingroup interfaces - */ -/** - * @class IHuman - * This interface declares a set of methods describing a human being behaviors. - * It inherits from org::bcom::xpcf::IComponentIntrospect to provide introspection capabilities. - * - * @note The InterfaceTraits template struct defines the IHuman UUID and description. - * It allows IHuman users to use directly the IHuman type instead of its UUID to bind the component to this interface. - */ - - -class -#ifndef SWIG - [[xpcf::clientUUID("2fff72e8-b192-477d-83d7-7dad07564c46")]] [[xpcf::serverUUID("c21d04f4-6f3e-4a79-b541-b094bb64cb95")]] -#endif -IHuman : virtual public org::bcom::xpcf::IComponentIntrospect -{ - -public: - virtual ~IHuman() = default; - virtual void play () = 0; - virtual void eat () = 0; - virtual void sleep () = 0; - virtual void kiss () = 0; - virtual void work () = 0; - -}; - -/** - * @struct InterfaceTraits instanciation. - * - * The code below shows the instanciation of the InterfaceTraits template struct for IHuman interface type. - * The syntax is the full template instanciation syntax. - */ -template <> struct org::bcom::xpcf::InterfaceTraits<::IHuman> -{ - static constexpr const char * UUID = "46333fd5-9eeb-4c9a-9912-b7df96ccf5fc"; - static constexpr const char * NAME = "IHuman"; - static constexpr const char * DESCRIPTION = "provides human related methods"; -}; - - -#endif diff --git a/samples/sample_component/IMusician.h b/samples/sample_component/IMusician.h deleted file mode 100644 index 9ecfb27..0000000 --- a/samples/sample_component/IMusician.h +++ /dev/null @@ -1,102 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-03-07 - */ - -#ifndef IMUSICIAN_H -#define IMUSICIAN_H 1 - -#include "xpcf/api/IComponentIntrospect.h" - -struct MusicScore { - MusicScore() = default; - ~MusicScore() = default; - void add(std::string key, float duration) - { - m_score.push_back(std::make_pair(key,duration)); - } - uint32_t m_tempo = 120; - std::vector> m_score; -}; - -namespace boost { namespace serialization { - -template -inline void serialize(Archive & ar, - MusicScore & score, - const unsigned int version) -{ - ar & score.m_tempo; - ar & score.m_score; -} - - -}} // namespace boost::serialization - - -/** - * @ingroup interfaces - */ -/** - * @class IMusician - * This interface declares a set of methods describing a musician. - * It inherits from org::bcom::xpcf::IComponentIntrospect to provide introspection capabilities. - * - * @note The InterfaceTraits template struct defines the IMusician UUID and description. - * It allows IMusician users to use directly the I0 type instead of its UUID to bind the component to this interface. - */ - - -class -#ifndef SWIG - [[xpcf::clientUUID("98626b20-3f78-42e0-9891-221be79902cf")]] [[xpcf::serverUUID("eda6836a-6568-4135-b241-5f245574bee9")]] -#endif -IMusician : virtual public org::bcom::xpcf::IComponentIntrospect -{ -public: - virtual ~IMusician() = default; - virtual void learn () = 0; - virtual void playMusic (const MusicScore & score) = 0; -#ifndef SWIG -[[grpc::noCompression]] -#endif - virtual void playScore (std::vector> & score) = 0; - virtual void playModifyScore (std::vector> & score) = 0; - virtual void listen () = 0; - virtual void practice () = 0; - virtual void party () = 0; - -}; - -/** - * @struct InterfaceTraits instanciation. - * - * The code below shows the instanciation of the InterfaceTraits template struct for IMusician interface type. - * The syntax uses the XPCF_DEFINE_INTERFACE_TRAITS helper macro. - * - * @note although the syntax seems easier, it obfuscates the InterfaceTraits expansion. - */ - -XPCF_DEFINE_INTERFACE_TRAITS(::IMusician, - "3bc8f5ea-ee24-473e-8afd-4f5b1b21c018", - "IMusician", - "provides musician related methods"); - -#endif diff --git a/samples/sample_component/Ibanez7ElectricGuitar.cpp b/samples/sample_component/Ibanez7ElectricGuitar.cpp deleted file mode 100644 index 254f963..0000000 --- a/samples/sample_component/Ibanez7ElectricGuitar.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2018-06-25 - */ - -#include -#include "Ibanez7ElectricGuitar.h" -#include -#include "xpcfSampleComponentAPI.h" - -namespace xpcf = org::bcom::xpcf; - -template<> component::Ibanez7ElectricGuitar* xpcf::ComponentFactory::createInstance(); - -namespace component { - - -Ibanez7ElectricGuitar::Ibanez7ElectricGuitar ():Guitar(xpcf::toMap()) -{ - declareInterface(this); - std::cout<<"Constructor Ibanez7ElectricGuitar::Ibanez7ElectricGuitar () called!"< -/** - * @ingroup components - */ -namespace component { - -/** - * @class Ibanez7ElectricGuitar - * This component shows the implementation of a configurable component. - * It inherits the ConfigurableBase class, hence it provides IConfigurable capabilities. - * Ibanez7ElectricGuitar implementation wraps some of its inner members' data as IProperties, giving a generic and public access to those members. - * Ibanez7ElectricGuitar configuration is declared in the components' configuration file. - * - * @note When a Ibanez7ElectricGuitar component is created through the XPCF ComponentManager it is also configured with the default values declared in the xpcf_registry_test.xml. - * @note The needed ComponentTraits template struct defining the Ibanez7ElectricGuitar UUID and description is located - * in the xpcfSampleComponent_traits.h header file. - * It allows Ibanez7ElectricGuitar users to use directly a forward declared type - * to invoke Ibanez7ElectricGuitar creation without depending on the concrete implementation. - */ -class Ibanez7ElectricGuitar : public Guitar, virtual public IElectricGuitar - -{ -public: - Ibanez7ElectricGuitar(); - ~Ibanez7ElectricGuitar() override; - void setDistortionLevel (uint32_t level) override { m_distortionLevel = level; } - uint32_t getDistortionLevel () override { return m_distortionLevel; } - -private: - uint32_t m_distortionLevel; -}; - -} - -#endif diff --git a/samples/sample_component/JacksonDinky6ElectricGuitar.cpp b/samples/sample_component/JacksonDinky6ElectricGuitar.cpp deleted file mode 100644 index 6bd5f56..0000000 --- a/samples/sample_component/JacksonDinky6ElectricGuitar.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2018-06-25 - */ - -#include -#include "JacksonDinky6ElectricGuitar.h" -#include -#include "xpcfSampleComponentAPI.h" - -namespace xpcf = org::bcom::xpcf; - -template<> component::JacksonDinky6ElectricGuitar* xpcf::ComponentFactory::createInstance(); - -namespace component { - - -JacksonDinky6ElectricGuitar::JacksonDinky6ElectricGuitar ():Guitar(xpcf::toMap()) -{ - declareInterface(this); - std::cout<<"Constructor JacksonDinky6ElectricGuitar::JacksonDinky6ElectricGuitar () called!"< -/** - * @ingroup components - */ -namespace component { - -/** - * @class JacksonDinky6ElectricGuitar - * This component shows the implementation of a configurable component. - * It inherits the ConfigurableBase class, hence it provides IConfigurable capabilities. - * JacksonDinky6ElectricGuitar implementation wraps some of its inner members' data as IProperties, giving a generic and public access to those members. - * JacksonDinky6ElectricGuitar configuration is declared in the components' configuration file. - * - * @note When a JacksonDinky6ElectricGuitar component is created through the XPCF ComponentManager it is also configured with the default values declared in the xpcf_registry_test.xml. - * @note The needed ComponentTraits template struct defining the JacksonDinky6ElectricGuitar UUID and description is located - * in the xpcfSampleComponent_traits.h header file. - * It allows JacksonDinky6ElectricGuitar users to use directly a forward declared type - * to invoke JacksonDinky6ElectricGuitar creation without depending on the concrete implementation. - */ -class JacksonDinky6ElectricGuitar : public Guitar, virtual public IElectricGuitar - -{ -public: - JacksonDinky6ElectricGuitar(); - ~JacksonDinky6ElectricGuitar() override; - void setDistortionLevel (uint32_t level) override { m_distortionLevel = level; } - uint32_t getDistortionLevel () override { return m_distortionLevel; } - -private: - uint32_t m_distortionLevel; -}; - -} - -#endif diff --git a/samples/sample_component/TakamineFolkGuitar.cpp b/samples/sample_component/TakamineFolkGuitar.cpp deleted file mode 100644 index e2194df..0000000 --- a/samples/sample_component/TakamineFolkGuitar.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2018-06-25 - */ - -#include -#include "TakamineFolkGuitar.h" -#include -#include "xpcfSampleComponentAPI.h" - -namespace xpcf = org::bcom::xpcf; - -template<> component::TakamineFolkGuitar* xpcf::ComponentFactory::createInstance(); - -namespace component { - - -TakamineFolkGuitar::TakamineFolkGuitar ():Guitar(xpcf::toMap()) -{ - std::cout<<"Constructor TakamineFolkGuitar::TakamineFolkGuitar () called!"< -/** - * @ingroup components - */ -namespace component { - -/** - * @class TakamineFolkGuitar - * This component shows the implementation of a configurable component. - * It inherits the ConfigurableBase class, hence it provides IConfigurable capabilities. - * TakamineFolkGuitar implementation wraps some of its inner members' data as IProperties, giving a generic and public access to those members. - * TakamineFolkGuitar configuration is declared in the components' configuration file. - * - * @note When a TakamineFolkGuitar component is created through the XPCF ComponentManager it is also configured with the default values declared in the xpcf_registry_test.xml. - * @note The needed ComponentTraits template struct defining the TakamineFolkGuitar UUID and description is located - * in the xpcfSampleComponent_traits.h header file. - * It allows TakamineFolkGuitar users to use directly a forward declared type - * to invoke TakamineFolkGuitar creation without depending on the concrete implementation. - */ -class TakamineFolkGuitar : public Guitar - -{ -public: - TakamineFolkGuitar(); - ~TakamineFolkGuitar() override; -}; - -} - -#endif diff --git a/samples/sample_component/Tuner.cpp b/samples/sample_component/Tuner.cpp deleted file mode 100644 index d392acc..0000000 --- a/samples/sample_component/Tuner.cpp +++ /dev/null @@ -1,52 +0,0 @@ -#include "Tuner.h" - -namespace xpcf = org::bcom::xpcf; - -template<> component::Tuner * xpcf::ComponentFactory::createInstance(); - - -namespace component { -Tuner::Tuner():xpcf::ConfigurableBase(xpcf::toMap()) -{ - declareInterface(this); - // Inject declarations come here : declare any component that must be injected to your component through its interface /////////////////////////..///// declareInjectable(m_filter); - // - // Inject declaration can have a name : - // declareInjectable(m_blurFilter, "blurFilter"); - // - // Inject declaration can be optional i.e. not finding a binding component for the interface is not an error : - // declareInjectable(m_imageFilter, false); - - // wrap any component member variable to expose as properties with declareProperty() with T matching the variable type - // For example : declareProperty("blurFactor",m_blurFactor); - // declareProperty("name",m_memberVariable) also works with template type deduction when m_memberVariable is a supported type of IProperty - declareProperty("TuneType",m_tuneType); - std::cout<<"Constructor Tuner::Tuner () called!"< - -#include "IGuitar.h" - -namespace component { - -class Tuner : public org::bcom::xpcf::ConfigurableBase, virtual public ITuner -{ -public: - Tuner(); - ~Tuner() override; - void unloadComponent () override; - - TuneType getTuneType () override { return static_cast(m_tuneType); } - void setTuneType(const TuneType & tuneType) override { m_tuneType = tuneType; } - - org::bcom::xpcf::XPCFErrorCode onConfigured() override; - void onInjected() override; - -private: - uint64_t m_tuneType = TuneType::Standard; -}; -} - - -template <> struct org::bcom::xpcf::ComponentTraits -{ - static constexpr const char * UUID = "{5644b791-b684-4203-8479-391776f3f623}"; - static constexpr const char * NAME = "Tuner"; - static constexpr const char * DESCRIPTION = "Tuner implements ITuner interface"; -}; - - -#endif // TUNER_H diff --git a/samples/sample_component/VirtualGuitarist.cpp b/samples/sample_component/VirtualGuitarist.cpp deleted file mode 100755 index fcd4bfa..0000000 --- a/samples/sample_component/VirtualGuitarist.cpp +++ /dev/null @@ -1,169 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2018-06-25 - */ - -#include -#include "VirtualGuitarist.h" -#include -#include "xpcfSampleComponentAPI.h" -#include - -namespace xpcf = org::bcom::xpcf; - -template<> component::VirtualGuitarist* xpcf::ComponentFactory::createInstance(); - -namespace component { - -VirtualGuitarist::VirtualGuitarist ():xpcf::ConfigurableBase(xpcf::toMap()),m_name("VirtualGuitarist") -{ - declareInterface(this); - declareInterface(this); - declareInjectable(m_guitar); - declareInjectable(m_electricGuitar,"electricGuitar"); - declareInjectable(m_guitars); - declareProperty("blurFactor",m_blurFactor); - m_blurScales.resize(4); - declarePropertySequence("blurScale",m_blurScales); - declarePropertyNode("blurMatrixRepartition",m_blurMatrixRepartition); - declareProperty(m_blurMatrixRepartition,"cols",m_cols); - declareProperty(m_blurMatrixRepartition,"rows",m_rows); - m_matrixValues.resize(4); - declarePropertySequence(m_blurMatrixRepartition,"values",m_matrixValues); - std::cout<(m_folkGuitar,"folkGuitar",true); -} - -void VirtualGuitarist::unloadComponent () -{ - std::cout< VirtualGuitarist::getGuitar(IGuitar::GuitarType type) -{ - switch(type) { - case IGuitar::GuitarType::Electric : - return m_electricGuitar->bindTo(); - break; - case IGuitar::GuitarType::Folk : - return m_folkGuitar; - break; - default: - return m_guitar; - break; - } - return m_guitar; -} - -std::vector VirtualGuitarist::getGuitarCollection() -{ - std::vector guitars; - for (auto g : *m_guitars) { - guitars.push_back(g->bindTo()->getGuitarBrand()); - } - return guitars; -} - -} diff --git a/samples/sample_component/VirtualGuitarist.h b/samples/sample_component/VirtualGuitarist.h deleted file mode 100644 index 783c84f..0000000 --- a/samples/sample_component/VirtualGuitarist.h +++ /dev/null @@ -1,93 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2018-06-25 - */ - -#ifndef VIRTUALGUITARIST_H -#define VIRTUALGUITARIST_H 1 - -#include "IGuitarist.h" - -#include "xpcfSampleComponent_traits.h" -#include -#include - -#include -/** - * @ingroup components - */ -namespace component { - -/** - * @class VirtualGuitarist - * This component shows the implementation of a configurable component. - * It inherits the ConfigurableBase class, hence it provides IConfigurable capabilities. - * VirtualGuitarist implementation wraps some of its inner members' data as IProperties, giving a generic and public access to those members. - * VirtualGuitarist configuration is declared in the components' configuration file. - * - * @note When a VirtualGuitarist component is created through the XPCF ComponentManager it is also configured with the default values declared in the xpcf_registry_test.xml. - * @note The needed ComponentTraits template struct defining the VirtualGuitarist UUID and description is located - * in the xpcfSampleComponent_traits.h header file. - * It allows VirtualGuitarist users to use directly a forward declared type - * to invoke VirtualGuitarist creation without depending on the concrete implementation. - */ -class VirtualGuitarist : public org::bcom::xpcf::ConfigurableBase, - public IGuitarist - -{ -public: - VirtualGuitarist (); - ~VirtualGuitarist() override; - void unloadComponent () override final; - - void learn () override; - void playMusic (const MusicScore & score) override; - void playScore (std::vector> & score) override; - void playModifyScore (std::vector> & score) override; - void listen () override; - void practice () override; - void party () override; - SRef getGuitar() override { return m_guitar; } - SRef getGuitar(IGuitar::GuitarType type) override; - std::vector getGuitarCollection() override; - - void playSolo (MusicScore & score) override; - void playRhythm () override; - - void onInjected() override; - -private: - SRef m_guitar; - SRef m_folkGuitar; - SRef m_electricGuitar; - SRef >> m_guitars; - std::string m_name; - // Component properties defined as members' data - double m_blurFactor; - std::vector m_blurScales; - int64_t m_cols; - int64_t m_rows; - std::vector m_matrixValues; - SRef m_blurMatrixRepartition; -}; - -} - -#endif diff --git a/samples/sample_component/WORKSPACE b/samples/sample_component/WORKSPACE deleted file mode 100644 index ba53972..0000000 --- a/samples/sample_component/WORKSPACE +++ /dev/null @@ -1,7 +0,0 @@ -#WORKSPACE -workspace(name = "xpcfSampleComponent") - -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository", "new_git_repository") -load("//.build-rules/mac-clang-x86_64/shared/debug:dependenciesBuildInfo.bzl", "setup_all_remaken_deps") - -setup_all_remaken_deps() \ No newline at end of file diff --git a/samples/sample_component/compile_commands.json b/samples/sample_component/compile_commands.json deleted file mode 100644 index 32e230e..0000000 --- a/samples/sample_component/compile_commands.json +++ /dev/null @@ -1,17411 +0,0 @@ -[ -{ - "arguments": [ - "/usr/bin/clang++", - "-c", - "--target=x86_64-apple-darwin19.6.0", - "-m64", - "-pipe", - "-stdlib=libc++", - "-arch", - "x86_64", - "-DXPCF_USE_BOOST", - "-DWITH_REMOTING", - "-DXPCFVERSION=\\\"2.7.0\\\"", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-mmacosx-version-min=10.7", - "-std=c++17", - "-fPIC", - "-g", - "-std=gnu++1z", - "-isysroot", - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk", - "-mmacosx-version-min=10.12", - "-x", - "objective-c++", - "-Wall", - "-W", - "-fPIC", - "-I/Users/ltouraine/workspace/github/xpcf/samples/sample_component", - "-I/Users/ltouraine/.remaken/packages/mac-clang/xpcf/2.7.0/interfaces", - "-I/usr/local/Cellar/openssl@1.1/1.1.1n/include", - "-I/usr/local/Cellar/grpc/1.44.0/include", - "-I/usr/local/Cellar/abseil/20211102.0/include", - "-I/Users/ltouraine/.conan/data/boost/1.74.0/_/_/package/a70dc0c4aabdc192fc2a436cfe043deb20d3eb3a/include", - "-I/Users/ltouraine/.conan/data/libiconv/1.16/_/_/package/d98fae1010d1fb9e7f79a1e8a72bbf129d8660a2/include", - "-I/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "-I/Applications/Qt/5.12.10/clang_64/mkspecs/macx-clang", - "-DMYVERSION=2.7.0", - "-DUSE_XPCF_BOOST", - "-DBOOST_ALL_DYN_LINK", - "-DBOOST_ALL_NO_LIB", - "-DBOOST_ALL_DYN_LINK", - "-D_MACOS_TARGET_", - "-DQT_QML_DEBUG", - "-x", - "c++", - "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/Ibanez7ElectricGuitar.cpp" - ], - "directory": "/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "file": "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/Ibanez7ElectricGuitar.cpp" -}, -{ - "arguments": [ - "/usr/bin/clang++", - "-c", - "--target=x86_64-apple-darwin19.6.0", - "-m64", - "-pipe", - "-stdlib=libc++", - "-arch", - "x86_64", - "-DXPCF_USE_BOOST", - "-DWITH_REMOTING", - "-DXPCFVERSION=\\\"2.7.0\\\"", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-mmacosx-version-min=10.7", - "-std=c++17", - "-fPIC", - "-g", - "-std=gnu++1z", - "-isysroot", - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk", - "-mmacosx-version-min=10.12", - "-x", - "objective-c++", - "-Wall", - "-W", - "-fPIC", - "-I/Users/ltouraine/workspace/github/xpcf/samples/sample_component", - "-I/Users/ltouraine/.remaken/packages/mac-clang/xpcf/2.7.0/interfaces", - "-I/usr/local/Cellar/openssl@1.1/1.1.1n/include", - "-I/usr/local/Cellar/grpc/1.44.0/include", - "-I/usr/local/Cellar/abseil/20211102.0/include", - "-I/Users/ltouraine/.conan/data/boost/1.74.0/_/_/package/a70dc0c4aabdc192fc2a436cfe043deb20d3eb3a/include", - "-I/Users/ltouraine/.conan/data/libiconv/1.16/_/_/package/d98fae1010d1fb9e7f79a1e8a72bbf129d8660a2/include", - "-I/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "-I/Applications/Qt/5.12.10/clang_64/mkspecs/macx-clang", - "-DMYVERSION=2.7.0", - "-DUSE_XPCF_BOOST", - "-DBOOST_ALL_DYN_LINK", - "-DBOOST_ALL_NO_LIB", - "-DBOOST_ALL_DYN_LINK", - "-D_MACOS_TARGET_", - "-DQT_QML_DEBUG", - "-x", - "c++", - "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/TakamineFolkGuitar.cpp" - ], - "directory": "/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "file": "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/TakamineFolkGuitar.cpp" -}, -{ - "arguments": [ - "/usr/bin/clang++", - "-c", - "--target=x86_64-apple-darwin19.6.0", - "-m64", - "-pipe", - "-stdlib=libc++", - "-arch", - "x86_64", - "-DXPCF_USE_BOOST", - "-DWITH_REMOTING", - "-DXPCFVERSION=\\\"2.7.0\\\"", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-mmacosx-version-min=10.7", - "-std=c++17", - "-fPIC", - "-g", - "-std=gnu++1z", - "-isysroot", - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk", - "-mmacosx-version-min=10.12", - "-x", - "objective-c++", - "-Wall", - "-W", - "-fPIC", - "-I/Users/ltouraine/workspace/github/xpcf/samples/sample_component", - "-I/Users/ltouraine/.remaken/packages/mac-clang/xpcf/2.7.0/interfaces", - "-I/usr/local/Cellar/openssl@1.1/1.1.1n/include", - "-I/usr/local/Cellar/grpc/1.44.0/include", - "-I/usr/local/Cellar/abseil/20211102.0/include", - "-I/Users/ltouraine/.conan/data/boost/1.74.0/_/_/package/a70dc0c4aabdc192fc2a436cfe043deb20d3eb3a/include", - "-I/Users/ltouraine/.conan/data/libiconv/1.16/_/_/package/d98fae1010d1fb9e7f79a1e8a72bbf129d8660a2/include", - "-I/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "-I/Applications/Qt/5.12.10/clang_64/mkspecs/macx-clang", - "-DMYVERSION=2.7.0", - "-DUSE_XPCF_BOOST", - "-DBOOST_ALL_DYN_LINK", - "-DBOOST_ALL_NO_LIB", - "-DBOOST_ALL_DYN_LINK", - "-D_MACOS_TARGET_", - "-DQT_QML_DEBUG", - "-x", - "c++", - "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/Tuner.cpp" - ], - "directory": "/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "file": "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/Tuner.cpp" -}, -{ - "arguments": [ - "/usr/bin/clang++", - "-c", - "--target=x86_64-apple-darwin19.6.0", - "-m64", - "-pipe", - "-stdlib=libc++", - "-arch", - "x86_64", - "-DXPCF_USE_BOOST", - "-DWITH_REMOTING", - "-DXPCFVERSION=\\\"2.7.0\\\"", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-mmacosx-version-min=10.7", - "-std=c++17", - "-fPIC", - "-g", - "-std=gnu++1z", - "-isysroot", - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk", - "-mmacosx-version-min=10.12", - "-x", - "objective-c++", - "-Wall", - "-W", - "-fPIC", - "-I/Users/ltouraine/workspace/github/xpcf/samples/sample_component", - "-I/Users/ltouraine/.remaken/packages/mac-clang/xpcf/2.7.0/interfaces", - "-I/usr/local/Cellar/openssl@1.1/1.1.1n/include", - "-I/usr/local/Cellar/grpc/1.44.0/include", - "-I/usr/local/Cellar/abseil/20211102.0/include", - "-I/Users/ltouraine/.conan/data/boost/1.74.0/_/_/package/a70dc0c4aabdc192fc2a436cfe043deb20d3eb3a/include", - "-I/Users/ltouraine/.conan/data/libiconv/1.16/_/_/package/d98fae1010d1fb9e7f79a1e8a72bbf129d8660a2/include", - "-I/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "-I/Applications/Qt/5.12.10/clang_64/mkspecs/macx-clang", - "-DMYVERSION=2.7.0", - "-DUSE_XPCF_BOOST", - "-DBOOST_ALL_DYN_LINK", - "-DBOOST_ALL_NO_LIB", - "-DBOOST_ALL_DYN_LINK", - "-D_MACOS_TARGET_", - "-DQT_QML_DEBUG", - "-x", - "c++", - "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/xpcfSampleComponent_main.cpp" - ], - "directory": "/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "file": "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/xpcfSampleComponent_main.cpp" -}, -{ - "arguments": [ - "/usr/bin/clang++", - "-c", - "--target=x86_64-apple-darwin19.6.0", - "-m64", - "-pipe", - "-stdlib=libc++", - "-arch", - "x86_64", - "-DXPCF_USE_BOOST", - "-DWITH_REMOTING", - "-DXPCFVERSION=\\\"2.7.0\\\"", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-mmacosx-version-min=10.7", - "-std=c++17", - "-fPIC", - "-g", - "-std=gnu++1z", - "-isysroot", - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk", - "-mmacosx-version-min=10.12", - "-x", - "objective-c++", - "-Wall", - "-W", - "-fPIC", - "-I/Users/ltouraine/workspace/github/xpcf/samples/sample_component", - "-I/Users/ltouraine/.remaken/packages/mac-clang/xpcf/2.7.0/interfaces", - "-I/usr/local/Cellar/openssl@1.1/1.1.1n/include", - "-I/usr/local/Cellar/grpc/1.44.0/include", - "-I/usr/local/Cellar/abseil/20211102.0/include", - "-I/Users/ltouraine/.conan/data/boost/1.74.0/_/_/package/a70dc0c4aabdc192fc2a436cfe043deb20d3eb3a/include", - "-I/Users/ltouraine/.conan/data/libiconv/1.16/_/_/package/d98fae1010d1fb9e7f79a1e8a72bbf129d8660a2/include", - "-I/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "-I/Applications/Qt/5.12.10/clang_64/mkspecs/macx-clang", - "-DMYVERSION=2.7.0", - "-DUSE_XPCF_BOOST", - "-DBOOST_ALL_DYN_LINK", - "-DBOOST_ALL_NO_LIB", - "-DBOOST_ALL_DYN_LINK", - "-D_MACOS_TARGET_", - "-DQT_QML_DEBUG", - "-x", - "c++", - "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/HumanMusician.cpp" - ], - "directory": "/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "file": "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/HumanMusician.cpp" -}, -{ - "arguments": [ - "/usr/bin/clang++", - "-c", - "--target=x86_64-apple-darwin19.6.0", - "-m64", - "-pipe", - "-stdlib=libc++", - "-arch", - "x86_64", - "-DXPCF_USE_BOOST", - "-DWITH_REMOTING", - "-DXPCFVERSION=\\\"2.7.0\\\"", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-mmacosx-version-min=10.7", - "-std=c++17", - "-fPIC", - "-g", - "-std=gnu++1z", - "-isysroot", - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk", - "-mmacosx-version-min=10.12", - "-x", - "objective-c++", - "-Wall", - "-W", - "-fPIC", - "-I/Users/ltouraine/workspace/github/xpcf/samples/sample_component", - "-I/Users/ltouraine/.remaken/packages/mac-clang/xpcf/2.7.0/interfaces", - "-I/usr/local/Cellar/openssl@1.1/1.1.1n/include", - "-I/usr/local/Cellar/grpc/1.44.0/include", - "-I/usr/local/Cellar/abseil/20211102.0/include", - "-I/Users/ltouraine/.conan/data/boost/1.74.0/_/_/package/a70dc0c4aabdc192fc2a436cfe043deb20d3eb3a/include", - "-I/Users/ltouraine/.conan/data/libiconv/1.16/_/_/package/d98fae1010d1fb9e7f79a1e8a72bbf129d8660a2/include", - "-I/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "-I/Applications/Qt/5.12.10/clang_64/mkspecs/macx-clang", - "-DMYVERSION=2.7.0", - "-DUSE_XPCF_BOOST", - "-DBOOST_ALL_DYN_LINK", - "-DBOOST_ALL_NO_LIB", - "-DBOOST_ALL_DYN_LINK", - "-D_MACOS_TARGET_", - "-DQT_QML_DEBUG", - "-x", - "c++", - "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/VirtualGuitarist.cpp" - ], - "directory": "/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "file": "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/VirtualGuitarist.cpp" -}, -{ - "arguments": [ - "/usr/bin/clang++", - "-c", - "--target=x86_64-apple-darwin19.6.0", - "-m64", - "-pipe", - "-stdlib=libc++", - "-arch", - "x86_64", - "-DXPCF_USE_BOOST", - "-DWITH_REMOTING", - "-DXPCFVERSION=\\\"2.7.0\\\"", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-mmacosx-version-min=10.7", - "-std=c++17", - "-fPIC", - "-g", - "-std=gnu++1z", - "-isysroot", - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk", - "-mmacosx-version-min=10.12", - "-x", - "objective-c++", - "-Wall", - "-W", - "-fPIC", - "-I/Users/ltouraine/workspace/github/xpcf/samples/sample_component", - "-I/Users/ltouraine/.remaken/packages/mac-clang/xpcf/2.6.2terfaces", - "-I/usr/local/Cellar/openssl@1.1/1.1.1n/include", - "-I/usr/local/Cellar/grpc/1.44.0/include", - "-I/usr/local/Cellar/abseil/20211102.0/include", - "-I/Users/ltouraine/.conan/data/boost/1.74.0/_/_/package/a70dc0c4aabdc192fc2a436cfe043deb20d3eb3a/include", - "-I/Users/ltouraine/.conan/data/libiconv/1.16/_/_/package/d98fae1010d1fb9e7f79a1e8a72bbf129d8660a2/include", - "-I/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "-I/Applications/Qt/5.12.10/clang_64/mkspecs/macx-clang", - "-DMYVERSION=2.7.0", - "-DUSE_XPCF_BOOST", - "-DBOOST_ALL_DYN_LINK", - "-DBOOST_ALL_NO_LIB", - "-DBOOST_ALL_DYN_LINK", - "-D_MACOS_TARGET_", - "-DQT_QML_DEBUG", - "-x", - "c++", - "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/Guitar.cpp" - ], - "directory": "/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "file": "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/Guitar.cpp" -}, -{ - "arguments": [ - "/usr/bin/clang++", - "-c", - "--target=x86_64-apple-darwin19.6.0", - "-m64", - "-pipe", - "-stdlib=libc++", - "-arch", - "x86_64", - "-DXPCF_USE_BOOST", - "-DWITH_REMOTING", - "-DXPCFVERSION=\\\"2.7.0\\\"", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-mmacosx-version-min=10.7", - "-std=c++17", - "-fPIC", - "-g", - "-std=gnu++1z", - "-isysroot", - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk", - "-mmacosx-version-min=10.12", - "-x", - "objective-c++", - "-Wall", - "-W", - "-fPIC", - "-I/Users/ltouraine/workspace/github/xpcf/samples/sample_component", - "-I/Users/ltouraine/.remaken/packages/mac-clang/xpcf/2.7.0/interfaces", - "-I/usr/local/Cellar/openssl@1.1/1.1.1n/include", - "-I/usr/local/Cellar/grpc/1.44.0/include", - "-I/usr/local/Cellar/abseil/20211102.0/include", - "-I/Users/ltouraine/.conan/data/boost/1.74.0/_/_/package/a70dc0c4aabdc192fc2a436cfe043deb20d3eb3a/include", - "-I/Users/ltouraine/.conan/data/libiconv/1.16/_/_/package/d98fae1010d1fb9e7f79a1e8a72bbf129d8660a2/include", - "-I/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "-I/Applications/Qt/5.12.10/clang_64/mkspecs/macx-clang", - "-DMYVERSION=2.7.0", - "-DUSE_XPCF_BOOST", - "-DBOOST_ALL_DYN_LINK", - "-DBOOST_ALL_NO_LIB", - "-DBOOST_ALL_DYN_LINK", - "-D_MACOS_TARGET_", - "-DQT_QML_DEBUG", - "-x", - "c++", - "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/JacksonDinky6ElectricGuitar.cpp" - ], - "directory": "/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "file": "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/JacksonDinky6ElectricGuitar.cpp" -}, -{ - "arguments": [ - "/usr/bin/clang++", - "-c", - "--target=x86_64-apple-darwin19.6.0", - "-m64", - "-pipe", - "-stdlib=libc++", - "-arch", - "x86_64", - "-DXPCF_USE_BOOST", - "-DWITH_REMOTING", - "-DXPCFVERSION=\\\"2.7.0\\\"", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-mmacosx-version-min=10.7", - "-std=c++17", - "-fPIC", - "-g", - "-std=gnu++1z", - "-isysroot", - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk", - "-mmacosx-version-min=10.12", - "-x", - "objective-c++", - "-Wall", - "-W", - "-fPIC", - "-I/Users/ltouraine/workspace/github/xpcf/samples/sample_component", - "-I/Users/ltouraine/.remaken/packages/mac-clang/xpcf/2.7.0/interfaces", - "-I/usr/local/Cellar/openssl@1.1/1.1.1n/include", - "-I/usr/local/Cellar/grpc/1.44.0/include", - "-I/usr/local/Cellar/abseil/20211102.0/include", - "-I/Users/ltouraine/.conan/data/boost/1.74.0/_/_/package/a70dc0c4aabdc192fc2a436cfe043deb20d3eb3a/include", - "-I/Users/ltouraine/.conan/data/libiconv/1.16/_/_/package/d98fae1010d1fb9e7f79a1e8a72bbf129d8660a2/include", - "-I/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "-I/Applications/Qt/5.12.10/clang_64/mkspecs/macx-clang", - "-DMYVERSION=2.7.0", - "-DUSE_XPCF_BOOST", - "-DBOOST_ALL_DYN_LINK", - "-DBOOST_ALL_NO_LIB", - "-DBOOST_ALL_DYN_LINK", - "-D_MACOS_TARGET_", - "-DQT_QML_DEBUG", - "-x", - "c++-header", - "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/Ibanez7ElectricGuitar.h" - ], - "directory": "/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "file": "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/Ibanez7ElectricGuitar.h" -}, -{ - "arguments": [ - "/usr/bin/clang++", - "-c", - "--target=x86_64-apple-darwin19.6.0", - "-m64", - "-pipe", - "-stdlib=libc++", - "-arch", - "x86_64", - "-DXPCF_USE_BOOST", - "-DWITH_REMOTING", - "-DXPCFVERSION=\\\"2.7.0\\\"", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-mmacosx-version-min=10.7", - "-std=c++17", - "-fPIC", - "-g", - "-std=gnu++1z", - "-isysroot", - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk", - "-mmacosx-version-min=10.12", - "-x", - "objective-c++", - "-Wall", - "-W", - "-fPIC", - "-I/Users/ltouraine/workspace/github/xpcf/samples/sample_component", - "-I/Users/ltouraine/.remaken/packages/mac-clang/xpcf/2.7.0/interfaces", - "-I/usr/local/Cellar/openssl@1.1/1.1.1n/include", - "-I/usr/local/Cellar/grpc/1.44.0/include", - "-I/usr/local/Cellar/abseil/20211102.0/include", - "-I/Users/ltouraine/.conan/data/boost/1.74.0/_/_/package/a70dc0c4aabdc192fc2a436cfe043deb20d3eb3a/include", - "-I/Users/ltouraine/.conan/data/libiconv/1.16/_/_/package/d98fae1010d1fb9e7f79a1e8a72bbf129d8660a2/include", - "-I/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "-I/Applications/Qt/5.12.10/clang_64/mkspecs/macx-clang", - "-DMYVERSION=2.7.0", - "-DUSE_XPCF_BOOST", - "-DBOOST_ALL_DYN_LINK", - "-DBOOST_ALL_NO_LIB", - "-DBOOST_ALL_DYN_LINK", - "-D_MACOS_TARGET_", - "-DQT_QML_DEBUG", - "-x", - "c++-header", - "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/TakamineFolkGuitar.h" - ], - "directory": "/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "file": "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/TakamineFolkGuitar.h" -}, -{ - "arguments": [ - "/usr/bin/clang++", - "-c", - "--target=x86_64-apple-darwin19.6.0", - "-m64", - "-pipe", - "-stdlib=libc++", - "-arch", - "x86_64", - "-DXPCF_USE_BOOST", - "-DWITH_REMOTING", - "-DXPCFVERSION=\\\"2.7.0\\\"", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-mmacosx-version-min=10.7", - "-std=c++17", - "-fPIC", - "-g", - "-std=gnu++1z", - "-isysroot", - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk", - "-mmacosx-version-min=10.12", - "-x", - "objective-c++", - "-Wall", - "-W", - "-fPIC", - "-I/Users/ltouraine/workspace/github/xpcf/samples/sample_component", - "-I/Users/ltouraine/.remaken/packages/mac-clang/xpcf/2.7.0/interfaces", - "-I/usr/local/Cellar/openssl@1.1/1.1.1n/include", - "-I/usr/local/Cellar/grpc/1.44.0/include", - "-I/usr/local/Cellar/abseil/20211102.0/include", - "-I/Users/ltouraine/.conan/data/boost/1.74.0/_/_/package/a70dc0c4aabdc192fc2a436cfe043deb20d3eb3a/include", - "-I/Users/ltouraine/.conan/data/libiconv/1.16/_/_/package/d98fae1010d1fb9e7f79a1e8a72bbf129d8660a2/include", - "-I/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "-I/Applications/Qt/5.12.10/clang_64/mkspecs/macx-clang", - "-DMYVERSION=2.7.0", - "-DUSE_XPCF_BOOST", - "-DBOOST_ALL_DYN_LINK", - "-DBOOST_ALL_NO_LIB", - "-DBOOST_ALL_DYN_LINK", - "-D_MACOS_TARGET_", - "-DQT_QML_DEBUG", - "-x", - "c++-header", - "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/Tuner.h" - ], - "directory": "/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "file": "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/Tuner.h" -}, -{ - "arguments": [ - "/usr/bin/clang++", - "-c", - "--target=x86_64-apple-darwin19.6.0", - "-m64", - "-pipe", - "-stdlib=libc++", - "-arch", - "x86_64", - "-DXPCF_USE_BOOST", - "-DWITH_REMOTING", - "-DXPCFVERSION=\\\"2.7.0\\\"", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-mmacosx-version-min=10.7", - "-std=c++17", - "-fPIC", - "-g", - "-std=gnu++1z", - "-isysroot", - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk", - "-mmacosx-version-min=10.12", - "-x", - "objective-c++", - "-Wall", - "-W", - "-fPIC", - "-I/Users/ltouraine/workspace/github/xpcf/samples/sample_component", - "-I/Users/ltouraine/.remaken/packages/mac-clang/xpcf/2.7.0/interfaces", - "-I/usr/local/Cellar/openssl@1.1/1.1.1n/include", - "-I/usr/local/Cellar/grpc/1.44.0/include", - "-I/usr/local/Cellar/abseil/20211102.0/include", - "-I/Users/ltouraine/.conan/data/boost/1.74.0/_/_/package/a70dc0c4aabdc192fc2a436cfe043deb20d3eb3a/include", - "-I/Users/ltouraine/.conan/data/libiconv/1.16/_/_/package/d98fae1010d1fb9e7f79a1e8a72bbf129d8660a2/include", - "-I/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "-I/Applications/Qt/5.12.10/clang_64/mkspecs/macx-clang", - "-DMYVERSION=2.7.0", - "-DUSE_XPCF_BOOST", - "-DBOOST_ALL_DYN_LINK", - "-DBOOST_ALL_NO_LIB", - "-DBOOST_ALL_DYN_LINK", - "-D_MACOS_TARGET_", - "-DQT_QML_DEBUG", - "-x", - "c++-header", - "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/xpcfSampleComponentAPI.h" - ], - "directory": "/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "file": "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/xpcfSampleComponentAPI.h" -}, -{ - "arguments": [ - "/usr/bin/clang++", - "-c", - "--target=x86_64-apple-darwin19.6.0", - "-m64", - "-pipe", - "-stdlib=libc++", - "-arch", - "x86_64", - "-DXPCF_USE_BOOST", - "-DWITH_REMOTING", - "-DXPCFVERSION=\\\"2.7.0\\\"", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-mmacosx-version-min=10.7", - "-std=c++17", - "-fPIC", - "-g", - "-std=gnu++1z", - "-isysroot", - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk", - "-mmacosx-version-min=10.12", - "-x", - "objective-c++", - "-Wall", - "-W", - "-fPIC", - "-I/Users/ltouraine/workspace/github/xpcf/samples/sample_component", - "-I/Users/ltouraine/.remaken/packages/mac-clang/xpcf/2.7.0/interfaces", - "-I/usr/local/Cellar/openssl@1.1/1.1.1n/include", - "-I/usr/local/Cellar/grpc/1.44.0/include", - "-I/usr/local/Cellar/abseil/20211102.0/include", - "-I/Users/ltouraine/.conan/data/boost/1.74.0/_/_/package/a70dc0c4aabdc192fc2a436cfe043deb20d3eb3a/include", - "-I/Users/ltouraine/.conan/data/libiconv/1.16/_/_/package/d98fae1010d1fb9e7f79a1e8a72bbf129d8660a2/include", - "-I/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "-I/Applications/Qt/5.12.10/clang_64/mkspecs/macx-clang", - "-DMYVERSION=2.7.0", - "-DUSE_XPCF_BOOST", - "-DBOOST_ALL_DYN_LINK", - "-DBOOST_ALL_NO_LIB", - "-DBOOST_ALL_DYN_LINK", - "-D_MACOS_TARGET_", - "-DQT_QML_DEBUG", - "-x", - "c++-header", - "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/xpcfSampleComponent_traits.h" - ], - "directory": "/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "file": "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/xpcfSampleComponent_traits.h" -}, -{ - "arguments": [ - "/usr/bin/clang++", - "-c", - "--target=x86_64-apple-darwin19.6.0", - "-m64", - "-pipe", - "-stdlib=libc++", - "-arch", - "x86_64", - "-DXPCF_USE_BOOST", - "-DWITH_REMOTING", - "-DXPCFVERSION=\\\"2.7.0\\\"", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-mmacosx-version-min=10.7", - "-std=c++17", - "-fPIC", - "-g", - "-std=gnu++1z", - "-isysroot", - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk", - "-mmacosx-version-min=10.12", - "-x", - "objective-c++", - "-Wall", - "-W", - "-fPIC", - "-I/Users/ltouraine/workspace/github/xpcf/samples/sample_component", - "-I/Users/ltouraine/.remaken/packages/mac-clang/xpcf/2.7.0/interfaces", - "-I/usr/local/Cellar/openssl@1.1/1.1.1n/include", - "-I/usr/local/Cellar/grpc/1.44.0/include", - "-I/usr/local/Cellar/abseil/20211102.0/include", - "-I/Users/ltouraine/.conan/data/boost/1.74.0/_/_/package/a70dc0c4aabdc192fc2a436cfe043deb20d3eb3a/include", - "-I/Users/ltouraine/.conan/data/libiconv/1.16/_/_/package/d98fae1010d1fb9e7f79a1e8a72bbf129d8660a2/include", - "-I/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "-I/Applications/Qt/5.12.10/clang_64/mkspecs/macx-clang", - "-DMYVERSION=2.7.0", - "-DUSE_XPCF_BOOST", - "-DBOOST_ALL_DYN_LINK", - "-DBOOST_ALL_NO_LIB", - "-DBOOST_ALL_DYN_LINK", - "-D_MACOS_TARGET_", - "-DQT_QML_DEBUG", - "-x", - "c++-header", - "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/IHuman.h" - ], - "directory": "/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "file": "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/IHuman.h" -}, -{ - "arguments": [ - "/usr/bin/clang++", - "-c", - "--target=x86_64-apple-darwin19.6.0", - "-m64", - "-pipe", - "-stdlib=libc++", - "-arch", - "x86_64", - "-DXPCF_USE_BOOST", - "-DWITH_REMOTING", - "-DXPCFVERSION=\\\"2.7.0\\\"", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-mmacosx-version-min=10.7", - "-std=c++17", - "-fPIC", - "-g", - "-std=gnu++1z", - "-isysroot", - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk", - "-mmacosx-version-min=10.12", - "-x", - "objective-c++", - "-Wall", - "-W", - "-fPIC", - "-I/Users/ltouraine/workspace/github/xpcf/samples/sample_component", - "-I/Users/ltouraine/.remaken/packages/mac-clang/xpcf/2.7.0/interfaces", - "-I/usr/local/Cellar/openssl@1.1/1.1.1n/include", - "-I/usr/local/Cellar/grpc/1.44.0/include", - "-I/usr/local/Cellar/abseil/20211102.0/include", - "-I/Users/ltouraine/.conan/data/boost/1.74.0/_/_/package/a70dc0c4aabdc192fc2a436cfe043deb20d3eb3a/include", - "-I/Users/ltouraine/.conan/data/libiconv/1.16/_/_/package/d98fae1010d1fb9e7f79a1e8a72bbf129d8660a2/include", - "-I/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "-I/Applications/Qt/5.12.10/clang_64/mkspecs/macx-clang", - "-DMYVERSION=2.7.0", - "-DUSE_XPCF_BOOST", - "-DBOOST_ALL_DYN_LINK", - "-DBOOST_ALL_NO_LIB", - "-DBOOST_ALL_DYN_LINK", - "-D_MACOS_TARGET_", - "-DQT_QML_DEBUG", - "-x", - "c++-header", - "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/IMusician.h" - ], - "directory": "/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "file": "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/IMusician.h" -}, -{ - "arguments": [ - "/usr/bin/clang++", - "-c", - "--target=x86_64-apple-darwin19.6.0", - "-m64", - "-pipe", - "-stdlib=libc++", - "-arch", - "x86_64", - "-DXPCF_USE_BOOST", - "-DWITH_REMOTING", - "-DXPCFVERSION=\\\"2.7.0\\\"", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-mmacosx-version-min=10.7", - "-std=c++17", - "-fPIC", - "-g", - "-std=gnu++1z", - "-isysroot", - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk", - "-mmacosx-version-min=10.12", - "-x", - "objective-c++", - "-Wall", - "-W", - "-fPIC", - "-I/Users/ltouraine/workspace/github/xpcf/samples/sample_component", - "-I/Users/ltouraine/.remaken/packages/mac-clang/xpcf/2.7.0/interfaces", - "-I/usr/local/Cellar/openssl@1.1/1.1.1n/include", - "-I/usr/local/Cellar/grpc/1.44.0/include", - "-I/usr/local/Cellar/abseil/20211102.0/include", - "-I/Users/ltouraine/.conan/data/boost/1.74.0/_/_/package/a70dc0c4aabdc192fc2a436cfe043deb20d3eb3a/include", - "-I/Users/ltouraine/.conan/data/libiconv/1.16/_/_/package/d98fae1010d1fb9e7f79a1e8a72bbf129d8660a2/include", - "-I/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "-I/Applications/Qt/5.12.10/clang_64/mkspecs/macx-clang", - "-DMYVERSION=2.7.0", - "-DUSE_XPCF_BOOST", - "-DBOOST_ALL_DYN_LINK", - "-DBOOST_ALL_NO_LIB", - "-DBOOST_ALL_DYN_LINK", - "-D_MACOS_TARGET_", - "-DQT_QML_DEBUG", - "-x", - "c++-header", - "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/IGuitarist.h" - ], - "directory": "/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "file": "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/IGuitarist.h" -}, -{ - "arguments": [ - "/usr/bin/clang++", - "-c", - "--target=x86_64-apple-darwin19.6.0", - "-m64", - "-pipe", - "-stdlib=libc++", - "-arch", - "x86_64", - "-DXPCF_USE_BOOST", - "-DWITH_REMOTING", - "-DXPCFVERSION=\\\"2.7.0\\\"", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-mmacosx-version-min=10.7", - "-std=c++17", - "-fPIC", - "-g", - "-std=gnu++1z", - "-isysroot", - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk", - "-mmacosx-version-min=10.12", - "-x", - "objective-c++", - "-Wall", - "-W", - "-fPIC", - "-I/Users/ltouraine/workspace/github/xpcf/samples/sample_component", - "-I/Users/ltouraine/.remaken/packages/mac-clang/xpcf/2.7.0/interfaces", - "-I/usr/local/Cellar/openssl@1.1/1.1.1n/include", - "-I/usr/local/Cellar/grpc/1.44.0/include", - "-I/usr/local/Cellar/abseil/20211102.0/include", - "-I/Users/ltouraine/.conan/data/boost/1.74.0/_/_/package/a70dc0c4aabdc192fc2a436cfe043deb20d3eb3a/include", - "-I/Users/ltouraine/.conan/data/libiconv/1.16/_/_/package/d98fae1010d1fb9e7f79a1e8a72bbf129d8660a2/include", - "-I/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "-I/Applications/Qt/5.12.10/clang_64/mkspecs/macx-clang", - "-DMYVERSION=2.7.0", - "-DUSE_XPCF_BOOST", - "-DBOOST_ALL_DYN_LINK", - "-DBOOST_ALL_NO_LIB", - "-DBOOST_ALL_DYN_LINK", - "-D_MACOS_TARGET_", - "-DQT_QML_DEBUG", - "-x", - "c++-header", - "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/HumanMusician.h" - ], - "directory": "/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "file": "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/HumanMusician.h" -}, -{ - "arguments": [ - "/usr/bin/clang++", - "-c", - "--target=x86_64-apple-darwin19.6.0", - "-m64", - "-pipe", - "-stdlib=libc++", - "-arch", - "x86_64", - "-DXPCF_USE_BOOST", - "-DWITH_REMOTING", - "-DXPCFVERSION=\\\"2.7.0\\\"", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-mmacosx-version-min=10.7", - "-std=c++17", - "-fPIC", - "-g", - "-std=gnu++1z", - "-isysroot", - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk", - "-mmacosx-version-min=10.12", - "-x", - "objective-c++", - "-Wall", - "-W", - "-fPIC", - "-I/Users/ltouraine/workspace/github/xpcf/samples/sample_component", - "-I/Users/ltouraine/.remaken/packages/mac-clang/xpcf/2.7.0/interfaces", - "-I/usr/local/Cellar/openssl@1.1/1.1.1n/include", - "-I/usr/local/Cellar/grpc/1.44.0/include", - "-I/usr/local/Cellar/abseil/20211102.0/include", - "-I/Users/ltouraine/.conan/data/boost/1.74.0/_/_/package/a70dc0c4aabdc192fc2a436cfe043deb20d3eb3a/include", - "-I/Users/ltouraine/.conan/data/libiconv/1.16/_/_/package/d98fae1010d1fb9e7f79a1e8a72bbf129d8660a2/include", - "-I/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "-I/Applications/Qt/5.12.10/clang_64/mkspecs/macx-clang", - "-DMYVERSION=2.7.0", - "-DUSE_XPCF_BOOST", - "-DBOOST_ALL_DYN_LINK", - "-DBOOST_ALL_NO_LIB", - "-DBOOST_ALL_DYN_LINK", - "-D_MACOS_TARGET_", - "-DQT_QML_DEBUG", - "-x", - "c++-header", - "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/VirtualGuitarist.h" - ], - "directory": "/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "file": "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/VirtualGuitarist.h" -}, -{ - "arguments": [ - "/usr/bin/clang++", - "-c", - "--target=x86_64-apple-darwin19.6.0", - "-m64", - "-pipe", - "-stdlib=libc++", - "-arch", - "x86_64", - "-DXPCF_USE_BOOST", - "-DWITH_REMOTING", - "-DXPCFVERSION=\\\"2.7.0\\\"", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-mmacosx-version-min=10.7", - "-std=c++17", - "-fPIC", - "-g", - "-std=gnu++1z", - "-isysroot", - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk", - "-mmacosx-version-min=10.12", - "-x", - "objective-c++", - "-Wall", - "-W", - "-fPIC", - "-I/Users/ltouraine/workspace/github/xpcf/samples/sample_component", - "-I/Users/ltouraine/.remaken/packages/mac-clang/xpcf/2.7.0/interfaces", - "-I/usr/local/Cellar/openssl@1.1/1.1.1n/include", - "-I/usr/local/Cellar/grpc/1.44.0/include", - "-I/usr/local/Cellar/abseil/20211102.0/include", - "-I/Users/ltouraine/.conan/data/boost/1.74.0/_/_/package/a70dc0c4aabdc192fc2a436cfe043deb20d3eb3a/include", - "-I/Users/ltouraine/.conan/data/libiconv/1.16/_/_/package/d98fae1010d1fb9e7f79a1e8a72bbf129d8660a2/include", - "-I/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "-I/Applications/Qt/5.12.10/clang_64/mkspecs/macx-clang", - "-DMYVERSION=2.7.0", - "-DUSE_XPCF_BOOST", - "-DBOOST_ALL_DYN_LINK", - "-DBOOST_ALL_NO_LIB", - "-DBOOST_ALL_DYN_LINK", - "-D_MACOS_TARGET_", - "-DQT_QML_DEBUG", - "-x", - "c++-header", - "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/IGuitar.h" - ], - "directory": "/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "file": "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/IGuitar.h" -}, -{ - "arguments": [ - "/usr/bin/clang++", - "-c", - "--target=x86_64-apple-darwin19.6.0", - "-m64", - "-pipe", - "-stdlib=libc++", - "-arch", - "x86_64", - "-DXPCF_USE_BOOST", - "-DWITH_REMOTING", - "-DXPCFVERSION=\\\"2.7.0\\\"", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-mmacosx-version-min=10.7", - "-std=c++17", - "-fPIC", - "-g", - "-std=gnu++1z", - "-isysroot", - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk", - "-mmacosx-version-min=10.12", - "-x", - "objective-c++", - "-Wall", - "-W", - "-fPIC", - "-I/Users/ltouraine/workspace/github/xpcf/samples/sample_component", - "-I/Users/ltouraine/.remaken/packages/mac-clang/xpcf/2.7.0/interfaces", - "-I/usr/local/Cellar/openssl@1.1/1.1.1n/include", - "-I/usr/local/Cellar/grpc/1.44.0/include", - "-I/usr/local/Cellar/abseil/20211102.0/include", - "-I/Users/ltouraine/.conan/data/boost/1.74.0/_/_/package/a70dc0c4aabdc192fc2a436cfe043deb20d3eb3a/include", - "-I/Users/ltouraine/.conan/data/libiconv/1.16/_/_/package/d98fae1010d1fb9e7f79a1e8a72bbf129d8660a2/include", - "-I/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "-I/Applications/Qt/5.12.10/clang_64/mkspecs/macx-clang", - "-DMYVERSION=2.7.0", - "-DUSE_XPCF_BOOST", - "-DBOOST_ALL_DYN_LINK", - "-DBOOST_ALL_NO_LIB", - "-DBOOST_ALL_DYN_LINK", - "-D_MACOS_TARGET_", - "-DQT_QML_DEBUG", - "-x", - "c++-header", - "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/Guitar.h" - ], - "directory": "/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "file": "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/Guitar.h" -}, -{ - "arguments": [ - "/usr/bin/clang++", - "-c", - "--target=x86_64-apple-darwin19.6.0", - "-m64", - "-pipe", - "-stdlib=libc++", - "-arch", - "x86_64", - "-DXPCF_USE_BOOST", - "-DWITH_REMOTING", - "-DXPCFVERSION=\\\"2.7.0\\\"", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-maes", - "-msse4.1", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-Wno-float-conversion", - "-Wno-implicit-float-conversion", - "-Wno-implicit-int-float-conversion", - "-Wno-implicit-int-conversion", - "-Wno-shorten-64-to-32", - "-Wno-sign-conversion", - "-Wno-unknown-warning-option", - "-DNOMINMAX", - "-mmacosx-version-min=10.7", - "-std=c++17", - "-fPIC", - "-g", - "-std=gnu++1z", - "-isysroot", - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk", - "-mmacosx-version-min=10.12", - "-x", - "objective-c++", - "-Wall", - "-W", - "-fPIC", - "-I/Users/ltouraine/workspace/github/xpcf/samples/sample_component", - "-I/Users/ltouraine/.remaken/packages/mac-clang/xpcf/2.7.0/interfaces", - "-I/usr/local/Cellar/openssl@1.1/1.1.1n/include", - "-I/usr/local/Cellar/grpc/1.44.0/include", - "-I/usr/local/Cellar/abseil/20211102.0/include", - "-I/Users/ltouraine/.conan/data/boost/1.74.0/_/_/package/a70dc0c4aabdc192fc2a436cfe043deb20d3eb3a/include", - "-I/Users/ltouraine/.conan/data/libiconv/1.16/_/_/package/d98fae1010d1fb9e7f79a1e8a72bbf129d8660a2/include", - "-I/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "-I/Applications/Qt/5.12.10/clang_64/mkspecs/macx-clang", - "-DMYVERSION=2.7.0", - "-DUSE_XPCF_BOOST", - "-DBOOST_ALL_DYN_LINK", - "-DBOOST_ALL_NO_LIB", - "-DBOOST_ALL_DYN_LINK", - "-D_MACOS_TARGET_", - "-DQT_QML_DEBUG", - "-x", - "c++-header", - "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/JacksonDinky6ElectricGuitar.h" - ], - "directory": "/Users/ltouraine/workspace/github/xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug", - "file": "/Users/ltouraine/workspace/github/xpcf/samples/sample_component/JacksonDinky6ElectricGuitar.h" -} -] \ No newline at end of file diff --git a/samples/sample_component/packagedependencies.txt.template b/samples/sample_component/packagedependencies.txt.template deleted file mode 100644 index 42809c5..0000000 --- a/samples/sample_component/packagedependencies.txt.template +++ /dev/null @@ -1,2 +0,0 @@ -xpcf||xpcf%XPCF_SHARED_DEPS|github|https://github.com/b-com-software-basis/xpcf/releases/download -xpcf_static_deps||xpcf_static_deps%XPCF_STATIC_DEPS|github|https://github.com/b-com-software-basis/xpcf/releases/download diff --git a/samples/sample_component/swig/XPCF_SampleComponent.i b/samples/sample_component/swig/XPCF_SampleComponent.i deleted file mode 100644 index c0e0677..0000000 --- a/samples/sample_component/swig/XPCF_SampleComponent.i +++ /dev/null @@ -1,33 +0,0 @@ -%module XPCF_SampleComponent -%{ -#include -#include "IGuitar.h" -#include "IMusician.h" -#include "IHuman.h" -#include "IGuitarist.h" -%} - -%include "swig.i" - -%import (module="XPCF.Api") "XPCF_Api.i" - -%pragma(csharp) moduleimports=%{ - using XPCF.Api; -%} - -%typemap(csimports) SWIGTYPE -%{ - using XPCF.Api; -%} - -%shared_ptr(IGuitar) -%shared_ptr(IElectricGuitar) -%shared_ptr(ITuner) -%shared_ptr(IMusician) -%shared_ptr(IHuman) -%shared_ptr(IGuitarist) - -%include "IGuitar.h" -%include "IMusician.h" -%include "IHuman.h" -%include "IGuitarist.h" diff --git a/samples/sample_component/xpcfSampleComponent.pri b/samples/sample_component/xpcfSampleComponent.pri deleted file mode 100755 index d87fa68..0000000 --- a/samples/sample_component/xpcfSampleComponent.pri +++ /dev/null @@ -1,111 +0,0 @@ -! exists(../../version.pri) { - win32 { - system(scripts/win/update_version.bat -t ../../version.pri) - } - linux { - system(scripts/unixes/update_version.sh -t ../../version.pri) - } - system(cd $${currentPath}) -} -include(../../version.pri) -VERSION=$${XPCF_VERSION} - -QT -= core gui -CONFIG -= app_bundle qt -FRAMEWORK = $${TARGET} - -CONFIG += c++17 -CONFIG += shared -#DEFINES += USE_XPCF_STD - -CONFIG(debug,debug|release) { - REMAKEN_PKGSUBDIR=$${REMAKEN_PKGSUBDIR}/debug/$${TARGET}_$${VERSION} -} - -CONFIG(release,debug|release) { - REMAKEN_PKGSUBDIR=$${REMAKEN_PKGSUBDIR}/release/$${TARGET}_$${VERSION} -} - -package_remaken { - message("Preparing remaken package installation in $${REMAKEN_PKGSUBDIR}") - INSTALLSUBDIR=$${REMAKEN_PKGSUBDIR} -} - -macx { - # EXPERIMENTAL : needs to use remaken configure first - # REMAKENCONFIG += use_remaken_parser -} -DEFINES += XPCF_USE_BOOST - -!contains(DEFINES,USE_XPCF_STD) { -# DEFINES += USE_XPCF_BOOST - DEPENDENCIESCONFIG += install_recurse -} -#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibbundle.pri inclusion -include (../../builddefs/qmake/templatelibconfig.pri) - -#DEFINES += BOOST_ALL_NO_LIB -#DEFINES += BOOST_ALL_DYN_LINK - -SOURCES += \ - Ibanez7ElectricGuitar.cpp \ - TakamineFolkGuitar.cpp \ - Tuner.cpp \ - xpcfSampleComponent_main.cpp \ - HumanMusician.cpp \ - VirtualGuitarist.cpp \ - Guitar.cpp \ - JacksonDinky6ElectricGuitar.cpp - -HEADERS += \ - Ibanez7ElectricGuitar.h \ - TakamineFolkGuitar.h \ - Tuner.h \ - xpcfSampleComponentAPI.h \ - xpcfSampleComponent_traits.h \ - IHuman.h \ - IMusician.h \ - IGuitarist.h \ - HumanMusician.h \ - VirtualGuitarist.h \ - IGuitar.h \ - Guitar.h \ - JacksonDinky6ElectricGuitar.h - -unix { -} - -linux { - LIBS += -L/home/linuxbrew/.linuxbrew/lib # temporary fix caused by grpc with -lre2 ... without -L in grpc.pc -} - - -macx { - contains(DEFINES,USE_XPCF_STD) { - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.14 - } - DEFINES += _MACOS_TARGET_ - QMAKE_MAC_SDK= macosx - QMAKE_CFLAGS += -mmacosx-version-min=10.7 #-x objective-c++ - QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -std=c++17 -fPIC#-x objective-c++ - QMAKE_LFLAGS += -mmacosx-version-min=10.7 -v -lstdc++ - LIBS += -lstdc++ -lc -lpthread - LIBS += -L/usr/local/lib -} - -win32 { - DEFINES += _X86_VC12_TARGET_ - DEFINES += MBCS _MBCS - } - -INCLUDEPATH += $${PWD} - -header_files.path = $${PROJECTDEPLOYDIR}/interfaces/ -header_files.files = $$files($${PWD}/I*.h) -header_files.files += xpcfSampleComponent_traits.h - -INSTALLS += header_files -DISTFILES += \ - Makefile \ - swig/XPCF_SampleComponent.i \ - packagedependencies.txt diff --git a/samples/sample_component/xpcfSampleComponent.pro b/samples/sample_component/xpcfSampleComponent.pro deleted file mode 100755 index 2b40963..0000000 --- a/samples/sample_component/xpcfSampleComponent.pro +++ /dev/null @@ -1,17 +0,0 @@ -TARGET = xpcfSampleComponent - -!exists(packagedependencies.txt) { - message("$$TARGET - packagedependencies.txt not present, generate it") - win32 { - system(../../scripts/win/update_version.bat) - } - linux { - system(../../scripts/unixes/update_version.sh) - } -} - -REMAKEN_PKGSUBDIR=shared -DEPENDENCIESCONFIG = sharedlib -DEFINES += XPCF_SHARED_DEPS - -include(xpcfSampleComponent.pri) diff --git a/samples/sample_component/xpcfSampleComponentAPI.h b/samples/sample_component/xpcfSampleComponentAPI.h deleted file mode 100644 index 1bc9d13..0000000 --- a/samples/sample_component/xpcfSampleComponentAPI.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef XPCFSAMPLECOMPONENTAPI_H -#define XPCFSAMPLECOMPONENTAPI_H - -#if _WIN32 -#ifdef xpcfSampleComponent_API_DLLEXPORT -#define XPCFSAMPLECOMPONENT_EXPORT_API __declspec(dllexport) -#else -#define XPCFSAMPLECOMPONENT_EXPORT_API __declspec(dllimport) -#endif -#else //!_WIN32 -#define XPCFSAMPLECOMPONENT_EXPORT_API -#endif //!_WIN32 - -#endif // XPCFSAMPLECOMPONENTAPI_H diff --git a/samples/sample_component/xpcfSampleComponent_main.cpp b/samples/sample_component/xpcfSampleComponent_main.cpp deleted file mode 100644 index be9a47a..0000000 --- a/samples/sample_component/xpcfSampleComponent_main.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2018-06-25 - */ - -#include "HumanMusician.h" -#include "VirtualGuitarist.h" -#include "Ibanez7ElectricGuitar.h" -#include "JacksonDinky6ElectricGuitar.h" -#include "TakamineFolkGuitar.h" -#include "Tuner.h" - -#include "xpcf/module/ModuleFactory.h" -#include - -namespace xpcf=org::bcom::xpcf; - -/** - * @ingroup xpcfmodule - */ -/** - * Declare module. - */ -XPCF_DECLARE_MODULE("3b899ff0-e098-4218-bdaa-82abdec22960","xpcfSampleComponent","XPCF component example"); - -/** - * This method is the module entry point. - * XPCF uses this method to create components available in the module. - * - * Each component exposed must be declared inside a xpcf::tryCreateComponent() call. - */ -extern "C" XPCF_MODULEHOOKS_API xpcf::XPCFErrorCode XPCF_getComponent(const xpcf::uuids::uuid& componentUUID,SRef& interfaceRef) -{ - xpcf::XPCFErrorCode errCode = xpcf::XPCFErrorCode::_FAIL; - errCode = xpcf::tryCreateComponent(componentUUID,interfaceRef); - if (errCode != xpcf::XPCFErrorCode::_SUCCESS) { - errCode = xpcf::tryCreateComponent(componentUUID,interfaceRef); - } - if (errCode != xpcf::XPCFErrorCode::_SUCCESS) { - errCode = xpcf::tryCreateComponent(componentUUID,interfaceRef); - } - if (errCode != xpcf::XPCFErrorCode::_SUCCESS) { - errCode = xpcf::tryCreateComponent(componentUUID,interfaceRef); - } - if (errCode != xpcf::XPCFErrorCode::_SUCCESS) { - errCode = xpcf::tryCreateComponent(componentUUID,interfaceRef); - } - if (errCode != xpcf::XPCFErrorCode::_SUCCESS) { - errCode = xpcf::tryCreateComponent(componentUUID,interfaceRef); - } - return errCode; -} - -/** - * The declarations below populate list of the components available in the module (it represents the module index). - * XPCF uses this index to introspect the components available in a module, providing the ability to generate the configuration file skeleton from the code. - */ -XPCF_BEGIN_COMPONENTS_DECLARATION -XPCF_ADD_COMPONENT(component::HumanMusician) -XPCF_ADD_COMPONENT(component::VirtualGuitarist) -XPCF_ADD_COMPONENT(component::Ibanez7ElectricGuitar) -XPCF_ADD_COMPONENT(component::JacksonDinky6ElectricGuitar) -XPCF_ADD_COMPONENT(component::TakamineFolkGuitar) -XPCF_ADD_COMPONENT(component::Tuner) -XPCF_END_COMPONENTS_DECLARATION diff --git a/samples/sample_component/xpcfSampleComponent_static_deps.pro b/samples/sample_component/xpcfSampleComponent_static_deps.pro deleted file mode 100644 index b1fea7f..0000000 --- a/samples/sample_component/xpcfSampleComponent_static_deps.pro +++ /dev/null @@ -1,17 +0,0 @@ -TARGET = xpcfSampleComponent_static_deps - -!exists(packagedependencies.txt) { - message("$$TARGET - packagedependencies.txt not present, generate it") - win32 { - system(../../scripts/win/update_version.bat) - } - linux { - system(../../scripts/unixes/update_version.sh) - } -} - -REMAKEN_PKGSUBDIR=shared -DEPENDENCIESCONFIG -= sharedlib -DEFINES += XPCF_STATIC_DEPS - -include(xpcfSampleComponent.pri) diff --git a/samples/sample_component/xpcfSampleComponent_traits.h b/samples/sample_component/xpcfSampleComponent_traits.h deleted file mode 100644 index ee0f95b..0000000 --- a/samples/sample_component/xpcfSampleComponent_traits.h +++ /dev/null @@ -1,124 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2018-06-25 - */ - -#ifndef XPCFSAMPLECOMPONENT_TRAITS_H -#define XPCFSAMPLECOMPONENT_TRAITS_H 1 - -#include "xpcf/component/ComponentTraits.h" -/** @defgroup sampleComponent Sample Component - * This is the sample component group - */ -/** @defgroup interfaces Interfaces - * @ingroup sampleComponent - * This is the sample component interfaces group - */ -/** @defgroup xpcfmodule Module declaration - * @ingroup sampleComponent - * This is the sample component module declaration group - */ -/** @defgroup components Components - * @ingroup sampleComponent - * This is the sample component components group - * @{ - */ - -namespace component { - class HumanMusician; - class VirtualGuitarist; - class Ibanez7ElectricGuitar; - class JacksonDinky6ElectricGuitar; - class TakamineFolkGuitar; -} - -/** - * @struct ComponentTraits instanciation - * The code below shows the instanciation of the ComponentTraits template struct for HumanMusician type. - * The syntax is the full template instanciation syntax. - * It only requires "ComponentTraits.h" inclusion. - */ -template <> struct org::bcom::xpcf::ComponentTraits -{ - static constexpr const char * UUID = "ae9d10bb-4bd1-462b-8c01-43f1815c6ae0"; - static constexpr const char * NAME = "HumanMusician component - not configurable"; - static constexpr const char * DESCRIPTION = "HumanMusician is not Configurable, it implements I0 and I1 interfaces"; -}; - - -/** - * @struct ComponentTraits instanciation - * The code below shows the instanciation of the ComponentTraits template struct for VirtualGuitarist type. - * The syntax uses the XPCF_DEFINE_COMPONENT_TRAITS helper macro. - * It requires "traits.h" inclusion. - * - * @note although the syntax seems easier, it obfuscates the ComponentTraits expansion and - * thus can lead to misunderstanding upon later compilation issues (typically when the XXX_traits.h header inclusion is forgotten). - */ -#include "xpcf/core/traits.h" -XPCF_DEFINE_COMPONENT_TRAITS(component::VirtualGuitarist, - "{63FF193D-93E6-4EDE-9947-22F864AC843F}", - "VirtualGuitarist component", - "VirtualGuitarist implements IConfigurable, I2 and I1 interfaces"); - - -/** - * @struct ComponentTraits instanciation - * The code below shows the instanciation of the ComponentTraits template struct for Ibanez7ElectricGuitar type. - * The syntax is the full template instanciation syntax. - * It only requires "ComponentTraits.h" inclusion. - */ -template <> struct org::bcom::xpcf::ComponentTraits -{ - static constexpr const char * UUID = "ED894181-0FDC-4326-A068-CB2A5899CB13"; - static constexpr const char * NAME = "Ibanez7ElectricGuitar component - with specific configuration"; - static constexpr const char * DESCRIPTION = "Ibanez7ElectricGuitar is not Configurable, it implements IElectricGuitar interface"; -}; - -/** - * @struct ComponentTraits instanciation - * The code below shows the instanciation of the ComponentTraits template struct for JacksonDinky6ElectricGuitar type. - * The syntax is the full template instanciation syntax. - * It only requires "ComponentTraits.h" inclusion. - */ -template <> struct org::bcom::xpcf::ComponentTraits -{ - static constexpr const char * UUID = "7CC64F89-9A81-4FC8-9695-FDE123FAE225"; - static constexpr const char * NAME = "JacksonDinky6ElectricGuitar component - with specific configuration"; - static constexpr const char * DESCRIPTION = "JacksonDinky6ElectricGuitar is not Configurable, it implements IElectricGuitar interface"; -}; - - -/** - * @struct ComponentTraits instanciation - * The code below shows the instanciation of the ComponentTraits template struct for TakamineFolkGuitar type. - * The syntax is the full template instanciation syntax. - * It only requires "ComponentTraits.h" inclusion. - */ -template <> struct org::bcom::xpcf::ComponentTraits -{ - static constexpr const char * UUID = "{04E2254F-3349-4DC1-8EED-86835315FB6B}"; - static constexpr const char * NAME = "TakamineFolkGuitar component - with specific configuration"; - static constexpr const char * DESCRIPTION = "TakamineFolkGuitar is not Configurable, it implements IGuitar interface"; -}; - - -/** @}*/ -#endif diff --git a/samples/xpcfHelloConfigurable/ConfigurableComponent.cpp b/samples/xpcfHelloConfigurable/ConfigurableComponent.cpp deleted file mode 100644 index 574f9a3..0000000 --- a/samples/xpcfHelloConfigurable/ConfigurableComponent.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "ConfigurableComponent.h" -#include "xpcfHelloConfigurableAPI.h" -#include - -namespace xpcf = org::bcom::xpcf; - -template<> ConfigurableComponent* xpcf::ComponentFactory::createInstance(); - -ConfigurableComponent::ConfigurableComponent():xpcf::ConfigurableBase(xpcf::toMap()) -{ - declareInterface(this); - declareProperty("message",m_message); -} - - -ConfigurableComponent::~ConfigurableComponent() -{ - -} - -void ConfigurableComponent::unloadComponent () -{ - // provide component cleanup strategy - // default strategy is to delete self, uncomment following line in this case : - delete this; - return; -} - - -void ConfigurableComponent::print() -{ - std::cout< -#include "IMessage.h" -#include - -class ConfigurableComponent : public org::bcom::xpcf::ConfigurableBase, virtual public IMessage -{ -public: - ConfigurableComponent(); - ~ConfigurableComponent() override; - void unloadComponent () override; - void print() override; - -private: - std::string m_message; -}; - - - - -template <> struct org::bcom::xpcf::ComponentTraits -{ - static constexpr const char * UUID = "C77F20A5-9E06-4C42-B64B-5CC838FD9447"; - static constexpr const char * NAME = "ConfigurableComponent"; - static constexpr const char * DESCRIPTION = "ConfigurableComponent implements IMessage interface"; -}; - -#endif // ConfigurableComponent_H diff --git a/samples/xpcfHelloConfigurable/packagedependencies.txt.template b/samples/xpcfHelloConfigurable/packagedependencies.txt.template deleted file mode 100644 index 1686dd4..0000000 --- a/samples/xpcfHelloConfigurable/packagedependencies.txt.template +++ /dev/null @@ -1 +0,0 @@ -xpcf||xpcf|github|https://github.com/b-com-software-basis/xpcf/releases/download diff --git a/samples/xpcfHelloConfigurable/remaken-xpcfHelloConfigurable.pc.in b/samples/xpcfHelloConfigurable/remaken-xpcfHelloConfigurable.pc.in deleted file mode 100644 index 85d11cb..0000000 --- a/samples/xpcfHelloConfigurable/remaken-xpcfHelloConfigurable.pc.in +++ /dev/null @@ -1,9 +0,0 @@ -libname=@TARGET@ -prefix=/usr/local -includedir=${prefix}/interfaces - -Name: @TARGET@ -Description: -Version: @VERSION@ -Requires: -Cflags: -I${includedir} diff --git a/samples/xpcfHelloConfigurable/xpcfHelloConfigurable.pro b/samples/xpcfHelloConfigurable/xpcfHelloConfigurable.pro deleted file mode 100644 index 370198b..0000000 --- a/samples/xpcfHelloConfigurable/xpcfHelloConfigurable.pro +++ /dev/null @@ -1,67 +0,0 @@ -TARGET = xpcfHelloConfigurable - -!exists(packagedependencies.txt) { - message("$$TARGET - packagedependencies.txt not present, generate it") - win32 { - system(../../scripts/win/update_version.bat) - } - linux { - system(../../scripts/unixes/update_version.sh) - } -} - -QT -= core gui -CONFIG -= app_bundle qt - -FRAMEWORK = $${TARGET} -VERSION=1.0.0 -DEFINES += $${TARGET}VERSION=\"$${VERSION}\" - -CONFIG += c++1z -CONFIG += shared - -DEPENDENCIESCONFIG = sharedlib recurse -#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibbundle.pri inclusion -include (../../builddefs/qmake/templatelibconfig.pri) - -DEFINES += BOOST_ALL_NO_LIB -DEFINES += BOOST_ALL_DYN_LINK - -SOURCES += xpcfHelloConfigurable_main.cpp \ - ConfigurableComponent.cpp - -HEADERS += xpcfHelloConfigurableAPI.h xpcfHelloConfigurable_traits.h \ - ConfigurableComponent.h \ - interfaces/IMessage.h - -unix { -} - -macx { - DEFINES += _MACOS_TARGET_ - QMAKE_MAC_SDK= macosx - QMAKE_CFLAGS += -mmacosx-version-min=10.7 #-x objective-c++ - QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -std=c++17 -fPIC#-x objective-c++ - QMAKE_LFLAGS += -mmacosx-version-min=10.7 -v -lstdc++ - LIBS += -lstdc++ -lc -lpthread -} - -win32 { - DEFINES += _X86_VC12_TARGET_ - DEFINES += MBCS _MBCS - } - -INCLUDEPATH += $${PWD} $${PWD}/../interfaces - -header_files.path = $${PROJECTDEPLOYDIR}/interfaces/ -header_files.files = $$files($${PWD}/../interfaces/*.h) -header_files.files += _traits.h - -target.path = $${USERHOMEFOLDER}/.xpcf/modules/$${TARGET} -xpcf_xml_files.path = $${USERHOMEFOLDER}/.xpcf/samples -xpcf_xml_files.files=$$files($${PWD}/xpcfHelloConfigurable.xml) - -INSTALLS += header_files target xpcf_xml_files -DISTFILES += Makefile \ - bcom-xpcfHelloConfigurable.pc.in \ - xpcfHelloConfigurable.xml diff --git a/samples/xpcfHelloConfigurable/xpcfHelloConfigurable.xml b/samples/xpcfHelloConfigurable/xpcfHelloConfigurable.xml deleted file mode 100644 index 4da31f5..0000000 --- a/samples/xpcfHelloConfigurable/xpcfHelloConfigurable.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/samples/xpcfHelloConfigurable/xpcfHelloConfigurableAPI.h b/samples/xpcfHelloConfigurable/xpcfHelloConfigurableAPI.h deleted file mode 100644 index 8bc56d8..0000000 --- a/samples/xpcfHelloConfigurable/xpcfHelloConfigurableAPI.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef xpcfHelloConfigurableAPI_H -#define xpcfHelloConfigurableAPI_H - -#if _WIN32 -#ifdef xpcfHelloConfigurable_API_DLLEXPORT -#define xpcfHelloConfigurable_EXPORT_API __declspec(dllexport) -#else -#define xpcfHelloConfigurable_EXPORT_API __declspec(dllimport) -#endif -#else //!_WIN32 -#define xpcfHelloConfigurable_EXPORT_API -#endif //!_WIN32 - -#endif // XPCFSAMPLECOMPONENTAPI_H diff --git a/samples/xpcfHelloConfigurable/xpcfHelloConfigurable_main.cpp b/samples/xpcfHelloConfigurable/xpcfHelloConfigurable_main.cpp deleted file mode 100644 index a9dbba4..0000000 --- a/samples/xpcfHelloConfigurable/xpcfHelloConfigurable_main.cpp +++ /dev/null @@ -1,35 +0,0 @@ - -#include -#include -#include "ConfigurableComponent.h" - -namespace xpcf=org::bcom::xpcf; - -/** - * @ingroup xpcfmodule - */ -/** - * Declare module. - */ -XPCF_DECLARE_MODULE("F2C2D134-E627-449E-893C-D11BBBF47C9E","xpcfHelloConfigurable","xpcfHelloConfigurable module description"); - -/** - * This method is the module entry point. - * XPCF uses this method to create components available in the module. - * - * Each component exposed must be declared inside a xpcf::tryCreateComponent() call. - */ -extern "C" XPCF_MODULEHOOKS_API xpcf::XPCFErrorCode XPCF_getComponent(const xpcf::uuids::uuid& componentUUID,SRef& interfaceRef) -{ - xpcf::XPCFErrorCode errCode = xpcf::XPCFErrorCode::_FAIL; - errCode = xpcf::tryCreateComponent(componentUUID,interfaceRef); - return errCode; -} - -/** - * The declarations below populate list of the components available in the module (it represents the module index). - * XPCF uses this index to introspect the components available in a module, providing the ability to generate the configuration file skeleton from the code. - */ -XPCF_BEGIN_COMPONENTS_DECLARATION -XPCF_ADD_COMPONENT(ConfigurableComponent) -XPCF_END_COMPONENTS_DECLARATION diff --git a/samples/xpcfHelloInjectableAdapter/InjectableAdapterComponent.cpp b/samples/xpcfHelloInjectableAdapter/InjectableAdapterComponent.cpp deleted file mode 100644 index da6e5c7..0000000 --- a/samples/xpcfHelloInjectableAdapter/InjectableAdapterComponent.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include "InjectableAdapterComponent.h" -#include "xpcfHelloInjectableAdapterAPI.h" -#include -#include - -namespace xpcf = org::bcom::xpcf; - -template<> InjectableAdapterComponent* xpcf::ComponentFactory::createInstance(); - -InjectableAdapterComponent::InjectableAdapterComponent():xpcf::ComponentBase(xpcf::toMap()) -{ - declareInterface(this); - declareInjectable(m_concreteMessageHandler,"adapterMessageHandler"); -} - - -InjectableAdapterComponent::~InjectableAdapterComponent() -{ -} - -void InjectableAdapterComponent::unloadComponent () -{ - // provide component cleanup strategy - // default strategy is to delete self, uncomment following line in this case : - delete this; - return; -} - -void InjectableAdapterComponent::print() -{ - m_concreteMessageHandler->print(); -} diff --git a/samples/xpcfHelloInjectableAdapter/InjectableAdapterComponent.h b/samples/xpcfHelloInjectableAdapter/InjectableAdapterComponent.h deleted file mode 100644 index 099f98d..0000000 --- a/samples/xpcfHelloInjectableAdapter/InjectableAdapterComponent.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef InjectableAdapterComponent_H -#define InjectableAdapterComponent_H -#include -#include "IMessage.h" - -#include - - -class InjectableAdapterComponent : public org::bcom::xpcf::ComponentBase, virtual public IMessage -{ -public: - InjectableAdapterComponent(); - ~InjectableAdapterComponent() override; - void unloadComponent () override; - void print() override; - -private: - SRef m_concreteMessageHandler; -}; - - - - -template <> struct org::bcom::xpcf::ComponentTraits -{ - static constexpr const char * UUID = "490A887F-1B64-44A1-902E-0180D8C6FACD"; - static constexpr const char * NAME = "InjectableAdapterComponent"; - static constexpr const char * DESCRIPTION = "InjectableAdapterComponent implements IMessage interface"; -}; - -#endif // InjectableAdapterComponent_H diff --git a/samples/xpcfHelloInjectableAdapter/packagedependencies.txt.template b/samples/xpcfHelloInjectableAdapter/packagedependencies.txt.template deleted file mode 100644 index 1686dd4..0000000 --- a/samples/xpcfHelloInjectableAdapter/packagedependencies.txt.template +++ /dev/null @@ -1 +0,0 @@ -xpcf||xpcf|github|https://github.com/b-com-software-basis/xpcf/releases/download diff --git a/samples/xpcfHelloInjectableAdapter/remaken-xpcfHelloInjectableAdapter.pc.in b/samples/xpcfHelloInjectableAdapter/remaken-xpcfHelloInjectableAdapter.pc.in deleted file mode 100644 index 85d11cb..0000000 --- a/samples/xpcfHelloInjectableAdapter/remaken-xpcfHelloInjectableAdapter.pc.in +++ /dev/null @@ -1,9 +0,0 @@ -libname=@TARGET@ -prefix=/usr/local -includedir=${prefix}/interfaces - -Name: @TARGET@ -Description: -Version: @VERSION@ -Requires: -Cflags: -I${includedir} diff --git a/samples/xpcfHelloInjectableAdapter/xpcfHelloInjectableAdapter.pro b/samples/xpcfHelloInjectableAdapter/xpcfHelloInjectableAdapter.pro deleted file mode 100644 index a203f77..0000000 --- a/samples/xpcfHelloInjectableAdapter/xpcfHelloInjectableAdapter.pro +++ /dev/null @@ -1,67 +0,0 @@ -TARGET = xpcfHelloInjectableAdapter - -!exists(packagedependencies.txt) { - message("$$TARGET - packagedependencies.txt not present, generate it") - win32 { - system(../../scripts/win/update_version.bat) - } - linux { - system(../../scripts/unixes/update_version.sh) - } -} - -QT -= core gui -CONFIG -= app_bundle qt - -FRAMEWORK = $${TARGET} -VERSION=1.0.0 -DEFINES += $${TARGET}VERSION=\"$${VERSION}\" - -CONFIG += c++1z -CONFIG += shared - -DEPENDENCIESCONFIG = sharedlib recurse -#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibbundle.pri inclusion -include (../../builddefs/qmake/templatelibconfig.pri) - -DEFINES += BOOST_ALL_NO_LIB -DEFINES += BOOST_ALL_DYN_LINK - -SOURCES += xpcfHelloInjectableAdapter_main.cpp \ - InjectableAdapterComponent.cpp - -HEADERS += xpcfHelloInjectableAdapterAPI.h xpcfHelloInjectableAdapter_traits.h \ - InjectableAdapterComponent.h \ - interfaces/IMessage.h - -unix { -} - -macx { - DEFINES += _MACOS_TARGET_ - QMAKE_MAC_SDK= macosx - QMAKE_CFLAGS += -mmacosx-version-min=10.7 #-x objective-c++ - QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -std=c++17 -fPIC#-x objective-c++ - QMAKE_LFLAGS += -mmacosx-version-min=10.7 -v -lstdc++ - LIBS += -lstdc++ -lc -lpthread -} - -win32 { - DEFINES += _X86_VC12_TARGET_ - DEFINES += MBCS _MBCS - } - -INCLUDEPATH += $${PWD} $${PWD}/../interfaces - -header_files.path = $${PROJECTDEPLOYDIR}/interfaces/ -header_files.files = $$files($${PWD}/../interfaces/*.h) -header_files.files += _traits.h - -target.path = $${USERHOMEFOLDER}/.xpcf/modules/$${TARGET} -xpcf_xml_files.path = $${USERHOMEFOLDER}/.xpcf/samples -xpcf_xml_files.files=$$files($${PWD}/xpcfHelloInjectableAdapter.xml) - -INSTALLS += header_files target xpcf_xml_files -DISTFILES += Makefile \ - bcom-xpcfHelloInjectableAdapter.pc.in \ - xpcfHelloInjectableAdapter.xml diff --git a/samples/xpcfHelloInjectableAdapter/xpcfHelloInjectableAdapter.xml b/samples/xpcfHelloInjectableAdapter/xpcfHelloInjectableAdapter.xml deleted file mode 100644 index 8c7b0aa..0000000 --- a/samples/xpcfHelloInjectableAdapter/xpcfHelloInjectableAdapter.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/xpcfHelloInjectableAdapter/xpcfHelloInjectableAdapterAPI.h b/samples/xpcfHelloInjectableAdapter/xpcfHelloInjectableAdapterAPI.h deleted file mode 100644 index 7570b59..0000000 --- a/samples/xpcfHelloInjectableAdapter/xpcfHelloInjectableAdapterAPI.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef xpcfHelloInjectableAdapterAPI_H -#define xpcfHelloInjectableAdapterAPI_H - -#if _WIN32 -#ifdef xpcfHelloInjectableAdapter_API_DLLEXPORT -#define xpcfHelloInjectableAdapter_EXPORT_API __declspec(dllexport) -#else -#define xpcfHelloInjectableAdapter_EXPORT_API __declspec(dllimport) -#endif -#else //!_WIN32 -#define xpcfHelloInjectableAdapter_EXPORT_API -#endif //!_WIN32 - -#endif // XPCFSAMPLECOMPONENTAPI_H diff --git a/samples/xpcfHelloInjectableAdapter/xpcfHelloInjectableAdapter_main.cpp b/samples/xpcfHelloInjectableAdapter/xpcfHelloInjectableAdapter_main.cpp deleted file mode 100644 index f96300e..0000000 --- a/samples/xpcfHelloInjectableAdapter/xpcfHelloInjectableAdapter_main.cpp +++ /dev/null @@ -1,35 +0,0 @@ - -#include -#include -#include "InjectableAdapterComponent.h" - -namespace xpcf=org::bcom::xpcf; - -/** - * @ingroup xpcfmodule - */ -/** - * Declare module. - */ -XPCF_DECLARE_MODULE("E72D0789-2540-40F3-818C-57ADB75F8A30","xpcfHelloInjectableAdapter","xpcfHelloInjectableAdapter module description"); - -/** - * This method is the module entry point. - * XPCF uses this method to create components available in the module. - * - * Each component exposed must be declared inside a xpcf::tryCreateComponent() call. - */ -extern "C" XPCF_MODULEHOOKS_API xpcf::XPCFErrorCode XPCF_getComponent(const xpcf::uuids::uuid& componentUUID,SRef& interfaceRef) -{ - xpcf::XPCFErrorCode errCode = xpcf::XPCFErrorCode::_FAIL; - errCode = xpcf::tryCreateComponent(componentUUID,interfaceRef); - return errCode; -} - -/** - * The declarations below populate list of the components available in the module (it represents the module index). - * XPCF uses this index to introspect the components available in a module, providing the ability to generate the configuration file skeleton from the code. - */ -XPCF_BEGIN_COMPONENTS_DECLARATION -XPCF_ADD_COMPONENT(InjectableAdapterComponent) -XPCF_END_COMPONENTS_DECLARATION diff --git a/samples/xpcfHelloPeople/PeopleComponent.cpp b/samples/xpcfHelloPeople/PeopleComponent.cpp deleted file mode 100644 index 79acec8..0000000 --- a/samples/xpcfHelloPeople/PeopleComponent.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include "PeopleComponent.h" -#include "xpcfHelloPeopleAPI.h" -#include - -namespace xpcf = org::bcom::xpcf; - -template<> PeopleComponent* xpcf::ComponentFactory::createInstance(); - -PeopleComponent::PeopleComponent():xpcf::ComponentBase(xpcf::toMap()) -{ - declareInterface(this); -} - - -PeopleComponent::~PeopleComponent() -{ - -} - -void PeopleComponent::unloadComponent () -{ - // provide component cleanup strategy - // default strategy is to delete self, uncomment following line in this case : - delete this; - return; -} - - -void PeopleComponent::print() -{ - std::cout<<"Hello People"< -#include "IMessage.h" - - -class PeopleComponent : public org::bcom::xpcf::ComponentBase, virtual public IMessage -{ -public: - PeopleComponent(); - ~PeopleComponent() override; - void unloadComponent () override; - void print() override; -}; - - - - -template <> struct org::bcom::xpcf::ComponentTraits -{ - static constexpr const char * UUID = "8D664B2A-16D5-4D7C-8675-E85D244CD8EE"; - static constexpr const char * NAME = "PeopleComponent"; - static constexpr const char * DESCRIPTION = "PeopleComponent implements IMessage interface"; -}; - -#endif // PeopleComponent_H diff --git a/samples/xpcfHelloPeople/packagedependencies.txt.template b/samples/xpcfHelloPeople/packagedependencies.txt.template deleted file mode 100644 index 1686dd4..0000000 --- a/samples/xpcfHelloPeople/packagedependencies.txt.template +++ /dev/null @@ -1 +0,0 @@ -xpcf||xpcf|github|https://github.com/b-com-software-basis/xpcf/releases/download diff --git a/samples/xpcfHelloPeople/remaken-xpcfHelloPeople.pc.in b/samples/xpcfHelloPeople/remaken-xpcfHelloPeople.pc.in deleted file mode 100644 index 85d11cb..0000000 --- a/samples/xpcfHelloPeople/remaken-xpcfHelloPeople.pc.in +++ /dev/null @@ -1,9 +0,0 @@ -libname=@TARGET@ -prefix=/usr/local -includedir=${prefix}/interfaces - -Name: @TARGET@ -Description: -Version: @VERSION@ -Requires: -Cflags: -I${includedir} diff --git a/samples/xpcfHelloPeople/xpcfHelloPeople.pro b/samples/xpcfHelloPeople/xpcfHelloPeople.pro deleted file mode 100644 index 7123b9a..0000000 --- a/samples/xpcfHelloPeople/xpcfHelloPeople.pro +++ /dev/null @@ -1,67 +0,0 @@ -TARGET = xpcfHelloPeople - -!exists(packagedependencies.txt) { - message("$$TARGET - packagedependencies.txt not present, generate it") - win32 { - system(../../scripts/win/update_version.bat) - } - linux { - system(../../scripts/unixes/update_version.sh) - } -} - -QT -= core gui -CONFIG -= app_bundle qt - -FRAMEWORK = $${TARGET} -VERSION=1.0.0 -DEFINES += $${TARGET}VERSION=\"$${VERSION}\" - -CONFIG += c++1z -CONFIG += shared - -DEPENDENCIESCONFIG = sharedlib recurse -#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibbundle.pri inclusion -include (../../builddefs/qmake/templatelibconfig.pri) - -DEFINES += BOOST_ALL_NO_LIB -DEFINES += BOOST_ALL_DYN_LINK - -SOURCES += xpcfHelloPeople_main.cpp \ - PeopleComponent.cpp - -HEADERS += xpcfHelloPeopleAPI.h xpcfHelloPeople_traits.h \ - PeopleComponent.h \ - interfaces/IMessage.h - -unix { -} - -macx { - DEFINES += _MACOS_TARGET_ - QMAKE_MAC_SDK= macosx - QMAKE_CFLAGS += -mmacosx-version-min=10.7 #-x objective-c++ - QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -std=c++17 -fPIC#-x objective-c++ - QMAKE_LFLAGS += -mmacosx-version-min=10.7 -v -lstdc++ - LIBS += -lstdc++ -lc -lpthread -} - -win32 { - DEFINES += _X86_VC12_TARGET_ - DEFINES += MBCS _MBCS - } - -INCLUDEPATH += $${PWD} $${PWD}/../interfaces - -header_files.path = $${PROJECTDEPLOYDIR}/interfaces/ -header_files.files = $$files($${PWD}/../interfaces/*.h) -header_files.files += _traits.h - -target.path = $${USERHOMEFOLDER}/.xpcf/modules/$${TARGET} -xpcf_xml_files.path = $${USERHOMEFOLDER}/.xpcf/samples -xpcf_xml_files.files=$$files($${PWD}/xpcfHelloPeople.xml) - -INSTALLS += header_files target xpcf_xml_files -DISTFILES += Makefile \ - bcom-xpcfHelloPeople.pc.in \ - xpcfHelloPeople.xml diff --git a/samples/xpcfHelloPeople/xpcfHelloPeople.xml b/samples/xpcfHelloPeople/xpcfHelloPeople.xml deleted file mode 100644 index b1644a3..0000000 --- a/samples/xpcfHelloPeople/xpcfHelloPeople.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/samples/xpcfHelloPeople/xpcfHelloPeopleAPI.h b/samples/xpcfHelloPeople/xpcfHelloPeopleAPI.h deleted file mode 100644 index 20d348d..0000000 --- a/samples/xpcfHelloPeople/xpcfHelloPeopleAPI.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef xpcfHelloPeopleAPI_H -#define xpcfHelloPeopleAPI_H - -#if _WIN32 -#ifdef xpcfHelloPeople_API_DLLEXPORT -#define xpcfHelloPeople_EXPORT_API __declspec(dllexport) -#else -#define xpcfHelloPeople_EXPORT_API __declspec(dllimport) -#endif -#else //!_WIN32 -#define xpcfHelloPeople_EXPORT_API -#endif //!_WIN32 - -#endif // XPCFSAMPLECOMPONENTAPI_H diff --git a/samples/xpcfHelloPeople/xpcfHelloPeople_main.cpp b/samples/xpcfHelloPeople/xpcfHelloPeople_main.cpp deleted file mode 100644 index c08677d..0000000 --- a/samples/xpcfHelloPeople/xpcfHelloPeople_main.cpp +++ /dev/null @@ -1,35 +0,0 @@ - -#include -#include -#include "PeopleComponent.h" - -namespace xpcf=org::bcom::xpcf; - -/** - * @ingroup xpcfmodule - */ -/** - * Declare module. - */ -XPCF_DECLARE_MODULE("BF75AAB8-F52B-4634-95EA-DE75C7A1D86A","xpcfHelloPeople","xpcfHelloPeople module description"); - -/** - * This method is the module entry point. - * XPCF uses this method to create components available in the module. - * - * Each component exposed must be declared inside a xpcf::tryCreateComponent() call. - */ -extern "C" XPCF_MODULEHOOKS_API xpcf::XPCFErrorCode XPCF_getComponent(const xpcf::uuids::uuid& componentUUID,SRef& interfaceRef) -{ - xpcf::XPCFErrorCode errCode = xpcf::XPCFErrorCode::_FAIL; - errCode = xpcf::tryCreateComponent(componentUUID,interfaceRef); - return errCode; -} - -/** - * The declarations below populate list of the components available in the module (it represents the module index). - * XPCF uses this index to introspect the components available in a module, providing the ability to generate the configuration file skeleton from the code. - */ -XPCF_BEGIN_COMPONENTS_DECLARATION -XPCF_ADD_COMPONENT(PeopleComponent) -XPCF_END_COMPONENTS_DECLARATION diff --git a/samples/xpcfHelloWithAllComponents/packagedependencies.txt.template b/samples/xpcfHelloWithAllComponents/packagedependencies.txt.template deleted file mode 100644 index 1686dd4..0000000 --- a/samples/xpcfHelloWithAllComponents/packagedependencies.txt.template +++ /dev/null @@ -1 +0,0 @@ -xpcf||xpcf|github|https://github.com/b-com-software-basis/xpcf/releases/download diff --git a/samples/xpcfHelloWithAllComponents/remaken-xpcfHelloWithAllComponents.pc.in b/samples/xpcfHelloWithAllComponents/remaken-xpcfHelloWithAllComponents.pc.in deleted file mode 100644 index 85d11cb..0000000 --- a/samples/xpcfHelloWithAllComponents/remaken-xpcfHelloWithAllComponents.pc.in +++ /dev/null @@ -1,9 +0,0 @@ -libname=@TARGET@ -prefix=/usr/local -includedir=${prefix}/interfaces - -Name: @TARGET@ -Description: -Version: @VERSION@ -Requires: -Cflags: -I${includedir} diff --git a/samples/xpcfHelloWithAllComponents/xpcfHelloWithAllComponents.pro b/samples/xpcfHelloWithAllComponents/xpcfHelloWithAllComponents.pro deleted file mode 100644 index d341ed0..0000000 --- a/samples/xpcfHelloWithAllComponents/xpcfHelloWithAllComponents.pro +++ /dev/null @@ -1,61 +0,0 @@ -QT -= core gui -CONFIG -= app_bundle qt - -TARGET = xpcfHelloWithAllComponents -FRAMEWORK = $${TARGET} -VERSION=1.0.0 -DEFINES += $${TARGET}VERSION=\"$${VERSION}\" - -CONFIG += c++1z -CONFIG += shared - -DEPENDENCIESCONFIG = sharedlib recurse -#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibbundle.pri inclusion -include (../../builddefs/qmake/templatelibconfig.pri) - -DEFINES += BOOST_ALL_NO_LIB -DEFINES += BOOST_ALL_DYN_LINK - -SOURCES += xpcfHelloWithAllComponents_main.cpp \ - ../xpcfHelloConfigurable/ConfigurableComponent.cpp \ - ../xpcfHelloInjectableAdapter/InjectableAdapterComponent.cpp \ - ../xpcfHelloPeople/PeopleComponent.cpp \ - ../xpcfHelloWorld/WorldComponent.cpp - -HEADERS += xpcfHelloWithAllComponents_traits.h - -unix { -} - -macx { - DEFINES += _MACOS_TARGET_ - QMAKE_MAC_SDK= macosx - QMAKE_CFLAGS += -mmacosx-version-min=10.7 #-x objective-c++ - QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -std=c++17 -fPIC#-x objective-c++ - QMAKE_LFLAGS += -mmacosx-version-min=10.7 -v -lstdc++ - LIBS += -lstdc++ -lc -lpthread -} - -win32 { - DEFINES += _X86_VC12_TARGET_ - DEFINES += MBCS _MBCS - DEFINES += xpcfHelloWorld_API_DLLEXPORT - DEFINES += xpcfHelloPeople_API_DLLEXPORT - DEFINES += xpcfHelloInjectableAdapter_API_DLLEXPORT - DEFINES += xpcfHelloConfigurable_API_DLLEXPORT - } - -INCLUDEPATH += $${_PRO_FILE_PWD_} $${_PRO_FILE_PWD_}/../interfaces $${_PRO_FILE_PWD_}/../xpcfHelloPeople $${_PRO_FILE_PWD_}/../xpcfHelloWorld $${_PRO_FILE_PWD_}/../xpcfHelloConfigurable $${_PRO_FILE_PWD_}/../xpcfHelloInjectableAdapter - -header_files.path = $${PROJECTDEPLOYDIR}/interfaces/ -header_files.files = $$files($${PWD}/../interfaces/*.h) -header_files.files += _traits.h - -target.path = $${USERHOMEFOLDER}/.xpcf/modules/$${TARGET} -xpcf_xml_files.path = $${USERHOMEFOLDER}/.xpcf/samples -xpcf_xml_files.files=$$files($${PWD}/xpcfHelloWithAllComponents.xml) - -INSTALLS += header_files target xpcf_xml_files -DISTFILES += Makefile \ - bcom-xpcfHelloWithAllComponents.pc.in \ - xpcfHelloWithAllComponents.xml diff --git a/samples/xpcfHelloWithAllComponents/xpcfHelloWithAllComponents.xml b/samples/xpcfHelloWithAllComponents/xpcfHelloWithAllComponents.xml deleted file mode 100644 index 2811e48..0000000 --- a/samples/xpcfHelloWithAllComponents/xpcfHelloWithAllComponents.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/xpcfHelloWithAllComponents/xpcfHelloWithAllComponents_main.cpp b/samples/xpcfHelloWithAllComponents/xpcfHelloWithAllComponents_main.cpp deleted file mode 100644 index 2128385..0000000 --- a/samples/xpcfHelloWithAllComponents/xpcfHelloWithAllComponents_main.cpp +++ /dev/null @@ -1,50 +0,0 @@ - -#include -#include -#include "WorldComponent.h" -#include "PeopleComponent.h" -#include "ConfigurableComponent.h" -#include "InjectableAdapterComponent.h" - -namespace xpcf=org::bcom::xpcf; - -/** - * @ingroup xpcfmodule - */ -/** - * Declare module. - */ -XPCF_DECLARE_MODULE("81B74564-CCE7-4266-867D-9772DFA7F9B0","xpcfHelloWithAllComponents","xpcfHelloWithAllComponents module description"); - -/** - * This method is the module entry point. - * XPCF uses this method to create components available in the module. - * - * Each component exposed must be declared inside a xpcf::tryCreateComponent() call. - */ -extern "C" XPCF_MODULEHOOKS_API xpcf::XPCFErrorCode XPCF_getComponent(const xpcf::uuids::uuid& componentUUID,SRef& interfaceRef) -{ - xpcf::XPCFErrorCode errCode = xpcf::XPCFErrorCode::_FAIL; - errCode = xpcf::tryCreateComponent(componentUUID,interfaceRef); - if (errCode != xpcf::XPCFErrorCode::_SUCCESS) { - errCode = xpcf::tryCreateComponent(componentUUID,interfaceRef); - } - if (errCode != xpcf::XPCFErrorCode::_SUCCESS) { - errCode = xpcf::tryCreateComponent(componentUUID,interfaceRef); - } - if (errCode != xpcf::XPCFErrorCode::_SUCCESS) { - errCode = xpcf::tryCreateComponent(componentUUID,interfaceRef); - } - return errCode; -} - -/** - * The declarations below populate list of the components available in the module (it represents the module index). - * XPCF uses this index to introspect the components available in a module, providing the ability to generate the configuration file skeleton from the code. - */ -XPCF_BEGIN_COMPONENTS_DECLARATION -XPCF_ADD_COMPONENT(WorldComponent) -XPCF_ADD_COMPONENT(PeopleComponent) -XPCF_ADD_COMPONENT(ConfigurableComponent) -XPCF_ADD_COMPONENT(InjectableAdapterComponent) -XPCF_END_COMPONENTS_DECLARATION diff --git a/samples/xpcfHelloWorld/.gitignore b/samples/xpcfHelloWorld/.gitignore deleted file mode 100644 index 259148f..0000000 --- a/samples/xpcfHelloWorld/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -# Prerequisites -*.d - -# Compiled Object files -*.slo -*.lo -*.o -*.obj - -# Precompiled Headers -*.gch -*.pch - -# Compiled Dynamic libraries -*.so -*.dylib -*.dll - -# Fortran module files -*.mod -*.smod - -# Compiled Static libraries -*.lai -*.la -*.a -*.lib - -# Executables -*.exe -*.out -*.app diff --git a/samples/xpcfHelloWorld/WorldComponent.cpp b/samples/xpcfHelloWorld/WorldComponent.cpp deleted file mode 100644 index 230a6e8..0000000 --- a/samples/xpcfHelloWorld/WorldComponent.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include "WorldComponent.h" -#include "xpcfHelloWorldAPI.h" -#include - -namespace xpcf = org::bcom::xpcf; - -template<> WorldComponent* xpcf::ComponentFactory::createInstance(); - -WorldComponent::WorldComponent():xpcf::ComponentBase(xpcf::toMap()) -{ - declareInterface(this); -} - - -WorldComponent::~WorldComponent() -{ - -} - -void WorldComponent::unloadComponent () -{ - // provide component cleanup strategy - // default strategy is to delete self, uncomment following line in this case : - delete this; - return; -} - - -void WorldComponent::print() -{ - std::cout<<"Hello World"< -#include "IMessage.h" - - -class WorldComponent : public org::bcom::xpcf::ComponentBase, virtual public IMessage -{ -public: - WorldComponent(); - ~WorldComponent() override; - void unloadComponent () override; - void print() override; -}; - - - - -template <> struct org::bcom::xpcf::ComponentTraits -{ - static constexpr const char * UUID = "C97EA5EF-93DA-46ED-9A1C-AF9AC8F5F5A9"; - static constexpr const char * NAME = "WorldComponent"; - static constexpr const char * DESCRIPTION = "WorldComponent implements IMessage interface"; -}; - -#endif // WORLDCOMPONENT_H diff --git a/samples/xpcfHelloWorld/packagedependencies.txt.template b/samples/xpcfHelloWorld/packagedependencies.txt.template deleted file mode 100644 index 1686dd4..0000000 --- a/samples/xpcfHelloWorld/packagedependencies.txt.template +++ /dev/null @@ -1 +0,0 @@ -xpcf||xpcf|github|https://github.com/b-com-software-basis/xpcf/releases/download diff --git a/samples/xpcfHelloWorld/remaken-xpcfHelloWorld.pc.in b/samples/xpcfHelloWorld/remaken-xpcfHelloWorld.pc.in deleted file mode 100644 index 85d11cb..0000000 --- a/samples/xpcfHelloWorld/remaken-xpcfHelloWorld.pc.in +++ /dev/null @@ -1,9 +0,0 @@ -libname=@TARGET@ -prefix=/usr/local -includedir=${prefix}/interfaces - -Name: @TARGET@ -Description: -Version: @VERSION@ -Requires: -Cflags: -I${includedir} diff --git a/samples/xpcfHelloWorld/xpcfHelloWorld.pro b/samples/xpcfHelloWorld/xpcfHelloWorld.pro deleted file mode 100644 index 1d1ca35..0000000 --- a/samples/xpcfHelloWorld/xpcfHelloWorld.pro +++ /dev/null @@ -1,67 +0,0 @@ -TARGET = xpcfHelloWorld - -!exists(packagedependencies.txt) { - message("$$TARGET - packagedependencies.txt not present, generate it") - win32 { - system(../../scripts/win/update_version.bat) - } - linux { - system(../../scripts/unixes/update_version.sh) - } -} - -QT -= core gui -CONFIG -= app_bundle qt - -FRAMEWORK = $${TARGET} -VERSION=1.0.0 -DEFINES += $${TARGET}VERSION=\"$${VERSION}\" - -CONFIG += c++1z -CONFIG += shared - -DEPENDENCIESCONFIG = sharedlib recurse -#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibbundle.pri inclusion -include (../../builddefs/qmake/templatelibconfig.pri) - -DEFINES += BOOST_ALL_NO_LIB -DEFINES += BOOST_ALL_DYN_LINK - -SOURCES += xpcfHelloWorld_main.cpp \ - WorldComponent.cpp - -HEADERS += xpcfHelloWorldAPI.h xpcfHelloWorld_traits.h \ - WorldComponent.h \ - ../interfaces/IMessage.h - -unix { -} - -macx { - DEFINES += _MACOS_TARGET_ - QMAKE_MAC_SDK= macosx - QMAKE_CFLAGS += -mmacosx-version-min=10.7 #-x objective-c++ - QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -std=c++17 -fPIC#-x objective-c++ - QMAKE_LFLAGS += -mmacosx-version-min=10.7 -v -lstdc++ - LIBS += -lstdc++ -lc -lpthread -} - -win32 { - DEFINES += _X86_VC12_TARGET_ - DEFINES += MBCS _MBCS - } - -INCLUDEPATH += $${PWD} $${PWD}/../interfaces - -header_files.path = $${PROJECTDEPLOYDIR}/interfaces/ -header_files.files = $$files($${PWD}/../interfaces/*.h) -header_files.files += _traits.h - -target.path = $${USERHOMEFOLDER}/.xpcf/modules/$${TARGET} -xpcf_xml_files.path = $${USERHOMEFOLDER}/.xpcf/samples -xpcf_xml_files.files=$$files($${PWD}/xpcfHelloWorld.xml) - -INSTALLS += header_files target xpcf_xml_files -DISTFILES += Makefile \ - bcom-xpcfHelloWorld.pc.in \ - xpcfHelloWorld.xml diff --git a/samples/xpcfHelloWorld/xpcfHelloWorld.xml b/samples/xpcfHelloWorld/xpcfHelloWorld.xml deleted file mode 100644 index 8060732..0000000 --- a/samples/xpcfHelloWorld/xpcfHelloWorld.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/samples/xpcfHelloWorld/xpcfHelloWorldAPI.h b/samples/xpcfHelloWorld/xpcfHelloWorldAPI.h deleted file mode 100644 index 108f136..0000000 --- a/samples/xpcfHelloWorld/xpcfHelloWorldAPI.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef xpcfHelloWorldAPI_H -#define xpcfHelloWorldAPI_H - -#if _WIN32 -#ifdef xpcfHelloWorld_API_DLLEXPORT -#define xpcfHelloWorld_EXPORT_API __declspec(dllexport) -#else -#define xpcfHelloWorld_EXPORT_API __declspec(dllimport) -#endif -#else //!_WIN32 -#define xpcfHelloWorld_EXPORT_API -#endif //!_WIN32 - -#endif // XPCFSAMPLECOMPONENTAPI_H diff --git a/samples/xpcfHelloWorld/xpcfHelloWorld_main.cpp b/samples/xpcfHelloWorld/xpcfHelloWorld_main.cpp deleted file mode 100644 index a490a49..0000000 --- a/samples/xpcfHelloWorld/xpcfHelloWorld_main.cpp +++ /dev/null @@ -1,35 +0,0 @@ - -#include -#include -#include "WorldComponent.h" - -namespace xpcf=org::bcom::xpcf; - -/** - * @ingroup xpcfmodule - */ -/** - * Declare module. - */ -XPCF_DECLARE_MODULE("D54E6EC8-57FD-46C7-9652-A66C4F34A5E3","xpcfHelloWorld","xpcfHelloWorld module description"); - -/** - * This method is the module entry point. - * XPCF uses this method to create components available in the module. - * - * Each component exposed must be declared inside a xpcf::tryCreateComponent() call. - */ -extern "C" XPCF_MODULEHOOKS_API xpcf::XPCFErrorCode XPCF_getComponent(const xpcf::uuids::uuid& componentUUID,SRef& interfaceRef) -{ - xpcf::XPCFErrorCode errCode = xpcf::XPCFErrorCode::_FAIL; - errCode = xpcf::tryCreateComponent(componentUUID,interfaceRef); - return errCode; -} - -/** - * The declarations below populate list of the components available in the module (it represents the module index). - * XPCF uses this index to introspect the components available in a module, providing the ability to generate the configuration file skeleton from the code. - */ -XPCF_BEGIN_COMPONENTS_DECLARATION -XPCF_ADD_COMPONENT(WorldComponent) -XPCF_END_COMPONENTS_DECLARATION diff --git a/samples/xpcfSampleRunner/.gitignore b/samples/xpcfSampleRunner/.gitignore deleted file mode 100644 index 259148f..0000000 --- a/samples/xpcfSampleRunner/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -# Prerequisites -*.d - -# Compiled Object files -*.slo -*.lo -*.o -*.obj - -# Precompiled Headers -*.gch -*.pch - -# Compiled Dynamic libraries -*.so -*.dylib -*.dll - -# Fortran module files -*.mod -*.smod - -# Compiled Static libraries -*.lai -*.la -*.a -*.lib - -# Executables -*.exe -*.out -*.app diff --git a/samples/xpcfSampleRunner/packagedependencies.txt.template b/samples/xpcfSampleRunner/packagedependencies.txt.template deleted file mode 100644 index 2fc69fc..0000000 --- a/samples/xpcfSampleRunner/packagedependencies.txt.template +++ /dev/null @@ -1 +0,0 @@ -xpcf||xpcf|github|https://github.com/b-com-software-basis/xpcf/releases/download \ No newline at end of file diff --git a/samples/xpcfSampleRunner/xpcfSampleRunner.pro b/samples/xpcfSampleRunner/xpcfSampleRunner.pro deleted file mode 100644 index a0fea07..0000000 --- a/samples/xpcfSampleRunner/xpcfSampleRunner.pro +++ /dev/null @@ -1,55 +0,0 @@ -TARGET = xpcfSampleRunner - -!exists(packagedependencies.txt) { - message("$$TARGET - packagedependencies.txt not present, generate it") - win32 { - system(../../scripts/win/update_version.bat) - } - linux { - system(../../scripts/unixes/update_version.sh) - } -} - -QT -= core gui -CONFIG -= app_bundle qt -CONFIG += console - -FRAMEWORK = $${TARGET} -VERSION=1.0.0 -DEFINES += $${TARGET}VERSION=\"$${VERSION}\" - -CONFIG += c++1z -CONFIG += shared - -DEPENDENCIESCONFIG = sharedlib recurse -#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibbundle.pri inclusion -include (../../builddefs/qmake/templateappconfig.pri) - -DEFINES += BOOST_ALL_NO_LIB -DEFINES += BOOST_ALL_DYN_LINK - -SOURCES += xpcfSampleRunner_main.cpp - -unix { -} - -linux { - LIBS += -ldl -} - -macx { - DEFINES += _MACOS_TARGET_ - QMAKE_MAC_SDK= macosx - QMAKE_CFLAGS += -mmacosx-version-min=10.7 #-x objective-c++ - QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -std=c++17 -fPIC#-x objective-c++ - QMAKE_LFLAGS += -mmacosx-version-min=10.7 -v -lstdc++ - LIBS += -lstdc++ -lc -lpthread -} - -win32 { - DEFINES += _X86_VC12_TARGET_ - DEFINES += MBCS _MBCS - } - -INCLUDEPATH += $${PWD} $${_PRO_FILE_PWD_}/../interfaces -DISTFILES += Makefile diff --git a/samples/xpcfSampleRunner/xpcfSampleRunner_main.cpp b/samples/xpcfSampleRunner/xpcfSampleRunner_main.cpp deleted file mode 100644 index 23b398f..0000000 --- a/samples/xpcfSampleRunner/xpcfSampleRunner_main.cpp +++ /dev/null @@ -1,45 +0,0 @@ - -#include "IMessage.h" -#include -#include -#include -#include - -namespace po = boost::program_options; -namespace xpcf=org::bcom::xpcf; - -using namespace std; -/** - * Declare module. - */ -int main(int argc, char ** argv) -{ - po::options_description optionsDesc{"Usage"}; - po::variables_map optionsVars; - std::string componentUuid, xmlFilePath; - optionsDesc.add_options() - ("help,h", "produce help message") - ("file,f", po::value(&xmlFilePath), "xpcf xml configuration file to load") - ; - po::store(po::command_line_parser(argc, argv). - options(optionsDesc).run(), optionsVars); - - po::notify(optionsVars); - - if (optionsVars.count("help")) { - cout << optionsDesc < xpcfComponentManager = xpcf::getComponentManagerInstance(); - xpcf::XPCFErrorCode err = xpcfComponentManager->load(xmlFilePath.c_str()); - if (err != xpcf::XPCFErrorCode::_SUCCESS) { - return -1; - } - SRef component = xpcfComponentManager->resolve(); - if (!component) { - cout<<"Error : unable to resolve component for IMessage interface : check your xml file, it should contain at least one component implementing IMessage !"<print(); - return 0; -} diff --git a/scripts/swig/build_swig_csharp.sh b/scripts/swig/build_swig_csharp.sh deleted file mode 100755 index 813dc6f..0000000 --- a/scripts/swig/build_swig_csharp.sh +++ /dev/null @@ -1,163 +0,0 @@ -#!/bin/bash - -QTVERSION=5.15.2 - -PLATFORM="linux-gcc" -XPCF_VERSION=2.7.0 -TARGET_LANG="csharp" -DESTFOLDER="swig-xpcf-cxx" -DESTSAMPLEFOLDER="swig-xpcf-sample-cxx" -INTERFACESFOLDER=../../interfaces -SAMPLE_INTERFACESFOLDER=../../samples/sample_component -SWIGXPCFFOLDER=${INTERFACESFOLDER}/swig -SWIGSAMPLEFOLDER=${SAMPLE_INTERFACESFOLDER}/swig - -display_usage() { - echo "This script builds swig csharp for xpcf." - echo "It can receive two optional arguments." - echo -e "\nUsage: \$0 [XPCF VERSION | default='${XPCF_VERSION}'] [Qt kit version to use | default='${QTVERSION}'] [generation destination folder | default='${DESTFOLDER}'] \n" -} - -# check whether user had supplied -h or --help . If yes display usage -if [[ ( $1 == "--help") || $1 == "-h" ]] -then - display_usage - exit 0 -fi - -if [ $# -ge 1 ]; then - XPCF_VERSION=$1 -fi - -if [ $# -ge 2 ]; then - QTVERSION=$2 -fi - -if [ $# -eq 3 ]; then - DESTFOLDER=$3 -fi - -QMAKE_PATH=$HOME/Qt/${QTVERSION}/gcc_64/bin -QMAKE_SPEC=linux-g++ - -if [[ "$OSTYPE" == "darwin"* ]]; then -# overload for mac values - PLATFORM=mac-clang - QMAKE_PATH=/Applications/Qt/${QTVERSION}/clang_64/bin - QMAKE_SPEC=macx-clang - export PKG_CONFIG_PATH=/usr/local/opt/openssl@1.1/lib/pkgconfig:/usr/local/lib/pkgconfig -fi - -if [ -d ${TARGET_LANG}-android ]; then - rm -rf ${TARGET_LANG}-android -fi - -if [ -d ${TARGET_LANG}-sample ]; then - rm -rf ${TARGET_LANG}-sample -fi - -if [ -d ${TARGET_LANG} ]; then - rm -rf ${TARGET_LANG} -fi - -if [ -d ${DESTFOLDER} ]; then - rm -rf ${DESTFOLDER} -fi - -if [ -d ${DESTSAMPLEFOLDER} ]; then - rm -rf ${DESTSAMPLEFOLDER} -fi - -REMAKEN_PLATFORM_ROOT=~/.remaken/packages/${PLATFORM} -REMAKEN_XPCF_PKG_ROOT=${REMAKEN_PLATFORM_ROOT}/xpcf/${XPCF_VERSION} - -OPTIONS="-c++ -${TARGET_LANG} -fcompact -O -I${SWIGXPCFFOLDER} -I${SWIGSAMPLEFOLDER} -I${SAMPLE_INTERFACESFOLDER} -I${INTERFACESFOLDER} -DXPCF_USE_BOOST -DSWIG_CSHARP_NO_WSTRING_HELPER" -generate_swig() { -local swigFilesFolder=$1 -local targetLangDestFolder=$2 -local sourceLangDestFolder=$3 -local swigImportSymbol=$4 -for swigFile in ${swigFilesFolder}/*.i ; do - echo "--> parsing $swigFile" - file_name=${swigFile##*/} - file=${file_name%.*} - outfolder=${targetLangDestFolder}/${file/_//} - if [ ! -d $outfolder ]; then - mkdir -p $outfolder - fi - if [ ! -d ${sourceLangDestFolder} ]; then - mkdir -p ${sourceLangDestFolder} - fi - find "$outfolder" -name "*.*" -type f -delete - echo "swig ${OPTIONS} -dllimport ${swigImportSymbol} -namespace ${file/_/.} -outdir ${outfolder} -o ${sourceLangDestFolder}/${file}_wrap.cxx $swigFile" - swig ${OPTIONS} -dllimport ${swigImportSymbol} -namespace ${file/_/.} -outdir ${outfolder} -o ${sourceLangDestFolder}/${file}_wrap.cxx $swigFile - echo "-----------------------------------------------" -done -} - -echo "Generating xpcf csharp interfaces with SWIG" -generate_swig ${SWIGXPCFFOLDER} ${TARGET_LANG} ${DESTFOLDER} "swig_xpcf" -generate_swig ${SWIGSAMPLEFOLDER} ${TARGET_LANG} ${DESTFOLDER} "swig_xpcf" -generate_swig ${SWIGXPCFFOLDER} ${TARGET_LANG}-sample ${DESTSAMPLEFOLDER} "swig_xpcf_sample" -generate_swig ${SWIGSAMPLEFOLDER} ${TARGET_LANG}-sample ${DESTSAMPLEFOLDER} "swig_xpcf_sample" -echo "-----------------------------------------------" - -echo "------------------ Export xpcf csharp files to test folder -----------------------------" -if [ -d test/XPCF ]; then - echo "Suppress csharp interfaces in test/XPCF" - rm -r test/XPCF -fi -cp -r ${TARGET_LANG}-sample/XPCF test -echo "-----------------------------------------------" - -echo "Generating xpcf c++ wrapping shared libraries" -if [ -d build-swig-xpcf-sample/shared ]; then - rm -rf build-swig-xpcf-sample/shared -fi -mkdir -p build-swig-xpcf-sample/shared/debug -mkdir -p build-swig-xpcf-sample/shared/release -echo "===========> building swig-xpcf-sample shared <===========" -pushd build-swig-xpcf-sample/shared/debug -`${QMAKE_PATH}/qmake ../../../swig_xpcf_sample.pro -spec ${QMAKE_SPEC} CONFIG+=debug CONFIG+=x86_64 CONFIG+=qml_debug && /usr/bin/make qmake_all` -make -make install -popd -pushd build-swig-xpcf-sample/shared/release -`${QMAKE_PATH}/qmake ../../../swig_xpcf_sample.pro -spec ${QMAKE_SPEC} CONFIG+=x86_64 CONFIG+=qml_debug && /usr/bin/make qmake_all` -make -make install -popd -echo "-----------------------------------------------" - -echo "Generating .Net sample test project with dotnet core" -dotnet build test/testXpcfCsharp.csproj -echo "-----------------------------------------------" - -echo "------------------ Deploying shared libraries (swig wrapper, xpcf...) to C# binary folder -----------------------------" -remaken bundle -v -c debug --cpp-std 17 -d test/bin/Debug/net6.0/. --recurse test/packagedependencies.txt -echo "-----------------------------------------------" - -echo "------------------ Patch for Android support -----------------------------" -cp -r ${TARGET_LANG} ${TARGET_LANG}-android -files=`find ${TARGET_LANG}-android -name "*PINVOKE.cs"` -#Comment: MonoPInvokeCallback should be added to static method generated by SWIG while using IL2CPP -echo "--> Editing files for Android support" -for file in $files -do - echo "----> " $file - sed -i -e 's/static void SetPending/[AOT.MonoPInvokeCallback(typeof(ExceptionDelegate))] static void SetPending/g' $file - sed -i -e 's/static string CreateString(string cString)/[AOT.MonoPInvokeCallback(typeof(SWIGStringDelegate))] static string CreateString(string cString)/g' $file -done - -echo "-----------------------------------------------" - -REMAKEN_TARGET_FOLDER=${REMAKEN_XPCF_PKG_ROOT}/${TARGET_LANG} - -echo "------------------ Export to ${REMAKEN_TARGET_FOLDER} -----------------------------" -mkdir -p ${REMAKEN_TARGET_FOLDER} -if [ "$(ls -A ${REMAKEN_TARGET_FOLDER})" ]; then - echo "Suppress csharp interfaces in ${REMAKEN_TARGET_FOLDER}/" - rm -r ${REMAKEN_TARGET_FOLDER}/* -fi -cp -R ${TARGET_LANG}/* ${REMAKEN_TARGET_FOLDER} -echo "-----------------------------------------------" diff --git a/scripts/swig/clean_swig_build.sh b/scripts/swig/clean_swig_build.sh deleted file mode 100755 index b1e8186..0000000 --- a/scripts/swig/clean_swig_build.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash -TARGET_LANG="csharp" -DESTFOLDER="swig-xpcf-cxx" -DESTSAMPLEFOLDER="swig-xpcf-sample-cxx" - -display_usage() { - echo "This script cleans swig csharp for xpcf." -} -# check whether user had supplied -h or --help . If yes display usage -if [[ ( $1 == "--help") || $1 == "-h" ]] -then - display_usage - exit 0 -fi - -if [ -d ${TARGET_LANG}-android ]; then - echo "Removing folder ${TARGET_LANG}-android" - rm -rf ${TARGET_LANG}-android -fi - -if [ -d ${TARGET_LANG}-sample ]; then - echo "Removing folder ${TARGET_LANG}-sample" - rm -rf ${TARGET_LANG}-sample -fi - -if [ -d ${TARGET_LANG} ]; then - echo "Removing folder ${TARGET_LANG}" - rm -rf ${TARGET_LANG} -fi - -if [ -d ${DESTFOLDER} ]; then - echo "Removing folder ${DESTFOLDER}" - rm -rf ${DESTFOLDER} -fi - -if [ -d ${DESTSAMPLEFOLDER} ]; then - echo "Removing folder ${DESTSAMPLEFOLDER}" - rm -r ${DESTSAMPLEFOLDER} -fi - -if [ -d test/XPCF ]; then - echo "Suppress csharp interfaces in test/XPCF" - rm -rf test/XPCF -fi - -if [ -d test/bin ]; then - echo "Suppress csharp binaries in test/bin" - rm -rf test/bin -fi - -if [ -d test/obj ]; then - echo "Suppress csharp objects in test/obj" - rm -rf test/obj -fi - -if [ -d build-swig-xpcf-sample ]; then - echo "Suppress folder build-swig-xpcf-sample" - rm -rf build-swig-xpcf-sample -fi diff --git a/scripts/swig/install_swig_dotNet.sh b/scripts/swig/install_swig_dotNet.sh deleted file mode 100755 index 2377391..0000000 --- a/scripts/swig/install_swig_dotNet.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -if [[ "$OSTYPE" == "linux-gnu" ]]; then -echo "Installing microsoft package signing key" -wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb -sudo dpkg -i packages-microsoft-prod.deb -rm packages-microsoft-prod.deb - -echo "Installing .net sdk" -sudo apt-get update; -sudo apt-get install -y apt-transport-https && sudo apt-get update && sudo apt-get install -y dotnet-sdk-6.0 -elif [[ "$OSTYPE" == "darwin"* ]]; then -echo "Download and install dotnet core package from https://dotnet.microsoft.com/en-us/download" -fi - -echo "Installing swig" -brew install swig diff --git a/scripts/swig/packagedependencies.txt.template b/scripts/swig/packagedependencies.txt.template deleted file mode 100644 index d353727..0000000 --- a/scripts/swig/packagedependencies.txt.template +++ /dev/null @@ -1,2 +0,0 @@ -xpcf||xpcf%USE_XPCF_BOOST|github|https://github.com/ -xpcf-std||xpcf-std%USE_XPCF_STD|github|https://github.com/ diff --git a/scripts/swig/swig_xpcf.pri b/scripts/swig/swig_xpcf.pri deleted file mode 100644 index f11303b..0000000 --- a/scripts/swig/swig_xpcf.pri +++ /dev/null @@ -1,8 +0,0 @@ -SOURCES += \ -$${SWIG_CXX_GEN_FOLDER}/XPCF_Api_wrap.cxx \ -$${SWIG_CXX_GEN_FOLDER}/XPCF_Collection_wrap.cxx \ -$${SWIG_CXX_GEN_FOLDER}/XPCF_Component_wrap.cxx \ -$${SWIG_CXX_GEN_FOLDER}/XPCF_Core_wrap.cxx \ -$${SWIG_CXX_GEN_FOLDER}/XPCF_Module_wrap.cxx \ -$${SWIG_CXX_GEN_FOLDER}/XPCF_Properties_wrap.cxx \ -$${SWIG_CXX_GEN_FOLDER}/XPCF_Traits_wrap.cxx diff --git a/scripts/swig/swig_xpcf.pro b/scripts/swig/swig_xpcf.pro deleted file mode 100755 index 6af4196..0000000 --- a/scripts/swig/swig_xpcf.pro +++ /dev/null @@ -1,94 +0,0 @@ -include(../../version.pri) -## remove Qt dependencies -QT -= core gui -CONFIG -= qt - -## global defintions : target lib name, version -TARGET = swig_xpcf -FRAMEWORK = $${TARGET} -VERSION=XPCF_VERSION - -DEFINES += MYVERSION=$${VERSION} -DEFINES += TEMPLATE_LIBRARY -CONFIG += c++1z - - -DEFINES += USE_XPCF_BOOST -CONFIG(debug,debug|release) { - DEFINES += _DEBUG=1 - DEFINES += DEBUG=1 -} - -CONFIG(release,debug|release) { - DEFINES += _NDEBUG=1 - DEFINES += NDEBUG=1 -} - -SWIG_CXX_GEN_FOLDER=swig-xpcf-cxx -SWIG_CSHARP_GEN_FOLDER=csharp - -!exists($${SWIG_CXX_GEN_FOLDER}) { - error("Call build_swig_csharp.sh script before building this project") -} - -DEPENDENCIESCONFIG = sharedlib recursive install - -PROJECTCONFIG = QTVS - -#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib, QMAKE_TARGET.arch and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibconfig.pri inclusion -include (../../builddefs/qmake/templatelibconfig.pri) - -## DEFINES FOR MSVC/INTEL C++ compilers -msvc { -DEFINES += "_BCOM_SHARED=__declspec(dllexport)" -} - -include (swig_xpcf.pri) - -DEFINES += SWIG - -unix:!android { - QMAKE_CXXFLAGS += -Wignored-qualifiers -} - -linux { - QMAKE_LFLAGS += -ldl -} - -macx { - DEFINES += _MACOS_TARGET_ - QMAKE_MAC_SDK= macosx - QMAKE_CFLAGS += -mmacosx-version-min=10.7 -std=c11 #-x objective-c++ - QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -std=c11 -std=c++11 -O3 -fPIC#-x objective-c++ - QMAKE_LFLAGS += -mmacosx-version-min=10.7 -v -lstdc++ - LIBS += -lstdc++ -lc -lpthread -L/usr/local/lib -} - -win32 { - - DEFINES += WIN64 UNICODE _UNICODE - QMAKE_COMPILER_DEFINES += _WIN64 - QMAKE_CXXFLAGS += -wd4250 -wd4251 -wd4244 -wd4275 /Od -} - -android { - ANDROID_ABIS="arm64-v8a" -} - -OTHER_FILES += \ - packagedependencies.txt \ - ../../interfaces/swig/XPCF_Api.i \ - ../../interfaces/swig/XPCF_Collection.i \ - ../../interfaces/swig/XPCF_Component.i \ - ../../interfaces/swig/XPCF_Core.i \ - ../../interfaces/swig/XPCF_Module.i \ - ../../interfaces/swig/XPCF_Properties.i \ - ../../interfaces/swig/XPCF_Threading.i \ - ../../interfaces/swig/XPCF_Traits.i \ - ../../interfaces/swig/swig.i - -#NOTE : Must be placed at the end of the .pro -include (../../builddefs/qmake/remaken_install_target.pri))) - -DISTFILES += \ - build_swig_csharp.sh diff --git a/scripts/swig/swig_xpcf_sample.pri b/scripts/swig/swig_xpcf_sample.pri deleted file mode 100644 index b988c5e..0000000 --- a/scripts/swig/swig_xpcf_sample.pri +++ /dev/null @@ -1,10 +0,0 @@ -SOURCES += \ -$${SWIG_CXX_GEN_FOLDER}/XPCF_Bindings_wrap.cxx \ -$${SWIG_CXX_GEN_FOLDER}/XPCF_SampleComponent_wrap.cxx \ -$${SWIG_CXX_GEN_FOLDER}/XPCF_Api_wrap.cxx \ -$${SWIG_CXX_GEN_FOLDER}/XPCF_Collection_wrap.cxx \ -$${SWIG_CXX_GEN_FOLDER}/XPCF_Component_wrap.cxx \ -$${SWIG_CXX_GEN_FOLDER}/XPCF_Core_wrap.cxx \ -$${SWIG_CXX_GEN_FOLDER}/XPCF_Module_wrap.cxx \ -$${SWIG_CXX_GEN_FOLDER}/XPCF_Properties_wrap.cxx \ -$${SWIG_CXX_GEN_FOLDER}/XPCF_Traits_wrap.cxx diff --git a/scripts/swig/swig_xpcf_sample.pro b/scripts/swig/swig_xpcf_sample.pro deleted file mode 100755 index 4e69f48..0000000 --- a/scripts/swig/swig_xpcf_sample.pro +++ /dev/null @@ -1,101 +0,0 @@ -include(../../version.pri) -## remove Qt dependencies -QT -= core gui -CONFIG -= qt - -## global defintions : target lib name, version -TARGET = swig_xpcf_sample -FRAMEWORK = $${TARGET} -VERSION=XPCF_VERSION - -DEFINES += MYVERSION=$${VERSION} -DEFINES += TEMPLATE_LIBRARY -CONFIG += c++1z - - -DEFINES += USE_XPCF_BOOST -CONFIG(debug,debug|release) { - DEFINES += _DEBUG=1 - DEFINES += DEBUG=1 -} - -CONFIG(release,debug|release) { - DEFINES += _NDEBUG=1 - DEFINES += NDEBUG=1 -} - -SWIG_CXX_GEN_FOLDER=swig-xpcf-sample-cxx -SWIG_CSHARP_GEN_FOLDER=csharp - -!exists($${SWIG_CXX_GEN_FOLDER}) { - error("Call build_swig_csharp.sh script before building this project") -} - -DEPENDENCIESCONFIG = sharedlib recursive install - -PROJECTCONFIG = QTVS - -#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib, QMAKE_TARGET.arch and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibconfig.pri inclusion -include (../../builddefs/qmake/templatelibconfig.pri) - -## DEFINES FOR MSVC/INTEL C++ compilers -msvc { -DEFINES += "_BCOM_SHARED=__declspec(dllexport)" -} - -INCLUDEPATH += ../../samples/sample_component - -include (swig_xpcf_sample.pri) - -DEFINES += SWIG - -unix:!android { - QMAKE_CXXFLAGS += -Wignored-qualifiers -} - -linux { - QMAKE_LFLAGS += -ldl -} - -macx { - DEFINES += _MACOS_TARGET_ - QMAKE_MAC_SDK= macosx - QMAKE_CFLAGS += -mmacosx-version-min=10.7 -std=c11 #-x objective-c++ - QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -std=c11 -std=c++11 -O3 -fPIC#-x objective-c++ - QMAKE_LFLAGS += -mmacosx-version-min=10.7 -v -lstdc++ - LIBS += -lstdc++ -lc -lpthread -L/usr/local/lib -} - -win32 { - - DEFINES += WIN64 UNICODE _UNICODE - QMAKE_COMPILER_DEFINES += _WIN64 - QMAKE_CXXFLAGS += -wd4250 -wd4251 -wd4244 -wd4275 /Od -} - -android { - ANDROID_ABIS="arm64-v8a" -} - -OTHER_FILES += \ -packagedependencies.txt \ -../../interfaces/swig/XPCF_Bindings.i \ -../../interfaces/swig/XPCF_Api.i \ -../../interfaces/swig/XPCF_Collection.i \ -../../interfaces/swig/XPCF_Component.i \ -../../interfaces/swig/XPCF_Core.i \ -../../interfaces/swig/XPCF_Module.i \ -../../interfaces/swig/XPCF_Properties.i \ -../../interfaces/swig/XPCF_Threading.i \ -../../interfaces/swig/XPCF_Traits.i \ -../../interfaces/swig/swig.i \ - ../../samples/sample_component/swig/XPCF_SampleComponent.i \ - build_swig_csharp.sh \ - clean_swig_build.sh \ - install_swig_dotNet.sh - - -#NOTE : Must be placed at the end of the .pro -include (../../builddefs/qmake/remaken_install_target.pri))) - - diff --git a/scripts/swig/test/TestXpcfCsharp.cs b/scripts/swig/test/TestXpcfCsharp.cs deleted file mode 100644 index b1209d3..0000000 --- a/scripts/swig/test/TestXpcfCsharp.cs +++ /dev/null @@ -1,294 +0,0 @@ -// See https://aka.ms/new-console-template for more information -using XPCF.Api; -using XPCF.Core; -using XPCF.Collection; -using XPCF.Properties; -using XPCF.SampleComponent; -using XPCF.Bindings; -using reflect = System.Reflection; - -IntrospectExtensions.xpcfComponentManager = XPCF_Api.getComponentManagerInstance(); - -Test t = new Test(); -try -{ - IntrospectExtensions.xpcfComponentManager.load(); - IntrospectExtensions.populateRegistry(); - bool result = t.loadModuleMetadata(); -} -catch (System.TypeInitializationException e) -{ - Console.WriteLine(e.Message); - Console.WriteLine(e.StackTrace); - if (e.InnerException is not null) - { - Console.WriteLine("InnerException: " + e.InnerException.Message); - } -} -catch (System.Exception e) -{ - Console.WriteLine(e.Message); - Console.WriteLine(e.StackTrace); -} - -public static class Tester -{ - public static void testRequire(bool condition, string messageToThrow) - { - if (!condition) - { - throw new System.Exception(messageToThrow); - } - } -} -public static class IntrospectExtensions -{ - public static IComponentManager xpcfComponentManager = XPCF_Api.getComponentManagerInstance(); - public static Dictionary interfacesDict = new Dictionary(); - public static Dictionary componentsDict = new Dictionary(); - - public static void populateRegistry() { - IRegistryManager? registryMgr = IntrospectExtensions.xpcfComponentManager.getFactory().BindTo(); - if (registryMgr is not null) - { - foreach (var interfaceMdata in registryMgr.getInterfacesMetadata()) - { - IntrospectExtensions.interfacesDict.TryAdd(interfaceMdata.name(), interfaceMdata.getUUID().ToString()); - } - foreach (var moduleMData in registryMgr.getModulesMetadata()) - { - IntrospectExtensions.modulesDict.TryAdd(moduleMData.name(), moduleMData.getUUID().ToString()); - foreach (var componentMData in moduleMData.getComponentsMetadata()) - { - IntrospectExtensions.componentsDict.TryAdd(componentMData.name(), componentMData.getUUID().ToString()); - } - } - } - } - public static Dictionary modulesDict = new Dictionary(); - public static string GetUUID(string name) - { - Console.WriteLine("GetUUID for " + name); - if (interfacesDict.ContainsKey(name)) - return interfacesDict[name]; - if (componentsDict.ContainsKey(name)) - return componentsDict[name]; - if (modulesDict.ContainsKey(name)) - return modulesDict[name]; - return ""; - } - - public static string GetUUID(IAliasManager mgr, string name) - { - Console.WriteLine("GetUUID from AliasManager for " + name); - if (mgr.aliasExists(IAliasManager.Type.Component, name)) { - return mgr.resolveComponentAlias(name).ToString(); - } - if (mgr.aliasExists(IAliasManager.Type.Interface, name)) { - return mgr.resolveInterfaceAlias(name).ToString(); - } - if (mgr.aliasExists(IAliasManager.Type.Module, name)) { - return mgr.resolveModuleAlias(name).ToString(); - } - return ""; - } - - public static T handleNull(T? obj) - { - if (obj is null) - { - throw new System.Exception("Object is null " + typeof(T).Name); - } - return obj!; - } - - public static T Resolve(this IComponentManager cmpMgr) where T : class - { - return cmpMgr.getFactory().Resolve(); - } - - public static T Resolve(this IFactory factory) where T : class - { - return (T)Resolve(factory, typeof(T).Name); - } - - public static object Resolve(this IFactory factory, string name) - { - Type compType = typeof(XPCF_Bindings); - reflect.MethodInfo? method = compType.GetMethod("resolve_" + name, reflect.BindingFlags.Public | reflect.BindingFlags.Static, null, new System.Type[] { typeof(IFactory) }, null); - if (method is null) - { - throw new System.Exception("No method resolve_" + name + " available : check swig binding !"); - } - return method.Invoke(null, new object[] { factory })!; - } - - public static T Resolve(this IComponentManager cmpMgr, string instanceName) where T : class - { - return cmpMgr.getFactory().Resolve(instanceName); - } - - public static T Resolve(this IFactory factory, string instanceName) where T : class - { - return (T)Resolve(factory, typeof(T).Name, instanceName); - } - - public static object Resolve(this IFactory factory, string name, string instanceName) - { - Type compType = typeof(XPCF_Bindings); - reflect.MethodInfo? method = compType.GetMethod("resolve_" + name, reflect.BindingFlags.Public | reflect.BindingFlags.Static, null, new System.Type[] { typeof(IFactory), typeof(string) }, null); - if (method is null) - { - throw new System.Exception("No method resolve_" + name + " available : check swig binding !"); - } - return method.Invoke(null, new object[] { factory, instanceName })!; - } - - public static IComponentIntrospectEnumerable ResolveAll(this IComponentManager cmpMgr) where T : class - { - return cmpMgr.getFactory().ResolveAll(); - } - - public static IComponentIntrospectEnumerable ResolveAll(this IFactory factory) where T : class - { - return (IComponentIntrospectEnumerable)ResolveAll(factory, typeof(T).Name); - } - - public static object ResolveAll(this IFactory component, string name) - { - Type compType = typeof(XPCF_Bindings); - reflect.MethodInfo? method = compType.GetMethod("resolveAll_" + name, reflect.BindingFlags.Public | reflect.BindingFlags.Static); - if (method is null) - { - throw new System.Exception("No method resolveAll_" + name + " available : check swig binding !"); - } - return method.Invoke(null, new object[] { component })!; - } - - public static T BindTo(this IComponentIntrospect component) where T : class - { - return (T)component.BindTo(typeof(T).Name); - } - - public static object BindTo(this IComponentIntrospect component, string name) - { - InterfaceMetadata? mData = null; - foreach (UUID uuid in component.getInterfaces()) - { - string compIFName = component.getMetadata(uuid).name(); - if (compIFName.Contains(name)) - { - mData = component.getMetadata(uuid); - break; - } - } - if (mData is null) - { - throw new System.Exception("Component doesn't implement interface " + name); - } - Type compType = typeof(XPCF_Bindings); - reflect.MethodInfo? method = compType.GetMethod("bindTo_" + name, reflect.BindingFlags.Public | reflect.BindingFlags.Static); - if (method is null) - { - throw new System.Exception("No method bindTo_" + name + " available for the component: check swig binding !"); - } - return method.Invoke(null, new object[] { component })!; - } -} - -public class Test -{ - - public void displayParameter(IProperty p) - { - Console.WriteLine("Property name =" + p.getName()); - for (uint i = 0; i < p.size(); i++) - { - switch (p.getType()) - { - case IProperty.PropertyType.IProperty_NONE: - break; - case IProperty.PropertyType.IProperty_INTEGER: - Console.WriteLine("=> Int property = " + p.getIntegerValue(i)); - break; - case IProperty.PropertyType.IProperty_UINTEGER: - Console.WriteLine("=> Uint property = " + p.getUnsignedIntegerValue(i)); - break; - case IProperty.PropertyType.IProperty_LONG: - Console.WriteLine("=> Long property = " + p.getLongValue(i)); - break; - case IProperty.PropertyType.IProperty_ULONG: - Console.WriteLine("=> ULong property = " + p.getUnsignedLongValue(i)); - break; - case IProperty.PropertyType.IProperty_CHARSTR: - Console.WriteLine("=> String property = " + p.getStringValue(i)); - break; - case IProperty.PropertyType.IProperty_UNICODESTR: - break; - case IProperty.PropertyType.IProperty_FLOAT: - Console.WriteLine("=> Float property = " + p.getFloatingValue(i)); - break; - case IProperty.PropertyType.IProperty_DOUBLE: - Console.WriteLine("=> Double property = " + p.getDoubleValue(i)); - break; - case IProperty.PropertyType.IProperty_STRUCTURE: - { - IPropertyMap propertyMap = p.getStructureValue(i); - IEnumerator propertyEnum = - propertyMap.getProperties().getEnumerator(); - Console.WriteLine("Accessing class values for structure from IProperty/IPropertyMap interfaces"); - while (propertyEnum.MoveNext()) - { - displayParameter(propertyEnum.Current); - } - break; - } - default: - break; - } - } - } - public bool loadModuleMetadata() - { - - IComponentManager xpcfComponentManager = IntrospectExtensions.xpcfComponentManager; - xpcfComponentManager.load(); - XPCF.Core.UUID sampleComponentModuleUUID = new UUID("3b899ff0-e098-4218-bdaa-82abdec22960"); - XPCF.Core.UUID clsid_HumanMusician = new UUID("ae9d10bb-4bd1-462b-8c01-43f1815c6ae0"); - XPCF.Core.UUID iid_IHuman = new UUID("46333fd5-9eeb-4c9a-9912-b7df96ccf5fc"); - ModuleMetadata modMdata = xpcfComponentManager.findModuleMetadata(sampleComponentModuleUUID); - string moduleName = modMdata.name(); - string path = modMdata.getPath(); - xpcfComponentManager.clear(); - IModuleManager xpcfModuleManager = XPCF_Api.getModuleManagerInstance(); - string xpcfVersion = xpcfModuleManager.getXpcfVersion(moduleName, path); - Console.WriteLine("Module " + moduleName + " was built with xpcf version " + xpcfVersion); - Tester.testRequire(XPCFErrorCode._SUCCESS == xpcfComponentManager.getFactory().BindTo().loadModuleMetadata(moduleName, path), " failed to load module from moduleMetadata"); - InterfaceMetadata pI = xpcfComponentManager.findInterfaceMetadata(iid_IHuman); - Tester.testRequire((pI is not null), "ERROR Cannot find interface iid_IHuman !"); - ComponentMetadata cmpMetadata = xpcfComponentManager.findComponentMetadata(clsid_HumanMusician); - Tester.testRequire(cmpMetadata is not null, "ERROR Cannot get ComponentMetadata for component ID " + clsid_HumanMusician + " !"); - Console.WriteLine("Component Class clsid_HumanMusician found! Its Description is:" + cmpMetadata.description()); - string confPath = "xpcf_conf_test.xml"; - xpcfComponentManager.load(confPath); - var vgComponent = xpcfComponentManager.createComponent("{63FF193D-93E6-4EDE-9947-22F864AC843F}"); - IConfigurable rIConfigurable = vgComponent.BindTo(); - IGuitarist guitarist = vgComponent.BindTo(); - guitarist.learn(); - Console.WriteLine("Resolving component for IElectricGuitar interface"); - IElectricGuitar elecGuitar = xpcfComponentManager.Resolve(); - IGuitar guitar = elecGuitar.BindTo(); - Console.WriteLine("Electric guitar brand is " + guitar.getGuitarBrand()); - Console.WriteLine("Electric guitar string number is " + guitar.getNbStrings()); - Console.WriteLine("Accessing class values for VirtualGuitarist from IProperty/IPropertyMap interfaces"); - foreach (var property in rIConfigurable.getProperties()) - { - displayParameter(property); - } - /* catch (XPCF.Api.Exception e) { NOTE : exception not extended to derive from System.Exception... - Console.WriteLine("Catched xpcf exception : " + e.what()); - }*/ - xpcfComponentManager.clear(); - return true; - } -} diff --git a/scripts/swig/test/packagedependencies.txt b/scripts/swig/test/packagedependencies.txt deleted file mode 100644 index e730f81..0000000 --- a/scripts/swig/test/packagedependencies.txt +++ /dev/null @@ -1 +0,0 @@ -swig_xpcf_sample|2.7.0|swig_xpcf_sample|github|https://github.com/ diff --git a/scripts/swig/test/testXpcfCsharp.csproj b/scripts/swig/test/testXpcfCsharp.csproj deleted file mode 100644 index 9a77342..0000000 --- a/scripts/swig/test/testXpcfCsharp.csproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - Exe - net6.0 - enable - enable - - diff --git a/scripts/unixes/build_remaken_project.sh b/scripts/unixes/build_remaken_project.sh deleted file mode 100755 index a811a0b..0000000 --- a/scripts/unixes/build_remaken_project.sh +++ /dev/null @@ -1,129 +0,0 @@ -#!/bin/bash - -QTVERSION=5.15.2 -PROJECTROOT=../.. -MODE=shared -QMAKE_MODE="" - -# default linux values -QMAKE_PATH=$HOME/Qt/${QTVERSION}/gcc_64/bin -QMAKE_SPEC=linux-g++ -if [[ "$OSTYPE" == "darwin"* ]]; then - # overload for mac values - QMAKE_PATH=/Application/Qt/${QTVERSION}/clang_64/bin - QMAKE_SPEC=macx-clang -fi - -display_usage() { - echo "This script builds a remaken project." - echo "It takes the project name as first argument and can receive four optional arguments." - echo -e "\nUsage: \$0 [project name] [ build mode {shared|static} | default='${MODE}' ] [path to project root | default='${PROJECTROOT}'] [Qt kit version to use | default='${QTVERSION}'] [path to qmake | default='${QMAKEPATH}'] \n" -} - -# check whether user had supplied -h or --help . If yes display usage -if [[ ( $1 == "--help") || $1 == "-h" || $# -eq 0 ]] -then - display_usage - exit 0 -fi - -if [ $# -ge 1 ]; then - PROJECTNAME=$1 -fi -if [ $# -ge 2 ]; then - MODE=$2 -fi -if [ $# -ge 3 ]; then - PROJECTROOT=$3 -fi -if [ $# -ge 4 ]; then - QTVERSION=$4 -fi -if [ $# -eq 5 ]; then - QMAKE_PATH=$5 -fi - -if [[ ${MODE} != "shared" && ${MODE} != "static" ]]; then - echo "mode must be either shared or static - ${MODE} is an unsupported value" - exit 2 -fi - -if [[ ${MODE} == "static" ]]; then - QMAKE_MODE=CONFIG+=staticlib - echo "${MODE} build enabled: building with ${QMAKE_MODE} option" -fi - -if [ ! -d ${QMAKE_PATH} ]; then - echo "Qt path '${QMAKE_PATH}' doesn't exist : check your Qt installation and kits" - exit 2 -fi - -if [ ! -d ${PROJECTROOT} ]; then - echo "Project root path '${PROJECTROOT}' doesn't exist" - exit 2 -fi -if [ ! -e ${PROJECTROOT}/${PROJECTNAME}.pro ]; then - echo "Project path '${PROJECTROOT}/${PROJECTNAME}.pro' doesn't exist" - echo "Trying ${PROJECTROOT}/${PROJECTNAME}/${PROJECTNAME}.pro" - if [ -e ${PROJECTROOT}/${PROJECTNAME}/${PROJECTNAME}.pro ]; then - PROJECTROOT=${PROJECTROOT}/${PROJECTNAME} - else - echo "Project path '${PROJECTROOT}/${PROJECTNAME}/${PROJECTNAME}.pro' doesn't exist" - exit 2 - fi -fi -if [[ ! ${PROJECTROOT:0:1} = / ]]; then - PROJECTROOT=../../../${PROJECTROOT} -fi -echo "Project path used is : ${PROJECTROOT}/${PROJECTNAME}.pro" -source set_brew_env.sh - - -BUILDROOTFOLDER=build-${PROJECTNAME} - -if [ -d ${BUILDROOTFOLDER}/${MODE} ]; then - rm -rf ${BUILDROOTFOLDER}/${MODE} -fi -mkdir -p ${BUILDROOTFOLDER}/${MODE}/debug -mkdir -p ${BUILDROOTFOLDER}/${MODE}/release -echo "===========> building ${PROJECTNAME} project <===========" -pushd ${BUILDROOTFOLDER}/${MODE}/debug -`${QMAKE_PATH}/qmake ${PROJECTROOT}/${PROJECTNAME}.pro -spec ${QMAKE_SPEC} ${QMAKE_MODE} CONFIG+=debug CONFIG+=x86_64 CONFIG+=qml_debug CONFIG+=XPCF_DISABLE_ATTRIBUTES && /usr/bin/make qmake_all` -RESULT=$? -if [[ ! ${RESULT} -eq 127 ]]; then - exit ${RESULT} -fi -echo "===> qmake done" -make -RESULT=$? -if [[ ! ${RESULT} -eq 0 ]]; then - exit ${RESULT} -fi -echo "===> make done" -make install -RESULT=$? -if [[ ! ${RESULT} -eq 0 ]]; then - exit ${RESULT} -fi -echo "===> make install done" -popd -pushd ${BUILDROOTFOLDER}/${MODE}/release -`${QMAKE_PATH}/qmake ${PROJECTROOT}/${PROJECTNAME}.pro -spec ${QMAKE_SPEC} ${QMAKE_MODE} CONFIG+=x86_64 CONFIG+=qml_debug && /usr/bin/make qmake_all` -RESULT=$? -if [[ ! ${RESULT} -eq 127 ]]; then - exit ${RESULT} -fi -echo "===> qmake done" -make -RESULT=$? -if [[ ! ${RESULT} -eq 0 ]]; then - exit ${RESULT} -fi -echo "===> make done" -make install -RESULT=$? -if [[ ! ${RESULT} -eq 0 ]]; then - exit ${RESULT} -fi -echo "===> make install done" -popd diff --git a/scripts/unixes/build_remaken_project_package.sh b/scripts/unixes/build_remaken_project_package.sh deleted file mode 100755 index f523ef4..0000000 --- a/scripts/unixes/build_remaken_project_package.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash - -QTVERSION=5.15.2 -PROJECTROOT=../.. -MODE=shared -QMAKE_MODE="" - -# default linux values -QMAKE_PATH=$HOME/Qt/${QTVERSION}/gcc_64/bin -QMAKE_SPEC=linux-g++ -if [[ "$OSTYPE" == "darwin"* ]]; then - # overload for mac values - QMAKE_PATH=/Application/Qt/${QTVERSION}/clang_64/bin - QMAKE_SPEC=macx-clang -fi - -display_usage() { - echo "This script builds a remaken project." - echo "It takes the project name as first argument and can receive four optional arguments." - echo -e "\nUsage: \$0 [project name] [ build mode {shared|static} | default='${MODE}' ] [path to project root | default='${PROJECTROOT}'] [Qt kit version to use | default='${QTVERSION}'] [path to qmake | default='${QMAKEPATH}'] \n" -} - -# check whether user had supplied -h or --help . If yes display usage -if [[ ( $1 == "--help") || $1 == "-h" || $# -eq 0 ]] -then - display_usage - exit 0 -fi - -if [ $# -ge 1 ]; then - PROJECTNAME=$1 -fi -if [ $# -ge 2 ]; then - MODE=$2 -fi -if [ $# -ge 3 ]; then - PROJECTROOT=$3 -fi -if [ $# -ge 4 ]; then - QTVERSION=$4 -fi -if [ $# -eq 5 ]; then - QMAKE_PATH=$5 -fi - -if [[ ${MODE} != "shared" && ${MODE} != "static" ]]; then - echo "mode must be either shared or static - ${MODE} is an unsupported value" - exit 2 -fi - -if [[ ${MODE} == "static" ]]; then - QMAKE_MODE=CONFIG+=staticlib - echo "${MODE} build enabled: building with ${QMAKE_MODE} option" -fi - -if [ ! -d ${QMAKE_PATH} ]; then - echo "Qt path '${QMAKE_PATH}' doesn't exist : check your Qt installation and kits" - exit 2 -fi - -if [ ! -d ${PROJECTROOT} ]; then - echo "Project root path '${PROJECTROOT}' doesn't exist" - exit 2 -fi -if [ ! -e ${PROJECTROOT}/${PROJECTNAME}.pro ]; then - echo "Project path '${PROJECTROOT}/${PROJECTNAME}.pro' doesn't exist" - echo "Trying ${PROJECTROOT}/${PROJECTNAME}/${PROJECTNAME}.pro" - if [ -e ${PROJECTROOT}/${PROJECTNAME}/${PROJECTNAME}.pro ]; then - PROJECTROOT=${PROJECTROOT}/${PROJECTNAME} - else - echo "Project path '${PROJECTROOT}/${PROJECTNAME}/${PROJECTNAME}.pro' doesn't exist" - exit 2 - fi -fi -if [[ ! ${PROJECTROOT:0:1} = / ]]; then - PROJECTROOT=../../../${PROJECTROOT} -fi -echo "Project path used is : ${PROJECTROOT}/${PROJECTNAME}.pro" -source set_brew_env.sh - - -BUILDROOTFOLDER=build-${PROJECTNAME}-package - -if [ -d ${BUILDROOTFOLDER}/${MODE} ]; then - rm -rf ${BUILDROOTFOLDER}/${MODE} -fi -mkdir -p ${BUILDROOTFOLDER}/${MODE}/debug -mkdir -p ${BUILDROOTFOLDER}/${MODE}/release -echo "===========> building ${PROJECTNAME} project <===========" -pushd ${BUILDROOTFOLDER}/${MODE}/debug -`${QMAKE_PATH}/qmake ${PROJECTROOT}/${PROJECTNAME}.pro -spec ${QMAKE_SPEC} CONFIG+=package_remaken ${QMAKE_MODE} CONFIG+=debug CONFIG+=x86_64 CONFIG+=qml_debug && /usr/bin/make qmake_all` -make -make install -popd -pushd ${BUILDROOTFOLDER}/${MODE}/release -`${QMAKE_PATH}/qmake ${PROJECTROOT}/${PROJECTNAME}.pro -spec ${QMAKE_SPEC} CONFIG+=package_remaken ${QMAKE_MODE} CONFIG+=x86_64 CONFIG+=qml_debug && /usr/bin/make qmake_all` -make -make install -popd - diff --git a/scripts/unixes/build_test_xpcf.sh b/scripts/unixes/build_test_xpcf.sh deleted file mode 100755 index a0ea3cc..0000000 --- a/scripts/unixes/build_test_xpcf.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -QTVERSION=5.15.2 -XPCFROOT=../.. - -# default linux values -QMAKEPATH=$HOME/Qt/${QTVERSION}/gcc_64/bin -if [[ "$OSTYPE" == "darwin"* ]]; then - # overload for mac values - QMAKE_PATH=/Application/Qt/${QTVERSION}/clang_64/bin -fi - -display_usage() { - echo "This script builds xpcf in shared and static mode, xpcf_grpc_gen and testxpcf applications." - echo "It can receive three optional arguments." - echo -e "\nUsage: \$0 [path to xpcf project root | default='${XPCFROOT}'] [Qt kit version to use | default='${QTVERSION}'] [path to qmake | default='${QMAKEPATH}'] \n" -} - -# check whether user had supplied -h or --help . If yes display usage -if [[ ( $1 == "--help") || $1 == "-h" ]] -then - display_usage - exit 0 -fi - -if [ $# -ge 1 ]; then - XPCFROOT=$1 -fi -if [ $# -ge 2 ]; then - QTVERSION=$2 - - QMAKEPATH=$HOME/Qt/${QTVERSION}/gcc_64/bin - if [[ "$OSTYPE" == "darwin"* ]]; then - # overload for mac values - QMAKE_PATH=/Application/Qt/${QTVERSION}/clang_64/bin - fi -fi -if [ $# -eq 3 ]; then - QMAKEPATH=$3 -fi - -if [ ! -d ${XPCFROOT}/scripts/unixes/build-xpcf ]; then - echo "${XPCFROOT}/scripts/unixes/build-xpcf path doesn't exist" - echo "Running build_xpcf.sh" - ${XPCFROOT}/scripts/unixes/build_xpcf.sh ${XPCFROOT} ${QTVERSION} ${QMAKEPATH} -fi - -${XPCFROOT}/scripts/unixes/build_remaken_project.sh testxpcf shared ${XPCFROOT}/test ${QTVERSION} ${QMAKEPATH} -${XPCFROOT}/scripts/unixes/build_remaken_project.sh testxpcf_static_deps static ${XPCFROOT}/test ${QTVERSION} ${QMAKEPATH} diff --git a/scripts/unixes/build_xpcf.sh b/scripts/unixes/build_xpcf.sh deleted file mode 100755 index c7c4972..0000000 --- a/scripts/unixes/build_xpcf.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -QTVERSION=5.15.2 -XPCFROOT=../.. - -# default linux values -QMAKEPATH=$HOME/Qt/${QTVERSION}/gcc_64/bin -if [[ "$OSTYPE" == "darwin"* ]]; then - # overload for mac values - QMAKE_PATH=/Application/Qt/${QTVERSION}/clang_64/bin -fi - -display_usage() { - echo "This script builds xpcf in shared and static mode." - echo "It can receive three optional arguments." - echo -e "\nUsage: \$0 [path to xpcf project root | default='${XPCFROOT}'] [Qt kit version to use | default='${QTVERSION}'] [path to qmake | default='${QMAKEPATH}'] \n" -} - -# check whether user had supplied -h or --help . If yes display usage -if [[ ( $1 == "--help") || $1 == "-h" ]] -then - display_usage - exit 0 -fi - -if [ $# -ge 1 ]; then - XPCFROOT=$1 -fi -if [ $# -ge 2 ]; then - QTVERSION=$2 - - QMAKEPATH=$HOME/Qt/${QTVERSION}/gcc_64/bin - if [[ "$OSTYPE" == "darwin"* ]]; then - # overload for mac values - QMAKE_PATH=/Application/Qt/${QTVERSION}/clang_64/bin - fi -fi -if [ $# -eq 3 ]; then - QMAKEPATH=$3 -fi - -${XPCFROOT}/scripts/unixes/build_remaken_project.sh xpcf shared ${XPCFROOT} ${QTVERSION} ${QMAKEPATH} -${XPCFROOT}/scripts/unixes/build_remaken_project.sh xpcf static ${XPCFROOT} ${QTVERSION} ${QMAKEPATH} -${XPCFROOT}/scripts/unixes/build_remaken_project.sh xpcf_static_deps shared ${XPCFROOT} ${QTVERSION} ${QMAKEPATH} -${XPCFROOT}/scripts/unixes/build_remaken_project.sh xpcfSampleComponent shared ${XPCFROOT}/samples/sample_component ${QTVERSION} ${QMAKEPATH} -${XPCFROOT}/scripts/unixes/build_remaken_project.sh xpcfSampleComponent_static_deps shared ${XPCFROOT}/samples/sample_component ${QTVERSION} ${QMAKEPATH} \ No newline at end of file diff --git a/scripts/unixes/build_xpcf_grpc_test_sample.sh.template b/scripts/unixes/build_xpcf_grpc_test_sample.sh.template deleted file mode 100755 index 783d256..0000000 --- a/scripts/unixes/build_xpcf_grpc_test_sample.sh.template +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash -QTVERSION=6.4.2 -XPCFROOT=../.. -XPCF_VERSION= - -# default linux values -QMAKEPATH=$HOME/Qt/${QTVERSION}/gcc_64/bin -if [[ "$OSTYPE" == "darwin"* ]]; then - # overload for mac values - QMAKE_PATH=/Application/Qt/${QTVERSION}/clang_64/bin -fi - -display_usage() { - echo "This script builds xpcf in shared and static mode, xpcf_grpc_gen and testxpcf applications." - echo "It can receive three optional arguments." - echo -e "\nUsage: \$0 [path to xpcf project root | default='${XPCFROOT}'] [Qt kit version to use | default='${QTVERSION}'] [path to qmake | default='${QMAKEPATH}'] \n" -} - -# check whether user had supplied -h or --help . If yes display usage -if [[ ( $1 == "--help") || $1 == "-h" ]] -then - display_usage - exit 0 -fi - -if [ $# -ge 1 ]; then - XPCFROOT=$1 -fi -if [ $# -ge 2 ]; then - QTVERSION=$2 - - QMAKEPATH=$HOME/Qt/${QTVERSION}/gcc_64/bin - if [[ "$OSTYPE" == "darwin"* ]]; then - # overload for mac values - QMAKE_PATH=/Application/Qt/${QTVERSION}/clang_64/bin - fi -fi -if [ $# -eq 3 ]; then - QMAKEPATH=$3 -fi - -XPCF_GRPC_GEN_APPLICATION=xpcf_grpc_gen - -if [[ "$OSTYPE" == "darwin"* ]]; then - # overload for mac values - XPCF_GRPC_GEN_APPLICATION=xpcf_grpc_gen.app/Contents/MacOS/xpcf_grpc_gen -fi - -if [ ! -d ${XPCF_MODULE_ROOT}/xpcf_grpc_gen/${XPCF_VERSION}/bin/x86_64/static/release ]; then - echo "${XPCF_MODULE_ROOT}/xpcf_grpc_gen/${XPCF_VERSION}/bin/x86_64/static/release path doesn't exist: please run build_xpcf_grpc_tools.sh before building test sample" - exit 2 -fi - -${XPCF_MODULE_ROOT}/xpcf_grpc_gen/${XPCF_VERSION}/bin/x86_64/static/release/${XPCF_GRPC_GEN_APPLICATION} -n xpcfSampleComponent -v ${XPCF_VERSION} -r @github -u https://github.com/b-com-software-basis/xpcf/releases/releases/download --std c++1z --database_dir ../../samples/sample_component/ --remove_comments_in_macro -o ${XPCFROOT}/scripts/unixes/build-grpc_gen_folder_sampleComponent -g protobuf -i workspace/github/xpcf/samples/sample_component -${XPCFROOT}/scripts/unixes/build_remaken_project.sh xpcfGrpcRemotingxpcfSampleComponent shared ${XPCFROOT}/scripts/unixes/build-grpc_gen_folder_sampleComponent ${QTVERSION} ${QMAKEPATH} diff --git a/scripts/unixes/build_xpcf_grpc_tools.sh b/scripts/unixes/build_xpcf_grpc_tools.sh deleted file mode 100755 index f8e34a5..0000000 --- a/scripts/unixes/build_xpcf_grpc_tools.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -QTVERSION=5.15.2 -XPCFROOT=../.. - -# default linux values -QMAKEPATH=$HOME/Qt/${QTVERSION}/gcc_64/bin -if [[ "$OSTYPE" == "darwin"* ]]; then - # overload for mac values - QMAKE_PATH=/Application/Qt/${QTVERSION}/clang_64/bin -fi - -display_usage() { - echo "This script builds xpcf in shared and static mode, xpcf_grpc_gen and testxpcf applications." - echo "It can receive three optional arguments." - echo -e "\nUsage: \$0 [path to xpcf project root | default='${XPCFROOT}'] [Qt kit version to use | default='${QTVERSION}'] [path to qmake | default='${QMAKEPATH}'] \n" -} - -# check whether user had supplied -h or --help . If yes display usage -if [[ ( $1 == "--help") || $1 == "-h" ]] -then - display_usage - exit 0 -fi - -if [ $# -ge 1 ]; then - XPCFROOT=$1 -fi -if [ $# -ge 2 ]; then - QTVERSION=$2 - - # default linux values - QMAKEPATH=$HOME/Qt/${QTVERSION}/gcc_64/bin - if [[ "$OSTYPE" == "darwin"* ]]; then - # overload for mac values - QMAKE_PATH=/Application/Qt/${QTVERSION}/clang_64/bin - fi -fi -if [ $# -eq 3 ]; then - QMAKEPATH=$3 -fi - -if [ ! -d ${XPCFROOT}/scripts/unixes/build-xpcf ]; then - echo "${XPCFROOT}/scripts/unixes/build-xpcf path doesn't exist" - echo "Running build_xpcf.sh" - ${XPCFROOT}/scripts/unixes/build_xpcf.sh ${XPCFROOT} ${QTVERSION} ${QMAKEPATH} -fi - -${XPCFROOT}/scripts/unixes/build_remaken_project.sh xpcf_grpc_client shared ${XPCFROOT}/tools ${QTVERSION} ${QMAKEPATH} -${XPCFROOT}/scripts/unixes/build_remaken_project.sh xpcf_grpc_client_static_deps shared ${XPCFROOT}/tools/xpcf_grpc_client ${QTVERSION} ${QMAKEPATH} -${XPCFROOT}/scripts/unixes/build_remaken_project.sh xpcf_grpc_server shared ${XPCFROOT}/tools ${QTVERSION} ${QMAKEPATH} -${XPCFROOT}/scripts/unixes/build_remaken_project.sh xpcf_grpc_server_static_deps shared ${XPCFROOT}/tools/xpcf_grpc_server ${QTVERSION} ${QMAKEPATH} -${XPCFROOT}/scripts/unixes/build_remaken_project.sh xpcf_grpc_gen static ${XPCFROOT}/tools/generators/grpc ${QTVERSION} ${QMAKEPATH} diff --git a/scripts/unixes/clean_xpcf_builds.sh b/scripts/unixes/clean_xpcf_builds.sh deleted file mode 100755 index 2805ab9..0000000 --- a/scripts/unixes/clean_xpcf_builds.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -for i in $(find . -type d -name build-\*) -do - echo "Removing $i folder" - rm -rf $i -done diff --git a/scripts/unixes/make_remaken_package.sh b/scripts/unixes/make_remaken_package.sh deleted file mode 100755 index 903ce96..0000000 --- a/scripts/unixes/make_remaken_package.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -REMAKEN_PLATFORM=linux-gcc -REMAKEN_ARCH=x86_64 - -display_usage() { - echo "This script compress a remaken built package in order to deploy the compressed result on a remote." - echo "It expects two arguments." - echo -e "\nUsage: \$0 [remaken package name] [remaken package version] [remaken platform (linux-gcc, android-clang) | default='${REMAKEN_PLATFORM}' ]\n" -} - -if [ $# -lt 2 ] -then - display_usage - exit 1 -fi - -# check whether user had supplied -h or --help . If yes display usage -if [[ ( $1 == "--help") || $1 == "-h" ]] -then - display_usage - exit 0 -fi - -PKGNAME=$1 -PKGVERSION=$2 - -if [[ "$REMAKEN_PLATFORM" == "android-clang"* ]]; then -# overload for mac values - REMAKEN_ARCH=arm64-v8a -fi -if [[ "$OSTYPE" == "darwin"* ]]; then -# overload for mac values - REMAKEN_PLATFORM=mac-clang -fi - -BUILDMODES="debug release" -LINKMODES="static shared" -for linkMode in ${LINKMODES} -do -for buildMode in ${BUILDMODES} -do -BUILDFOLDER=$HOME/.remaken/packages/${REMAKEN_PLATFORM}/${linkMode}/${buildMode} -if [ -d ${BUILDFOLDER}/${PKGNAME}_${PKGVERSION}/${PKGNAME} ] -then -echo "Packaging ${PKGNAME}-${PKGVERSION} from folder ${BUILDFOLDER}/${PKGNAME}_${PKGVERSION}/${PKGNAME}" -pushd ${BUILDFOLDER}/${PKGNAME}_${PKGVERSION} -zip -r -y ${BUILDFOLDER}/${PKGNAME}_${PKGVERSION}_${REMAKEN_ARCH}_${linkMode}_${buildMode}.zip ${PKGNAME} -popd -fi -done -done diff --git a/scripts/unixes/package_xpcf.sh.template b/scripts/unixes/package_xpcf.sh.template deleted file mode 100755 index cb97940..0000000 --- a/scripts/unixes/package_xpcf.sh.template +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash -QTVERSION=5.15.2 -XPCFROOT=../.. - -# default linux values -QMAKEPATH=$HOME/Qt/${QTVERSION}/gcc_64/bin -if [[ "$OSTYPE" == "darwin"* ]]; then - # overload for mac values - QMAKE_PATH=/Application/Qt/${QTVERSION}/clang_64/bin -fi - -display_usage() { - echo "This script builds xpcf and xpcfSampleComponent in shared and static mode with a special deployment option for packaging." - echo "It also compress the various xpcf packages." - echo "It can receive three optional arguments." - echo -e "\nUsage: \$0 [path to qmake] [path to xpcf project root | default='${XPCFROOT}'] [Qt kit version to use | default='${QTVERSION}'] [path to qmake | default='${QMAKEPATH}'] \n" -} - -# check whether user had supplied -h or --help . If yes display usage -if [[ ( $1 == "--help") || $1 == "-h" ]] -then - display_usage - exit 0 -fi - -if [ $# -ge 1 ]; then - XPCFROOT=$1 -fi -if [ $# -ge 2 ]; then - QTVERSION=$2 - - QMAKEPATH=$HOME/Qt/${QTVERSION}/gcc_64/bin - if [[ "$OSTYPE" == "darwin"* ]]; then - # overload for mac values - QMAKE_PATH=/Application/Qt/${QTVERSION}/clang_64/bin - fi -fi -if [ $# -eq 3 ]; then - QMAKEPATH=$3 -fi - -${XPCFROOT}/scripts/unixes/build_remaken_project_package.sh xpcf shared ${XPCFROOT} ${QTVERSION} ${QMAKEPATH} -${XPCFROOT}/scripts/unixes/build_remaken_project_package.sh xpcf static ${XPCFROOT} ${QTVERSION} ${QMAKEPATH} -${XPCFROOT}/scripts/unixes/build_remaken_project_package.sh xpcf_static_deps shared ${XPCFROOT} ${QTVERSION} ${QMAKEPATH} -${XPCFROOT}/scripts/unixes/build_remaken_project_package.sh xpcf_grpc_gen static ${XPCFROOT}/tools/generators/grpc ${QTVERSION} ${QMAKEPATH} -${XPCFROOT}/scripts/unixes/build_remaken_project_package.sh xpcfSampleComponent shared ${XPCFROOT}/samples/sample_component ${QTVERSION} ${QMAKEPATH} - -${XPCFROOT}/scripts/unixes/make_remaken_package.sh xpcf -${XPCFROOT}/scripts/unixes/make_remaken_package.sh xpcf_static_deps -${XPCFROOT}/scripts/unixes/make_remaken_package.sh xpcf_grpc_gen -${XPCFROOT}/scripts/unixes/make_remaken_package.sh xpcfSampleComponent diff --git a/scripts/unixes/release_version.sh b/scripts/unixes/release_version.sh deleted file mode 100644 index 49a90f9..0000000 --- a/scripts/unixes/release_version.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -XPCFROOT=../.. -version = 2.10.0 - -pushd ${XPCFROOT} -scripts/unixes/update_version -f -v ${version} -popd - -./package_xpcf.sh - -# check /home/sleduc/_dev/swe/xpcf/tools/generators/grpc/GRPCProtoGenerator.cpp for grpc and protobuf version! -# => if grpc version changed => set a new xpcf_grpc_gen_bin version in https://github.com/b-com-software-basis/thirdparties-binaries/releases -# with path to grpc release and protobuf (search conan local path) -# zip -r -y xpcf_grpc_gen_bin.zip xpcf_grpc_gen_bin -# upload zip on github - -# upload manually on https://github.com/b-com-software-basis/xpcf/releases -# - release/tag xpcf/${version}/linux -# - ~/.remaken/packages/linux-gcc/static/release/xpcf_${version}_x86_64_static_release.zip -# - ~/.remaken/packages/linux-gcc/static/debug/xpcf_${version}_x86_64_static_debug.zip -# - ~/.remaken/packages/linux-gcc/shared/release/xpcf_${version}_x86_64_shared_release.zip -# - ~/.remaken/packages/linux-gcc/shared/debug/xpcf_${version}_x86_64_shared_debug.zip -# - release/tag xpcf_static_deps/${version}/linux -# - ~/.remaken/packages/linux-gcc/shared/release/xpcf_static_deps_${version}_x86_64_shared_release.zip -# - ~/.remaken/packages/linux-gcc/shared/debug/xpcf_static_deps_${version}_x86_64_shared_debug.zip -# - release/tag xpcf_grpc_gen/${version}/linux -# - ~/.remaken/packages/linux-gcc/static/releasexpcf_grpc_gen_2.10.0_x86_64_static_release.zip -# - ~/.remaken/packages/linux-gcc/static/debug/xpcf_grpc_gen_2.10.0_x86_64_static_debug.zip diff --git a/scripts/unixes/set_brew_env.sh b/scripts/unixes/set_brew_env.sh deleted file mode 100755 index 7df710f..0000000 --- a/scripts/unixes/set_brew_env.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -export REMAKENROOT=$HOME/.remaken/packages/linux-gcc -export PKG_CONFIG_PATH=/home/linuxbrew/.linuxbrew/opt/openssl/lib/pkgconfig:/home/linuxbrew/.linuxbrew/lib/pkgconfig/ -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/linuxbrew/.linuxbrew/lib:. - -if [[ "$OSTYPE" == "darwin"* ]]; then -# overload for mac values - export PKG_CONFIG_PATH=/usr/local/opt/openssl@1.1/lib/pkgconfig:/usr/local/lib/pkgconfig -fi diff --git a/scripts/unixes/update_version.sh b/scripts/unixes/update_version.sh deleted file mode 100755 index 5729c6f..0000000 --- a/scripts/unixes/update_version.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash - -version="0.0.0" -force=false -versionFound=false -cleanFound=false -templateFound=false -template="" - -display_usage() { - echo 'This script generates or replaces files from all template files (*.template) in the directory and its subdirectory' - echo 'replacing marker "" by the version (default version "0.0.0").' - echo - echo 'update_version.sh [options] --version|-v ' - echo 'options:' - echo ' - --help or -h display usage' - echo ' - --force or -f force generation (replace previous file)' - echo ' - --clean or -c remove all generated files from template' - echo ' - --template or -t generate the file only for the template given in parameter' - - exit 1 -} - -# Check parameters -for arg -do - if [ "$versionFound" = true ] - then - version=$arg - fi - if [ "$templateFound" = true ] - then - template=$arg - fi - if [[ $arg == "--help" || $arg == "-h" ]] - then - display_usage - exit 0 - fi - if [[ $arg == "--force" || $arg == "-f" ]] - then - force=true - fi - if [[ $arg == "--version" || $arg == "-v" ]] - then - versionFound=true - fi - if [[ $arg == "--template" || $arg == "-t" ]] - then - templateFound=true - fi - if [[ $arg == "--clean" || $arg == "-c" ]] - then - clean=true - fi -done - -if [[ "$templateFound" == false ]] -then - for i in $(find . -type f -name "*.template") - do - # Remove template extension - outFile=${i%.template} - - if [[ "$clean" == true ]] - then - rm $outFile - echo "removed file $outFile" - elif [[ ! -f $outFile || "$force" == true ]] - then - sed 's//'$version'/g' $i > $outFile - echo "generated file $outFile" - else - echo "no replacement of $outFile" - fi - - if [[ $outFile == *.sh ]] - then - chmod +x $outFile - fi - done -elif [[ ! "$template" == "" ]] -then - # Remove template extension - outFile=${template%.template} - - sed 's//'$version'/g' $template > $outFile - echo "generated file $outFile" -else - echo "error in template parameters: $template" -fi - -exit 0 - diff --git a/scripts/win/build_remaken_project.bat b/scripts/win/build_remaken_project.bat deleted file mode 100644 index 6992984..0000000 --- a/scripts/win/build_remaken_project.bat +++ /dev/null @@ -1,106 +0,0 @@ -@echo off -setlocal - -REM default parameter value -set QTVERSION=5.14.2 -set PROJECTROOT=../.. -set MODE=shared -set QMAKEMODE= - -REM check whether user had supplied -h or --help . If yes display usage -for %%A in ("--help" "-h") do if "%1"==%%A (call:display_usage %1 & exit /b 0) - -REM default win walues -if not "%1" == "" goto args_count_ok -:args_count_ko -call:display_usage -exit /b 1 -:args_count_ok - -set PROJECTNAME=%1 -if NOT [%2]==[] set MODE=%2 -if NOT [%3]==[] set PROJECTROOT=%3 -if NOT [%4]==[] set QTVERSION=%4 -if NOT [%5]==[] ( set QMAKE_PATH=%5) else ( set QMAKE_PATH=C:\Qt\%QTVERSION%\msvc2017_64\bin) -if NOT [%6]==[] ( set JOM_PATH=%6) else ( set JOM_PATH=c:\Qt\Tools\QtCreator\bin\jom) - -if not %MODE%==shared (if not %MODE%==static (echo "mode must be either shared or static - %MODE% is an unsupported value" & exit /b 2) ) -if %MODE%==static ( - set QMAKEMODE="CONFIG+=staticlib" - if %MODE%==static (echo "%MODE% build enabled: building with "CONFIG+=staticlib" option") -) - -if not exist %QMAKE_PATH% (echo "Qt path '%QMAKE_PATH%' doesn't exist : check your Qt installation and kits" & exit /b 2) - -if not exist %PROJECTROOT% (echo "Project root path '%PROJECTROOT%' doesn't exist" & exit /b 2) - -if not exist %PROJECTROOT%/%PROJECTNAME%.pro ( - echo "Project path '%PROJECTROOT%/%PROJECTNAME%.pro' doesn't exist" - echo "Trying %PROJECTROOT%/%PROJECTNAME%/%PROJECTNAME%.pro" - if exist %PROJECTROOT%/%PROJECTNAME%/%PROJECTNAME%.pro (set PROJECTROOT=%PROJECTROOT%/%PROJECTNAME%) else echo ("Project path '%PROJECTROOT%/%PROJECTNAME%/%PROJECTNAME%.pro' doesn't exist" & exit /b /2) -) - -REM check path is relative or absolute -if not %PROJECTROOT:~1,1%==: (set PROJECTROOT=../../../%PROJECTROOT%) -echo "Project root path used is : %PROJECTROOT%" -echo "Project path used is : %PROJECTROOT%/%PROJECTNAME%.pro" - -@REM setup Visual Studio environment -set output=setup_script.txt -call init_compiler_env_script.bat --year 2019 --output %output% -if not exist %output% call init_compiler_env_script.bat --year 2022 --output %output% -if not exist %output% ( - echo "None available Visual Studion version (2019, 2022)" - goto:end -) -set /p setup_script=<"%output%" -call "%setup_script%" -del %output% - -set BUILDROOTFOLDER=build-%PROJECTNAME% - -if exist %BUILDROOTFOLDER%\%MODE% rmdir /S /Q %BUILDROOTFOLDER%\%MODE% -if not exist %BUILDROOTFOLDER%\%MODE%\debug mkdir %BUILDROOTFOLDER%\%MODE%\debug -if not exist %BUILDROOTFOLDER%\%MODE%\release mkdir %BUILDROOTFOLDER%\%MODE%\release - -echo "===========> building %PROJECTNAME% %MODE% debug <===========" -pushd %BUILDROOTFOLDER%\%MODE%\debug -%QMAKE_PATH%\qmake.exe %PROJECTROOT%/%PROJECTNAME%.pro -spec win32-msvc CONFIG+=debug %QMAKEMODE% -if not %errorlevel%==0 ( exit /b %errorlevel% ) -echo "====> qmake ok" -%JOM_PATH%\jom.exe -if not %errorlevel%==0 ( exit /b %errorlevel% ) -echo "====> jom ok" -%JOM_PATH%\jom.exe install -if not %errorlevel%==0 ( exit /b %errorlevel% ) -echo "====> jom install ok" -popd -echo "===========> building %PROJECTNAME% %MODE% release <===========" -pushd %BUILDROOTFOLDER%\\%MODE%\release -%QMAKE_PATH%\qmake.exe %PROJECTROOT%/%PROJECTNAME%.pro -spec win32-msvc %QMAKEMODE% -if not %errorlevel%==0 ( exit /b %errorlevel% ) -echo "====> qmake ok" -%JOM_PATH%\jom.exe -if not %errorlevel%==0 ( exit /b %errorlevel% ) -echo "====> jom ok" -%JOM_PATH%\jom.exe install -if not %errorlevel%==0 ( exit /b %errorlevel% ) -echo "====> jom install ok" -popd - -endlocal -goto:eof - -::-------------------------------------------------------- -::-- Function display_usage starts below here -::-------------------------------------------------------- - -:display_usage - -echo This script builds a remaken project. -echo It takes the project name as first argument and can receive four optional arguments. -echo. -echo "Usage: [project name] [ build mode {shared|static} | default='%MODE%' ] [path to project root - default='%PROJECTROOT%'] [Qt kit version to use - default='%QTVERSION%'] [path to qmake.exe - default='%QMAKEPATH%']" -exit /b 0 - -:end diff --git a/scripts/win/build_remaken_project_package.bat b/scripts/win/build_remaken_project_package.bat deleted file mode 100644 index 8a94fbb..0000000 --- a/scripts/win/build_remaken_project_package.bat +++ /dev/null @@ -1,105 +0,0 @@ -@echo off -setlocal - -REM default parameter value -set QTVERSION=5.14.2 -set PROJECTROOT=../.. -set MODE=shared -set QMAKEMODE= - -REM check whether user had supplied -h or --help . If yes display usage -for %%A in ("--help" "-h") do if "%1"==%%A (call:display_usage %1 & exit /b 0) - -REM default win walues -if not "%1" == "" goto args_count_ok -:args_count_ko -call:display_usage -exit /b 1 -:args_count_ok - -set PROJECTNAME=%1 -if NOT [%2]==[] set MODE=%2 -if NOT [%3]==[] set PROJECTROOT=%3 -if NOT [%4]==[] set QTVERSION=%4 -if NOT [%5]==[] ( set QMAKE_PATH=%5) -if NOT [%6]==[] ( set JOM_PATH=%6) else ( set JOM_PATH=c:\Qt\Tools\QtCreator\bin\jom) - -if not %MODE%==shared (if not %MODE%==static (echo "mode must be either shared or static - %MODE% is an unsupported value" & exit /b 2) ) -if %MODE%==static ( - set QMAKEMODE="CONFIG+=staticlib" - if %MODE%==static (echo "%MODE% build enabled: building with "CONFIG+=staticlib" option") -) - -if not exist %QMAKE_PATH% (echo "Qt path '%QMAKE_PATH%' doesn't exist : check your Qt installation and kits" & exit /b 2) - -if not exist %PROJECTROOT% (echo "Project root path '%PROJECTROOT%' doesn't exist" & exit /b 2) - -if not exist %PROJECTROOT%/%PROJECTNAME%.pro ( - echo "Project path '%PROJECTROOT%/%PROJECTNAME%.pro' doesn't exist" - echo "Trying %PROJECTROOT%/%PROJECTNAME%/%PROJECTNAME%.pro" - if exist %PROJECTROOT%/%PROJECTNAME%/%PROJECTNAME%.pro (set PROJECTROOT=%PROJECTROOT%/%PROJECTNAME%) else echo ("Project path '%PROJECTROOT%/%PROJECTNAME%/%PROJECTNAME%.pro' doesn't exist" & exit /b /2) -) - -REM check path is relative or absolute -if not %PROJECTROOT:~1,1%==: (set PROJECTROOT=../../../%PROJECTROOT%) -echo "Project root path used is : %PROJECTROOT%" -echo "Project path used is : %PROJECTROOT%/%PROJECTNAME%.pro" -@REM setup Visual Studio environment -set output=setup_script.txt -call init_compiler_env_script.bat --year 2019 --output %output% -if not exist %output% call init_compiler_env_script.bat --year 2022 --output %output% -if not exist %output% ( - echo "None available Visual Studion version (2019, 2022)" - goto:end -) -set /p setup_script=<"%output%" -call "%setup_script%" -del %output% - -set BUILDROOTFOLDER=build-%PROJECTNAME%-package - -if exist %BUILDROOTFOLDER%\%MODE% rmdir /S /Q %BUILDROOTFOLDER%\%MODE% -if not exist %BUILDROOTFOLDER%\%MODE%\debug mkdir %BUILDROOTFOLDER%\%MODE%\debug -if not exist %BUILDROOTFOLDER%\%MODE%\release mkdir %BUILDROOTFOLDER%\%MODE%\release - -echo "===========> building %PROJECTNAME% %MODE% debug <===========" -pushd %BUILDROOTFOLDER%\%MODE%\debug -%QMAKE_PATH%\qmake.exe %PROJECTROOT%/%PROJECTNAME%.pro -spec win32-msvc CONFIG+=debug %QMAKEMODE% CONFIG+=package_remaken -if not %errorlevel%==0 ( exit /b %errorlevel% ) -echo "====> qmake ok" -%JOM_PATH%\jom.exe -if not %errorlevel%==0 ( exit /b %errorlevel% ) -echo "====> jom ok" -%JOM_PATH%\jom.exe install -if not %errorlevel%==0 ( exit /b %errorlevel% ) -echo "====> jom install ok" -popd -echo "===========> building %PROJECTNAME% %MODE% release <===========" -pushd %BUILDROOTFOLDER%\\%MODE%\release -%QMAKE_PATH%\qmake.exe %PROJECTROOT%/%PROJECTNAME%.pro -spec win32-msvc %QMAKEMODE% CONFIG+=package_remaken -if not %errorlevel%==0 ( exit /b %errorlevel% ) -echo "====> qmake ok" -%JOM_PATH%\jom.exe -if not %errorlevel%==0 ( exit /b %errorlevel% ) -echo "====> jom ok" -%JOM_PATH%\jom.exe install -if not %errorlevel%==0 ( exit /b %errorlevel% ) -echo "====> jom install ok" -popd - -endlocal -goto:eof - -::-------------------------------------------------------- -::-- Function display_usage starts below here -::-------------------------------------------------------- - -:display_usage - -echo This script builds a remaken project. -echo It takes the project name as first argument and can receive four optional arguments. -echo. -echo "Usage: [project name] [ build mode {shared|static} | default='%MODE%' ] [path to project root - default='%PROJECTROOT%'] [Qt kit version to use - default='%QTVERSION%'] [path to qmake executable] - default='%QMAKEPATH%'" -exit /b 0 - -:end diff --git a/scripts/win/build_test_xpcf.bat b/scripts/win/build_test_xpcf.bat deleted file mode 100644 index f721d62..0000000 --- a/scripts/win/build_test_xpcf.bat +++ /dev/null @@ -1,52 +0,0 @@ -@echo off -cls -setlocal - -REM default parameter value -set QTVERSION=5.14.2 -set XPCFROOT=../.. -set QMAKEPATH=C:\Qt\%QTVERSION%\msvc2017_64\bin -set JOMPATH=c:\Qt\Tools\QtCreator\bin\jom - -REM check whether user had supplied -h or --help . If yes display usage -for %%A in ("--help" "-h") do if "%1"==%%A (call:display_usage %1 & exit /b 0) - -REM default win walues -if NOT [%1]==[] set XPCFROOT=%1 -if NOT [%2]==[] set QTVERSION=%2 -if NOT [%3]==[] set QMAKEPATH=%3 -if NOT [%4]==[] set JOMPATH=%4 - -if not exist %XPCFROOT% (echo "XPCF project root path '%XPCFROOT%' doesn't exist" & exit /b 2) -echo "XPCF project root path used is : %XPCFROOT%" -if not exist %QMAKEPATH% (echo "qmake.exe path 'QMAKEPATH' doesn't exist" & exit /b 2) -echo "qmake path used is : %QMAKEPATH%" -if not exist %JOMPATH% (echo "jom.exe path 'JOMPATH' doesn't exist" & exit /b 2) -echo "jom path used is : %JOMPATH%" - -if not exist %XPCFROOT%/scripts/win/build-xpcf ( - pause - echo "%XPCFROOT%/scripts/win/build-xpcf path doesn't exist" - echo "Running build_xpcf.bat" - call %XPCFROOT%/scripts/win/build_xpcf.bat %XPCFROOT% %QTVERSION% - pause -) -call %XPCFROOT%/scripts/win/build_remaken_project.bat testxpcf shared %XPCFROOT%/test %QTVERSION% %QMAKEPATH% %JOMPATH% -call %XPCFROOT%/scripts/win/build_remaken_project.bat testxpcf_static_deps shared %XPCFROOT%/test %QTVERSION% %QMAKEPATH% %JOMPATH% - -endlocal -goto:eof - -::-------------------------------------------------------- -::-- Function display_usage starts below here -::-------------------------------------------------------- - -:display_usage - -echo This script builds %PROJECT% in shared mode. -echo It can receive two optional argument. -echo. -echo Usage: param [path to xpcf project root - default='%XPCFROOT%'] [Qt kit version to use - default='%QTVERSION%'] [path to qmake.exe - default='%QMAKEPATH%'] [path to jom.exe='%JOMPATH%'] -exit /b 0 - -:end diff --git a/scripts/win/build_xpcf.bat b/scripts/win/build_xpcf.bat deleted file mode 100644 index b3ef696..0000000 --- a/scripts/win/build_xpcf.bat +++ /dev/null @@ -1,47 +0,0 @@ -@echo off -setlocal - -REM default parameter value -set QTVERSION=5.14.2 -set XPCFROOT=../.. -set QMAKEPATH=C:\Qt\%QTVERSION%\msvc2017_64\bin -set JOMPATH=c:\Qt\Tools\QtCreator\bin\jom - -REM check whether user had supplied -h or --help . If yes display usage -for %%A in ("--help" "-h") do if "%1"==%%A (call:display_usage %1 & exit /b 0) - -REM default win walues -if NOT [%1]==[] set XPCFROOT=%1 -if NOT [%2]==[] set QTVERSION=%2 -if NOT [%3]==[] set QMAKEPATH=%3 -if NOT [%4]==[] set JOMPATH=%4 - -if not exist %XPCFROOT% (echo "XPCF project root path '%XPCFROOT%' doesn't exist" & exit /b 2) -echo "XPCF project root path used is : %XPCFROOT%" -if not exist %QMAKEPATH% (echo "qmake.exe path 'QMAKEPATH' doesn't exist" & exit /b 2) -echo "qmake path used is : %QMAKEPATH%" -if not exist %JOMPATH% (echo "jom.exe path 'JOMPATH' doesn't exist" & exit /b 2) -echo "jom path used is : %JOMPATH%" - -call %XPCFROOT%/scripts/win/build_remaken_project.bat xpcf shared %XPCFROOT% %QTVERSION% %QMAKEPATH% %JOMPATH% -call %XPCFROOT%/scripts/win/build_remaken_project.bat xpcf static %XPCFROOT% %QTVERSION% %QMAKEPATH% %JOMPATH% -call %XPCFROOT%/scripts/win/build_remaken_project.bat xpcf_static_deps shared %XPCFROOT% %QTVERSION% %QMAKEPATH% %JOMPATH% -call %XPCFROOT%/scripts/win/build_remaken_project.bat xpcfSampleComponent shared %XPCFROOT%/samples/sample_component %QTVERSION% %QMAKEPATH% %JOMPATH% -call %XPCFROOT%/scripts/win/build_remaken_project.bat xpcfSampleComponent_static_deps shared %XPCFROOT%/samples/sample_component %QTVERSION% %QMAKEPATH% %JOMPATH% - -endlocal -goto:eof - -::-------------------------------------------------------- -::-- Function display_usage starts below here -::-------------------------------------------------------- - -:display_usage - -echo This script builds XPCF in shared and static mode. -echo It can receive three optional argument. -echo. -echo Usage: param [path to xpcf project root - default='%XPCFROOT%'] [Qt kit version to use - default='%QTVERSION%'] [path to qmake.exe - default='%QMAKEPATH%'] [path to jom.exe='%JOMPATH%'] -exit /b 0 - -:end diff --git a/scripts/win/build_xpcf_grpc_tools.bat b/scripts/win/build_xpcf_grpc_tools.bat deleted file mode 100644 index eddc6d3..0000000 --- a/scripts/win/build_xpcf_grpc_tools.bat +++ /dev/null @@ -1,40 +0,0 @@ -@echo off -setlocal - -@REM /bin/bash -set QTVERSION=5.14.2 -set XPCFROOT=../.. -set QMAKEPATH=C:\Qt\%QTVERSION%\msvc2017_64\bin - -@REM check whether user had supplied -h or --help . If yes display usage -for %%A in ("--help" "-h") do if "%1"==%%A (call:display_usage %1 & exit /b 0) - -@REM default win walues -if NOT [%1]==[] set XPCFROOT=%1 -if NOT [%2]==[] set QTVERSION=%2 -if NOT [%3]==[] set QMAKEPATH=%3 - -if not exist %XPCFROOT% (echo "XPCF project root path '%XPCFROOT%' doesn't exist" & exit /b 2) -echo "XPCF project root path used is : %XPCFROOT%" -if not exist %QMAKEPATH% (echo "qmake.exe path 'QMAKEPATH' doesn't exist" & exit /b 2) -echo "qmake path used is : %QMAKEPATH%" - -REM call %XPCFROOT%/libs/build_cppast.bat -call %XPCFROOT%/scripts/win/build_remaken_project.bat xpcf_grpc_gen shared %XPCFROOT%/tools/generators/grpc %QTVERSION% %QMAKEPATH% - -endlocal -goto:eof - -::-------------------------------------------------------- -::-- Function display_usage starts below here -::-------------------------------------------------------- - -:display_usage - -echo This script builds XPCF tools. -echo It can receive three optional argument. -echo. -echo Usage: param [path to xpcf project root - default='%XPCFROOT%'] [Qt kit version to use - default='%QTVERSION%'] [path to qmake.exe - default='%QMAKEPATH%'] -exit /b 0 - -:end diff --git a/scripts/win/clean_xpcf_builds.bat b/scripts/win/clean_xpcf_builds.bat deleted file mode 100644 index ae6ffa6..0000000 --- a/scripts/win/clean_xpcf_builds.bat +++ /dev/null @@ -1,15 +0,0 @@ -@echo off -cls -setlocal - -for /f "delims=" %%D in ('dir /a:d /b build-*') do ( - echo "Removing %%~fD folder" - rmdir /S /Q %%~FD -) - -endlocal -goto:eof - -:end - - diff --git a/scripts/win/init_compiler_env_script.bat b/scripts/win/init_compiler_env_script.bat deleted file mode 100644 index 262d63e..0000000 --- a/scripts/win/init_compiler_env_script.bat +++ /dev/null @@ -1,82 +0,0 @@ -@setlocal enableextensions enabledelayedexpansion -@echo off - -REM ##################### -REM Parameters processing -REM ##################### -for %%A in (%*) do ( - if /I "%%A"=="--help" (call:display_usage %1 & exit /b 0) - if /I "%%A"=="-h" (call:display_usage %1 & exit /b 0) -) - -set year="" -set output="" - -for %%A in (%*) do ( - if "!yearFound!"=="true" ( - set year=%%A - goto yearParamProcessed - ) - if "%%A"=="--year" set yearFound=true - if "%%A"=="-y" set yearFound=true -) -:yearParamProcessed - -for %%A in (%*) do ( - if "!outputFound!"=="true" ( - set output=%%A - goto outputParamProcessed - ) - if "%%A"=="--output" set outputFound=true - if "%%A"=="-o" set outputFound=true -) -:outputParamProcessed - -REM ##################################################### -REM Search of the batch initializing compiler environment -REM ##################################################### -if not exist "c:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" ( - echo "vswhere.exe not installed, unable to find compiler path" - goto end -) - -set path="" -for /F "delims=" %%i in ('"c:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -requires Microsoft.Component.MSBuild -property installationPath') do ( - if %year%=="" ( - set path=%%i - goto displayPath - ) - set temp=%%i - set temp=!temp:%year%=! - if not !temp!==%%i ( - set path=%%i - goto displayPath - ) -) - -:displayPath -if !path!=="" ( - echo "Error: no path found for %year%" - goto end -) -if not %output%=="" ( - echo set Visual Studio environment: !path!\VC\Auxiliary\Build\vcvars64.bat - echo !path!\VC\Auxiliary\Build\vcvars64.bat > %output% -) else ( - echo !path!\VC\Auxiliary\Build\vcvars64.bat -) - -goto end - -:display_usage -echo This script searches for the path of the batch to execute to set up environment for Visual Studio compiler and writes it in a file -echo It takes the year of Visual Studio (2017, 2019, ...) and a file path to write the result. -echo -echo init_compiler_env_script [option ] -echo option: -echo - --help or -h display usage -echo - --year or -y define year of Visual Studio to search -echo - --output or -o define file path to write path of the batch to execute to set up the environment of Visual Studio compiler -exit /b 0 - -:end \ No newline at end of file diff --git a/scripts/win/make_remaken_package.bat b/scripts/win/make_remaken_package.bat deleted file mode 100644 index 19f8591..0000000 --- a/scripts/win/make_remaken_package.bat +++ /dev/null @@ -1,50 +0,0 @@ -@echo off -setlocal - -REM check whether user had supplied -h or --help . If yes display usage -for %%A in ("--help" "-h") do if "%1"==%%A (call:display_usage & exit /b 0) - -if "%2" == "" goto args_count_ko -if "%3" == "" goto args_count_ok -:args_count_ko -call:display_usage -exit /b 1 -:args_count_ok - -echo "===========> package <===========" -set PKGNAME=%1 -set PKGVERSION=%2 -set REMAKEN_PLATFORM=win-cl-14.1 -set BUILDMODES=debug release -set LINKMODES=shared static - -for %%b in (%BUILDMODES%) do ( - REM https://stackoverflow.com/questions/8648178/getting-substring-of-a-token-in-for-loop - setlocal EnableDelayedExpansion - for %%l in (%LINKMODES%) do ( - SET BUILDFOLDER=%USERPROFILE%\.remaken\packages\%REMAKEN_PLATFORM%\%%l\%%b\%PKGNAME%_%PKGVERSION% - if exist !BUILDFOLDER!\%PKGNAME%\ ( - echo Packaging %PKGNAME%-%PKGVERSION% from folder !BUILDFOLDER!\%PKGNAME% - 7z a -tzip %PKGNAME%_%PKGVERSION%_x86_64_%%l_%%b.zip !BUILDFOLDER!\%PKGNAME% >NUL - ) - ) -) - -endlocal -goto:eof - - -::-------------------------------------------------------- -::-- Function display_usage starts below here -::-------------------------------------------------------- - -:display_usage - -echo This compress a remaken built package in order to deploy the compressed result on a remote. -echo It expects two arguments. -echo. -echo Usage: params [remaken package name] [remaken package version] -exit /b 0 - -:end - diff --git a/scripts/win/package_xpcf.bat.template b/scripts/win/package_xpcf.bat.template deleted file mode 100644 index 6d369e0..0000000 --- a/scripts/win/package_xpcf.bat.template +++ /dev/null @@ -1,49 +0,0 @@ -@echo off -cls -setlocal - -set PKGVERSION= - -REM default parameter value -set QTVERSION=5.14.2 -set XPCFROOT=../.. -set QMAKEPATH=C:\Qt\%QTVERSION%\msvc2017_64\bin - -REM check whether user had supplied -h or --help . If yes display usage -for %%A in ("--help" "-h") do if "%1"==%%A (call:display_usage %1 & exit /b 0) - -REM default win walues -if NOT [%1]==[] set XPCFROOT=%1 -if NOT [%2]==[] set QTVERSION=%2 -if NOT [%3]==[] set QMAKEPATH=%3 - -if not exist %XPCFROOT% (echo "XPCF project root path '%XPCFROOT%' doesn't exist" & exit /b 2) -echo "XPCF project root path used is : %XPCFROOT%" -if not exist %QMAKEPATH% (echo "qmake.exe path 'QMAKEPATH' doesn't exist" & exit /b 2) -echo "qmake path used is : %QMAKEPATH%" - -call %XPCFROOT%/scripts/win/build_remaken_project_package.bat xpcf shared %XPCFROOT% %QTVERSION% %QMAKEPATH% -call %XPCFROOT%/scripts/win/build_remaken_project_package.bat xpcf static %XPCFROOT% %QTVERSION% %QMAKEPATH% -call %XPCFROOT%/scripts/win/build_remaken_project_package.bat xpcfSampleComponent shared %XPCFROOT%/samples/sample_component %QTVERSION% %QMAKEPATH% - -call %XPCFROOT%/scripts/win/make_remaken_package.bat XPCF %PKGVERSION% -call %XPCFROOT%/scripts/win/make_remaken_package.bat xpcfSampleComponent %PKGVERSION% - -endlocal -goto:eof - - -::-------------------------------------------------------- -::-- Function display_usage starts below here -::-------------------------------------------------------- - -:display_usage - -echo This script builds XPCF and xpcfSamplecomponent in shared and static mode with a special deployment option for packaging. -echo It also compress the various xpcf packages. -echo It can receive three optional argument. -echo. -echo Usage: param [path to xpcf project root - default='%XPCFROOT%'] [Qt kit version to use - default='%QTVERSION%'] [path to qmake.exe - default='%QMAKEPATH%'] -exit /b 0 - -:end diff --git a/scripts/win/update_version.bat b/scripts/win/update_version.bat deleted file mode 100644 index 631feb6..0000000 --- a/scripts/win/update_version.bat +++ /dev/null @@ -1,123 +0,0 @@ -@echo off - -setlocal enableextensions enabledelayedexpansion - -set forceReplacement=false -set foundMarker=false -set foundReplace=false -set foundTemplate=false -set help=false -set clean=false -set marker=version -set replace=0.0.0 -set filename= - -@REM Check parameters -set argC=0 -for %%x in (%*) do ( - if "!foundReplace!"=="true" ( - set replace=%%x - set foundReplace=false - ) - if "!foundTemplate!"=="true" ( - set filename=%%x - REM echo !filename! - ) - if "%%x"=="-f" ( - set forceReplacement=true - ) - if "%%x"=="--force" ( - set help=true - ) - if "%%x"=="-h" ( - set help=true - ) - if "%%x"=="--help" ( - set help=true - ) - if "%%x"=="-v" ( - set foundReplace=true - ) - if "%%x"=="--version" ( - set foundReplace=true - ) - if "%%x"=="--clean" ( - set clean=true - ) - if "%%x"=="-c" ( - set clean=true - ) - if "%%x"=="-t" ( - set foundTemplate=true - ) - if "%%x"=="--template" ( - set foundTemplate=true - ) -) - -@REM Check optional parameters -if "!help!"=="true" goto display_usage - -if "!foundTemplate!"=="true" ( - if "!filename!"=="" ( - echo "error in template parameters: no template file found" - ) else ( - set targetFile=!filename:.template=! - REM echo !targetFile! - call :generate_file - ) -) else ( - for /f %%f in ('dir /s/b *.template') do ( - - @REM Define output file - set filename=%%f - set targetFile=!filename:.template=! - REM echo SLE !targetFile! - - @REM Remove generated files - if "!clean!"=="true" ( - del !targetFile! - echo removed file !targetFile! - ) else ( - call :generate_file - ) - ) -) -goto end - -:display_usage -echo This script generates or replaces files from all template files (*.template) in the directory and its subdirectory -echo replacing marker "" by the version (default version "0.0.0"). -echo. -echo update_version.bat [options] --version/-v ^ -echo options: -echo - --help or -h display usage -echo - --force or -f force generation (replace previous file) -echo - --clean or -c remove all generated files from template -echo - --template or -t generate the file only for the template file given in parameter -exit /b 0 - -:generate_file -@REM targetFile must be already defined - -@REM Check if a new output file must be created -set doReplace=false -if not exist !targetFile! set doReplace=true -if "%forceReplacement%"=="true" set doReplace=true - -if "!doReplace!"=="true" ( - @REM Delete older file - if exist !targetFile! del !targetFile! - - @REM Copy each line replacing searched marker by its value if necessary - for /f "delims=" %%i in ('type "!filename!"') do ( - set line=%%i - >> !targetFile! echo(!line:^<%marker%^>=%replace%! - ) - echo file !targetFile! generated -) else ( - echo no replacement of !targetFile! -) -exit /b 0 - -:end \ No newline at end of file diff --git a/src/AliasManager.cpp b/src/AliasManager.cpp deleted file mode 100644 index bd19a18..0000000 --- a/src/AliasManager.cpp +++ /dev/null @@ -1,216 +0,0 @@ -/** - * @copyright Copyright (c) 2019 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2019-06-13 - */ - - -#include "private/xpcf/AliasManager.h" -#include -#include -#include -#include - -using namespace std; -using std::placeholders::_1; - -#ifdef XPCF_WITH_LOGS -namespace logging = boost::log; -#endif - -XPCF_DEFINE_FACTORY_CREATE_INSTANCE(org::bcom::xpcf::AliasManager); - -namespace org { namespace bcom { namespace xpcf { -constexpr const char * XMLALIASNODE = "alias"; - -static const std::map aliasTypeConvertMap = { - {"interface", AliasManager::Type::Interface}, - {"component", AliasManager::Type::Component}, - {"module", AliasManager::Type::Module} -}; - - -void addAlias(std::map & elementMap, const std::string & name, const uuids::uuid & uuid, bool forceReplace) -{ - if (!forceReplace) { - if (elementMap.find(name) != elementMap.end()) { - throw Exception("Alias already exists for name = " + name); - } - } - elementMap[name] = uuid; -} - -bool aliasExistsIn(std::map & elementMap, const std::string & name) -{ - return (elementMap.find(name) != elementMap.end()); -} - -void AliasContext::clear() -{ - componentResolverMap.clear(); - interfaceResolverMap.clear(); - moduleResolverMap.clear(); -} - - -AliasManager::AliasManager():ComponentBase(toUUID()) -{ - m_context = utils::make_shared(); - declareInterface(this); - declareInterface(this); - m_addAliasFunction[AliasManager::Type::Interface] = [&](const std::string & name, const uuids::uuid & uuid, bool forceReplace) { - ::org::bcom::xpcf::addAlias(m_context->interfaceResolverMap, name, uuid, forceReplace); - }; - - m_addAliasFunction[AliasManager::Type::Component] = [&](const std::string & name, const uuids::uuid & uuid, bool forceReplace) { - ::org::bcom::xpcf::addAlias(m_context->componentResolverMap, name, uuid, forceReplace); - }; - - m_addAliasFunction[AliasManager::Type::Module] = [&](const std::string & name, const uuids::uuid & uuid, bool forceReplace) { - ::org::bcom::xpcf::addAlias(m_context->moduleResolverMap, name, uuid, forceReplace); - }; -#ifdef XPCF_WITH_LOGS - m_logger.add_attribute("ClassName", boost::log::attributes::constant("AliasManager")); - BOOST_LOG_SEV(m_logger, logging::trivial::info)<<"Constructor AliasManager::AliasManager () called!"; -#endif -} - -void AliasManager::clear() -{ - m_context->clear(); -} - -SRef AliasManager::getContext() const -{ - return m_context; -} - -void AliasManager::setContext(SRef context) -{ - m_context = context; -} - -void AliasManager::declareAlias(Type type, const std::string & name, const uuids::uuid & uuid) -{ - m_addAliasFunction[type](name,uuid,false); -} - -void AliasManager::declareExplicitAlias(Type type, const std::string & name, const uuids::uuid & uuid) -{ - m_addAliasFunction[type](name,uuid,true); -} - -bool AliasManager::aliasExists(Type type, const std::string & name) -{ - switch (type) { - case IAliasManager::Type::Interface : - return aliasExistsIn(m_context->interfaceResolverMap,name); - case IAliasManager::Type::Component : - return aliasExistsIn(m_context->componentResolverMap,name); - case IAliasManager::Type::Module : - return aliasExistsIn(m_context->moduleResolverMap,name); - } - // should never happen !!! - return false; -} - -void AliasManager::declareAliasNode(tinyxml2::XMLElement * xmlAliasElt) -{ - const char* aliasName = xmlAliasElt->Attribute("name"); - const char* aliasUuid = xmlAliasElt->Attribute("uuid"); - try { - if (( aliasName == nullptr) || (xmlAliasElt->Attribute("type") == nullptr) || ( aliasUuid == nullptr)) { - throw Exception("node incomplete : attributes name, type and uuid are mandatory."); - } - std::string typeStr = xmlAliasElt->Attribute("type"); - if (aliasTypeConvertMap.find(typeStr) == aliasTypeConvertMap.end()) { - throw Exception("Invalid type attribute : type must be a value in {component|interface|module}. No other value is allowed."); - } - uuids::uuid uuid; - try { - uuid = toUUID( aliasUuid); - } - catch(const std::runtime_error &) { - std::string what = "UUID format invalid in \"uuid\": "; - what.append(aliasUuid); - throw ConfigurationException(what); - } - - AliasManager::Type type = aliasTypeConvertMap.at(typeStr); - // replace any existing auto alias with explicit one from ! - declareExplicitAlias(type, aliasName, uuid); - } - catch (const xpcf::Exception& e) { - XmlErrorMessage msgErr("alias", e.what(), true); - if(aliasUuid != nullptr) { - msgErr.addAttribute("uuid", aliasUuid); - } - if(aliasName != nullptr) { - msgErr.addAttribute("name", aliasName); - } - throw ConfigurationException(msgErr.write()); - } -} - - -void AliasManager::declareAliases(tinyxml2::XMLElement * xmlAliasManagerElt) -{ - try { - processXmlNode(xmlAliasManagerElt, XMLALIASNODE, std::bind(&AliasManager::declareAliasNode, this, _1)); - } - catch(const xpcf::Exception& e) { - XmlErrorMessage msgErr("aliases", e.what(), true); - throw ConfigurationException(msgErr.write()); - } -} - -const uuids::uuid & AliasManager::resolveAlias(const std::string & name, const std::map & elementMap) -{ -#ifdef XPCF_WITH_LOGS - BOOST_LOG_SEV(m_logger, logging::trivial::info)<<"AliasManager::resolveAlias name="<componentResolverMap); -} - -const uuids::uuid & AliasManager::resolveInterfaceAlias(const std::string & name) -{ - return resolveAlias(name, m_context->interfaceResolverMap); -} - -const uuids::uuid & AliasManager::resolveModuleAlias(const std::string & name) -{ - return resolveAlias(name, m_context->moduleResolverMap); -} - - -}}} //namespace org::bcom::xpcf diff --git a/src/BaseException.cpp b/src/BaseException.cpp deleted file mode 100644 index a847809..0000000 --- a/src/BaseException.cpp +++ /dev/null @@ -1,156 +0,0 @@ - -#include - -#include "xpcf/core/BaseException.h" -namespace org { namespace bcom { namespace xpcf { - - -std::map xpcfBaseErrorCodeToMessageMap = { - { XPCFErrorCode::_SUCCESS , "SUCCESS" }, - { XPCFErrorCode::_FAIL , "FAIL" }, - { XPCFErrorCode::_ERROR_INVALID_ARGUMENT , "ERROR: argument provided is invalid" }, - { XPCFErrorCode::_ERROR_DOMAIN , "ERROR: domain error " }, - { XPCFErrorCode::_ERROR_NOT_IMPLEMENTED , "ERROR: method is not implemented yet" }, - { XPCFErrorCode::_ERROR_NULL_POINTER , "ERROR: Null pointer argument provided" }, - { XPCFErrorCode::_ERROR_OUT_OF_RANGE , "ERROR: Out of range argument" }, - { XPCFErrorCode::_ERROR_TYPE , "ERROR: Unsupported type" }, - { XPCFErrorCode::_ERROR_OVERFLOW , "ERROR: overflow" }, - { XPCFErrorCode::_ERROR_UNDERFLOW , "ERROR: underflow" }, - { XPCFErrorCode::_ERROR_OUT_OF_MEMORY , "ERROR: out of memory" }, - { XPCFErrorCode::_ERROR_RANGE , "ERROR: range" }, - { XPCFErrorCode::_ERROR_SYSTEM , "ERROR: system" }, - { XPCFErrorCode::_ERROR_UNKNOWN , "ERROR: unknown" }, - { XPCFErrorCode::_ERROR_ACCESS_DENIED , "ERROR: access denied " }, - { XPCFErrorCode::_ERROR_TIMEOUT , "ERROR: timeout " }, - { XPCFErrorCode::_ERROR_ILLEGAL_STATE, "ERROR: illegal state " }, - { XPCFErrorCode::_ERROR_COMPONENT_UNKNOWN , "ERROR: unknown component " }, - { XPCFErrorCode::_ERROR_INTERFACE_UNKNOWN , "ERROR: unknown interface" }, - { XPCFErrorCode::_ERROR_MODULE_UNKNOWN , "ERROR: unknown module" }, - { XPCFErrorCode::_ERROR_MODULE_MISSINGXPCF_ENTRY , "ERROR: missing xpcf method(s) in the library (either one or several from getModuleUUID, getModuleName, getComponent ... )" }, - { XPCFErrorCode::_ERROR_INJECTION_FAILED , "ERROR: injection failed" }, - { XPCFErrorCode::_ERROR_INJECTABLE_UNKNOWN , "ERROR: injectable unknown" }, - { XPCFErrorCode::_ERROR_INJECTABLE_ALREADY_DECLARED , "ERROR: injectable already declared" }, - { XPCFErrorCode::_ERROR_INJECTABLE_NOBIND , "ERROR: no binding declared for injectable" }, -}; - -Exception::Exception(XPCFErrorCode errCode): - std::runtime_error(xpcfBaseErrorCodeToMessageMap[errCode]),m_errCode(errCode) -{ -} - -Exception::Exception(const char *what, XPCFErrorCode errCode): - std::runtime_error(what),m_errCode(errCode) -{ -} - -Exception::Exception(const std::string & what, XPCFErrorCode errCode): - std::runtime_error(what),m_errCode(errCode) -{ -} - -Exception::~Exception() -{ -} - -ConfigurationException::ConfigurationException(XPCFErrorCode errCode): - Exception(errCode) -{ -} -ConfigurationException::ConfigurationException(const char * what, XPCFErrorCode errCode): - Exception(what, errCode) -{ -} - -ConfigurationException::ConfigurationException(const std::string & what, XPCFErrorCode errCode): - Exception(what, errCode) -{ -} - -AccessDeniedException::AccessDeniedException(): - Exception(XPCFErrorCode::_ERROR_ACCESS_DENIED) -{ -} - -AccessDeniedException::AccessDeniedException(const char * what): - Exception(what, XPCFErrorCode::_ERROR_ACCESS_DENIED) -{ -} - -AccessDeniedException::AccessDeniedException(const std::string & what): - Exception(what, XPCFErrorCode::_ERROR_ACCESS_DENIED) -{ -} - -IllegalStateException::IllegalStateException(): - Exception(XPCFErrorCode::_ERROR_ACCESS_DENIED) -{ -} - -IllegalStateException::IllegalStateException(const char * what): - Exception(what, XPCFErrorCode::_ERROR_ACCESS_DENIED) -{ -} - -IllegalStateException::IllegalStateException(const std::string & what): - Exception(what, XPCFErrorCode::_ERROR_ILLEGAL_STATE) -{ -} - -NotImplementedException::NotImplementedException():Exception(XPCFErrorCode::_ERROR_NOT_IMPLEMENTED) -{ -} - -NotImplementedException::NotImplementedException(const char * what):Exception(what) -{ -} - -NotImplementedException::NotImplementedException(const std::string & what):Exception(what) -{ -} - -NullPointerException::NullPointerException():Exception(XPCFErrorCode::_ERROR_NULL_POINTER) -{ -} - -NullPointerException::NullPointerException(const char * what): - Exception(what) -{ -} - -NullPointerException::NullPointerException(const std::string & what): - Exception(what) -{ -} - -TimeoutException::TimeoutException():Exception(XPCFErrorCode::_ERROR_TIMEOUT) -{ -} - -TimeoutException::TimeoutException(const char * what): - Exception(what) -{ -} - -TimeoutException::TimeoutException(const std::string & what): - Exception(what) -{ -} - -RemotingException::RemotingException(const std::string & componentName, - const std::string & rpcName, - uint32_t status) - :RemotingException("Error trying to call " + componentName + "::" + rpcName + " status=" + std::to_string(status)) -{ -} - -RemotingException::RemotingException(const char * what): - Exception(what, XPCFErrorCode::_ERROR_REMOTING) -{ -} - -RemotingException::RemotingException(const std::string & what): - Exception(what, XPCFErrorCode::_ERROR_REMOTING) -{ -} - -}}} diff --git a/src/BaseTask.cpp b/src/BaseTask.cpp deleted file mode 100644 index 302a667..0000000 --- a/src/BaseTask.cpp +++ /dev/null @@ -1,172 +0,0 @@ -#include "xpcf/threading/BaseTask.h" - -#ifdef XPCF_USE_BOOST -//#define BOOST_FIBERS_STATIC_LINK -//#include "boost/fiber/all.hpp" -#include "boost/fiber/fiber.hpp" -#include "boost/fiber/operations.hpp" -#include "boost/fiber/future.hpp" - -namespace bfibers = boost::fibers; -#endif - -using namespace std; -namespace org { namespace bcom { namespace xpcf { - - -void AbstractTask::cleanup() -{ - for (SRef & finalizer:m_finalizers) { - finalizer->release(); - } -} - -void AbstractTask::declareFinalizer(const SRef & fifo) -{ - m_finalizers.push_back(fifo); -} - -BaseTask::~BaseTask() -{ - stop(); -} - -void BaseTask::start() -{ - m_stop = false; - m_thread = thread([this] { this->process(); }); - if (!m_joinable) { - m_thread.detach(); - } -} - -void BaseTask::stop() -{ - m_stop = true; - cleanup(); - if (m_joinable && m_thread.joinable()) { - m_thread.join(); - } -} - -void BaseTask::awaitRunning() -{ - if (!m_stop) { - std::future startedFuture = m_startedPromise.get_future(); - startedFuture.wait(); - } -} - -void BaseTask::signalRunning() -{ - m_startedPromise.set_value(); -} - -void BaseTask::yield() -{ - std::this_thread::yield(); -} - -void AbstractDelegateTask::process() -{ - signalRunning(); - while(!stopped()) { - m_processFunc(); - } -} - -void DelegateTask::start() -{ - m_stop = false; - m_startedPromise = std::promise(); - m_startedFuture = m_startedPromise.get_future(); - m_thread = thread([this] { this->process(); }); - if (!m_joinable) { - m_thread.detach(); - } -} - -void DelegateTask::stop() -{ - m_stop = true; - cleanup(); - if (m_joinable && m_thread.joinable()) { - m_thread.join(); - } -} - - -void DelegateTask::awaitRunning() -{ - if (!m_stop) { - m_startedFuture.wait(); - } -} - -void DelegateTask::signalRunning() -{ - m_startedPromise.set_value(); -} - -void DelegateTask::yield() -{ - BaseTask::yield(); -} - -#ifdef XPCF_USE_BOOST - -class FiberTask::FiberTaskImpl { -public: - bfibers::fiber m_fiber; - bfibers::promise m_startedPromise; - bfibers::future m_startedFuture; -}; - -FiberTask::FiberTask(std::function processingFunction, bool joinable): - AbstractDelegateTask(processingFunction, joinable),m_pimpl(new FiberTaskImpl()) -{ -} - -FiberTask::~FiberTask() -{ -} - -void FiberTask::start() -{ - m_stop = false; - m_pimpl->m_fiber = bfibers::fiber([this] { this->process(); }); - m_pimpl->m_startedPromise = bfibers::promise(); - m_pimpl->m_startedFuture = m_pimpl->m_startedPromise.get_future(); - if (!m_joinable) { - m_pimpl->m_fiber.detach(); - } -} - -void FiberTask::stop() -{ - m_stop = true; - cleanup(); - if (m_joinable && m_pimpl->m_fiber.joinable()) { - m_pimpl->m_fiber.join(); - } -} - -void FiberTask::signalRunning() -{ - m_pimpl->m_startedPromise .set_value(); -} - -void FiberTask::awaitRunning() -{ - if (!m_stop) { - m_pimpl->m_startedFuture.wait(); - } -} - -void FiberTask::yield() -{ - boost::this_fiber::yield(); -} -#endif - -}}} diff --git a/src/ComponentBase.cpp b/src/ComponentBase.cpp index 564bcbd..eeff92e 100644 --- a/src/ComponentBase.cpp +++ b/src/ComponentBase.cpp @@ -20,52 +20,37 @@ * @date 2017-04-28 */ -#include "xpcf/component/ComponentBase.h" -#include "private/xpcf/PropertyManager.h" -#include "xpcf/core/Exception.h" -#include "xpcf/core/helpers.h" -#include "xpcf/api/IModuleManager.h" +#define BOOST_ALL_DYN_LINK 1 +#include "ComponentBase.h" +#include #include +#include +#include +#include #include #include #include -#include -#include +#include "IComponentManager.h" using namespace std; namespace logging = boost::log; -namespace org { namespace bcom { namespace xpcf { - -template class IEnumerable; +namespace org { +namespace bcom { +namespace xpcf { class ComponentBase::InternalImpl { public: - InternalImpl(const uuids::uuid& componentUUID):m_componentUUID(componentUUID) {} + InternalImpl() = default; ~InternalImpl() = default; - void declareInterface(const uuids::uuid & interfaceUUID, utils::any aThis, const char * name, const char * description); - const InterfaceMetadata & getMetadata(const uuids::uuid& interfaceUUID) const; + void addInterface(uuids::uuid& interfaceUUID, utils::any aThis, const char * name); + const char* getDescription(const uuids::uuid& interfaceUUID) const; utils::any queryInterface(const uuids::uuid& interfaceUUID) const; - bool implements(const uuids::uuid& interfaceUUID) const; - - uint32_t getNbInterfaces() const; - const IEnumerable & getInterfaces() const { return m_interfacesUUID; } - - inline boost::log::sources::severity_logger< boost::log::trivial::severity_level > & getLogger() { return m_logger; } - // IEnumerable - /* inline UniqueRef> getEnumerator() { - return unixpcf::make_unique>(m_interfacesUUID); - } - - inline uint32_t size() { return m_interfacesUUID.size(); }*/ - - Collection,vector> m_injectablesCollection; - //std::map> m_injectablesMap; - std::map m_injectablesMap; - std::map m_multiInjectablesMap; - std::map, utils::any> m_namedInjectablesMap; + int getNbInterfaces() const; + void getInterfaces(uuids::uuid* anInterfacesArray) const; + inline boost::log::sources::severity_logger< boost::log::trivial::severity_level > & getLogger() { return m_logger;} private: boost::log::sources::severity_logger< boost::log::trivial::severity_level > m_logger; @@ -73,228 +58,126 @@ class ComponentBase::InternalImpl { InternalImpl & operator=(InternalImpl const &); struct XPCF_ObjectInterface { - XPCF_ObjectInterface(InterfaceMetadata metadata):m_metadata(metadata){} - InterfaceMetadata m_metadata; - utils::any m_component; + uuids::uuid m_uuid; + utils::any m_component; + std::string m_description; }; - Collection m_interfacesUUID; std::map> m_interfaces; - const uuids::uuid & m_componentUUID; }; -ComponentBase::ComponentBase(const uuids::uuid & uuid) - :m_pimpl(new InternalImpl(uuid)), m_UUID(uuid), m_usageRefCount(0) -{ -#ifdef XPCF_WITH_LOGS - m_pimpl->getLogger().add_attribute("ClassName", boost::log::attributes::constant("ComponentBase")); - BOOST_LOG_SEV(m_pimpl->getLogger(), logging::trivial::info)<(this); - declareInterface(this); -} - -ComponentBase::ComponentBase(std::map componentTrait) - : ComponentBase(toUUID(componentTrait.at("UUID"))) +ComponentBase::ComponentBase():m_internalImpl(new InternalImpl()),m_count(0) { - m_componentTrait = componentTrait; + m_internalImpl->getLogger().add_attribute("ClassName", boost::log::attributes::constant("ComponentBase")); + BOOST_LOG_SEV(m_internalImpl->getLogger(), logging::trivial::info)<<"ComponentBase::ComponentBase construction"; + addInterface(this,IComponentIntrospect::UUID, "IComponentIntrospect"); } ComponentBase::~ComponentBase() { -#ifdef XPCF_WITH_LOGS - BOOST_LOG_SEV(m_pimpl->getLogger(), logging::trivial::info)<getLogger(), logging::trivial::info)<<"ComponentBase::~ComponentBase destruction"; } -void ComponentBase::onInjected() -{ -#ifdef XPCF_WITH_LOGS - BOOST_LOG_SEV(m_pimpl->getLogger(), logging::trivial::info)<<" ComponentBase::onInjected"; -#endif +void ComponentBase::addComponentRef() { + m_count++; + BOOST_LOG_SEV(m_internalImpl->getLogger(), logging::trivial::info)<<"ComponentBase::addComponentRef refcount="<getLogger(), logging::trivial::info)<getLogger(), logging::trivial::info)<<"ComponentBase::releaseComponentRef refcount="<getLogger(), logging::trivial::info)<<"ComponentBase::releaseComponentRef calling unloadComponent"; this->unloadComponent(); } } -uint32_t ComponentBase::getNbInterfaces() const +int ComponentBase::getNbInterfaces() const { - return m_pimpl->getInterfaces().size(); + return m_internalImpl->getNbInterfaces(); } -const IEnumerable & ComponentBase::getInterfaces() const +SRef ComponentBase::introspect() { - return m_pimpl->getInterfaces(); -} - -const InterfaceMetadata & ComponentBase::getMetadata(const uuids::uuid& interfaceUUID) const -{ - return m_pimpl->getMetadata(interfaceUUID); -} - -SRef ComponentBase::introspect() -{ - return IComponentIntrospect::acquireComponentRef::type, IComponentIntrospect>(this); + return IComponentIntrospect::acquireComponentRef::type,IComponentIntrospect>(this); } const char * ComponentBase::getDescription(const uuids::uuid& interfaceUUID) const { - return m_pimpl->getMetadata(interfaceUUID).description(); + return m_internalImpl->getDescription(interfaceUUID); } -void ComponentBase::declareInterface(const uuids::uuid & interfaceUUID, utils::any componentThis, const char * name, const char * description) +void ComponentBase::getInterfaces(uuids::uuid* interfacesArray) const { - m_pimpl->declareInterface(interfaceUUID, componentThis, name, description); + m_internalImpl->getInterfaces(interfacesArray); } -utils::any ComponentBase::queryInterface(const uuids::uuid& interfaceUUID) const -{ - return m_pimpl->queryInterface(interfaceUUID); -} -void ComponentBase::declareInjectable(const uuids::uuid & interfaceUUID, utils::any injectable, const std::function)> & injector, const char * instanceName, bool optional) +void ComponentBase::addInterface(uuids::uuid& interfaceUUID, utils::any componentThis, const char * name) { - pair key = make_pair(interfaceUUID,instanceName); - SPtr injMdata = utils::make_shared(injector,interfaceUUID,instanceName,optional); - if (mapContains(m_pimpl->m_namedInjectablesMap, key)) { - throw InjectableDeclarationException(injMdata); - } - m_pimpl->m_namedInjectablesMap[key] = injectable; - m_pimpl->m_injectablesCollection.add(injMdata); + m_internalImpl->addInterface(interfaceUUID, componentThis, name); } -void ComponentBase::declareInjectable(const uuids::uuid & interfaceUUID, utils::any injectable, const std::function)> & injector, bool optional) +void ComponentBase::setUUID(const uuids::uuid& componentUUID) { - SPtr injMdata = utils::make_shared(injector,interfaceUUID,optional); - if (mapContains(m_pimpl->m_injectablesMap, interfaceUUID)) { - throw InjectableDeclarationException(injMdata); - } - m_pimpl->m_injectablesMap[interfaceUUID] = injectable; - m_pimpl->m_injectablesCollection.add(injMdata); + m_UUID = componentUUID; } -void ComponentBase::declareMultiInjectable(const uuids::uuid& interfaceUUID, utils::any injectable, const std::function>>)> & injector, bool optional) +void ComponentBase::setUUID(const char * componentUUID) { - SPtr injMdata = utils::make_shared(injector,interfaceUUID,optional); - if (mapContains(m_pimpl->m_multiInjectablesMap, interfaceUUID)) { - throw InjectableDeclarationException(injMdata); - } - m_pimpl->m_multiInjectablesMap[interfaceUUID] = injectable; - m_pimpl->m_injectablesCollection.add(injMdata); + uuids::uuid componentID = toUUID(componentUUID ); + setUUID(componentID); } - -utils::any ComponentBase::retrieveInjectable(const uuids::uuid & interfaceUUID) const +utils::any ComponentBase::queryInterface(const uuids::uuid& interfaceUUID) const { - if (!mapContains(m_pimpl->m_injectablesMap, interfaceUUID)) { - SPtr injMdata = utils::make_shared(interfaceUUID); - throw InjectionException(injMdata, XPCFErrorCode::_ERROR_INJECTABLE_UNKNOWN); - } - return m_pimpl->m_injectablesMap.at(interfaceUUID); + return m_internalImpl->queryInterface(interfaceUUID); } -utils::any ComponentBase::retrieveInjectable(const uuids::uuid & interfaceUUID, const char * name) const +int ComponentBase::InternalImpl::getNbInterfaces() const { - pair key = make_pair(interfaceUUID,name); - if (!mapContains(m_pimpl->m_namedInjectablesMap, key)) { - SPtr injMdata = utils::make_shared(interfaceUUID,name); - throw InjectionException(injMdata, XPCFErrorCode::_ERROR_INJECTABLE_UNKNOWN); - } - return m_pimpl->m_namedInjectablesMap.at(key); + return m_interfaces.size(); } - - -utils::any ComponentBase::retrieveMultiInjectable(const uuids::uuid & interfaceUUID) +void ComponentBase::InternalImpl::getInterfaces(uuids::uuid* interfacesArray) const { - if (!mapContains(m_pimpl->m_multiInjectablesMap, interfaceUUID)) { - SPtr injMdata = utils::make_shared(interfaceUUID); - throw InjectionException(injMdata, XPCFErrorCode::_ERROR_INJECTABLE_UNKNOWN); + if (interfacesArray) { + unsigned long i = 0; + for (auto & compInterface:m_interfaces) { + interfacesArray[i++] = compInterface.first; + } } - return m_pimpl->m_multiInjectablesMap.at(interfaceUUID); -} - -bool ComponentBase::injectExists(const uuids::uuid & interfaceUUID) const -{ - return mapContains(m_pimpl->m_injectablesMap, interfaceUUID); -} - -bool ComponentBase::injectExists(const uuids::uuid & interfaceUUID, const char * name) const -{ - pair key = make_pair(interfaceUUID,name); - return mapContains(m_pimpl->m_namedInjectablesMap, key); -} - - -const IEnumerable> & ComponentBase::getInjectables() const -{ - return m_pimpl->m_injectablesCollection; -} - -bool ComponentBase::implements(const uuids::uuid& interfaceUUID) const -{ - return m_pimpl->implements(interfaceUUID); -} - -uint32_t ComponentBase::InternalImpl::getNbInterfaces() const -{ - return m_interfaces.size(); } -void ComponentBase::InternalImpl::declareInterface(const uuids::uuid & interfaceUUID, utils::any componentThis, const char * name, const char * description) +void ComponentBase::InternalImpl::addInterface(uuids::uuid& interfaceUUID, utils::any componentThis, const char * name) { - if (! mapContains(m_interfaces,interfaceUUID)) { - InterfaceMetadata data(name,interfaceUUID, description); - m_interfaces[interfaceUUID] = unixpcf::make_unique(data); + if (m_interfaces.find(interfaceUUID) == m_interfaces.end()) { + m_interfaces[interfaceUUID] = unixpcf::make_unique(); m_interfaces[interfaceUUID]->m_component = componentThis; - m_interfacesUUID.add(interfaceUUID); + m_interfaces[interfaceUUID]->m_uuid = interfaceUUID; + if(name != nullptr) { + m_interfaces[interfaceUUID]->m_description = name; + } } } + utils::any ComponentBase::InternalImpl::queryInterface(const uuids::uuid& interfaceUUID) const { + //TODO : handle error case : or document sptr must be tested for validity upon call utils::any component; - if (mapContains(m_interfaces,interfaceUUID)) { + if (m_interfaces.find(interfaceUUID) != m_interfaces.end()) { component = m_interfaces.at(interfaceUUID)->m_component; } - else { - throw InterfaceNotImplementedException(m_componentUUID,interfaceUUID); - } return component; } -bool ComponentBase::InternalImpl::implements(const uuids::uuid& interfaceUUID) const +const char * ComponentBase::InternalImpl::getDescription(const uuids::uuid& interfaceUUID) const { - return mapContains(m_interfaces,interfaceUUID); -} - -const InterfaceMetadata & ComponentBase::InternalImpl::getMetadata(const uuids::uuid& interfaceUUID) const -{ - if (! mapContains(m_interfaces,interfaceUUID)) { - throw InterfaceNotImplementedException("Interface not found"); + if (m_interfaces.find(interfaceUUID) != m_interfaces.end()) { + return m_interfaces.at(interfaceUUID)->m_description.c_str(); } - return m_interfaces.at(interfaceUUID)->m_metadata; + return nullptr; } - }}} //namespace org::bcom::xpcf diff --git a/src/ComponentManager.cpp b/src/ComponentManager.cpp old mode 100755 new mode 100644 index 9b7e71b..40042ed --- a/src/ComponentManager.cpp +++ b/src/ComponentManager.cpp @@ -20,169 +20,455 @@ * @date 2017-04-28 */ -#include -#include "private/xpcf/ModuleManager.h" -#include "private/xpcf/ComponentManager.h" -#include -#include -#include "private/xpcf/PathBuilder.h" -#include "private/xpcf/PropertyManager.h" +#include "ComponentManager.h" +#include "ContainerFactory.h" #include #include -#include +#include +#include +#include +#include +#include +#include "tinyxmlhelper.h" + + + using namespace std; -using std::placeholders::_1; -using std::placeholders::_2; + //namespace logging = boost::log; -#include -#include namespace fs = boost::filesystem; -#ifdef XPCF_WITH_LOGS -namespace logging = boost::log; -#endif -namespace org { namespace bcom { namespace xpcf { +namespace org { +namespace bcom { +namespace xpcf { std::atomic ComponentManager::m_instance; std::mutex ComponentManager::m_mutex; ComponentManager * ComponentManager::instance() { + ComponentManager* compMgrInstance= m_instance.load(std::memory_order_acquire); if ( !compMgrInstance ){ std::lock_guard myLock(m_mutex); compMgrInstance = m_instance.load(std::memory_order_relaxed); - if ( !compMgrInstance ){ + if( !compMgrInstance ){ compMgrInstance= new ComponentManager(); - m_instance.store(compMgrInstance, std::memory_order_release); + m_instance.store(compMgrInstance,std::memory_order_release); } } return compMgrInstance; } -SRef getComponentManagerInstance() -{ - SRef lrIComponentIntrospect = xpcf::ComponentFactory::create(); - return lrIComponentIntrospect->bindTo(); + +SRef getComponentManagerInstance() { + SRef lrIComponentIntrospect; + SRef lrIComponentManager; + xpcf::ComponentFactory::createComponent(lrIComponentIntrospect); + lrIComponentIntrospect->queryInterface(toUUID(IComponentManager::UUID),lrIComponentManager); + return lrIComponentManager; } -SRef createInstance(const uuids::uuid& componentUUID) -{ +template<> ComponentManager* org::bcom::xpcf::ComponentFactory::createInstance() { + return ComponentManager::instance(); +} - SRef xpcfComponentManager = xpcf::getComponentManagerInstance(); - SRef component = xpcfComponentManager->createComponent(componentUUID); - return component; +ComponentManager::ComponentManager():m_libraryLoaded(false) +{ + uuids::uuid cidComponentManager = org::bcom::xpcf::toUUID(ComponentManager::UUID ); + setUUID(cidComponentManager); + addInterface(this,IComponentManager::UUID, "interface IComponentManager"); + // m_logger.add_attribute("ClassName", boost::log::attributes::constant("ComponentManager")); + //BOOST_LOG_SEV(m_logger, logging::trivial::info)<<"Constructor ComponentManager::ComponentManager () called!"; } -SRef createInstance(const char * instanceName, const uuids::uuid& componentUUID) +void ComponentManager::unloadComponent () { - SRef xpcfComponentManager = xpcf::getComponentManagerInstance(); - SRef component = xpcfComponentManager->createComponent(instanceName, componentUUID); - return component; + //BOOST_LOG_SEV(m_logger, logging::trivial::info)<<"ComponentManager::unload () called!"; } -template<> ComponentManager* ComponentFactory::createInstance() +void ComponentManager::addContainerRef(const uuids::uuid& containerUUID) { - return ComponentManager::instance(); + } -ComponentManager::ComponentManager():ComponentBase(toUUID()),m_libraryLoaded(false) +void ComponentManager::releaseContainerRef(const uuids::uuid& containerUUID) { - declareInterface(this); - m_factory = ComponentFactory::create()->bindTo(); - m_propertyManager = m_factory->resolve(); -#ifdef XPCF_WITH_LOGS - m_logger.add_attribute("ClassName", boost::log::attributes::constant("ComponentManager")); - BOOST_LOG_SEV(m_logger, logging::trivial::info)<<"Constructor ComponentManager::ComponentManager () called!"; -#endif + } -uuids::uuid ComponentManager::getModuleUUID(const uuids::uuid & componentUUID) const + +unsigned long ComponentManager::load() { - return m_factory->bindTo()->getModuleUUID(componentUUID); + return load(getenv( "XPCF_REGISTRY_PATH" )); } -void ComponentManager::releaseComponent(uuids::uuid componentUUID) +unsigned long ComponentManager::load(const char* libraryFilePath) { - //Note : release the module ref, or count moduleref per component uuid to check ?? - //Caution : no release must occur for bindLocal'd components - ModuleManager::instance()->releaseModuleRef(getModuleUUID(componentUUID)); + unsigned long result = XPCF_OK; + + fs::path libraryConfigFilePath = libraryFilePath; + std::ifstream libraryConfig(libraryConfigFilePath.string()); + if (libraryConfig.good()) { + result = loadLibrary(libraryConfigFilePath); + } + else result = XPCF_FAIL; + return result; } -void ComponentManager::unloadComponent () +unsigned long ComponentManager::createComponent(const uuids::uuid& componentUUID, SRef& componentRef) { -#ifdef XPCF_WITH_LOGS - BOOST_LOG_SEV(m_logger, logging::trivial::info)<<"ComponentManager::unload () called!"; -#endif + unsigned long errCode = XPCF_OK; + + if (isLoaded()) { + SPtr componentInfos = findComponentMetadata(componentUUID); + if (!componentInfos) { + return XPCF_NOGETCOMPONENT; + } + SPtr containerInfos; + if (m_containerMap.find(componentInfos->getContainerUUID()) != m_containerMap.end()) { + containerInfos = m_containerMap.at(componentInfos->getContainerUUID()); + } + if (!containerInfos) { + return XPCF_NOGETCOMPONENT; + } + + boost::dll::shared_library shlib; + shlib.load(containerInfos->getPath()); + if (shlib.has(XPCF_GETCOMPONENT)) { + if (m_funcMap.find(containerInfos->getUUID()) == m_funcMap.end()) { + m_funcMap[containerInfos->getUUID()]=boost::dll::import&)>( + containerInfos->getPath(), XPCF_GETCOMPONENT + ); + } + + if (m_funcMap.at(containerInfos->getUUID())) { + m_funcMap.at(containerInfos->getUUID())(componentUUID,componentRef); + if (componentRef) { + addContainerRef(containerInfos->getUUID()); + } + } + + } + else { + errCode = XPCF_NOGETCOMPONENT; + } + } + return errCode; + } -void ComponentManager::clear() +SPtr ComponentManager::introspectContainer(const char* containerFilePath) { - m_propertyManager->clear(); - m_factory->clear(); - m_libraryLoaded = false; + SPtr containerInfos; + + boost::function getContainerUUID = boost::dll::import( + containerFilePath, XPCF_GETCONTAINERUUID + ); + boost::function getContainerName = boost::dll::import( + containerFilePath, XPCF_GETCONTAINERNAME + ); + if (getContainerUUID && getContainerName) { + std::string containerUUID = getContainerUUID(); + std::string containerName = getContainerName(); + if (m_containerMap.find(toUUID(containerUUID.c_str())) == m_containerMap.end()) { + containerInfos = utils::make_shared(containerName.c_str(),containerUUID.c_str(),containerFilePath); + getContainerComponentList(containerFilePath,containerInfos); + } + else { //Container has already been loaded in the library + containerInfos = m_containerMap.at(toUUID(containerUUID.c_str())); + } + } + return containerInfos; } -SRef ComponentManager::getFactory() +SPtr ComponentManager::getContainerComponentList(const uuids::uuid& componentUUID) { - return m_factory; + SPtr containerInfos; + + if (isLoaded()) { + SPtr componentInfos = findComponentMetadata(componentUUID); + if (componentInfos) { + + SPtr containerInfos; + if (m_containerMap.find(componentInfos->getContainerUUID()) != m_containerMap.end()) { + containerInfos = m_containerMap.at(componentInfos->getContainerUUID()); + } + } + } + return containerInfos; } -XPCFErrorCode ComponentManager::load() +unsigned long ComponentManager::getContainerComponentList(const char *containerPath, SPtr containerInfos) { - return m_factory->load(); + unsigned long errCode = XPCF_OK; + boost::function getNbComponents = boost::dll::import( + containerPath, XPCF_GETNBCOMPONENTS + ); + boost::function getComponentUUID = boost::dll::import( + containerPath, XPCF_GETCOMPONENTUUID + ); + if (getNbComponents && getComponentUUID) { + for (unsigned long i = 0 ; iaddComponent(toUUID(getComponentUUID(i))); + } + } + else { + errCode = XPCF_NOGETCOMPONENT; + } + + return errCode; } -XPCFErrorCode ComponentManager::load(const char* libraryFilePath) +unsigned long ComponentManager::addComponentMetadata(SPtr aClass) { - return m_factory->load(libraryFilePath); + unsigned long result = XPCF_OK; + + if (aClass) { + SPtr classExist = findComponentMetadata(aClass->getUUID()); + + if (classExist) { + result = XPCF_FAIL; + } + else { + m_componentsVector.push_back(aClass); + } + } + else { + result = XPCF_FAIL; + } + + return result; } -XPCFErrorCode ComponentManager::load(const char* folderPathStr, bool bRecurse) + +unsigned long ComponentManager::addInterfaceMetadata(SPtr aClass) { - return m_factory->load(folderPathStr, bRecurse); + unsigned long result = XPCF_OK; + + if (aClass) { + SPtr classExist = findInterfaceMetadata(aClass->getUUID()); + + if (classExist) { + result = XPCF_FAIL; + } + else { + m_interfacesVector.push_back(aClass); + } + } + else { + result = XPCF_FAIL; + } + + return result; } -SRef ComponentManager::createComponent(const uuids::uuid & componentUUID) + +// Load the library from the file given +// by +// +/********* The library file looks like this************************************************* + + + + + TOADD: + + + + + + + + + + + + + + + + + + + + + + + + + +*********************************************************************************************/ +unsigned long ComponentManager::loadLibrary(fs::path containerPath) { - return m_factory->createComponent(componentUUID); + unsigned long result = XPCF_OK; + SPtr containerInfo; + SPtr componentInfo; + SPtr interfaceInfo; + tinyxml2::XMLDocument doc; + enum tinyxml2::XMLError loadOkay = doc.LoadFile(containerPath.string().c_str()); + if (loadOkay == 0) { + try { + //BOOST_LOG_SEV(m_logger, logging::trivial::info)<<"Parsing XML from "<FirstChildElement("container"); + while (xmlContainerElt != NULL) { + string filepath = xmlContainerElt->Attribute("filepath"); + string containerUuidStr = xmlContainerElt->Attribute("uuid"); + uuids::uuid containerUuid = toUUID(containerUuidStr.c_str()); + if (m_containerMap.find(containerUuid) == m_containerMap.end()) { + string containerDescription = "ContainerDesc"; + containerInfo = utils::make_shared(containerDescription.c_str(),containerUuid,filepath.c_str()); + m_containerMap[containerUuid] = containerInfo; + tinyxml2::XMLElement *componentElt = xmlContainerElt->FirstChildElement("component"); + while (componentElt != NULL) { + string componentUuidStr = componentElt->Attribute("uuid"); + uuids::uuid componentUuid = toUUID(componentUuidStr.c_str()); + if (m_componentsMap.find(componentUuid) == m_componentsMap.end()) { + string description = componentElt->Attribute("description"); + componentInfo = utils::make_shared(description.c_str(),componentUuid,containerUuid); + m_componentsVector.push_back(componentInfo); + m_componentsMap[componentUuid] = componentInfo; + containerInfo->addComponent(componentUuid); + tinyxml2::XMLElement *interfaceElt = componentElt->FirstChildElement("interface"); + while (interfaceElt != NULL) { + //TODO : check the same IF doesn't appear twice in the vector !! ??? + string interfaceUuidStr = interfaceElt->Attribute("uuid"); + uuids::uuid interfaceUuid = toUUID(interfaceUuidStr.c_str()); + componentInfo->addInterface(interfaceUuid); + if (m_interfacesMap.find(interfaceUuid) == m_interfacesMap.end()) { + string interfaceDescription = interfaceElt->Attribute("description"); + interfaceInfo = utils::make_shared(interfaceDescription.c_str(),interfaceUuid); + m_interfacesVector.push_back(interfaceInfo); + m_interfacesMap[interfaceUuid]=interfaceInfo; + } + interfaceElt = interfaceElt->NextSiblingElement("interface"); + } + } + componentElt = componentElt->NextSiblingElement("component"); + } + } + xmlContainerElt = xmlContainerElt->NextSiblingElement(); + } + } + catch (const std::runtime_error & e) { + //BOOST_LOG_SEV(m_logger, logging::trivial::info)<<"XML parsing file "< ComponentManager::createComponent(const char * instanceName, const uuids::uuid & componentUUID) +// TODO : study which method signature ? with container ID ? or ContainerMetadata ? +// What about default configuration for the component ? +unsigned long ComponentManager::saveContainerInformations(const SPtr & containerInfos) { - return m_factory->createComponent(instanceName, componentUUID); + fs::path containerPath = containerInfos->getPath(); + unsigned long result = XPCF_OK; + SPtr containerInfo; + SPtr componentInfo; + SPtr interfaceInfo; + tinyxml2::XMLDocument doc; + enum tinyxml2::XMLError loadOkay = doc.LoadFile(containerPath.string().c_str()); + if (loadOkay == 0) { + try { + //BOOST_LOG_SEV(m_logger, logging::trivial::info)<<"Parsing XML from "<FirstChildElement("container"); + while (xmlContainerElt != NULL) { + string filepath = xmlContainerElt->Attribute("filepath"); + string containerUuidStr = xmlContainerElt->Attribute("uuid"); + uuids::uuid containerUuid = toUUID(containerUuidStr.c_str()); + string containerDescription = "ContainerDesc"; + containerInfo = utils::make_shared(containerDescription.c_str(),containerUuid,filepath.c_str()); + m_containerMap[containerUuid] = containerInfo; + tinyxml2::XMLElement *componentElt = xmlContainerElt->FirstChildElement("component"); + while (componentElt != NULL) { + string componentUuidStr = componentElt->Attribute("uuid"); + uuids::uuid componentUuid = toUUID(componentUuidStr.c_str()); + string componentDescription = componentElt->Attribute("description"); + componentInfo = utils::make_shared(componentDescription.c_str(),componentUuid,containerUuid); + m_componentsVector.push_back(componentInfo); + m_componentsMap[componentUuid] = componentInfo; + containerInfo->addComponent(componentUuid); + tinyxml2::XMLElement *interfaceElt = componentElt->FirstChildElement("interface"); + while (interfaceElt != NULL) { + //TODO : check the same IF doesn't appear twice in the vector !! ??? + string interfaceUuidStr = interfaceElt->Attribute("uuid"); + uuids::uuid interfaceUuid = toUUID(interfaceUuidStr.c_str()); + string interfaceDescription = interfaceElt->Attribute("description"); + componentInfo->addInterface(interfaceUuid); + interfaceInfo = utils::make_shared(interfaceDescription.c_str(),interfaceUuid); + m_interfacesMap[interfaceUuid] = interfaceInfo; + m_interfacesVector.push_back(interfaceInfo); + interfaceElt = interfaceElt->NextSiblingElement("interface"); + } + componentElt = componentElt->NextSiblingElement("component"); + } + xmlContainerElt = xmlContainerElt->NextSiblingElement(); + } + } + catch (const std::runtime_error & e) { + //BOOST_LOG_SEV(m_logger, logging::trivial::info)<<"XML parsing file "< // a NULL smart pointer is returned. // +SPtr ComponentManager::findComponentMetadata(const uuids::uuid& componentUUID) const +{ + SPtr result; + if (m_componentsMap.find(componentUUID) != m_componentsMap.end()) { + result = m_componentsMap.at(componentUUID); + } + return result; +} -SPtr ComponentManager::findModuleMetadata(const uuids::uuid & moduleUUID) const +SPtr ComponentManager::findInterfaceMetadata(const uuids::uuid& interfaceUUID) const { - return m_factory->bindTo()->findModuleMetadata(moduleUUID); + SPtr result; + if (m_interfacesMap.find(interfaceUUID) != m_interfacesMap.end()) { + result = m_interfacesMap.at(interfaceUUID); + } + return result; } -SPtr ComponentManager::findComponentMetadata(const uuids::uuid & componentUUID) const +bool ComponentManager::isLoaded() const { - return m_factory->bindTo()->findComponentMetadata(componentUUID); + return m_libraryLoaded; } -SPtr ComponentManager::findInterfaceMetadata(const uuids::uuid& interfaceUUID) const +int ComponentManager::getNbComponentMetadatas() const +{ + return m_componentsVector.size(); +} + +SPtr ComponentManager::getComponentMetadata(int numComponent) const { - return m_factory->bindTo()->findInterfaceMetadata(interfaceUUID); + return m_componentsVector[numComponent]; } -const IEnumerable> & ComponentManager::getModulesMetadata() const +int ComponentManager::getNbInterfaceMetadatas() const { - return m_factory->bindTo()->getModulesMetadata(); + return m_interfacesVector.size(); } -const IEnumerable> & ComponentManager::getInterfacesMetadata() const +SPtr ComponentManager::getInterfaceMetadata(int i) const { - return m_factory->bindTo()->getInterfacesMetadata(); + return m_interfacesVector[i]; } }}} //namespace org::bcom::xpcf diff --git a/src/ComponentManager.h b/src/ComponentManager.h new file mode 100644 index 0000000..eb4d494 --- /dev/null +++ b/src/ComponentManager.h @@ -0,0 +1,103 @@ +/** + * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @author Loïc Touraine + * + * @file + * @brief description of file + * @date 2017-08-18 + */ + +#ifndef __ComponentManager_H__ +#define __ComponentManager_H__ + +//#define BOOST_ALL_DYN_LINK 1 +#include "XPCF_definitions.h" +#include "ComponentMetadata.h" +#include "InterfaceMetadata.h" +#include "IComponentIntrospect.h" +#include "IComponentManager.h" +#include "ComponentBase.h" + +/*#include +#include +#include */ +#include + + +#include +#include +#include +#include + +namespace org { +namespace bcom { +namespace xpcf { +//ComponentLibrary or ContainerManager ? +class XPCF_EXPORT_API ComponentManager : public ComponentBase, + public IComponentManager { +public: + static ComponentManager* instance(); + unsigned long load(); + unsigned long load(const char* libraryFilePath); + bool isLoaded() const; + unsigned long createComponent(const uuids::uuid& componentUUID, SRef & componentRef) final; + + void unloadComponent (); + // SRef createComponent(uuids::uuid& componentUUID,uuids::uuid& riid); + SPtr introspectContainer(const char* containerFilePath); + SPtr getContainerComponentList(const uuids::uuid& componentUUID); + unsigned long saveContainerInformations(const SPtr & containerInfos); + void addContainerRef(const uuids::uuid& containerUUID); + void releaseContainerRef(const uuids::uuid& containerUUID); + + unsigned long addComponentMetadata(SPtr aClass); + int getNbComponentMetadatas() const; + SPtr getComponentMetadata(int) const; + SPtr findComponentMetadata(const uuids::uuid &) const; + + unsigned long addInterfaceMetadata(SPtr); + int getNbInterfaceMetadatas() const; + SPtr getInterfaceMetadata(int) const; + SPtr findInterfaceMetadata(const uuids::uuid&) const; + + static constexpr const char * UUID = "F905BCCD-9658-4871-87B8-B328C27675E0"; + + +private: + ComponentManager(); + ~ComponentManager()= default; + ComponentManager(const ComponentManager&)= delete; + ComponentManager& operator=(const ComponentManager&)= delete; + static std::atomic m_instance; + static std::mutex m_mutex; + + unsigned long loadLibrary(boost::filesystem::path aPath); + unsigned long getContainerComponentList(const char* containerFilePath ,SPtr containerInfos); + + //boost::log::sources::severity_logger< boost::log::trivial::severity_level > m_logger; + + std::vector> m_componentsVector; + std::vector> m_interfacesVector; + std::map> m_componentsMap; + std::map> m_interfacesMap; + std::map> m_containerMap; + std::map&)>> m_funcMap; + bool m_libraryLoaded; +}; + +}}} //namespace org::bcom::xpcf + +#endif diff --git a/src/ComponentMetadata.cpp b/src/ComponentMetadata.cpp old mode 100755 new mode 100644 index 634fd6a..56f6af6 --- a/src/ComponentMetadata.cpp +++ b/src/ComponentMetadata.cpp @@ -20,89 +20,61 @@ * @date 2017-04-28 */ -#include "xpcf/api/ComponentMetadata.h" -#include "private/xpcf/PathBuilder.h" -#include +#include "ComponentMetadata.h" + #include #include // implement Component // -namespace org { namespace bcom { namespace xpcf { - -using namespace uuids; - - -class ComponentMetadata::ComponentMetadataImpl { -public: - ComponentMetadataImpl() = default; - ComponentMetadataImpl(const ComponentMetadataImpl & copy ) = default; - Collection m_interfaceUUIDs; -}; -ComponentMetadata::ComponentMetadata(const char* name, const uuid& componentID, const char* description): - InterfaceMetadata(name, componentID, description),m_pimpl(new ComponentMetadataImpl()) -{ -} - -ComponentMetadata::ComponentMetadata(const char *name, const char *componentID, const char* description): - InterfaceMetadata(name, componentID, description),m_pimpl(new ComponentMetadataImpl()) -{ -} +namespace org { +namespace bcom { +namespace xpcf { +using namespace utils::uuids; -ComponentMetadata::ComponentMetadata(const ComponentMetadata & copy):InterfaceMetadata (copy),m_pimpl(new ComponentMetadataImpl()) +ComponentMetadata::ComponentMetadata(const char* name, const uuid& componentID, const uuid& containerUUID):InterfaceMetadata(name,componentID),m_containerUUID(containerUUID) { - for (auto i : copy.getInterfaces()) { - m_pimpl->m_interfaceUUIDs.add(i); - } } -ComponentMetadata::ComponentMetadata(ComponentMetadata && other):InterfaceMetadata (other) +ComponentMetadata::ComponentMetadata(const char *name, const char *componentID, const char *containerUUID):InterfaceMetadata(name,componentID) { - this->m_pimpl = std::move(other.m_pimpl); + setContainerUUID(containerUUID); } ComponentMetadata::~ComponentMetadata() { } -ComponentMetadata & ComponentMetadata::operator=(const ComponentMetadata & copy) +void ComponentMetadata::setContainerUUID(const char* containerUUID) { - InterfaceMetadata::operator=(copy); - m_pimpl->m_interfaceUUIDs.clear(); - for (auto i : copy.getInterfaces()) { - m_pimpl->m_interfaceUUIDs.add(i); + if (containerUUID != nullptr) { + string_generator gen; + m_containerUUID = gen(containerUUID); } - return *this; } -ComponentMetadata& ComponentMetadata::operator=(ComponentMetadata && other) + +void ComponentMetadata::addInterface(const uuid& interfaceUUID) { - this->InterfaceMetadata::operator=(other); - this->m_pimpl = std::move(other.m_pimpl); - return *this; + m_interfaceUUIDs.push_back(interfaceUUID); } -bool ComponentMetadata::operator==(const ComponentMetadata & c) +uuid ComponentMetadata::getInterface(int i) const { - if ((strcmp(c.description(),this->description()) ==0) && - c.getUUID() == this->getUUID() && - (strcmp(c.name(),this->name()) ==0)) { - return true; - } - return false; + return m_interfaceUUIDs[i]; } -void ComponentMetadata::addInterface(const uuid& interfaceUUID) +int ComponentMetadata::getNbInterfaces() const { - m_pimpl->m_interfaceUUIDs.add(interfaceUUID); + return m_interfaceUUIDs.size(); } -const IEnumerable & ComponentMetadata::getInterfaces() const +uuid ComponentMetadata::getContainerUUID() const { - return m_pimpl->m_interfaceUUIDs; + return m_containerUUID; } }}} //namespace org::bcom::xpcf diff --git a/src/ConfigurableBase.cpp b/src/ConfigurableBase.cpp deleted file mode 100644 index 7378b83..0000000 --- a/src/ConfigurableBase.cpp +++ /dev/null @@ -1,323 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-04-28 - */ - -#include "xpcf/component/ConfigurableBase.h" -#include "private/xpcf/PropertyManager.h" -#include -#include -#include -#include -#include -#include "private/xpcf/PropertyWrapper.h" -#include "private/xpcf/PropertyMap.h" -#include - -using namespace std; - -namespace logging = boost::log; - -namespace org { namespace bcom { namespace xpcf { - -// Primary template -template -struct deduce_to -{ -}; - -// Specialization for double: U -> double -template<> -struct deduce_to -{ - typedef double InnerType; -}; - -template<> -struct deduce_to -{ - typedef float InnerType; -}; - -template<> -struct deduce_to -{ - typedef int32_t InnerType; -}; - -template<> -struct deduce_to -{ - typedef uint32_t InnerType; -}; - -template<> -struct deduce_to -{ - typedef int64_t InnerType; -}; - -template<> -struct deduce_to -{ - typedef uint64_t InnerType; -}; - -template<> -struct deduce_to> -{ - typedef SRef InnerType; -}; - -template<> -struct deduce_to -{ - typedef const char * InnerType; -}; - -template<> -struct deduce_to -{ - typedef const wchar_t * InnerType; -}; - - -template class IEnumerable; - -class ConfigurableBase::InternalImpl { - -public: - InternalImpl() {} - ~InternalImpl() = default; - -#ifdef XPCF_WITH_LOGS - inline boost::log::sources::severity_logger< boost::log::trivial::severity_level > & getLogger() { return m_logger; } -#endif - - inline SRef getPropertyRootNode() const { return m_parameters; } - SRef m_parameters = utils::make_shared(); - SRef m_propsMgr; - -private: -#ifdef XPCF_WITH_LOGS - boost::log::sources::severity_logger< boost::log::trivial::severity_level > m_logger; -#endif - InternalImpl(InternalImpl const &); - InternalImpl & operator=(InternalImpl const &); - - -}; - -ConfigurableBase::ConfigurableBase(const uuids::uuid & uuid, - const SRef ) - :ComponentBase(uuid), m_internalImpl(new InternalImpl()) -{ -#ifdef XPCF_WITH_LOGS - m_internalImpl->getLogger().add_attribute("ClassName", boost::log::attributes::constant("ConfigurableBase")); - BOOST_LOG_SEV(m_internalImpl->getLogger(), logging::trivial::info)<<" ConfigurableBase::ConfigurableBase construction"; -#endif - declareInterface(this); - declareInjectable(m_internalImpl->m_propsMgr); -} - -ConfigurableBase::ConfigurableBase(std::map componentTrait, - const SRef ) - :ComponentBase(componentTrait) ,m_internalImpl(new InternalImpl()) -{ -#ifdef XPCF_WITH_LOGS - m_internalImpl->getLogger().add_attribute("ClassName", boost::log::attributes::constant("ConfigurableBase")); - BOOST_LOG_SEV(m_internalImpl->getLogger(), logging::trivial::info)<<" ConfigurableBase::ConfigurableBase construction"; -#endif - declareInterface(this); - declareInjectable(m_internalImpl->m_propsMgr); -} - -ConfigurableBase::~ConfigurableBase() -{ -#ifdef XPCF_WITH_LOGS - BOOST_LOG_SEV(m_internalImpl->getLogger(), logging::trivial::info)<<" ConfigurableBase::~ConfigurableBase destruction"; -#endif -} - -void ConfigurableBase::onInjected() -{ -#ifdef XPCF_WITH_LOGS - BOOST_LOG_SEV(m_internalImpl->getLogger(), logging::trivial::info)<<" ConfigurableBase::onInjected IPropertyManager component address="<m_propsMgr.get(); -#endif -} - -XPCFErrorCode ConfigurableBase::serialize(const char * filepath, uint32_t mode) -{ - bool tempPropMgr = false; - - // Serialize needs of a PropertyManager, if it isn't, ConfigurableBase creates a temporary one. - if((nullptr != m_internalImpl) && (nullptr == m_internalImpl->m_propsMgr)) { - PropertyManager* propsMgr = new PropertyManager(); - m_internalImpl->m_propsMgr = propsMgr->bindTo(); - tempPropMgr = true; - } - - XPCFErrorCode err = m_internalImpl->m_propsMgr->serialize(getUUID(), this->bindTo(), filepath, mode); - - if(tempPropMgr) { - m_internalImpl->m_propsMgr = nullptr; - tempPropMgr = false; - } - return err; -} - -XPCFErrorCode ConfigurableBase::configure(const char * filepath) -{ - XPCFErrorCode result = m_internalImpl->m_propsMgr->configure(getUUID(), this->bindTo(), filepath); - if (result != XPCFErrorCode::_SUCCESS) { - return result; - } - return onConfigured(); -} - -XPCFErrorCode ConfigurableBase::configure(const char * filepath, const char * xpath) -{ - XPCFErrorCode result = m_internalImpl->m_propsMgr->configure(xpath, getUUID(), this->bindTo(), filepath); - if (result != XPCFErrorCode::_SUCCESS) { - return result; - } - return onConfigured(); -} - -SRef ConfigurableBase::getPropertyRootNode() const -{ - return m_internalImpl->getPropertyRootNode(); -} - -SRef ConfigurableBase::getProperty(const char * name) const -{ - return m_internalImpl->getPropertyRootNode()->at(name); -} - -bool ConfigurableBase::hasProperties() const -{ - return (m_internalImpl->getPropertyRootNode()->getProperties().size() != 0); -} - -SRef>> ConfigurableBase::getPropertiesEnumerator() const -{ - return m_internalImpl->getPropertyRootNode()->getProperties().getEnumerator(); -} - -IEnumerable> & ConfigurableBase::getProperties() const -{ - return m_internalImpl->getPropertyRootNode()->getProperties(); -} - -XPCFErrorCode ConfigurableBase::addProperty(SRef property) -{ - return m_internalImpl->m_parameters->addProperty(property); -} - -void ConfigurableBase::declarePropertyNode(const char * name, SRef & wrappedValue, IProperty::AccessSpecifier iotype) -{ - wrappedValue = xpcf::getPropertyMapInstance(); - m_internalImpl->m_parameters->wrapStructure(name,wrappedValue,iotype); -} - -template -XPCFErrorCode ConfigurableBase::declareProperty(const char * name, T & wrappedValue, IProperty::AccessSpecifier iotype) -{ - if (name == nullptr) { - return XPCFErrorCode::_ERROR_INVALID_ARGUMENT; - } - - SRef wrappedRef = utils::make_shared::InnerType>>(name, wrappedValue, iotype); - return addProperty(wrappedRef); -} - -template class Sequence, typename T> -XPCFErrorCode ConfigurableBase::declarePropertySequence(const char * name, Sequence> & wrappedValue, IProperty::AccessSpecifier iotype) -{ - if (name == nullptr) { - return XPCFErrorCode::_ERROR_INVALID_ARGUMENT; - } - - SRef wrappedRef = utils::make_shared::InnerType> >(name, wrappedValue, iotype); - return addProperty(wrappedRef); -} - -template -XPCFErrorCode ConfigurableBase::declareProperty(SRef node, const char * name, T & wrappedValue, IProperty::AccessSpecifier iotype) -{ - if (name == nullptr) { - return XPCFErrorCode::_ERROR_INVALID_ARGUMENT; - } - - SRef wrappedRef = utils::make_shared::InnerType>>(name, wrappedValue, iotype); - return node->addProperty(wrappedRef); -} - -template class Sequence, typename T> -XPCFErrorCode ConfigurableBase::declarePropertySequence(SRef node, const char * name, Sequence> & wrappedValue, IProperty::AccessSpecifier iotype) -{ - if (name == nullptr) { - return XPCFErrorCode::_ERROR_INVALID_ARGUMENT; - } - - SRef wrappedRef = utils::make_shared::InnerType> >(name, wrappedValue, iotype); - return node->addProperty(wrappedRef); -} - -template XPCFErrorCode ConfigurableBase::declareProperty(const char * name, uint32_t & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declareProperty(const char * name, int32_t & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declareProperty(const char * name, uint64_t & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declareProperty(const char * name, int64_t & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declareProperty(const char * name, float & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declareProperty(const char * name, double & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declareProperty(const char * name, std::string & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declareProperty(const char * name, std::wstring & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declareProperty>(const char * name, SRef & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declarePropertySequence(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declarePropertySequence(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declarePropertySequence(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declarePropertySequence(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declarePropertySequence(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declarePropertySequence(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declarePropertySequence(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declarePropertySequence(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declarePropertySequence>(const char * name, std::vector> & wrappedValue, IProperty::AccessSpecifier iotype); - -template XPCFErrorCode ConfigurableBase::declareProperty(SRef node, const char * name, uint32_t & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declareProperty(SRef node, const char * name, int32_t & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declareProperty(SRef node, const char * name, uint64_t & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declareProperty(SRef node, const char * name, int64_t & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declareProperty(SRef node, const char * name, float & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declareProperty(SRef node, const char * name, double & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declareProperty(SRef node, const char * name, std::string & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declareProperty(SRef node, const char * name, std::wstring & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declareProperty>(SRef node, const char * name, SRef & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declarePropertySequence(SRef node, const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declarePropertySequence(SRef node, const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declarePropertySequence(SRef node, const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declarePropertySequence(SRef node, const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declarePropertySequence(SRef node, const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declarePropertySequence(SRef node, const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declarePropertySequence(SRef node, const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declarePropertySequence(SRef node, const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype); -template XPCFErrorCode ConfigurableBase::declarePropertySequence>(SRef node, const char * name, std::vector> & wrappedValue, IProperty::AccessSpecifier iotype); - - -}}} //namespace org::bcom::xpcf diff --git a/src/ContainerMetadata.cpp b/src/ContainerMetadata.cpp new file mode 100644 index 0000000..aeed037 --- /dev/null +++ b/src/ContainerMetadata.cpp @@ -0,0 +1,79 @@ +/** + * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @author Loïc Touraine + * + * @file + * @brief description of file + * @date 2017-04-28 + */ + +#include "ContainerMetadata.h" + +#include + +#include +// implement Component +// + + +namespace org { +namespace bcom { +namespace xpcf { + +using namespace utils::uuids; + +ContainerMetadata::ContainerMetadata(const char* name, const uuid& containerID, const char *containerPath):InterfaceMetadata(name,containerID) +{ + setPath(containerPath); +} + +ContainerMetadata::ContainerMetadata(const char *name, const char *containerID, const char *containerPath):InterfaceMetadata(name,containerID) +{ + setPath(containerPath); +} + +ContainerMetadata::~ContainerMetadata() +{ +} + +void ContainerMetadata::setPath(const char* containerPath) +{ + if (containerPath != nullptr) { + m_containerPath = containerPath; + } +} + +void ContainerMetadata::addComponent(const uuid& componentUUID) +{ + m_componentUUIDs.push_back(componentUUID); +} + +uuid ContainerMetadata::getComponent(int i) const +{ + return m_componentUUIDs[i]; +} + +int ContainerMetadata::getNbComponents() const +{ + return m_componentUUIDs.size(); +} + +const char *ContainerMetadata::getPath() const +{ + return m_containerPath.c_str(); +} + +}}} //namespace org::bcom::xpcf diff --git a/src/Enumerator.cpp b/src/Enumerator.cpp deleted file mode 100644 index 87cb163..0000000 --- a/src/Enumerator.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-12-11 - */ - -#include -#include -#include -#include - -namespace xpcf=org::bcom::xpcf; -template class xpcf::IEnumerator; -template class xpcf::IEnumerable; -template class xpcf::Enumerator; -template class xpcf::ICollection; -template class xpcf::Collection; diff --git a/src/ErrorMessage.cpp b/src/ErrorMessage.cpp deleted file mode 100644 index fe52ac6..0000000 --- a/src/ErrorMessage.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/** - * @copyright Copyright (c) 2023 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Adrien Schadle - * - * @file - * @brief description of file - * @date 2023-03-30 - */ - -#include - -#include - -namespace org { namespace bcom { namespace xpcf { - -XmlErrorMessage::XmlErrorMessage(std::string tag, std::string what, bool subElementError): - _tag(tag) - , _whatError(what) - , _subElementError(subElementError) -{ -} - -XmlErrorMessage::~XmlErrorMessage() -{ - -} - -void XmlErrorMessage::addAttribute(std::string name, std::string value) -{ - _tagAttributes.push_back(make_pair(name, value)); -} - -std::string XmlErrorMessage::write() -{ - std::string errorMessage = "<"; - errorMessage.append(_tag); - std::vector>::iterator iter = _tagAttributes.begin(); - while(iter!=_tagAttributes.end()) { - errorMessage.append(" "); - errorMessage.append(iter->first); - errorMessage.append("=\""); - errorMessage.append(iter->second); - errorMessage.append("\""); - iter++; - } - if(!_subElementError) { - errorMessage.append(" error=\""); - errorMessage.append(_whatError); - errorMessage.append("\">"); - } - else { - errorMessage.append(">"); - errorMessage.append(_whatError); - } - - return errorMessage; -} - -}}} \ No newline at end of file diff --git a/src/Exception.cpp b/src/Exception.cpp deleted file mode 100644 index a654e34..0000000 --- a/src/Exception.cpp +++ /dev/null @@ -1,181 +0,0 @@ - -#include - -#include "xpcf/core/Exception.h" -namespace org { namespace bcom { namespace xpcf { - - -std::map xpcfErrorCodeToMessageMap = { - { XPCFErrorCode::_SUCCESS , "SUCCESS" }, - { XPCFErrorCode::_FAIL , "FAIL" }, - { XPCFErrorCode::_ERROR_INVALID_ARGUMENT , "ERROR: argument provided is invalid" }, - { XPCFErrorCode::_ERROR_DOMAIN , "ERROR: domain error " }, - { XPCFErrorCode::_ERROR_NOT_IMPLEMENTED , "ERROR: method is not implemented yet" }, - { XPCFErrorCode::_ERROR_NULL_POINTER , "ERROR: Null pointer argument provided" }, - { XPCFErrorCode::_ERROR_OUT_OF_RANGE , "ERROR: Out of range argument" }, - { XPCFErrorCode::_ERROR_TYPE , "ERROR: Unsupported type" }, - { XPCFErrorCode::_ERROR_OVERFLOW , "ERROR: overflow" }, - { XPCFErrorCode::_ERROR_UNDERFLOW , "ERROR: underflow" }, - { XPCFErrorCode::_ERROR_OUT_OF_MEMORY , "ERROR: out of memory" }, - { XPCFErrorCode::_ERROR_RANGE , "ERROR: range" }, - { XPCFErrorCode::_ERROR_SYSTEM , "ERROR: system" }, - { XPCFErrorCode::_ERROR_UNKNOWN , "ERROR: unknown" }, - { XPCFErrorCode::_ERROR_ACCESS_DENIED , "ERROR: access denied " }, - { XPCFErrorCode::_ERROR_TIMEOUT , "ERROR: timeout " }, - { XPCFErrorCode::_ERROR_ILLEGAL_STATE, "ERROR: illegal state " }, - { XPCFErrorCode::_ERROR_COMPONENT_UNKNOWN , "ERROR: unknown component " }, - { XPCFErrorCode::_ERROR_INTERFACE_UNKNOWN , "ERROR: unknown interface" }, - { XPCFErrorCode::_ERROR_MODULE_UNKNOWN , "ERROR: unknown module" }, - { XPCFErrorCode::_ERROR_MODULE_MISSINGXPCF_ENTRY , "ERROR: missing xpcf method(s) in the library (either one or several from getModuleUUID, getModuleName, getComponent ... )" }, - { XPCFErrorCode::_ERROR_INJECTION_FAILED , "ERROR: injection failed" }, - { XPCFErrorCode::_ERROR_INJECTABLE_UNKNOWN , "ERROR: injectable unknown" }, - { XPCFErrorCode::_ERROR_INJECTABLE_ALREADY_DECLARED , "ERROR: injectable already declared" }, - { XPCFErrorCode::_ERROR_INJECTABLE_NOBIND , "ERROR: no binding declared for injectable" }, -}; - - -UUIDNotFoundException::UUIDNotFoundException(const uuids::uuid & uuid) - :UUIDNotFoundException("xpcf::UUIDNotFoundException: " + uuids::to_string(uuid)) -{ -} - -UUIDNotFoundException::UUIDNotFoundException(const char * what, XPCFErrorCode errCode): - Exception(what, errCode) -{ -} - -UUIDNotFoundException::UUIDNotFoundException(const std::string & what, XPCFErrorCode errCode): - Exception(what, errCode) -{ -} - -ComponentNotFoundException::ComponentNotFoundException(const uuids::uuid & componentUUID) - :ComponentNotFoundException("xpcf::ComponentNotFoundException: " + uuids::to_string(componentUUID)) -{ -} - -ComponentNotFoundException::ComponentNotFoundException(const char * what): - UUIDNotFoundException(what, XPCFErrorCode::_ERROR_COMPONENT_UNKNOWN) -{ -} - -ComponentNotFoundException::ComponentNotFoundException(const std::string & what): - UUIDNotFoundException(what, XPCFErrorCode::_ERROR_COMPONENT_UNKNOWN) -{ -} - -InterfaceNotImplementedException::InterfaceNotImplementedException(const uuids::uuid & componentUUID, - const uuids::uuid & interfaceUUID) - :InterfaceNotImplementedException("Component " + uuids::to_string(componentUUID) + - " doesn't implement interface " + uuids::to_string(interfaceUUID)) -{ -} - -InterfaceNotImplementedException::InterfaceNotImplementedException(const char * what): - Exception(what, XPCFErrorCode::_ERROR_INTERFACE_UNKNOWN) -{ -} - -InterfaceNotImplementedException::InterfaceNotImplementedException(const std::string & what): - Exception(what, XPCFErrorCode::_ERROR_INTERFACE_UNKNOWN) -{ -} - -ModuleException::ModuleException():Exception(XPCFErrorCode::_ERROR_MODULE_MISSINGXPCF_ENTRY) -{ -} - -ModuleException::ModuleException(const char * what, XPCFErrorCode errCode): - Exception(what, errCode) -{ -} - -ModuleException::ModuleException(const std::string & what, XPCFErrorCode errCode): - Exception(what, errCode) -{ -} - -ModuleNotFoundException::ModuleNotFoundException(const uuids::uuid & moduleUUID) - :ModuleNotFoundException("xpcf::ModuleNotFoundException: " + uuids::to_string(moduleUUID)) -{ -} - -ModuleNotFoundException::ModuleNotFoundException(const char * what): - UUIDNotFoundException(what, XPCFErrorCode::_ERROR_MODULE_UNKNOWN) -{ -} - -ModuleNotFoundException::ModuleNotFoundException(const std::string & what): - UUIDNotFoundException(what, XPCFErrorCode::_ERROR_MODULE_UNKNOWN) -{ -} - -std::string buildExceptionMessage(const SRef injectableInfo, XPCFErrorCode errCode, const char * what) -{ - std::string message; -#ifdef XPCFDEBUG - if (xpcfErrorCodeToMessageMap.find(errCode) != xpcfErrorCodeToMessageMap.end()) { -#endif - message = xpcfErrorCodeToMessageMap[errCode]; - message += "=>\n"; -#ifdef XPCFDEBUG - } -#endif - message = "uuid= " + uuids::to_string(injectableInfo->getUuid()); - if (injectableInfo->isNamed()) { - message += "\nname="; - message += injectableInfo->getName(); - } - message += "\n"; - message += what; - return message; -} - -InjectionException::InjectionException(const SRef injectableInfo, XPCFErrorCode errCode, const char * what ): - InjectionException(buildExceptionMessage(injectableInfo, errCode, what), errCode) -{ -} - -InjectionException::InjectionException(const char * what, XPCFErrorCode errCode): - UUIDNotFoundException(what, errCode) -{ -} - -InjectionException::InjectionException(const std::string & what, XPCFErrorCode errCode):UUIDNotFoundException(what, errCode) -{ -} - - -InjectableNotFoundException::InjectableNotFoundException(const SRef injectableInfo): - InjectionException(injectableInfo,XPCFErrorCode::_ERROR_INJECTABLE_NOBIND) -{ -} - -InjectableNotFoundException::InjectableNotFoundException(const char * what): - InjectionException(what, XPCFErrorCode::_ERROR_INJECTABLE_NOBIND) -{ -} - -InjectableNotFoundException::InjectableNotFoundException(const std::string & what): - InjectionException(what, XPCFErrorCode::_ERROR_INJECTABLE_NOBIND) -{ -} - - - -InjectableDeclarationException::InjectableDeclarationException(const SRef injectableInfo): - InjectionException(injectableInfo,XPCFErrorCode::_ERROR_INJECTABLE_ALREADY_DECLARED) -{ -} - -InjectableDeclarationException::InjectableDeclarationException(const char * what): - InjectionException(what, XPCFErrorCode::_ERROR_INJECTABLE_ALREADY_DECLARED) -{ -} - -InjectableDeclarationException::InjectableDeclarationException(const std::string & what): - InjectionException(what, XPCFErrorCode::_ERROR_INJECTABLE_ALREADY_DECLARED) -{ -} - -}}} diff --git a/src/Factory.cpp b/src/Factory.cpp deleted file mode 100755 index e89b01e..0000000 --- a/src/Factory.cpp +++ /dev/null @@ -1,1041 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2019-06-05 - */ - - -#include "private/xpcf/Factory.h" -#include -#include -#include -#include -#include -#include "private/xpcf/PathBuilder.h" - -using namespace std; -using placeholders::_1; -using placeholders::_2; - -XPCF_DEFINE_FACTORY_CREATE_INSTANCE(org::bcom::xpcf::Factory); - -#ifdef XPCF_WITH_LOGS -namespace logging = boost::log; -#endif - -namespace org { namespace bcom { namespace xpcf { - -constexpr const char * XMLBINDINGSNODE = "bindings"; -constexpr const char * XMLBINDNODE = "bind"; -constexpr const char * XMLINJECTSNODE = "injects"; -constexpr const char * XMLINJECTNODE = "inject"; -constexpr const char * XMLSCOPENODE = "scope"; - -static const map scopeConvertMap = { - {"Transient",BindingScope::Transient}, - {"Singleton",BindingScope::Singleton}, -}; - -static const map bindingRangeConvertMap = { - {"all",BindingRange::All}, - {"default",BindingRange::Default}, - {"explicit",BindingRange::Explicit}, - {"named",BindingRange::Named}, - {"withparents",BindingRange::WithParents} -}; - -void FactoryContext::clear() -{ - autoBindings.clear(); - defaultBindings.clear(); - multiBindings.clear(); - namedBindings.clear(); - namedBindingsProperties.clear(); - bindingsProperties.clear(); - multiBindingsProperties.clear(); - factoryMethods.clear(); - specificBindings.clear(); - specificNamedBindings.clear(); -} - -Factory::Factory():ComponentBase(toUUID()) -{ - // bind structures must exist prior to Factory inner binds - m_context = utils::make_shared() ; - - declareInterface(this); - declareInterface(this); - declareInterface(this); - declareInterface(this); - - Factory::bindCore(); - Factory::bindCore(); - Factory::bindCore(); - m_propertyManager = IFactory::resolve()->bindTo(); - m_aliasManager = IFactory::resolve()->bindTo(); - m_resolver = IFactory::resolve()->bindTo(); - std::function bindFunc = [&] (const uuids::uuid & interfaceUUID, const uuids::uuid & componentUUID) -> void { - autobind(interfaceUUID,componentUUID); - }; - m_resolver->bindTo()->setBinder(bindFunc); -#ifdef XPCF_WITH_LOGS - m_logger.add_attribute("ClassName", boost::log::attributes::constant("Factory")); - BOOST_LOG_SEV(m_logger, logging::trivial::info)<<"Constructor Factory::Factory () called!"; -#endif -} - -#ifdef XPCF_WITH_LOGS -std::stringstream Factory::log(const FactoryBindInfos & bindInfos) -{ - std::string scope,range; - range = "|"; - scope = "Transient"; - if (bindInfos.bindingRangeMask & BindingRange::Explicit) { - range += " Explicit |"; - } - if (bindInfos.bindingRangeMask & BindingRange::WithParents) { - range += " WithParents |"; - } - if (bindInfos.bindingRangeMask & BindingRange::Named) { - range += " Named |"; - } - if (bindInfos.bindingRangeMask & BindingRange::Default) { - range += " Default |"; - } - if (bindInfos.bindingRangeMask & BindingRange::All) { - range += " All |"; - } - if (bindInfos.scope == BindingScope::Singleton) { - scope = "Singleton"; - } - std::stringstream result; - result << "Bind infos:"< component uuid= '" << uuids::to_string(bindInfos.componentUUID)<<"'"< scope = "< range = "< properties = "< Factory::createNewFactoryContext(ContextMode ctxMode) -{ -#ifdef XPCF_WITH_LOGS - std::string mode; - switch (ctxMode) { - case ContextMode::Empty : mode = "empty"; - break; - case ContextMode::Cloned : mode = "cloned"; - break; - case ContextMode::Shared : mode = "shared"; - break; - default: - break; - } - BOOST_LOG_SEV(m_logger, logging::trivial::info)<<"Factory::createNewFactoryContext with mode="<m_propertyManager->context()) = *(m_propertyManager->getContext()); - *(f->m_aliasManager->context()) = *(m_aliasManager->getContext()); - *(f->m_resolver->context()) = *(m_resolver->getContext()); - *(f->m_context) = *m_context; - } - if (ctxMode == ContextMode::Shared) { - f->m_propertyManager->setContext(m_propertyManager->getContext()); - f->m_aliasManager->setContext(m_aliasManager->getContext()); - f->m_resolver->setContext(m_resolver->getContext()); - - f->m_context = m_context; - } - return IComponentIntrospect::acquireComponentRef(f)->bindTo(); -} - -void Factory::clear() -{ - m_context->clear(); - m_singletonInstances.clear(); - m_namedSingletonInstances.clear(); - m_propertyManager->clear(); - m_aliasManager->clear(); - m_resolver->clear(); -} - -SRef Factory::create(const uuids::uuid & componentUUID) -{ -#ifdef XPCF_WITH_LOGS - BOOST_LOG_SEV(m_logger, logging::trivial::info)<<"ComponentManager::create uuid="< moduleInfos = findModuleMetadata(getModuleUUID(componentUUID)); - SRef componentRef = getModuleManagerInstance()->createComponent(moduleInfos, componentUUID); - return componentRef; -} - -SRef Factory::createComponent(const uuids::uuid & componentUUID) -{ -#ifdef XPCF_WITH_LOGS - BOOST_LOG_SEV(m_logger, logging::trivial::info)<<"ComponentManager::createComponent uuid="< componentRef = create(componentUUID); - inject(componentRef->bindTo()); - - fs::path configFilePath = m_propertyManager->getConfigPath(componentUUID); - if (componentRef->implements() && ! configFilePath.empty()) { - SRef iconf = componentRef->bindTo(); - iconf->configure(configFilePath.string().c_str()); - } - return componentRef; -} - -SRef Factory::createComponent(const char * instanceName, const uuids::uuid & componentUUID) -{ -#ifdef XPCF_WITH_LOGS - BOOST_LOG_SEV(m_logger, logging::trivial::info)<<"ComponentManager::createComponent name="<(PathBuilder::getXPCFHomePath()); -} - -XPCFErrorCode Factory::load(const char* libraryFilePath) -{ - if (libraryFilePath == nullptr) { - return XPCFErrorCode::_ERROR_NULL_POINTER; - } - - fs::path libraryConfigFilePath = PathBuilder::replaceRootEnvVars(libraryFilePath); - if (libraryConfigFilePath.is_relative()) { - // relative file should exists from the current process working dir - if (!fs::exists(libraryConfigFilePath)) { - // relative file is not found from the cwd : search in xpcf home dir - libraryConfigFilePath = PathBuilder::getXPCFHomePath() / libraryConfigFilePath; - } - } - return loadLibrary(libraryConfigFilePath); -} - -template XPCFErrorCode Factory::load(fs::path folderPath) -{ - //TODO : what strategy to report error of load for a dedicated file but load others ? - XPCFErrorCode result = XPCFErrorCode::_SUCCESS; - static_assert(std::is_same::value || std::is_same::value, - "Type passed to ComponentManager::load is neither a directory_iterator nor a recursive_directory_iterator"); - for (fs::directory_entry& x : T(folderPath)) { - if (is_regular_file(x.path())) { - if (x.path().extension() == ".xml") { - loadLibrary(x.path()); - } - } - } - return result; -} - -XPCFErrorCode Factory::load(const char* folderPathStr, bool bRecurse) -{ - if (folderPathStr == nullptr) { - return XPCFErrorCode::_ERROR_NULL_POINTER; - } - - fs::path folderPath = PathBuilder::replaceRootEnvVars(folderPathStr); - - if ( ! fs::exists(folderPath)) { - return XPCFErrorCode::_FAIL; - } - - if (fs::is_directory(folderPath)) { - if (bRecurse) { - load(folderPath); - } - else { - load(folderPath); - } - } - else { - loadLibrary(folderPath); - } - return XPCFErrorCode::_SUCCESS; -} - - -// Load the library from the file given -// by -// -/********* The library file looks like this************************************************* - - - - - TOADD: - - - - - - - - - - - - - - - - - - - - - - - - - -*********************************************************************************************/ -XPCFErrorCode Factory::loadLibrary(fs::path configurationFilePath) -{ - if ( ! fs::exists(configurationFilePath)) { - return XPCFErrorCode::_FAIL; - } - if ( configurationFilePath.extension() != ".xml") { - return XPCFErrorCode::_FAIL; - } - - XPCFErrorCode result = XPCFErrorCode::_FAIL; - tinyxml2::XMLDocument doc; - enum tinyxml2::XMLError loadOkay = doc.LoadFile(configurationFilePath.string().c_str()); - if (loadOkay == 0) { - std::string what = "configuration loading failed: "; - try { -#ifdef XPCF_WITH_LOGS - BOOST_LOG_SEV(m_logger, logging::trivial::info)<<"Parsing XML from "<Value(); - if (rootName != "xpcf-registry" && rootName != "xpcf-configuration") { - throw ConfigurationException("missing root element \"xpcf-registry\" or \"xpcf-configuration\"", XPCFErrorCode::_ERROR_RANGE); - } - result = XPCFErrorCode::_SUCCESS; - const char * autoAliasProp = rootElt->Attribute("autoAlias"); - m_resolver->enableAutoAlias(false); - if (autoAliasProp != nullptr) { - const string autoAliasStr(autoAliasProp); - if (autoAliasStr == "true") { - m_resolver->enableAutoAlias(true); - } - } - processXmlNode(rootElt, "module", std::bind(&AbstractRegistry::declareModule, m_resolver->bindTo().get(), _1)); - processXmlNode(rootElt, "aliases", std::bind(&AbstractAliasManager::declareAliases, m_aliasManager->bindTo().get(), _1)); - processXmlNode(rootElt, "factory", std::bind(&AbstractFactory::declareFactory, this, _1)); - std::function declareConfigureFunc = std::bind(&AbstractPropertyManager::declareConfiguration, m_propertyManager->bindTo().get(), _1,_2); - processXmlNode(rootElt, "configuration", declareConfigureFunc, configurationFilePath); - std::function declarePropertiesFunc = std::bind(&AbstractPropertyManager::declareProperties, m_propertyManager->bindTo().get(), _1,_2); - processXmlNode(rootElt, "properties", declarePropertiesFunc, configurationFilePath); - } - catch (const xpcf::Exception & e) { - what.append(e.what()); - throw ConfigurationException(what); - } - catch (const std::runtime_error & e) { -#ifdef XPCF_WITH_LOGS - BOOST_LOG_SEV(m_logger, logging::trivial::info)<<"XML parsing file "<Attribute("to"); - if (m_aliasManager->aliasExists(IAliasManager::Type::Component, componentAttrValue)) { - infos.componentUUID = m_aliasManager->resolveComponentAlias(componentAttrValue); - } - else { - try { - infos.componentUUID = toUUID(componentAttrValue); - } - catch(const std::exception& ) { - std::string what = "UUID format invalid in \"to\" attribute"; - what.append(xmlBindElt->Attribute("to")); - throw ConfigurationException(what); - } - } - const char * scopeType = xmlBindElt->Attribute("scope"); - if (scopeType != nullptr) { - infos.scope = scopeConvertMap.at(scopeType); - } - const char * propertiesName = xmlBindElt->Attribute("properties"); - if (propertiesName != nullptr) { - infos.properties = propertiesName; - } - const char * rangeAttribute = xmlBindElt->Attribute("range"); - if (rangeAttribute != nullptr) { - std::vector ranges; - boost::split(ranges, rangeAttribute, [](char c){return c == '|';}); - for (auto& range: ranges) { - infos.bindingRangeMask = infos.bindingRangeMask | bindingRangeConvertMap.at(range); - } - } - return infos; -} - -void Factory::declareSingleBind(const uuids::uuid & interfaceUUID, tinyxml2::XMLElement * xmlBindElt) -{ - FactoryBindInfos infos = getComponentBindingInfos(xmlBindElt); - - if (xmlBindElt->Attribute("name") == nullptr) { - infos.bindingRangeMask |= BindingRange::Default; - bind(interfaceUUID, infos); - } - else { - infos.bindingRangeMask |= BindingRange::Named; - string nameAttrValue = xmlBindElt->Attribute("name"); - bind(nameAttrValue, interfaceUUID, infos); - } -} - -void Factory::declareMultiBind(const uuids::uuid & interfaceUUID, tinyxml2::XMLElement * xmlBindElt) -{ - tinyxml2::XMLElement *element = xmlBindElt->FirstChildElement("component"); - VectorCollection & binds = m_context->multiBindings[interfaceUUID]; - while (element != nullptr) { - FactoryBindInfos infos = getComponentBindingInfos(element); - infos.bindingRangeMask |= BindingRange::Default; - binds.add(infos); - element = element->NextSiblingElement("component"); - } -} - -void Factory::declareBind(tinyxml2::XMLElement * xmlBindElt) -{ - bool subElementError = false; - string interfaceAttrValue = ""; - try { - if (xmlBindElt->Attribute("interface") == nullptr) { - throw Exception("node incomplete : attribute 'interface' is mandatory."); - } - interfaceAttrValue = xmlBindElt->Attribute("interface"); - uuids::uuid interfaceUUID; - if (m_aliasManager->aliasExists(IAliasManager::Type::Interface, interfaceAttrValue)) { - interfaceUUID = m_aliasManager->resolveInterfaceAlias(interfaceAttrValue); - } - else { - try { - interfaceUUID = toUUID(interfaceAttrValue); - } - catch(const std::runtime_error& e) { - std::string what = "UUID format invalid in \"interface\" :"; - what.append(xmlBindElt->Attribute("interface")); - throw ConfigurationException(what); - } - } - subElementError = true; - - tinyxml2::XMLElement * xmlComponentNode = xmlBindElt->FirstChildElement("component"); - if ((xmlBindElt->Attribute("to") == nullptr) && (xmlComponentNode == nullptr)) { - throw Exception("node incomplete : attributes 'to' or 'component' inner node are mandatory."); - } - - if (xmlBindElt->Attribute("to") != nullptr) { - declareSingleBind(interfaceUUID, xmlBindElt); - } - - if (xmlComponentNode != nullptr) { - declareMultiBind(interfaceUUID, xmlBindElt); - } - } - catch (xpcf::Exception& e) { - XmlErrorMessage errMsg("bind", e.what(), subElementError); - if(!interfaceAttrValue.empty()) { - errMsg.addAttribute("interface", interfaceAttrValue); - } - throw ConfigurationException(errMsg.write()); - } -} - -void Factory::declareSpecificBind(tinyxml2::XMLElement * xmlBindElt, const uuids::uuid & targetComponentUUID) -{ - string interfaceAttrValue = ""; - try { - if ((xmlBindElt->Attribute("interface") == nullptr) || (xmlBindElt->Attribute("to") == nullptr)) { - throw Exception("node incomplete : attributes 'interface' and 'to' are mandatory."); - } - interfaceAttrValue = xmlBindElt->Attribute("interface"); - uuids::uuid interfaceUUID; - if (m_aliasManager->aliasExists(IAliasManager::Type::Interface, interfaceAttrValue)) { - interfaceUUID = m_aliasManager->resolveInterfaceAlias(interfaceAttrValue); - } - else { - try { - interfaceUUID = toUUID(interfaceAttrValue); - } - catch(const std::exception& ) { - std::string what = "UUID format invalid in \"interface\": "; - what.append(xmlBindElt->Attribute("interface")); - throw ConfigurationException(what); - } - } - - FactoryBindInfos infos = getComponentBindingInfos(xmlBindElt); - infos.bindingRangeMask |= BindingRange::Explicit; - if (xmlBindElt->Attribute("name") == nullptr) { - bind(targetComponentUUID, interfaceUUID, infos); - } - else { - string nameAttrValue = xmlBindElt->Attribute("name"); - bind(targetComponentUUID, nameAttrValue, interfaceUUID, infos); - } - } - catch (const xpcf::Exception& e) { - XmlErrorMessage errMsg("bind", e.what(), false); - if(!interfaceAttrValue.empty()) { - errMsg.addAttribute("interface", interfaceAttrValue); - } - throw ConfigurationException(errMsg.write()); - } -} - -void Factory::declareBindings(tinyxml2::XMLElement * xmlBindingsElt) -{ - try { - processXmlNode(xmlBindingsElt, XMLBINDNODE, std::bind(&Factory::declareBind, this, _1)); - } - catch (const xpcf::Exception& e) { - XmlErrorMessage errMsg("bindings", e.what(), true); - throw ConfigurationException(errMsg.write()); - } -} - -void Factory::declareInject(tinyxml2::XMLElement * xmlInjectElt) -{ - bool subElementError = false; - string componentAttrValue = ""; - try { - // Parse bindings : if binding already exist in default or namedBindings: ignore it - // for each non-existent bind, add the specificBinding - if (xmlInjectElt->Attribute("to") == nullptr) { - throw Exception("node incomplete : attribute 'to' is mandatory."); - } - uuids::uuid componentUUID; - componentAttrValue = xmlInjectElt->Attribute("to"); - if (m_aliasManager->aliasExists(IAliasManager::Type::Component, componentAttrValue)) { - componentUUID = m_aliasManager->resolveComponentAlias(componentAttrValue); - } - else { - try { - componentUUID = toUUID(componentAttrValue); - } - catch(const std::exception& ) { - std::string what = "UUID format invalid in \"to\": "; - what.append(xmlInjectElt->Attribute("to")); - throw ConfigurationException(what); - } - } - subElementError = true; - std::function declareSpecificBindingsFunc = std::bind(&Factory::declareSpecificBind, this, _1,_2); - processXmlNode(xmlInjectElt, XMLBINDNODE, declareSpecificBindingsFunc, componentUUID); - } - catch (const xpcf::Exception& e) { - XmlErrorMessage errMsg("inject", e.what(), subElementError); - if(!componentAttrValue.empty()) { - errMsg.addAttribute("to", componentAttrValue); - } - throw ConfigurationException(errMsg.write()); - } -} - -void Factory::declareInjects(tinyxml2::XMLElement * xmlInjectsElt) -{ - try { - processXmlNode(xmlInjectsElt, XMLINJECTNODE, std::bind(&Factory::declareInject, this, _1)); - } - catch (const xpcf::Exception& e) { - XmlErrorMessage errMsg("injects", e.what(), true); - throw ConfigurationException(errMsg.write()); - } -} - -void Factory::declareFactory(tinyxml2::XMLElement * xmlFactoryElt) -{ - try { - processXmlNode(xmlFactoryElt, XMLBINDINGSNODE, std::bind(&Factory::declareBindings, this, _1)); - processXmlNode(xmlFactoryElt, XMLINJECTSNODE, std::bind(&Factory::declareInjects, this, _1)); - } - catch (const xpcf::Exception& e) { - XmlErrorMessage errMsg("factory", e.what(), true); - throw ConfigurationException(errMsg.write()); - } -} - -SRef Factory::resolveFromModule(const uuids::uuid & componentUUID) -{ - SPtr moduleInfos = resolveMetadataFromComponentUUID(componentUUID); - SRef componentRef = getModuleManagerInstance()->createComponent(moduleInfos, componentUUID); - return componentRef; -} - -void Factory::autobind(const uuids::uuid & interfaceUUID, const uuids::uuid & instanceUUID) -{ - if (! mapContains(m_context->defaultBindings,interfaceUUID)) { - // no explicit bind already exists : add autobind - m_context->autoBindings[interfaceUUID] = FactoryBindInfos{instanceUUID, BindingScope::Transient, BindingRange::All, ""}; - } -} - -void Factory::bindCore(const uuids::uuid & interfaceUUID, const FactoryBindInfos & bindInfos) -{ - if (mapContains(m_coreBindings,interfaceUUID)) { - // bind already exists : error ??? - // should we return or update the bind ? - } - m_coreBindings[interfaceUUID] = bindInfos; -} - -template < typename I, typename C, BindingScope scope> void Factory::bindCore() -{ - uuids::uuid componentUUID = toUUID(); - bindCore(toUUID(),FactoryBindInfos{ componentUUID, scope, BindingRange_Core, ""}); - m_coreFactoryMethods[componentUUID] = &ComponentFactory::create; -} - -void Factory::bind(const uuids::uuid & interfaceUUID, const FactoryBindInfos & bindInfos) -{ - if (mapContains(m_context->defaultBindings,interfaceUUID)) { - // bind already exists : error ??? - // should we return or update the bind ? - } - if (mapContains(m_context->autoBindings,interfaceUUID)) { - // remove autobind as an explicit bind is added - m_context->autoBindings.erase(interfaceUUID); - } - m_context->defaultBindings[interfaceUUID] = bindInfos; -} - -void Factory::bind(const uuids::uuid & interfaceUUID, const uuids::uuid & instanceUUID, - BindingScope scope, - uint8_t bindingRangeMask) -{ - bind(interfaceUUID, FactoryBindInfos{instanceUUID, scope, bindingRangeMask, ""}); -} - - -void Factory::bind(const std::string & name, const uuids::uuid & interfaceUUID, - const FactoryBindInfos & bindInfos) -{ - pair key = make_pair(interfaceUUID,name); - if (mapContains(m_context->namedBindings,key)) { - // bind already exists : error ??? - } - m_context->namedBindings[key] = bindInfos; -} - -void Factory::bind(const std::string & name, const uuids::uuid & interfaceUUID, - const uuids::uuid & instanceUUID, BindingScope scope, - uint8_t bindingRangeMask) -{ - bind(name, interfaceUUID, FactoryBindInfos{instanceUUID, scope, bindingRangeMask, ""}); -} - -void Factory::bind(const uuids::uuid & interfaceUUID, - const std::function(void)> & factoryFunc, - const FactoryBindInfos & bindInfos) -{ - bind(interfaceUUID, bindInfos); - m_context->factoryMethods[bindInfos.componentUUID] = factoryFunc; -} - -void Factory::bind(const uuids::uuid & interfaceUUID, const uuids::uuid & instanceUUID, - const std::function(void)> & factoryFunc, - BindingScope scope, - uint8_t bindingRangeMask) -{ - bind(interfaceUUID, factoryFunc, FactoryBindInfos{instanceUUID, scope, bindingRangeMask, ""}); -} - -void Factory::bind(const std::string & name, const uuids::uuid & interfaceUUID, - const std::function(void)> & factoryFunc, - const FactoryBindInfos & bindInfos) -{ - bind(name, interfaceUUID, bindInfos); - m_context->factoryMethods[bindInfos.componentUUID] = factoryFunc; -} - -void Factory::bind(const std::string & name, const uuids::uuid & interfaceUUID, const uuids::uuid & instanceUUID, - const std::function(void)> & factoryFunc, - BindingScope scope, - uint8_t bindingRangeMask) -{ - bind(name, interfaceUUID, factoryFunc, FactoryBindInfos{instanceUUID, scope, bindingRangeMask, ""}); -} - -void Factory::bind(const uuids::uuid & targetComponentUUID, const uuids::uuid & interfaceUUID, - const std::function(void)> & factoryFunc, - const FactoryBindInfos & bindInfos) -{ - bind(targetComponentUUID, interfaceUUID, bindInfos); - m_context->factoryMethods[bindInfos.componentUUID] = factoryFunc; -} - -void Factory::bind(const uuids::uuid & targetComponentUUID, const uuids::uuid & interfaceUUID, - const std::function(void)> & factoryFunc, - const uuids::uuid & instanceUUID, BindingScope scope, - uint8_t bindingRangeMask) -{ - bind(targetComponentUUID, interfaceUUID, factoryFunc, FactoryBindInfos{instanceUUID, scope, bindingRangeMask, ""}); -} - -void Factory::bind(const uuids::uuid & targetComponentUUID, const std::string & name, const uuids::uuid & interfaceUUID, - const std::function(void)> & factoryFunc, - const FactoryBindInfos & bindInfos) -{ - bind(targetComponentUUID, name, interfaceUUID, bindInfos); - m_context->factoryMethods[bindInfos.componentUUID] = factoryFunc; -} - -void Factory::bind(const uuids::uuid & targetComponentUUID, const std::string & name, const uuids::uuid & interfaceUUID, - const std::function(void)> & factoryFunc, - const uuids::uuid & instanceUUID, BindingScope scope, - uint8_t bindingRangeMask) -{ - bind(targetComponentUUID, name, interfaceUUID, factoryFunc, FactoryBindInfos{instanceUUID, scope, bindingRangeMask, ""}); -} - - -void Factory::bind(const uuids::uuid & targetComponentUUID, const uuids::uuid & interfaceUUID, - const FactoryBindInfos & bindInfos) -{ - if (mapContains(m_context->specificBindings,targetComponentUUID)) { - // bind already exists : error ??? - } - m_context->specificBindings[targetComponentUUID][interfaceUUID] = bindInfos; -} - - -void Factory::bind(const uuids::uuid & targetComponentUUID, const uuids::uuid & interfaceUUID, - const uuids::uuid & instanceUUID, BindingScope scope, - uint8_t bindingRangeMask) -{ - bind(targetComponentUUID, interfaceUUID, FactoryBindInfos{instanceUUID, scope, bindingRangeMask, ""}); -} - -void Factory::bind(const uuids::uuid & targetComponentUUID, const std::string & name, - const uuids::uuid & interfaceUUID, const FactoryBindInfos & bindInfos) -{ - if (mapContains(m_context->specificNamedBindings,targetComponentUUID)) { - // bind already exists : error ??? - } - m_context->specificNamedBindings[targetComponentUUID][ make_pair(interfaceUUID,name)] = bindInfos; -} - -void Factory::bind(const uuids::uuid & targetComponentUUID, const std::string & name, - const uuids::uuid & interfaceUUID, const uuids::uuid & instanceUUID, - BindingScope scope, - uint8_t bindingRangeMask) -{ - bind(targetComponentUUID, name, interfaceUUID, FactoryBindInfos{instanceUUID, scope, bindingRangeMask, ""}); -} - -FactoryBindInfos Factory::resolveBind(const uuids::uuid & interfaceUUID, std::deque contextLevels) -{ - // search for the closest specific declaration of binding for interfaceUUID : the first context is the last one, the latter is the first specific context created in the tree - // WARNING : each bindingrange in the loop is replaced with the parent bindingrange : should it be the case ? may be not ! - for (auto [contextType,contextValue] : contextLevels) { - if (contextType == ContextType::Component) { - auto componentUUID = contextValue.componentUUID; - if (mapContains(m_context->specificBindings, componentUUID)) { - if (mapContains(m_context->specificBindings[componentUUID], interfaceUUID)) { - FactoryBindInfos bindInfos = m_context->specificBindings[componentUUID][interfaceUUID]; - return bindInfos; - } - } - if (contextValue.bindingRangeMask == BindingRange::Explicit) { - // if the interface exists in core bindings, return the component - if (mapContains (m_coreBindings, interfaceUUID)) { - return m_coreBindings.at(interfaceUUID); - } - // when current context binding range is explicit only, do not search forward when explicit bind isn't found - throw InjectableNotFoundException("No explicit binding found to resolve component from interface UUID = " + uuids::to_string(interfaceUUID) - + " to inject to " + uuids::to_string(componentUUID)); - } - if (!(contextValue.bindingRangeMask & BindingRange::WithParents)) { - break; - } - } - //TODO : handle named contexts - } - // no specific binding found for this interface in contexts : search for a default binding - if (contextLevels.empty() || - contextLevels.back().second.bindingRangeMask & (BindingRange::Default |BindingRange::All)) { - if (mapContains(m_context->defaultBindings, interfaceUUID)) { - FactoryBindInfos bindInfos = m_context->defaultBindings.at(interfaceUUID); - return bindInfos; - } - } - // no default binding found for this interface : search for an autobinding - if (contextLevels.empty() || - contextLevels.back().second.bindingRangeMask & BindingRange::All) { - if (mapContains(m_context->autoBindings,interfaceUUID)) { - return m_context->autoBindings.at(interfaceUUID); - } - } - // no binding found, is it a core binding ? - if (mapContains (m_coreBindings, interfaceUUID)) { - return m_coreBindings.at(interfaceUUID); - } - throw InjectableNotFoundException("No [auto|default|named] binding found to resolve component from interface UUID = " + uuids::to_string(interfaceUUID)); -} - -FactoryBindInfos Factory::resolveBind(const uuids::uuid & interfaceUUID, const std::string & name, std::deque contextLevels) -{ - pair key = make_pair(interfaceUUID, name); - - // search for the closest specific declaration of binding for interfaceUUID : the first context is the last one, the latter is the first specific context created in the tree - // WARNING : each bindingrange in the loop is replaced with the parent bindingrange : should it be the case ? may be not ! - for (auto [contextType,contextValue] : contextLevels) { - if (contextType == ContextType::Component) { - auto componentUUID = contextValue.componentUUID; - if (mapContains(m_context->specificNamedBindings, componentUUID)) { - if (mapContains(m_context->specificNamedBindings[componentUUID], key)) { - FactoryBindInfos bindInfos = m_context->specificNamedBindings[componentUUID][key]; - return bindInfos; - } - } - if (contextValue.bindingRangeMask == BindingRange::Explicit) { - // when current context binding range is explicit only, do not search forward when explicit bind isn't found - throw InjectableNotFoundException("No explicit binding found to resolve component from interface UUID = " + uuids::to_string(interfaceUUID) + " named " + name - + " to inject to " + uuids::to_string(componentUUID)); - } - if (!(contextValue.bindingRangeMask & BindingRange::WithParents)) { - break; - } - } - //TODO : handle named contexts - } - // no specific named binding found for this interface in contexts : search for a default named binding - if (contextLevels.empty() || - contextLevels.back().second.bindingRangeMask & (BindingRange::Named |BindingRange::Default|BindingRange::All)) { - if (mapContains(m_context->namedBindings,key)) { - FactoryBindInfos bindInfos = m_context->namedBindings.at(key); - return bindInfos; - } - } - if (!contextLevels.empty() && - !(contextLevels.back().second.bindingRangeMask & (BindingRange::Default|BindingRange::All))) { - throw InjectableNotFoundException("No default named binding found to resolve component from interface UUID = " + uuids::to_string(interfaceUUID) + " named " + name); - } - - return resolveBind(interfaceUUID, contextLevels); -} - -uuids::uuid Factory::getComponentUUID(const uuids::uuid & interfaceUUID) -{ - FactoryBindInfos bindInfos = resolveBind(interfaceUUID, {}); - return bindInfos.componentUUID; -} - -uuids::uuid Factory::getComponentUUID(const uuids::uuid & interfaceUUID, const std::string & name) -{ - FactoryBindInfos bindInfos = resolveBind(interfaceUUID, name, {}); - return bindInfos.componentUUID; -} - -void Factory::inject(SRef component, std::deque contextLevels) -{ -#ifdef XPCF_WITH_LOGS - BOOST_LOG_SEV(m_logger, logging::trivial::info)<<"Factory::inject"; -#endif - - for (auto injectable : component->getInjectables()) { - try { - if (!injectable->isMulti()) { - SRef injectableRef = resolve(injectable, contextLevels); - injectable->inject(injectableRef); - } - else { - SRef>> injectableRef = resolveAll(injectable, contextLevels); - injectable->inject(injectableRef); - } - } - catch (const InjectableNotFoundException & e) { - if (!injectable->optional()) { // only throw when injectable is mandatory - throw e; - } - } - catch (const Exception& e) { - if (!injectable->optional()) { // only throw when injectable is mandatory - throw ConfigurationException(e.what()); - } - } - } - component->onInjected(); -} - -SRef Factory::resolveComponent(const FactoryBindInfos & bindInfos, std::deque contextLevels) -{ - uuids::uuid componentUUID = bindInfos.componentUUID; - std::function(void)> createComponent = [componentUUID, this]()-> SRef { - return resolveFromModule(componentUUID); - }; - - if (mapContains(m_context->factoryMethods, componentUUID)) { - createComponent = m_context->factoryMethods[componentUUID]; - } - if (bindInfos.bindingRangeMask == BindingRange_Core) { - createComponent = m_coreFactoryMethods[componentUUID]; - } -#ifdef XPCF_WITH_LOGS - BOOST_LOG_SEV(m_logger, logging::trivial::info)<<"Factory::resolveComponent component uuid="< componentRef = createComponent(); - inject(componentRef->bindTo(), contextLevels); - if (componentRef->implements()) { - fs::path configFilePath = m_propertyManager->getConfigPath(componentUUID); - if (! configFilePath.empty()) { - SRef iconf = componentRef->bindTo(); - XPCFErrorCode confErrCode; - if (bindInfos.properties.empty()) { - confErrCode = iconf->configure(configFilePath.string().c_str()); - } - else { - confErrCode = iconf->configure(configFilePath.string().c_str(), bindInfos.properties.c_str()); - } - if (confErrCode != XPCFErrorCode::_SUCCESS) { - throw ConfigurationException("Configuration failed for component uuid=" + uuids::to_string(componentUUID), confErrCode); - } - } - } - return componentRef; -} - -SRef Factory::resolve(const uuids::uuid & interfaceUUID, std::deque contextLevels) -{ - FactoryBindInfos bindInfos = resolveBind(interfaceUUID, contextLevels); -#ifdef XPCF_WITH_LOGS - BOOST_LOG_SEV(m_logger, logging::trivial::info)<<"Factory::resolve interface uuid="< componentRef = resolveComponent(bindInfos, contextLevels); - m_singletonInstances[bindInfos.componentUUID] = componentRef; - } - return m_singletonInstances.at(bindInfos.componentUUID); - } - else { - if (! mapContains(m_coreInstances, bindInfos.componentUUID)) { - SRef componentRef = resolveComponent(bindInfos, contextLevels); - m_coreInstances[bindInfos.componentUUID] = componentRef; - } - return m_coreInstances.at(bindInfos.componentUUID); - } - } - return resolveComponent(bindInfos, contextLevels); -} - -SRef Factory::resolve(const uuids::uuid & interfaceUUID, const string & name, std::deque contextLevels ) -{ - FactoryBindInfos bindInfos = resolveBind(interfaceUUID, name, contextLevels); - - contextLevels.push_front({ContextType::Component, bindInfos}); - if (bindInfos.scope == BindingScope::Singleton) { - pair key = make_pair(bindInfos.componentUUID, name); - if (! mapContains(m_namedSingletonInstances,key)) { - SRef componentRef = resolveComponent(bindInfos, contextLevels); - m_namedSingletonInstances[key] = componentRef; - } - return m_namedSingletonInstances.at(key); - } - return resolveComponent(bindInfos, contextLevels); -} - -SRef Factory::resolve(const SRef & injectableInfo, std::deque contextLevels ) -{ - if (injectableInfo->isNamed()) { - return resolve(injectableInfo->getUuid(), injectableInfo->getName(), contextLevels); - } - return resolve(injectableInfo->getUuid(), contextLevels); -} - -const SRef>> Factory::resolveAll(const SPtr & injectableInfo, - std::deque contextLevels) -{ - return resolveAll(injectableInfo->getUuid(), contextLevels); -} - -const SRef>> Factory::resolveAll(const uuids::uuid & interfaceUUID, - std::deque contextLevels) -{ - SRef>> componentSet = utils::make_shared,std::vector>>(); - if (!mapContains(m_context->multiBindings,interfaceUUID)) { - //no explicit multibind : resolve any existing single bind default or explicit - componentSet->add(resolve(interfaceUUID, contextLevels)); - return componentSet; - } - - //multibind declared ! - for (auto bindInfos : m_context->multiBindings.at(interfaceUUID)) { - contextLevels.push_front({ContextType::Component, bindInfos}); - if (bindInfos.scope == BindingScope::Singleton) { - if (! mapContains(m_singletonInstances, bindInfos.componentUUID)) { - SRef componentRef = resolveComponent(bindInfos, contextLevels); - m_singletonInstances[bindInfos.componentUUID] = componentRef; - } - componentSet->add(m_singletonInstances.at(bindInfos.componentUUID)); - } - auto component = resolveComponent(bindInfos, contextLevels); - componentSet->add(component); - } - return componentSet; -} - -}}} //namespace org::bcom::xpcf diff --git a/src/GrpcManager.cpp b/src/GrpcManager.cpp deleted file mode 100644 index 104aed2..0000000 --- a/src/GrpcManager.cpp +++ /dev/null @@ -1,72 +0,0 @@ -#include "private/xpcf/GrpcManager.h" - -namespace xpcf = org::bcom::xpcf; - - -namespace org { namespace bcom { namespace xpcf { -template<> GrpcManager * xpcf::ComponentFactory::createInstance(); - - - -GrpcManager::GrpcManager():xpcf::ConfigurableBase(xpcf::toMap()) -{ - declareInterface(this); - // Inject declarations come here : declare any component that must be injected to your component through its interface /////////////////////////..///// declareInjectable(m_filter); - // - // Inject declaration can have a name : - // declareInjectable(m_blurFilter, "blurFilter"); - // - // Inject declaration can be optional i.e. not finding a binding component for the interface is not an error : - // declareInjectable(m_imageFilter, false); - - // wrap any component member variable to expose as properties with declareProperty() with T matching the variable type - // For example : declareProperty("blurFactor",m_blurFactor); - declareProperty("ServerAddress",m_serverAddress);//also works with template type deduction when m_memberVariable is a supported type of IProperty -} - - -GrpcManager::~GrpcManager() -{ - -} - -void GrpcManager::unloadComponent () -{ - // provide component cleanup strategy - // default strategy is to delete self, uncomment following line in this case : - // delete this; - return; -} - -xpcf::XPCFErrorCode GrpcManager::onConfigured() -{ - // Add custom onConfigured code - return xpcf::XPCFErrorCode::_SUCCESS; -} - -void GrpcManager::registerService(grpc::Service * service) -{ - m_serverBuilder.RegisterService(service); -} - -void GrpcManager::registerService(const std::string & host, grpc::Service * service) -{ - m_serverBuilder.RegisterService(host,service); -} - -void GrpcManager::registerService(SRef service) { - m_serverBuilder.RegisterService(service->getService()); -} - -void GrpcManager::registerService(const std::string & host, SRef service){ - m_serverBuilder.RegisterService(host,service->getService()); -} - -void GrpcManager::runServer() -{ - std::unique_ptr server(m_serverBuilder.BuildAndStart()); - std::cout << "Server listening on " << m_serverAddress << std::endl; - server->Wait(); -} - -}}} diff --git a/src/InjectableMetadata.cpp b/src/InjectableMetadata.cpp deleted file mode 100755 index ae784c4..0000000 --- a/src/InjectableMetadata.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-04-28 - */ - -#include "xpcf/api/InjectableMetadata.h" -#include "private/xpcf/PathBuilder.h" -#include -#include - -#include -// implement Component -// - -namespace org { namespace bcom { namespace xpcf { - -using namespace uuids; -class InjectableMetadata::InjectableMetadataImpl { -public: - InjectableMetadataImpl(const uuids::uuid & serviceUUID, bool optional); - InjectableMetadataImpl(const uuids::uuid & serviceUUID, const char * name, bool optional); - InjectableMetadataImpl(const InjectableMetadataImpl & copy ) = default; - bool m_bOptional = false; - uuids::uuid m_serviceUUID; - std::string m_name; - const std::function)> m_injector; - bool m_bNamed = false; - -}; - -InjectableMetadata::InjectableMetadataImpl::InjectableMetadataImpl(const uuids::uuid & serviceUUID, - bool optional ) : - m_bOptional(optional),m_serviceUUID(serviceUUID) -{ -} - -InjectableMetadata::InjectableMetadataImpl::InjectableMetadataImpl(const uuids::uuid & serviceUUID, - const char * name, - bool optional ) : - InjectableMetadata::InjectableMetadataImpl(serviceUUID,optional) -{ - m_name = name; - m_bNamed = true; -} - -InjectableMetadata::InjectableMetadata(const uuids::uuid & serviceUUID, bool optional ) : - m_pimpl(new InjectableMetadataImpl( serviceUUID, optional)) { - -} - -InjectableMetadata::InjectableMetadata(const uuids::uuid & serviceUUID, const char * name, bool optional ) : - m_pimpl(new InjectableMetadataImpl( serviceUUID, name, optional)) { - -} - -InjectableMetadata::~InjectableMetadata() {} - -bool InjectableMetadata::isNamed() -{ - return m_pimpl->m_bNamed; -} - -bool InjectableMetadata::optional() const { return m_pimpl->m_bOptional; } - -const char * InjectableMetadata::getName() const { return m_pimpl->m_name.c_str(); } - -const uuids::uuid & InjectableMetadata::getUuid() const { return m_pimpl->m_serviceUUID; } - -class Injector::InjectorImpl { -public: - InjectorImpl(const std::function)> & injector); - InjectorImpl(const InjectorImpl & copy ) = default; - InjectorImpl(const std::function>>)> & injector); - const std::function)> m_injector; - const std::function>>)> m_multiInjector; - bool m_isMulti; - -}; - -Injector::InjectorImpl::InjectorImpl( const std::function)> & injector): m_injector(injector),m_isMulti(false) -{ -} - -Injector::InjectorImpl::InjectorImpl( const std::function>>)> & injector): m_multiInjector(injector),m_isMulti(true) -{ -} - -Injector::Injector( const std::function)> & injector, uuids::uuid serviceUUID, bool optional ): - InjectableMetadata(serviceUUID,optional), m_pimpl(new InjectorImpl(injector)) -{ -} - -Injector::Injector( const std::function)> & injector, uuids::uuid serviceUUID, const char * name, bool optional ): - InjectableMetadata(serviceUUID,name,optional), m_pimpl(new InjectorImpl(injector)) -{ -} - -Injector::Injector( const std::function>>)> & injector, uuids::uuid serviceUUID, bool optional ): - InjectableMetadata(serviceUUID,optional), m_pimpl(new InjectorImpl(injector)) -{ -} - -Injector::Injector( const std::function>>)> & injector, uuids::uuid serviceUUID, const char * name, bool optional ): - InjectableMetadata(serviceUUID,name,optional), m_pimpl(new InjectorImpl(injector)) -{ -} - -Injector::~Injector() {} - -void Injector::inject(SRef instance) -{ - m_pimpl->m_injector(instance); -} - -void Injector::inject(SRef>> instance) -{ - m_pimpl->m_multiInjector(instance); -} - -bool Injector::isMulti() -{ - return m_pimpl->m_isMulti; -} - -}}} //namespace org::bcom::xpcf diff --git a/src/InterfaceMetadata.cpp b/src/InterfaceMetadata.cpp index 6f61d49..eda1024 100644 --- a/src/InterfaceMetadata.cpp +++ b/src/InterfaceMetadata.cpp @@ -20,102 +20,32 @@ * @date 2017-04-28 */ -#include "xpcf/api/InterfaceMetadata.h" +#include "InterfaceMetadata.h" +#include #include -namespace org { namespace bcom { namespace xpcf { -using namespace uuids; +namespace org { +namespace bcom { +namespace xpcf { -class InterfaceMetadata::InterfaceMetadataImpl { -public: - InterfaceMetadataImpl(const char * name, const uuids::uuid& interfaceUUID, const char * description); - InterfaceMetadataImpl(const char * name, const char * interfaceUUID, const char * description); - std::basic_string m_name; - std::basic_string m_description; - uuids::uuid m_uuid; - void setUUID(const char * elementUUID); -}; +using namespace utils::uuids; -InterfaceMetadata::InterfaceMetadata(const char* name, const uuid& interfaceUUID, const char * description): - m_pimpl(new InterfaceMetadataImpl(name,interfaceUUID,description)) +InterfaceMetadata::InterfaceMetadata(const char* name, const uuid& interfaceUUID):m_description(name),m_uuid(interfaceUUID) { } -InterfaceMetadata::InterfaceMetadata(const char* name, const char * interfaceUUID, const char * description): - m_pimpl(new InterfaceMetadataImpl(name,interfaceUUID,description)) -{ -} - -InterfaceMetadata::InterfaceMetadata(const InterfaceMetadata & other) -{ - m_pimpl = unixpcf::make_unique(other.name(),other.getUUID(),other.description()); -} - -InterfaceMetadata::InterfaceMetadata(InterfaceMetadata && other) -{ - this->m_pimpl = std::move(other.m_pimpl); -} - -InterfaceMetadata::~InterfaceMetadata() -{ -} - -const char * InterfaceMetadata::name() const -{ - return m_pimpl->m_name.c_str(); -} - -const char * InterfaceMetadata::description() const -{ - return m_pimpl->m_description.c_str(); -} - -uuids::uuid InterfaceMetadata::getUUID() const -{ - return m_pimpl->m_uuid; -} - -InterfaceMetadata & InterfaceMetadata::operator=(const InterfaceMetadata & other) -{ - m_pimpl->m_description = other.description(); - m_pimpl->m_name = other.name(); - m_pimpl->m_uuid = other.getUUID(); - return * this; -} - -InterfaceMetadata & InterfaceMetadata::operator=(InterfaceMetadata && other) -{ - this->m_pimpl = std::move(other.m_pimpl); - return * this; -} - -bool InterfaceMetadata::operator==(const InterfaceMetadata & c) -{ - if ((strcmp(c.description(),this->description()) ==0) && - c.getUUID() == this->getUUID() && - (strcmp(c.name(),this->name()) ==0)) { - return true; - } - return false; -} - -InterfaceMetadata::InterfaceMetadataImpl::InterfaceMetadataImpl(const char * name, const uuids::uuid& interfaceUUID, const char * description): - m_name(name),m_description(description),m_uuid(interfaceUUID) -{ -} - -InterfaceMetadata::InterfaceMetadataImpl::InterfaceMetadataImpl(const char * name, const char * interfaceUUID, const char * description): - m_name(name),m_description(description) +InterfaceMetadata::InterfaceMetadata(const char* name, const char * interfaceUUID):m_description(name) { setUUID(interfaceUUID); } -void InterfaceMetadata::InterfaceMetadataImpl::setUUID(const char *elementUUID) +void InterfaceMetadata::setUUID(const char *elementUUID) { if (elementUUID != nullptr) { - m_uuid = xpcf::toUUID(elementUUID); + string_generator gen; + m_uuid = gen(elementUUID); } } diff --git a/src/MethodMetadata.cpp b/src/MethodMetadata.cpp old mode 100755 new mode 100644 index 74b1dee..24872d4 --- a/src/MethodMetadata.cpp +++ b/src/MethodMetadata.cpp @@ -20,7 +20,9 @@ * @date 2017-04-28 */ -#include "private/xpcf/MethodMetadata.h" -namespace org { namespace bcom { namespace xpcf { +#include "MethodMetadata.h" -}}} //namespace org::bcom::xpcf +MethodMetadata::MethodMetadata() +{ + +} diff --git a/src/ModuleManager.cpp b/src/ModuleManager.cpp deleted file mode 100644 index 27daf4f..0000000 --- a/src/ModuleManager.cpp +++ /dev/null @@ -1,337 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-11-22 - */ - -#include "xpcf/core/Exception.h" -#include "private/xpcf/ModuleManager.h" -#include "xpcf/module/ModuleFactory.h" -#include "private/xpcf/PathBuilder.h" -#include -#include -#include -#include -#include -#include -#include "private/xpcf/tinyxmlhelper.h" -//#include - -using namespace std; -#ifdef XPCF_WITH_LOGS -namespace logging = boost::log; -#endif - -namespace org { namespace bcom { namespace xpcf { - -std::atomic ModuleManager::m_instance; -std::mutex ModuleManager::m_mutex; - -ModuleManager * ModuleManager::instance() -{ - //std::filesystem::path p("/usr/local/inlude"); - ModuleManager* moduleMgrInstance= m_instance.load(std::memory_order_acquire); - if ( !moduleMgrInstance ){ - std::lock_guard myLock(m_mutex); - moduleMgrInstance = m_instance.load(std::memory_order_relaxed); - if ( !moduleMgrInstance ){ - moduleMgrInstance= new ModuleManager(); - m_instance.store(moduleMgrInstance, std::memory_order_release); - } - } - return moduleMgrInstance; -} - -SRef getModuleManagerInstance() -{ - SRef lrIComponentIntrospect = xpcf::ComponentFactory::create(); - return lrIComponentIntrospect->bindTo(); -} - -template<> ModuleManager* ComponentFactory::createInstance() -{ - return ModuleManager::instance(); -} - -ModuleManager::ModuleManager():ComponentBase(toUUID()) -{ - declareInterface(this); -} - -void ModuleManager::unloadComponent () -{ -} - -void checkSymbol(const boost::dll::shared_library & shlib, const std::string symbol) -{ - if (!shlib.has(symbol)) { - throw ModuleException("Missing XPCF symbol " + symbol ); - } -} - -boost::dll::shared_library validateModule(fs::path modulePath)// validation cache ? -{ - if ( ! fs::exists(PathBuilder::appendModuleDecorations(modulePath))) { - throw ModuleException("No module file found in " + modulePath.generic_string()); - } - // module validation is made first by checking every needed entry points exists in the dll - // second with parsing the module index and trying to create each component without failure - boost::dll::shared_library shlib; - try {//trying to load library first to check if there is a version mismatch (for mac os x it is mandatory) to inform user with load failed - shlib.load(modulePath, boost::dll::load_mode::append_decorations | boost::dll::load_mode::load_with_altered_search_path); - } - catch (boost::system::system_error & e) { - throw ModuleException("Error loading module for file '" + modulePath.generic_string() + "'=> " +e.what()); - } - // checkSymbol(shlib, XPCF_GETXPCFVERSION); - checkSymbol(shlib, XPCF_GETMODULEUUID); - checkSymbol(shlib, XPCF_GETMODULENAME); - checkSymbol(shlib, XPCF_GETMODULEDESCRIPTION); - checkSymbol(shlib, XPCF_GETCOMPONENT); - checkSymbol(shlib, XPCF_GETMODULEINDEX); - return shlib; -} - -boost::dll::shared_library validateModule(SPtr moduleInfos) -{ - if ( ! fs::exists(PathBuilder::appendModuleDecorations(moduleInfos->getFullPath()))) { - throw ModuleException("No module file found for module UUID " + uuids::to_string(moduleInfos->getUUID()) + " in " + moduleInfos->getFullPath()); - } - return validateModule(PathBuilder::getUTF8PathObserver(moduleInfos->getFullPath())); -} - -bool ModuleManager::isXpcfModule(fs::path modulePath) -{ - try { - validateModule(modulePath); - return true; - } - catch (ModuleException & e) { - return false; - } -} - -bool ModuleManager::isXpcfModule(SPtr moduleInfos) -{ - try { - validateModule(moduleInfos); - return true; - } - catch (ModuleException & e) { - return false; - } -} - -bool ModuleManager:: isXpcfModule(const char* modulePath) -{ - return isXpcfModule( PathBuilder::getUTF8PathObserver(modulePath)); -} - -bool ModuleManager::isXpcfModule(const char* moduleName, const char* moduleFolderPath) -{ - return isXpcfModule( PathBuilder::buildModuleFilePath(moduleName, moduleFolderPath)); -} - -const char * ModuleManager::getXpcfVersion(const char* moduleName, const char* moduleFolderPath) -{ - fs::path modulePath = PathBuilder::buildModuleFilePath(moduleName, moduleFolderPath); - boost::dll::shared_library shlib = validateModule(modulePath); - - try { - boost::function getXpcfVersion = boost::dll::import_symbol( - modulePath, XPCF_GETXPCFVERSION, boost::dll::load_mode::append_decorations | boost::dll::load_mode::load_with_altered_search_path - ); -/* boost::function getXpcfVersion = boost::dll::import( - modulePath, XPCF_GETXPCFVERSION, boost::dll::load_mode::append_decorations | boost::dll::load_mode::load_with_altered_search_path - );*/ - std::string xpcfVersion = getXpcfVersion(); - return xpcfVersion.c_str(); - } - catch (boost::system::system_error & e) { - throw ModuleException(e.what(),xpcf::XPCFErrorCode::_ERROR_MODULE_MISSINGXPCF_ENTRY); - } -} - -SPtr ModuleManager::introspectModule(const char* moduleName, const char* moduleFolderPath) -{ - fs::path modulePath = PathBuilder::buildModuleFilePath(moduleName, moduleFolderPath); - return introspectModule(modulePath); -} - -SPtr ModuleManager::introspectModule(const char* moduleFilePath) -{ - fs::path modulePath = PathBuilder::getUTF8PathObserver(moduleFilePath); - return introspectModule(modulePath); -} - -SPtr ModuleManager::introspectModule(fs::path modulePath) -{ - if (modulePath.is_relative()) { - // when modulePath is relative, search modules in ~/.xpcf/modules/ - modulePath = PathBuilder::getXPCFHomePath() / "modules" / modulePath; - } - boost::dll::shared_library shlib = validateModule(modulePath); - SPtr moduleInfos; - try { -// boost::function getModuleUUID = boost::dll::import( - boost::function getModuleUUID = boost::dll::import_symbol( - modulePath, XPCF_GETMODULEUUID, boost::dll::load_mode::append_decorations | boost::dll::load_mode::load_with_altered_search_path - ); -// boost::function getModuleName = boost::dll::import( - boost::function getModuleName = boost::dll::import_symbol( - modulePath, XPCF_GETMODULENAME, boost::dll::load_mode::append_decorations| boost::dll::load_mode::load_with_altered_search_path - ); -// boost::function getModuleDescription = boost::dll::import( - boost::function getModuleDescription = boost::dll::import_symbol( - modulePath, XPCF_GETMODULEDESCRIPTION, boost::dll::load_mode::append_decorations| boost::dll::load_mode::load_with_altered_search_path - ); -// boost::function)> getModuleIndex = boost::dll::import)>( - boost::function)> getModuleIndex = boost::dll::import_symbol)>( - modulePath, XPCF_GETMODULEINDEX, boost::dll::load_mode::append_decorations| boost::dll::load_mode::load_with_altered_search_path - ); - if (getModuleUUID && getModuleName && getModuleIndex) { - std::string moduleUUIDStr = getModuleUUID(); - std::string moduleName = getModuleName(); - std::string moduleDescription = getModuleDescription(); - xpcf::uuids::uuid moduleUUID = toUUID(moduleUUIDStr); - if (m_moduleMap.find(moduleUUID) == m_moduleMap.end()) { - moduleInfos = utils::make_shared(moduleName.c_str(), moduleUUID, moduleDescription.c_str(), modulePath.parent_path().generic_string().c_str()); - getModuleIndex(moduleInfos); - m_moduleMap[moduleUUID] = moduleInfos; - } - else { //Module has already been loaded in the library - moduleInfos = m_moduleMap.at(moduleUUID); - } - } - } - catch (boost::system::system_error & e) { - throw ModuleException(e.what(),xpcf::XPCFErrorCode::_ERROR_MODULE_MISSINGXPCF_ENTRY); - } - return moduleInfos; -} - -void ModuleManager::addModuleRef(const uuids::uuid& ) -{ - -} - -void ModuleManager::releaseModuleRef(const uuids::uuid& ) -{ - -} - -SRef ModuleManager::createComponent(SPtr moduleInfos, const uuids::uuid& componentUUID) -{ - SRef componentRef; - boost::dll::shared_library shlib = validateModule(moduleInfos); - if (m_funcMap.find(moduleInfos->getUUID()) == m_funcMap.end()) { -// m_funcMap[moduleInfos->getUUID()]=boost::dll::import&)>( - m_funcMap[moduleInfos->getUUID()]=boost::dll::import_symbol&)>( - moduleInfos->getFullPath(), XPCF_GETCOMPONENT, boost::dll::load_mode::append_decorations | boost::dll::load_mode::load_with_altered_search_path - ); - } - - if (m_funcMap.at(moduleInfos->getUUID())) { - m_funcMap.at(moduleInfos->getUUID())(componentUUID, componentRef); - if (componentRef) { - addModuleRef(moduleInfos->getUUID()); - } - else { - std::string what = "Unable to find component uuid="; - what.append(uuids::to_string(componentUUID)); - throw xpcf::ConfigurationException(what); - } - } - return componentRef; -} - -std::vector> ModuleManager::getComponentInterfaceList(SPtr moduleInfos, const uuids::uuid& componentUUID) -{ - std::vector> interfaceVector; - SRef rIntrospect = createComponent(moduleInfos, componentUUID); - - for (uuids::uuid interfaceUUID : rIntrospect->getInterfaces()) { - SRef interfaceMdata = utils::make_shared(rIntrospect->getMetadata(interfaceUUID)); - interfaceVector.push_back(interfaceMdata); - } - return interfaceVector; -} - -// TODO : study which method signature ? with module ID ? or ModuleMetadata ? -// What about default configuration for the component ? -XPCFErrorCode ModuleManager::saveModuleInformations(const char * xmlFilePath, const SPtr & moduleInfos) -{ - XPCFErrorCode result = XPCFErrorCode::_SUCCESS; - tinyxml2::XMLDocument xmlDoc; - // root node creation will occur only for non existing files, otherwise the root node will be loaded and elements for the module will be inserted in the xml tree - tinyxml2::XMLNode * xmlRoot; - enum tinyxml2::XMLError loadOkay = xmlDoc.LoadFile(xmlFilePath); - if (loadOkay == 0) { - xmlRoot = xmlDoc.RootElement(); - } - else { - std::cout<<"ModuleManager::saveModuleInformations ===> failed loading doc "< creating module XmlNode"<SetAttribute("uuid", uuids::to_string(moduleInfos->getUUID()).c_str()); - xmlModuleElt->SetAttribute("name", moduleInfos->name()); - xmlModuleElt->SetAttribute("path", moduleInfos->getPath()); - xmlModuleElt->SetAttribute("description", moduleInfos->description()); - for (SRef componentInfo : moduleInfos->getComponentsMetadata()) { - std::cout<<"ModuleManager::saveModuleInformations ===> retrieving component #"<getUUID()< creating component XmlNode"<SetAttribute("uuid", uuids::to_string(componentInfo->getUUID()).c_str()); - xmlComponentElt->SetAttribute("name", componentInfo->name()); - xmlComponentElt->SetAttribute("description", componentInfo->description()); - xmlModuleElt->InsertEndChild(xmlComponentElt); - std::vector> interfaceList = getComponentInterfaceList(moduleInfos, componentInfo->getUUID()); - for (SRef interface : interfaceList) { - std::cout<<"ModuleManager::saveModuleInformations ===> creating interface XmlNode"<SetAttribute("uuid", uuids::to_string(interface->getUUID()).c_str()); - xmlInterfaceElt->SetAttribute("name", interface->name()); - xmlInterfaceElt->SetAttribute("description", interface->description()); - xmlComponentElt->InsertEndChild(xmlInterfaceElt); - } - } - xmlRoot->InsertEndChild(xmlModuleElt); - xmlDoc.SaveFile(xmlFilePath); - } - catch (const std::runtime_error & e) { -#ifdef XPCF_WITH_LOGS - BOOST_LOG_SEV(m_logger, logging::trivial::info)<<"XML parsing file "< -#include -#include -#include -// implement Component -// -namespace fs = boost::filesystem; - -namespace org { namespace bcom { namespace xpcf { - -using namespace uuids; - -class ModuleMetadata::ModuleMetadataImpl { -public: - Collection m_componentUUIDs; - Collection,std::vector> m_components; - std::map> m_moduleComponentMap; - std::basic_string m_modulePath; - std::basic_string m_moduleFullPath; -}; - -ModuleMetadata::ModuleMetadata(const char* name, const uuid& moduleID, - const char * description, const char *modulePath): - InterfaceMetadata(name, moduleID, description),m_pimpl(new ModuleMetadataImpl()) -{ - //TODO : null pointer exception ??? partial construction to avoid !!! - setPath(modulePath); -} - -ModuleMetadata::ModuleMetadata(const char *name, const char *moduleID, - const char * description, const char *modulePath): - InterfaceMetadata(name, moduleID,description),m_pimpl(new ModuleMetadataImpl()) -{ - setPath(modulePath); -} - -ModuleMetadata::~ModuleMetadata() -{ -} - -void ModuleMetadata::setPath(const char* modulePath) -{ - fs::detail::utf8_codecvt_facet utf8; - if (modulePath != nullptr) { - m_pimpl->m_modulePath = modulePath; - } - fs::path moduleFullPath = PathBuilder::buildModuleFilePath(name(), m_pimpl->m_modulePath); - if ( !fs::exists( moduleFullPath ) ) - { - //std::cout<<"Error : Module not found at : "<m_moduleFullPath = moduleFullPath.string(utf8); -} - -void ModuleMetadata::addComponent(SPtr componentInfo) -{ - if (m_pimpl->m_moduleComponentMap.find(componentInfo->getUUID()) == m_pimpl->m_moduleComponentMap.end()) { - m_pimpl->m_componentUUIDs.add(componentInfo->getUUID()); - m_pimpl->m_moduleComponentMap[componentInfo->getUUID()] = componentInfo; - m_pimpl->m_components.add(componentInfo); - } -} - -void ModuleMetadata::removeComponent(const uuids::uuid & componentUUID) -{ - if (m_pimpl->m_moduleComponentMap.find(componentUUID) != m_pimpl->m_moduleComponentMap.end()) { - m_pimpl->m_componentUUIDs.remove(componentUUID); - SPtr componentInfo = m_pimpl->m_moduleComponentMap.at(componentUUID); - m_pimpl->m_components.remove(componentInfo); - } -} - -const char * ModuleMetadata::getPath() const -{ - return m_pimpl->m_modulePath.c_str(); -} - -const char * ModuleMetadata::getFullPath() const -{ - return m_pimpl->m_moduleFullPath.c_str(); -} - - -const IEnumerable & ModuleMetadata::getComponents() const -{ - return m_pimpl->m_componentUUIDs; -} - -const IEnumerable> & ModuleMetadata::getComponentsMetadata() const -{ - return m_pimpl->m_components; -} - -SPtr ModuleMetadata::getComponentMetadata(const uuids::uuid & componentUUID) const -{ - if (m_pimpl->m_moduleComponentMap.find(componentUUID) != m_pimpl->m_moduleComponentMap.end()) { - return m_pimpl->m_moduleComponentMap.at(componentUUID); - } - return nullptr; -} - -void ModuleMetadata::declareComponent(const char * uuid, const char * name, const char * description) -{//TODO : check - SPtr componentInfo = utils::make_shared(name, uuid, description); - addComponent(componentInfo); -} - -}}} //namespace org::bcom::xpcf diff --git a/src/PathBuilder.cpp b/src/PathBuilder.cpp deleted file mode 100644 index 0b3f77c..0000000 --- a/src/PathBuilder.cpp +++ /dev/null @@ -1,181 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-11-23 - */ - -#include "private/xpcf/PathBuilder.h" -#include -#include - -#ifdef WIN32 -#include -#else -#include -#include -#endif - -#include - -#include -namespace fs = boost::filesystem; - -namespace org { namespace bcom { namespace xpcf { - -PathBuilder::PathBuilder() -{ - -} - -fs::path PathBuilder::findRegistries() -{ - return ""; -} - -fs::path PathBuilder::getUTF8PathObserver(const char * sourcePath) -{ - fs::detail::utf8_codecvt_facet utf8; - fs::path utf8ObservedPath(sourcePath, utf8); - return utf8ObservedPath; -} - -fs::path PathBuilder::getUTF8PathObserver(const std::string & sourcePath) -{ - return getUTF8PathObserver(sourcePath.c_str()); -} - -fs::path PathBuilder::replaceRootEnvVars(const std::string & sourcePath) -{ - // find any $ENVVAR and substitut - fs::path completePath = getUTF8PathObserver(sourcePath); - // howto manage i18n on env vars ? : env vars don't support accented characters - std::string regexStr="^\\$([a-zA-Z0-9_]*)/"; - std::regex envVarRegex(regexStr, std::regex_constants::extended); - std::smatch sm; - if (std::regex_search(sourcePath, sm, envVarRegex)) { - std::string matchStr = sm.str(1); - char * envVar = getenv(matchStr.c_str()); - if (envVar != nullptr) { - fs::path envStr (envVar); - std::string replacedStr = std::regex_replace(sourcePath, envVarRegex, ""); - fs::path subdir (replacedStr); - completePath = envStr / subdir; - } - } - return completePath; -} - - -fs::path PathBuilder::buildModuleFolderPath(const std::string & filePathStr) -{ - fs::path filePath(replaceRootEnvVars(filePathStr)); - -#ifdef XPCFSUBDIRSEARCH - fs::path modeSubDir = XPCFSUBDIRSEARCH; - - if ( fs::exists( filePath / modeSubDir ) ) { - filePath /= modeSubDir; - } -#endif - return filePath; -} - -fs::path PathBuilder::buildModuleFilePath(const std::string & moduleName, const std::string & filePathStr) -{ - fs::path filePath = buildModuleFolderPath(filePathStr); - - fs::path moduleFileName = getUTF8PathObserver(moduleName.c_str()); - filePath /= moduleFileName; - return filePath; -} - -fs::path PathBuilder::getHomePath() -{ - char * homePathStr; - fs::path homePath; -#ifdef WIN32 - homePathStr = getenv("USERPROFILE"); - if (homePathStr == nullptr) { - homePathStr = getenv("HOMEDRIVE"); - if (homePathStr) { - homePath = getUTF8PathObserver(homePathStr); - homePath /= getenv("HOMEPATH"); - } - } - else { - homePath = getUTF8PathObserver(homePathStr); - } -#else - struct passwd* pwd = getpwuid(getuid()); - if (pwd) { - homePathStr = pwd->pw_dir; - } - else { - // try the $HOME environment variable - homePathStr = getenv("HOME"); - } - homePath = getUTF8PathObserver(homePathStr); -#endif - return homePath; -} - -fs::path PathBuilder::getXPCFHomePath() -{ - fs::path xpcfHomePath = getHomePath(); - xpcfHomePath /= ".xpcf"; - return xpcfHomePath; -} - -static fs::path suffix() { - // https://sourceforge.net/p/predef/wiki/OperatingSystems/ -#if BOOST_OS_MACOS || BOOST_OS_IOS - return ".dylib"; -#elif BOOST_OS_WINDOWS - return L".dll"; -#else - return ".so"; -#endif -} - -fs::path PathBuilder::appendModuleDecorations(const fs::path & sl) -{ - fs::path actual_path = sl; - if ( actual_path.stem() == actual_path.filename() ) { // there is no suffix - actual_path += suffix().native(); - } -#if BOOST_OS_WINDOWS - if (!fs::exists(actual_path)) { - // MinGW loves 'lib' prefix and puts it even on Windows platform - actual_path = (actual_path.has_parent_path() ? actual_path.parent_path() / L"lib" : L"lib").native() + actual_path.filename().native(); - } -#else //posix - actual_path = (std::strncmp(actual_path.filename().string().c_str(), "lib", 3) - ? (actual_path.has_parent_path() ? actual_path.parent_path() / L"lib" : L"lib").native() + actual_path.filename().native() - : actual_path); -#endif - return actual_path; -} - -fs::path PathBuilder::appendModuleDecorations(const char * sl) -{ - fs::path currentPath = getUTF8PathObserver(sl); - return appendModuleDecorations(currentPath); -} - -}}} diff --git a/src/Property.cpp b/src/Property.cpp deleted file mode 100644 index 96bdb5c..0000000 --- a/src/Property.cpp +++ /dev/null @@ -1,414 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-10-27 - */ - -#include "private/xpcf/Property.h" -#include "xpcf/core/Exception.h" - -//#pragma warning(disable:4786) - -namespace org { namespace bcom { namespace xpcf { - -Property::Property () - : m_name("none"), m_type(IProperty_NONE), m_attribute(IProperty_INOUT) -{ -} - -Property::Property (const char* name, uint32_t numberOfItem, IProperty::AccessSpecifier iotype) - : Property() - -{ - setProperties(name, numberOfItem, iotype); -} - - -Property::~Property () -{ - clear(); -} - -const char* Property::getName () const -{ - return m_name.c_str(); -} - -IProperty::PropertyType Property::getType () -{ - return m_type; -} - -uint32_t Property::size () -{ - return m_queue.size(); -} - -template -void Property::setValue(uint32_t itemIndex, T value) -{ - if (m_attribute & IProperty::AccessSpecifier::IProperty_OUT) { - throw AccessDeniedException(); - } - m_queue.at(itemIndex) = value; -} - -template -T Property::getValue(uint32_t itemIndex, IProperty::PropertyType valueType) const -{ - if (m_type != valueType || itemIndex > m_queue.size() || m_attribute & IProperty::AccessSpecifier::IProperty_IN) { - return static_cast(0); - } - return utils::any_cast(m_queue.at(itemIndex)); -} - -template -const T * Property::getValue(uint32_t itemIndex, IProperty::PropertyType valueType) const -{ - if (m_type != valueType || m_attribute & IProperty::AccessSpecifier::IProperty_IN) { - return nullptr; - } - return utils::any_cast(m_queue.at(itemIndex)).c_str(); -} - -template -void Property::setValue(uint32_t itemIndex, const T * value) -{ - if (value == nullptr) - { - throw std::invalid_argument("Argument 'value' is null"); - } - - if (m_attribute & IProperty::AccessSpecifier::IProperty_OUT) { - throw AccessDeniedException(); - } - - checkType(); - U newValue = value; - m_queue.at(itemIndex) = newValue; -} - -void Property::setIntegerValue (int32_t val, uint32_t itemIndex) -{ - setValue(itemIndex, val); -} - -void Property::setUnsignedIntegerValue (uint32_t val, uint32_t itemIndex) -{ - setValue(itemIndex, val); -} - -void Property::setLongValue (int64_t val, uint32_t itemIndex) -{ - setValue(itemIndex, val); -} - -void Property::setUnsignedLongValue (uint64_t val, uint32_t itemIndex) -{ - setValue(itemIndex, val); -} - -void Property::setFloatingValue (float val, uint32_t itemIndex) -{ - setValue(itemIndex, val); -} - -void Property::setDoubleValue (double val, uint32_t itemIndex) -{ - setValue(itemIndex, val); -} - - -void Property::setStringValue (const char * val, uint32_t itemIndex) -{ - setValue(itemIndex, val); -} - -void Property::setUnicodeStringValue (const wchar_t * val, uint32_t itemIndex) -{ - setValue(itemIndex, val); -} - -void Property::setStructureValue (SRef val, uint32_t itemIndex) -{ - if (!val) - { - throw std::invalid_argument("Argument 'val' is null"); - } - setValue>(itemIndex, val); -} - -int32_t Property::getIntegerValue (uint32_t itemIndex) const -{ - return getValue(itemIndex, IProperty_INTEGER); -} - -uint32_t Property::getUnsignedIntegerValue (uint32_t itemIndex) const -{ - return getValue(itemIndex, IProperty_UINTEGER); -} - -int64_t Property::getLongValue (uint32_t itemIndex) const -{ - return getValue(itemIndex, IProperty_INTEGER); -} - -uint64_t Property::getUnsignedLongValue (uint32_t itemIndex) const -{ - return getValue(itemIndex, IProperty_UINTEGER); -} - - -const char* Property::getStringValue (uint32_t itemIndex) const -{ - return getValue(itemIndex, IProperty_CHARSTR); -} - -const wchar_t* Property::getUnicodeStringValue (uint32_t itemIndex) const -{ - return getValue(itemIndex, IProperty_UNICODESTR); -} - -float Property::getFloatingValue (uint32_t itemIndex) const -{ - return getValue(itemIndex, IProperty_FLOAT); -} - -double Property::getDoubleValue (uint32_t itemIndex) const -{ - return getValue(itemIndex, IProperty_FLOAT); -} - -SRef Property::getStructureValue (uint32_t itemIndex) const -{ - if (m_type != IProperty_STRUCTURE) { - return nullptr; - } - return utils::any_cast >(m_queue.at(itemIndex)); -} - -int Property::init () -{ - - int res=0; - return res; -} - -void Property::clear () -{ - if (m_type == IProperty_NONE) { - return ; - } - - m_queue.clear(); - m_type = IProperty_NONE; - return; -} - -XPCFErrorCode Property::setProperties (const char* name, uint32_t numberOfValues, IProperty::AccessSpecifier iotype) -{ - if (name==nullptr) - { - return XPCFErrorCode::_FAIL; - } - - if (strlen(name) == 0) - { - return XPCFErrorCode::_FAIL; - } - - clear(); - m_name = name; - m_queue.resize(numberOfValues); - m_attribute = iotype; - - return XPCFErrorCode::_SUCCESS; -} - -XPCFErrorCode Property::copyTo (SRef dest) -{ - if (!dest) - { - throw std::invalid_argument("Argument 'dest' is null"); - } - - XPCFErrorCode res=XPCFErrorCode::_FAIL; - dest->setProperties (m_name.c_str(), m_queue.size(), m_attribute); - switch (m_type) - { - case IProperty_INTEGER: - { - uint32_t i = 0; - for (i=0; isetIntegerValue(getIntegerValue(i), i); - } - } - break; - case IProperty_UINTEGER: - { - uint32_t i = 0; - for (i=0; isetUnsignedIntegerValue(getUnsignedIntegerValue(i), i); - } - } - break; - case IProperty_FLOAT: - { - uint32_t i = 0; - for (i=0; isetFloatingValue(getFloatingValue(i), i); - } - - } - break; - case IProperty_CHARSTR: - { - uint32_t i = 0; - for (i=0; isetStringValue(getStringValue(i), i); - } - - } - break; - case IProperty_UNICODESTR: - { - uint32_t i = 0; - for (i=0; isetUnicodeStringValue(getUnicodeStringValue(i), i); - } - - } - break; - case IProperty_STRUCTURE: - { - uint32_t i = 0; - for (i=0; isetStructureValue(getStructureValue(i), i); - } - } - break; - default:{return res;} - break; - } - - - return XPCFErrorCode::_SUCCESS; -} - -template -void Property::checkType () -{ - IProperty::PropertyType newtype = m_type; - - if (utils::is_same::value) { - newtype = IProperty_UINTEGER; - } - - if (utils::is_same::value) { - newtype = IProperty_INTEGER; - } - - if (utils::is_same::value) { - newtype = IProperty_CHARSTR; - } - - if (utils::is_same::value) { - newtype = IProperty_FLOAT; - } - - if (utils::is_same::value) { - newtype = IProperty_UNICODESTR; - } - - if (utils::is_same>::value) { - newtype = IProperty_STRUCTURE; - } - - checkType(newtype); -} - -void Property::checkType (IProperty::PropertyType newtype) -{ - if (m_type != newtype ) - { - clear(); - m_type = newtype; - init(); - } -} - -void Property::setName (const char *name) -{ - if (name==nullptr) - { - throw std::invalid_argument("Argument 'name' is null"); - } - // TODO : check non empty name is set !! - m_name = name; -} - -IProperty::AccessSpecifier Property::getAccessSpecifier () const -{ - return m_attribute; -} - -void Property::setAccessSpecifier (IProperty::AccessSpecifier iotype) -{ - m_attribute = iotype; -} - -SRef Property::CreateInstance () -{ - return utils::make_shared(); -} - -SRef Property::CreateInstance (const char* name, uint32_t numberOfValues, IProperty::AccessSpecifier iotype) -{ - SRef rip = utils::make_shared(); - rip->setProperties(name, numberOfValues, iotype); - return rip; -} - -Property * Property::CreateConcreteInstance () -{ - Property *rip=new Property(); - return rip; -} - -Property * Property::CreateConcreteInstance (const char* name, uint32_t numberOfValues, IProperty::AccessSpecifier iotype) -{ - Property *rip=new Property(); - rip->setProperties(name, numberOfValues, iotype); - return rip; -} - -}}} - diff --git a/src/PropertyManager.cpp b/src/PropertyManager.cpp deleted file mode 100644 index 16c2e58..0000000 --- a/src/PropertyManager.cpp +++ /dev/null @@ -1,621 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2017-04-28 - */ - -#include "xpcf/api/IConfigurable.h" -#include "xpcf/api/IModuleManager.h" -#include "xpcf/core/ErrorMessage.h" -#include "xpcf/core/Exception.h" -#include "xpcf/module/ModuleFactory.h" -#include "private/xpcf/PropertyManager.h" -#include "private/xpcf/PathBuilder.h" - -#include "private/xpcf/tinyxmlhelper.h" -#include -#include - -using namespace std; -using placeholders::_1; -using placeholders::_2; -//namespace logging = boost::log; - -namespace fs = boost::filesystem; -#ifdef XPCF_WITH_LOGS -namespace logging = boost::log; -#endif - -XPCF_DEFINE_FACTORY_CREATE_INSTANCE(org::bcom::xpcf::PropertyManager); - -namespace org { namespace bcom { namespace xpcf { - -constexpr const char * XMLCOMPONENTNODE = "component"; -constexpr const char * XMLCONFIGURENODE = "configure"; - -void PropertyContext::clear() -{ - moduleConfigMap.clear(); - componentConfigMap.clear(); -} - -PropertyManager::PropertyManager():ComponentBase(toUUID()) -{ - m_context = utils::make_shared(); - declareInterface(this); - declareInterface(this); - declareInjectable(m_aliasManager); - declareInjectable(m_registry); -#ifdef XPCF_WITH_LOGS - m_logger.add_attribute("ClassName", boost::log::attributes::constant("PropertyManager")); - BOOST_LOG_SEV(m_logger, logging::trivial::info)<<"Constructor PropertyManager::PropertyManager () called!"; -#endif -} - -map propertyTypeToStrMap = { - {IProperty::IProperty_NONE,""}, - {IProperty::IProperty_INTEGER,"int"}, - {IProperty::IProperty_UINTEGER,"uint"}, - {IProperty::IProperty_LONG,"long"}, - {IProperty::IProperty_ULONG,"ulong"}, - {IProperty::IProperty_CHARSTR,"string"}, - {IProperty::IProperty_UNICODESTR,"wstring"}, - {IProperty::IProperty_FLOAT,"float"}, - {IProperty::IProperty_DOUBLE,"double"}, - {IProperty::IProperty_STRUCTURE,"structure"} -}; - -map propertyAccessToStrMap = { - {IProperty::IProperty_IN,"w"}, - {IProperty::IProperty_OUT,"r"}, - {IProperty::IProperty_INOUT,"rw"} -}; - -void PropertyManager::clear() -{ - m_context->clear(); -} - -SRef PropertyManager::getContext() const -{ - return m_context; -} - -void PropertyManager::setContext(SRef context) -{ - m_context = context; -} - -void PropertyManager::declareComponent(tinyxml2::XMLElement * xmlElt, const fs::path & configFilePath) -{ - bool subElementError = false; - string componentUuidStr = ""; - try { - if(xmlElt->Attribute("uuid") != nullptr) { - componentUuidStr = xmlElt->Attribute("uuid"); - } - uuids::uuid componentUuid; - try { - componentUuid = toUUID(componentUuidStr); - } - catch(const std::runtime_error &) { - std::string what = "UUID format invalid in \"uuid\": "; - what.append(xmlElt->Attribute("uuid")); - throw ConfigurationException( what ); - } - try { - uuids::uuid moduleUuid = m_registry->getModuleUUID(componentUuid); - if (m_context->moduleConfigMap.find(moduleUuid) == m_context->moduleConfigMap.end()) { - m_context->moduleConfigMap[moduleUuid] = configFilePath; - } - else { - fs::path & moduleConfigurationPath = m_context->moduleConfigMap[moduleUuid]; - if (moduleConfigurationPath != configFilePath) { - m_context->componentConfigMap[componentUuid] = configFilePath; - } - } - } - catch (const ModuleNotFoundException & e) { - // no associated module in current configuration : - // add config path to component configuration as the component can be declared from bindLocal - m_context->componentConfigMap[componentUuid] = configFilePath; - } - } - catch (const xpcf::Exception& e) { - XmlErrorMessage errMsg("component", e.what(), subElementError); - errMsg.addAttribute("uuid", componentUuidStr); - throw ConfigurationException(errMsg.write()); - } -} - -void PropertyManager::declareConfigure(tinyxml2::XMLElement * xmlElt, const fs::path & configFilePath) -{ - string componentAttrValue = ""; - try { - if(xmlElt->Attribute("component") != nullptr) { - componentAttrValue = xmlElt->Attribute("component"); - } - uuids::uuid componentUuid; - - if (m_aliasManager->aliasExists(IAliasManager::Type::Component, componentAttrValue)) { - componentUuid = m_aliasManager->resolveComponentAlias(componentAttrValue); - } - else { - try { - componentUuid = toUUID(componentAttrValue); - } - catch(const std::runtime_error &) { - std::string what = "UUID format invalid in \"component\": "; - what.append(componentAttrValue); - throw ConfigurationException( what ); - } - } - try { - uuids::uuid moduleUuid = m_registry->getModuleUUID(componentUuid); - if (m_context->moduleConfigMap.find(moduleUuid) == m_context->moduleConfigMap.end()) { - m_context->moduleConfigMap[moduleUuid] = configFilePath; - } - else { - fs::path & moduleConfigurationPath = m_context->moduleConfigMap[moduleUuid]; - if (moduleConfigurationPath != configFilePath) { - m_context->componentConfigMap[componentUuid] = configFilePath; - } - } - } - catch (const ModuleNotFoundException & e) { - // no associated module in current configuration : - // add config path to component configuration as the component can be declared from bindLocal - m_context->componentConfigMap[componentUuid] = configFilePath; - } - } - catch (const xpcf::Exception& e) { - XmlErrorMessage errMsg("configure", e.what(), false); - errMsg.addAttribute("component", componentAttrValue); - throw ConfigurationException(errMsg.write()); - } -} - -void PropertyManager::declareConfiguration(tinyxml2::XMLElement * xmlElt, const fs::path & configFilePath) -{ - try { - std::function declareComponentFunc = std::bind(&PropertyManager::declareComponent, this, _1,_2); - processXmlNode(xmlElt, XMLCOMPONENTNODE, declareComponentFunc, configFilePath); - } - catch(const xpcf::Exception& e) { - XmlErrorMessage errMsg("configuration", e.what(), true); - throw ConfigurationException(errMsg.write()); - } -} - -void PropertyManager::declareProperties(tinyxml2::XMLElement * xmlElt, const fs::path & configFilePath) -{ - try { - std::function declareConfigureFunc = std::bind(&PropertyManager::declareConfigure, this, _1,_2); - processXmlNode(xmlElt, XMLCONFIGURENODE, declareConfigureFunc, configFilePath); - } - catch (const xpcf::Exception& e) { - XmlErrorMessage errMsg("properties", e.what(), true); - throw ConfigurationException(errMsg.write()); - } -} - -fs::path PropertyManager::getConfigPath(uuids::uuid componentUUID) const -{ - if (m_context->componentConfigMap.find(componentUUID) != m_context->componentConfigMap.end()) { - return m_context->componentConfigMap.at(componentUUID); - } - try { - uuids::uuid moduleUUID = m_registry->getModuleUUID(componentUUID); - if (m_context->moduleConfigMap.find(moduleUUID) == m_context->moduleConfigMap.end()) { - //log("No configuration path found for module "+uuids::to_string(moduleUUID)); - // return empty path - return fs::path(); - } - return m_context->moduleConfigMap.at(moduleUUID); - } - catch (...) { // no module associated with componentUUID : componentUUID can be declared from bindLocal - //log("No module neither configuration path found for component "+uuids::to_string(componentUUID)); - // return empty path - return fs::path(); - } -} - -XPCFErrorCode configureValue(string valueStr, SRef property,uint32_t valueIndex) -{ - if ( valueStr.empty() ) { - string what = "No value defined"; - throw ConfigurationException(what); - } - - try { - size_t processedValue = 0; - - switch (property->getType()) { - case IProperty::IProperty_INTEGER: - property->setIntegerValue(std::stol(valueStr,&processedValue,0), valueIndex); - break; - case IProperty::IProperty_UINTEGER: - property->setUnsignedIntegerValue(std::stoul(valueStr,&processedValue,0), valueIndex); - break; - case IProperty::IProperty_LONG: - property->setLongValue(std::stoll(valueStr,&processedValue,0), valueIndex); - break; - case IProperty::IProperty_ULONG: - property->setUnsignedLongValue(std::stoull(valueStr,&processedValue,0), valueIndex); - break; - case IProperty::IProperty_FLOAT: - property->setFloatingValue(std::stof(valueStr,&processedValue), valueIndex); - break; - case IProperty::IProperty_DOUBLE: - property->setDoubleValue(std::stod(valueStr,&processedValue), valueIndex); - break; - case IProperty::IProperty_CHARSTR: - property->setStringValue(valueStr.c_str(), valueIndex); - break; - case IProperty::IProperty_UNICODESTR: - //?????? - //property->setUnicodeStringValue(getUnicodeStringValue(i), valueIndex); - break; - default: - return XPCFErrorCode::_ERROR_TYPE; - break; - } - - if((valueStr.size() != processedValue)&&(property->getType()!=IProperty::IProperty_CHARSTR)) { - std::string what = "Unexpected value type for \""; - what.append( valueStr ); - what.append("\", \""); - what.append(propertyTypeToStrMap[property->getType()]); - what.append("\" expected"); - throw ConfigurationException(what); - } - } - catch (const std::invalid_argument & e) { - string what = "Unexpected value type for \""; - what.append( valueStr ); - what.append("\", \""); - what.append(propertyTypeToStrMap[property->getType()]); - what.append("\" expected"); - throw ConfigurationException(what); - } - return XPCFErrorCode::_SUCCESS; -} - -XPCFErrorCode configureElement(tinyxml2::XMLElement *element, SRef nodeElement); - -XPCFErrorCode configureProperty(tinyxml2::XMLElement *propertyElt, SRef nodeElement) -{ - XPCFErrorCode result = XPCFErrorCode::_SUCCESS; - - string propertyName = ""; - if(propertyElt->Attribute("name") != nullptr) { - propertyName = propertyElt->Attribute("name"); - } - if ( propertyName.empty() ) { - return XPCFErrorCode::_ERROR_INVALID_ARGUMENT; - } - - try { - SRef currentProperty = nodeElement->at(propertyName.c_str()); - if (currentProperty == nullptr) { - std::string what = "Property unknown: "; - what.append(propertyName.c_str()); - throw ConfigurationException(what); - } - - string propertyType = propertyElt->Attribute("type"); - if ( propertyType.empty() ) { - string what = "Unknown type \""; - what.append(propertyElt->Attribute("type")); - what.append("\""); - throw ConfigurationException(what); - } - - if (propertyType == "structure") { - if (currentProperty->getType() != IProperty::IProperty_STRUCTURE) { - string what = "\"structure\" expected."; - throw ConfigurationException(what); - } - - SRef propertyNode = currentProperty->getStructureValue(); - return configureElement(propertyElt,propertyNode); - } - - const char * propertyCharStr = propertyElt->Attribute("value"); - if (propertyCharStr != nullptr) { - string propertyValue = propertyCharStr; - return configureValue(propertyValue,currentProperty,0); - } - - tinyxml2::XMLElement *valueElt = propertyElt->FirstChildElement("value"); - uint32_t index = 0; - while (valueElt != nullptr && result == XPCFErrorCode::_SUCCESS) { - string propertyValue = valueElt->GetText(); - result = configureValue(propertyValue,currentProperty,index); - index++; - valueElt = valueElt->NextSiblingElement("value"); - } - } - catch (const xpcf::Exception & e) { - XmlErrorMessage errMsg("property", e.what(), false); - errMsg.addAttribute("name", propertyName); - throw ConfigurationException(errMsg.write()); - } - - return result; -} - -XPCFErrorCode configureElement(tinyxml2::XMLElement *element, SRef nodeElement) -{ - if (!nodeElement) { - return XPCFErrorCode::_ERROR_NULL_POINTER; - } - tinyxml2::XMLElement *propertyElt = element->FirstChildElement("property"); - XPCFErrorCode result = XPCFErrorCode::_SUCCESS; - while (propertyElt != nullptr && result == XPCFErrorCode::_SUCCESS) { - result = configureProperty(propertyElt,nodeElement); - propertyElt = propertyElt->NextSiblingElement("property"); - } - return result; -} - -XPCFErrorCode PropertyManager::configure(std::function xmlNodePredicate, const uuids::uuid & componentUUID, SRef componentRef,const char * filepath) -{ - //#1 load conf file - //#2 find first configuration child node - //#3 find matching component node - //#4 map parameter to inner parameter : NOTE : what happens if new param exists in file but not in implementation ? - XPCFErrorCode result = XPCFErrorCode::_SUCCESS; - tinyxml2::XMLDocument doc; - //TODO: filepath must be wrapped in an utf8 observer ! - enum tinyxml2::XMLError loadOkay = doc.LoadFile(filepath); - if (loadOkay == 0) { -#ifdef XPCF_WITH_LOGS - BOOST_LOG_SEV(m_logger, logging::trivial::info)<<"Parsing XML from "<FirstChildElement("configuration"); - tinyxml2::XMLElement * xmlPropsElt = rootElt->FirstChildElement("properties"); - if ((xmlConfigElt == nullptr) && (xmlPropsElt == nullptr)) { - return XPCFErrorCode::_SUCCESS; - } - if (xmlConfigElt != nullptr) { - tinyxml2::XMLElement * xmlComponentElt = xmlConfigElt->FirstChildElement("component"); - try { - try { - while (xmlComponentElt != nullptr && result == XPCFErrorCode::_SUCCESS) { - string uuid = xmlComponentElt->Attribute("uuid"); - if (xmlNodePredicate(xmlComponentElt)) { - if (toUUID(uuid) == componentUUID) { - result = configureElement(xmlComponentElt, componentRef->getPropertyRootNode()); - } - } - xmlComponentElt = xmlComponentElt->NextSiblingElement("component"); - } - } - catch (const xpcf::Exception & e) { - XmlErrorMessage errMsg("component", e.what(), true); - if(xmlComponentElt->Attribute("uuid") != nullptr) { - errMsg.addAttribute("uuid", xmlComponentElt->Attribute("uuid")); - } - if(xmlComponentElt->Attribute("name") != nullptr) { - errMsg.addAttribute("name", xmlComponentElt->Attribute("name")); - } - throw ConfigurationException(errMsg.write()); - } - catch (const std::runtime_error & e) { - string what = "UUID format invalid in \"uuid\": "; - what.append(xmlComponentElt->Attribute("uuid")); - XmlErrorMessage errMsg("component", what, false); - errMsg.addAttribute("name", xmlComponentElt->Attribute("name")); - throw ConfigurationException(errMsg.write()); - } - } - catch (const xpcf::Exception & e) { - XmlErrorMessage errMsg("configuration", e.what(), true); - throw ConfigurationException(errMsg.write()); - } - } - if (xmlPropsElt != nullptr) { - try { - tinyxml2::XMLElement * xmlConfigureElt = xmlPropsElt->FirstChildElement("configure"); - try { - while (xmlConfigureElt != nullptr && result == XPCFErrorCode::_SUCCESS) { - string componentAttrValue = xmlConfigureElt->Attribute("component"); - uuids::uuid uuid; - if (m_aliasManager->aliasExists(IAliasManager::Type::Component, componentAttrValue)) { - uuid = m_aliasManager->resolveComponentAlias(componentAttrValue); - } - else { - uuid = toUUID(componentAttrValue); - } - if (xmlNodePredicate(xmlConfigureElt)) { - if (uuid == componentUUID) { - result = configureElement(xmlConfigureElt, componentRef->getPropertyRootNode()); - } - } - xmlConfigureElt = xmlConfigureElt->NextSiblingElement("configure"); - } - } - catch (const xpcf::Exception & e) { - XmlErrorMessage errMsg("configure", e.what(), true); - errMsg.addAttribute("component", xmlConfigureElt->Attribute("component")); - throw ConfigurationException(errMsg.write()); - } - catch (const std::runtime_error & e) { - string what = "UUID format invalid in \"component\":"; - what.append(xmlConfigureElt->Attribute("component")); - XmlErrorMessage errMsg("configure", what, false); - throw ConfigurationException(errMsg.write()); - } - } - catch (const std::runtime_error & e) { - XmlErrorMessage errMsg("properties", e.what(), true); - throw ConfigurationException(errMsg.write()); - } - } - } - return result; -} - -XPCFErrorCode PropertyManager::configure(const uuids::uuid & componentUUID, SRef componentRef, const char * filepath) -{ - std::function unnamedPredicate = [](tinyxml2::XMLElement * element) { - const char * name = element->Attribute("name"); - if (name == nullptr) { - return true; - } - return false; - }; - - return configure(unnamedPredicate, componentUUID, componentRef, filepath); -} - -XPCFErrorCode PropertyManager::configure(const char * instanceName, const uuids::uuid & componentUUID, SRef componentRef,const char * filepath) -{ - //#1 load conf file - //#2 find first configuration child node - //#3 find matching component node - //#4 map parameter to inner parameter : NOTE : what happens if new param exists in file but not in implementation ? - if (instanceName == nullptr) { - return XPCFErrorCode::_ERROR_INVALID_ARGUMENT; - } - - // NOTE : here we capture a const char pointer as the calling scope of the predicate is inside a function called within the method - // Otherwise, we should have made a copy of the string to distinguish the string lifecycle from the pointer lifecycle - std::function namedPredicate = [instanceName](tinyxml2::XMLElement * element) { - const char * name = element->Attribute("name"); - if (name != nullptr) { - if (!strcmp(name, instanceName)) { - return true; - } - } - return false; - }; - - return configure(namedPredicate, componentUUID, componentRef, filepath); -} - -void serializeParameter(tinyxml2::XMLDocument & xmlDoc, tinyxml2::XMLElement * nodeElement,SRef p) -{ - std::cout<<"Property name ="<getName()<SetAttribute("name", p->getName()); - xmlPropertyElt->SetAttribute("access", propertyAccessToStrMap[p->getAccessSpecifier()].c_str()); - xmlPropertyElt->SetAttribute("type", propertyTypeToStrMap[p->getType()].c_str()); - for (uint32_t i=0 ; i < p->size() ; i++ ) { - if (p->getType() == xpcf::IProperty::IProperty_STRUCTURE) { - SRef propertyMap = p->getStructureValue(i); - std::cout<<"Accessing class values for C0 from IProperty/IPropertyMap interfaces"<getProperties()) { - serializeParameter(xmlDoc, xmlPropertyElt, property); - } - } - else { - std::string value; - switch (p->getType()) { - case xpcf::IProperty::IProperty_NONE : - break; - case xpcf::IProperty::IProperty_INTEGER : - value = to_string(p->getIntegerValue(i)); - break; - case xpcf::IProperty::IProperty_UINTEGER : - value = to_string(p->getUnsignedIntegerValue(i)); - break; - case xpcf::IProperty::IProperty_LONG : - value = to_string(p->getLongValue(i)); - break; - case xpcf::IProperty::IProperty_ULONG : - value = to_string(p->getUnsignedLongValue(i)); - break; - case xpcf::IProperty::IProperty_CHARSTR : - value = p->getStringValue(i); - break; - case xpcf::IProperty::IProperty_UNICODESTR : - break; - case xpcf::IProperty::IProperty_FLOAT : - value = to_string(p->getFloatingValue(i)); - break; - case xpcf::IProperty::IProperty_DOUBLE : - value = to_string(p->getDoubleValue(i)); - break; - default: - break; - } - if (p->size() == 1) { - xmlPropertyElt->SetAttribute("value",value.c_str()); - } - else { - tinyxml2::XMLElement * xmlValueElt = xmlDoc.NewElement("value"); - xmlValueElt->SetText(value.c_str()); - xmlPropertyElt->InsertEndChild(xmlValueElt); - } - } - } - nodeElement->InsertEndChild(xmlPropertyElt); -} - -XPCFErrorCode PropertyManager::serialize(const uuids::uuid & componentUUID, SRef componentRef, const char * filepath, uint32_t ) -{ - - XPCFErrorCode result = XPCFErrorCode::_SUCCESS; - tinyxml2::XMLDocument xmlDoc; - // root node creation will occur only for non existing files, otherwise the root node will be loaded and elements for the module will be inserted in the xml tree - tinyxml2::XMLNode * xmlRoot; - enum tinyxml2::XMLError loadOkay = xmlDoc.LoadFile(filepath); - if (loadOkay == 0) { - xmlRoot = xmlDoc.RootElement(); - } - else { - std::cout<<"ModuleManager::saveModuleInformations ===> failed loading doc "<SetAttribute("component", uuids::to_string(componentUUID).c_str()); - for (auto property : componentRef->getProperties()) { - serializeParameter(xmlDoc, xmlComponentElt, property); - } - xmlConfigurationElt->InsertEndChild(xmlComponentElt); - xmlRoot->InsertEndChild(xmlConfigurationElt); - tinyxml2::XMLError eResult = xmlDoc.SaveFile(filepath); - if (eResult != 0) { - result = XPCFErrorCode::_FAIL; - } - } - catch (const xpcf::Exception & e) { - return e.getErrorCode(); - } - catch (const std::runtime_error & e) { -#ifdef XPCF_WITH_LOGS - BOOST_LOG_SEV(m_logger, logging::trivial::info)<<"XML parsing file "< getPropertyMapInstance() { - return utils::make_shared(); -} - -PropertyMap::PropertyMap () -{ -} - - -PropertyMap::~PropertyMap () -{ -} - -XPCFErrorCode PropertyMap::addProperty (SRef p) -{ - if (m_propertyMap.find(p->getName()) != m_propertyMap.end()) { - return XPCFErrorCode::_FAIL; - } - /* - SRef lp= utils::make_shared(); - p->copyTo(lp); - m_propertyMap[lp->getName()] = lp;*/ - m_propertyMap[p->getName()] = p; - m_collectionPropertyMap.add(p); - return XPCFErrorCode::_SUCCESS; -} - -/* WHY MAKE A COPY ?? -SRef PropertyMap::cloneProperty (const char *name) -{ - - if (!p) - { - //throw XPCF_NullObject(); - } - - if (m_propertyMap.find(name) == m_propertyMap.end()) { - return XPCFErrorCode::_ERROR_UNKWOWN; - } - - m_propertyMap.at(name)->copyTo(p); - - return XPCFErrorCode::_SUCCESS; -}*/ - -// -// removed when invalidated -// collection should maintain enumerators to invalidate them ? -// collection invalidation ?? -// collection invalidation means collection clearance i.e. size = 0 -// enumerator invalidation means collection size != initial sequence size -// getprop must : -// - create the collection when it doesn't exist first -// - maintain the collection when it is not modified -// - remove the collection and invalidate the enumerators when a modification occured in properties - - -IEnumerable> & PropertyMap::getProperties() -{ - return m_collectionPropertyMap; -} - -const SRef PropertyMap::at (const char *name) -{ - - if (m_propertyMap.find(name) == m_propertyMap.end()) { - return nullptr; - } - - return m_propertyMap.at(name); -} - -XPCFErrorCode PropertyMap::setProperty (const SRef p) -{ - - if (!p) { - throw std::invalid_argument("Argument 'p' doesn't reference an IProperty. This SRef is empty."); - } - - std::string name(p->getName()); - if (m_propertyMap.find(name) == m_propertyMap.end()) { - throw std::invalid_argument("No property named " + name + " exists in this IPropertyMap."); - } - - SRef tmp = m_propertyMap.at(name); - if ( tmp->getAccessSpecifier() == IProperty::IProperty_OUT) { - throw AccessDeniedException(); - } - - if ( tmp->size() != p->size()) { - throw std::invalid_argument("Argument property size differs from inner property size."); - } - - if ( tmp->getType() != p->getType()) { - throw std::invalid_argument("Argument property type differs from inner property type."); - } - - p->copyTo(tmp); - - return XPCFErrorCode::_SUCCESS; -} - -XPCFErrorCode PropertyMap::wrapInteger(const char * name, int32_t & wrappedValue, IProperty::AccessSpecifier iotype) -{ - return wrap::type>(name, wrappedValue, iotype); -} - -XPCFErrorCode PropertyMap::wrapUnsignedInteger(const char * name, uint32_t & wrappedValue, IProperty::AccessSpecifier iotype) -{ - return wrap::type>(name, wrappedValue, iotype); -} - -XPCFErrorCode PropertyMap::wrapLong(const char * name, int64_t & wrappedValue, IProperty::AccessSpecifier iotype) -{ - return wrap::type>(name, wrappedValue, iotype); -} - -XPCFErrorCode PropertyMap::wrapUnsignedLong(const char * name, uint64_t & wrappedValue, IProperty::AccessSpecifier iotype) -{ - return wrap::type>(name, wrappedValue, iotype); -} - -XPCFErrorCode PropertyMap::wrapFloat(const char * name, float & wrappedValue, IProperty::AccessSpecifier iotype) -{ - return wrap::type>(name, wrappedValue, iotype); -} - -XPCFErrorCode PropertyMap::wrapDouble(const char * name, double & wrappedValue, IProperty::AccessSpecifier iotype) -{ - return wrap::type>(name, wrappedValue, iotype); -} - -XPCFErrorCode PropertyMap::wrapString(const char * name, std::string & wrappedValue, IProperty::AccessSpecifier iotype) -{ - return wrap(name, wrappedValue, iotype); -} - -XPCFErrorCode PropertyMap::wrapUnicodeString(const char * name, std::wstring & wrappedValue, IProperty::AccessSpecifier iotype) -{ - return wrap(name, wrappedValue, iotype); -} - -XPCFErrorCode PropertyMap::wrapStructure(const char * name, SRef & wrappedValue, IProperty::AccessSpecifier iotype) -{ - return wrap::type>(name, wrappedValue, iotype); -} - -XPCFErrorCode PropertyMap::wrapIntegerVector(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype) -{ - return wrap::type::value_type>(name, wrappedValue, iotype); -} - -XPCFErrorCode PropertyMap::wrapUnsignedIntegerVector(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype) -{ - return wrap::type::value_type>(name, wrappedValue, iotype); -} - -XPCFErrorCode PropertyMap::wrapLongVector(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype) -{ - return wrap::type::value_type>(name, wrappedValue, iotype); -} - -XPCFErrorCode PropertyMap::wrapUnsignedLongVector(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype) -{ - return wrap::type::value_type>(name, wrappedValue, iotype); -} - -XPCFErrorCode PropertyMap::wrapFloatVector(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype) -{ - return wrap::type::value_type>(name, wrappedValue, iotype); -} - -XPCFErrorCode PropertyMap::wrapDoubleVector(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype) -{ - return wrap::type::value_type>(name, wrappedValue, iotype); -} - -XPCFErrorCode PropertyMap::wrapStringVector(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype) -{ - return wrap(name, wrappedValue, iotype); -} - -XPCFErrorCode PropertyMap::wrapUnicodeStringVector(const char * name, std::vector & wrappedValue, IProperty::AccessSpecifier iotype) -{ - return wrap(name, wrappedValue, iotype); -} - -XPCFErrorCode PropertyMap::wrapStructureVector(const char * name, std::vector> & wrappedValue, IProperty::AccessSpecifier iotype) -{ - return wrap::type::value_type>(name, wrappedValue, iotype); -} - -SRef PropertyMap::CreateInstance () -{ - SRef rips = utils::make_shared(); - return rips; -} - -PropertyMap * PropertyMap::CreateConcreteInstance () -{ - PropertyMap* rips=new PropertyMap(); - return rips; -} - -}}} diff --git a/src/Registry.cpp b/src/Registry.cpp deleted file mode 100644 index 990b3ec..0000000 --- a/src/Registry.cpp +++ /dev/null @@ -1,428 +0,0 @@ -/** - * @copyright Copyright (c) 2019 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2019-06-05 - */ - -#include "xpcf/api/IConfigurable.h" -#include "private/xpcf/ModuleManager.h" -#include "private/xpcf/Registry.h" -#include "xpcf/component/ComponentFactory.h" -#include "xpcf/core/ErrorMessage.h" -#include "xpcf/core/Exception.h" -#include "xpcf/core/helpers.h" -#include "private/xpcf/PathBuilder.h" - - - -#include -#include - -using namespace std; -using std::placeholders::_1; - -//namespace logging = boost::log; - -#include -#include -namespace fs = boost::filesystem; - - -XPCF_DEFINE_FACTORY_CREATE_INSTANCE(org::bcom::xpcf::Registry); - -namespace org { namespace bcom { namespace xpcf { - - -void RegistryContext::clear() -{ - modulesVector.clear(); - interfacesVector.clear(); - componentModuleUUIDMap.clear(); - interfacesMap.clear(); - modulesMap.clear(); -} - -Registry::Registry():ComponentBase (toUUID()) -{ - m_context = utils::make_shared(); - declareInterface(this); - declareInterface(this); - declareInjectable(m_aliasManager); -} - -uuids::uuid Registry::getModuleUUID(const uuids::uuid & componentUUID) const -{ - if (! mapContains(m_context->componentModuleUUIDMap,componentUUID)) { - throw ModuleNotFoundException("No module UUID found for component "+uuids::to_string(componentUUID)); - } - return m_context->componentModuleUUIDMap.at(componentUUID); -} - -void Registry::clear() -{ - m_context->clear(); - m_libraryLoaded = false; -} - -XPCFErrorCode Registry::loadModuleMetadata(const char * moduleName, - const char * moduleFilePath) -{ - SRef moduleInfos = getModuleManagerInstance()->introspectModule(moduleName, moduleFilePath); - declareModuleMetadata(moduleInfos); - return XPCFErrorCode::_SUCCESS; -} - -template XPCFErrorCode Registry::loadModules(fs::path folderPath) -{ - //TODO : what strategy to report error of load for a dedicated file but load others ? - XPCFErrorCode result = XPCFErrorCode::_SUCCESS; - static_assert(std::is_same::value || std::is_same::value, - "Type passed to ComponentManager::load is neither a directory_iterator nor a recursive_directory_iterator"); - for (fs::directory_entry& x : T(folderPath)) { - if (PathBuilder::is_shared_library(x.path())) { - fs::path modulePath = x.path().parent_path(); - fs::path moduleName = x.path().filename(); - fs::detail::utf8_codecvt_facet utf8; - result = loadModuleMetadata(moduleName.string(utf8).c_str(),modulePath.string(utf8).c_str()); - } - } - return result; -} - -XPCFErrorCode Registry::loadModules(const char * folderPathStr, bool bRecurse) -{ - if (folderPathStr == nullptr) { - return XPCFErrorCode::_ERROR_NULL_POINTER; - } - - fs::path folderPath = PathBuilder::buildModuleFolderPath(folderPathStr); - - if ( ! fs::exists(folderPath)) { - return XPCFErrorCode::_FAIL; - } - - if ( !fs::is_directory(folderPath)) { - return XPCFErrorCode::_FAIL; - } - XPCFErrorCode result = XPCFErrorCode::_SUCCESS; - - if (bRecurse) { - result = loadModules(folderPath); - } - else { - result = loadModules(folderPath); - } - return result; -} - -SRef Registry::getContext() const -{ - return m_context; -} - -void Registry::setContext(SRef context) -{ - m_context = context; -} - - -template -SPtr findMetadata(const uuids::uuid & elementUUID, const std::map> & elementMap) -{ - SPtr result; - if (elementMap.find(elementUUID) != elementMap.end()) { - result = elementMap.at(elementUUID); - } - return result; -} - -template -struct inferException -{ -}; - -template<> -struct inferException -{ - typedef ComponentNotFoundException InnerType; -}; - -template<> -struct inferException -{ - typedef ModuleNotFoundException InnerType; -}; - -template ::InnerType> -SPtr safeFindMetadata(const uuids::uuid& elementUUID, const std::map> & elementMap) -{ - SPtr result = findMetadata(elementUUID, elementMap); - if (!result) { - throw E(elementUUID); - } - return result; -} - -bool isXpcfFrameworkInterface(const uuids::uuid & interfaceUUID) -{ - return (interfaceUUID == toUUID()) || (interfaceUUID == toUUID()) || (interfaceUUID == toUUID()); -} - -// Given a UUID, we return a ComponentMetadata -// if no component is found with the UUID -// a NULL smart pointer is returned. -// - -SPtr Registry::findModuleMetadata(const uuids::uuid & moduleUUID) const -{ - return safeFindMetadata(moduleUUID, m_context->modulesMap); -} - -SPtr Registry::findComponentMetadata(const uuids::uuid & componentUUID) const -{ - SPtr moduleInfo = findModuleMetadata(getModuleUUID(componentUUID)); - return moduleInfo->getComponentMetadata(componentUUID); -} - -SPtr Registry::findInterfaceMetadata(const uuids::uuid& interfaceUUID) const -{ - return findMetadata(interfaceUUID, m_context->interfacesMap); -} - -// add metadata if not already present, otherwise does nothing -template -void addMetadata(SPtr metadata, Collection,std::vector> & targetContainer, std::map> & elementMap) -{ - if (! metadata) { - throw NullPointerException(); - } - - SPtr classExist = findMetadata(metadata->getUUID(), elementMap); - if (!classExist) { - targetContainer.add(metadata); - elementMap[metadata->getUUID()] = metadata; - } -} - -void Registry::addModuleMetadata(SPtr metadata) -{ - addMetadata(metadata, m_context->modulesVector, m_context->modulesMap); -} - -void Registry::addInterfaceMetadata(SPtr metadata) -{ - addMetadata(metadata, m_context->interfacesVector, m_context->interfacesMap); -} - -void Registry::declareModuleMetadata(SPtr moduleInfos) -{ - addModuleMetadata(moduleInfos); - for (SRef componentInfo : moduleInfos->getComponentsMetadata()) { - if (! mapContains(m_context->componentModuleUUIDMap, componentInfo->getUUID()) ) { - m_context->componentModuleUUIDMap[componentInfo->getUUID()] = moduleInfos->getUUID(); - } - if (m_autoAlias) { - if (!m_aliasManager->aliasExists(IAliasManager::Type::Component, componentInfo->name())) { - m_aliasManager->declareAlias(IAliasManager::Type::Component, componentInfo->name(), componentInfo->getUUID()); - } - } - std::vector> interfaceVector; - SRef rIntrospect = getModuleManagerInstance()->createComponent(moduleInfos, componentInfo->getUUID()); - for (uuids::uuid interfaceUUID : rIntrospect->getInterfaces()) { - autobind(interfaceUUID,componentInfo->getUUID()); - SRef interfaceInfo = utils::make_shared(rIntrospect->getMetadata(interfaceUUID)); - if (m_autoAlias) { - if (!m_aliasManager->aliasExists(IAliasManager::Type::Interface, interfaceInfo->name())) { - m_aliasManager->declareAlias(IAliasManager::Type::Interface, interfaceInfo->name(), interfaceInfo->getUUID()); - } - } - componentInfo->addInterface(interfaceInfo->getUUID()); - addInterfaceMetadata(interfaceInfo); - } - } -} - -void Registry::declareInterfaceNode(SRef componentInfo, tinyxml2::XMLElement *interfaceElt) -{ - string interfaceUuidStr = ""; - string interfaceName = ""; - try { - SPtr interfaceInfo; - if(interfaceElt->Attribute("uuid") != nullptr) { - interfaceUuidStr = interfaceElt->Attribute("uuid"); - } - if(interfaceElt->Attribute("name") != nullptr) { - interfaceName = interfaceElt->Attribute("name"); - } - uuids::uuid interfaceUuid; - try { - interfaceUuid = toUUID(interfaceUuidStr); - } - catch(const std::runtime_error & e) { - std::string what = "UUID format invalid in \"uuid\" attribute: "; - what.append(interfaceElt->Attribute("uuid")); - throw ConfigurationException(what); - } - componentInfo->addInterface(interfaceUuid); - autobind(interfaceUuid,componentInfo->getUUID()); - if (! mapContains(m_context->interfacesMap,interfaceUuid)) { - string interfaceDescription = interfaceElt->Attribute("description"); - if (m_autoAlias) { - if (!m_aliasManager->aliasExists(IAliasManager::Type::Interface, interfaceName)) { - m_aliasManager->declareAlias(IAliasManager::Type::Interface, interfaceName, interfaceUuid); - } - } - interfaceInfo = utils::make_shared(interfaceName.c_str(), interfaceUuid, interfaceDescription.c_str()); - addInterfaceMetadata(interfaceInfo); - } - } - catch (const xpcf::Exception& e) { - XmlErrorMessage errMsg("interface", e.what(), false); - if(!interfaceUuidStr.empty()) { - errMsg.addAttribute("uuid", interfaceUuidStr); - } - if(!interfaceName.empty()) { - errMsg.addAttribute("name", interfaceName); - } - throw ConfigurationException(errMsg.write()); - } -} - -void Registry::declareComponent(SRef moduleInfo, tinyxml2::XMLElement *componentElt) -{ - string componentUuidStr = ""; - string componentName = ""; - bool subElementError = false; - try { - if(componentElt->Attribute("uuid") != nullptr) { - componentUuidStr = componentElt->Attribute("uuid"); - } - if(componentElt->Attribute("name") != nullptr) { - componentName = componentElt->Attribute("name"); - } - uuids::uuid componentUuid; - try { - componentUuid = toUUID(componentUuidStr); - subElementError = true; - } - catch(const std::runtime_error&) { - std::string what = "UUID format invalid in \"uuid\": "; - what.append(componentElt->Attribute("uuid")); - throw ConfigurationException(what); - } - if (! mapContains(m_context->componentModuleUUIDMap,componentUuid)) { - m_context->componentModuleUUIDMap[componentUuid] = moduleInfo->getUUID(); - string description = componentElt->Attribute("description"); - SPtr componentInfo = utils::make_shared(componentName.c_str(), componentUuid, description.c_str()); - if (m_autoAlias) { - if (!m_aliasManager->aliasExists(IAliasManager::Type::Component, componentName)) { - m_aliasManager->declareAlias(IAliasManager::Type::Component, componentName, componentUuid); - } - } - moduleInfo->addComponent(componentInfo); - tinyxml2::XMLElement *interfaceElt = componentElt->FirstChildElement("interface"); - while (interfaceElt != nullptr) { - //TODO : check the same IF doesn't appear twice in the vector !! ??? - declareInterfaceNode(componentInfo, interfaceElt); - interfaceElt = interfaceElt->NextSiblingElement("interface"); - } - } - } - catch (const xpcf::Exception& e) { - XmlErrorMessage errMsg("component", e.what(), subElementError); - if(!componentUuidStr.empty()) { - errMsg.addAttribute("uuid", componentUuidStr); - } - if(!componentName.empty()) { - errMsg.addAttribute("name", componentName); - } - throw ConfigurationException(errMsg.write()); - } -} - -void Registry::declareModule(tinyxml2::XMLElement * xmlModuleElt) -{ - std::string moduleName = ""; - std::string moduleUuidStr = ""; - bool subElementError = false; - try { - SPtr moduleInfo; - if(xmlModuleElt->Attribute("name")!= nullptr) { - moduleName = xmlModuleElt->Attribute("name"); - } - std::string moduleDescription = ""; - if (xmlModuleElt->Attribute("description") != nullptr) { - moduleDescription = xmlModuleElt->Attribute("description"); - } - uuids::uuid moduleUuid; - if(xmlModuleElt->Attribute("uuid")!=nullptr) { - moduleUuidStr = xmlModuleElt->Attribute("uuid"); - } - try { - moduleUuid = toUUID(moduleUuidStr); - subElementError = true; - } - catch(const std::runtime_error &) { - std::string what = "UUID format invalid in \"uuid\": "; - what.append(xmlModuleElt->Attribute("uuid")); - throw ConfigurationException( what ); - } - moduleInfo = utils::make_shared(moduleName.c_str(), moduleUuid, moduleDescription.c_str(), xmlModuleElt->Attribute("path")); - fs::path filePath = moduleInfo->getFullPath(); - // TODO : check lib existenz with file decorations - /* if ( !boost::filesystem::exists( filePath ) ) - { - std::cout<<"Error : Module not found at : "<modulesMap, moduleUuid)) { - addModuleMetadata(moduleInfo); - } - // Add components to module even if there was a previous module declaration - // Some components can be added later from another configuration - tinyxml2::XMLElement *componentElt = xmlModuleElt->FirstChildElement("component"); - while (componentElt != nullptr) { - declareComponent(moduleInfo , componentElt); - componentElt = componentElt->NextSiblingElement("component"); - } - } - catch (const xpcf::Exception& e) { - XmlErrorMessage errMsg("module", e.what(), subElementError); - if(!moduleUuidStr.empty()) { - errMsg.addAttribute("uuid", moduleUuidStr); - } - if(!moduleName.empty()) { - errMsg.addAttribute("name", moduleName); - } - throw ConfigurationException(errMsg.write()); - } -} - -const IEnumerable> & Registry::getModulesMetadata() const -{ - return m_context->modulesVector; -} - -const IEnumerable> & Registry::getInterfacesMetadata() const -{ - return m_context->interfacesVector; -} - -}}} //namespace org::bcom::xpcf diff --git a/src/tinyxml2.cpp b/src/tinyxml2.cpp index 935a648..a497709 100644 --- a/src/tinyxml2.cpp +++ b/src/tinyxml2.cpp @@ -21,10 +21,10 @@ must not be misrepresented as being the original software. distribution. */ -#include "interfaces/private/xpcf/tinyxml2.h" +#include "tinyxml2.h" #include // yes, this one new style header, is in the Android SDK. -#if defined(ANDROID_NDK) || defined(__BORLANDC__) || defined(__QNXNTO__) +#if defined(ANDROID_NDK) || defined(__QNXNTO__) # include # include #else @@ -45,14 +45,14 @@ distribution. { va_list va; va_start( va, format ); - const int result = vsnprintf_s( buffer, size, _TRUNCATE, format, va ); + int result = vsnprintf_s( buffer, size, _TRUNCATE, format, va ); va_end( va ); return result; } static inline int TIXML_VSNPRINTF( char* buffer, size_t size, const char* format, va_list va ) { - const int result = vsnprintf_s( buffer, size, _TRUNCATE, format, va ); + int result = vsnprintf_s( buffer, size, _TRUNCATE, format, va ); return result; } @@ -100,32 +100,10 @@ distribution. #define TIXML_SSCANF sscanf #endif -#if defined(_WIN64) - #define TIXML_FSEEK _fseeki64 - #define TIXML_FTELL _ftelli64 -#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || (__CYGWIN__) - #define TIXML_FSEEK fseeko - #define TIXML_FTELL ftello -#elif defined(__ANDROID__) - #if __ANDROID_API__ > 24 - #define TIXML_FSEEK fseeko64 - #define TIXML_FTELL ftello64 - #else - #define TIXML_FSEEK fseeko - #define TIXML_FTELL ftello - #endif -#elif defined(__unix__) && defined(__x86_64__) - #define TIXML_FSEEK fseeko64 - #define TIXML_FTELL ftello64 -#else - #define TIXML_FSEEK fseek - #define TIXML_FTELL ftell -#endif - -static const char LINE_FEED = static_cast(0x0a); // all line endings are normalized to LF +static const char LINE_FEED = (char)0x0a; // all line endings are normalized to LF static const char LF = LINE_FEED; -static const char CARRIAGE_RETURN = static_cast(0x0d); // CR gets filtered out +static const char CARRIAGE_RETURN = (char)0x0d; // CR gets filtered out static const char CR = CARRIAGE_RETURN; static const char SINGLE_QUOTE = '\''; static const char DOUBLE_QUOTE = '\"'; @@ -171,7 +149,6 @@ void StrPair::TransferTo( StrPair* other ) // This in effect implements the assignment operator by "moving" // ownership (as in auto_ptr). - TIXMLASSERT( other != 0 ); TIXMLASSERT( other->_flags == 0 ); TIXMLASSERT( other->_start == 0 ); TIXMLASSERT( other->_end == 0 ); @@ -187,7 +164,6 @@ void StrPair::TransferTo( StrPair* other ) _end = 0; } - void StrPair::Reset() { if ( _flags & NEEDS_DELETE ) { @@ -212,14 +188,12 @@ void StrPair::SetStr( const char* str, int flags ) } -char* StrPair::ParseText( char* p, const char* endTag, int strFlags, int* curLineNumPtr ) +char* StrPair::ParseText( char* p, const char* endTag, int strFlags ) { - TIXMLASSERT( p ); TIXMLASSERT( endTag && *endTag ); - TIXMLASSERT(curLineNumPtr); char* start = p; - const char endChar = *endTag; + char endChar = *endTag; size_t length = strlen( endTag ); // Inner loop of text parsing. @@ -227,11 +201,8 @@ char* StrPair::ParseText( char* p, const char* endTag, int strFlags, int* curLin if ( *p == endChar && strncmp( p, endTag, length ) == 0 ) { Set( start, p, strFlags ); return p + length; - } else if (*p == '\n') { - ++(*curLineNumPtr); } ++p; - TIXMLASSERT( p ); } return 0; } @@ -242,13 +213,13 @@ char* StrPair::ParseName( char* p ) if ( !p || !(*p) ) { return 0; } - if ( !XMLUtil::IsNameStartChar( (unsigned char) *p ) ) { + if ( !XMLUtil::IsNameStartChar( *p ) ) { return 0; } char* const start = p; ++p; - while ( *p && XMLUtil::IsNameChar( (unsigned char) *p ) ) { + while ( *p && XMLUtil::IsNameChar( *p ) ) { ++p; } @@ -262,15 +233,15 @@ void StrPair::CollapseWhitespace() // Adjusting _start would cause undefined behavior on delete[] TIXMLASSERT( ( _flags & NEEDS_DELETE ) == 0 ); // Trim leading space. - _start = XMLUtil::SkipWhiteSpace( _start, 0 ); + _start = XMLUtil::SkipWhiteSpace( _start ); if ( *_start ) { - const char* p = _start; // the read pointer + char* p = _start; // the read pointer char* q = _start; // the write pointer while( *p ) { if ( XMLUtil::IsWhiteSpace( *p )) { - p = XMLUtil::SkipWhiteSpace( p, 0 ); + p = XMLUtil::SkipWhiteSpace( p ); if ( *p == 0 ) { break; // don't write to q; this trims the trailing space. } @@ -295,7 +266,7 @@ const char* StrPair::GetStr() _flags ^= NEEDS_FLUSH; if ( _flags ) { - const char* p = _start; // the read pointer + char* p = _start; // the read pointer char* q = _start; // the write pointer while( p < _end ) { @@ -309,8 +280,7 @@ const char* StrPair::GetStr() else { ++p; } - *q = LF; - ++q; + *q++ = LF; } else if ( (_flags & NEEDS_NEWLINE_NORMALIZATION) && *p == LF ) { if ( *(p+1) == CR ) { @@ -319,8 +289,7 @@ const char* StrPair::GetStr() else { ++p; } - *q = LF; - ++q; + *q++ = LF; } else if ( (_flags & NEEDS_ENTITY_PROCESSING) && *p == '&' ) { // Entities handled by tinyXML2: @@ -332,7 +301,7 @@ const char* StrPair::GetStr() const int buflen = 10; char buf[buflen] = { 0 }; int len = 0; - const char* adjusted = const_cast( XMLUtil::GetCharacterRef( p, buf, &len ) ); + char* adjusted = const_cast( XMLUtil::GetCharacterRef( p, buf, &len ) ); if ( adjusted == 0 ) { *q = *p; ++p; @@ -391,19 +360,6 @@ const char* StrPair::GetStr() // --------- XMLUtil ----------- // -const char* XMLUtil::writeBoolTrue = "true"; -const char* XMLUtil::writeBoolFalse = "false"; - -void XMLUtil::SetBoolSerialization(const char* writeTrue, const char* writeFalse) -{ - static const char* defTrue = "true"; - static const char* defFalse = "false"; - - writeBoolTrue = (writeTrue) ? writeTrue : defTrue; - writeBoolFalse = (writeFalse) ? writeFalse : defFalse; -} - - const char* XMLUtil::ReadBOM( const char* p, bool* bom ) { TIXMLASSERT( p ); @@ -447,27 +403,23 @@ void XMLUtil::ConvertUTF32ToUTF8( unsigned long input, char* output, int* length output += *length; - // Scary scary fall throughs are annotated with carefully designed comments - // to suppress compiler warnings such as -Wimplicit-fallthrough in gcc + // Scary scary fall throughs. switch (*length) { case 4: --output; - *output = static_cast((input | BYTE_MARK) & BYTE_MASK); + *output = (char)((input | BYTE_MARK) & BYTE_MASK); input >>= 6; - //fall through case 3: --output; - *output = static_cast((input | BYTE_MARK) & BYTE_MASK); + *output = (char)((input | BYTE_MARK) & BYTE_MASK); input >>= 6; - //fall through case 2: --output; - *output = static_cast((input | BYTE_MARK) & BYTE_MASK); + *output = (char)((input | BYTE_MARK) & BYTE_MASK); input >>= 6; - //fall through case 1: --output; - *output = static_cast(input | FIRST_BYTE_MARK[*length]); + *output = (char)(input | FIRST_BYTE_MARK[*length]); break; default: TIXMLASSERT( false ); @@ -519,7 +471,7 @@ const char* XMLUtil::GetCharacterRef( const char* p, char* value, int* length ) else { return 0; } - TIXMLASSERT( digit < 16 ); + TIXMLASSERT( digit >= 0 && digit < 16); TIXMLASSERT( digit == 0 || mult <= UINT_MAX / digit ); const unsigned int digitScaled = mult * digit; TIXMLASSERT( ucs <= ULONG_MAX - digitScaled ); @@ -549,7 +501,7 @@ const char* XMLUtil::GetCharacterRef( const char* p, char* value, int* length ) while ( *q != '#' ) { if ( *q >= '0' && *q <= '9' ) { const unsigned int digit = *q - '0'; - TIXMLASSERT( digit < 10 ); + TIXMLASSERT( digit >= 0 && digit < 10); TIXMLASSERT( digit == 0 || mult <= UINT_MAX / digit ); const unsigned int digitScaled = mult * digit; TIXMLASSERT( ucs <= ULONG_MAX - digitScaled ); @@ -585,7 +537,7 @@ void XMLUtil::ToStr( unsigned v, char* buffer, int bufferSize ) void XMLUtil::ToStr( bool v, char* buffer, int bufferSize ) { - TIXML_SNPRINTF( buffer, bufferSize, "%s", v ? writeBoolTrue : writeBoolFalse); + TIXML_SNPRINTF( buffer, bufferSize, "%d", v ? 1 : 0 ); } /* @@ -604,38 +556,17 @@ void XMLUtil::ToStr( double v, char* buffer, int bufferSize ) } -void XMLUtil::ToStr( int64_t v, char* buffer, int bufferSize ) -{ - // horrible syntax trick to make the compiler happy about %lld - TIXML_SNPRINTF(buffer, bufferSize, "%lld", static_cast(v)); -} - -void XMLUtil::ToStr( uint64_t v, char* buffer, int bufferSize ) -{ - // horrible syntax trick to make the compiler happy about %llu - TIXML_SNPRINTF(buffer, bufferSize, "%llu", (long long)v); -} - -bool XMLUtil::ToInt(const char* str, int* value) +bool XMLUtil::ToInt( const char* str, int* value ) { - if (IsPrefixHex(str)) { - unsigned v; - if (TIXML_SSCANF(str, "%x", &v) == 1) { - *value = static_cast(v); - return true; - } - } - else { - if (TIXML_SSCANF(str, "%d", value) == 1) { - return true; - } + if ( TIXML_SSCANF( str, "%d", value ) == 1 ) { + return true; } return false; } -bool XMLUtil::ToUnsigned(const char* str, unsigned* value) +bool XMLUtil::ToUnsigned( const char* str, unsigned *value ) { - if (TIXML_SSCANF(str, IsPrefixHex(str) ? "%x" : "%u", value) == 1) { + if ( TIXML_SSCANF( str, "%u", value ) == 1 ) { return true; } return false; @@ -648,20 +579,13 @@ bool XMLUtil::ToBool( const char* str, bool* value ) *value = (ival==0) ? false : true; return true; } - static const char* TRUE_VALS[] = { "true", "True", "TRUE", 0 }; - static const char* FALSE_VALS[] = { "false", "False", "FALSE", 0 }; - - for (int i = 0; TRUE_VALS[i]; ++i) { - if (StringEqual(str, TRUE_VALS[i])) { - *value = true; - return true; - } + if ( StringEqual( str, "true" ) ) { + *value = true; + return true; } - for (int i = 0; FALSE_VALS[i]; ++i) { - if (StringEqual(str, FALSE_VALS[i])) { - *value = false; - return true; - } + else if ( StringEqual( str, "false" ) ) { + *value = false; + return true; } return false; } @@ -675,7 +599,6 @@ bool XMLUtil::ToFloat( const char* str, float* value ) return false; } - bool XMLUtil::ToDouble( const char* str, double* value ) { if ( TIXML_SSCANF( str, "%lf", value ) == 1 ) { @@ -685,43 +608,12 @@ bool XMLUtil::ToDouble( const char* str, double* value ) } -bool XMLUtil::ToInt64(const char* str, int64_t* value) -{ - if (IsPrefixHex(str)) { - unsigned long long v = 0; // horrible syntax trick to make the compiler happy about %llx - if (TIXML_SSCANF(str, "%llx", &v) == 1) { - *value = static_cast(v); - return true; - } - } - else { - long long v = 0; // horrible syntax trick to make the compiler happy about %lld - if (TIXML_SSCANF(str, "%lld", &v) == 1) { - *value = static_cast(v); - return true; - } - } - return false; -} - - -bool XMLUtil::ToUnsigned64(const char* str, uint64_t* value) { - unsigned long long v = 0; // horrible syntax trick to make the compiler happy about %llu - if(TIXML_SSCANF(str, IsPrefixHex(str) ? "%llx" : "%llu", &v) == 1) { - *value = (uint64_t)v; - return true; - } - return false; -} - - char* XMLDocument::Identify( char* p, XMLNode** node ) { TIXMLASSERT( node ); TIXMLASSERT( p ); char* const start = p; - int const startLine = _parseCurLineNum; - p = XMLUtil::SkipWhiteSpace( p, &_parseCurLineNum ); + p = XMLUtil::SkipWhiteSpace( p ); if( !*p ) { *node = 0; TIXMLASSERT( p ); @@ -745,37 +637,42 @@ char* XMLDocument::Identify( char* p, XMLNode** node ) TIXMLASSERT( sizeof( XMLComment ) == sizeof( XMLDeclaration ) ); // use same memory pool XMLNode* returnNode = 0; if ( XMLUtil::StringEqual( p, xmlHeader, xmlHeaderLen ) ) { - returnNode = CreateUnlinkedNode( _commentPool ); - returnNode->_parseLineNum = _parseCurLineNum; + TIXMLASSERT( sizeof( XMLDeclaration ) == _commentPool.ItemSize() ); + returnNode = new (_commentPool.Alloc()) XMLDeclaration( this ); + returnNode->_memPool = &_commentPool; p += xmlHeaderLen; } else if ( XMLUtil::StringEqual( p, commentHeader, commentHeaderLen ) ) { - returnNode = CreateUnlinkedNode( _commentPool ); - returnNode->_parseLineNum = _parseCurLineNum; + TIXMLASSERT( sizeof( XMLComment ) == _commentPool.ItemSize() ); + returnNode = new (_commentPool.Alloc()) XMLComment( this ); + returnNode->_memPool = &_commentPool; p += commentHeaderLen; } else if ( XMLUtil::StringEqual( p, cdataHeader, cdataHeaderLen ) ) { - XMLText* text = CreateUnlinkedNode( _textPool ); + TIXMLASSERT( sizeof( XMLText ) == _textPool.ItemSize() ); + XMLText* text = new (_textPool.Alloc()) XMLText( this ); returnNode = text; - returnNode->_parseLineNum = _parseCurLineNum; + returnNode->_memPool = &_textPool; p += cdataHeaderLen; text->SetCData( true ); } else if ( XMLUtil::StringEqual( p, dtdHeader, dtdHeaderLen ) ) { - returnNode = CreateUnlinkedNode( _commentPool ); - returnNode->_parseLineNum = _parseCurLineNum; + TIXMLASSERT( sizeof( XMLUnknown ) == _commentPool.ItemSize() ); + returnNode = new (_commentPool.Alloc()) XMLUnknown( this ); + returnNode->_memPool = &_commentPool; p += dtdHeaderLen; } else if ( XMLUtil::StringEqual( p, elementHeader, elementHeaderLen ) ) { - returnNode = CreateUnlinkedNode( _elementPool ); - returnNode->_parseLineNum = _parseCurLineNum; + TIXMLASSERT( sizeof( XMLElement ) == _elementPool.ItemSize() ); + returnNode = new (_elementPool.Alloc()) XMLElement( this ); + returnNode->_memPool = &_elementPool; p += elementHeaderLen; } else { - returnNode = CreateUnlinkedNode( _textPool ); - returnNode->_parseLineNum = _parseCurLineNum; // Report line of first non-whitespace character + TIXMLASSERT( sizeof( XMLText ) == _textPool.ItemSize() ); + returnNode = new (_textPool.Alloc()) XMLText( this ); + returnNode->_memPool = &_textPool; p = start; // Back it up, all the text counts. - _parseCurLineNum = startLine; } TIXMLASSERT( returnNode ); @@ -804,11 +701,8 @@ bool XMLDocument::Accept( XMLVisitor* visitor ) const XMLNode::XMLNode( XMLDocument* doc ) : _document( doc ), _parent( 0 ), - _value(), - _parseLineNum( 0 ), _firstChild( 0 ), _lastChild( 0 ), _prev( 0 ), _next( 0 ), - _userData( 0 ), _memPool( 0 ) { } @@ -822,9 +716,9 @@ XMLNode::~XMLNode() } } -const char* XMLNode::Value() const +const char* XMLNode::Value() const { - // Edge case: XMLDocuments don't have a Value. Return null. + // Catch an edge case: XMLDocuments don't have a a Value. Carefully return nullptr. if ( this->ToDocument() ) return 0; return _value.GetStr(); @@ -840,24 +734,16 @@ void XMLNode::SetValue( const char* str, bool staticMem ) } } -XMLNode* XMLNode::DeepClone(XMLDocument* target) const -{ - XMLNode* clone = this->ShallowClone(target); - if (!clone) return 0; - - for (const XMLNode* child = this->FirstChild(); child; child = child->NextSibling()) { - XMLNode* childClone = child->DeepClone(target); - TIXMLASSERT(childClone); - clone->InsertEndChild(childClone); - } - return clone; -} void XMLNode::DeleteChildren() { while( _firstChild ) { TIXMLASSERT( _lastChild ); - DeleteChild( _firstChild ); + TIXMLASSERT( _firstChild->_document == _document ); + XMLNode* node = _firstChild; + Unlink( node ); + + DeleteNode( node ); } _firstChild = _lastChild = 0; } @@ -881,8 +767,6 @@ void XMLNode::Unlink( XMLNode* child ) if ( child->_next ) { child->_next->_prev = child->_prev; } - child->_next = 0; - child->_prev = 0; child->_parent = 0; } @@ -893,9 +777,6 @@ void XMLNode::DeleteChild( XMLNode* node ) TIXMLASSERT( node->_document == _document ); TIXMLASSERT( node->_parent == this ); Unlink( node ); - TIXMLASSERT(node->_prev == 0); - TIXMLASSERT(node->_next == 0); - TIXMLASSERT(node->_parent == 0); DeleteNode( node ); } @@ -975,13 +856,6 @@ XMLNode* XMLNode::InsertAfterChild( XMLNode* afterThis, XMLNode* addThis ) TIXMLASSERT( false ); return 0; } - if ( afterThis == addThis ) { - // Current state: BeforeThis -> AddThis -> OneAfterAddThis - // Now AddThis must disappear from it's location and then - // reappear between BeforeThis and OneAfterAddThis. - // So just leave it where it is. - return addThis; - } if ( afterThis->_next == 0 ) { // The last node or the only node. @@ -1002,9 +876,11 @@ XMLNode* XMLNode::InsertAfterChild( XMLNode* afterThis, XMLNode* addThis ) const XMLElement* XMLNode::FirstChildElement( const char* name ) const { for( const XMLNode* node = _firstChild; node; node = node->_next ) { - const XMLElement* element = node->ToElementWithName( name ); + const XMLElement* element = node->ToElement(); if ( element ) { - return element; + if ( !name || XMLUtil::StringEqual( element->Name(), name ) ) { + return element; + } } } return 0; @@ -1014,9 +890,11 @@ const XMLElement* XMLNode::FirstChildElement( const char* name ) const const XMLElement* XMLNode::LastChildElement( const char* name ) const { for( const XMLNode* node = _lastChild; node; node = node->_prev ) { - const XMLElement* element = node->ToElementWithName( name ); + const XMLElement* element = node->ToElement(); if ( element ) { - return element; + if ( !name || XMLUtil::StringEqual( element->Name(), name ) ) { + return element; + } } } return 0; @@ -1026,8 +904,9 @@ const XMLElement* XMLNode::LastChildElement( const char* name ) const const XMLElement* XMLNode::NextSiblingElement( const char* name ) const { for( const XMLNode* node = _next; node; node = node->_next ) { - const XMLElement* element = node->ToElementWithName( name ); - if ( element ) { + const XMLElement* element = node->ToElement(); + if ( element + && (!name || XMLUtil::StringEqual( name, element->Name() ))) { return element; } } @@ -1038,8 +917,9 @@ const XMLElement* XMLNode::NextSiblingElement( const char* name ) const const XMLElement* XMLNode::PreviousSiblingElement( const char* name ) const { for( const XMLNode* node = _prev; node; node = node->_prev ) { - const XMLElement* element = node->ToElementWithName( name ); - if ( element ) { + const XMLElement* element = node->ToElement(); + if ( element + && (!name || XMLUtil::StringEqual( name, element->Name() ))) { return element; } } @@ -1047,7 +927,7 @@ const XMLElement* XMLNode::PreviousSiblingElement( const char* name ) const } -char* XMLNode::ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ) +char* XMLNode::ParseDeep( char* p, StrPair* parentEnd ) { // This is a recursive method, but thinking about it "at the current level" // it is a pretty simple flat list: @@ -1066,68 +946,41 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ) // 'endTag' is the end tag for this node, it is returned by a call to a child. // 'parentEnd' is the end tag for the parent, which is filled in and returned. - XMLDocument::DepthTracker tracker(_document); - if (_document->Error()) - return 0; - - while( p && *p ) { + while( p && *p ) { XMLNode* node = 0; p = _document->Identify( p, &node ); - TIXMLASSERT( p ); if ( node == 0 ) { break; } - const int initialLineNum = node->_parseLineNum; - StrPair endTag; - p = node->ParseDeep( p, &endTag, curLineNumPtr ); + p = node->ParseDeep( p, &endTag ); if ( !p ) { - _document->DeleteNode( node ); + DeleteNode( node ); if ( !_document->Error() ) { - _document->SetError( XML_ERROR_PARSING, initialLineNum, 0); + _document->SetError( XML_ERROR_PARSING, 0, 0 ); } break; } - const XMLDeclaration* const decl = node->ToDeclaration(); + XMLDeclaration* decl = node->ToDeclaration(); if ( decl ) { - // Declarations are only allowed at document level - // - // Multiple declarations are allowed but all declarations - // must occur before anything else. - // - // Optimized due to a security test case. If the first node is - // a declaration, and the last node is a declaration, then only - // declarations have so far been added. - bool wellLocated = false; - - if (ToDocument()) { - if (FirstChild()) { - wellLocated = - FirstChild() && - FirstChild()->ToDeclaration() && - LastChild() && - LastChild()->ToDeclaration(); + // A declaration can only be the first child of a document. + // Set error, if document already has children. + if ( !_document->NoChildren() ) { + _document->SetError( XML_ERROR_PARSING_DECLARATION, decl->Value(), 0); + DeleteNode( decl ); + break; } - else { - wellLocated = true; - } - } - if ( !wellLocated ) { - _document->SetError( XML_ERROR_PARSING_DECLARATION, initialLineNum, "XMLDeclaration value=%s", decl->Value()); - _document->DeleteNode( node ); - break; - } } XMLElement* ele = node->ToElement(); if ( ele ) { // We read the end tag. Return it to the parent. if ( ele->ClosingType() == XMLElement::CLOSING ) { - if ( parentEndTag ) { - ele->_value.TransferTo( parentEndTag ); + if ( parentEnd ) { + ele->_value.TransferTo( parentEnd ); } node->_memPool->SetTracked(); // created and then immediately deleted. DeleteNode( node ); @@ -1151,8 +1004,8 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ) } } if ( mismatch ) { - _document->SetError( XML_ERROR_MISMATCHED_ELEMENT, initialLineNum, "XMLElement name=%s", ele->Name()); - _document->DeleteNode( node ); + _document->SetError( XML_ERROR_MISMATCHED_ELEMENT, ele->Name(), 0 ); + DeleteNode( node ); break; } } @@ -1161,16 +1014,11 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ) return 0; } -/*static*/ void XMLNode::DeleteNode( XMLNode* node ) +void XMLNode::DeleteNode( XMLNode* node ) { if ( node == 0 ) { return; } - TIXMLASSERT(node->_document); - if (!node->ToDocument()) { - node->_document->MarkInUse(node); - } - MemPool* pool = node->_memPool; node->~XMLNode(); pool->Free( node ); @@ -1181,37 +1029,20 @@ void XMLNode::InsertChildPreamble( XMLNode* insertThis ) const TIXMLASSERT( insertThis ); TIXMLASSERT( insertThis->_document == _document ); - if (insertThis->_parent) { + if ( insertThis->_parent ) insertThis->_parent->Unlink( insertThis ); - } - else { - insertThis->_document->MarkInUse(insertThis); + else insertThis->_memPool->SetTracked(); - } -} - -const XMLElement* XMLNode::ToElementWithName( const char* name ) const -{ - const XMLElement* element = this->ToElement(); - if ( element == 0 ) { - return 0; - } - if ( name == 0 ) { - return element; - } - if ( XMLUtil::StringEqual( element->Name(), name ) ) { - return element; - } - return 0; } // --------- XMLText ---------- // -char* XMLText::ParseDeep( char* p, StrPair*, int* curLineNumPtr ) +char* XMLText::ParseDeep( char* p, StrPair* ) { + const char* start = p; if ( this->CData() ) { - p = _value.ParseText( p, "]]>", StrPair::NEEDS_NEWLINE_NORMALIZATION, curLineNumPtr ); + p = _value.ParseText( p, "]]>", StrPair::NEEDS_NEWLINE_NORMALIZATION ); if ( !p ) { - _document->SetError( XML_ERROR_PARSING_CDATA, _parseLineNum, 0 ); + _document->SetError( XML_ERROR_PARSING_CDATA, start, 0 ); } return p; } @@ -1221,12 +1052,12 @@ char* XMLText::ParseDeep( char* p, StrPair*, int* curLineNumPtr ) flags |= StrPair::NEEDS_WHITESPACE_COLLAPSING; } - p = _value.ParseText( p, "<", flags, curLineNumPtr ); + p = _value.ParseText( p, "<", flags ); if ( p && *p ) { return p-1; } if ( !p ) { - _document->SetError( XML_ERROR_PARSING_TEXT, _parseLineNum, 0 ); + _document->SetError( XML_ERROR_PARSING_TEXT, start, 0 ); } } return 0; @@ -1246,7 +1077,6 @@ XMLNode* XMLText::ShallowClone( XMLDocument* doc ) const bool XMLText::ShallowEqual( const XMLNode* compare ) const { - TIXMLASSERT( compare ); const XMLText* text = compare->ToText(); return ( text && XMLUtil::StringEqual( text->Value(), Value() ) ); } @@ -1271,12 +1101,13 @@ XMLComment::~XMLComment() } -char* XMLComment::ParseDeep( char* p, StrPair*, int* curLineNumPtr ) +char* XMLComment::ParseDeep( char* p, StrPair* ) { // Comment parses as text. - p = _value.ParseText( p, "-->", StrPair::COMMENT, curLineNumPtr ); + const char* start = p; + p = _value.ParseText( p, "-->", StrPair::COMMENT ); if ( p == 0 ) { - _document->SetError( XML_ERROR_PARSING_COMMENT, _parseLineNum, 0 ); + _document->SetError( XML_ERROR_PARSING_COMMENT, start, 0 ); } return p; } @@ -1320,12 +1151,13 @@ XMLDeclaration::~XMLDeclaration() } -char* XMLDeclaration::ParseDeep( char* p, StrPair*, int* curLineNumPtr ) +char* XMLDeclaration::ParseDeep( char* p, StrPair* ) { // Declaration parses as text. - p = _value.ParseText( p, "?>", StrPair::NEEDS_NEWLINE_NORMALIZATION, curLineNumPtr ); + const char* start = p; + p = _value.ParseText( p, "?>", StrPair::NEEDS_NEWLINE_NORMALIZATION ); if ( p == 0 ) { - _document->SetError( XML_ERROR_PARSING_DECLARATION, _parseLineNum, 0 ); + _document->SetError( XML_ERROR_PARSING_DECLARATION, start, 0 ); } return p; } @@ -1368,12 +1200,14 @@ XMLUnknown::~XMLUnknown() } -char* XMLUnknown::ParseDeep( char* p, StrPair*, int* curLineNumPtr ) +char* XMLUnknown::ParseDeep( char* p, StrPair* ) { // Unknown parses as text. - p = _value.ParseText( p, ">", StrPair::NEEDS_NEWLINE_NORMALIZATION, curLineNumPtr ); + const char* start = p; + + p = _value.ParseText( p, ">", StrPair::NEEDS_NEWLINE_NORMALIZATION ); if ( !p ) { - _document->SetError( XML_ERROR_PARSING_UNKNOWN, _parseLineNum, 0 ); + _document->SetError( XML_ERROR_PARSING_UNKNOWN, start, 0 ); } return p; } @@ -1405,17 +1239,17 @@ bool XMLUnknown::Accept( XMLVisitor* visitor ) const // --------- XMLAttribute ---------- // -const char* XMLAttribute::Name() const +const char* XMLAttribute::Name() const { return _name.GetStr(); } -const char* XMLAttribute::Value() const +const char* XMLAttribute::Value() const { return _value.GetStr(); } -char* XMLAttribute::ParseDeep( char* p, bool processEntities, int* curLineNumPtr ) +char* XMLAttribute::ParseDeep( char* p, bool processEntities ) { // Parse using the name rules: bug fix, was using ParseText before p = _name.ParseName( p ); @@ -1424,21 +1258,21 @@ char* XMLAttribute::ParseDeep( char* p, bool processEntities, int* curLineNumPtr } // Skip white space before = - p = XMLUtil::SkipWhiteSpace( p, curLineNumPtr ); + p = XMLUtil::SkipWhiteSpace( p ); if ( *p != '=' ) { return 0; } ++p; // move up to opening quote - p = XMLUtil::SkipWhiteSpace( p, curLineNumPtr ); + p = XMLUtil::SkipWhiteSpace( p ); if ( *p != '\"' && *p != '\'' ) { return 0; } - const char endTag[2] = { *p, 0 }; + char endTag[2] = { *p, 0 }; ++p; // move past opening quote - p = _value.ParseText( p, endTag, processEntities ? StrPair::ATTRIBUTE_VALUE : StrPair::ATTRIBUTE_VALUE_LEAVE_ENTITIES, curLineNumPtr ); + p = _value.ParseText( p, endTag, processEntities ? StrPair::ATTRIBUTE_VALUE : StrPair::ATTRIBUTE_VALUE_LEAVE_ENTITIES ); return p; } @@ -1452,7 +1286,7 @@ void XMLAttribute::SetName( const char* n ) XMLError XMLAttribute::QueryIntValue( int* value ) const { if ( XMLUtil::ToInt( Value(), value )) { - return XML_SUCCESS; + return XML_NO_ERROR; } return XML_WRONG_ATTRIBUTE_TYPE; } @@ -1461,25 +1295,7 @@ XMLError XMLAttribute::QueryIntValue( int* value ) const XMLError XMLAttribute::QueryUnsignedValue( unsigned int* value ) const { if ( XMLUtil::ToUnsigned( Value(), value )) { - return XML_SUCCESS; - } - return XML_WRONG_ATTRIBUTE_TYPE; -} - - -XMLError XMLAttribute::QueryInt64Value(int64_t* value) const -{ - if (XMLUtil::ToInt64(Value(), value)) { - return XML_SUCCESS; - } - return XML_WRONG_ATTRIBUTE_TYPE; -} - - -XMLError XMLAttribute::QueryUnsigned64Value(uint64_t* value) const -{ - if(XMLUtil::ToUnsigned64(Value(), value)) { - return XML_SUCCESS; + return XML_NO_ERROR; } return XML_WRONG_ATTRIBUTE_TYPE; } @@ -1488,7 +1304,7 @@ XMLError XMLAttribute::QueryUnsigned64Value(uint64_t* value) const XMLError XMLAttribute::QueryBoolValue( bool* value ) const { if ( XMLUtil::ToBool( Value(), value )) { - return XML_SUCCESS; + return XML_NO_ERROR; } return XML_WRONG_ATTRIBUTE_TYPE; } @@ -1497,7 +1313,7 @@ XMLError XMLAttribute::QueryBoolValue( bool* value ) const XMLError XMLAttribute::QueryFloatValue( float* value ) const { if ( XMLUtil::ToFloat( Value(), value )) { - return XML_SUCCESS; + return XML_NO_ERROR; } return XML_WRONG_ATTRIBUTE_TYPE; } @@ -1506,7 +1322,7 @@ XMLError XMLAttribute::QueryFloatValue( float* value ) const XMLError XMLAttribute::QueryDoubleValue( double* value ) const { if ( XMLUtil::ToDouble( Value(), value )) { - return XML_SUCCESS; + return XML_NO_ERROR; } return XML_WRONG_ATTRIBUTE_TYPE; } @@ -1534,21 +1350,6 @@ void XMLAttribute::SetAttribute( unsigned v ) } -void XMLAttribute::SetAttribute(int64_t v) -{ - char buf[BUF_SIZE]; - XMLUtil::ToStr(v, buf, BUF_SIZE); - _value.SetStr(buf); -} - -void XMLAttribute::SetAttribute(uint64_t v) -{ - char buf[BUF_SIZE]; - XMLUtil::ToStr(v, buf, BUF_SIZE); - _value.SetStr(buf); -} - - void XMLAttribute::SetAttribute( bool v ) { char buf[BUF_SIZE]; @@ -1573,7 +1374,7 @@ void XMLAttribute::SetAttribute( float v ) // --------- XMLElement ---------- // XMLElement::XMLElement( XMLDocument* doc ) : XMLNode( doc ), - _closingType( OPEN ), + _closingType( 0 ), _rootAttribute( 0 ) { } @@ -1612,69 +1413,11 @@ const char* XMLElement::Attribute( const char* name, const char* value ) const return 0; } -int XMLElement::IntAttribute(const char* name, int defaultValue) const -{ - int i = defaultValue; - QueryIntAttribute(name, &i); - return i; -} - -unsigned XMLElement::UnsignedAttribute(const char* name, unsigned defaultValue) const -{ - unsigned i = defaultValue; - QueryUnsignedAttribute(name, &i); - return i; -} - -int64_t XMLElement::Int64Attribute(const char* name, int64_t defaultValue) const -{ - int64_t i = defaultValue; - QueryInt64Attribute(name, &i); - return i; -} - -uint64_t XMLElement::Unsigned64Attribute(const char* name, uint64_t defaultValue) const -{ - uint64_t i = defaultValue; - QueryUnsigned64Attribute(name, &i); - return i; -} - -bool XMLElement::BoolAttribute(const char* name, bool defaultValue) const -{ - bool b = defaultValue; - QueryBoolAttribute(name, &b); - return b; -} - -double XMLElement::DoubleAttribute(const char* name, double defaultValue) const -{ - double d = defaultValue; - QueryDoubleAttribute(name, &d); - return d; -} - -float XMLElement::FloatAttribute(const char* name, float defaultValue) const -{ - float f = defaultValue; - QueryFloatAttribute(name, &f); - return f; -} const char* XMLElement::GetText() const { - /* skip comment node */ - const XMLNode* node = FirstChild(); - while (node) { - if (node->ToComment()) { - node = node->NextSibling(); - continue; - } - break; - } - - if ( node && node->ToText() ) { - return node->Value(); + if ( FirstChild() && FirstChild()->ToText() ) { + return FirstChild()->Value(); } return 0; } @@ -1691,7 +1434,7 @@ void XMLElement::SetText( const char* inText ) } -void XMLElement::SetText( int v ) +void XMLElement::SetText( int v ) { char buf[BUF_SIZE]; XMLUtil::ToStr( v, buf, BUF_SIZE ); @@ -1699,7 +1442,7 @@ void XMLElement::SetText( int v ) } -void XMLElement::SetText( unsigned v ) +void XMLElement::SetText( unsigned v ) { char buf[BUF_SIZE]; XMLUtil::ToStr( v, buf, BUF_SIZE ); @@ -1707,21 +1450,7 @@ void XMLElement::SetText( unsigned v ) } -void XMLElement::SetText(int64_t v) -{ - char buf[BUF_SIZE]; - XMLUtil::ToStr(v, buf, BUF_SIZE); - SetText(buf); -} - -void XMLElement::SetText(uint64_t v) { - char buf[BUF_SIZE]; - XMLUtil::ToStr(v, buf, BUF_SIZE); - SetText(buf); -} - - -void XMLElement::SetText( bool v ) +void XMLElement::SetText( bool v ) { char buf[BUF_SIZE]; XMLUtil::ToStr( v, buf, BUF_SIZE ); @@ -1729,7 +1458,7 @@ void XMLElement::SetText( bool v ) } -void XMLElement::SetText( float v ) +void XMLElement::SetText( float v ) { char buf[BUF_SIZE]; XMLUtil::ToStr( v, buf, BUF_SIZE ); @@ -1737,7 +1466,7 @@ void XMLElement::SetText( float v ) } -void XMLElement::SetText( double v ) +void XMLElement::SetText( double v ) { char buf[BUF_SIZE]; XMLUtil::ToStr( v, buf, BUF_SIZE ); @@ -1771,32 +1500,6 @@ XMLError XMLElement::QueryUnsignedText( unsigned* uval ) const } -XMLError XMLElement::QueryInt64Text(int64_t* ival) const -{ - if (FirstChild() && FirstChild()->ToText()) { - const char* t = FirstChild()->Value(); - if (XMLUtil::ToInt64(t, ival)) { - return XML_SUCCESS; - } - return XML_CAN_NOT_CONVERT_TEXT; - } - return XML_NO_TEXT_NODE; -} - - -XMLError XMLElement::QueryUnsigned64Text(uint64_t* uval) const -{ - if(FirstChild() && FirstChild()->ToText()) { - const char* t = FirstChild()->Value(); - if(XMLUtil::ToUnsigned64(t, uval)) { - return XML_SUCCESS; - } - return XML_CAN_NOT_CONVERT_TEXT; - } - return XML_NO_TEXT_NODE; -} - - XMLError XMLElement::QueryBoolText( bool* bval ) const { if ( FirstChild() && FirstChild()->ToText() ) { @@ -1835,54 +1538,6 @@ XMLError XMLElement::QueryFloatText( float* fval ) const return XML_NO_TEXT_NODE; } -int XMLElement::IntText(int defaultValue) const -{ - int i = defaultValue; - QueryIntText(&i); - return i; -} - -unsigned XMLElement::UnsignedText(unsigned defaultValue) const -{ - unsigned i = defaultValue; - QueryUnsignedText(&i); - return i; -} - -int64_t XMLElement::Int64Text(int64_t defaultValue) const -{ - int64_t i = defaultValue; - QueryInt64Text(&i); - return i; -} - -uint64_t XMLElement::Unsigned64Text(uint64_t defaultValue) const -{ - uint64_t i = defaultValue; - QueryUnsigned64Text(&i); - return i; -} - -bool XMLElement::BoolText(bool defaultValue) const -{ - bool b = defaultValue; - QueryBoolText(&b); - return b; -} - -double XMLElement::DoubleText(double defaultValue) const -{ - double d = defaultValue; - QueryDoubleText(&d); - return d; -} - -float XMLElement::FloatText(float defaultValue) const -{ - float f = defaultValue; - QueryFloatText(&f); - return f; -} XMLAttribute* XMLElement::FindOrCreateAttribute( const char* name ) @@ -1897,17 +1552,17 @@ XMLAttribute* XMLElement::FindOrCreateAttribute( const char* name ) } } if ( !attrib ) { - attrib = CreateAttribute(); - TIXMLASSERT( attrib ); + TIXMLASSERT( sizeof( XMLAttribute ) == _document->_attributePool.ItemSize() ); + attrib = new (_document->_attributePool.Alloc() ) XMLAttribute(); + attrib->_memPool = &_document->_attributePool; if ( last ) { - TIXMLASSERT( last->_next == 0 ); last->_next = attrib; } else { - TIXMLASSERT( _rootAttribute == 0 ); _rootAttribute = attrib; } attrib->SetName( name ); + attrib->_memPool->SetTracked(); // always created and linked. } return attrib; } @@ -1932,30 +1587,30 @@ void XMLElement::DeleteAttribute( const char* name ) } -char* XMLElement::ParseAttributes( char* p, int* curLineNumPtr ) +char* XMLElement::ParseAttributes( char* p ) { + const char* start = p; XMLAttribute* prevAttribute = 0; // Read the attributes. while( p ) { - p = XMLUtil::SkipWhiteSpace( p, curLineNumPtr ); + p = XMLUtil::SkipWhiteSpace( p ); if ( !(*p) ) { - _document->SetError( XML_ERROR_PARSING_ELEMENT, _parseLineNum, "XMLElement name=%s", Name() ); + _document->SetError( XML_ERROR_PARSING_ELEMENT, start, Name() ); return 0; } // attribute. - if (XMLUtil::IsNameStartChar( (unsigned char) *p ) ) { - XMLAttribute* attrib = CreateAttribute(); - TIXMLASSERT( attrib ); - attrib->_parseLineNum = _document->_parseCurLineNum; - - const int attrLineNum = attrib->_parseLineNum; + if (XMLUtil::IsNameStartChar( *p ) ) { + TIXMLASSERT( sizeof( XMLAttribute ) == _document->_attributePool.ItemSize() ); + XMLAttribute* attrib = new (_document->_attributePool.Alloc() ) XMLAttribute(); + attrib->_memPool = &_document->_attributePool; + attrib->_memPool->SetTracked(); - p = attrib->ParseDeep( p, _document->ProcessEntities(), curLineNumPtr ); + p = attrib->ParseDeep( p, _document->ProcessEntities() ); if ( !p || Attribute( attrib->Name() ) ) { DeleteAttribute( attrib ); - _document->SetError( XML_ERROR_PARSING_ATTRIBUTE, attrLineNum, "XMLElement name=%s", Name() ); + _document->SetError( XML_ERROR_PARSING_ATTRIBUTE, start, p ); return 0; } // There is a minor bug here: if the attribute in the source xml @@ -1964,11 +1619,9 @@ char* XMLElement::ParseAttributes( char* p, int* curLineNumPtr ) // avoids re-scanning the attribute list. Preferring performance for // now, may reconsider in the future. if ( prevAttribute ) { - TIXMLASSERT( prevAttribute->_next == 0 ); prevAttribute->_next = attrib; } else { - TIXMLASSERT( _rootAttribute == 0 ); _rootAttribute = attrib; } prevAttribute = attrib; @@ -1984,7 +1637,7 @@ char* XMLElement::ParseAttributes( char* p, int* curLineNumPtr ) return p+2; // done; sealed element. } else { - _document->SetError( XML_ERROR_PARSING_ELEMENT, _parseLineNum, 0 ); + _document->SetError( XML_ERROR_PARSING_ELEMENT, start, p ); return 0; } } @@ -2001,57 +1654,14 @@ void XMLElement::DeleteAttribute( XMLAttribute* attribute ) pool->Free( attribute ); } -XMLAttribute* XMLElement::CreateAttribute() -{ - TIXMLASSERT( sizeof( XMLAttribute ) == _document->_attributePool.ItemSize() ); - XMLAttribute* attrib = new (_document->_attributePool.Alloc() ) XMLAttribute(); - TIXMLASSERT( attrib ); - attrib->_memPool = &_document->_attributePool; - attrib->_memPool->SetTracked(); - return attrib; -} - - -XMLElement* XMLElement::InsertNewChildElement(const char* name) -{ - XMLElement* node = _document->NewElement(name); - return InsertEndChild(node) ? node : 0; -} - -XMLComment* XMLElement::InsertNewComment(const char* comment) -{ - XMLComment* node = _document->NewComment(comment); - return InsertEndChild(node) ? node : 0; -} - -XMLText* XMLElement::InsertNewText(const char* text) -{ - XMLText* node = _document->NewText(text); - return InsertEndChild(node) ? node : 0; -} - -XMLDeclaration* XMLElement::InsertNewDeclaration(const char* text) -{ - XMLDeclaration* node = _document->NewDeclaration(text); - return InsertEndChild(node) ? node : 0; -} - -XMLUnknown* XMLElement::InsertNewUnknown(const char* text) -{ - XMLUnknown* node = _document->NewUnknown(text); - return InsertEndChild(node) ? node : 0; -} - - - // // // foobar // -char* XMLElement::ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ) +char* XMLElement::ParseDeep( char* p, StrPair* strPair ) { // Read the element name. - p = XMLUtil::SkipWhiteSpace( p, curLineNumPtr ); + p = XMLUtil::SkipWhiteSpace( p ); // The closing element is the form. It is // parsed just like a regular element then deleted from @@ -2066,12 +1676,12 @@ char* XMLElement::ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr return 0; } - p = ParseAttributes( p, curLineNumPtr ); - if ( !p || !*p || _closingType != OPEN ) { + p = ParseAttributes( p ); + if ( !p || !*p || _closingType ) { return p; } - p = XMLNode::ParseDeep( p, parentEndTag, curLineNumPtr ); + p = XMLNode::ParseDeep( p, strPair ); return p; } @@ -2140,8 +1750,10 @@ const char* XMLDocument::_errorNames[XML_ERROR_COUNT] = { "XML_ERROR_FILE_NOT_FOUND", "XML_ERROR_FILE_COULD_NOT_BE_OPENED", "XML_ERROR_FILE_READ_ERROR", + "XML_ERROR_ELEMENT_MISMATCH", "XML_ERROR_PARSING_ELEMENT", "XML_ERROR_PARSING_ATTRIBUTE", + "XML_ERROR_IDENTIFYING_TAG", "XML_ERROR_PARSING_TEXT", "XML_ERROR_PARSING_CDATA", "XML_ERROR_PARSING_COMMENT", @@ -2151,27 +1763,19 @@ const char* XMLDocument::_errorNames[XML_ERROR_COUNT] = { "XML_ERROR_MISMATCHED_ELEMENT", "XML_ERROR_PARSING", "XML_CAN_NOT_CONVERT_TEXT", - "XML_NO_TEXT_NODE", - "XML_ELEMENT_DEPTH_EXCEEDED" + "XML_NO_TEXT_NODE" }; -XMLDocument::XMLDocument( bool processEntities, Whitespace whitespaceMode ) : +XMLDocument::XMLDocument( bool processEntities, Whitespace whitespace ) : XMLNode( 0 ), _writeBOM( false ), _processEntities( processEntities ), - _errorID(XML_SUCCESS), - _whitespaceMode( whitespaceMode ), - _errorStr(), - _errorLineNum( 0 ), - _charBuffer( 0 ), - _parseCurLineNum( 0 ), - _parsingDepth(0), - _unlinked(), - _elementPool(), - _attributePool(), - _textPool(), - _commentPool() + _errorID( XML_NO_ERROR ), + _whitespace( whitespace ), + _errorStr1( 0 ), + _errorStr2( 0 ), + _charBuffer( 0 ) { // avoid VC++ C4355 warning about 'this' in initializer list (C4355 is off by default in VS2012+) _document = this; @@ -2184,34 +1788,19 @@ XMLDocument::~XMLDocument() } -void XMLDocument::MarkInUse(const XMLNode* const node) -{ - TIXMLASSERT(node); - TIXMLASSERT(node->_parent == 0); - - for (int i = 0; i < _unlinked.Size(); ++i) { - if (node == _unlinked[i]) { - _unlinked.SwapRemove(i); - break; - } - } -} - void XMLDocument::Clear() { DeleteChildren(); - while( _unlinked.Size()) { - DeleteNode(_unlinked[0]); // Will remove from _unlinked as part of delete. - } -#ifdef TINYXML2_DEBUG +#ifdef DEBUG const bool hadError = Error(); #endif - ClearError(); + _errorID = XML_NO_ERROR; + _errorStr1 = 0; + _errorStr2 = 0; delete [] _charBuffer; _charBuffer = 0; - _parsingDepth = 0; #if 0 _textPool.Trace( "text" ); @@ -2219,8 +1808,8 @@ void XMLDocument::Clear() _commentPool.Trace( "comment" ); _attributePool.Trace( "attribute" ); #endif - -#ifdef TINYXML2_DEBUG + +#ifdef DEBUG if ( !hadError ) { TIXMLASSERT( _elementPool.CurrentAllocs() == _elementPool.Untracked() ); TIXMLASSERT( _attributePool.CurrentAllocs() == _attributePool.Untracked() ); @@ -2231,22 +1820,11 @@ void XMLDocument::Clear() } -void XMLDocument::DeepCopy(XMLDocument* target) const -{ - TIXMLASSERT(target); - if (target == this) { - return; // technically success - a no-op. - } - - target->Clear(); - for (const XMLNode* node = this->FirstChild(); node; node = node->NextSibling()) { - target->InsertEndChild(node->DeepClone(target)); - } -} - XMLElement* XMLDocument::NewElement( const char* name ) { - XMLElement* ele = CreateUnlinkedNode( _elementPool ); + TIXMLASSERT( sizeof( XMLElement ) == _elementPool.ItemSize() ); + XMLElement* ele = new (_elementPool.Alloc()) XMLElement( this ); + ele->_memPool = &_elementPool; ele->SetName( name ); return ele; } @@ -2254,7 +1832,9 @@ XMLElement* XMLDocument::NewElement( const char* name ) XMLComment* XMLDocument::NewComment( const char* str ) { - XMLComment* comment = CreateUnlinkedNode( _commentPool ); + TIXMLASSERT( sizeof( XMLComment ) == _commentPool.ItemSize() ); + XMLComment* comment = new (_commentPool.Alloc()) XMLComment( this ); + comment->_memPool = &_commentPool; comment->SetValue( str ); return comment; } @@ -2262,7 +1842,9 @@ XMLComment* XMLDocument::NewComment( const char* str ) XMLText* XMLDocument::NewText( const char* str ) { - XMLText* text = CreateUnlinkedNode( _textPool ); + TIXMLASSERT( sizeof( XMLText ) == _textPool.ItemSize() ); + XMLText* text = new (_textPool.Alloc()) XMLText( this ); + text->_memPool = &_textPool; text->SetValue( str ); return text; } @@ -2270,7 +1852,9 @@ XMLText* XMLDocument::NewText( const char* str ) XMLDeclaration* XMLDocument::NewDeclaration( const char* str ) { - XMLDeclaration* dec = CreateUnlinkedNode( _commentPool ); + TIXMLASSERT( sizeof( XMLDeclaration ) == _commentPool.ItemSize() ); + XMLDeclaration* dec = new (_commentPool.Alloc()) XMLDeclaration( this ); + dec->_memPool = &_commentPool; dec->SetValue( str ? str : "xml version=\"1.0\" encoding=\"UTF-8\"" ); return dec; } @@ -2278,7 +1862,9 @@ XMLDeclaration* XMLDocument::NewDeclaration( const char* str ) XMLUnknown* XMLDocument::NewUnknown( const char* str ) { - XMLUnknown* unk = CreateUnlinkedNode( _commentPool ); + TIXMLASSERT( sizeof( XMLUnknown ) == _commentPool.ItemSize() ); + XMLUnknown* unk = new (_commentPool.Alloc()) XMLUnknown( this ); + unk->_memPool = &_commentPool; unk->SetValue( str ); return unk; } @@ -2289,7 +1875,7 @@ static FILE* callfopen( const char* filepath, const char* mode ) TIXMLASSERT( mode ); #if defined(_MSC_VER) && (_MSC_VER >= 1400 ) && (!defined WINCE) FILE* fp = 0; - const errno_t err = fopen_s( &fp, filepath, mode ); + errno_t err = fopen_s( &fp, filepath, mode ); if ( err ) { return 0; } @@ -2298,7 +1884,7 @@ static FILE* callfopen( const char* filepath, const char* mode ) #endif return fp; } - + void XMLDocument::DeleteNode( XMLNode* node ) { TIXMLASSERT( node ); TIXMLASSERT(node->_document == this ); @@ -2319,16 +1905,10 @@ void XMLDocument::DeleteNode( XMLNode* node ) { XMLError XMLDocument::LoadFile( const char* filename ) { - if ( !filename ) { - TIXMLASSERT( false ); - SetError( XML_ERROR_FILE_COULD_NOT_BE_OPENED, 0, "filename=" ); - return _errorID; - } - Clear(); FILE* fp = callfopen( filename, "rb" ); if ( !fp ) { - SetError( XML_ERROR_FILE_NOT_FOUND, 0, "filename=%s", filename ); + SetError( XML_ERROR_FILE_NOT_FOUND, filename, 0 ); return _errorID; } LoadFile( fp ); @@ -2336,34 +1916,47 @@ XMLError XMLDocument::LoadFile( const char* filename ) return _errorID; } +// This is likely overengineered template art to have a check that unsigned long value incremented +// by one still fits into size_t. If size_t type is larger than unsigned long type +// (x86_64-w64-mingw32 target) then the check is redundant and gcc and clang emit +// -Wtype-limits warning. This piece makes the compiler select code with a check when a check +// is useful and code with no check when a check is redundant depending on how size_t and unsigned long +// types sizes relate to each other. +template += sizeof(size_t))> +struct LongFitsIntoSizeTMinusOne { + static bool Fits( unsigned long value ) + { + return value < (size_t)-1; + } +}; + +template <> +bool LongFitsIntoSizeTMinusOne::Fits( unsigned long /*value*/ ) +{ + return true; +} + XMLError XMLDocument::LoadFile( FILE* fp ) { Clear(); - TIXML_FSEEK( fp, 0, SEEK_SET ); + fseek( fp, 0, SEEK_SET ); if ( fgetc( fp ) == EOF && ferror( fp ) != 0 ) { SetError( XML_ERROR_FILE_READ_ERROR, 0, 0 ); return _errorID; } - TIXML_FSEEK( fp, 0, SEEK_END ); - - unsigned long long filelength; - { - const long long fileLengthSigned = TIXML_FTELL( fp ); - TIXML_FSEEK( fp, 0, SEEK_SET ); - if ( fileLengthSigned == -1L ) { - SetError( XML_ERROR_FILE_READ_ERROR, 0, 0 ); - return _errorID; - } - TIXMLASSERT( fileLengthSigned >= 0 ); - filelength = static_cast(fileLengthSigned); + fseek( fp, 0, SEEK_END ); + const long filelength = ftell( fp ); + fseek( fp, 0, SEEK_SET ); + if ( filelength == -1L ) { + SetError( XML_ERROR_FILE_READ_ERROR, 0, 0 ); + return _errorID; } + TIXMLASSERT( filelength >= 0 ); - const size_t maxSizeT = static_cast(-1); - // We'll do the comparison as an unsigned long long, because that's guaranteed to be at - // least 8 bytes, even on a 32-bit platform. - if ( filelength >= static_cast(maxSizeT) ) { + if ( !LongFitsIntoSizeTMinusOne<>::Fits( filelength ) ) { // Cannot handle files which won't fit in buffer together with null terminator SetError( XML_ERROR_FILE_READ_ERROR, 0, 0 ); return _errorID; @@ -2374,10 +1967,10 @@ XMLError XMLDocument::LoadFile( FILE* fp ) return _errorID; } - const size_t size = static_cast(filelength); + const size_t size = filelength; TIXMLASSERT( _charBuffer == 0 ); _charBuffer = new char[size+1]; - const size_t read = fread( _charBuffer, 1, size, fp ); + size_t read = fread( _charBuffer, 1, size, fp ); if ( read != size ) { SetError( XML_ERROR_FILE_READ_ERROR, 0, 0 ); return _errorID; @@ -2392,15 +1985,9 @@ XMLError XMLDocument::LoadFile( FILE* fp ) XMLError XMLDocument::SaveFile( const char* filename, bool compact ) { - if ( !filename ) { - TIXMLASSERT( false ); - SetError( XML_ERROR_FILE_COULD_NOT_BE_OPENED, 0, "filename=" ); - return _errorID; - } - FILE* fp = callfopen( filename, "w" ); if ( !fp ) { - SetError( XML_ERROR_FILE_COULD_NOT_BE_OPENED, 0, "filename=%s", filename ); + SetError( XML_ERROR_FILE_COULD_NOT_BE_OPENED, filename, 0 ); return _errorID; } SaveFile(fp, compact); @@ -2413,28 +2000,28 @@ XMLError XMLDocument::SaveFile( FILE* fp, bool compact ) { // Clear any error from the last save, otherwise it will get reported // for *this* call. - ClearError(); + SetError( XML_NO_ERROR, 0, 0 ); XMLPrinter stream( fp, compact ); Print( &stream ); return _errorID; } -XMLError XMLDocument::Parse( const char* xml, size_t nBytes ) +XMLError XMLDocument::Parse( const char* p, size_t len ) { Clear(); - if ( nBytes == 0 || !xml || !*xml ) { + if ( len == 0 || !p || !*p ) { SetError( XML_ERROR_EMPTY_DOCUMENT, 0, 0 ); return _errorID; } - if ( nBytes == static_cast(-1) ) { - nBytes = strlen( xml ); + if ( len == (size_t)(-1) ) { + len = strlen( p ); } TIXMLASSERT( _charBuffer == 0 ); - _charBuffer = new char[ nBytes+1 ]; - memcpy( _charBuffer, xml, nBytes ); - _charBuffer[nBytes] = 0; + _charBuffer = new char[ len+1 ]; + memcpy( _charBuffer, p, len ); + _charBuffer[len] = 0; Parse(); if ( Error() ) { @@ -2463,105 +2050,66 @@ void XMLDocument::Print( XMLPrinter* streamer ) const } -void XMLDocument::ClearError() { - _errorID = XML_SUCCESS; - _errorLineNum = 0; - _errorStr.Reset(); -} - - -void XMLDocument::SetError( XMLError error, int lineNum, const char* format, ... ) +void XMLDocument::SetError( XMLError error, const char* str1, const char* str2 ) { TIXMLASSERT( error >= 0 && error < XML_ERROR_COUNT ); _errorID = error; - _errorLineNum = lineNum; - _errorStr.Reset(); - - const size_t BUFFER_SIZE = 1000; - char* buffer = new char[BUFFER_SIZE]; - - TIXMLASSERT(sizeof(error) <= sizeof(int)); - TIXML_SNPRINTF(buffer, BUFFER_SIZE, "Error=%s ErrorID=%d (0x%x) Line number=%d", ErrorIDToName(error), int(error), int(error), lineNum); - - if (format) { - size_t len = strlen(buffer); - TIXML_SNPRINTF(buffer + len, BUFFER_SIZE - len, ": "); - len = strlen(buffer); - - va_list va; - va_start(va, format); - TIXML_VSNPRINTF(buffer + len, BUFFER_SIZE - len, format, va); - va_end(va); - } - _errorStr.SetStr(buffer); - delete[] buffer; + _errorStr1 = str1; + _errorStr2 = str2; } - -/*static*/ const char* XMLDocument::ErrorIDToName(XMLError errorID) +const char* XMLDocument::ErrorName() const { - TIXMLASSERT( errorID >= 0 && errorID < XML_ERROR_COUNT ); - const char* errorName = _errorNames[errorID]; + TIXMLASSERT( _errorID >= 0 && _errorID < XML_ERROR_COUNT ); + const char* errorName = _errorNames[_errorID]; TIXMLASSERT( errorName && errorName[0] ); return errorName; } -const char* XMLDocument::ErrorStr() const -{ - return _errorStr.Empty() ? "" : _errorStr.GetStr(); -} - - void XMLDocument::PrintError() const { - printf("%s\n", ErrorStr()); -} + if ( Error() ) { + static const int LEN = 20; + char buf1[LEN] = { 0 }; + char buf2[LEN] = { 0 }; -const char* XMLDocument::ErrorName() const -{ - return ErrorIDToName(_errorID); + if ( _errorStr1 ) { + TIXML_SNPRINTF( buf1, LEN, "%s", _errorStr1 ); + } + if ( _errorStr2 ) { + TIXML_SNPRINTF( buf2, LEN, "%s", _errorStr2 ); + } + + // Should check INT_MIN <= _errorID && _errorId <= INT_MAX, but that + // causes a clang "always true" -Wtautological-constant-out-of-range-compare warning + TIXMLASSERT( 0 <= _errorID && XML_ERROR_COUNT - 1 <= INT_MAX ); + printf( "XMLDocument error id=%d '%s' str1=%s str2=%s\n", + static_cast( _errorID ), ErrorName(), buf1, buf2 ); + } } void XMLDocument::Parse() { TIXMLASSERT( NoChildren() ); // Clear() must have been called previously TIXMLASSERT( _charBuffer ); - _parseCurLineNum = 1; - _parseLineNum = 1; char* p = _charBuffer; - p = XMLUtil::SkipWhiteSpace( p, &_parseCurLineNum ); + p = XMLUtil::SkipWhiteSpace( p ); p = const_cast( XMLUtil::ReadBOM( p, &_writeBOM ) ); if ( !*p ) { SetError( XML_ERROR_EMPTY_DOCUMENT, 0, 0 ); return; } - ParseDeep(p, 0, &_parseCurLineNum ); -} - -void XMLDocument::PushDepth() -{ - _parsingDepth++; - if (_parsingDepth == TINYXML2_MAX_ELEMENT_DEPTH) { - SetError(XML_ELEMENT_DEPTH_EXCEEDED, _parseCurLineNum, "Element nesting is too deep." ); - } -} - -void XMLDocument::PopDepth() -{ - TIXMLASSERT(_parsingDepth > 0); - --_parsingDepth; + ParseDeep(p, 0 ); } XMLPrinter::XMLPrinter( FILE* file, bool compact, int depth ) : _elementJustOpened( false ), - _stack(), _firstElement( true ), _fp( file ), _depth( depth ), _textDepth( -1 ), _processEntities( true ), - _compactMode( compact ), - _buffer() + _compactMode( compact ) { for( int i=0; i(entityValue); - TIXMLASSERT( flagIndex < ENTITY_RANGE ); - _entityFlag[flagIndex] = true; + TIXMLASSERT( 0 <= entityValue && entityValue < ENTITY_RANGE ); + _entityFlag[ (unsigned char)entityValue ] = true; } - _restrictedEntityFlag[static_cast('&')] = true; - _restrictedEntityFlag[static_cast('<')] = true; - _restrictedEntityFlag[static_cast('>')] = true; // not required, but consistency is nice + _restrictedEntityFlag[(unsigned char)'&'] = true; + _restrictedEntityFlag[(unsigned char)'<'] = true; + _restrictedEntityFlag[(unsigned char)'>'] = true; // not required, but consistency is nice _buffer.Push( 0 ); } @@ -2602,36 +2149,10 @@ void XMLPrinter::Print( const char* format, ... ) } -void XMLPrinter::Write( const char* data, size_t size ) -{ - if ( _fp ) { - fwrite ( data , sizeof(char), size, _fp); - } - else { - char* p = _buffer.PushArr( static_cast(size) ) - 1; // back up over the null terminator. - memcpy( p, data, size ); - p[size] = 0; - } -} - - -void XMLPrinter::Putc( char ch ) -{ - if ( _fp ) { - fputc ( ch, _fp); - } - else { - char* p = _buffer.PushArr( sizeof(char) ) - 1; // back up over the null terminator. - p[0] = ch; - p[1] = 0; - } -} - - void XMLPrinter::PrintSpace( int depth ) { for( int i=0; i(*q)] ) { + if ( flag[(unsigned char)(*q)] ) { while ( p < q ) { const size_t delta = q - p; - const int toPrint = ( INT_MAX < delta ) ? INT_MAX : static_cast(delta); - Write( p, toPrint ); + // %.*s accepts type int as "precision" + const int toPrint = ( INT_MAX < delta ) ? INT_MAX : (int)delta; + Print( "%.*s", toPrint, p ); p += toPrint; } bool entityPatternPrinted = false; for( int i=0; i(delta); - Write( p, toPrint ); - } } - else { - Write( p ); + // Flush the remaining string. This will be the entire + // string if an entity wasn't found. + TIXMLASSERT( p <= q ); + if ( !_processEntities || ( p < q ) ) { + Print( "%s", p ); } } @@ -2695,40 +2211,29 @@ void XMLPrinter::PushHeader( bool writeBOM, bool writeDec ) { if ( writeBOM ) { static const unsigned char bom[] = { TIXML_UTF_LEAD_0, TIXML_UTF_LEAD_1, TIXML_UTF_LEAD_2, 0 }; - Write( reinterpret_cast< const char* >( bom ) ); + Print( "%s", bom ); } if ( writeDec ) { PushDeclaration( "xml version=\"1.0\"" ); } } -void XMLPrinter::PrepareForNewNode( bool compactMode ) + +void XMLPrinter::OpenElement( const char* name, bool compactMode ) { SealElementIfJustOpened(); + _stack.Push( name ); - if ( compactMode ) { - return; + if ( _textDepth < 0 && !_firstElement && !compactMode ) { + Print( "\n" ); } - - if ( _firstElement ) { - PrintSpace (_depth); - } else if ( _textDepth < 0) { - Putc( '\n' ); + if ( !compactMode ) { PrintSpace( _depth ); } - _firstElement = false; -} - -void XMLPrinter::OpenElement( const char* name, bool compactMode ) -{ - PrepareForNewNode( compactMode ); - _stack.Push( name ); - - Write ( "<" ); - Write ( name ); - + Print( "<%s", name ); _elementJustOpened = true; + _firstElement = false; ++_depth; } @@ -2736,11 +2241,9 @@ void XMLPrinter::OpenElement( const char* name, bool compactMode ) void XMLPrinter::PushAttribute( const char* name, const char* value ) { TIXMLASSERT( _elementJustOpened ); - Putc ( ' ' ); - Write( name ); - Write( "=\"" ); + Print( " %s=\"", name ); PrintString( value, false ); - Putc ( '\"' ); + Print( "\"" ); } @@ -2760,22 +2263,6 @@ void XMLPrinter::PushAttribute( const char* name, unsigned v ) } -void XMLPrinter::PushAttribute(const char* name, int64_t v) -{ - char buf[BUF_SIZE]; - XMLUtil::ToStr(v, buf, BUF_SIZE); - PushAttribute(name, buf); -} - - -void XMLPrinter::PushAttribute(const char* name, uint64_t v) -{ - char buf[BUF_SIZE]; - XMLUtil::ToStr(v, buf, BUF_SIZE); - PushAttribute(name, buf); -} - - void XMLPrinter::PushAttribute( const char* name, bool v ) { char buf[BUF_SIZE]; @@ -2798,23 +2285,21 @@ void XMLPrinter::CloseElement( bool compactMode ) const char* name = _stack.Pop(); if ( _elementJustOpened ) { - Write( "/>" ); + Print( "/>" ); } else { if ( _textDepth < 0 && !compactMode) { - Putc( '\n' ); + Print( "\n" ); PrintSpace( _depth ); } - Write ( "" ); + Print( "", name ); } if ( _textDepth == _depth ) { _textDepth = -1; } if ( _depth == 0 && !compactMode) { - Putc( '\n' ); + Print( "\n" ); } _elementJustOpened = false; } @@ -2826,7 +2311,7 @@ void XMLPrinter::SealElementIfJustOpened() return; } _elementJustOpened = false; - Putc( '>' ); + Print( ">" ); } @@ -2836,32 +2321,13 @@ void XMLPrinter::PushText( const char* text, bool cdata ) SealElementIfJustOpened(); if ( cdata ) { - Write( "" ); + Print( "", text ); } else { PrintString( text, true ); } } - -void XMLPrinter::PushText( int64_t value ) -{ - char buf[BUF_SIZE]; - XMLUtil::ToStr( value, buf, BUF_SIZE ); - PushText( buf, false ); -} - - -void XMLPrinter::PushText( uint64_t value ) -{ - char buf[BUF_SIZE]; - XMLUtil::ToStr(value, buf, BUF_SIZE); - PushText(buf, false); -} - - void XMLPrinter::PushText( int value ) { char buf[BUF_SIZE]; @@ -2904,31 +2370,37 @@ void XMLPrinter::PushText( double value ) void XMLPrinter::PushComment( const char* comment ) { - PrepareForNewNode( _compactMode ); - - Write( "" ); + SealElementIfJustOpened(); + if ( _textDepth < 0 && !_firstElement && !_compactMode) { + Print( "\n" ); + PrintSpace( _depth ); + } + _firstElement = false; + Print( "", comment ); } void XMLPrinter::PushDeclaration( const char* value ) { - PrepareForNewNode( _compactMode ); - - Write( "" ); + SealElementIfJustOpened(); + if ( _textDepth < 0 && !_firstElement && !_compactMode) { + Print( "\n" ); + PrintSpace( _depth ); + } + _firstElement = false; + Print( "", value ); } void XMLPrinter::PushUnknown( const char* value ) { - PrepareForNewNode( _compactMode ); - - Write( "' ); + SealElementIfJustOpened(); + if ( _textDepth < 0 && !_firstElement && !_compactMode) { + Print( "\n" ); + PrintSpace( _depth ); + } + _firstElement = false; + Print( "", value ); } @@ -2992,3 +2464,4 @@ bool XMLPrinter::Visit( const XMLUnknown& unknown ) } } // namespace tinyxml2 + diff --git a/interfaces/private/xpcf/tinyxml2.h b/src/tinyxml2.h similarity index 75% rename from interfaces/private/xpcf/tinyxml2.h rename to src/tinyxml2.h index 8f7a7a1..06eee30 100644 --- a/interfaces/private/xpcf/tinyxml2.h +++ b/src/tinyxml2.h @@ -30,9 +30,6 @@ distribution. # include # include # include -# if defined(__PS3__) -# include -# endif #else # include # include @@ -40,22 +37,21 @@ distribution. # include # include #endif -#include /* TODO: intern strings instead of allocation. */ /* gcc: - g++ -Wall -DTINYXML2_DEBUG tinyxml2.cpp xmltest.cpp -o gccxmltest.exe + g++ -Wall -DDEBUG tinyxml2.cpp xmltest.cpp -o gccxmltest.exe Formatting, Artistic Style: AStyle.exe --style=1tbs --indent-switches --break-closing-brackets --indent-preprocessor tinyxml2.cpp tinyxml2.h */ -#if defined( _DEBUG ) || defined (__DEBUG__) -# ifndef TINYXML2_DEBUG -# define TINYXML2_DEBUG +#if defined( _DEBUG ) || defined( DEBUG ) || defined (__DEBUG__) +# ifndef DEBUG +# define DEBUG # endif #endif @@ -72,48 +68,34 @@ distribution. # else # define TINYXML2_LIB # endif -#elif __GNUC__ >= 4 -# define TINYXML2_LIB __attribute__((visibility("default"))) #else # define TINYXML2_LIB #endif -#if !defined(TIXMLASSERT) -#if defined(TINYXML2_DEBUG) +#if defined(DEBUG) # if defined(_MSC_VER) # // "(void)0," is for suppressing C4127 warning in "assert(false)", "assert(true)" and the like -# define TIXMLASSERT( x ) do { if ( !((void)0,(x))) { __debugbreak(); } } while(false) +# define TIXMLASSERT( x ) if ( !((void)0,(x))) { __debugbreak(); } # elif defined (ANDROID_NDK) # include -# define TIXMLASSERT( x ) do { if ( !(x)) { __android_log_assert( "assert", "grinliz", "ASSERT in '%s' at %d.", __FILE__, __LINE__ ); } } while(false) +# define TIXMLASSERT( x ) if ( !(x)) { __android_log_assert( "assert", "grinliz", "ASSERT in '%s' at %d.", __FILE__, __LINE__ ); } # else # include # define TIXMLASSERT assert # endif #else -# define TIXMLASSERT( x ) do {} while(false) -#endif +# define TIXMLASSERT( x ) {} #endif + /* Versioning, past 1.0.14: http://semver.org/ */ -static const int TIXML2_MAJOR_VERSION = 9; +static const int TIXML2_MAJOR_VERSION = 3; static const int TIXML2_MINOR_VERSION = 0; static const int TIXML2_PATCH_VERSION = 0; -#define TINYXML2_MAJOR_VERSION 9 -#define TINYXML2_MINOR_VERSION 0 -#define TINYXML2_PATCH_VERSION 0 - -// A fixed element depth limit is problematic. There needs to be a -// limit to avoid a stack overflow. However, that limit varies per -// system, and the capacity of the stack. On the other hand, it's a trivial -// attack that can result from ill, malicious, or even correctly formed XML, -// so there needs to be a limit in place. -static const int TINYXML2_MAX_ELEMENT_DEPTH = 500; - namespace tinyxml2 { class XMLDocument; @@ -130,31 +112,27 @@ class XMLPrinter; pointers into the XML file itself, and will apply normalization and entity translation if actually read. Can also store (and memory manage) a traditional char[] - - Isn't clear why TINYXML2_LIB is needed; but seems to fix #719 */ -class TINYXML2_LIB StrPair +class StrPair { public: - enum Mode { + enum { NEEDS_ENTITY_PROCESSING = 0x01, NEEDS_NEWLINE_NORMALIZATION = 0x02, NEEDS_WHITESPACE_COLLAPSING = 0x04, - TEXT_ELEMENT = NEEDS_ENTITY_PROCESSING | NEEDS_NEWLINE_NORMALIZATION, + TEXT_ELEMENT = NEEDS_ENTITY_PROCESSING | NEEDS_NEWLINE_NORMALIZATION, TEXT_ELEMENT_LEAVE_ENTITIES = NEEDS_NEWLINE_NORMALIZATION, - ATTRIBUTE_NAME = 0, - ATTRIBUTE_VALUE = NEEDS_ENTITY_PROCESSING | NEEDS_NEWLINE_NORMALIZATION, - ATTRIBUTE_VALUE_LEAVE_ENTITIES = NEEDS_NEWLINE_NORMALIZATION, - COMMENT = NEEDS_NEWLINE_NORMALIZATION + ATTRIBUTE_NAME = 0, + ATTRIBUTE_VALUE = NEEDS_ENTITY_PROCESSING | NEEDS_NEWLINE_NORMALIZATION, + ATTRIBUTE_VALUE_LEAVE_ENTITIES = NEEDS_NEWLINE_NORMALIZATION, + COMMENT = NEEDS_NEWLINE_NORMALIZATION }; StrPair() : _flags( 0 ), _start( 0 ), _end( 0 ) {} ~StrPair(); void Set( char* start, char* end, int flags ) { - TIXMLASSERT( start ); - TIXMLASSERT( end ); Reset(); _start = start; _end = end; @@ -174,13 +152,13 @@ class TINYXML2_LIB StrPair void SetStr( const char* str, int flags=0 ); - char* ParseText( char* in, const char* endTag, int strFlags, int* curLineNumPtr ); + char* ParseText( char* in, const char* endTag, int strFlags ); char* ParseName( char* in ); void TransferTo( StrPair* other ); - void Reset(); private: + void Reset(); void CollapseWhitespace(); enum { @@ -193,7 +171,7 @@ class TINYXML2_LIB StrPair char* _end; StrPair( const StrPair& other ); // not supported - void operator=( const StrPair& other ); // not supported, use TransferTo() + void operator=( StrPair& other ); // not supported, use TransferTo() }; @@ -206,11 +184,10 @@ template class DynArray { public: - DynArray() : - _mem( _pool ), - _allocated( INITIAL_SIZE ), - _size( 0 ) - { + DynArray() { + _mem = _pool; + _allocated = INITIAL_SIZE; + _size = 0; } ~DynArray() { @@ -226,8 +203,7 @@ class DynArray void Push( T t ) { TIXMLASSERT( _size < INT_MAX ); EnsureCapacity( _size+1 ); - _mem[_size] = t; - ++_size; + _mem[_size++] = t; } T* PushArr( int count ) { @@ -241,8 +217,7 @@ class DynArray T Pop() { TIXMLASSERT( _size > 0 ); - --_size; - return _mem[_size]; + return _mem[--_size]; } void PopArr( int count ) { @@ -279,19 +254,12 @@ class DynArray return _allocated; } - void SwapRemove(int i) { - TIXMLASSERT(i >= 0 && i < _size); - TIXMLASSERT(_size > 0); - _mem[i] = _mem[_size - 1]; - --_size; - } - const T* Mem() const { TIXMLASSERT( _mem ); return _mem; } - T* Mem() { + T* Mem() { TIXMLASSERT( _mem ); return _mem; } @@ -304,9 +272,8 @@ class DynArray TIXMLASSERT( cap > 0 ); if ( cap > _allocated ) { TIXMLASSERT( cap <= INT_MAX / 2 ); - const int newAllocated = cap * 2; + int newAllocated = cap * 2; T* newMem = new T[newAllocated]; - TIXMLASSERT( newAllocated >= _size ); memcpy( newMem, _mem, sizeof(T)*_size ); // warning: not using constructors, only works for PODs if ( _mem != _pool ) { delete [] _mem; @@ -337,26 +304,27 @@ class MemPool virtual void* Alloc() = 0; virtual void Free( void* ) = 0; virtual void SetTracked() = 0; + virtual void Clear() = 0; }; /* Template child class to create pools of the correct type. */ -template< int ITEM_SIZE > +template< int SIZE > class MemPoolT : public MemPool { public: - MemPoolT() : _blockPtrs(), _root(0), _currentAllocs(0), _nAllocs(0), _maxAllocs(0), _nUntracked(0) {} + MemPoolT() : _root(0), _currentAllocs(0), _nAllocs(0), _maxAllocs(0), _nUntracked(0) {} ~MemPoolT() { - MemPoolT< ITEM_SIZE >::Clear(); + Clear(); } - + void Clear() { // Delete the blocks. while( !_blockPtrs.Empty()) { - Block* lastBlock = _blockPtrs.Pop(); - delete lastBlock; + Block* b = _blockPtrs.Pop(); + delete b; } _root = 0; _currentAllocs = 0; @@ -366,7 +334,7 @@ class MemPoolT : public MemPool } virtual int ItemSize() const { - return ITEM_SIZE; + return SIZE; } int CurrentAllocs() const { return _currentAllocs; @@ -375,49 +343,46 @@ class MemPoolT : public MemPool virtual void* Alloc() { if ( !_root ) { // Need a new block. - Block* block = new Block; + Block* block = new Block(); _blockPtrs.Push( block ); - Item* blockItems = block->items; - for( int i = 0; i < ITEMS_PER_BLOCK - 1; ++i ) { - blockItems[i].next = &(blockItems[i + 1]); + for( int i=0; ichunk[i].next = &block->chunk[i+1]; } - blockItems[ITEMS_PER_BLOCK - 1].next = 0; - _root = blockItems; + block->chunk[COUNT-1].next = 0; + _root = block->chunk; } - Item* const result = _root; - TIXMLASSERT( result != 0 ); + void* result = _root; _root = _root->next; ++_currentAllocs; if ( _currentAllocs > _maxAllocs ) { _maxAllocs = _currentAllocs; } - ++_nAllocs; - ++_nUntracked; + _nAllocs++; + _nUntracked++; return result; } - + virtual void Free( void* mem ) { if ( !mem ) { return; } --_currentAllocs; - Item* item = static_cast( mem ); -#ifdef TINYXML2_DEBUG - memset( item, 0xfe, sizeof( *item ) ); + Chunk* chunk = static_cast( mem ); +#ifdef DEBUG + memset( chunk, 0xfe, sizeof(Chunk) ); #endif - item->next = _root; - _root = item; + chunk->next = _root; + _root = chunk; } void Trace( const char* name ) { printf( "Mempool %s watermark=%d [%dk] current=%d size=%d nAlloc=%d blocks=%d\n", - name, _maxAllocs, _maxAllocs * ITEM_SIZE / 1024, _currentAllocs, - ITEM_SIZE, _nAllocs, _blockPtrs.Size() ); + name, _maxAllocs, _maxAllocs*SIZE/1024, _currentAllocs, SIZE, _nAllocs, _blockPtrs.Size() ); } void SetTracked() { - --_nUntracked; + _nUntracked--; } int Untracked() const { @@ -433,23 +398,21 @@ class MemPoolT : public MemPool // 16k: 5200 // 32k: 4300 // 64k: 4000 21000 - // Declared public because some compilers do not accept to use ITEMS_PER_BLOCK - // in private part if ITEMS_PER_BLOCK is private - enum { ITEMS_PER_BLOCK = (4 * 1024) / ITEM_SIZE }; + enum { COUNT = (4*1024)/SIZE }; // Some compilers do not accept to use COUNT in private part if COUNT is private private: MemPoolT( const MemPoolT& ); // not supported void operator=( const MemPoolT& ); // not supported - union Item { - Item* next; - char itemData[ITEM_SIZE]; + union Chunk { + Chunk* next; + char mem[SIZE]; }; struct Block { - Item items[ITEMS_PER_BLOCK]; + Chunk chunk[COUNT]; }; DynArray< Block*, 10 > _blockPtrs; - Item* _root; + Chunk* _root; int _currentAllocs; int _nAllocs; @@ -522,13 +485,16 @@ class TINYXML2_LIB XMLVisitor // WARNING: must match XMLDocument::_errorNames[] enum XMLError { XML_SUCCESS = 0, + XML_NO_ERROR = 0, XML_NO_ATTRIBUTE, XML_WRONG_ATTRIBUTE_TYPE, XML_ERROR_FILE_NOT_FOUND, XML_ERROR_FILE_COULD_NOT_BE_OPENED, XML_ERROR_FILE_READ_ERROR, + XML_ERROR_ELEMENT_MISMATCH, XML_ERROR_PARSING_ELEMENT, XML_ERROR_PARSING_ATTRIBUTE, + XML_ERROR_IDENTIFYING_TAG, XML_ERROR_PARSING_TEXT, XML_ERROR_PARSING_CDATA, XML_ERROR_PARSING_COMMENT, @@ -539,7 +505,6 @@ enum XMLError { XML_ERROR_PARSING, XML_CAN_NOT_CONVERT_TEXT, XML_NO_TEXT_NODE, - XML_ELEMENT_DEPTH_EXCEEDED, XML_ERROR_COUNT }; @@ -548,23 +513,19 @@ enum XMLError { /* Utility functionality. */ -class TINYXML2_LIB XMLUtil +class XMLUtil { public: - static const char* SkipWhiteSpace( const char* p, int* curLineNumPtr ) { + static const char* SkipWhiteSpace( const char* p ) { TIXMLASSERT( p ); - while( IsWhiteSpace(*p) ) { - if (curLineNumPtr && *p == '\n') { - ++(*curLineNumPtr); - } ++p; } TIXMLASSERT( p ); return p; } - static char* SkipWhiteSpace( char* const p, int* curLineNumPtr ) { - return const_cast( SkipWhiteSpace( const_cast(p), curLineNumPtr ) ); + static char* SkipWhiteSpace( char* p ) { + return const_cast( SkipWhiteSpace( const_cast(p) ) ); } // Anything in the high order range of UTF-8 is assumed to not be whitespace. This isn't @@ -572,7 +533,7 @@ class TINYXML2_LIB XMLUtil static bool IsWhiteSpace( char p ) { return !IsUTF8Continuation(p) && isspace( static_cast(p) ); } - + inline static bool IsNameStartChar( unsigned char ch ) { if ( ch >= 128 ) { // This is a heuristic guess in attempt to not implement Unicode-aware isalpha() @@ -583,7 +544,7 @@ class TINYXML2_LIB XMLUtil } return ch == ':' || ch == '_'; } - + inline static bool IsNameChar( unsigned char ch ) { return IsNameStartChar( ch ) || isdigit( ch ) @@ -591,22 +552,14 @@ class TINYXML2_LIB XMLUtil || ch == '-'; } - inline static bool IsPrefixHex( const char* p) { - p = SkipWhiteSpace(p, 0); - return p && *p == '0' && ( *(p + 1) == 'x' || *(p + 1) == 'X'); - } - inline static bool StringEqual( const char* p, const char* q, int nChar=INT_MAX ) { if ( p == q ) { return true; } - TIXMLASSERT( p ); - TIXMLASSERT( q ); - TIXMLASSERT( nChar >= 0 ); return strncmp( p, q, nChar ) == 0; } - - inline static bool IsUTF8Continuation( const char p ) { + + inline static bool IsUTF8Continuation( char p ) { return ( p & 0x80 ) != 0; } @@ -622,8 +575,6 @@ class TINYXML2_LIB XMLUtil static void ToStr( bool v, char* buffer, int bufferSize ); static void ToStr( float v, char* buffer, int bufferSize ); static void ToStr( double v, char* buffer, int bufferSize ); - static void ToStr(int64_t v, char* buffer, int bufferSize); - static void ToStr(uint64_t v, char* buffer, int bufferSize); // converts strings to primitive types static bool ToInt( const char* str, int* value ); @@ -631,18 +582,6 @@ class TINYXML2_LIB XMLUtil static bool ToBool( const char* str, bool* value ); static bool ToFloat( const char* str, float* value ); static bool ToDouble( const char* str, double* value ); - static bool ToInt64(const char* str, int64_t* value); - static bool ToUnsigned64(const char* str, uint64_t* value); - // Changes what is serialized for a boolean value. - // Default to "true" and "false". Shouldn't be changed - // unless you have a special testing or compatibility need. - // Be careful: static, global, & not thread safe. - // Be sure to set static const memory as parameters. - static void SetBoolSerialization(const char* writeTrue, const char* writeFalse); - -private: - static const char* writeBoolTrue; - static const char* writeBoolFalse; }; @@ -748,9 +687,6 @@ class TINYXML2_LIB XMLNode */ void SetValue( const char* val, bool staticMem=false ); - /// Gets the line number the node is in, if the document was parsed from a file. - int GetLineNum() const { return _parseLineNum; } - /// Get the parent of this node on the DOM. const XMLNode* Parent() const { return _parent; @@ -884,21 +820,6 @@ class TINYXML2_LIB XMLNode */ virtual XMLNode* ShallowClone( XMLDocument* document ) const = 0; - /** - Make a copy of this node and all its children. - - If the 'target' is null, then the nodes will - be allocated in the current document. If 'target' - is specified, the memory will be allocated is the - specified XMLDocument. - - NOTE: This is probably not the correct tool to - copy a document, since XMLDocuments can have multiple - top level XMLNodes. You probably want to use - XMLDocument::DeepCopy() - */ - XMLNode* DeepClone( XMLDocument* target ) const; - /** Test if 2 nodes are the same, but don't test children. The 2 nodes do not need to be in the same Document. @@ -931,30 +852,15 @@ class TINYXML2_LIB XMLNode */ virtual bool Accept( XMLVisitor* visitor ) const = 0; - /** - Set user data into the XMLNode. TinyXML-2 in - no way processes or interprets user data. - It is initially 0. - */ - void SetUserData(void* userData) { _userData = userData; } - - /** - Get user data set into the XMLNode. TinyXML-2 in - no way processes or interprets user data. - It is initially 0. - */ - void* GetUserData() const { return _userData; } - protected: - explicit XMLNode( XMLDocument* ); + XMLNode( XMLDocument* ); virtual ~XMLNode(); - virtual char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr); + virtual char* ParseDeep( char*, StrPair* ); XMLDocument* _document; XMLNode* _parent; mutable StrPair _value; - int _parseLineNum; XMLNode* _firstChild; XMLNode* _lastChild; @@ -962,14 +868,11 @@ class TINYXML2_LIB XMLNode XMLNode* _prev; XMLNode* _next; - void* _userData; - private: MemPool* _memPool; void Unlink( XMLNode* child ); static void DeleteNode( XMLNode* node ); void InsertChildPreamble( XMLNode* insertThis ) const; - const XMLElement* ToElementWithName( const char* name ) const; XMLNode( const XMLNode& ); // not supported XMLNode& operator=( const XMLNode& ); // not supported @@ -990,6 +893,7 @@ class TINYXML2_LIB XMLNode */ class TINYXML2_LIB XMLText : public XMLNode { + friend class XMLBase; friend class XMLDocument; public: virtual bool Accept( XMLVisitor* visitor ) const; @@ -1014,10 +918,10 @@ class TINYXML2_LIB XMLText : public XMLNode virtual bool ShallowEqual( const XMLNode* compare ) const; protected: - explicit XMLText( XMLDocument* doc ) : XMLNode( doc ), _isCData( false ) {} + XMLText( XMLDocument* doc ) : XMLNode( doc ), _isCData( false ) {} virtual ~XMLText() {} - char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ); + char* ParseDeep( char*, StrPair* endTag ); private: bool _isCData; @@ -1045,10 +949,10 @@ class TINYXML2_LIB XMLComment : public XMLNode virtual bool ShallowEqual( const XMLNode* compare ) const; protected: - explicit XMLComment( XMLDocument* doc ); + XMLComment( XMLDocument* doc ); virtual ~XMLComment(); - char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr); + char* ParseDeep( char*, StrPair* endTag ); private: XMLComment( const XMLComment& ); // not supported @@ -1084,10 +988,10 @@ class TINYXML2_LIB XMLDeclaration : public XMLNode virtual bool ShallowEqual( const XMLNode* compare ) const; protected: - explicit XMLDeclaration( XMLDocument* doc ); + XMLDeclaration( XMLDocument* doc ); virtual ~XMLDeclaration(); - char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ); + char* ParseDeep( char*, StrPair* endTag ); private: XMLDeclaration( const XMLDeclaration& ); // not supported @@ -1119,10 +1023,10 @@ class TINYXML2_LIB XMLUnknown : public XMLNode virtual bool ShallowEqual( const XMLNode* compare ) const; protected: - explicit XMLUnknown( XMLDocument* doc ); + XMLUnknown( XMLDocument* doc ); virtual ~XMLUnknown(); - char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ); + char* ParseDeep( char*, StrPair* endTag ); private: XMLUnknown( const XMLUnknown& ); // not supported @@ -1147,9 +1051,6 @@ class TINYXML2_LIB XMLAttribute /// The value of the attribute. const char* Value() const; - /// Gets the line number the attribute is in, if the document was parsed from a file. - int GetLineNum() const { return _parseLineNum; } - /// The next attribute in the list. const XMLAttribute* Next() const { return _next; @@ -1159,24 +1060,11 @@ class TINYXML2_LIB XMLAttribute If the value isn't an integer, 0 will be returned. There is no error checking; use QueryIntValue() if you need error checking. */ - int IntValue() const { - int i = 0; - QueryIntValue(&i); - return i; - } - - int64_t Int64Value() const { - int64_t i = 0; - QueryInt64Value(&i); - return i; - } - - uint64_t Unsigned64Value() const { - uint64_t i = 0; - QueryUnsigned64Value(&i); + int IntValue() const { + int i=0; + QueryIntValue( &i ); return i; } - /// Query as an unsigned integer. See IntValue() unsigned UnsignedValue() const { unsigned i=0; @@ -1203,17 +1091,13 @@ class TINYXML2_LIB XMLAttribute } /** QueryIntValue interprets the attribute as an integer, and returns the value - in the provided parameter. The function will return XML_SUCCESS on success, + in the provided parameter. The function will return XML_NO_ERROR on success, and XML_WRONG_ATTRIBUTE_TYPE if the conversion is not successful. */ XMLError QueryIntValue( int* value ) const; /// See QueryIntValue XMLError QueryUnsignedValue( unsigned int* value ) const; - /// See QueryIntValue - XMLError QueryInt64Value(int64_t* value) const; /// See QueryIntValue - XMLError QueryUnsigned64Value(uint64_t* value) const; - /// See QueryIntValue XMLError QueryBoolValue( bool* value ) const; /// See QueryIntValue XMLError QueryDoubleValue( double* value ) const; @@ -1226,10 +1110,6 @@ class TINYXML2_LIB XMLAttribute void SetAttribute( int value ); /// Set the attribute to value. void SetAttribute( unsigned value ); - /// Set the attribute to value. - void SetAttribute(int64_t value); - /// Set the attribute to value. - void SetAttribute(uint64_t value); /// Set the attribute to value. void SetAttribute( bool value ); /// Set the attribute to value. @@ -1240,18 +1120,17 @@ class TINYXML2_LIB XMLAttribute private: enum { BUF_SIZE = 200 }; - XMLAttribute() : _name(), _value(),_parseLineNum( 0 ), _next( 0 ), _memPool( 0 ) {} + XMLAttribute() : _next( 0 ), _memPool( 0 ) {} virtual ~XMLAttribute() {} XMLAttribute( const XMLAttribute& ); // not supported void operator=( const XMLAttribute& ); // not supported void SetName( const char* name ); - char* ParseDeep( char* p, bool processEntities, int* curLineNumPtr ); + char* ParseDeep( char* p, bool processEntities ); mutable StrPair _name; mutable StrPair _value; - int _parseLineNum; XMLAttribute* _next; MemPool* _memPool; }; @@ -1263,6 +1142,7 @@ class TINYXML2_LIB XMLAttribute */ class TINYXML2_LIB XMLElement : public XMLNode { + friend class XMLBase; friend class XMLDocument; public: /// Get the name of an element (which is the Value() of the node.) @@ -1308,27 +1188,42 @@ class TINYXML2_LIB XMLElement : public XMLNode const char* Attribute( const char* name, const char* value=0 ) const; /** Given an attribute name, IntAttribute() returns the value - of the attribute interpreted as an integer. The default - value will be returned if the attribute isn't present, - or if there is an error. (For a method with error - checking, see QueryIntAttribute()). + of the attribute interpreted as an integer. 0 will be + returned if there is an error. For a method with error + checking, see QueryIntAttribute() */ - int IntAttribute(const char* name, int defaultValue = 0) const; + int IntAttribute( const char* name ) const { + int i=0; + QueryIntAttribute( name, &i ); + return i; + } /// See IntAttribute() - unsigned UnsignedAttribute(const char* name, unsigned defaultValue = 0) const; - /// See IntAttribute() - int64_t Int64Attribute(const char* name, int64_t defaultValue = 0) const; + unsigned UnsignedAttribute( const char* name ) const { + unsigned i=0; + QueryUnsignedAttribute( name, &i ); + return i; + } /// See IntAttribute() - uint64_t Unsigned64Attribute(const char* name, uint64_t defaultValue = 0) const; - /// See IntAttribute() - bool BoolAttribute(const char* name, bool defaultValue = false) const; + bool BoolAttribute( const char* name ) const { + bool b=false; + QueryBoolAttribute( name, &b ); + return b; + } /// See IntAttribute() - double DoubleAttribute(const char* name, double defaultValue = 0) const; + double DoubleAttribute( const char* name ) const { + double d=0; + QueryDoubleAttribute( name, &d ); + return d; + } /// See IntAttribute() - float FloatAttribute(const char* name, float defaultValue = 0) const; + float FloatAttribute( const char* name ) const { + float f=0; + QueryFloatAttribute( name, &f ); + return f; + } /** Given an attribute name, QueryIntAttribute() returns - XML_SUCCESS, XML_WRONG_ATTRIBUTE_TYPE if the conversion + XML_NO_ERROR, XML_WRONG_ATTRIBUTE_TYPE if the conversion can't be performed, or XML_NO_ATTRIBUTE if the attribute doesn't exist. If successful, the result of the conversion will be written to 'value'. If not successful, nothing will @@ -1347,8 +1242,7 @@ class TINYXML2_LIB XMLElement : public XMLNode } return a->QueryIntValue( value ); } - - /// See QueryIntAttribute() + /// See QueryIntAttribute() XMLError QueryUnsignedAttribute( const char* name, unsigned int* value ) const { const XMLAttribute* a = FindAttribute( name ); if ( !a ) { @@ -1356,26 +1250,7 @@ class TINYXML2_LIB XMLElement : public XMLNode } return a->QueryUnsignedValue( value ); } - - /// See QueryIntAttribute() - XMLError QueryInt64Attribute(const char* name, int64_t* value) const { - const XMLAttribute* a = FindAttribute(name); - if (!a) { - return XML_NO_ATTRIBUTE; - } - return a->QueryInt64Value(value); - } - /// See QueryIntAttribute() - XMLError QueryUnsigned64Attribute(const char* name, uint64_t* value) const { - const XMLAttribute* a = FindAttribute(name); - if(!a) { - return XML_NO_ATTRIBUTE; - } - return a->QueryUnsigned64Value(value); - } - - /// See QueryIntAttribute() XMLError QueryBoolAttribute( const char* name, bool* value ) const { const XMLAttribute* a = FindAttribute( name ); if ( !a ) { @@ -1400,25 +1275,14 @@ class TINYXML2_LIB XMLElement : public XMLNode return a->QueryFloatValue( value ); } - /// See QueryIntAttribute() - XMLError QueryStringAttribute(const char* name, const char** value) const { - const XMLAttribute* a = FindAttribute(name); - if (!a) { - return XML_NO_ATTRIBUTE; - } - *value = a->Value(); - return XML_SUCCESS; - } - - - + /** Given an attribute name, QueryAttribute() returns - XML_SUCCESS, XML_WRONG_ATTRIBUTE_TYPE if the conversion + XML_NO_ERROR, XML_WRONG_ATTRIBUTE_TYPE if the conversion can't be performed, or XML_NO_ATTRIBUTE if the attribute doesn't exist. It is overloaded for the primitive types, and is a generally more convenient replacement of QueryIntAttribute() and related functions. - + If successful, the result of the conversion will be written to 'value'. If not successful, nothing will be written to 'value'. This allows you to provide default @@ -1429,38 +1293,26 @@ class TINYXML2_LIB XMLElement : public XMLNode QueryAttribute( "foo", &value ); // if "foo" isn't found, value will still be 10 @endverbatim */ - XMLError QueryAttribute( const char* name, int* value ) const { + int QueryAttribute( const char* name, int* value ) const { return QueryIntAttribute( name, value ); } - XMLError QueryAttribute( const char* name, unsigned int* value ) const { + int QueryAttribute( const char* name, unsigned int* value ) const { return QueryUnsignedAttribute( name, value ); } - XMLError QueryAttribute(const char* name, int64_t* value) const { - return QueryInt64Attribute(name, value); - } - - XMLError QueryAttribute(const char* name, uint64_t* value) const { - return QueryUnsigned64Attribute(name, value); - } - - XMLError QueryAttribute( const char* name, bool* value ) const { + int QueryAttribute( const char* name, bool* value ) const { return QueryBoolAttribute( name, value ); } - XMLError QueryAttribute( const char* name, double* value ) const { + int QueryAttribute( const char* name, double* value ) const { return QueryDoubleAttribute( name, value ); } - XMLError QueryAttribute( const char* name, float* value ) const { + int QueryAttribute( const char* name, float* value ) const { return QueryFloatAttribute( name, value ); } - XMLError QueryAttribute(const char* name, const char** value) const { - return QueryStringAttribute(name, value); - } - /// Sets the named attribute to value. void SetAttribute( const char* name, const char* value ) { XMLAttribute* a = FindOrCreateAttribute( name ); @@ -1476,19 +1328,6 @@ class TINYXML2_LIB XMLElement : public XMLNode XMLAttribute* a = FindOrCreateAttribute( name ); a->SetAttribute( value ); } - - /// Sets the named attribute to value. - void SetAttribute(const char* name, int64_t value) { - XMLAttribute* a = FindOrCreateAttribute(name); - a->SetAttribute(value); - } - - /// Sets the named attribute to value. - void SetAttribute(const char* name, uint64_t value) { - XMLAttribute* a = FindOrCreateAttribute(name); - a->SetAttribute(value); - } - /// Sets the named attribute to value. void SetAttribute( const char* name, bool value ) { XMLAttribute* a = FindOrCreateAttribute( name ); @@ -1571,7 +1410,7 @@ class TINYXML2_LIB XMLElement : public XMLNode @verbatim Hullaballoo!This is text @endverbatim - + For this XML: @verbatim @@ -1585,17 +1424,13 @@ class TINYXML2_LIB XMLElement : public XMLNode /// Convenience method for setting text inside an element. See SetText() for important limitations. void SetText( int value ); /// Convenience method for setting text inside an element. See SetText() for important limitations. - void SetText( unsigned value ); - /// Convenience method for setting text inside an element. See SetText() for important limitations. - void SetText(int64_t value); + void SetText( unsigned value ); /// Convenience method for setting text inside an element. See SetText() for important limitations. - void SetText(uint64_t value); - /// Convenience method for setting text inside an element. See SetText() for important limitations. - void SetText( bool value ); + void SetText( bool value ); /// Convenience method for setting text inside an element. See SetText() for important limitations. - void SetText( double value ); + void SetText( double value ); /// Convenience method for setting text inside an element. See SetText() for important limitations. - void SetText( float value ); + void SetText( float value ); /** Convenience method to query the value of a child text node. This is probably best @@ -1626,61 +1461,27 @@ class TINYXML2_LIB XMLElement : public XMLNode XMLError QueryIntText( int* ival ) const; /// See QueryIntText() XMLError QueryUnsignedText( unsigned* uval ) const; - /// See QueryIntText() - XMLError QueryInt64Text(int64_t* uval) const; - /// See QueryIntText() - XMLError QueryUnsigned64Text(uint64_t* uval) const; - /// See QueryIntText() + /// See QueryIntText() XMLError QueryBoolText( bool* bval ) const; /// See QueryIntText() XMLError QueryDoubleText( double* dval ) const; /// See QueryIntText() XMLError QueryFloatText( float* fval ) const; - int IntText(int defaultValue = 0) const; - - /// See QueryIntText() - unsigned UnsignedText(unsigned defaultValue = 0) const; - /// See QueryIntText() - int64_t Int64Text(int64_t defaultValue = 0) const; - /// See QueryIntText() - uint64_t Unsigned64Text(uint64_t defaultValue = 0) const; - /// See QueryIntText() - bool BoolText(bool defaultValue = false) const; - /// See QueryIntText() - double DoubleText(double defaultValue = 0) const; - /// See QueryIntText() - float FloatText(float defaultValue = 0) const; - - /** - Convenience method to create a new XMLElement and add it as last (right) - child of this node. Returns the created and inserted element. - */ - XMLElement* InsertNewChildElement(const char* name); - /// See InsertNewChildElement() - XMLComment* InsertNewComment(const char* comment); - /// See InsertNewChildElement() - XMLText* InsertNewText(const char* text); - /// See InsertNewChildElement() - XMLDeclaration* InsertNewDeclaration(const char* text); - /// See InsertNewChildElement() - XMLUnknown* InsertNewUnknown(const char* text); - - // internal: - enum ElementClosingType { + enum { OPEN, // CLOSED, // CLOSING // }; - ElementClosingType ClosingType() const { + int ClosingType() const { return _closingType; } virtual XMLNode* ShallowClone( XMLDocument* document ) const; virtual bool ShallowEqual( const XMLNode* compare ) const; protected: - char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ); + char* ParseDeep( char* p, StrPair* endTag ); private: XMLElement( XMLDocument* doc ); @@ -1688,13 +1489,16 @@ class TINYXML2_LIB XMLElement : public XMLNode XMLElement( const XMLElement& ); // not supported void operator=( const XMLElement& ); // not supported + XMLAttribute* FindAttribute( const char* name ) { + return const_cast(const_cast(this)->FindAttribute( name )); + } XMLAttribute* FindOrCreateAttribute( const char* name ); - char* ParseAttributes( char* p, int* curLineNumPtr ); + //void LinkAttribute( XMLAttribute* attrib ); + char* ParseAttributes( char* p ); static void DeleteAttribute( XMLAttribute* attribute ); - XMLAttribute* CreateAttribute(); enum { BUF_SIZE = 200 }; - ElementClosingType _closingType; + int _closingType; // The attribute list is ordered; there is no 'lastAttribute' // because the list needs to be scanned for dupes before adding // a new attribute. @@ -1716,16 +1520,9 @@ enum Whitespace { class TINYXML2_LIB XMLDocument : public XMLNode { friend class XMLElement; - // Gives access to SetError and Push/PopDepth, but over-access for everything else. - // Wishing C++ had "internal" scope. - friend class XMLNode; - friend class XMLText; - friend class XMLComment; - friend class XMLDeclaration; - friend class XMLUnknown; public: /// constructor - XMLDocument( bool processEntities = true, Whitespace whitespaceMode = PRESERVE_WHITESPACE ); + XMLDocument( bool processEntities = true, Whitespace = PRESERVE_WHITESPACE ); ~XMLDocument(); virtual XMLDocument* ToDocument() { @@ -1739,7 +1536,7 @@ class TINYXML2_LIB XMLDocument : public XMLNode /** Parse an XML file from a character string. - Returns XML_SUCCESS (0) on success, or + Returns XML_NO_ERROR (0) on success, or an errorID. You may optionally pass in the 'nBytes', which is @@ -1747,31 +1544,31 @@ class TINYXML2_LIB XMLDocument : public XMLNode specified, TinyXML-2 will assume 'xml' points to a null terminated string. */ - XMLError Parse( const char* xml, size_t nBytes=static_cast(-1) ); + XMLError Parse( const char* xml, size_t nBytes=(size_t)(-1) ); /** Load an XML file from disk. - Returns XML_SUCCESS (0) on success, or + Returns XML_NO_ERROR (0) on success, or an errorID. */ XMLError LoadFile( const char* filename ); /** Load an XML file from disk. You are responsible - for providing and closing the FILE*. - + for providing and closing the FILE*. + NOTE: The file should be opened as binary ("rb") not text in order for TinyXML-2 to correctly do newline normalization. - Returns XML_SUCCESS (0) on success, or + Returns XML_NO_ERROR (0) on success, or an errorID. */ XMLError LoadFile( FILE* ); /** Save the XML file to disk. - Returns XML_SUCCESS (0) on success, or + Returns XML_NO_ERROR (0) on success, or an errorID. */ XMLError SaveFile( const char* filename, bool compact = false ); @@ -1780,7 +1577,7 @@ class TINYXML2_LIB XMLDocument : public XMLNode Save the XML file to disk. You are responsible for providing and closing the FILE*. - Returns XML_SUCCESS (0) on success, or + Returns XML_NO_ERROR (0) on success, or an errorID. */ XMLError SaveFile( FILE* fp, bool compact = false ); @@ -1789,7 +1586,7 @@ class TINYXML2_LIB XMLDocument : public XMLNode return _processEntities; } Whitespace WhitespaceMode() const { - return _whitespaceMode; + return _whitespace; } /** @@ -1874,52 +1671,35 @@ class TINYXML2_LIB XMLDocument : public XMLNode */ void DeleteNode( XMLNode* node ); - /// Clears the error flags. - void ClearError(); + void SetError( XMLError error, const char* str1, const char* str2 ); /// Return true if there was an error parsing the document. bool Error() const { - return _errorID != XML_SUCCESS; + return _errorID != XML_NO_ERROR; } /// Return the errorID. XMLError ErrorID() const { return _errorID; } const char* ErrorName() const; - static const char* ErrorIDToName(XMLError errorID); - - /** Returns a "long form" error description. A hopefully helpful - diagnostic with location, line number, and/or additional info. - */ - const char* ErrorStr() const; - /// A (trivial) utility function that prints the ErrorStr() to stdout. - void PrintError() const; - - /// Return the line where the error occurred, or zero if unknown. - int ErrorLineNum() const - { - return _errorLineNum; + /// Return a possibly helpful diagnostic location or string. + const char* GetErrorStr1() const { + return _errorStr1; } - + /// Return a possibly helpful secondary diagnostic location or string. + const char* GetErrorStr2() const { + return _errorStr2; + } + /// If there is an error, print it to stdout. + void PrintError() const; + /// Clear the document, resetting it to the initial state. void Clear(); - /** - Copies this document to a target document. - The target will be completely cleared before the copy. - If you want to copy a sub-tree, see XMLNode::DeepClone(). - - NOTE: that the 'target' must be non-null. - */ - void DeepCopy(XMLDocument* target) const; - - // internal + // internal char* Identify( char* p, XMLNode** node ); - // internal - void MarkInUse(const XMLNode* const); - virtual XMLNode* ShallowClone( XMLDocument* /*document*/ ) const { return 0; } @@ -1931,22 +1711,13 @@ class TINYXML2_LIB XMLDocument : public XMLNode XMLDocument( const XMLDocument& ); // not supported void operator=( const XMLDocument& ); // not supported - bool _writeBOM; - bool _processEntities; - XMLError _errorID; - Whitespace _whitespaceMode; - mutable StrPair _errorStr; - int _errorLineNum; - char* _charBuffer; - int _parseCurLineNum; - int _parsingDepth; - // Memory tracking does add some overhead. - // However, the code assumes that you don't - // have a bunch of unlinked nodes around. - // Therefore it takes less memory to track - // in the document vs. a linked list in the XMLNode, - // and the performance is the same. - DynArray _unlinked; + bool _writeBOM; + bool _processEntities; + XMLError _errorID; + Whitespace _whitespace; + const char* _errorStr1; + const char* _errorStr2; + char* _charBuffer; MemPoolT< sizeof(XMLElement) > _elementPool; MemPoolT< sizeof(XMLAttribute) > _attributePool; @@ -1956,43 +1727,8 @@ class TINYXML2_LIB XMLDocument : public XMLNode static const char* _errorNames[XML_ERROR_COUNT]; void Parse(); - - void SetError( XMLError error, int lineNum, const char* format, ... ); - - // Something of an obvious security hole, once it was discovered. - // Either an ill-formed XML or an excessively deep one can overflow - // the stack. Track stack depth, and error out if needed. - class DepthTracker { - public: - explicit DepthTracker(XMLDocument * document) { - this->_document = document; - document->PushDepth(); - } - ~DepthTracker() { - _document->PopDepth(); - } - private: - XMLDocument * _document; - }; - void PushDepth(); - void PopDepth(); - - template - NodeType* CreateUnlinkedNode( MemPoolT& pool ); }; -template -inline NodeType* XMLDocument::CreateUnlinkedNode( MemPoolT& pool ) -{ - TIXMLASSERT( sizeof( NodeType ) == PoolElementSize ); - TIXMLASSERT( sizeof( NodeType ) == pool.ItemSize() ); - NodeType* returnNode = new (pool.Alloc()) NodeType( this ); - TIXMLASSERT( returnNode ); - returnNode->_memPool = &pool; - - _unlinked.Push(returnNode); - return returnNode; -} /** A XMLHandle is a class that wraps a node pointer with null checks; this is @@ -2053,13 +1789,16 @@ class TINYXML2_LIB XMLHandle { public: /// Create a handle from any node (at any depth of the tree.) This can be a null pointer. - explicit XMLHandle( XMLNode* node ) : _node( node ) { + XMLHandle( XMLNode* node ) { + _node = node; } /// Create a handle from a node. - explicit XMLHandle( XMLNode& node ) : _node( &node ) { + XMLHandle( XMLNode& node ) { + _node = &node; } /// Copy constructor - XMLHandle( const XMLHandle& ref ) : _node( ref._node ) { + XMLHandle( const XMLHandle& ref ) { + _node = ref._node; } /// Assignment XMLHandle& operator=( const XMLHandle& ref ) { @@ -2106,19 +1845,19 @@ class TINYXML2_LIB XMLHandle } /// Safe cast to XMLElement. This can return null. XMLElement* ToElement() { - return ( _node ? _node->ToElement() : 0 ); + return ( ( _node == 0 ) ? 0 : _node->ToElement() ); } /// Safe cast to XMLText. This can return null. XMLText* ToText() { - return ( _node ? _node->ToText() : 0 ); + return ( ( _node == 0 ) ? 0 : _node->ToText() ); } /// Safe cast to XMLUnknown. This can return null. XMLUnknown* ToUnknown() { - return ( _node ? _node->ToUnknown() : 0 ); + return ( ( _node == 0 ) ? 0 : _node->ToUnknown() ); } /// Safe cast to XMLDeclaration. This can return null. XMLDeclaration* ToDeclaration() { - return ( _node ? _node->ToDeclaration() : 0 ); + return ( ( _node == 0 ) ? 0 : _node->ToDeclaration() ); } private: @@ -2133,11 +1872,14 @@ class TINYXML2_LIB XMLHandle class TINYXML2_LIB XMLConstHandle { public: - explicit XMLConstHandle( const XMLNode* node ) : _node( node ) { + XMLConstHandle( const XMLNode* node ) { + _node = node; } - explicit XMLConstHandle( const XMLNode& node ) : _node( &node ) { + XMLConstHandle( const XMLNode& node ) { + _node = &node; } - XMLConstHandle( const XMLConstHandle& ref ) : _node( ref._node ) { + XMLConstHandle( const XMLConstHandle& ref ) { + _node = ref._node; } XMLConstHandle& operator=( const XMLConstHandle& ref ) { @@ -2175,16 +1917,16 @@ class TINYXML2_LIB XMLConstHandle return _node; } const XMLElement* ToElement() const { - return ( _node ? _node->ToElement() : 0 ); + return ( ( _node == 0 ) ? 0 : _node->ToElement() ); } const XMLText* ToText() const { - return ( _node ? _node->ToText() : 0 ); + return ( ( _node == 0 ) ? 0 : _node->ToText() ); } const XMLUnknown* ToUnknown() const { - return ( _node ? _node->ToUnknown() : 0 ); + return ( ( _node == 0 ) ? 0 : _node->ToUnknown() ); } const XMLDeclaration* ToDeclaration() const { - return ( _node ? _node->ToDeclaration() : 0 ); + return ( ( _node == 0 ) ? 0 : _node->ToDeclaration() ); } private: @@ -2256,9 +1998,7 @@ class TINYXML2_LIB XMLPrinter : public XMLVisitor void PushAttribute( const char* name, const char* value ); void PushAttribute( const char* name, int value ); void PushAttribute( const char* name, unsigned value ); - void PushAttribute( const char* name, int64_t value ); - void PushAttribute( const char* name, uint64_t value ); - void PushAttribute( const char* name, bool value ); + void PushAttribute( const char* name, bool value ); void PushAttribute( const char* name, double value ); /// If streaming, close the Element. virtual void CloseElement( bool compactMode=false ); @@ -2269,11 +2009,7 @@ class TINYXML2_LIB XMLPrinter : public XMLVisitor void PushText( int value ); /// Add a text node from an unsigned. void PushText( unsigned value ); - /// Add a text node from a signed 64bit integer. - void PushText( int64_t value ); - /// Add a text node from an unsigned 64bit integer. - void PushText( uint64_t value ); - /// Add a text node from a bool. + /// Add a text node from a bool. void PushText( bool value ); /// Add a text node from a float. void PushText( float value ); @@ -2318,10 +2054,9 @@ class TINYXML2_LIB XMLPrinter : public XMLVisitor If in print to memory mode, reset the buffer to the beginning. */ - void ClearBuffer( bool resetToFirstElement = true ) { + void ClearBuffer() { _buffer.Clear(); _buffer.Push(0); - _firstElement = resetToFirstElement; } protected: @@ -2331,22 +2066,13 @@ class TINYXML2_LIB XMLPrinter : public XMLVisitor the space and tabs used. A PrintSpace() override should call Print(). */ virtual void PrintSpace( int depth ); - virtual void Print( const char* format, ... ); - virtual void Write( const char* data, size_t size ); - virtual void Putc( char ch ); - - inline void Write(const char* data) { Write(data, strlen(data)); } + void Print( const char* format, ... ); void SealElementIfJustOpened(); bool _elementJustOpened; DynArray< const char*, 10 > _stack; private: - /** - Prepares to write a new node. This includes sealing an element that was - just opened, and writing any whitespace necessary if not in compact mode. - */ - void PrepareForNewNode( bool compactMode ); void PrintString( const char*, bool restrictedEntitySet ); // prints out, after detecting entities. bool _firstElement; @@ -2364,10 +2090,6 @@ class TINYXML2_LIB XMLPrinter : public XMLVisitor bool _restrictedEntityFlag[ENTITY_RANGE]; DynArray< char, 20 > _buffer; - - // Prohibit cloning, intentionally not implemented - XMLPrinter( const XMLPrinter& ); - XMLPrinter& operator=( const XMLPrinter& ); }; diff --git a/src/tinyxmlhelper.cpp b/src/tinyxmlhelper.cpp index 7c0aa23..cd10c80 100644 --- a/src/tinyxmlhelper.cpp +++ b/src/tinyxmlhelper.cpp @@ -20,15 +20,15 @@ * @date 2017-04-28 */ -#include "private/xpcf/tinyxmlhelper.h" +#include "tinyxmlhelper.h" #include -std::string xmlGetTextSecure(tinyxml2::XMLElement * elt, const std::string & nodeName, bool optional, const std::string & defaultValue) +std::string xmlGetTextSecure(tinyxml2::XMLElement * elt,const std::string & nodeName,bool optional,const std::string & defaultValue) { - if (elt->FirstChildElement(nodeName.c_str()) == nullptr) { + if (elt->FirstChildElement(nodeName.c_str()) == NULL) { throw std::runtime_error("Node '" + nodeName + "' doesn't exist in XML file"); } - if (elt->FirstChildElement(nodeName.c_str())->GetText() == nullptr) { + if (elt->FirstChildElement(nodeName.c_str())->GetText() == NULL) { if (optional) { return defaultValue; } diff --git a/tools/generators/grpc/GRPCMessage.h b/src/tinyxmlhelper.h similarity index 65% rename from tools/generators/grpc/GRPCMessage.h rename to src/tinyxmlhelper.h index 91fba67..3d73880 100644 --- a/tools/generators/grpc/GRPCMessage.h +++ b/src/tinyxmlhelper.h @@ -1,5 +1,5 @@ /** - * @copyright Copyright (c) 2019 B-com http://www.b-com.com/ + * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,17 +17,15 @@ * * @file * @brief description of file - * @date 2019-11-15 + * @date 2017-04-28 */ -#ifndef GRPCMESSAGE_H -#define GRPCMESSAGE_H +#ifndef TINYXMLHELPER_H +#define TINYXMLHELPER_H +#include +#include "tinyxml2.h" -class GRPCMessage -{ -public: - GRPCMessage(); -}; +std::string xmlGetTextSecure(tinyxml2::XMLElement * elt,const std::string & nodeName,bool optional = false,const std::string & defaultValue = ""); -#endif // GRPCMESSAGE_H +#endif // TINYXMLHELPER_H diff --git a/test/TestDefines.h b/test/TestDefines.h deleted file mode 100644 index 44301e3..0000000 --- a/test/TestDefines.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef TESTDEFINES_H -#define TESTDEFINES_H - -#include "xpcfSampleComponent_traits.h" -#include "xpcf/xpcf.h" -#include "IHuman.h" -#include "IMusician.h" -#include "IGuitarist.h" - -namespace xpcf = org::bcom::xpcf; - -#include - -extern xpcf::uuids::uuid clsid_HumanMusician; -extern xpcf::uuids::uuid iid_IComponentIntrospect; -extern xpcf::uuids::uuid iid_IHuman; -extern xpcf::uuids::uuid iid_IMusician; -extern xpcf::uuids::uuid iid_IGuitarist; - -class fakeComponent; - -template <> struct xpcf::ComponentTraits -{ - static constexpr const char * UUID = "619CB6E1-396E-4AFD-9951-287A30FA76B6"; - static constexpr const char * DESCRIPTION = "fake component"; -}; - -struct XpcfFixture { - XpcfFixture() { xpcfComponentManager = xpcf::getComponentManagerInstance(); BOOST_TEST_MESSAGE( "setup fixture" ); } - ~XpcfFixture() { BOOST_TEST_MESSAGE( "teardown fixture" ); } - - SRef xpcfComponentManager; -}; - -extern void displayParameter(SRef p); - -#endif // TESTDEFINES_H diff --git a/test/findremakenrules.pri b/test/findremakenrules.pri deleted file mode 100644 index 3a13c89..0000000 --- a/test/findremakenrules.pri +++ /dev/null @@ -1,43 +0,0 @@ -# Author(s) : Loic Touraine, Stephane Leduc - -android { - # unix path - USERHOMEFOLDER = $$clean_path($$(HOME)) - isEmpty(USERHOMEFOLDER) { - # windows path - USERHOMEFOLDER = $$clean_path($$(USERPROFILE)) - isEmpty(USERHOMEFOLDER) { - USERHOMEFOLDER = $$clean_path($$(HOMEDRIVE)$$(HOMEPATH)) - } - } -} - -unix:!android { - USERHOMEFOLDER = $$clean_path($$(HOME)) -} - -win32 { - USERHOMEFOLDER = $$clean_path($$(USERPROFILE)) - isEmpty(USERHOMEFOLDER) { - USERHOMEFOLDER = $$clean_path($$(HOMEDRIVE)$$(HOMEPATH)) - } -} - -exists(builddefs/qmake) { - QMAKE_REMAKEN_RULES_ROOT=builddefs/qmake -} -else { - QMAKE_REMAKEN_RULES_ROOT = $$clean_path($$(REMAKEN_RULES_ROOT)) - !isEmpty(QMAKE_REMAKEN_RULES_ROOT) { - QMAKE_REMAKEN_RULES_ROOT = $$clean_path($$(REMAKEN_RULES_ROOT)/qmake) - } - else { - QMAKE_REMAKEN_RULES_ROOT=$${USERHOMEFOLDER}/.remaken/rules/qmake - } -} - -!exists($${QMAKE_REMAKEN_RULES_ROOT}) { - error("Unable to locate remaken rules in " $${QMAKE_REMAKEN_RULES_ROOT} ". Either check your remaken installation, or provide the path to your remaken qmake root folder rules in REMAKEN_RULES_ROOT environment variable.") -} - -message("Remaken qmake build rules used : " $$QMAKE_REMAKEN_RULES_ROOT) \ No newline at end of file diff --git a/test/packagedependencies.txt b/test/packagedependencies.txt new file mode 100644 index 0000000..7155f0a --- /dev/null +++ b/test/packagedependencies.txt @@ -0,0 +1,2 @@ +xpcf|1.0.0|xpcf|bcomBuild|http://repository.b-com.com/amc-generic +boost|1.64.0|boost|thirdParties|http://repository.b-com.com/amc-generic diff --git a/test/packagedependencies.txt.template b/test/packagedependencies.txt.template deleted file mode 100644 index 7eed252..0000000 --- a/test/packagedependencies.txt.template +++ /dev/null @@ -1,2 +0,0 @@ -xpcf||xpcf%XPCF_SHARED_DEPS|github|https://github.com/b-com-software-basis/xpcf/releases/download -xpcf_static_deps||xpcf_static_deps%XPCF_STATIC_DEPS|github|https://github.com/b-com-software-basis/xpcf/releases/download diff --git a/test/packagedependencies_incode.txt b/test/packagedependencies_incode.txt new file mode 100644 index 0000000..c75206f --- /dev/null +++ b/test/packagedependencies_incode.txt @@ -0,0 +1,3 @@ +xpcf|1.0.0|xpcf|bcomBuild|http://repository.b-com.com/amc-generic +xpcfSampleComponent|1.0.0|xpcfSampleComponent|bcomBuild|http://repository.b-com.com/amc-generic +boost|1.64.0|boost|thirdParties|http://repository.b-com.com/amc-generic diff --git a/test/testxpcf.pri b/test/testxpcf.pri deleted file mode 100755 index 63f7c43..0000000 --- a/test/testxpcf.pri +++ /dev/null @@ -1,111 +0,0 @@ -! exists(../version.pri) { - win32 { - system(scripts/win/update_version.bat -t ../version.pri) - } - linux { - system(scripts/unixes/update_version.sh -t ../version.pri) - } - system(cd $${currentPath}) -} -include(../version.pri) -VERSION=$${XPCF_VERSION} - -CONFIG += c++1z -CONFIG += console -CONFIG -= qt - -DEFINES += MYVERSION=$${VERSION} - -CONFIG(debug,debug|release) { - DEFINES += _DEBUG=1 - DEFINES += DEBUG=1 -} - -CONFIG(release,debug|release) { - DEFINES += NDEBUG=1 -} - -macx { - # EXPERIMENTAL : needs to use remaken configure first - # REMAKENCONFIG += use_remaken_parser -} - -DEFINES += XPCF_USE_BOOST -DEFINES += BOOST_ALL_NO_LIB - -QMAKE_TARGET.arch = x86_64 #must be defined prior to include -#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib, QMAKE_TARGET.arch and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibconfig.pri inclusion -include (../builddefs/qmake/templateappconfig.pri) - -SOURCES += \ - \ # xpcf_dynamic_test.cpp #\ - #xpcf_properties_test.cpp \ - #xpcf_dynamic_test.cpp #\ - #xpcf_threading_test.cpp - #xpcf_xml_test.cpp - #xpcf_dynamic_test_copy.cpp -# xpcf_in_code_test.cpp - xpcf_xml_test.cpp - -unix { - QMAKE_CXXFLAGS += --coverage - QMAKE_LFLAGS += --coverage -} - -linux { - LIBS += -ldl -} - -macx { - contains(DEFINES,TEST_XPCF_STD) { - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.14 - } - QMAKE_MAC_SDK= macosx - QMAKE_CXXFLAGS += -fasm-blocks -x objective-c++ -std=c++17 - LIBS += -L/usr/local/lib # temporary fix caused by grpc with -lre2 ... without -L in grpc.pc -} - -win32 { - QMAKE_LFLAGS += /MACHINE:X64 - DEFINES += WIN64 UNICODE _UNICODE - QMAKE_COMPILER_DEFINES += _WIN64 - - # Windows Kit (msvc2013 64) - LIBS += -L$$(WINDOWSSDKDIR)lib/winv6.3/um/x64 -lshell32 -lgdi32 -lComdlg32 - INCLUDEPATH += $$(WINDOWSSDKDIR)lib/winv6.3/um/x64 -} - -INCLUDEPATH += $${PWD}/../samples/sample_component - -DISTFILES += \ - packagedependencies.txt \ - xpcf_registry_test.xml \ - xpcf_conf_test.xml \ - xpcf_xml_test_valid.xml \ - xpcf_xml_test_missing_start_tag.xml \ - xpcf_xml_test_missing_end_tag.xml \ - xpcf_xml_test_uuid_format_ko.xml - -xpcf_xml_files.path = $${USERHOMEFOLDER}/.xpcf -xpcf_xml_files.files = $${PWD}/xpcf_registry_test.xml -xpcf_xml_files.files += $${PWD}/xpcf_conf_test.xml -xpcf_xml_files.files += $${PWD}/xpcf_xml_test_valid.xml -xpcf_xml_files.files += $${PWD}/xpcf_xml_test_missing_start_tag.xml -xpcf_xml_files.files += $${PWD}/xpcf_xml_test_missing_end_tag.xml -xpcf_xml_files.files += $${PWD}/xpcf_xml_test_module_uuid_format_ko.xml -xpcf_xml_files.files += $${PWD}/xpcf_xml_test_alias_uuid_format_ko.xml -xpcf_xml_files.files += $${PWD}/xpcf_xml_test_factory_bindings_to_uuid_format_ko.xml -xpcf_xml_files.files += $${PWD}/xpcf_xml_test_factory_bindings_component_uuid_format_ko.xml -xpcf_xml_files.files += $${PWD}/xpcf_xml_test_factory_inject_uuid_format_ko -xpcf_xml_files.files += $${PWD}/xpcf_xml_test_configuration_uuid_format_ko.xml -xpcf_xml_files.files += $${PWD}/xpcf_xml_test_properties_uuid_format_ko.xml -xpcf_xml_files.files += $${PWD}/xpcf_xml_test_unknown_component.xml -xpcf_xml_files.files += $${PWD}/xpcf_xml_test_property_type_invalid.xml -xpcf_xml_files.files += $${PWD}/xpcf_xml_test_unknown_property.xml -xpcf_xml_files.files += $${PWD}/xpcf_xml_test_property_unknown_component.xml -xpcf_xml_files.files += $${PWD}/xpcf_xml_test_factory_inject_uuid_format_ko.xml - -xpcf_xml_sample_structure_files.path = $${PROJECTDEPLOYDIR}/ -xpcf_xml_sample_structure_files.files = $${PWD}/xpcf_registry_test.xml - -INSTALLS += xpcf_xml_files xpcf_xml_sample_structure_files diff --git a/test/testxpcf.pro b/test/testxpcf.pro old mode 100755 new mode 100644 index 2889a2c..75c5817 --- a/test/testxpcf.pro +++ b/test/testxpcf.pro @@ -1,21 +1,55 @@ TARGET = testxpcf +VERSION=1.0.0 -LIST = "xpcf_registry_test.xml.template" "xpcf_xml_test_missing_end_tag.xml" "xpcf_xml_test_missing_start_tag.xml.template" "xpcf_xml_test_module_uuid_format_ko.xml.template" "xpcf_xml_test_property_type_invalid.xml.template" "xpcf_xml_test_property_unknown_component.xml.template" "xpcf_xml_test_unknown_component.xml.template" "xpcf_xml_test_unknown_property.xml.template" "xpcf_xml_test_valid.xml.template" -for(file, LIST) { - ! exists(file) { - win32 { - system(../scripts/win/update_version.bat) - } - linux { - system(../scripts/unixes/update_version.sh) - } - break() - } +CONFIG += c++11 +CONFIG += console +CONFIG -= qt + +DEFINES += MYVERSION=$${VERSION} + +CONFIG(debug,debug|release) { + DEFINES += _DEBUG=1 + DEFINES += DEBUG=1 +} + +CONFIG(release,debug|release) { + DEFINES += NDEBUG=1 +} + +win32:CONFIG -= static +win32:CONFIG += shared +QMAKE_TARGET.arch = x86_64 #must be defined prior to include +DEPENDENCIESCONFIG = sharedlib +#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib, QMAKE_TARGET.arch and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibconfig.pri inclusion +include (../builddefs/qmake/templateappconfig.pri) + +HEADERS += \ + +SOURCES += \ + xpcf_dynamic_test.cpp # \ + # xpcf_in_code_test.cpp + +unix { +} + +macx { + QMAKE_MAC_SDK= macosx + QMAKE_CXXFLAGS += -fasm-blocks -x objective-c++ +} + +win32 { + QMAKE_LFLAGS += /MACHINE:X64 + DEFINES += WIN64 UNICODE _UNICODE + QMAKE_COMPILER_DEFINES += _WIN64 + + # Windows Kit (msvc2013 64) + LIBS += -L$$(WINDOWSSDKDIR)lib/winv6.3/um/x64 -lshell32 -lgdi32 -lComdlg32 + INCLUDEPATH += $$(WINDOWSSDKDIR)lib/winv6.3/um/x64 + + DEFINES += BOOST_ALL_NO_LIB } -CONFIG += shared -DEPENDENCIESCONFIG = sharedlib recurse -DEFINES += BOOST_ALL_DYN_LINK -DEFINES += XPCF_SHARED_DEPS +INCLUDEPATH += $${PWD}/../sample_component -include(testxpcf.pri) +DISTFILES += \ + xpcf_registry_test.xml diff --git a/test/testxpcf_static_deps.pro b/test/testxpcf_static_deps.pro deleted file mode 100644 index bbc7bd3..0000000 --- a/test/testxpcf_static_deps.pro +++ /dev/null @@ -1,8 +0,0 @@ -TARGET = testxpcf_static_deps - -REMAKEN_PKGSUBDIR=shared -DEPENDENCIESCONFIG -= sharedlib -DEPENDENCIESCONFIG += recurse -DEFINES += XPCF_STATIC_DEPS - -include(testxpcf.pri) diff --git a/test/testxpcf_static_deps_backup.pro b/test/testxpcf_static_deps_backup.pro deleted file mode 100644 index e46a137..0000000 --- a/test/testxpcf_static_deps_backup.pro +++ /dev/null @@ -1,9 +0,0 @@ -TARGET = testxpcf_static_deps - -CONFIG += shared -DEPENDENCIESCONFIG = sharedlib recurse -DEFINES += BOOST_ALL_DYN_LINK -DEFINES += XPCF_SHARED_DEPS - - -include(testxpcf.pri) diff --git a/test/xpcf_conf_test.xml b/test/xpcf_conf_test.xml deleted file mode 100644 index dd78f23..0000000 --- a/test/xpcf_conf_test.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - 100.2 - 100.5 - 100.8 - 100.1 - - - - - - 100.1 - 100.7 - 100.3 - 200.7 - - - - - - - 200.1 - 200.7 - 200.8 - 200.1 - - - - - - 300.1 - 200.7 - 200.3 - 300.7 - - - - - - diff --git a/test/xpcf_dynamic_test.cpp b/test/xpcf_dynamic_test.cpp old mode 100755 new mode 100644 index ea185d1..1cd2f55 --- a/test/xpcf_dynamic_test.cpp +++ b/test/xpcf_dynamic_test.cpp @@ -1,86 +1,90 @@ /** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ + * @copyright Copyright (c) 2015 All Right Reserved, B-com http://www.b-com.com/ * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * This file is subject to the B<>Com License. + * All other rights reserved. * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY + * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A + * PARTICULAR PURPOSE. * * @author Loïc Touraine * * @file * @brief description of file - * @date 2018-07-02 + * @date 2015-09-18 */ #include +#include "IComponentManager.h" +#include "ComponentFactory.h" +#include "I0.h" +#include "I1.h" +#include "I2.h" +#include #include #include -#include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include #define BOOST_TEST_MODULE test dynamic xpcf +#define BOOST_TEST_DYN_LINK #include -#include "TestDefines.h" - -xpcf::uuids::uuid clsid_HumanMusician = xpcf::toUUID("ae9d10bb-4bd1-462b-8c01-43f1815c6ae0" ); -xpcf::uuids::uuid iid_IComponentIntrospect= xpcf::toUUID(); -xpcf::uuids::uuid iid_IHuman= xpcf::toUUID(); -xpcf::uuids::uuid iid_IMusician= xpcf::toUUID(); -xpcf::uuids::uuid iid_IGuitarist= xpcf::toUUID(); -xpcf::uuids::uuid sampleComponentModuleUUID = xpcf::toUUID("3b899ff0-e098-4218-bdaa-82abdec22960"); using namespace std; -namespace fs = boost::filesystem; -//TODO : unittests, exception catching + +namespace xpcf = org::bcom::xpcf; + +#include +xpcf::uuids::string_generator gen; +xpcf::uuids::uuid clsid_C0 = gen("ae9d10bb-4bd1-462b-8c01-43f1815c6ae0" ); +xpcf::uuids::uuid iid_IComponentIntrospect= gen(xpcf::IComponentIntrospect::UUID ); +xpcf::uuids::uuid iid_I0= gen(I0::UUID ); +xpcf::uuids::uuid iid_I1= gen(I1::UUID ); +xpcf::uuids::uuid iid_I2= gen(I2::UUID ); + +SRef xpcfComponentManager; +SRef rIComponentIntrospect; +SRef rI0; +SRef rI1; +SRef rI2; + /*------------------------------*/ void TCDLL() { try { boost::dll::shared_library shlib; //shlib.load(boost::dll::program_location()); - fs::path p = boost::dll::shared_library::decorate("/usr/lib/boost"); - BOOST_TEST_MESSAGE("Decorated path="< testFunc = boost::dll::import(boost::dll::program_location(), "my_test_func"); + boost::function testFunc = boost::dll::import(boost::dll::program_location(), "my_test_func" + ); if (testFunc) { testFunc("message"); } - }*/ + } } catch (boost::system::system_error & e) { BOOST_TEST_MESSAGE("Got exception"); } -} -BOOST_AUTO_TEST_SUITE( test_library_component_metadata ) -BOOST_AUTO_TEST_CASE( test_dll ) -{ - TCDLL(); } +struct XpcfFixture { + XpcfFixture() { xpcfComponentManager = xpcf::getComponentManagerInstance(); BOOST_TEST_MESSAGE( "setup fixture" ); } + ~XpcfFixture() { BOOST_TEST_MESSAGE( "teardown fixture" ); } + + SRef xpcfComponentManager; +}; + +BOOST_AUTO_TEST_SUITE( test_library_component_metadata ) + BOOST_AUTO_TEST_CASE( test_fixture ) { XpcfFixture fixture; @@ -88,72 +92,10 @@ BOOST_AUTO_TEST_CASE( test_fixture ) BOOST_TEST(fixture.xpcfComponentManager ); } -BOOST_FIXTURE_TEST_CASE( test_load_module_metadata,XpcfFixture,* boost::unit_test::depends_on("test_library_component_metadata/test_fixture")) -{ - xpcfComponentManager->load(); - SPtr modMdata = xpcfComponentManager->findModuleMetadata(sampleComponentModuleUUID); - std::string moduleName = modMdata->name(); - const char * path = modMdata->getPath(); - xpcfComponentManager->clear(); - SRef xpcfModuleManager = xpcf::getModuleManagerInstance(); - std::string xpcfVersion = xpcfModuleManager->getXpcfVersion(moduleName.c_str(),path); - BOOST_TEST_MESSAGE("Module "<getFactory()->bindTo()->loadModuleMetadata(moduleName.c_str(),path)," failed to load module from moduleMetadata"); - SPtr pI = xpcfComponentManager->findInterfaceMetadata(iid_IHuman); - BOOST_TEST_REQUIRE(pI,"ERROR Cannot find interface iid_IHuman !"); - SPtr cmpMetadata= xpcfComponentManager->findComponentMetadata(clsid_HumanMusician); - BOOST_TEST_REQUIRE(cmpMetadata,"ERROR Cannot get ComponentMetadata for component ID "<description()); - fs::path confPath = "xpcf_conf_test.xml"; - fs::detail::utf8_codecvt_facet utf8; - xpcfComponentManager->load(confPath.generic_string(utf8).c_str()); - try { - SRef rIConfigurable; - auto vgComponent = xpcfComponentManager->create(); - BOOST_REQUIRE_NO_THROW( rIConfigurable = vgComponent->bindTo() ); - BOOST_TEST_MESSAGE("Accessing class values for VirtualGuitarist from IProperty/IPropertyMap interfaces"); - for (auto property : rIConfigurable->getProperties()) { - displayParameter(property); - } - } - catch (xpcf::Exception & e) { - BOOST_TEST_MESSAGE("Catched xpcf exception : "<clear(); -} - -BOOST_FIXTURE_TEST_CASE( test_load_modules,XpcfFixture,* boost::unit_test::depends_on("test_library_component_metadata/test_fixture")) -{ - xpcfComponentManager->load(); - SPtr modMdata = xpcfComponentManager->findModuleMetadata(sampleComponentModuleUUID); - xpcfComponentManager->clear(); - BOOST_TEST_REQUIRE(xpcf::XPCFErrorCode::_SUCCESS == xpcfComponentManager->getFactory()->bindTo()->loadModules(modMdata->getPath())," failed to load modules from moduleMetadata"); - SPtr pI = xpcfComponentManager->findInterfaceMetadata(iid_IHuman); - BOOST_TEST_REQUIRE(pI,"ERROR Cannot find interface iid_IHuman !"); - SPtr cmpMetadata= xpcfComponentManager->findComponentMetadata(clsid_HumanMusician); - BOOST_TEST_REQUIRE(cmpMetadata,"ERROR Cannot get ComponentMetadata for component ID "<description()); - try { - SRef rIConfigurable; - BOOST_REQUIRE_NO_THROW( rIConfigurable = xpcfComponentManager->create()->bindTo() ); - } - catch (std::out_of_range & e) { - BOOST_TEST_MESSAGE("Catched : "<clear(); -} - BOOST_FIXTURE_TEST_CASE( test_load_library,XpcfFixture,* boost::unit_test::depends_on("test_library_component_metadata/test_fixture")) { - BOOST_TEST(xpcfComponentManager->load("$HOME/.xpcf/xpcf_registry_test.xml",false) == 0, " failed to load library from "<clear(); + BOOST_TEST(xpcfComponentManager->load() == 1, " failed to load library from "<load(); SPtr pI; - pI=xpcfComponentManager->findInterfaceMetadata(iid_IHuman); + pI=xpcfComponentManager->findInterfaceMetadata(iid_I0); - BOOST_TEST_REQUIRE(pI,"ERROR Cannot find interface iid_IHuman !"); - BOOST_TEST_MESSAGE("Interface iid_IHuman found! its Description is:"<description()); - xpcfComponentManager->clear(); + BOOST_TEST_REQUIRE(pI,"ERROR Cannot find interface iid_I0 !"); + BOOST_TEST_MESSAGE("TC2-1 OK. Interface iid_I0 found! its Description is:"<getDescription()); } BOOST_FIXTURE_TEST_CASE( test_read_components,XpcfFixture,* boost::unit_test::depends_on("test_library_component_metadata/test_load_library")) @@ -179,49 +120,48 @@ BOOST_FIXTURE_TEST_CASE( test_read_components,XpcfFixture,* boost::unit_test::de ** 1)(using XPCF_Registry) getting number of component classes registrated ** 2)(using XPCF_Registry) getting a the component index=0 to obtain its (SPtr_XPCF_ComponentClass) ** 3)(using SPtr_XPCF_ComponentClass) obtaining the component class name (char*) - ** 4)(using XPCF_Registry) finding a component classs from its UUID (clsid_HumanMusician) to get its (SPtr_XPCF_ComponentClass) - ** 5)(using XPCF_Registry) finding a component classs from its name( help string) UUID (clsid_HumanMusician) to obtain its (xpcf::uuids::uuid) + ** 4)(using XPCF_Registry) finding a component classs from its UUID (clsid_C0) to get its (SPtr_XPCF_ComponentClass) + ** 5)(using XPCF_Registry) finding a component classs from its name( help string) UUID (clsid_C0) to obtain its (xpcf::uuids::uuid) */ - BOOST_TEST_MESSAGE("Modules in registry : "<getModulesMetadata().size()<<" module(s) found in registry"); - size_t nbComponents = 0; - for (SPtr moduleInfo : xpcfComponentManager->getModulesMetadata()) { - nbComponents += moduleInfo->getComponentsMetadata().size(); - } - BOOST_TEST_MESSAGE("Components in registry : "<getNbComponentMetadatas()<<" Component class(es) found in registry"); + + SPtr poCC; - SPtr cmpMetadata; + poCC= xpcfComponentManager->getComponentMetadata(0); + BOOST_TEST_REQUIRE(poCC,"ERROR Cannot get ComponentMetadata for component index 0 !"); + BOOST_TEST_MESSAGE("TC3-2 OK. Component class index 0 found:"<getDescription()); - cmpMetadata= xpcfComponentManager->findComponentMetadata(clsid_HumanMusician); - BOOST_TEST_REQUIRE(cmpMetadata,"ERROR Cannot get ComponentMetadata for component ID "<description()); - xpcfComponentManager->clear(); + + poCC= xpcfComponentManager->findComponentMetadata(clsid_C0); + BOOST_TEST_REQUIRE(poCC,"ERROR Cannot get ComponentMetadata for component ID "<getDescription()); } BOOST_FIXTURE_TEST_CASE( test_read_component,XpcfFixture,* boost::unit_test::depends_on("test_library_component_metadata/test_load_library")) { xpcfComponentManager->load(); /* - ** 1)(using the SPtr_XPCF_ComponentClass of clsid_HumanMusician) - ** getting the path name of the Module library of the component Class - ** 2) (using the SPtr_XPCF_ComponentClass of clsid_HumanMusician) - ** getting number of interfaces implemented by the component class "clsid_HumanMusician" - ** 3) (using the SPtr_XPCF_ComponentClass of clsid_HumanMusician) + ** 1)(using the SPtr_XPCF_ComponentClass of clsid_C0) + ** getting the path name of the Container library of the component Class + ** 2) (using the SPtr_XPCF_ComponentClass of clsid_C0) + ** getting number of interfaces implemented by the component class "clsid_C0" + ** 3) (using the SPtr_XPCF_ComponentClass of clsid_C0) ** Obtaining then re-setting the component Class Name(help string) ** ** */ - SPtr cmpMetadata; - cmpMetadata= xpcfComponentManager->findComponentMetadata(clsid_HumanMusician); + SPtr poCC; + poCC= xpcfComponentManager->findComponentMetadata(clsid_C0); + + BOOST_TEST_MESSAGE("TC4-1 OK. Container UUID: "<getContainerUUID()); - BOOST_TEST_MESSAGE("Module UUID: "<getModuleUUID(clsid_HumanMusician)); + int nbI=poCC->getNbInterfaces(); + BOOST_TEST_MESSAGE("TC4-2 OK. "<getInterfaces().size(); - BOOST_TEST_MESSAGE(nbI<<" interfaces found in component Class"); + /*BOOST_TEST_MESSAGE("TC4-X OK. interface "<GetInterface(nbI-1)<<"found in component Class" );*/ - /*BOOST_TEST_MESSAGE("Interface "<GetInterface(nbI-1)<<"found in component Class" );*/ - xpcfComponentManager->clear(); } BOOST_FIXTURE_TEST_CASE( test_read_interfaces,XpcfFixture,* boost::unit_test::depends_on("test_library_component_metadata/test_load_library")) @@ -230,41 +170,42 @@ BOOST_FIXTURE_TEST_CASE( test_read_interfaces,XpcfFixture,* boost::unit_test::de /* ** 1) using XPCF_Registry ** getting the number of implemented interfaces of any components declared in the SCP registry file. - ** 2) Getting pointers (SPtr) on all implemented interfaces of any components declared in the XPCF registry file. + ** 2) Getting pointers (SPtr_XPCF_Interface) on all implemented interfaces of any components declared in the SCP registry file. ** Then with these pointers we obtain the name (help string) of each interface. **/ - //xpcf::uuids::uuid * leakedUUID = new xpcf::uuids::uuid(); - SPtr interfaceMdata; - uint32_t nbI = xpcfComponentManager->getInterfacesMetadata().size(); - BOOST_TEST_MESSAGE(nbI<<" interfaces found the registry s"); - for(auto interfaceMdata : xpcfComponentManager->getInterfacesMetadata()) + + SPtr poCI; + int nbI = xpcfComponentManager->getNbInterfaces(); + BOOST_TEST_MESSAGE("TC5-1 OK. "<getUUID()<<" OK. Interface Description: "<description()); + poCI= xpcfComponentManager->getInterfaceMetadata(ii); + BOOST_TEST_REQUIRE(poCI,"ERROR::getInterfaceMetadata failed for interface index "<getDescription ()); } - xpcfComponentManager->clear(); } /*------------------------------*/ BOOST_AUTO_TEST_CASE( test_shared_exception) { - /** 1) Declare a SPtr_XPCF_Interface (interfaceMdata2) then try to use it before + /** 1) Declare a SPtr_XPCF_Interface (poCI2) then try to use it before *** having setting it to a valid value. *** 2) using the XPCF_Exception reference "E" we obtain the error message. *** **/ - SPtr interfaceMdata2; + SPtr poCI2; /* try { //should never occur. - BOOST_TEST_MESSAGE("Interface Description: "<getDescription()); + BOOST_TEST_MESSAGE("TC6 ERROR. Interface Description: "<getDescription()); } catch(XPCF_NullObject * E)//WARNING : exception created in which scope ?? should it be sharedrefed ? { - BOOST_TEST_MESSAGE("Testing exception. -Exception handled!- interfaceMdata2=null "); - BOOST_TEST_MESSAGE("E.GetErrorMessage():\t"<GetErrorMessage()); + BOOST_TEST_MESSAGE("TC6-1 OK. testing exception. -Exception handled!- poCI2=null "); + BOOST_TEST_MESSAGE("TC6-2 OK. E.GetErrorMessage():\t"<GetErrorMessage()); } */ @@ -277,426 +218,74 @@ BOOST_AUTO_TEST_SUITE( test_library_component_creation ) BOOST_FIXTURE_TEST_CASE( test_component_creation,XpcfFixture,* boost::unit_test::depends_on("test_library_component_metadata/test_load_library")) { - SRef rIComponentIntrospect; - - SRef rIConfigurable,rITestInstance; - - SRef rIGuitarist; xpcfComponentManager->load() ; // create a component // - try { - rIComponentIntrospect = xpcfComponentManager->create(); - BOOST_REQUIRE_NO_THROW( rIConfigurable = rIComponentIntrospect->bindTo() ); - BOOST_REQUIRE_NO_THROW( rITestInstance = xpcfComponentManager->create("testInstance")->bindTo() ); - - BOOST_CHECK_THROW( rIComponentIntrospect = xpcfComponentManager->create(),xpcf::ModuleNotFoundException); - BOOST_CHECK_THROW( rIConfigurable->bindTo(),xpcf::InterfaceNotImplementedException); - BOOST_REQUIRE_NO_THROW(rIComponentIntrospect = xpcfComponentManager->create() ); - BOOST_TEST_REQUIRE(! rIComponentIntrospect->implements(),"ERROR: HumanMusician implements IConfigurable"); - SRef rIHuman = rIComponentIntrospect->queryInterface(iid_IHuman); - BOOST_TEST_REQUIRE(rIHuman, "ERROR:queryInterface(iid_IHuman,rIHuman)"); - BOOST_TEST_MESSAGE("CreateInstance(clsid_HumanMusician, iid_IHuman ,rIHuman)"); - //rIConfigurable = rIComponentIntrospect->queryInterface(); - //rIComponentIntrospect->queryInterface(xpcf::toUUID(),rIConfigurable); - - SRef varSetted = rIConfigurable->getProperty("blurFactor"); - varSetted->setFloatingValue(4.0); - - SRef>> propertyEnum = rIConfigurable->getPropertiesEnumerator(); - BOOST_TEST_MESSAGE("Accessing class values for VirtualGuitarist from IProperty/IPropertyMap interfaces"); - while (propertyEnum->moveNext()) { - displayParameter(propertyEnum->current()); - } - - BOOST_TEST_MESSAGE("Accessing instance values for VirtualGuitarist testInstance from IProperty/IPropertyMap interfaces"); - for (auto property : rITestInstance->getProperties()) { - displayParameter(property); - } - } - catch (xpcf::Exception & e) { - BOOST_TEST_MESSAGE("Catched xpcf exception : "<clear(); + int res=0; + res= xpcfComponentManager->createComponent(clsid_C0, rIComponentIntrospect); + BOOST_TEST_REQUIRE(res == XPCF_OK, "ERROR:CreateInstance(clsid_C0, iid_I0 ,rI0)"); + rIComponentIntrospect->queryInterface(iid_I0,rI0); + BOOST_TEST_REQUIRE(rI0, "ERROR:queryInterface(iid_I0,rI0)"); + BOOST_TEST_MESSAGE("TC1 OK. CreateInstance(clsid_C0, iid_I0 ,rI0)"); } -BOOST_FIXTURE_TEST_CASE( test_component_introspection,XpcfFixture,* boost::unit_test::depends_on("test_library_component_metadata/test_load_library")) +BOOST_FIXTURE_TEST_CASE( test_component_instropection,XpcfFixture,* boost::unit_test::depends_on("test_library_component_metadata/test_load_library")) { - SRef rIComponentIntrospect; - - xpcfComponentManager->load() ; /** - *** 1) from a reference of the implementation class IHuman (SRef) we obtain - *** the number of interfaces implemnted by the component class is(IHuman) belonging to. - *** 2) from a reference of the implementation class IHuman (SRef) we fill an + *** 1) from a reference of the implementation class I0 (SRef) we obtain + *** the number of interfaces implemnted by the component class is(I0) belonging to. + *** 2) from a reference of the implementation class I0 (SRef) we fill an *** array (of xpcf::uuids::uuid) up interfaces uuids. *** 3) with the interface UUIDs we enumerate each interface help string. **/ - rIComponentIntrospect= xpcfComponentManager->createComponent(clsid_HumanMusician); - SRef rIHuman = rIComponentIntrospect->queryInterface(iid_IHuman); + int res=0; + res= xpcfComponentManager->createComponent(clsid_C0, rIComponentIntrospect); + rIComponentIntrospect->queryInterface(iid_I0,rI0); + + int nbI = rI0->getNbInterfaces(); + BOOST_TEST_MESSAGE("TC7-1 OK. "<getNbInterfaces(); - BOOST_TEST_MESSAGE(nbI<<" Interface(s) found from IHuman:"); + xpcf::uuids::uuid puuid10[100] ; + rI0->getInterfaces(&puuid10[0]); + BOOST_TEST_MESSAGE("TC7-2 OK. filling xpcf::uuids::uuid puuid10[100] array of Interface uuids from I0:"); - BOOST_TEST_MESSAGE("Enumerating uuids"); - unsigned long index = 0; + for( int ii=0; iigetInterfaces()) { - BOOST_TEST_MESSAGE("["<clear(); } /*------------------------------*/ BOOST_FIXTURE_TEST_CASE( test_component_invocation,XpcfFixture,* boost::unit_test::depends_on("test_library_component_metadata/test_load_library")) { - SRef rIComponentIntrospect; - fs::path confPath = "xpcf_registry_test.xml"; - fs::detail::utf8_codecvt_facet utf8; - xpcfComponentManager->load(confPath.generic_string(utf8).c_str()); - - rIComponentIntrospect= xpcfComponentManager->createComponent(clsid_HumanMusician); - SRef rIHuman = rIComponentIntrospect->queryInterface(iid_IHuman); - BOOST_CHECK_THROW(SRef rIMusiciantest = rIComponentIntrospect->queryInterface(iid_IHuman),xpcf::utils::bad_any_cast); - BOOST_TEST_MESSAGE("Calling methods of IHuman on component HumanMusician"); - rIHuman->play(); - rIHuman->eat(); - rIHuman->work(); + xpcfComponentManager->load() ; + int res=0; + res= xpcfComponentManager->createComponent(clsid_C0, rIComponentIntrospect); + rIComponentIntrospect->queryInterface(iid_I0,rI0); + + BOOST_TEST_MESSAGE("TC8-1 OK Calling some component methods of I0"); + rI0->I0_opname(); + rI0->I0_opname2(); + rI0->I0_opname4(); + // look for another interface // - //rIHuman->queryInterface(iid_IMusician, rIMusician); - SRef rIMusician = rIComponentIntrospect->queryInterface(iid_IMusician); - BOOST_TEST_MESSAGE("queryInterface(iid_IMusician);"); + //rI0->queryInterface(iid_I1, rI1); + rIComponentIntrospect->queryInterface(iid_I1,rI1); + BOOST_TEST_MESSAGE("TC8-2 OK QueryInterface(iid_I1, rI1);"); // test it // - BOOST_TEST_MESSAGE("OK Calling methods of IMusician on component HumanMusician"); - rIMusician->learn(); - MusicScore score; - score.add("C",0.5); - score.add("C",0.5); - score.add("D",0.5); - score.add("E",0.5); - rIMusician->playMusic(score); - rIMusician->listen(); - rIMusician->practice(); - - BOOST_TEST_MESSAGE("Resolve IGuitarist default binding"); - SRef rIGuitarist = xpcfComponentManager->resolve(); - BOOST_TEST_MESSAGE("Calling methods of IGuitarist on resolved component through IGuitarist SRef"); - rIGuitarist->playSolo(score); - rIGuitarist->playRhythm(); - - BOOST_TEST_MESSAGE("Resolve IMusician default binding"); - rIMusician = xpcfComponentManager->resolve(); - BOOST_TEST_MESSAGE("Calling methods of IMusician on resolved component through IMusician SRef"); - rIMusician->learn(); - rIMusician->playMusic(score); - rIMusician->listen(); - rIMusician->practice(); - - rIMusician = xpcfComponentManager->create()->bindTo(); - BOOST_TEST_MESSAGE("OK Calling methods of IMusician on component VirtualGuitarist"); - rIMusician->learn(); - rIMusician->playMusic(score); - rIMusician->listen(); - rIMusician->practice(); - - rIGuitarist = rIMusician->bindTo(); - BOOST_TEST_MESSAGE("Calling methods of IMusician on component VirtualGuitarist through IGuitarist SRef"); - rIGuitarist->learn(); - rIGuitarist->playMusic(score); - rIGuitarist->listen(); - rIGuitarist->practice(); - - BOOST_TEST_MESSAGE("OK Calling methods of IGuitarist on component VirtualGuitarist"); - rIGuitarist->playSolo(score); - rIGuitarist->playRhythm(); - BOOST_TEST_MESSAGE( "Guitarist injectables are: "); - for (auto injectable : rIGuitarist->bindTo()->getInjectables()) { - std::string message = "Injectable= " + xpcf::uuids::to_string(injectable->getUuid()); - if (injectable->isNamed()) { - message += " | name= " + string(injectable->getName()); - } - message += " | optional= " + to_string(injectable->optional()); - BOOST_TEST_MESSAGE(message); - } - BOOST_TEST_REQUIRE(rIGuitarist->bindTo()->injectExists() == false,"no IComponentManager injectable in VirtualGuitarist"); - BOOST_TEST_REQUIRE(rIGuitarist->bindTo()->injectExists("myGuitar") == false,"no IGuitar injectable named 'myGuitar' in VirtualGuitarist"); - BOOST_TEST_REQUIRE(rIGuitarist->bindTo()->injectExists() == true,"Found IGuitar injectable in VirtualGuitarist"); - BOOST_TEST_REQUIRE(rIGuitarist->bindTo()->injectExists("electricGuitar") == true,"Found IGuitar injectable named 'electricGuitar' in VirtualGuitarist"); - - SRef guitar = rIGuitarist->getGuitar(); - SRef folkGuitar = rIGuitarist->getGuitar(IGuitar::GuitarType::Folk); - if (!folkGuitar) { - BOOST_TEST_MESSAGE("OK : folkGuitar is not configured for VirtualGuitarist"); - SRef electricGuitar = rIGuitarist->getGuitar(IGuitar::GuitarType::Electric); - BOOST_TEST_REQUIRE(guitar,"found electricGuitar get guitar for component VirtualGuitarist instance testInstance : check the configuration file !"); - BOOST_TEST_MESSAGE( "Guitar brand name: " << guitar->getGuitarBrand()); - BOOST_TEST_MESSAGE( "Guitar strings number: " << guitar->getNbStrings()); - if (electricGuitar->getGuitarType() == IGuitar::GuitarType::Electric) { - BOOST_TEST_MESSAGE("Guitar is an electric guitar"); - SRef elecGuitar = electricGuitar->bindTo(); - elecGuitar->setDistortionLevel(100); - BOOST_TEST_MESSAGE("Electric guitar distortion level is set to "<getDistortionLevel()); - } - SRef rIntroOnElectricGuitar; - { - SRef electricGuitar = xpcfComponentManager->create()->bindTo(); - // WARNING : no component ref is added in the following line : rIntroOnElectricGuitar will not outlive electricGuitar !!! - // TODO : study solutions (specific SRef implementation ? external handling of interfaces - not inside the component ?...) - rIntroOnElectricGuitar = electricGuitar; - } - folkGuitar = xpcfComponentManager->create()->bindTo(); - { - BOOST_TEST_MESSAGE( "Entering scope : requesting IComponentIntrospect on folkGuitar"); - SRef rIntro = folkGuitar->bindTo(); - BOOST_TEST_MESSAGE( "Ending scope : end of life of IComponentIntrospect on folkGuitar"); - } - { - BOOST_TEST_MESSAGE( "Entering scope : casting folkGuitar to IComponentIntrospect"); - SRef rIntro = folkGuitar; - SRef anotherFolkRef = rIntro->bindTo(); - BOOST_TEST_MESSAGE( "Ending scope : end of life of IComponentIntrospect on folkGuitar"); - } - BOOST_TEST_REQUIRE(folkGuitar,"Found folkGuitar for component VirtualGuitarist instance testInstance"); - rIGuitarist->bindTo()->inject(folkGuitar); - guitar = rIGuitarist->getGuitar(); - BOOST_TEST_REQUIRE(guitar,"Found guitar for component VirtualGuitarist instance testInstance"); - BOOST_TEST_MESSAGE( "Guitar brand name: " << guitar->getGuitarBrand()); - BOOST_TEST_MESSAGE( "Guitar strings number: " << guitar->getNbStrings()); - xpcf::inject(rIGuitarist,"folkGuitar"); - guitar = rIGuitarist->getGuitar(IGuitar::GuitarType::Folk); - BOOST_TEST_REQUIRE(guitar,"ERROR Cannot get guitar for component VirtualGuitarist instance testInstance : check the configuration file !"); - BOOST_TEST_MESSAGE( "Guitar brand name: " << guitar->getGuitarBrand()); - BOOST_TEST_MESSAGE( "Guitar strings number: " << guitar->getNbStrings()); - } - - BOOST_TEST_REQUIRE(guitar,"guitar component is ready"); - BOOST_CHECK_THROW(rIGuitarist->bindTo()->inject(guitar),xpcf::InjectionException); - - BOOST_TEST_MESSAGE( "Guitar brand name: " << guitar->getGuitarBrand()); - BOOST_TEST_MESSAGE( "Guitar strings number: " << guitar->getNbStrings()); - if (guitar->getGuitarType() == IGuitar::GuitarType::Electric) { - BOOST_TEST_MESSAGE("Guitar is an electric guitar"); - SRef elecGuitar = guitar->bindTo(); - elecGuitar->setDistortionLevel(100); - BOOST_TEST_MESSAGE("Electric guitar distortion level is set to "<getDistortionLevel()); - } - BOOST_TEST_REQUIRE(folkGuitar,"Found folkguitar for component VirtualGuitarist instance testInstance : check the configuration file !"); - BOOST_TEST_MESSAGE( "Guitar brand name: " << folkGuitar->getGuitarBrand()); - BOOST_TEST_MESSAGE( "Guitar strings number: " << folkGuitar->getNbStrings()); - if (folkGuitar->getGuitarType() == IGuitar::GuitarType::Folk) { - BOOST_TEST_MESSAGE("Guitar is a folf guitar"); - BOOST_CHECK_THROW(folkGuitar->bindTo(),xpcf::InterfaceNotImplementedException); - } - xpcfComponentManager->clear(); -} - -void displayGuitarInfo (SRef guitar) -{ - std::vector types = {"acoustic","folk","electric"}; - std::vector tuneModes = {"Standard","Nashville","HalfTuneLower","OneTuneLower","TuneDADGAD","dropD"}; - - BOOST_TEST_MESSAGE("Guitar details: "<getGuitarBrand()<< " type "<getGuitarType()]<<" tune mode "<getTuneType()]); -} + BOOST_TEST_MESSAGE("TC8-3 OK Calling some component methods I1"); + rI1->I1_opname(); + rI1->I1_opname2(); + rI1->I1_opname3(); + rI1->I1_opname4(); -template -void displayGuitarInfo(SRef guitar) -{ - displayGuitarInfo(guitar->template bindTo()); -} - -BOOST_FIXTURE_TEST_CASE( test_properties_injection,XpcfFixture,* boost::unit_test::depends_on("test_library_component_metadata/test_load_library")) -{ - fs::path confPath = "xpcf_registry_test.xml"; - fs::detail::utf8_codecvt_facet utf8; - xpcfComponentManager->load(confPath.generic_string(utf8).c_str()); - - BOOST_TEST_MESSAGE("Resolve IGuitar default binding"); - SRef guitar = xpcfComponentManager->resolve(); - SRef electricGuitar = xpcfComponentManager->resolve("ibanezGuitar"); - SRef jacksonGuitar = xpcfComponentManager->resolve("jacksonGuitar"); - displayGuitarInfo(guitar); - displayGuitarInfo(electricGuitar); - displayGuitarInfo(jacksonGuitar); - xpcfComponentManager->clear(); } -BOOST_FIXTURE_TEST_CASE( test_component_multibind,XpcfFixture,* boost::unit_test::depends_on("test_library_component_metadata/test_load_library")) -{ - fs::path confPath = "xpcf_registry_test.xml"; - fs::detail::utf8_codecvt_facet utf8; - xpcfComponentManager->load(confPath.generic_string(utf8).c_str()); - - BOOST_TEST_MESSAGE("Resolve IGuitarist default binding"); - SRef rIGuitarist = xpcfComponentManager->resolve(); - BOOST_TEST_MESSAGE("Multibind guitars:"); - for (auto guitarBrand: rIGuitarist->getGuitarCollection()) { - BOOST_TEST_MESSAGE("guitar brand:" << guitarBrand); - } - xpcfComponentManager->clear(); -} - - -BOOST_FIXTURE_TEST_CASE( test_factory_createcomponent,XpcfFixture,* boost::unit_test::depends_on("test_library_component_metadata/test_load_library")) -{ - fs::path confPath = "xpcf_registry_test.xml"; - fs::detail::utf8_codecvt_facet utf8; - - auto emptyFactory = xpcfComponentManager->getFactory()->createNewFactoryContext(xpcf::ContextMode::Empty); - // Change specific bind for virtual guitarist for IGuitar to Ibanez electric guitar in cloned factory. - - BOOST_TEST_REQUIRE(emptyFactory->bindTo()->getInterfacesMetadata().size() == 0, "Empty factory is empty"); - emptyFactory->load(confPath.generic_string(utf8).c_str()); - - SRef rIComponentIntrospect= emptyFactory->createComponent(clsid_HumanMusician); - SRef rIHuman = rIComponentIntrospect->queryInterface(iid_IHuman); - BOOST_TEST_REQUIRE(rIHuman,"HumanMusician component is ready"); - SRef rIGuitarist= emptyFactory->createComponent(xpcf::toUUID()); - BOOST_TEST_REQUIRE(rIGuitarist,"VirtualGuitarist component is ready"); - SRef folkGuitar = emptyFactory->create()->bindTo(); - BOOST_TEST_REQUIRE(folkGuitar,"Takamine folk guitar component is ready"); - - BOOST_TEST_MESSAGE( "Guitar brand name: " << folkGuitar->getGuitarBrand()); - BOOST_TEST_MESSAGE( "Guitar strings number: " << folkGuitar->getNbStrings()); - - MusicScore score; - score.add("C",0.5); - score.add("C",0.5); - score.add("D",0.5); - score.add("E",0.5); - BOOST_TEST_MESSAGE("Calling methods of IMusician on component VirtualGuitarist through IGuitarist SRef"); - rIGuitarist->learn(); - rIGuitarist->playMusic(score); - rIGuitarist->listen(); - rIGuitarist->practice(); - - BOOST_TEST_MESSAGE("OK Calling methods of IGuitarist on component VirtualGuitarist"); - rIGuitarist->playSolo(score); - rIGuitarist->playRhythm(); - xpcfComponentManager->clear(); - emptyFactory->clear(); -} - -BOOST_FIXTURE_TEST_CASE( test_factory_sharedcontext,XpcfFixture,* boost::unit_test::depends_on("test_library_component_metadata/test_load_library")) -{ - fs::path confPath = "xpcf_registry_test.xml"; - fs::detail::utf8_codecvt_facet utf8; - xpcfComponentManager->load(confPath.generic_string(utf8).c_str()); - - BOOST_TEST_MESSAGE("Resolve IGuitarist default binding"); - SRef rIGuitaristXpcf1 = xpcfComponentManager->resolve(); - - auto sharedFactory = xpcfComponentManager->getFactory()->createNewFactoryContext(xpcf::ContextMode::Shared); - SRef rIIbanez = sharedFactory->resolve("ibanezGuitar"); - SRef rIGuitaristSharedFactory1 = sharedFactory->resolve(); - rIGuitaristSharedFactory1->bindTo()->inject(rIIbanez,"electricGuitar"); - auto elecGuitar = rIGuitaristXpcf1->getGuitar(IGuitar::GuitarType::Electric); - BOOST_TEST_MESSAGE("xpcf factory VirtualGuitarist electricguitar brand:" << elecGuitar->getGuitarBrand()); - elecGuitar = rIGuitaristSharedFactory1->getGuitar(IGuitar::GuitarType::Electric); - BOOST_TEST_MESSAGE("shared factory VirtualGuitarist electricguitar brand:" << elecGuitar->getGuitarBrand()); - auto rIGuitaristXpcf2 = xpcfComponentManager->resolve(); - auto rIGuitaristSharedFactory2 = sharedFactory->resolve(); - BOOST_TEST_MESSAGE("xpcf VirtualGuitarist adresses: 1=" << rIGuitaristXpcf1.get()<<" 2="<bind(xpcf::toUUID("63ff193d-93e6-4ede-9947-22f864ac843f"), - xpcf::toUUID(), - xpcf::toUUID("04E2254F-3349-4DC1-8EED-86835315FB6B"), - xpcf::BindingScope::Transient, - xpcf::BindingRange::All); - - // And retrieve new guitarist from componentmanager, as the sharedFactory is shared with the CM factory - auto rIGuitaristXpcf3 = xpcfComponentManager->resolve(); - - auto guitar = rIGuitaristXpcf3->getGuitar(IGuitar::GuitarType::Acoustic); - BOOST_TEST_MESSAGE("xpcf factory VirtualGuitarist acoustic guitar brand:" << guitar->getGuitarBrand()); - guitar = rIGuitaristSharedFactory1->getGuitar(IGuitar::GuitarType::Acoustic); - BOOST_TEST_MESSAGE("shared factory VirtualGuitarist created before modified bind acoustic guitar brand:" << guitar->getGuitarBrand()); - BOOST_TEST_MESSAGE("xpcf VirtualGuitarist adresses after bind changed to Transient: 1=" << rIGuitaristXpcf1.get()<<" 2="<clear(); -} - -BOOST_FIXTURE_TEST_CASE( test_factory_clonedcontext,XpcfFixture,* boost::unit_test::depends_on("test_library_component_metadata/test_load_library")) -{ - fs::path confPath = "xpcf_registry_test.xml"; - fs::detail::utf8_codecvt_facet utf8; - xpcfComponentManager->load(confPath.generic_string(utf8).c_str()); - - SRef rIGuitaristXpcf = xpcfComponentManager->resolve(); - - auto clonedFactory = xpcfComponentManager->getFactory()->createNewFactoryContext(xpcf::ContextMode::Cloned); - // Change specific bind for virtual guitarist for IGuitar to Ibanez electric guitar in cloned factory. - BOOST_TEST_MESSAGE("Change cloned factory IGuitarist default guitar bind to Ibanez"); - - clonedFactory->bind(xpcf::toUUID("63ff193d-93e6-4ede-9947-22f864ac843f"), - xpcf::toUUID(), - xpcf::toUUID("{ED894181-0FDC-4326-A068-CB2A5899CB13}"), - xpcf::BindingScope::Transient, - xpcf::BindingRange::All); - - BOOST_TEST_MESSAGE("Resolve IGuitarist xpcf binding"); - SRef rIGuitaristXpcf1 = xpcfComponentManager->resolve(); - - BOOST_TEST_MESSAGE("Resolve IGuitarist cloned factory binding"); - SRef rIGuitaristClonedFactory1 = clonedFactory->resolve(); - - auto guitar = rIGuitaristXpcf1->getGuitar(IGuitar::GuitarType::Acoustic); - BOOST_TEST_REQUIRE(guitar->getGuitarBrand() == "Jackson", "xpcf factory VirtualGuitarist created before modified bind guitar brand:" << guitar->getGuitarBrand()); - guitar = rIGuitaristClonedFactory1->getGuitar(IGuitar::GuitarType::Acoustic); - BOOST_TEST_REQUIRE(guitar->getGuitarBrand() == "Ibanez", "cloned factory VirtualGuitarist guitar brand:" << guitar->getGuitarBrand()); - - xpcfComponentManager->clear(); -} - -BOOST_FIXTURE_TEST_CASE( test_factory_emptycontext,XpcfFixture,* boost::unit_test::depends_on("test_library_component_metadata/test_load_library")) -{ - fs::path confPath = "xpcf_registry_test.xml"; - fs::detail::utf8_codecvt_facet utf8; - xpcfComponentManager->load(confPath.generic_string(utf8).c_str()); - - auto emptyFactory = xpcfComponentManager->getFactory()->createNewFactoryContext(xpcf::ContextMode::Empty); - // Change specific bind for virtual guitarist for IGuitar to Ibanez electric guitar in cloned factory. - - BOOST_TEST_REQUIRE(emptyFactory->bindTo()->getInterfacesMetadata().size() == 0, "Empty factory is empty"); - emptyFactory->load(confPath.generic_string(utf8).c_str()); - - BOOST_TEST_MESSAGE("Change empty factory IGuitarist default guitar bind to Ibanez"); - - emptyFactory->bind(xpcf::toUUID("63ff193d-93e6-4ede-9947-22f864ac843f"), - xpcf::toUUID(), - xpcf::toUUID("{ED894181-0FDC-4326-A068-CB2A5899CB13}"), - xpcf::BindingScope::Transient, - xpcf::BindingRange::All); - - BOOST_TEST_MESSAGE("Resolve IGuitarist xpcf binding"); - SRef rIGuitaristXpcf1 = xpcfComponentManager->resolve(); - - BOOST_TEST_MESSAGE("Resolve IGuitarist empty factory binding"); - SRef rIGuitaristEmptyFactory1 = emptyFactory->resolve(); - BOOST_TEST_MESSAGE("xpcf VirtualGuitarist adress=" << rIGuitaristXpcf1.get()<<" | empty factory VirtualGuitarist adresses: 1=" << rIGuitaristEmptyFactory1.get()); - - auto guitar = rIGuitaristXpcf1->getGuitar(IGuitar::GuitarType::Acoustic); - BOOST_TEST_REQUIRE(guitar->getGuitarBrand() == "Jackson", "xpcf factory VirtualGuitarist created before modified bind guitar brand:" << guitar->getGuitarBrand()); - guitar = rIGuitaristEmptyFactory1->getGuitar(IGuitar::GuitarType::Acoustic); - BOOST_TEST_REQUIRE(guitar->getGuitarBrand() == "Ibanez", "empty factory loaded : VirtualGuitarist guitar brand:" << guitar->getGuitarBrand()); - - xpcfComponentManager->clear(); - emptyFactory->clear(); -} BOOST_AUTO_TEST_SUITE_END() diff --git a/test/xpcf_properties_test.cpp b/test/xpcf_properties_test.cpp deleted file mode 100644 index 673225e..0000000 --- a/test/xpcf_properties_test.cpp +++ /dev/null @@ -1,218 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2018-07-03 - */ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "TestDefines.h" - -using namespace std; - - -class TestPropertyWrapper { -public: - TestPropertyWrapper(); - ~TestPropertyWrapper() = default; - - inline uint64_t getIntNumber() { return m_intNumber;} - inline double getFloatNumber() { return m_floatNumber;} - inline const char * getCharStr() { return m_charStr.c_str();} - inline const wchar_t * getWcharStr() { return m_wcharStr.c_str();} - const std::vector & getIntParams() { return m_intParams;} - inline SRef getPropertyRootNode() const {return m_property;} - inline SRef getProperty(const char * name) const {return m_property->at(name);} - -private: - uint64_t m_intNumber; - float m_floatNumber; - std::string m_charStr; - std::wstring m_wcharStr; - std::vector m_intParams; - SRef m_property; -}; - -TestPropertyWrapper::TestPropertyWrapper() { - m_property = xpcf::getPropertyMapInstance(); - m_property->wrapUnsignedLong("intNumber",m_intNumber); - m_property->wrapFloat("floatNumber",m_floatNumber); - m_property->wrapString("charstr",m_charStr); - m_property->wrapUnicodeString("wcharstr",m_wcharStr); - m_property->wrapLongVector("vectWrapper",m_intParams); - m_intNumber = 10; - m_floatNumber = 0.5; - m_charStr = "in constructor"; - m_wcharStr = L"in constructor"; - - m_intParams.resize(10); - - for (uint32_t i = 0; i p) -{ - BOOST_TEST_MESSAGE("Property name ="<getName()); - for (uint32_t i=0 ; i < p->size() ; i++ ) { - switch (p->getType()) { - case xpcf::IProperty::IProperty_NONE : - break; - case xpcf::IProperty::IProperty_INTEGER : - BOOST_TEST_MESSAGE("=> Int property = "<getIntegerValue(i)); - break; - case xpcf::IProperty::IProperty_UINTEGER : - BOOST_TEST_MESSAGE("=> Uint property = "<getUnsignedIntegerValue(i)); - break; - case xpcf::IProperty::IProperty_LONG : - BOOST_TEST_MESSAGE("=> Long property = "<getLongValue(i)); - break; - case xpcf::IProperty::IProperty_ULONG : - BOOST_TEST_MESSAGE("=> ULong property = "<getUnsignedLongValue(i)); - break; - case xpcf::IProperty::IProperty_CHARSTR : - BOOST_TEST_MESSAGE("=> String property = "<getStringValue(i)); - break; - case xpcf::IProperty::IProperty_UNICODESTR : - break; - case xpcf::IProperty::IProperty_FLOAT : - BOOST_TEST_MESSAGE("=> Float property = "<getFloatingValue(i)); - break; - case xpcf::IProperty::IProperty_DOUBLE : - BOOST_TEST_MESSAGE("=> Double property = "<getDoubleValue(i)); - break; - case xpcf::IProperty::IProperty_STRUCTURE : - { - SRef propertyMap = p->getStructureValue(i); - SRef>> propertyEnum = - propertyMap->getProperties().getEnumerator(); - BOOST_TEST_MESSAGE("Accessing class values for structure from IProperty/IPropertyMap interfaces"); - while (propertyEnum->moveNext()) { - displayParameter(propertyEnum->current()); - } - break; - } - default: - break; - } - } -} - -BOOST_AUTO_TEST_SUITE( test_properties ) - -BOOST_AUTO_TEST_CASE( test_propertyWrapper ) -{ - TestPropertyWrapper w; - BOOST_TEST_MESSAGE("Wrapped class values int="<> itend = w.getPropertyRootNode()->getProperties().end(); - for (xpcf::Iterator> it = w.getPropertyRootNode()->getProperties().begin() ; it != itend ; ++it) {*/ - for(auto p : w.getPropertyRootNode()->getProperties()) { - //while (propertyEnum->moveNext()) { - // SRef p = *it; - displayParameter(p); - } - } - catch (std::out_of_range & e) { - BOOST_TEST_MESSAGE("Catched : "< & elem) -{ - if (!strcmp(elem->getName(),"charstr")) { - return true; - } - return false; -} - -bool falsePred(const SRef & elem) -{ - return false; -} - -BOOST_AUTO_TEST_CASE( test_blockEnumerator ) -{ - TestPropertyWrapper w; - auto & props = w.getPropertyRootNode()->getProperties(); - BOOST_TEST_MESSAGE("Iterating with blockenum(0,2)"); - SRef>> propertyEnum = props.getEnumerator(0,2); - for(auto p : propertyEnum) { - displayParameter(p); - } - BOOST_TEST_MESSAGE("Iterating with blockenum(2,2)"); - for(auto p : props.getEnumerator(2,2)) { - displayParameter(p); - } - propertyEnum = props.getEnumerator(4,1); - BOOST_TEST_MESSAGE("Iterating with blockenum(4,1)"); - for(auto p : propertyEnum) { - displayParameter(p); - } - // NOTE : missing movable & comparable upon iterator to check for end iterator upon return - auto result1 = std::find_if(xpcf::begin(props), xpcf::end(props), pred ); - // SHOULD BE ABLE TO WRITE if (result1 != end(props) ) ... play with endReached inside iterator construction ? - BOOST_TEST_MESSAGE("Testing std::algorithm upon enumerators with valid result"); - auto endIt = xpcf::end(props); - if (result1 != endIt) { - displayParameter(*result1); - } - - // NOTE : missing movable & comparable upon iterator to check for end iterator upon return - result1 = std::find_if(xpcf::begin(props), xpcf::end(props), falsePred ); - // SHOULD BE ABLE TO WRITE if (result1 != end(props) ) ... play with endReached inside iterator construction ? - BOOST_TEST_MESSAGE("Testing std::algorithm upon enumerators without result"); - if (result1 != endIt) { - displayParameter(*result1); - } - BOOST_TEST_MESSAGE("Checking exception while constructing BlockEnumerator with values above sequence size"); - BOOST_TEST_MESSAGE("1- testing too many elements exception"); - BOOST_CHECK_THROW( props.getEnumerator(4,2),std::out_of_range); - BOOST_TEST_MESSAGE("2- testing offset at end of sequence"); - BOOST_CHECK_THROW( props.getEnumerator(5,1),std::out_of_range); -} - -BOOST_AUTO_TEST_SUITE_END() - - - diff --git a/test/xpcf_registry_test.xml b/test/xpcf_registry_test.xml new file mode 100644 index 0000000..1f2983b --- /dev/null +++ b/test/xpcf_registry_test.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/test/xpcf_registry_test.xml.template b/test/xpcf_registry_test.xml.template deleted file mode 100644 index 1fcbb00..0000000 --- a/test/xpcf_registry_test.xml.template +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2.1 - 2.7 - 2.8 - 2.1 - - - - - - 3.1 - 2.7 - 2.3 - 3.7 - - - - - - - - - 0.2 - 0.5 - 0.8 - 1.1 - - - - - - 1.1 - 0.7 - 0.3 - 2.7 - - - - - - - - - - - - - - - - - - diff --git a/test/xpcf_threading_test.cpp b/test/xpcf_threading_test.cpp deleted file mode 100644 index 9ad0a23..0000000 --- a/test/xpcf_threading_test.cpp +++ /dev/null @@ -1,382 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2018-07-02 - */ - -#include -#include -#include "xpcf/threading/FiberFifos.h" -#include "xpcf/threading/DropBuffer.h" -#include "xpcf/threading/MultiConsumer.h" -#include "xpcf/threading/BaseTask.h" -#include - -#include "TestDefines.h" - -using namespace std; - -BOOST_AUTO_TEST_SUITE( test_threading ) - - -BOOST_AUTO_TEST_CASE( test_fifo_instantitation) -{ - SRef> intBuffer = xpcf::createSharedBuffer(10,5); - SRef> intPointerFifo = xpcf::createFifo(); - SRef> stringFifo = xpcf::createFifo(); - SRef>> srefStringDropBuffer = xpcf::createDropBuffer>(); - intBuffer->clear(); - intBuffer->push(4); - intBuffer->push(5); - intBuffer->clear(); - intBuffer->clear(); - int * i = new int; - *i = 10; - intPointerFifo->push(i); - intPointerFifo->clear(); - stringFifo->clear(); - stringFifo->push("test"); - stringFifo->push("test2"); - stringFifo->clear(); - stringFifo->clear(); - SRef str = xpcf::utils::make_shared("srefString"); - srefStringDropBuffer->push(str); - srefStringDropBuffer->clear(); -} - -/* -BOOST_AUTO_TEST_CASE( test_threading_std) -{ - SRef> inFifo = xpcf::createFifo(); - SRef> inoutFifo = xpcf::createFifo(); - SRef> out2Fifo = xpcf::createFifo(); - SRef> buffer = xpcf::createFifo(4); - - std::function providerFunc = [buffer](){ - try { - buffer->push(2); - //std::this_thread::sleep_for(std::chrono::milliseconds(50)); - //xpcf::utils::this_fiber::sleep_for(std::chrono::milliseconds(50)); - buffer->push(3); - } - catch (xpcf::Exception & e) { - BOOST_TEST_MESSAGE("Provider::queue released !!!"); - return; - } - }; - - std::function func = [buffer,inoutFifo](){ - try { - int valueIn = buffer->pop(); - valueIn += 2; - inoutFifo->push(to_string(valueIn)); - } - catch (xpcf::Exception & e) { - BOOST_TEST_MESSAGE("Func::queue released !!!"); - return; - } - //std::this_thread::sleep_for(std::chrono::milliseconds(1000)); - //xpcf::utils::this_fiber::sleep_for(std::chrono::milliseconds(1000)); - }; - - std::function func2 = [inoutFifo,out2Fifo](){ - string valueIn; - bool popped= inoutFifo->pop(valueIn,std::chrono::milliseconds(10000)); - //valueIn += 2; - if (popped) { - BOOST_TEST_MESSAGE("THREADING OK. Out2Fifo element is:"<push(valueIn); - } - else { - BOOST_TEST_MESSAGE("Func2::Timeout expired or queue released"); - return; - } - }; - - std::function consumerFunc = [out2Fifo](){ - std::string result; - try { - result = out2Fifo->pop(); - BOOST_TEST_MESSAGE("THREADING OK. OutFifo first element is:"<pop(); - BOOST_TEST_MESSAGE("THREADING OK. OutFifo first element is:"< task = xpcf::createDelegateTask(func,joinable); - task->declareFinalizer(buffer); - SRef task2 = xpcf::createDelegateTask(func2,joinable); - task2->declareFinalizer(inoutFifo); - SRef providerTask = xpcf::createDelegateTask(providerFunc,joinable); - providerTask->declareFinalizer(buffer); - SRef consumerTask = xpcf::createDelegateTask(consumerFunc,joinable); - consumerTask->declareFinalizer(out2Fifo); - consumerTask->start(); - task2->start(); - task->start(); - providerTask->start(); - consumerTask->awaitRunning(); - std::this_thread::sleep_for(std::chrono::milliseconds(5000)); - providerTask->stop(); - BOOST_TEST_MESSAGE("providerTask::stop done !!!"); - task->stop(); - BOOST_TEST_MESSAGE("task::stop done !!!"); - task2->stop(); - BOOST_TEST_MESSAGE("task2::stop done !!!"); - consumerTask->stop(); - BOOST_TEST_MESSAGE("consumerTask::stop done !!!"); - - - - -} - -BOOST_AUTO_TEST_CASE( test_threading_multiconsumer) -{ - SRef> inFifo = xpcf::createFifo(); - SRef> inoutFifo = xpcf::createFifo(); - SRef> out2Fifo = xpcf::createFifo(); - SRef> buffer = xpcf::createFifo(4); - SRef> multi = xpcf::utils::make_shared>(3,inoutFifo); - uint64_t consumer1,consumer2,consumer3; - consumer1 = multi->subscribe(); - consumer2 = multi->subscribe(); - consumer3 = multi->subscribe(); - - std::function providerFunc = [buffer](){ - static uint64_t currentIndex = 0; - try { - buffer->push(currentIndex++); - //std::this_thread::sleep_for(std::chrono::milliseconds(50)); - #ifdef XPCF_USE_BOOST - //xpcf::utils::this_fiber::sleep_for(std::chrono::milliseconds(50)); - #endif - // BOOST_TEST_MESSAGE("Provider: values pushed !!!"); - } - catch (xpcf::Exception & e) { - BOOST_TEST_MESSAGE("Provider::queue released !!!"); - return; - } - }; - - std::function func = [buffer,inoutFifo](){ - try { - int valueIn = buffer->pop(); - valueIn += 2; - inoutFifo->push(to_string(valueIn)); - // BOOST_TEST_MESSAGE("func: values incremented and converted to string : pushed !!!"); - } - catch (xpcf::Exception & e) { - BOOST_TEST_MESSAGE("Func::queue released !!!"); - return; - } - //std::this_thread::sleep_for(std::chrono::milliseconds(1000)); - #ifdef XPCF_USE_BOOST - //xpcf::utils::this_fiber::sleep_for(std::chrono::milliseconds(1000)); - #endif - }; - - std::function consumerFunc1 = [&multi, &consumer1,&out2Fifo](){ - try { - string popped= multi->pop(consumer1); - out2Fifo->push(popped); - //BOOST_TEST_MESSAGE("CONSUMER1 inoutFifo element is:"< consumerFunc2 = [&multi, &consumer2,&out2Fifo](){ - try { - string popped= multi->pop(consumer2); - out2Fifo->push(popped); -// BOOST_TEST_MESSAGE("CONSUMER2 inoutFifo element is:"< consumerFunc3 = [&multi, &consumer3, &out2Fifo](){ - try { - string popped= multi->pop(consumer3); - out2Fifo->push(popped); - -// BOOST_TEST_MESSAGE("CONSUMER3 inoutFifo element is:"< task = xpcf::createDelegateTask(func,joinable); - task->declareFinalizer(buffer); - SRef providerTask = xpcf::createDelegateTask(providerFunc,joinable); - providerTask->declareFinalizer(buffer); - SRef consumerTask1 = xpcf::createDelegateTask(consumerFunc1,joinable); - consumerTask1->declareFinalizer(multi); - SRef consumerTask2 = xpcf::createDelegateTask(consumerFunc2,joinable); - consumerTask2->declareFinalizer(multi); - SRef consumerTask3 = xpcf::createDelegateTask(consumerFunc3,joinable); - consumerTask3->declareFinalizer(multi); - consumerTask3->start(); - consumerTask2->start(); - consumerTask1->start(); - task->start(); - providerTask->start(); - consumerTask1->awaitRunning(); - std::this_thread::sleep_for(std::chrono::milliseconds(5000)); - providerTask->stop(); - BOOST_TEST_MESSAGE("providerTask::stop done !!!"); - task->stop(); - BOOST_TEST_MESSAGE("task::stop done !!!"); - consumerTask1->stop(); - BOOST_TEST_MESSAGE("consumerTask1::stop done !!!"); - consumerTask2->stop(); - BOOST_TEST_MESSAGE("consumerTask2::stop done !!!"); - consumerTask3->stop(); - BOOST_TEST_MESSAGE("consumerTask3::stop done !!!"); - string value; - string values; - while (out2Fifo->tryPop(value) ) { - values += "|"; - values += value; - } - BOOST_TEST_MESSAGE("MultiConsumer::out2Fifo values: "<> inFifo = xpcf::createFifo(); - SRef> inoutFifo = xpcf::createFifo(); - SRef> out2Fifo = xpcf::createFifo(); - SRef> buffer = xpcf::createFifo(4); - - std::function providerFunc = [buffer](){ - try { - buffer->push(2); - //xpcf::utils::this_fiber::sleep_for(std::chrono::milliseconds(50)); - buffer->push(3); - BOOST_TEST_MESSAGE("THREADING FIBER::PROVIDER. buffer values pushed: 2 3"); - } - catch (xpcf::Exception & e) { - BOOST_TEST_MESSAGE("THREADING FIBER::PROVIDER buffer released"); - return; - } - }; - - std::function func = [buffer,inoutFifo](){ - try { - int valueIn = buffer->pop(); - valueIn += 2; - inoutFifo->push(to_string(valueIn)); - BOOST_TEST_MESSAGE("THREADING FIBER::CONVERTER. inoutFifo value pushed:"< func2 = [inoutFifo,out2Fifo](){ - string valueIn; - bool popped= inoutFifo->pop(valueIn,std::chrono::milliseconds(100)); - //valueIn += 2; - if (popped) { - BOOST_TEST_MESSAGE("THREADING FIBER OK. Out2Fifo element is:"<push(valueIn); - } - else { - BOOST_TEST_MESSAGE("Timeout expired or queue released"); - return; - } - }; - - std::function consumerFunc = [out2Fifo](){ - std::string result; - try { - result = out2Fifo->pop(); - BOOST_TEST_MESSAGE("THREADING FIBER OK. OutFifo first element is:"<pop(); - BOOST_TEST_MESSAGE("THREADING FIBER OK. OutFifo first element is:"< fiberLauncher = [&]() { - - xpcf::FiberTask task(func); - xpcf::FiberTask task2(func2); - xpcf::FiberTask providerTask(providerFunc); - xpcf::FiberTask consumerTask(consumerFunc); - task.declareFinalizer(buffer); - task2.declareFinalizer(inoutFifo); - consumerTask.declareFinalizer(out2Fifo); - consumerTask.start(); - task2.start(); - task.start(); - providerTask.start(); - xpcf::FiberTask::yield(); - consumerTask.awaitRunning(); - //std::this_thread::sleep_for(std::chrono::milliseconds(5000)); - BOOST_TEST_MESSAGE("---- CONSUMERTASK::STOP ----"); - consumerTask.stop(); - BOOST_TEST_MESSAGE("---- CONSUMERTASK::STOPPED ----"); - BOOST_TEST_MESSAGE("---- TASK2::STOP ----"); - task2.stop(); - BOOST_TEST_MESSAGE("---- TASK2::STOPPED ----"); - BOOST_TEST_MESSAGE("---- TASK::STOP ----"); - task.stop(); - BOOST_TEST_MESSAGE("---- TASK::STOPPED ----"); - BOOST_TEST_MESSAGE("---- PROVIDERTASK::STOP ----"); - providerTask.stop(); - BOOST_TEST_MESSAGE("---- PROVIDERTASK::STOPPED ----"); - }; - - SRef threadTask = xpcf::createDelegateTask(fiberLauncher,true); - threadTask->start(); - threadTask->awaitRunning(); - std::this_thread::sleep_for(std::chrono::milliseconds(5000)); - threadTask->stop(); - -} -#endif - - -*/ -BOOST_AUTO_TEST_SUITE_END() diff --git a/test/xpcf_xml_test.cpp b/test/xpcf_xml_test.cpp deleted file mode 100644 index bd8728b..0000000 --- a/test/xpcf_xml_test.cpp +++ /dev/null @@ -1,189 +0,0 @@ -/** - * @copyright Copyright (c) 2017 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Adrien Schadle - * - * @file - * @brief description of file - * @date 2023-02-21 - */ -#include - -#include -#include - -#define BOOST_TEST_MODULE MyTest -#include - -#include "VirtualGuitarist.h" - -#include "TestDefines.h" - -namespace fs = boost::filesystem; - -BOOST_AUTO_TEST_SUITE(xml_parsing) - -BOOST_AUTO_TEST_CASE(xml_valid) -{ - SRef xpcfComponentManager = xpcf::getComponentManagerInstance(); - - fs::path confPath = "xpcf_xml_test_valid.xml"; - fs::detail::utf8_codecvt_facet utf8; - org::bcom::xpcf::XPCFErrorCode ret = xpcfComponentManager->load(confPath.generic_string(utf8).c_str()); - - - auto covisibilityGraph = xpcfComponentManager->resolve(); - - BOOST_TEST_REQUIRE(ret == org::bcom::xpcf::_SUCCESS, "Xml parsing failed with error " << ret); - xpcfComponentManager->clear(); -} - -/*BOOST_AUTO_TEST_CASE(xml_missing_start_tag) -{ - SRef xpcfComponentManager = xpcf::getComponentManagerInstance(); - - fs::path confPath = "xpcf_xml_test_missing_start_tag.xml"; - fs::detail::utf8_codecvt_facet utf8; - BOOST_CHECK_THROW(xpcfComponentManager->load(confPath.generic_string(utf8).c_str()), xpcf::ConfigurationException); - xpcfComponentManager->clear(); -} - -BOOST_AUTO_TEST_CASE(xml_missing_end_tag) -{ - SRef xpcfComponentManager = xpcf::getComponentManagerInstance(); - - fs::path confPath = "xpcf_xml_test_missing_end_tag.xml"; - fs::detail::utf8_codecvt_facet utf8; - BOOST_CHECK_THROW(org::bcom::xpcf::XPCFErrorCode ret = xpcfComponentManager->load(confPath.generic_string(utf8).c_str()), xpcf::ConfigurationException); - xpcfComponentManager->clear(); -} - -BOOST_AUTO_TEST_CASE(xml_module_uuid_format_ko) -{ - SRef xpcfComponentManager = xpcf::getComponentManagerInstance(); - - fs::path confPath = "xpcf_xml_test_module_uuid_format_ko.xml"; - fs::detail::utf8_codecvt_facet utf8; - BOOST_CHECK_THROW(org::bcom::xpcf::XPCFErrorCode ret = xpcfComponentManager->load(confPath.generic_string(utf8).c_str()), xpcf::ConfigurationException); - xpcfComponentManager->clear(); -} - -BOOST_AUTO_TEST_CASE(xml_alias_uuid_format_ko) -{ - SRef xpcfComponentManager = xpcf::getComponentManagerInstance(); - - fs::path confPath = "xpcf_xml_test_alias_uuid_format_ko.xml"; - fs::detail::utf8_codecvt_facet utf8; - BOOST_CHECK_THROW(org::bcom::xpcf::XPCFErrorCode ret = xpcfComponentManager->load(confPath.generic_string(utf8).c_str()), xpcf::ConfigurationException); - xpcfComponentManager->clear(); -} - -BOOST_AUTO_TEST_CASE(xml_factory_bindings_to_uuid_format_ko) -{ - SRef xpcfComponentManager = xpcf::getComponentManagerInstance(); - - fs::path confPath = "xpcf_xml_test_factory_bindings_to_uuid_format_ko.xml"; - fs::detail::utf8_codecvt_facet utf8; - BOOST_CHECK_THROW(org::bcom::xpcf::XPCFErrorCode ret = xpcfComponentManager->load(confPath.generic_string(utf8).c_str()), xpcf::ConfigurationException); - xpcfComponentManager->clear(); -} - -BOOST_AUTO_TEST_CASE(xml_factory_bindings_component_uuid_format_ko) -{ - SRef xpcfComponentManager = xpcf::getComponentManagerInstance(); - - fs::path confPath = "xpcf_xml_test_factory_bindings_component_uuid_format_ko.xml"; - fs::detail::utf8_codecvt_facet utf8; - BOOST_CHECK_THROW(org::bcom::xpcf::XPCFErrorCode ret = xpcfComponentManager->load(confPath.generic_string(utf8).c_str()), xpcf::ConfigurationException); - xpcfComponentManager->clear(); -} - -BOOST_AUTO_TEST_CASE(xml_factory_inject_uuid_format_ko) -{ - SRef xpcfComponentManager = xpcf::getComponentManagerInstance(); - - fs::path confPath = "xpcf_xml_test_factory_inject_uuid_format_ko.xml"; - fs::detail::utf8_codecvt_facet utf8; - BOOST_CHECK_THROW(org::bcom::xpcf::XPCFErrorCode ret = xpcfComponentManager->load(confPath.generic_string(utf8).c_str()), xpcf::ConfigurationException); - xpcfComponentManager->clear(); -} - -BOOST_AUTO_TEST_CASE(xml_configuration_uuid_format_ko) -{ - SRef xpcfComponentManager = xpcf::getComponentManagerInstance(); - - fs::path confPath = "xpcf_xml_test_configuration_uuid_format_ko.xml"; - fs::detail::utf8_codecvt_facet utf8; - BOOST_CHECK_THROW(org::bcom::xpcf::XPCFErrorCode ret = xpcfComponentManager->load(confPath.generic_string(utf8).c_str()), xpcf::ConfigurationException); - xpcfComponentManager->clear(); -} - -BOOST_AUTO_TEST_CASE(xml_properties_uuid_format_ko) -{ - SRef xpcfComponentManager = xpcf::getComponentManagerInstance(); - - fs::path confPath = "xpcf_xml_test_properties_uuid_format_ko.xml"; - fs::detail::utf8_codecvt_facet utf8; - BOOST_CHECK_THROW(org::bcom::xpcf::XPCFErrorCode ret = xpcfComponentManager->load(confPath.generic_string(utf8).c_str()), xpcf::ConfigurationException); - xpcfComponentManager->clear(); -} - -BOOST_AUTO_TEST_CASE(xml_unknown_component) -{ - SRef xpcfComponentManager = xpcf::getComponentManagerInstance(); - - fs::path confPath = "xpcf_xml_test_unknown_component.xml"; - fs::detail::utf8_codecvt_facet utf8; - org::bcom::xpcf::XPCFErrorCode ret = xpcfComponentManager->load(confPath.generic_string(utf8).c_str()); - BOOST_TEST_REQUIRE(ret == org::bcom::xpcf::_SUCCESS, "loading error: " << ret); - BOOST_CHECK_THROW(xpcfComponentManager->resolve("UnknownMusician"), xpcf::ConfigurationException); - xpcfComponentManager->clear(); -} - -BOOST_AUTO_TEST_CASE(xml_property_type_invalid) -{ - SRef xpcfComponentManager = xpcf::getComponentManagerInstance(); - - fs::path confPath = "xpcf_xml_test_property_type_invalid.xml"; - fs::detail::utf8_codecvt_facet utf8; - org::bcom::xpcf::XPCFErrorCode ret = xpcfComponentManager->load(confPath.generic_string(utf8).c_str()); - BOOST_TEST_REQUIRE(ret == org::bcom::xpcf::_SUCCESS, "loading error: " << ret); - BOOST_CHECK_THROW(xpcfComponentManager->create("testInstance"), xpcf::ConfigurationException); - xpcfComponentManager->clear(); -} - -BOOST_AUTO_TEST_CASE(xml_unknown_property) -{ - SRef xpcfComponentManager = xpcf::getComponentManagerInstance(); - - fs::path confPath = "xpcf_xml_test_unknown_property.xml"; - fs::detail::utf8_codecvt_facet utf8; - org::bcom::xpcf::XPCFErrorCode ret = xpcfComponentManager->load(confPath.generic_string(utf8).c_str()); - BOOST_TEST_REQUIRE(ret == org::bcom::xpcf::_SUCCESS, "loading error: " << ret); - BOOST_CHECK_THROW(xpcfComponentManager->create("testInstance"), xpcf::ConfigurationException); - xpcfComponentManager->clear(); -} - -BOOST_AUTO_TEST_CASE(xml_property_unknown_component) -{ - SRef xpcfComponentManager = xpcf::getComponentManagerInstance(); - - fs::path confPath = "xpcf_xml_test_property_unknown_component.xml"; - fs::detail::utf8_codecvt_facet utf8; - BOOST_CHECK_THROW(xpcfComponentManager->load(confPath.generic_string(utf8).c_str()), xpcf::ConfigurationException); - xpcfComponentManager->clear(); -}*/ - -BOOST_AUTO_TEST_SUITE_END() diff --git a/test/xpcf_xml_test_alias_uuid_format_ko.xml b/test/xpcf_xml_test_alias_uuid_format_ko.xml deleted file mode 100644 index a477e9c..0000000 --- a/test/xpcf_xml_test_alias_uuid_format_ko.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/test/xpcf_xml_test_configuration_uuid_format_ko.xml b/test/xpcf_xml_test_configuration_uuid_format_ko.xml deleted file mode 100644 index 7bf027b..0000000 --- a/test/xpcf_xml_test_configuration_uuid_format_ko.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - 2.1 - 2.7 - 2.8 - 2.1 - - - - - - 3.1 - 2.7 - 2.3 - 3.7 - - - - - diff --git a/test/xpcf_xml_test_factory_bindings_component_uuid_format_ko.xml b/test/xpcf_xml_test_factory_bindings_component_uuid_format_ko.xml deleted file mode 100644 index d8cbbc8..0000000 --- a/test/xpcf_xml_test_factory_bindings_component_uuid_format_ko.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/test/xpcf_xml_test_factory_bindings_to_uuid_format_ko.xml b/test/xpcf_xml_test_factory_bindings_to_uuid_format_ko.xml deleted file mode 100644 index f03b7b2..0000000 --- a/test/xpcf_xml_test_factory_bindings_to_uuid_format_ko.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/test/xpcf_xml_test_factory_inject_uuid_format_ko.xml b/test/xpcf_xml_test_factory_inject_uuid_format_ko.xml deleted file mode 100644 index 98a643c..0000000 --- a/test/xpcf_xml_test_factory_inject_uuid_format_ko.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/test/xpcf_xml_test_missing_end_tag.xml.template b/test/xpcf_xml_test_missing_end_tag.xml.template deleted file mode 100644 index 286d752..0000000 --- a/test/xpcf_xml_test_missing_end_tag.xml.template +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/test/xpcf_xml_test_missing_start_tag.xml.template b/test/xpcf_xml_test_missing_start_tag.xml.template deleted file mode 100644 index 34d9cb6..0000000 --- a/test/xpcf_xml_test_missing_start_tag.xml.template +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2.1 - 2.7 - 2.8 - 2.1 - - - - - - 3.1 - 2.7 - 2.3 - 3.7 - - - - - - - - - 0.2 - 0.5 - 0.8 - 1.1 - - - - - - 1.1 - 0.7 - 0.3 - 2.7 - - - - - - - - - - - - - - - - - - diff --git a/test/xpcf_xml_test_module_uuid_format_ko.xml.template b/test/xpcf_xml_test_module_uuid_format_ko.xml.template deleted file mode 100644 index cadcc90..0000000 --- a/test/xpcf_xml_test_module_uuid_format_ko.xml.template +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/test/xpcf_xml_test_properties_uuid_format_ko.xml b/test/xpcf_xml_test_properties_uuid_format_ko.xml deleted file mode 100644 index 4da84ab..0000000 --- a/test/xpcf_xml_test_properties_uuid_format_ko.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - 0.2 - 0.5 - 0.8 - 1.1 - - - - - - 1.1 - 0.7 - 0.3 - 2.7 - - - - - - - - - - - - - - - - - diff --git a/test/xpcf_xml_test_property_type_invalid.xml.template b/test/xpcf_xml_test_property_type_invalid.xml.template deleted file mode 100644 index b1171c4..0000000 --- a/test/xpcf_xml_test_property_type_invalid.xml.template +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2.1 - 2.7 - 2.8 - 2.1 - - - - - - 3.1 - 2.7 - 2.3 - 3.7 - - - - - - - - - 0.2 - 0.5 - 0.8 - 1.1 - - - - - - 1.1 - 0.7 - 0.3 - 2.7 - - - - - - - - - - - - - - - - - diff --git a/test/xpcf_xml_test_property_unknown_component.xml.template b/test/xpcf_xml_test_property_unknown_component.xml.template deleted file mode 100644 index 2e2acb6..0000000 --- a/test/xpcf_xml_test_property_unknown_component.xml.template +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2.1 - 2.7 - 2.8 - 2.1 - - - - - - 3.1 - 2.7 - 2.3 - 3.7 - - - - - - - - - 0.2 - 0.5 - 0.8 - 1.1 - - - - - - 1.1 - 0.7 - 0.3 - 2.7 - - - - - - - - - - - - - - - - - diff --git a/test/xpcf_xml_test_unknown_component.xml.template b/test/xpcf_xml_test_unknown_component.xml.template deleted file mode 100644 index 1bd93ab..0000000 --- a/test/xpcf_xml_test_unknown_component.xml.template +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/test/xpcf_xml_test_unknown_property.xml.template b/test/xpcf_xml_test_unknown_property.xml.template deleted file mode 100644 index fbfe877..0000000 --- a/test/xpcf_xml_test_unknown_property.xml.template +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/xpcf_xml_test_valid.xml.template b/test/xpcf_xml_test_valid.xml.template deleted file mode 100644 index 1fcbb00..0000000 --- a/test/xpcf_xml_test_valid.xml.template +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2.1 - 2.7 - 2.8 - 2.1 - - - - - - 3.1 - 2.7 - 2.3 - 3.7 - - - - - - - - - 0.2 - 0.5 - 0.8 - 1.1 - - - - - - 1.1 - 0.7 - 0.3 - 2.7 - - - - - - - - - - - - - - - - - - diff --git a/tools/cli/packagedependencies.txt.template b/tools/cli/packagedependencies.txt.template deleted file mode 100644 index 1686dd4..0000000 --- a/tools/cli/packagedependencies.txt.template +++ /dev/null @@ -1 +0,0 @@ -xpcf||xpcf|github|https://github.com/b-com-software-basis/xpcf/releases/download diff --git a/tools/cli/xpcfcli.cpp b/tools/cli/xpcfcli.cpp deleted file mode 100644 index 3e9d198..0000000 --- a/tools/cli/xpcfcli.cpp +++ /dev/null @@ -1,205 +0,0 @@ -/** - * @copyright Copyright (c) 2015 All Right Reserved, B-com http://www.b-com.com/ - * - * This file is subject to the B<>Com License. - * All other rights reserved. - * - * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY - * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A - * PARTICULAR PURPOSE. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2015-09-18 - */ - -#include -#include -#include -#include -#include -#include - -using namespace std; - -namespace fs = boost::filesystem; -namespace xpcf = org::bcom::xpcf; - - -static void usage(const char * appName) -{ - cout<<"Usage :"< "< p) -{ - std::cout<<"Property name ="<getName()<size() ; i++ ) { - switch (p->getType()) { - case xpcf::IProperty::IProperty_NONE : - break; - case xpcf::IProperty::IProperty_INTEGER : - std::cout<<"=> Int property = "<getIntegerValue(i)< Uint property = "<getUnsignedIntegerValue(i)< Long property = "<getLongValue(i)< ULong property = "<getUnsignedLongValue(i)< String property = "<getStringValue(i)< Float property = "<getFloatingValue(i)< Double property = "<getDoubleValue(i)< propertyMap = p->getStructureValue(i); - std::cout<<"Accessing class values for C0 from IProperty/IPropertyMap interfaces"<getProperties()) { - displayParameter(property); - } - break; - } - default: - break; - } - } -} - - -int main(int argc, char **argv) { - int optionIndex = argc-2; - map options; - options["-name"]=""; - options["-path"]=""; - options["-o"]=""; - std::string name,path,outputFilePath; - - while (optionIndex >= 1) { - if (strcmp(argv[optionIndex],"-help")==0) { - usage(argv[0]); - return 0; - } - if (strcmp(argv[optionIndex],"-v")==0) { - std::string version = MYVERSIONSTRING; - cout<(); - - //Initialize default ssl key dir to root configuration dir - name = options["-name"]; - path = options["-path"]; - outputFilePath = options["-o"]; - if (name.length() == 0 || path.length() == 0 || outputFilePath.length() == 0) { - cout<<"Empty option. "<set_logging_enabled(false); - SRef xpcfModuleManager = xpcf::getModuleManagerInstance(); - SPtr modMdata = xpcfModuleManager->introspectModule(name.c_str(), path.c_str()); - SRef rIComponentIntrospect; - std::cout<<"Module name = '"< UUID = '"<getUUID()<<"'"< path = '"<getPath()<<"'"< fullpath = '"<getFullPath()<<"'"<saveModuleInformations(outputFilePath.c_str(),modMdata); - - std::cout<<"=> Component list "<getComponents()) { - xpcf::XPCFErrorCode res=xpcf::XPCFErrorCode::_SUCCESS; - try { - rIComponentIntrospect = xpcfModuleManager->createComponent(modMdata,componentUUID); - std::cout<<"===> Component UUID='"<getNbInterfaces(); - for (xpcf::uuids::uuid interfaceUUID : rIComponentIntrospect->getInterfaces()) { - std::cout<<"===> interface UUID='"<implements()) { - SRef rIConfigurable = rIComponentIntrospect->bindTo(); - map> paramsMap; - if (rIConfigurable->hasProperties()) { - paramsMap[componentUUID] = rIConfigurable->getPropertyRootNode(); - rIConfigurable->serialize(outputFilePath.c_str(),0); - } - - for (auto property : rIConfigurable->getProperties()) { - if (rIConfigurable->getProperties().size() == 0) { - std::cout<<"ERROR : no movenext "< rInject = rIComponentIntrospect->bindTo(); - for (auto inj : rInject->getInjectables()) { - - } - } - catch (std::invalid_argument & e) { - std::cout<<"ERROR : invalid argument "<getNbInterfaces(); - std::vector uuidArray; - uuidArray.resize(nbInterfaces); - rIComponentIntrospect->getInterfaces(uuidArray.data()); - for (uint32_t j = 0 ; j interface["< -#include -#include -#include -#include -#include -#include - -#include -#include - -namespace xpcf = org::bcom::xpcf; - -template<> ASTParser * xpcf::ComponentFactory::createInstance(); - -ASTParser::ASTParser():xpcf::ComponentBase(xpcf::toMap()) -{ - declareInterface(this); - - m_simpleParser = xpcf::unixpcf::make_unique>(type_safe::ref(m_index)); - - m_fileParser = xpcf::unixpcf::make_unique(type_safe::ref(m_logger)); -} - - -ASTParser::~ASTParser() -{ - -} - -void ASTParser::unloadComponent () -{ - // provide component cleanup strategy - // default strategy is to delete self, uncomment following line in this case : - delete this; - return; -} - -int ASTParser::set_compile_options(const cxxopts::ParseResult & options, cppast::libclang_compile_config & config) -{ - if (options.count("verbose")) - config.write_preprocessed(true); - - if (options.count("fast_preprocessing")) - config.fast_preprocessing(true); - - if (options.count("remove_comments_in_macro")) - config.remove_comments_in_macro(true); - - if (options.count("include_directory")) - for (auto& include : options["include_directory"].as>()) - config.add_include_dir(include); - if (options.count("macro_definition")) - for (auto& macro : options["macro_definition"].as>()) - { - auto equal = macro.find('='); - auto name = macro.substr(0, equal); - if (equal == std::string::npos) - config.define_macro(std::move(name), ""); - else - { - auto def = macro.substr(equal + 1u); - config.define_macro(std::move(name), std::move(def)); - } - } - if (options.count("macro_undefinition")) - for (auto& name : options["macro_undefinition"].as>()) - config.undefine_macro(name); - if (options.count("feature")) - for (auto& name : options["feature"].as>()) - config.enable_feature(name); - - // the compile_flags are generic flags - cppast::compile_flags flags; - if (options.count("gnu_extensions")) - flags |= cppast::compile_flag::gnu_extensions; - if (options.count("msvc_extensions")) - flags |= cppast::compile_flag::ms_extensions; - if (options.count("msvc_compatibility")) - flags |= cppast::compile_flag::ms_compatibility; - - if (options["std"].as() == "c++98") - config.set_flags(cppast::cpp_standard::cpp_98, flags); - else if (options["std"].as() == "c++03") - config.set_flags(cppast::cpp_standard::cpp_03, flags); - else if (options["std"].as() == "c++11") - config.set_flags(cppast::cpp_standard::cpp_11, flags); - else if (options["std"].as() == "c++14") - config.set_flags(cppast::cpp_standard::cpp_14, flags); - else if (options["std"].as() == "c++1z") - config.set_flags(cppast::cpp_standard::cpp_1z, flags); - else - { - std::cerr << "invalid value '" + options["std"].as() + "' for std flag" << '\n'; - return 1; - } - return 0; -} - -int ASTParser::initOptions(const cxxopts::ParseResult & options) -{ - fs::detail::utf8_codecvt_facet utf8; - if (options.count("database_dir") && !options["database_dir"].as().empty()) - { - cppast::libclang_compilation_database database(options["database_dir"].as()); - - if (options.count("database_file")) { - m_config = cppast::libclang_compile_config(database, options["database_file"].as()); - } - else if (options.count("file") && !options["file"].as().empty()) { - m_config = cppast::libclang_compile_config(database, options["file"].as()); - } - } - - if (options.count("verbose")) { - m_logger.set_verbose(true); - } - - if (options.count("name")) { - m_metadata[IRPCGenerator::MetadataType::PROJECT_NAME] = options["name"].as(); - } - xpcf::uuids::random_generator gen; - xpcf::uuids::uuid moduleUUID = gen(); - std::string moduleUUIDStr = xpcf::uuids::to_string(moduleUUID); - if (options.count("module_uuid")) { - moduleUUIDStr = options["module_uuid"].as(); - } - m_metadata[IRPCGenerator::MetadataType::MODULE_UUID] = moduleUUIDStr; - m_metadata[IRPCGenerator::MetadataType::MODULE_NAME] = "xpcfGrpcRemoting" + m_metadata[IRPCGenerator::MetadataType::PROJECT_NAME]; - m_metadata[IRPCGenerator::MetadataType::MODULE_DESCRIPTION] = "xpcf remoting module for project " + m_metadata[IRPCGenerator::MetadataType::PROJECT_NAME]; - - if (options.count("project_version")) { - m_metadata[IRPCGenerator::MetadataType::PROJECT_VERSION] = options["project_version"].as(); - } - - if (options.count("name") && options.count("project_version") && options.count("repository") && options.count("url")) { - m_metadata[IRPCGenerator::MetadataType::PROJECT_DEPENDENCY_URL] = options["name"].as() + "|" - + options["project_version"].as() + "|"+ options["name"].as() + "|" - + options["repository"].as()+ "|"+ options["url"].as(); - } - - fs::path interfacesAbsolutePath = RemakenPathHelper::getHomePath(); - if (options.count("interfaces_folder")) { - interfacesAbsolutePath /= options["interfaces_folder"].as(); - } - m_interfacesAbsolutePath = interfacesAbsolutePath.generic_string(utf8); - if (m_interfacesAbsolutePath.back() != fs::path::separator) { - m_interfacesAbsolutePath += fs::path::separator; - } - return ASTParser::set_compile_options(options,m_config); -} - -std::string ASTParser::computeNamespace() -{ - std::string nspace; - uint32_t nspaceIdx = 0; - for (auto & n : m_currentNamespace) { - if (nspaceIdx > 0) { - nspace += "::"; - } - nspace += n; - nspaceIdx ++; - } - return nspace; -} - -bool isXpcfTrait(const cppast::cpp_class_template_specialization& c) -{ - return (c.name() == "InterfaceTraits") || (c.name() == "ComponentTraits"); -} - -std::string retrieveXpcfTraitType(const cppast::cpp_class_template_specialization& c) -{ - return c.unexposed_arguments().as_string(); -} - - -void ASTParser::parseXpcfTrait(std::ostream& out, const cppast::cpp_class_template_specialization& c) -{ - out << "Found class_template_specialization_t defined type = "<< c.name()<<'\n'; - - // There is only one argument for this template class, and it's the interface typename - std::string xpcfTraitTypeName = retrieveXpcfTraitType(c); - out<< "Found xpcf trait type = " << xpcfTraitTypeName<<'\n'; - if (xpcfTraitTypeName.find("::") == 0) { - xpcfTraitTypeName.erase(0,2); - } - const cppast::cpp_class & cppastClass = c.class_(); - std::string traitsClassName = cppastClass.name(); - out << "Class specialized = "<< traitsClassName <<'\n'; - for (const cppast::cpp_entity & ec: cppastClass) { - if (ec.kind() == cppast::cpp_entity_kind::variable_t) { // static variable are not considered members of the class ... - auto & varEntity = static_cast(ec); - out<< "Found variable " << ec.name()<<'\n'; - std::string exprValue; - if (varEntity.default_value()) { - const cppast::cpp_expression& expr = varEntity.default_value().value(); - - switch (expr.kind()) - { - case cppast::cpp_expression_kind::literal_t: - exprValue = static_cast(varEntity.default_value().value()).value(); - break; - case cppast::cpp_expression_kind::unexposed_t: - auto & unexpExpr = static_cast(varEntity.default_value().value()); - exprValue = unexpExpr.expression().as_string(); - break; - } - out<< " value = " << exprValue <<'\n'; - boost::algorithm::erase_all(exprValue,"\""); - if (ec.name() == "UUID") { - m_xpcfTraits[xpcfTraitTypeName].uuid = exprValue; - } - if (ec.name() == "NAME") { - m_xpcfTraits[xpcfTraitTypeName].name = exprValue; - } - if (ec.name() == "DESCRIPTION") { - m_xpcfTraits[xpcfTraitTypeName].description = exprValue; - } - } - } - } -} - -void ASTParser::parseEntity(std::ostream& out, const cppast::cpp_entity& e, const std::string & filePath) -{ - // print name and the kind of the entity - if (!e.name().empty()) - out << e.name(); - else - out << ""; - out << " (" << cppast::to_string(e.kind()) << ")\n"; - - // print whether or not it is a definition - if (cppast::is_definition(e)) - out << " [definition]\n"; - - // print number of attributes - if (!e.attributes().empty()) - out << " [" << e.attributes().size() << " attribute(s)]\n"; - - if (e.kind() == cppast::cpp_entity_kind::class_t) { - out << " [" << e.name() << "] is class"<< '\n'; - std::string entityNspace = computeNamespace(); - std::string includePath = filePath; - if (boost::algorithm::starts_with(includePath, m_interfacesAbsolutePath)) { - boost::algorithm::erase_first(includePath, m_interfacesAbsolutePath); - } - SRef c = xpcf::utils::make_shared(e, entityNspace, includePath); - c->parse(m_index); - if (c->isInterface() && !c->ignored()) { - m_interfaces.insert(std::make_pair(c->getFullName(),c)); - } - else { - if (!xpcf::mapContains(m_classes, c->getName())) { - m_classes.insert(std::make_pair(c->getFullName(),c)); - out << "Found user defined type = "<getFullName()<<'\n'; - } - } - } - - if (e.kind() == cppast::cpp_entity_kind::class_template_specialization_t) { - auto & c = static_cast(e); - if (isXpcfTrait(c)) { - parseXpcfTrait(out, c); - /* std::string traitTypeName = retrieveXpcfTraitType(c); - m_xpcfTraits[traitTypeName] = xpcfTraitInfo; // to handle later on : must be independent of parsing order - if (xpcf::mapContains(m_interfaces,traitTypeName)) { - auto desc = m_interfaces.at(traitTypeName); - desc->setXpcfTrait(xpcfTraitInfo); - }*/ - } - } - - if (e.kind() == cppast::cpp_entity_kind::language_linkage_t) - // no need to print additional information for language linkages - out << '\n'; - else if (e.kind() == cppast::cpp_entity_kind::namespace_t) - { - // cast to cpp_namespace - auto& ns = static_cast(e); - // print whether or not it is inline - if (ns.is_inline()) - out << " [inline]"; - out << '\n'; - } - else - { - // print the declaration of the entity - // it will only use a single line - // derive from code_generator and implement various callbacks for printing - // it will print into a std::string - class code_generator : public cppast::code_generator - { - std::string str_; // the result - bool was_newline_ = false; // whether or not the last token was a newline - // needed for lazily printing them - - public: - code_generator(const cppast::cpp_entity& e) - { - // kickoff code generation here - cppast::generate_code(*this, e); - } - - // return the result - const std::string& str() const noexcept - { - return str_; - } - - private: - // called to retrieve the generation options of an entity - generation_options do_get_options(const cppast::cpp_entity&, - cppast::cpp_access_specifier_kind) override - { - // generate declaration only - return code_generator::declaration; - } - - // no need to handle indentation, as only a single line is used - void do_indent() override {} - void do_unindent() override {} - - // called when a generic token sequence should be generated - // there are specialized callbacks for various token kinds, - // to e.g. implement syntax highlighting - void do_write_token_seq(cppast::string_view tokens) override - { - if (was_newline_) - { - // lazily append newline as space - str_ += ' '; - was_newline_ = false; - } - // append tokens - str_ += tokens.c_str(); - } - - // called when a newline should be generated - // we're lazy as it will always generate a trailing newline, - // we don't want - void do_write_newline() override - { - was_newline_ = true; - } - - } generator(e); - // print generated code - out << ": `" << generator.str() << '`' << '\n'; - } -} - -void ASTParser::processPostAstParsingActions() -{ - // perform actions depending on full parsing result - for (auto & [name,c] : getParsedInterfaces()) { - if (xpcf::mapContains(m_xpcfTraits, name)) { - c->setXpcfTrait(m_xpcfTraits.at(name)); - } - } -} - -void ASTParser::parseAst(std::ostream& out, const cppast::cpp_file& file) -{ - // print file name - out << "AST for '" << file.name() << "':\n"; - std::string prefix; // the current prefix string - std::vector currentNamespace; - // recursively visit file and all children - cppast::visit(file, [&](const cppast::cpp_entity& e, cppast::visitor_info info) { - if (e.kind() == cppast::cpp_entity_kind::file_t || cppast::is_templated(e) - || cppast::is_friended(e)) - // no need to do anything for a file, - // templated and friended entities are just proxies, so skip those as well - // return true to continue visit for children - return true; - else if (info.event == cppast::visitor_info::container_entity_exit) - { - // we have visited all children of a container, - // remove prefix - prefix.pop_back(); - prefix.pop_back(); - if (e.kind() == cppast::cpp_entity_kind::namespace_t) { - out << "leaving namespace "<< m_currentNamespace.back() <<"\n"; - m_currentNamespace.pop_back(); - } - } - else - { - out << prefix; // print prefix for previous entities - // calculate next prefix - if (info.last_child) - { - if (info.event == cppast::visitor_info::container_entity_enter) - prefix += " "; - out << "+-"; - - } - else - { - if (info.event == cppast::visitor_info::container_entity_enter) - prefix += "| "; - out << "|-"; - } - if (e.kind() == cppast::cpp_entity_kind::namespace_t) { - m_currentNamespace.push_back(e.name()); - } - parseEntity(out, e, file.name()); - } - - return true; - }); -} - -// parse a file -int ASTParser::parse_file(const std::string& filename, bool fatal_error) -{ - // the parser is used to parse the entity - // there can be multiple parser implementations - // parse the file - try - { - m_fileParsed = m_fileParser->parse(m_index, filename, m_config); - } - catch (cppast::libclang_error& ex) - { - std::cerr << "fatal libclang error: " << ex.what() << '\n'; - return 1; - } - - if (fatal_error && m_fileParser->error()) { - // a non-fatal parse error - // error has been logged to stderr - return 1; - } - - if (!m_fileParsed) { - return 2; - } - parseAst(std::cout, *m_fileParsed); - processPostAstParsingActions(); - return 0; -} - - - -void ASTParser::parse_database(const cppast::libclang_compilation_database& database, const cxxopts::ParseResult & options) -{ - struct data_t - { - UniqueRef>& parser; - const cppast::libclang_compilation_database& database; - const cxxopts::ParseResult options; - } data {m_simpleParser, database, options}; - - cppast::detail::for_each_file(database, &data, [](void* ptr, std::string file) { - auto& data = *static_cast(ptr); - - cppast::libclang_compile_config config(data.database, file); - ASTParser::set_compile_options(data.options,config); - data.parser->parse(std::move(file), std::move(config)); - }); -} - - -int ASTParser::parse_database(const std::string & databasePath, const cxxopts::ParseResult & options) -try -{ - - cppast::libclang_compilation_database database(databasePath); // the compilation database - - // simple_file_parser allows parsing multiple files and stores the results for us - try - { - parse_database(database,options); // parse all files in the database - } - catch (cppast::libclang_error& ex) - { - std::cerr << "fatal libclang error: " << ex.what() << '\n'; - return 1; - } - - if (m_simpleParser->error()) { - // a non-fatal parse error - // error has been logged to stderr - return 1; - } - for (auto& file : m_simpleParser->files()) { - parseAst(std::cout,file); - } - processPostAstParsingActions(); - return 0; -} -catch (std::exception& ex) -{ - std::cerr << ex.what() << '\n'; - return 1; -} - diff --git a/tools/generators/grpc/ASTParser.h b/tools/generators/grpc/ASTParser.h deleted file mode 100644 index dc04a57..0000000 --- a/tools/generators/grpc/ASTParser.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef ASTPARSER_H -#define ASTPARSER_H -#include -#include - -#include "interfaces/ITypeParser.h" -#include // for libclang_parser, libclang_compile_config, cpp_entity,... -#include - -class ASTParser : public org::bcom::xpcf::ComponentBase, virtual public ITypeParser -{ -public: - ASTParser(); - ~ASTParser() override; - void unloadComponent () override; - std::map> & getParsedInterfaces() override { return m_interfaces; } - std::map> & getParsedClasses() override { return m_classes; } - - //SRef getInterfaceInfo(const std::string & name) override; - std::map & metadata() override { return m_metadata; } - SRef getClassInfo(const std::string & name) override { if (org::bcom::xpcf::mapContains(m_classes, name)) { return m_classes.at(name); } return nullptr; } - SRef getInterfaceInfo(const std::string & name) override { if (org::bcom::xpcf::mapContains(m_interfaces, name)) { return m_interfaces.at(name); } return nullptr; } - void parseAst(std::ostream& out, const cppast::cpp_file& file) override; - int initOptions(const cxxopts::ParseResult & options) override; - - int parse_database(const std::string & databasePath, const cxxopts::ParseResult & options) override; - int parse_file(const std::string& filename, bool fatal_error) override; - -private: - static int set_compile_options(const cxxopts::ParseResult & options, cppast::libclang_compile_config & config); - void parse_database(const cppast::libclang_compilation_database& database, const cxxopts::ParseResult & options); - void parseEntity(std::ostream& out, const cppast::cpp_entity& e, const std::string & filePath); - void parseXpcfTrait(std::ostream& out, const cppast::cpp_class_template_specialization& c); - void processPostAstParsingActions(); - std::string computeNamespace(); - std::map m_metadata; - //std::vector> m_interfaces; - std::map> m_interfaces; - std::map> m_classes; - std::map m_xpcfTraits; - std::vector m_currentNamespace; - std::string m_currentFileName; - cppast::cpp_entity_index m_index; // the entity index is used to resolve cross references in the AST - UniqueRef> m_simpleParser; - UniqueRef m_fileParser; - cppast::stderr_diagnostic_logger m_logger; - cppast::libclang_compile_config m_config; - std::unique_ptr m_fileParsed; - std::string m_interfacesAbsolutePath; - -}; - - - - -template <> struct org::bcom::xpcf::ComponentTraits -{ - static constexpr const char * UUID = "{b82122a7-379d-40c6-8473-e34e4f4fc51d}"; - static constexpr const char * NAME = "ASTParser"; - static constexpr const char * DESCRIPTION = "ASTParser implements ITypeParser interface"; -}; - -#endif // ASTPARSER_H diff --git a/tools/generators/grpc/AbstractGenerator.cpp b/tools/generators/grpc/AbstractGenerator.cpp deleted file mode 100644 index 91173b3..0000000 --- a/tools/generators/grpc/AbstractGenerator.cpp +++ /dev/null @@ -1,73 +0,0 @@ -#include "AbstractGenerator.h" - -namespace xpcf = org::bcom::xpcf; - -template<> AbstractGenerator * xpcf::ComponentFactory::createInstance(); - - - -AbstractGenerator::AbstractGenerator(std::map componentInfosMap):xpcf::ComponentBase(componentInfosMap) -{ - declareInterface(this); - // Inject declarations come here : declare any component that must be injected to your component through its interface /////////////////////////..///// declareInjectable(m_filter); - // - // Inject declaration can have a name : - // declareInjectable(m_blurFilter, "blurFilter"); - // - // Inject declaration can be optional i.e. not finding a binding component for the interface is not an error : -#ifndef XPCF_NAMEDINJECTIONAPPROACH - declareInjectable(m_nextGenerator, true); -#endif - declareInjectable(m_astParser,"astParser"); -} - - -AbstractGenerator::~AbstractGenerator() -{ - -} - -void AbstractGenerator::unloadComponent () -{ - // provide component cleanup strategy - // default strategy is to delete self, uncomment following line in this case : - delete this; - return; -} - -void AbstractGenerator::setDestinationFolder(const std::string & folder) -{ - fs::detail::utf8_codecvt_facet utf8; - fs::path folderPath(folder,utf8); - if (!fs::exists(folderPath)) { - fs::create_directories(folderPath); // TODO : manage error - } - m_folder = folderPath; - if (m_nextGenerator) { - m_nextGenerator->setDestinationFolder(folder); - } -} - -void AbstractGenerator::setGenerateMode(const GenerateMode & mode) -{ - m_mode = mode; - if (m_nextGenerator) { - m_nextGenerator->setGenerateMode(mode); - } -} - -GenerationException::GenerationException(org::bcom::xpcf::XPCFErrorCode errCode):xpcf::Exception(errCode) -{ - -} - -GenerationException::GenerationException(const char * what, org::bcom::xpcf::XPCFErrorCode errCode):xpcf::Exception(what, errCode) -{ - -} - -GenerationException::GenerationException(const std::string & what, org::bcom::xpcf::XPCFErrorCode errCode):xpcf::Exception(what, errCode) -{ - -} - diff --git a/tools/generators/grpc/AbstractGenerator.h b/tools/generators/grpc/AbstractGenerator.h deleted file mode 100644 index b7f1e4b..0000000 --- a/tools/generators/grpc/AbstractGenerator.h +++ /dev/null @@ -1,94 +0,0 @@ -/** - * @copyright Copyright (c) 2020 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2020-09-23 - */ - -#ifndef ABSTRACTGENERATOR_H -#define ABSTRACTGENERATOR_H -#include -#include - -#include "interfaces/IRPCGenerator.h" -#include "interfaces/ITypeParser.h" -#include -#include -#include "CppHelpers.h" - -namespace fs = boost::filesystem; - -class AbstractGenerator : public org::bcom::xpcf::ComponentBase, virtual public IRPCGenerator -{ -public: - AbstractGenerator(std::map componentInfosMap); - ~AbstractGenerator() override; - void unloadComponent () override final; - void setDestinationFolder(const std::string & folder) override; - void setGenerateMode(const GenerateMode & mode = GenerateMode::STD_COUT) override; - - virtual std::map generateImpl([[maybe_unused]] SRef c, std::map metadata) { return metadata; } - virtual std::map validateImpl([[maybe_unused]] const SRef c, std::map metadata) { return metadata; } - virtual void initializeImpl([[maybe_unused]] std::map metadata) {} - virtual void finalizeImpl([[maybe_unused]] std::map metadata) {} - - std::map generate(SRef c, std::map metadata) final { - metadata = generateImpl(c, metadata); - if (m_nextGenerator) { - return m_nextGenerator->generate(c,metadata); - } - return metadata; - } - - void initialize(std::map metadata) final { - initializeImpl(metadata); - if (m_nextGenerator) { - m_nextGenerator->initialize(metadata); - } - } - - std::map validate(const SRef c, std::map metadata) final { - metadata = validateImpl(c, metadata); - if (m_nextGenerator) { - return m_nextGenerator->validate(c,metadata); - } - return metadata; - } - - void finalize(std::map metadata) final { - finalizeImpl(metadata); - if (m_nextGenerator) { - m_nextGenerator->finalize(metadata); - } - } - -protected: - GenerateMode m_mode; - fs::path m_folder; - SRef m_nextGenerator; - SRef m_astParser; -}; - -class GenerationException : public org::bcom::xpcf::Exception { -public: - GenerationException(org::bcom::xpcf::XPCFErrorCode errCode = org::bcom::xpcf::XPCFErrorCode::_FAIL); - GenerationException(const char * what, org::bcom::xpcf::XPCFErrorCode errCode = org::bcom::xpcf::XPCFErrorCode::_FAIL); - GenerationException(const std::string & what, org::bcom::xpcf::XPCFErrorCode errCode = org::bcom::xpcf::XPCFErrorCode::_FAIL); -}; - -#endif // ABSTRACTGENERATOR_H diff --git a/tools/generators/grpc/ClassDescriptor.cpp b/tools/generators/grpc/ClassDescriptor.cpp deleted file mode 100755 index 5f915b8..0000000 --- a/tools/generators/grpc/ClassDescriptor.cpp +++ /dev/null @@ -1,179 +0,0 @@ -#include "ClassDescriptor.h" -#include -#include "MethodDescriptor.h" -#include -#include -#include - - -namespace xpcf = org::bcom::xpcf; - -ClassDescriptor::ClassDescriptor(const cppast::cpp_entity& c, const std::string & nameSpace, const std::string & filePath):m_baseClass(static_cast(c)) -{ - m_metadata[MetadataType::INTERFACENAMESPACE] = nameSpace; - m_metadata[MetadataType::INTERFACEFILEPATH] = filePath; -} - -ClassDescriptor::ClassDescriptor(const cppast::cpp_class& c):m_baseClass(c) -{ -} - -std::string ClassDescriptor::getFullName() const -{ - if (m_metadata.at(MetadataType::INTERFACENAMESPACE).empty()) { - return m_baseClass.name(); - } - return m_metadata.at(MetadataType::INTERFACENAMESPACE) + "::" + m_baseClass.name(); -} - -void ClassDescriptor::setXpcfTrait(const org::bcom::xpcf::Traits & trait) -{ - m_xpcfTrait.uuid = trait.uuid; - m_xpcfTrait.name = trait.name; - m_xpcfTrait.description = trait.description; -} - -const org::bcom::xpcf::uuids::uuid & ClassDescriptor::createClientUUID() const -{ - xpcf::uuids::random_generator gen; - m_clientUUID = gen(); - return m_clientUUID; -} - -const org::bcom::xpcf::uuids::uuid & ClassDescriptor::createServerUUID() const -{ - xpcf::uuids::random_generator gen; - m_serverUUID = gen(); - return m_serverUUID; -} - -void ClassDescriptor::generateRpcMapping(const std::map> & virtualMethodsMap) -{ - for (auto & [name, indexArray] : virtualMethodsMap) { - if (indexArray.size() > 1) { - std::size_t methodIndex = 0; - for (auto & index : indexArray) { - std::string grpcMethodName = name + "_grpc" + std::to_string(methodIndex++); - m_virtualMethods[index]->m_rpcName = grpcMethodName; - } - } - else { - m_virtualMethods[indexArray[0]]->m_rpcName = name; - } - } -} - -void ClassDescriptor::parseMethods(const cppast::cpp_class & c, std::map> & virtualMethodsMap, const cppast::cpp_entity_index& index) -{ - for (auto & base: c.bases()) { - std::cout<<"parseMethods::Base name="< desc = xpcf::utils::make_shared(static_cast(m), m_compressionDisabled); - desc->parse(index); - if (desc->isPureVirtual()) { - m_virtualMethods.push_back(desc); - virtualMethodsMap[desc->getName()].push_back(m_virtualMethods.size() - 1); - } - } - } -} - -bool ClassDescriptor::parse(const cppast::cpp_entity_index& index) -{ - std::map> virtualMethodsMap; - std::cout << " ==> parsing class "< -#include "MethodDescriptor.h" -#include -#include -#include -#include - -// xpcf remoting DSL: following keywords can be used at the interface level -// [[xpcf::ignore]] : can be used at class or method level to specify the corresponding class/method must be ignored while generating remoting code -// [[xpcf::clientUUID(uuid_string)]] : can be used at class level only : used to specify the xpcf remoting client UUID -// [[xpcf::serverUUID(uuid_string)]] : can be used at class level only : used to specify the xpcf remoting server UUID -// -> uuid_string is a uuid formed string without quotes !! -// side note : there will be a need to differentiate between grpc protobuf UUIDs vs flatbuffers UUIDs vs another rpc layer UUIDs ? -// message receive size can be specified with [[grpc::client_receiveSize("size")]] where -1 is unlimited size -// message send size can be specified with [[grpc::client_sendSize("size")]] where -1 is unlimited size - -class ClassDescriptor -{ -public: - typedef enum { - INTERFACENAMESPACE, - INTERFACEFILEPATH, - REMOTINGNSPACE, - GRPCSERVICENAME, - GRPCPROTOFILENAME - } MetadataType; - ClassDescriptor(const cppast::cpp_entity& c, const std::string & nameSpace, const std::string & filePath); - ClassDescriptor(const cppast::cpp_class& c); - ClassDescriptor(const ClassDescriptor& other) = delete; - const std::string & getName() const { return m_baseClass.name(); } - std::string getFullName() const; - const org::bcom::xpcf::uuids::uuid & getClientUUID() const { return m_clientUUID; } - const org::bcom::xpcf::uuids::uuid & createClientUUID() const; - const org::bcom::xpcf::uuids::uuid & createServerUUID() const; - const org::bcom::xpcf::uuids::uuid & getServerUUID() const { return m_serverUUID; } - void setXpcfTrait(const org::bcom::xpcf::Traits & trait); - const org::bcom::xpcf::Traits & getXpcfTrait() const { return m_xpcfTrait; } - const std::vector & getBases() { return m_bases; } - bool isInterface() const { return m_isInterface; } - bool parse(const cppast::cpp_entity_index& index); - bool ignored() const { return m_ignored; } - const std::map & getMetadata() const { return m_metadata; } - void setRemotingNamespace(const std::string & nspace) { - m_metadata[MetadataType::REMOTINGNSPACE] = nspace; - } - - std::string& operator[](const MetadataType& index) - { - return m_metadata[index]; - } - - //I is the index type, normally an int - const std::string& operator[](const MetadataType& index) const - { - return m_metadata.at(index); - } - - std::vector> & methods() const { return m_virtualMethods; } - - bool clientReceiveSizeOverriden() { - return m_clientReceiveSizeOverriden; - } - bool clientSendSizeOverriden(){ - return m_clientSendSizeOverriden; - } - int64_t getClientReceiveSize() { - return m_clientReceiveSize; - } - int64_t getClientSendSize() { - return m_clientSendSize; - } - - bool compressionDisabled() { - return m_compressionDisabled; - } - - -private: - void generateRpcMapping(const std::map> & virtualMethodsMap); - void parseMethods(const cppast::cpp_class & c, std::map> & virtualMethodsMap, const cppast::cpp_entity_index& index); - mutable std::vector> m_virtualMethods; - //std::multimap m_virtualMethodsMap; - bool m_ignored = false; - const cppast::cpp_class& m_baseClass; - bool m_isXpcfInterface = false; - bool m_isInterface = false; - bool m_isXpcfComponent = false; - int64_t m_clientReceiveSize; - int64_t m_clientSendSize; - bool m_clientReceiveSizeOverriden = false; - bool m_clientSendSizeOverriden = false; - bool m_compressionDisabled = false; - mutable org::bcom::xpcf::uuids::uuid m_clientUUID = {00000000-0000-0000-0000-000000000000}; - mutable org::bcom::xpcf::uuids::uuid m_serverUUID = {00000000-0000-0000-0000-000000000000}; - std::map m_metadata; - std::map m_classParsed; - std::vector m_bases; - org::bcom::xpcf::Traits m_xpcfTrait; - -}; - -#endif // CLASSDESCRIPTOR_H diff --git a/tools/generators/grpc/CppHelpers.h b/tools/generators/grpc/CppHelpers.h deleted file mode 100644 index 5136b30..0000000 --- a/tools/generators/grpc/CppHelpers.h +++ /dev/null @@ -1,130 +0,0 @@ -#ifndef CPPHELPERS_H -#define CPPHELPERS_H -#include -#include -#include -#include -#include -#include - -const std::string cppBeginBlock = "{\n"; -const std::string cppEndBlock = "}\n\n"; -const std::string classEndBlock = "};\n\n"; -static const std::string indentStr = " "; - -typedef enum { - STD = 0, - CLASS = 1, - PUBLIC = 2, - PROTECTED = 3, - PRIVATE = 4, - NSPACE = 5 -} CPP; - -class CppBlockManager { -public: - - CppBlockManager(std::ostream& out):m_out(out) {}; - ~CppBlockManager() = default; - - void newline() { - m_out << '\n'; - } - - template< CPP t = STD> - void enter() { - m_blockStack.push(t); - std::string b; - switch (t) { - case PUBLIC : - b = indent() + "public:\n"; - break; - case PROTECTED : - b = indent() + "protected:\n"; - break; - case PRIVATE : - b = indent() + "private:\n"; - break; - default: - b = indent() + cppBeginBlock; - break; - } - if (t != NSPACE) { - m_indentLevel ++; - } - m_out << b; - } - - void leave() { - CPP t = m_blockStack.top(); - m_blockStack.pop(); - std::string b; - if (t != NSPACE && m_indentLevel > 0) { - m_indentLevel --; - } - switch (t) { - case PUBLIC : - case PROTECTED : - case PRIVATE : - b = "\n"; - break; - case CLASS : - b = indent() + classEndBlock; - break; - default: - b = indent() + cppEndBlock; - break; - } - m_out << b; - } - - std::ostream& out() { return m_out << indent(); } - - void includeGuardsStart(const std::string & name) { - std::string upcasedName = boost::to_upper_copy(name); - out() << "#ifndef " + upcasedName + "_H" ; - newline(); - out() << "#define " + upcasedName + "_H" ; - newline(); - } - - void includeGuardsEnd() { - out() << "#endif"; - } - - void include(const std::string & headerName, bool quoted = true) { - char includeStartSep = '<'; - char includeEndSep = '>'; - if (quoted) { - includeStartSep = includeEndSep = '"'; - } - out() << "#include " << includeStartSep << headerName << includeEndSep <<"\n"; - } - - std::string indent() { - std::string ind; - for (uint32_t i = 0; i m_blockStack; -}; - -template< CPP t = STD> -class block_guard { -public: - block_guard(CppBlockManager & mgr):m_blockMgr(mgr) { m_blockMgr.enter(); } - ~block_guard() { m_blockMgr.leave(); } - -private: - CppBlockManager & m_blockMgr; -}; - - -#endif // CPPHELPERS_H diff --git a/tools/generators/grpc/GRPCFlatBufferGenerator.cpp b/tools/generators/grpc/GRPCFlatBufferGenerator.cpp deleted file mode 100644 index a34aaa2..0000000 --- a/tools/generators/grpc/GRPCFlatBufferGenerator.cpp +++ /dev/null @@ -1,243 +0,0 @@ -#include "GRPCFlatBufferGenerator.h" -#include - -namespace xpcf = org::bcom::xpcf; - -template<> GRPCFlatBufferGenerator * xpcf::ComponentFactory::createInstance(); - -const std::map builtinType2flatbufferTypeMap = -{ - { cpp_builtin_type::cpp_void,""}, - - { cpp_builtin_type::cpp_bool,""}, - - { cpp_builtin_type::cpp_uchar,""}, - { cpp_builtin_type::cpp_ushort,""}, - { cpp_builtin_type::cpp_uint,""}, - { cpp_builtin_type::cpp_ulong,""}, - { cpp_builtin_type::cpp_ulonglong,""}, - { cpp_builtin_type::cpp_uint128,""}, - - { cpp_builtin_type::cpp_schar,""}, - { cpp_builtin_type::cpp_short,""}, - { cpp_builtin_type::cpp_int,""}, - { cpp_builtin_type::cpp_long,""}, - { cpp_builtin_type::cpp_longlong,""}, - { cpp_builtin_type::cpp_int128,""}, - - { cpp_builtin_type::cpp_float,""}, - { cpp_builtin_type::cpp_double,""}, - { cpp_builtin_type::cpp_longdouble,""}, - { cpp_builtin_type::cpp_float128,""}, - - { cpp_builtin_type::cpp_char,""}, - { cpp_builtin_type::cpp_wchar,""}, - { cpp_builtin_type::cpp_char16,""}, - { cpp_builtin_type::cpp_char32,""}, - - { cpp_builtin_type::cpp_nullptr,""}, - { cpp_builtin_type::cpp_int8_t,""}, - { cpp_builtin_type::cpp_int16_t,""}, - { cpp_builtin_type::cpp_int32_t,""}, - { cpp_builtin_type::cpp_int64_t,""}, - - { cpp_builtin_type::cpp_uint8_t,""}, - { cpp_builtin_type::cpp_uint16_t,""}, - { cpp_builtin_type::cpp_uint32_t,""}, - { cpp_builtin_type::cpp_uint64_t,""}, - - { cpp_builtin_type::cpp_int_least8_t,""}, - { cpp_builtin_type::cpp_int_least16_t,""}, - { cpp_builtin_type::cpp_int_least32_t,""}, - { cpp_builtin_type::cpp_int_least64_t,""}, - - { cpp_builtin_type::cpp_uint_least8_t,""}, - { cpp_builtin_type::cpp_uint_least16_t,""}, - { cpp_builtin_type::cpp_uint_least32_t,""}, - { cpp_builtin_type::cpp_uint_least64_t,""}, - - { cpp_builtin_type::cpp_int_fast8_t,""}, - { cpp_builtin_type::cpp_int_fast16_t,""}, - { cpp_builtin_type::cpp_int_fast32_t,""}, - { cpp_builtin_type::cpp_int_fast64_t,""}, - - { cpp_builtin_type::cpp_uint_fast8_t,""}, - { cpp_builtin_type::cpp_uint_fast16_t,""}, - { cpp_builtin_type::cpp_uint_fast32_t,""}, - { cpp_builtin_type::cpp_uint_fast64_t,""}, - - { cpp_builtin_type::cpp_intptr_t,""}, - { cpp_builtin_type::cpp_uintptr_t,""}, - - { cpp_builtin_type::cpp_intmax_t,""}, - { cpp_builtin_type::cpp_uintmax_t,""}, -}; - -GRPCFlatBufferGenerator::GRPCFlatBufferGenerator():AbstractGenerator(xpcf::toMap()) -{ -} - - -GRPCFlatBufferGenerator::~GRPCFlatBufferGenerator() -{ - -} - -const std::string & GRPCFlatBufferGenerator::tryConvertType(cpp_builtin_type type) -{ - static const std::string typeStr = ""; - if (builtinType2flatbufferTypeMap.find(type) != builtinType2flatbufferTypeMap.end()) { - return builtinType2flatbufferTypeMap.at(type); - } - return typeStr; -} - -std::string GRPCFlatBufferGenerator::getTypeName(const TypeDescriptor & p) -{ - std::string typeName; - if (p.kind() == type_kind::std_string_t) { - typeName = "string"; - } - else { - if (p.kind() != type_kind::enum_t) { - if (p.isVoid() && p.isReference()) { - throw GenerationException("GRPCProtoGenerator: void * serialization is not defined !"); - } - //TODO : differentiate between pointers and refs ! - //pointer means array of elements : need a size to figure out howto handle the parameter ! - //reference to builtin means builtin not array : must be different while transcribing and generating stubs ! - /* const std::pair & typeInfo = GRPCFlatBufferGenerator::tryConvertType(p.getBuiltinType()); - typeName = typeInfo.first; - if (typeInfo.second) { - p.enableStaticCast(proto2cppTypeMap.at(typeName)); - } - if (typeName.size() == 0 && p.kind() != type_kind::builtin_t) { - typeName = "bytes"; - }*/ - } - else { - typeName = "sint32"; - p.enableStaticCast(typeName); - } - } - return typeName; -} - -void GRPCFlatBufferGenerator::prepareMessages(const SRef c) -{ - for (auto & methodDesc : c->methods()) { - std::string streamingClient, streamingServer; - - if (methodDesc->m_inParams.size() != 0 || methodDesc->m_inoutParams.size() != 0) { - methodDesc->m_requestName = methodDesc->m_rpcName + "Request"; - } - if (methodDesc->m_outParams.size() != 0 || methodDesc->m_inoutParams.size() != 0 || !methodDesc->returnType().isVoid()) { - methodDesc->m_responseName = methodDesc->m_rpcName + "Response"; - } - } -} - -void GRPCFlatBufferGenerator::generateService(const SRef c, std::ostream& out) -{ - out<<"rpc_service "<methods()) { - std::string inRequest = "Empty"; - std::string outRequest = "Empty"; - std::string streaming; - - if ((methodDesc->streamingType() == MethodDescriptor::streaming_type::client) && methodDesc->m_requestName != "Empty") { - streaming += "(streaming: client)"; - } - if ((methodDesc->streamingType() == MethodDescriptor::streaming_type::server) && methodDesc->m_responseName != "Empty"){ - streaming += "(streaming: server)"; - } - if ((methodDesc->streamingType() == MethodDescriptor::streaming_type::bidir) && methodDesc->m_responseName != "Empty" && methodDesc->m_requestName != "Empty"){ - streaming += "(streaming: bidi)"; - } - out<m_rpcName<<"("<m_requestName<<"):"<m_responseName<<" "< m, std::ostream& out) -{ - if (m->m_requestName != "Empty") { - out<<"Message "<m_requestName<m_inParams) { - if (p->type().kind() != type_kind::enum_t) { - typeName = tryConvertType(p->type().getBuiltinType()); - if (p->type().kind() != type_kind::builtin_t) { - typeName = p->type().getTypename(); - } - } - out<getName()<<" = "<m_inoutParams) { - if (p->type().kind() != type_kind::enum_t) { - typeName = tryConvertType(p->type().getBuiltinType()); - if (p->type().kind() != type_kind::builtin_t) { - typeName = p->type().getTypename(); - } - } - out<getName()<<" = "<m_responseName != "Empty") { - out<<"Message "<m_responseName<m_inoutParams) { - if (p->type().kind() != type_kind::enum_t) { - typeName = tryConvertType(p->type().getBuiltinType()); - if (p->type().kind() != type_kind::builtin_t) { - typeName = p->type().getTypename(); - } - } - out<getName()<<" = "<m_outParams) { - if (p->type().kind() != type_kind::enum_t) { - typeName = tryConvertType(p->type().getBuiltinType()); - if (p->type().kind() != type_kind::builtin_t) { - typeName = p->type().getTypename(); - } - } - out<getName()<<" = "< GRPCFlatBufferGenerator::generateImpl(SRef c, std::map metadata) -{ - m_serviceName = "grpc" + c->getName() + "Service"; - m_grpcServiceFilePath = m_serviceName + ".proto"; - (*c)[ClassDescriptor::MetadataType::GRPCSERVICENAME] = m_serviceName; - (*c)[ClassDescriptor::MetadataType::GRPCPROTOFILENAME] = m_grpcServiceFilePath; - - prepareMessages(c); - if (m_mode == GenerateMode::STD_COUT) { - for (auto & methodDesc : c->methods()) { - generateMessages(methodDesc, std::cout); - } - generateService(c, std::cout); - } - else { - fs::detail::utf8_codecvt_facet utf8; - fs::path grpcServiceFilePath(m_grpcServiceFilePath,utf8); - grpcServiceFilePath = m_folder/grpcServiceFilePath; - std::ofstream grpcServiceFile(grpcServiceFilePath.generic_string(utf8).c_str(), std::ios::out); - for (auto & methodDesc : c->methods()) { - generateMessages(methodDesc, grpcServiceFile); - } - generateService(c, grpcServiceFile); - grpcServiceFile.close(); - } - return metadata; -} diff --git a/tools/generators/grpc/GRPCFlatBufferGenerator.h b/tools/generators/grpc/GRPCFlatBufferGenerator.h deleted file mode 100644 index 0c025cb..0000000 --- a/tools/generators/grpc/GRPCFlatBufferGenerator.h +++ /dev/null @@ -1,55 +0,0 @@ -/** - * @copyright Copyright (c) 2019 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2019-11-15 - */ - -#ifndef GRPCFLATBUFFERGENERATOR_H -#define GRPCFLATBUFFERGENERATOR_H -#include - -#include "AbstractGenerator.h" - -class GRPCFlatBufferGenerator : public AbstractGenerator -{ -public: - GRPCFlatBufferGenerator(); - ~GRPCFlatBufferGenerator() override; - std::map generateImpl(SRef c, std::map metadata) override; - static const std::string & tryConvertType(enum cpp_builtin_type type); - -private: - std::string getTypeName(const TypeDescriptor & p); - void prepareMessages(const SRef c); - void generateMessages(SRef m, std::ostream& out); - - void generateService(const SRef c, std::ostream& out); - - std::string m_serviceName; - std::string m_grpcServiceFilePath; -}; - -template <> struct org::bcom::xpcf::ComponentTraits -{ - static constexpr const char * UUID = "{0DA4841C-1B2E-4A52-950C-583BD9E8BD31}"; - static constexpr const char * NAME = "GRPCFlatBufferGenerator"; - static constexpr const char * DESCRIPTION = "GRPCFlatBufferGenerator implements IRPCGenerator interface"; -}; - -#endif // GRPCFLATBUFFERGENERATOR_H diff --git a/tools/generators/grpc/GRPCMessage.cpp b/tools/generators/grpc/GRPCMessage.cpp deleted file mode 100644 index 18fdb3d..0000000 --- a/tools/generators/grpc/GRPCMessage.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "GRPCMessage.h" - -GRPCMessage::GRPCMessage() -{ - -} diff --git a/tools/generators/grpc/GRPCProtoGenerator.cpp b/tools/generators/grpc/GRPCProtoGenerator.cpp deleted file mode 100755 index b4affda..0000000 --- a/tools/generators/grpc/GRPCProtoGenerator.cpp +++ /dev/null @@ -1,444 +0,0 @@ -#include "GRPCProtoGenerator.h" -#include "RemakenPathHelper.h" -#include -#include -#include -#include -#include - -namespace bp = boost::process; - -namespace xpcf = org::bcom::xpcf; - -template<> GRPCProtoGenerator * xpcf::ComponentFactory::createInstance(); -// service generation: generates grpcIPointCloudManagerService.grpc.pb.[h/cc] -//protoc grpcIPointCloudManagerService.proto --grpc_out=. --plugin=protoc-gen-grpc=/usr/local/bin/grpc_cpp_plugin -//message generation: generates grpcIPointCloudManagerService.pb.[h/cc] -// protoc grpcIPointCloudManagerService.proto --cpp_out=./ -static const std::map> builtinType2protobufTypeMap = -{ -{ cpp_builtin_type::cpp_void,{"Empty",false}}, - -{ cpp_builtin_type::cpp_bool,{"bool",false}}, - -{ cpp_builtin_type::cpp_uchar,{"uint32",true}}, -{ cpp_builtin_type::cpp_ushort,{"uint32",true}}, -{ cpp_builtin_type::cpp_uint,{"uint32",false}}, -{ cpp_builtin_type::cpp_ulong,{"uint64",false}}, -{ cpp_builtin_type::cpp_ulonglong,{"uint64",false}}, -{ cpp_builtin_type::cpp_uint128,{"bytes",false}}, - -{ cpp_builtin_type::cpp_schar,{"sint32",true}}, -{ cpp_builtin_type::cpp_short,{"sint32",true}}, -{ cpp_builtin_type::cpp_int,{"sint32",false}}, -{ cpp_builtin_type::cpp_long,{"sint64",false}}, -{ cpp_builtin_type::cpp_longlong,{"sint64",false}}, -{ cpp_builtin_type::cpp_int128,{"bytes",false}}, - -{ cpp_builtin_type::cpp_float,{"float",false}}, -{ cpp_builtin_type::cpp_double,{"double",false}}, -{ cpp_builtin_type::cpp_longdouble,{"bytes",false}}, -{ cpp_builtin_type::cpp_float128,{"bytes",false}}, - -{ cpp_builtin_type::cpp_char,{"sint32",true}}, -{ cpp_builtin_type::cpp_wchar,{"sint32",true}}, -{ cpp_builtin_type::cpp_char16,{"sint32",true}}, -{ cpp_builtin_type::cpp_char32,{"sint32",true}}, -{ cpp_builtin_type::cpp_int8_t,{"sint32",true}}, -{ cpp_builtin_type::cpp_int16_t,{"sint32",false}}, -{ cpp_builtin_type::cpp_int32_t,{"sint32",true}}, -{ cpp_builtin_type::cpp_int64_t,{"sint64",false}}, - -{ cpp_builtin_type::cpp_uint8_t,{"uint32",true}}, -{ cpp_builtin_type::cpp_uint16_t,{"uint32",true}}, -{ cpp_builtin_type::cpp_uint32_t,{"uint32",false}}, -{ cpp_builtin_type::cpp_uint64_t,{"uint64",false}}, - -{ cpp_builtin_type::cpp_int_least8_t,{"sint32",true}}, -{ cpp_builtin_type::cpp_int_least16_t,{"sint32",true}}, -{ cpp_builtin_type::cpp_int_least32_t,{"sint32",false}}, -{ cpp_builtin_type::cpp_int_least64_t,{"sint64",false}}, - -{ cpp_builtin_type::cpp_uint_least8_t,{"uint32",true}}, -{ cpp_builtin_type::cpp_uint_least16_t,{"uint32",true}}, -{ cpp_builtin_type::cpp_uint_least32_t,{"uint32",false}}, -{ cpp_builtin_type::cpp_uint_least64_t,{"uint64",false}}, - -{ cpp_builtin_type::cpp_int_fast8_t,{"sint32",true}}, -{ cpp_builtin_type::cpp_int_fast16_t,{"sint32",true}}, -{ cpp_builtin_type::cpp_int_fast32_t,{"sint32",false}}, -{ cpp_builtin_type::cpp_int_fast64_t,{"sint64",false}}, - -{ cpp_builtin_type::cpp_uint_fast8_t,{"uint32",true}}, -{ cpp_builtin_type::cpp_uint_fast16_t,{"uint32",true}}, -{ cpp_builtin_type::cpp_uint_fast32_t,{"uint32",false}}, -{ cpp_builtin_type::cpp_uint_fast64_t,{"uint64",false}}, -}; - - -static const std::map proto2cppTypeMap = { - {"uint32","uint32_t"}, - {"sint32","int32_t"}, - {"uint64","uint64_t"}, - {"sint64","int64_t"}, - {"bytes","std::string"}, -}; - -static const std::map protoReservedKeywordsTranscription = { - {"descriptor","descriptorParam"}, - {"grpcServerCompressionFormat","grpcServerCompressionFormatParam"}, -}; - -GRPCProtoGenerator::GRPCProtoGenerator():AbstractGenerator(xpcf::toMap()) -{ - -} - - -GRPCProtoGenerator::~GRPCProtoGenerator() -{ - -} - -void GRPCProtoGenerator::prepareMessages(const SRef c) -{ - for (auto & methodDesc : c->methods()) { - std::string streamingClient, streamingServer; - - if (methodDesc->m_requestName != "::google::protobuf::Empty") { - if (methodDesc->m_requestName.empty()) { - methodDesc->m_requestName = methodDesc->m_rpcName + "Request"; - } - } - else { - methodDesc->m_requestName = "google.protobuf.Empty"; - } - if (methodDesc->hasOutputs()) { - if (methodDesc->m_responseName.empty()) { - methodDesc->m_responseName = methodDesc->m_rpcName + "Response"; - } - } - else { - methodDesc->m_responseName = "google.protobuf.Empty"; - } - } -} - -void GRPCProtoGenerator::generateService(const SRef c, std::ostream& out) -{ - out<<"service "<methods()) { - std::string streamingClient, streamingServer; - - if ((methodDesc->streamingType() & MethodDescriptor::streaming_type::client) && methodDesc->m_requestName != "google.protobuf.Empty") { - streamingClient = "stream "; - } - if ((methodDesc->streamingType() & MethodDescriptor::streaming_type::server) && methodDesc->m_responseName != "google.protobuf.Empty"){ - streamingServer = "stream "; - } - out<<"rpc "<m_rpcName<<"("<m_requestName<<") returns("<m_responseName<<") {}"<m_requestName != "google.protobuf.Empty") { - methodDesc->m_requestName = "::" + c->getMetadata().at(ClassDescriptor::MetadataType::REMOTINGNSPACE) + "::" + methodDesc->m_requestName; - } - else { - methodDesc->m_requestName = "::google::protobuf::Empty"; - } - if (methodDesc->m_responseName != "google.protobuf.Empty") { - methodDesc->m_responseName = "::" + c->getMetadata().at(ClassDescriptor::MetadataType::REMOTINGNSPACE) + "::" + methodDesc->m_responseName; - } - else { - methodDesc->m_responseName = "::google::protobuf::Empty"; - } - } - out<<"}"< & GRPCProtoGenerator::tryConvertType(cpp_builtin_type type) -{ - static const std::pair typeStr = {"",false}; - if (builtinType2protobufTypeMap.find(type) != builtinType2protobufTypeMap.end()) { - return builtinType2protobufTypeMap.at(type); - } - return typeStr; -} - -const std::string & GRPCProtoGenerator::tryTranscribeName(ParameterDescriptor & desc) -{ - if (protoReservedKeywordsTranscription.find(desc.getName()) != protoReservedKeywordsTranscription.end()) { - desc.setName(protoReservedKeywordsTranscription.at(desc.getName())); - } - return desc.getName(); -} - -std::string GRPCProtoGenerator::getTypeName(const TypeDescriptor & p) -{ - if (p.kind() == type_kind::std_string_t) { - return "string"; - } - if (p.kind() == type_kind::c_string_t) { - return "string"; - } - - std::string typeName; - if (p.kind() == type_kind::enum_t) { - typeName = "sint32"; - p.enableStaticCast(proto2cppTypeMap.at(typeName)); - return typeName; - } - - if (p.isVoid() && p.isReference()) { - throw GenerationException("GRPCProtoGenerator: void * serialization is not defined !"); - } - //TODO : differentiate between pointers and refs ! - //pointer means array of elements : need a size to figure out howto handle the parameter ! - //reference to builtin means builtin not array : must be different while transcribing and generating stubs ! - if ( p.kind() == type_kind::builtin_t ) { - const std::pair & typeInfo = GRPCProtoGenerator::tryConvertType(p.getBuiltinType()); - typeName = typeInfo.first; - if (typeInfo.second) { - p.enableStaticCast(proto2cppTypeMap.at(typeName)); - } - } - if (typeName.size() == 0 && p.kind() != type_kind::builtin_t) { - typeName = "bytes"; - } - return typeName; -} - -void GRPCProtoGenerator::generateMessages(SRef m, std::ostream& out) -{ - if (m->m_requestName != "google.protobuf.Empty") { - out<<"message "<m_requestName<m_responseName != "google.protobuf.Empty" && !m->compressionDisabled()) { - out << "int32 grpcServerCompressionFormat = "<m_inParams) { - auto typeName = getTypeName(p->type()); - out << typeName <<" "<< GRPCProtoGenerator::tryTranscribeName(*p) <<" = "<m_inoutParams) { - auto typeName = getTypeName(p->type()); - out<< typeName <<" "<< GRPCProtoGenerator::tryTranscribeName(*p) <<" = "<m_responseName != "google.protobuf.Empty") { - out<<"message "<m_responseName<m_inoutParams) { - auto typeName = getTypeName(p->type()); - - out<< typeName <<" "<< GRPCProtoGenerator::tryTranscribeName(*p) <<" = "<m_outParams) { - auto typeName = getTypeName(p->type()); - - out<< typeName <<" "<< GRPCProtoGenerator::tryTranscribeName(*p) <<" = "<returnType().isVoid()) { - auto typeName = getTypeName(m->returnType()); - out<< typeName <<" xpcfGrpcReturnValue = "< GRPCProtoGenerator::generateImpl(SRef c, std::map metadata) -{ - m_serviceName = "grpc" + c->getName() + "Service"; - m_grpcServiceFilePath = m_serviceName + ".proto"; - (*c)[ClassDescriptor::MetadataType::GRPCSERVICENAME] = m_serviceName; - (*c)[ClassDescriptor::MetadataType::GRPCPROTOFILENAME] = m_grpcServiceFilePath; - prepareMessages(c); - - try { - if (m_mode == GenerateMode::STD_COUT) { - for (auto & methodDesc : c->methods()) { - generateMessages(methodDesc, std::cout); - } - generateService(c, std::cout); - } - else { - fs::detail::utf8_codecvt_facet utf8; - fs::path grpcServiceFilePath(m_grpcServiceFilePath,utf8); - grpcServiceFilePath = m_folder/grpcServiceFilePath; - std::ofstream grpcServiceFile(grpcServiceFilePath.generic_string(utf8).c_str(), std::ios::out); - grpcServiceFile << "syntax = \"proto3\";\n\n"; - grpcServiceFile << "import \"google/protobuf/empty.proto\";\n\n"; - c->setRemotingNamespace("grpc" + c->getName()); - grpcServiceFile << "package "<< c->getMetadata().at(ClassDescriptor::MetadataType::REMOTINGNSPACE) <<";\n\n"; - for (auto & methodDesc : c->methods()) { - generateMessages(methodDesc, grpcServiceFile); - } - generateService(c, grpcServiceFile); - grpcServiceFile.close(); - m_protoFilesPath.push_back(grpcServiceFilePath); - m_protoNameFilesPathMap[ (*c)[ClassDescriptor::MetadataType::GRPCSERVICENAME] ] = grpcServiceFilePath; - } - } - catch (const GenerationException & e) { - fs::detail::utf8_codecvt_facet utf8; - fs::path grpcServiceFilePath(m_grpcServiceFilePath,utf8); - fs::remove(grpcServiceFilePath); - throw e; - } - return metadata; -} - -std::string getPackageId(bp::ipstream& packageDescription) -{ - std::string result=""; - std::string line=""; - - bool bFound=false; - std::getline(packageDescription, line); - while(!bFound){ - size_t pos = line.find("Package_ID: "); - if(pos != std::string::npos) { - result=line.substr(pos+12, line.find_last_of('\n')); - bFound=true; - } else { - std::getline(packageDescription, line); - } - } - return result; -} - -std::string getRequiredPackageId(std::string requiredPackageName, bp::ipstream& packageDescription) -{ - std::string result=""; - std::string line=""; - - // Find "[requires]" part - bool bFound=false; - std::getline(packageDescription, line); - while(!bFound && !packageDescription.eof()){ - size_t pos = line.find("[requires]"); - if(pos != std::string::npos) { - bFound=true; - } else { - std::getline(packageDescription, line); - } - } - - // Find required package name /:\n - bFound=false; - while(!bFound && !packageDescription.eof()){ - size_t pos = line.find(requiredPackageName); - if(pos != std::string::npos) { - result=line.substr(line.find_last_of(':')+1, line.find_last_of('\n')); - bFound=true; - } else { - std::getline(packageDescription, line); - } - } - - return result; -} - -void GRPCProtoGenerator::finalizeImpl(std::map metadata) -{ - std::vector envPath = boost::this_process::path(); - fs::path remakenGrpcRoot = RemakenPathHelper::computeRemakenRootPackageDir(); - - bp::ipstream out; - - // Remove zip and unzip folder before - fs::path zipFilePath = "./xpcf_grpc_gen_bin.zip"; - if (fs::exists(zipFilePath) ) { - fs::remove(zipFilePath); - } - fs::path zipFolderPath = "./xpcf_grpc_gen_bin/"; - if (fs::exists(zipFolderPath) ) { - fs::remove_all(zipFolderPath); - } - - //bp::system("wget https://github.com/b-com-software-basis/thirdparties-binaries/releases/download/xpcf_grpc_gen_bin/xpcf_grpc_gen_bin.zip", bp::std_out > out); - bp::system("wget https://github.com/b-com-software-basis/thirdparties-binaries/releases/download/xpcf_grpc_gen_bin_1.71.0/xpcf_grpc_gen_bin.zip", bp::std_out > out); - bp::system("unzip -o ./xpcf_grpc_gen_bin.zip"); - - fs::path grpcLibs = "./xpcf_grpc_gen_bin/lib/"; - fs::path grpcBin = "./xpcf_grpc_gen_bin/bin/"; - fs::path protocBin = grpcBin; - std::string SharedLibraryPathEnvName(RemakenPathHelper::sharedLibraryPathEnvName()); - - auto env = boost::this_process::environment(); - bp::environment runEnv = env; - fs::detail::utf8_codecvt_facet utf8; - std::cout << "Searching protobuf compiler (protoc) from path: " << std::endl; - std::cout << "===> "<< protocBin.generic_string(utf8) << std::endl; - - bool isRemakenGrpc = false; - if (!fs::exists(protocBin) || !fs::exists(grpcLibs) || !fs::exists(grpcBin)) { - isRemakenGrpc = true; - - std::vector envPath = boost::this_process::path(); - remakenGrpcRoot /= "grpc/1.71.1"; - fs::path grpcBin = remakenGrpcRoot; - grpcBin /= "/bin/x86_64/shared/release/"; - protocBin = grpcBin; - fs::path grpcLibs = remakenGrpcRoot; - grpcLibs /= "/lib/x86_64/shared/release/"; - - } - envPath.push_back(protocBin); - envPath.push_back(grpcBin); - runEnv[SharedLibraryPathEnvName] += grpcLibs.generic_string(utf8); - fs::path toolPath = bp::search_path("protoc", envPath); - fs::path pluginPath = bp::search_path("grpc_cpp_plugin", envPath); - if (toolPath.empty()) { - std::cerr<<"Error grpc protoc compiler not found : check your grpc installation !"< "<< protocBin.generic_string(utf8) << std::endl; - - int result = -1; - std::cout << "m_protoNameFilesPathMap.size()=" << m_protoNameFilesPathMap.size() << std::endl; - for (auto [name, protoFile] : m_protoNameFilesPathMap) { - std::cout << "generating grpc service and messages for " << name << " from .proto "<< protoFile.generic_string(utf8) << std::endl; - std::string protoPath = "--proto_path="; - protoPath += m_folder.generic_string(utf8).c_str(); - std::string destProto = "--cpp_out="; - destProto += m_folder.generic_string(utf8).c_str(); - if (isRemakenGrpc) { - std::string googleProtoPath = "--proto_path="; - fs::path protobufPath = remakenGrpcRoot; - protobufPath /= "interfaces"; - googleProtoPath += protobufPath.generic_string(utf8).c_str(); - std::cout< - -#include "AbstractGenerator.h" - - -// "simple backend" : no optimization copied datas to protobuf types -// "optimized backend" : optimization (avoid datas copy, use of bytes type ?) -// "intrusive backend" : based on an agnostic xpcf base datastructure provided by business datas : on the go serialized buffer -class GRPCProtoGenerator : public AbstractGenerator -{ -public: - GRPCProtoGenerator(); - ~GRPCProtoGenerator() override; - std::map generateImpl(SRef c, std::map metadata) override; - void finalizeImpl(std::map metadata) override; - static const std::pair & tryConvertType(enum cpp_builtin_type type); - -private: - static const std::string & tryTranscribeName(ParameterDescriptor & desc); - std::string getTypeName(const TypeDescriptor & p); - void prepareMessages(const SRef c); - void generateMessages(SRef m, std::ostream& out); - void generateService(const SRef c, std::ostream& out); - std::string m_serviceName; - std::string m_grpcServiceFilePath; - std::vector m_protoFilesPath; - std::map m_protoNameFilesPathMap; -}; - - - - -template <> struct org::bcom::xpcf::ComponentTraits -{ - static constexpr const char * UUID = "{8ba42339-fb6b-4ef0-aa10-e4a4aa2ebcf8}"; - static constexpr const char * NAME = "GRPCProtoGenerator"; - static constexpr const char * DESCRIPTION = "GRPCProtoGenerator implements IRPCGenerator interface"; -}; - -#endif // GRPCPROTOGENERATOR_H diff --git a/tools/generators/grpc/MethodDescriptor.cpp b/tools/generators/grpc/MethodDescriptor.cpp deleted file mode 100644 index e05bb33..0000000 --- a/tools/generators/grpc/MethodDescriptor.cpp +++ /dev/null @@ -1,160 +0,0 @@ -#include "MethodDescriptor.h" -#include -#include -#include - -namespace xpcf = org::bcom::xpcf; - -MethodDescriptor::MethodDescriptor(const cppast::cpp_member_function& m, bool compressionDisabled):m_compressionDisabled(compressionDisabled), m_baseMethod(m), m_returnDescriptor(m.return_type()) -{ -} - -const std::map str2typeStreamingMap = -{ - {"streaming",MethodDescriptor::streaming_type::bidir}, - {"client_streaming",MethodDescriptor::streaming_type::client}, - {"server_streaming",MethodDescriptor::streaming_type::server}, -}; - -void MethodDescriptor::setStreamingType(const std::string & streamType) -{ - if (str2typeStreamingMap.find(streamType) != str2typeStreamingMap.end()) { - if (((m_rpcStreamingType == streaming_type::client) && (str2typeStreamingMap.at(streamType) == streaming_type::server)) || - ((m_rpcStreamingType == streaming_type::server) && (str2typeStreamingMap.at(streamType) == streaming_type::client))) { - m_rpcStreamingType = streaming_type::bidir; - } - else { - m_rpcStreamingType = str2typeStreamingMap.at(streamType); - } - } -} - -std::string MethodDescriptor::getReturnType() const -{ - //TODO : full type must be constructed inside the TypeDescriptor to properly handle template types for instance std::map must become - // std::map which can be done only inside the TypeDescriptor - std::string ret = m_returnType; - std::string nSpace = m_returnDescriptor.getNamespace(); - if (!nSpace.empty() && nSpace.length() > 0) { - ret = nSpace + "::" + m_returnType; - } - return ret; -} - -const std::string MethodDescriptor::getDeclaration() const -{ - std::string methodDeclaration = m_baseMethod.name() + "("; - uint32_t nbTypes = 0; - for (auto & p : m_params) { - if (nbTypes != 0) { - methodDeclaration += ", "; - } - std::string nSpace = p->getNamespace(); - if (!nSpace.empty() && nSpace.length() > 0) { - nSpace += "::"; - } - //TODO : full type must be constructed inside the TypeDescriptor to properly handle template types for instance std::map must become - // std::map which can be done only inside the TypeDescriptor - methodDeclaration += nSpace + cppast::to_string(p->getCppastType()) + " " + p->getName(); - nbTypes++; - } - methodDeclaration += ")"; - return methodDeclaration; -} - -bool MethodDescriptor::parse(const cppast::cpp_entity_index& index) -{ - std::cout << " ==> parsing member function "< desc = xpcf::utils::make_shared(p); - desc->parse(index); - m_params.push_back(desc); - - switch (desc->ioType()) { - case ParameterDescriptor::io_type::in : - m_inParams.push_back(desc.get()); - break; - case ParameterDescriptor::io_type::out : - m_outParams.push_back(desc.get()); - break; - case ParameterDescriptor::io_type::inout : - m_inoutParams.push_back(desc.get()); - break; - default: // none case - if (desc->type().isConst()) { // constant parameter means input, either refed or not - m_inParams.push_back(desc.get()); - } - if (!desc->type().isReference() && !desc->type().isConst()) { // copy by value : in parameter - m_inParams.push_back(desc.get()); - } - if (desc->type().isReference() && !desc->type().isConst()) { // copy by non const ref : inout parameter - m_inoutParams.push_back(desc.get()); - } - break; - } - } - m_returnDescriptor.parse(index, m_baseMethod.return_type()); - if (m_inParams.size() > 0) { - std::cout<<" ==> End parsing member function : found "< Method declaration "< -#include -#include -#include -#include - -// xpcf remoting DSL: following keywords can be used at the method level -// streaming rpc must be indicated with [[grpc::server_streaming]], [[grpc::client_streaming]] or [[grpc::streaming]] at the method level -// optionally, grpc request and response message name can be set with [[grpc::request("requestMessageName")]] and [[grpc::response("responseMessageName")]] -// grpc method rpc name can be set with [[grpc::rpcName("rpcname")]] -// However, if you set the request and response across several methods, and use the same messages for several methods, you are responsible to ensure that message content are consistent -// Otherwise, request message content is built from input and input/output parameters -// response message content is built from output and input/output parameters -// xpcf remoting DSL: following keywords can be used at the method parameter level -// note : deducing a method parameter is [in] means : -// - plain T with no ref or pointer or shared_ptr -// - for pointers : one const on each derefed level i.e. const T* const T * const * const * and so on. -// - for refs : one const on each derefed level i.e. const T & (== T const &), T const * const & .. and so on. -// - for shared_ptr : const shared_ptr -// deducing a method parameter is [out] means : -// - T & with no const -// - T(*)n with no const -// mixed or inout types are not deduced and must be disambiguated with custom attributes at the parameter level : [[xpcf::in]], [[xpcf::out]], [[xpcf::inout]] - - - -class MethodDescriptor -{ -public: - typedef enum streaming_type { - none = 0x0, - client = 0x01, - server = 0x02, - bidir = 0x03 - } streaming_type; - - MethodDescriptor(const cppast::cpp_member_function& m, bool compressionDisabled = false); - const std::string & getName() const { return m_baseMethod.name(); } - const TypeDescriptor & returnType() const { return m_returnDescriptor; } - const std::string getFullDeclaration() const { return getReturnType() + " " + getDeclaration(); } - const std::string getDeclaration() const; - std::string getReturnType() const; - const streaming_type & streamingType() const { return m_rpcStreamingType; } - /* void addAttribute(); - bool isClientStream(); - bool isServerStream(); - void addParameter();*/ - bool isPureVirtual() const { return m_pureVirtual; } - bool isConst() const {return m_const; } - bool parse(const cppast::cpp_entity_index& index); - bool hasInputs() { return ((m_inParams.size() != 0) || (m_inoutParams.size() != 0)); } - bool hasOutputs() { return ((m_inoutParams.size() != 0) || (m_outParams.size() != 0 ) || !m_returnDescriptor.isVoid() ); } - bool compressionDisabled() { - return m_compressionDisabled; - } - - std::vector m_inParams; - std::vector m_outParams; - std::vector m_inoutParams; - std::vector> m_params; - std::string m_requestName; - std::string m_responseName; - std::string m_rpcName; - - - - -private: - bool m_compressionDisabled = false; - void setStreamingType(const std::string & streamType); - TypeDescriptor m_returnDescriptor; - streaming_type m_rpcStreamingType = streaming_type::none; - const cppast::cpp_member_function& m_baseMethod; - bool m_pureVirtual = false; - bool m_const = false; - std::string m_returnType; -}; - -#endif // METHODDESCRIPTOR_H diff --git a/tools/generators/grpc/MockGenerator.cpp b/tools/generators/grpc/MockGenerator.cpp deleted file mode 100755 index e7c00ea..0000000 --- a/tools/generators/grpc/MockGenerator.cpp +++ /dev/null @@ -1,288 +0,0 @@ -#include "MockGenerator.h" -#include "CppHelpers.h" - -#include - -namespace xpcf = org::bcom::xpcf; - -template<> MockGenerator * xpcf::ComponentFactory::createInstance(); - - -MockGenerator::MockGenerator():AbstractGenerator(xpcf::toMap()) -{ -} - - -MockGenerator::~MockGenerator() -{ - -} - -void MockGenerator::processHeaderMethods(const SRef c, CppBlockManager & blockMgr) -{ - for (auto m : c->methods()) { - blockMgr.out() << m->getFullDeclaration(); - if (m->isConst()) { - blockMgr.out() << " const"; - } - blockMgr.out() << " override;\n"; - if (m->returnType().kind() == type_kind::c_string_t) { - m_proxyMembersVariables["m_" + m->getName()] = std::make_pair("std::string", false); - } - else if (m->returnType().isConst() && m->returnType().isReference()) { - m_proxyMembersVariables["m_" + m->getName()] = std::make_pair(m->returnType().getFullTypeDescription(),m->isConst()); - } - } - blockMgr.newline(); -} - -void MockGenerator::generateHeader(const SRef c, std::map metadata, std::ostream& out) -{ - CppBlockManager blockMgr(out); - //NOTE : mock is configurable to set any needed property - xpcf::uuids::uuid mockUUID = c->getClientUUID(); - if (mockUUID.is_nil()) { - mockUUID = c->createClientUUID(); - m_serviceUuidMap[m_className] = xpcf::uuids::to_string(mockUUID); - } - blockMgr.out() << "// Mock xpcf component Class Header generated with xpcf_grpc_gen\n\n"; - blockMgr.newline(); - blockMgr.includeGuardsStart(m_className); - blockMgr.include(c->getMetadata().at(ClassDescriptor::MetadataType::INTERFACEFILEPATH)); // relative or absolute path?? TODO: retrieve filepath from metadata - blockMgr.include("xpcf/component/ConfigurableBase.h",false); - blockMgr.include("memory",false); - blockMgr.include("string",false); - - blockMgr.newline(); - blockMgr.out() << "namespace " + m_nameSpace + " "; - { - block_guard nspaceBlk(blockMgr); - std::string baseInterface; - if (!c->getMetadata().at(ClassDescriptor::MetadataType::INTERFACENAMESPACE).empty()) { - baseInterface = c->getMetadata().at(ClassDescriptor::MetadataType::INTERFACENAMESPACE) + "::"; - } - baseInterface += c->getName(); - blockMgr.newline(); - blockMgr.out() << "class " + m_className + ": public org::bcom::xpcf::ConfigurableBase, virtual public " + baseInterface + " "; - { - std::map> proxyMembersVariables; // name, {type, isConstMethod} - block_guard classBlk(blockMgr); - { - block_guard publicBlk(blockMgr); - - blockMgr.out() << m_className +"();\n"; - blockMgr.out() << "~"+ m_className +"() override = default;\n"; - blockMgr.out() << "void unloadComponent () override final;\n"; - blockMgr.out() << "org::bcom::xpcf::XPCFErrorCode onConfigured() override;\n"; - blockMgr.newline(); - // foreach method - processHeaderMethods(c, blockMgr); - } - { - block_guard privateBlk(blockMgr); - for (auto & [name, value ] : m_proxyMembersVariables) { - auto & [type, isConst] = value; - if (isConst) { - blockMgr.out() << "mutable "; - } - blockMgr.out() << type << " " << name << ";\n"; - } - } - } - } - blockMgr.newline(); - - m_proxyMembersVariables.clear(); - - blockMgr.out() << "template <> struct org::bcom::xpcf::ComponentTraits<" + m_nameSpace + "::" + m_className +">\n"; - { - block_guard classBlk(blockMgr); - blockMgr.out() << "static constexpr const char * UUID = \"" + xpcf::uuids::to_string(mockUUID) + "\";\n"; - blockMgr.out() << "static constexpr const char * NAME = \"" + m_className + "\";\n"; - blockMgr.out() << "static constexpr const char * DESCRIPTION = \"" + m_className + " grpc client proxy component\";\n"; - } - blockMgr.newline(); - blockMgr.includeGuardsEnd(); -} - -void MockGenerator::bindInput(const ParameterDescriptor & p, CppBlockManager & blockMgr) -{ - if (p.type().kind() == type_kind::builtin_t - || p.type().kind() == type_kind::enum_t - || p.type().kind() == type_kind::std_string_t - || p.type().kind() == type_kind::c_string_t) { - if (p.type().needsStaticCast()) { - blockMgr.out() << "reqIn.set_"<< boost::to_lower_copy(p.getName()) << "(static_cast<" << p.type().getRPCType() << ">(" << p.getName() << "));\n"; - } - else { - blockMgr.out() << "reqIn.set_"<< boost::to_lower_copy(p.getName()) << "(" << p.getName() << ");\n"; - } - - } - else if ((p.type().kind() == type_kind::user_defined_t) || (p.type().kind() == type_kind::template_t)) { - blockMgr.out() << "reqIn.set_"<< boost::to_lower_copy(p.getName()) << "(xpcf::serialize<" << p.type().getFullTypeDescription() <<">(" << p.getName() << "));\n"; - } -} - -void MockGenerator::bindOutput(const ParameterDescriptor & p, CppBlockManager & blockMgr) -{ - if (p.type().kind() == type_kind::builtin_t - || p.type().kind() == type_kind::enum_t - || p.type().kind() == type_kind::std_string_t) { - if (p.type().needsStaticCast()) { - blockMgr.out() << p.getName() << " = static_cast<" << p.type().getFullTypeDescription() << ">(respOut." << boost::to_lower_copy(p.getName()) <<"());\n"; - } - else { - blockMgr.out() <(respOut."< c, CppBlockManager & blockMgr) -{ - for (auto m : c->methods()) { - blockMgr.out() << m->getReturnType() + " "+ m_className + "::" + m->getDeclaration(); - if (m->isConst()) { - blockMgr.out() << " const"; - } - blockMgr.out() << "\n"; - { - block_guard methodBlk(blockMgr); - if (m->hasInputs()) { - for (ParameterDescriptor * p: m->m_inParams) { - bindInput(*p, blockMgr); - } - for (ParameterDescriptor * p: m->m_inoutParams) { - bindInput(*p, blockMgr); - } - } - - blockMgr.out() << "// put your mock code here\n"; - - if (m->hasOutputs()) { - for (ParameterDescriptor * p: m->m_inoutParams) { - bindOutput(*p, blockMgr); - } - for (ParameterDescriptor * p: m->m_outParams) { - bindOutput(*p, blockMgr); - } - } - if (!m->returnType().isVoid()) { - if (m->returnType().kind() == type_kind::builtin_t) { - blockMgr.out() << m->returnType().getFullTypeDescription() << "xpcfMockReturnValue;\n"; - blockMgr.out() << "return xpcfMockReturnValue;\n"; - } - else if (m->returnType().kind() == type_kind::user_defined_t) { - if (m->returnType().isConst() && m->returnType().isReference()) { - blockMgr.out() << "return m_" << m->getName() << ";\n"; - } - else { - blockMgr.out() << m->returnType().getFullTypeDescription() << "xpcfMockReturnValue;\n"; - blockMgr.out() << "return xpcfMockReturnValue;\n"; - } - } - else if (m->returnType().kind() == type_kind::enum_t) { - blockMgr.out() << m->returnType().getFullTypeDescription() << "xpcfMockReturnValue;\n"; - blockMgr.out() << "return xpcfMockReturnValue;\n"; - } - else if (m->returnType().kind() == type_kind::c_string_t ) { - blockMgr.out() << "return m_" << m->getName() << ".c_str();\n"; - } - } - } - blockMgr.newline(); - } -} - -void MockGenerator::generateBody(const SRef c, std::map metadata, std::ostream& out) -{ - CppBlockManager blockMgr(out); - blockMgr.out() << "// XPCF Mock Class implementation generated with xpcf_grpc_gen\n"; - blockMgr.include(m_headerFileName); - blockMgr.include("cstddef",false); - blockMgr.include("xpcf/core/Exception.h",false); - blockMgr.out() << "namespace xpcf = org::bcom::xpcf;\n"; - - - blockMgr.newline(); - - blockMgr.out() << "template<> " + m_nameSpace + "::" + m_className + "* xpcf::ComponentFactory::createInstance<"+ m_nameSpace + "::" + m_className + ">();\n"; - blockMgr.newline(); - blockMgr.out() << "namespace " + m_nameSpace + " "; - { - block_guard nspaceBlk(blockMgr); - blockMgr.newline(); - - blockMgr.out() << m_className + "::" + m_className + "():xpcf::ConfigurableBase(xpcf::toMap<"+ m_className + ">())\n"; - { - block_guard methodBlk(blockMgr); - std::string baseInterface; - if (!c->getMetadata().at(ClassDescriptor::MetadataType::INTERFACENAMESPACE).empty()) { - baseInterface = c->getMetadata().at(ClassDescriptor::MetadataType::INTERFACENAMESPACE) + "::"; - } - baseInterface += c->getName(); - blockMgr.out() << "declareInterface<" + baseInterface + ">(this);\n"; - blockMgr.out() << "declareProperty(\"channelUrl\",m_channelUrl);\n"; - blockMgr.out() << "declareProperty(\"channelCredentials\",m_channelCredentials);\n"; - } - blockMgr.newline(); - blockMgr.out() << "void " + m_className + "::unloadComponent ()\n"; - { - block_guard methodBlk(blockMgr); - blockMgr.out() << "delete this;\n"; - blockMgr.out() << "return;\n"; - } - blockMgr.newline(); - blockMgr.out() << "XPCFErrorCode " + m_className +"::onConfigured()\n"; - { - block_guard methodBlk(blockMgr); - blockMgr.out() << "return xpcf::XPCFErrorCode::_SUCCESS;\n"; - } - blockMgr.newline(); - processBodyMethods(c, blockMgr); - } -} - -std::map MockGenerator::generateImpl(SRef c, std::map metadata) - -{ - m_nameSpace = "org::bcom::xpcf::mock" + c->getName(); - m_className = c->getName() + "_mockComponent"; - m_headerFileName = m_className + ".h"; - m_cppFileName = m_className + ".cpp"; - if (m_mode == GenerateMode::STD_COUT) { - generateHeader(c, metadata, std::cout); - generateBody(c, metadata, std::cout); - std::cout< metadata) -{ - for (auto [name, uuid] : m_serviceUuidMap) { - std::cout << "Component " << name << " generated uuid = [[xpcf::clientUUID(" << uuid <<")]]" << std::endl; - } - m_serviceUuidMap.clear(); -} - diff --git a/tools/generators/grpc/MockGenerator.h b/tools/generators/grpc/MockGenerator.h deleted file mode 100644 index a783775..0000000 --- a/tools/generators/grpc/MockGenerator.h +++ /dev/null @@ -1,64 +0,0 @@ -/** - * @copyright Copyright (c) 2020 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2020-09-25 - */ - -#ifndef MockGenerator_H -#define MockGenerator_H -#include - -#include "AbstractGenerator.h" - - - -class MockGenerator : public AbstractGenerator -{ -public: - MockGenerator(); - ~MockGenerator() override; - std::map generateImpl(SRef c, std::map metadata) override; - void finalizeImpl(std::map metadata) override; - -protected: - void generateHeader(const SRef c, std::map metadata, std::ostream& out); - void generateBody(const SRef c, std::map metadata, std::ostream& out); - -private: - void processHeaderMethods(const SRef c, CppBlockManager & blockMgr); - void processBodyMethods(const SRef c, CppBlockManager & blockMgr); - void bindInput(const ParameterDescriptor & p, CppBlockManager & blockMgr); - void bindOutput(const ParameterDescriptor & p, CppBlockManager & blockMgr); - std::string m_nameSpace; - std::string m_className; - std::string m_headerFileName; - std::string m_cppFileName; - std::map m_serviceUuidMap; - //TODO : replace m_proxyMembersVariables member with method argument forwarding, shouldn't be a member ! - std::map> m_proxyMembersVariables;//works only without simple naming conflict, should be nspaced ! -}; - -template <> struct org::bcom::xpcf::ComponentTraits -{ - static constexpr const char * UUID = "{79CA746B-A32F-490A-A988-DDC4FDD9A5B2}"; - static constexpr const char * NAME = "MockGenerator"; - static constexpr const char * DESCRIPTION = "MockGenerator implements AbstractGenerator interface"; -}; - -#endif // MockGenerator_H diff --git a/tools/generators/grpc/ParameterDescriptor.cpp b/tools/generators/grpc/ParameterDescriptor.cpp deleted file mode 100644 index 9fb9ac0..0000000 --- a/tools/generators/grpc/ParameterDescriptor.cpp +++ /dev/null @@ -1,62 +0,0 @@ -#include "ParameterDescriptor.h" - -#include -#include -#include -#include -#include -#include -#include -#include - - -ParameterDescriptor::ParameterDescriptor(const cppast::cpp_function_parameter & p):m_baseParam(p),m_typeDescriptor(p.type()) -{ - m_name = m_baseParam.name(); -} - -const std::map str2typeIoMap = -{ - {"inout",ParameterDescriptor::io_type::inout}, - {"in",ParameterDescriptor::io_type::in}, - {"out",ParameterDescriptor::io_type::out}, -}; - -void ParameterDescriptor::setIOType(const std::string & ioType) -{ - if (str2typeIoMap.find(ioType) != str2typeIoMap.end()) { - if (((m_ioType == io_type::in) && (str2typeIoMap.at(ioType) == io_type::out)) || - ((m_ioType == io_type::out) && (str2typeIoMap.at(ioType) == io_type::in))) { - m_ioType = io_type::inout; - } - else { - m_ioType = str2typeIoMap.at(ioType); - } - } -} - - -bool ParameterDescriptor::parse(const cppast::cpp_entity_index& index) -{ - std::cout << " ==> parsing parameter "<< m_name <<'\n'; - m_typeDescriptor.parse(index, m_baseParam.type()); - if (m_typeDescriptor.isConst()) { - m_ioType = io_type::in; - } - else if (m_typeDescriptor.isReference() || m_typeDescriptor.isSharedRef()) { - m_ioType = io_type::inout; - } - - if (!m_baseParam.attributes().empty()) { - // handle parameter attributes - for (auto & attrib : m_baseParam.attributes()) { - if (attrib.scope().has_value()) { - if (attrib.scope().value() == "xpcf") { - setIOType(attrib.name()); - } - } - } - } - return true; -} - diff --git a/tools/generators/grpc/ParameterDescriptor.h b/tools/generators/grpc/ParameterDescriptor.h deleted file mode 100644 index c0c63c8..0000000 --- a/tools/generators/grpc/ParameterDescriptor.h +++ /dev/null @@ -1,67 +0,0 @@ -/** - * @copyright Copyright (c) 2019 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2019-11-15 - */ - -#ifndef PARAMETERDESCRIPTOR_H -#define PARAMETERDESCRIPTOR_H -#include -#include -#include "TypeDescriptor.h" - - - -class ParameterDescriptor -{ -public: - typedef enum { - none = 0x0, - in = 0x01, - out = 0x02, - inout = 0x03 - } io_type; - - ParameterDescriptor(const cppast::cpp_function_parameter & p); - //void addAttribute(); - const io_type & ioType() const { return m_ioType; } - - const cppast::cpp_type & getCppastType() const { return m_typeDescriptor.getCppastType(); } - const std::string & getName() const { return m_name; } - void setName(const std::string & name) { m_name = name; } - const std::string & getNamespace() const { return m_typeDescriptor.getNamespace(); } - void setNamespace(const std::string & nameSpace) { m_typeDescriptor.setNamespace(nameSpace); } - - - - const TypeDescriptor & type() const { return m_typeDescriptor; } - bool parse(const cppast::cpp_entity_index& index); - //std::string getInnerType(); - -private: - void setIOType(const std::string & ioType); - void parse_parameter(const cppast::cpp_entity_index& index, const cppast::cpp_type & p); - const cppast::cpp_function_parameter & m_baseParam; - io_type m_ioType = io_type::none; - ParameterDescriptor * m_child; - TypeDescriptor m_typeDescriptor; - std::string m_name; -}; - -#endif // PARAMETERDESCRIPTOR_H diff --git a/tools/generators/grpc/ProjectGenerator.cpp.template b/tools/generators/grpc/ProjectGenerator.cpp.template deleted file mode 100755 index 6571533..0000000 --- a/tools/generators/grpc/ProjectGenerator.cpp.template +++ /dev/null @@ -1,239 +0,0 @@ -#include "ProjectGenerator.h" -#include - - -namespace bp = boost::process; -namespace xpcf = org::bcom::xpcf; - -template<> ProjectGenerator * xpcf::ComponentFactory::createInstance(); - -std::string findRemakenRulesStr = "# Author(s) : Loic Touraine, Stephane Leduc\n\nandroid {\n # unix path\nUSERHOMEFOLDER = $$clean_path($$(HOME))\n" -" isEmpty(USERHOMEFOLDER) {\n # windows path\n USERHOMEFOLDER = $$clean_path($$(USERPROFILE))\n isEmpty(USERHOMEFOLDER) {\n" -" USERHOMEFOLDER = $$clean_path($$(HOMEDRIVE)$$(HOMEPATH))\n }\n }\n}\n\n" -"unix:!android {\n USERHOMEFOLDER = $$clean_path($$(HOME))\n}\n\n" -"win32 {\n USERHOMEFOLDER = $$clean_path($$(USERPROFILE))\n isEmpty(USERHOMEFOLDER) {\n" -" USERHOMEFOLDER = $$clean_path($$(HOMEDRIVE)$$(HOMEPATH))\n }\n}\n\n" -"exists(builddefs/qmake) {\n QMAKE_REMAKEN_RULES_ROOT=builddefs/qmake\n}\n" -"else {\n QMAKE_REMAKEN_RULES_ROOT = $$clean_path($$(REMAKEN_RULES_ROOT))\n !isEmpty(QMAKE_REMAKEN_RULES_ROOT) {\n" -" QMAKE_REMAKEN_RULES_ROOT = $$clean_path($$(REMAKEN_RULES_ROOT)/qmake)\n }\n" -" else {\n QMAKE_REMAKEN_RULES_ROOT=$${USERHOMEFOLDER}/.remaken/rules/qmake\n" -" }\n}\n\n" -"!exists($${QMAKE_REMAKEN_RULES_ROOT}) {\n" -" error(\"Unable to locate remaken rules in \" $${QMAKE_REMAKEN_RULES_ROOT} \". Either check your remaken installation, or provide the path to your remaken qmake root folder rules in REMAKEN_RULES_ROOT environment variable.\")\n" -"}\n\nmessage(\"Remaken qmake build rules used : \" $$QMAKE_REMAKEN_RULES_ROOT)\n"; - -// TODO : package information should depend upon the generator used ! and grpc/protobuf version should be added from metadata ! -std::string pkgdepsStr = "xpcf||xpcf\%XPCF_SHARED_DEPS|@github|https://github.com/SolarFramework/binaries/releases/download\nxpcf_static_deps||xpcf_static_deps\%XPCF_STATIC_DEPS|@github|https://github.com/SolarFramework/binaries/releases/download\n"; - -ProjectGenerator::ProjectGenerator():AbstractGenerator(xpcf::toMap()) -{ - m_headerProjectInfos << "\nHEADERS +="; - m_srcProjectInfos << "\nSOURCES +="; - m_protoProjectInfos << "\nPROTO ="; - m_moduleHdrMgr = std::make_unique(m_moduleMainInfosHeader); - m_moduleSrcMgr = std::make_unique(m_moduleMainInfosSource); - m_moduleDeclareMgr = std::make_unique(m_moduleMainDeclareModule); - m_moduleHdrMgr->out() << "// Class Header generated with xpcf_grpc_gen\n\n"; - m_moduleHdrMgr->newline(); - m_moduleHdrMgr->includeGuardsStart("xpcfGrpcModuleMain"); - m_moduleDeclareMgr->include("xpcfGrpcModuleMain.h"); - m_moduleDeclareMgr->include("xpcf/module/ModuleFactory.h", false); - m_moduleDeclareMgr->out() << "namespace xpcf=org::bcom::xpcf;\n"; - // need project/fwk name to mangle module name ? - //NOTE : proxy is configurable to set grpc channel etc... - m_moduleSrcMgr->newline(); - m_moduleSrcMgr->out() << "extern \"C\" XPCF_MODULEHOOKS_API xpcf::XPCFErrorCode XPCF_getComponent(const boost::uuids::uuid& componentUUID,SRef& interfaceRef)\n"; - { - m_moduleSrcMgr->enter(); - m_moduleSrcMgr->out() << "xpcf::XPCFErrorCode errCode = xpcf::XPCFErrorCode::_FAIL;\n"; - } - m_moduleMainDeclareComponents << "XPCF_BEGIN_COMPONENTS_DECLARATION\n"; -} - - -ProjectGenerator::~ProjectGenerator() -{ -} - -void ProjectGenerator::initializeImpl(std::map metadata) -{ - m_moduleName = "xpcfGrpcRemoting" + metadata[MetadataType::PROJECT_NAME]; - m_moduleDescription = "xpcf remoting module for project " + metadata[MetadataType::PROJECT_NAME]; -} - -void ProjectGenerator::generateModuleMain(const SRef c, std::map metadata) -{ - m_moduleHdrMgr->include(metadata[MetadataType::PROXY_HEADERFILENAME]); - m_moduleHdrMgr->include(metadata[MetadataType::SERVER_HEADERFILENAME]); - - std::string fullComponentName = metadata[MetadataType::PROXY_XPCFGRPCNAMESPACE] + "::" + metadata[MetadataType::PROXY_XPCFGRPCCOMPONENTNAME]; - - m_moduleSrcMgr->out()<<"if (errCode != xpcf::XPCFErrorCode::_SUCCESS) "; - { - block_guard condBlk(*m_moduleSrcMgr); - m_moduleSrcMgr->newline(); - m_moduleSrcMgr->out()<<"errCode = xpcf::tryCreateComponent<" + fullComponentName + ">(componentUUID,interfaceRef);\n"; - } - m_moduleMainDeclareComponents<<"XPCF_ADD_COMPONENT(" <out()<<"if (errCode != xpcf::XPCFErrorCode::_SUCCESS) "; - { - block_guard condBlk(*m_moduleSrcMgr); - m_moduleSrcMgr->newline(); - m_moduleSrcMgr->out()<<"errCode = xpcf::tryCreateComponent<" + fullComponentName + ">(componentUUID,interfaceRef);\n"; - } - m_moduleMainDeclareComponents<<"XPCF_ADD_COMPONENT(" < metadata) -{ - fs::detail::utf8_codecvt_facet utf8; - std::string priFileName = "xpcfGrpcRemoting" + metadata[MetadataType::PROJECT_NAME] + ".pri"; - std::string priBaseFileName = "xpcfGrpcRemoting" + metadata[MetadataType::PROJECT_NAME] + "_base.pri"; - fs::path projectFilePath(priBaseFileName.c_str(),utf8); - projectFilePath = m_folder/projectFilePath; - std::ofstream projectFile(projectFilePath.generic_string(utf8).c_str(), std::ios::out); - - // - projectFile << "## remove Qt dependencies\nQT -= core gui\nCONFIG -= qt\n"; - projectFile << "\n## global definitions : target lib name, version\n"; - projectFile << "FRAMEWORK = $$TARGET\n"; - projectFile << "VERSION="<< metadata[MetadataType::PROJECT_VERSION] << "\n"; - projectFile << "\nDEFINES += MYVERSION=$${VERSION}\nDEFINES += XPCFVERSION=\\\\\\\"$${VERSION}\\\\\\\"\nDEFINES += TEMPLATE_LIBRARY\nCONFIG += c++1z\n\n"; - projectFile << "include(findremakenrules.pri)\n\n"; - projectFile << "CONFIG -= static\n"; - projectFile << "CONFIG += shared\n\n"; - projectFile << "CONFIG(debug,debug|release) {\n DEFINES += _DEBUG=1\n DEFINES += DEBUG=1\n DEFINES += ENABLE_PROXY_TIMERS=1\n DEFINES += ENABLE_SERVER_TIMERS=1\n }\n"; - projectFile << "CONFIG(release,debug|release) {\n DEFINES += _NDEBUG=1\n DEFINES += NDEBUG=1\n}\n\n"; - projectFile << "DEPENDENCIESCONFIG = shared recursive install_recurse\n\n"; - projectFile << "## Configuration for Visual Studio to install binaries and dependencies. Work also for QT Creator by replacing QMAKE_INSTALL\n"; - projectFile << "PROJECTCONFIG = QTVS\n\n"; - projectFile << "#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib, QMAKE_TARGET.arch and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibconfig.pri inclusion\n"; - projectFile << "include ($${QMAKE_REMAKEN_RULES_ROOT}/templatelibconfig.pri)\n\n"; - projectFile << "include (" << priFileName << ")\n\n"; - projectFile << "\nunix:!android {\n QMAKE_CXXFLAGS += -Wignored-qualifiers\n# QMAKE_LINK=clang++\n# QMAKE_CXX = clang++\n}\n\n"; - projectFile << "\nlinux:!android {\n LIBS += -ldl\n }\n\n"; - projectFile << "macx {\n DEFINES += _MACOS_TARGET_\n QMAKE_MAC_SDK= macosx\n"; - projectFile << " QMAKE_CFLAGS += -mmacosx-version-min=10.7 -std=c11 #-x objective-c++\n"; - projectFile << " QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -std=c11 -std=c++11 -O3 -fPIC#-x objective-c++\n"; - projectFile << " QMAKE_LFLAGS += -mmacosx-version-min=10.7 -v -lstdc++\n"; - projectFile << " LIBS += -lstdc++ -lc -lpthread\n"; - projectFile << " INCLUDEPATH += /usr/local/include\n"; - projectFile << " LIBS += -L/usr/local/lib -lprotobuf\n}\n\n"; - projectFile << "win32 {\n\n DEFINES += WIN64 UNICODE _UNICODE\n QMAKE_COMPILER_DEFINES += _WIN64\n"; - projectFile << " QMAKE_CXXFLAGS += -wd4250 -wd4251 -wd4244 -wd4275 /Od\n}\n\n"; - projectFile << "android {\n QMAKE_LFLAGS += -nostdlib++\n}\n\n"; - projectFile << "OTHER_FILES += \\n packagedependencies.txt\n\n"; - projectFile << "OTHER_FILES += \\n xpcfGrpcRemoting" << metadata[MetadataType::PROJECT_NAME] <<".xml\n\n"; - projectFile << "#NOTE : Must be placed at the end of the .pro\ninclude ($${QMAKE_REMAKEN_RULES_ROOT}/remaken_install_target.pri)\n"; - projectFile.close(); - - // Pro using shared xpcf - fs::path projectFilePathShared("xpcfGrpcRemoting" + metadata[MetadataType::PROJECT_NAME] + ".pro",utf8); - projectFilePathShared = m_folder/projectFilePathShared; - std::ofstream projectFileShared(projectFilePathShared.generic_string(utf8).c_str(), std::ios::out); - projectFileShared << "TARGET = xpcfGrpcRemoting"<< metadata[MetadataType::PROJECT_NAME] << "\n"; - projectFileShared << "DEFINES += XPCF_SHARED_DEPS\n\n"; - projectFileShared << "include (" << priBaseFileName << ")\n\n" ; - projectFileShared.close(); - - // Pro using static deps xpcf - fs::path projectFilePathStatDeps("xpcfGrpcRemoting" + metadata[MetadataType::PROJECT_NAME] + "_static_deps.pro",utf8); - projectFilePathStatDeps = m_folder/projectFilePathStatDeps; - std::ofstream projectFileStatDeps(projectFilePathStatDeps.generic_string(utf8).c_str(), std::ios::out); - projectFileStatDeps << "TARGET = xpcfGrpcRemoting"<< metadata[MetadataType::PROJECT_NAME]<< "_static_deps" << "\n"; - projectFileStatDeps << "DEFINES += XPCF_STATIC_DEPS\n DEFINES += XPCF_USE_BOOST\n\n"; - projectFileStatDeps << "include (" << priBaseFileName << ")\n\n" ; - projectFileStatDeps.close(); - - fs::path priFilePath(priFileName,utf8); - priFilePath = m_folder/priFilePath; - std::ofstream priFile(priFilePath.generic_string(utf8).c_str(), std::ios::out); - priFile << m_headerProjectInfos.str(); - priFile << m_srcProjectInfos.str(); - priFile.close(); -} - -std::map ProjectGenerator::generateImpl(SRef c, std::map metadata) -{ - m_headerProjectInfos << " \\\n" << metadata.at(MetadataType::PROXY_HEADERFILENAME); - m_headerProjectInfos << " \\\n" << metadata.at(MetadataType::SERVER_HEADERFILENAME); - m_headerProjectInfos << " \\\n" << (*c)[ClassDescriptor::MetadataType::GRPCSERVICENAME] << ".pb.h"; - m_headerProjectInfos << " \\\n" << (*c)[ClassDescriptor::MetadataType::GRPCSERVICENAME] << ".grpc.pb.h"; - m_srcProjectInfos << " \\\n" << metadata.at(MetadataType::PROXY_CPPFILENAME); - m_srcProjectInfos << " \\\n" << metadata.at(MetadataType::SERVER_CPPFILENAME); - m_srcProjectInfos << " \\\n" << (*c)[ClassDescriptor::MetadataType::GRPCSERVICENAME] << ".pb.cc"; - m_srcProjectInfos << " \\\n" << (*c)[ClassDescriptor::MetadataType::GRPCSERVICENAME] << ".grpc.pb.cc"; - m_protoProjectInfos << " \\\n" << (*c)[ClassDescriptor::MetadataType::GRPCPROTOFILENAME]; - generateModuleMain (c,metadata); - return metadata; -} - -void ProjectGenerator::finalizeImpl(std::map metadata) -{ - m_moduleName = "xpcfGrpcRemoting" + metadata[MetadataType::PROJECT_NAME]; - m_moduleDescription = "xpcf remoting module for project " + metadata[MetadataType::PROJECT_NAME]; - m_moduleDeclareMgr->out() << "XPCF_DECLARE_MODULE(\""<< metadata[MetadataType::MODULE_UUID] <<"\", \"" << m_moduleName << "\",\"" << m_moduleDescription << "\");\n"; - m_moduleHdrMgr->includeGuardsEnd(); - m_moduleSrcMgr->out()<<"return errCode;\n"; - m_moduleSrcMgr->leave(); - m_moduleSrcMgr->newline(); - m_moduleMainDeclareComponents << "XPCF_END_COMPONENTS_DECLARATION\n"; - m_moduleSrcMgr->out() << m_moduleMainDeclareComponents.str(); - m_headerProjectInfos << " \\\n" << "xpcfGrpcModuleMain.h" << "\n"; - m_srcProjectInfos << " \\\n" << "xpcfGrpcModuleMain.cpp" << "\n"; - //to put version in pkgDepsFile for protobuf - //pkg-config --modversion protobuf - // protobuf|3.15.6|protobuf|brew@system - - if (m_mode == GenerateMode::STD_COUT) { - std::cout << m_protoProjectInfos.str(); - std::cout << m_headerProjectInfos.str(); - std::cout << m_srcProjectInfos.str(); - std::cout << m_moduleMainInfosHeader.str(); - std::cout << m_moduleMainDeclareModule.str(); - } - else { - fs::detail::utf8_codecvt_facet utf8; - generateProjectFile(metadata); - fs::path moduleHeaderFilePath("xpcfGrpcModuleMain.h",utf8); - moduleHeaderFilePath = m_folder/moduleHeaderFilePath; - std::ofstream moduleHeaderFile(moduleHeaderFilePath.generic_string(utf8).c_str(), std::ios::out); - moduleHeaderFile << m_moduleMainInfosHeader.str(); - moduleHeaderFile.close(); - fs::path moduleSourceFilePath("xpcfGrpcModuleMain.cpp",utf8); - moduleSourceFilePath = m_folder/moduleSourceFilePath; - std::ofstream moduleSourceFile(moduleSourceFilePath.generic_string(utf8).c_str(), std::ios::out); - moduleSourceFile << m_moduleMainDeclareModule.str(); - moduleSourceFile << m_moduleMainInfosSource.str(); - moduleSourceFile.close(); - fs::path findRemakenRulesPath("findremakenrules.pri",utf8); - findRemakenRulesPath = m_folder/findRemakenRulesPath; - std::ofstream findRemakenRulesFile(findRemakenRulesPath.generic_string(utf8).c_str(), std::ios::out); - findRemakenRulesFile << findRemakenRulesStr; - findRemakenRulesFile.close(); - fs::path pkgDepsPath("packagedependencies.txt",utf8); - pkgDepsPath = m_folder/pkgDepsPath; - std::ofstream pkgDepsFile(pkgDepsPath.generic_string(utf8).c_str(), std::ios::out); - pkgDepsFile << pkgdepsStr; - if (!metadata[IRPCGenerator::MetadataType::PROJECT_DEPENDENCY_URL].empty()) { - pkgDepsFile << metadata[IRPCGenerator::MetadataType::PROJECT_DEPENDENCY_URL] << "\n"; - } - pkgDepsFile.close(); - } - bp::ipstream stream; - boost::filesystem::path p = bp::search_path("protoc"); -// if (!p.empty()) { - //bp::child c(command, args, bp::std_out > stream); - // bp::system(p,"--version | sed 's/[a-zA-Z ]*//'", bp::std_out > stream); - - - // } - - -} - - diff --git a/tools/generators/grpc/ProjectGenerator.h b/tools/generators/grpc/ProjectGenerator.h deleted file mode 100644 index bf62956..0000000 --- a/tools/generators/grpc/ProjectGenerator.h +++ /dev/null @@ -1,70 +0,0 @@ -/** - * @copyright Copyright (c) 2020 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2020-09-25 - */ - -#ifndef PROJECTGENERATOR_H -#define PROJECTGENERATOR_H -#include - -#include "AbstractGenerator.h" -#include "XmlHelpers.h" - - -class ProjectGenerator : public AbstractGenerator -{ -public: - ProjectGenerator(); - ~ProjectGenerator() override; - std::map generateImpl(SRef c, std::map metadata) override; - //stringstream to aggregate all project info, serialized to out upon destruction ? or unload ? - //howto forward project option generation standalone/embedded ? configurable comp? through metadata ? - void initializeImpl(std::map metadata) override; - void finalizeImpl(std::map metadata) override; - -private: - void generateModuleMain(const SRef c, std::map metadata); - void generateProjectFile(std::map metadata); - std::stringstream m_srcProjectInfos; - std::stringstream m_headerProjectInfos; - std::stringstream m_protoProjectInfos; - std::stringstream m_moduleMainInfosHeader; - std::stringstream m_moduleMainInfosSource; - std::stringstream m_moduleMainDeclareComponents; - std::stringstream m_moduleMainDeclareModule; - std::unique_ptr m_moduleHdrMgr; - std::unique_ptr m_moduleSrcMgr; - std::unique_ptr m_moduleDeclareMgr; - std::string m_moduleName; - std::string m_moduleDescription; - -}; - - - - -template <> struct org::bcom::xpcf::ComponentTraits -{ - static constexpr const char * UUID = "{9d465f72-0935-4f64-8620-7fd349edcb9a}"; - static constexpr const char * NAME = "ProjectGenerator"; - static constexpr const char * DESCRIPTION = "ProjectGenerator implements AbstractGenerator interface"; -}; - -#endif // PROJECTGENERATOR_H diff --git a/tools/generators/grpc/ProxyGenerator.cpp b/tools/generators/grpc/ProxyGenerator.cpp deleted file mode 100644 index 4f45e82..0000000 --- a/tools/generators/grpc/ProxyGenerator.cpp +++ /dev/null @@ -1,372 +0,0 @@ -#include "ProxyGenerator.h" -#include "CppHelpers.h" - -#include - -namespace xpcf = org::bcom::xpcf; - -template<> ProxyGenerator * xpcf::ComponentFactory::createInstance(); - - -ProxyGenerator::ProxyGenerator():AbstractGenerator(xpcf::toMap()) -{ -} - - -ProxyGenerator::~ProxyGenerator() -{ - -} - -void ProxyGenerator::processHeaderMethods(const SRef c, CppBlockManager & blockMgr) -{ - for (auto m : c->methods()) { - blockMgr.out() << m->getFullDeclaration(); - if (m->isConst()) { - blockMgr.out() << " const"; - } - blockMgr.out() << " override;\n"; - if (m->returnType().kind() == type_kind::c_string_t) { - m_proxyMembersVariables["m_" + m->getName()] = std::make_pair("std::string", false); - } - else if (m->returnType().isConst() && m->returnType().isReference()) { - m_proxyMembersVariables["m_" + m->getName()] = std::make_pair(m->returnType().getFullTypeDescription(),m->isConst()); - } - } - blockMgr.newline(); -} - -void ProxyGenerator::generateHeader(const SRef c, std::map metadata, std::ostream& out) -{ - CppBlockManager blockMgr(out); - //NOTE : proxy is configurable to set grpc channel etc... - xpcf::uuids::uuid proxyUUID = c->getClientUUID(); - if (proxyUUID.is_nil()) { - proxyUUID = c->createClientUUID(); - m_serviceUuidMap[m_className] = xpcf::uuids::to_string(proxyUUID); - } - blockMgr.out() << "// GRPC Proxy Class Header generated with xpcf_grpc_gen\n\n"; - blockMgr.newline(); - blockMgr.includeGuardsStart(m_className); - blockMgr.include(c->getMetadata().at(ClassDescriptor::MetadataType::INTERFACEFILEPATH)); // relative or absolute path?? TODO: retrieve filepath from metadata - blockMgr.include("xpcf/component/ConfigurableBase.h",false); - blockMgr.include("memory",false); - blockMgr.include("string",false); - blockMgr.include("map",false); - blockMgr.include((*c)[ClassDescriptor::MetadataType::GRPCSERVICENAME] + ".grpc.pb.h"); - blockMgr.include("grpc/grpc.h",false); - blockMgr.include("grpc++/channel.h",false); - blockMgr.include("xpcf/remoting/GrpcHelper.h",false); - blockMgr.newline(); - blockMgr.out() << "namespace " + m_nameSpace + " "; - { - block_guard nspaceBlk(blockMgr); - std::string baseInterface; - if (!c->getMetadata().at(ClassDescriptor::MetadataType::INTERFACENAMESPACE).empty()) { - baseInterface = c->getMetadata().at(ClassDescriptor::MetadataType::INTERFACENAMESPACE) + "::"; - } - baseInterface += c->getName(); - blockMgr.newline(); - blockMgr.out() << "class " + m_className + ": public org::bcom::xpcf::ConfigurableBase, virtual public " + baseInterface + " "; - { - std::map> proxyMembersVariables; // name, {type, isConstMethod} - block_guard classBlk(blockMgr); - { - block_guard publicBlk(blockMgr); - - blockMgr.out() << m_className +"();\n"; - blockMgr.out() << "~"+ m_className +"() override = default;\n"; - blockMgr.out() << "void unloadComponent () override final;\n"; - blockMgr.out() << "org::bcom::xpcf::XPCFErrorCode onConfigured() override;\n"; - blockMgr.newline(); - // foreach method - processHeaderMethods(c, blockMgr); - } - { - block_guard privateBlk(blockMgr); - blockMgr.out() << "std::string m_channelUrl;\n"; - blockMgr.out() << "uint32_t m_channelCredentials;\n"; - blockMgr.out() << "std::shared_ptr<::grpc::Channel> m_channel;\n"; - if (!c->compressionDisabled()) { - blockMgr.out() << "xpcf::grpcCompressionInfos m_serviceCompressionInfos;\n"; - blockMgr.out() << "std::map m_methodCompressionInfosMap;\n"; - blockMgr.out() << "std::vector m_grpcProxyCompressionConfig;\n"; - } - - - blockMgr.out() << "std::unique_ptr<::" + c->getMetadata().at(ClassDescriptor::MetadataType::REMOTINGNSPACE) + "::" + m_grpcClassName + "::Stub> m_grpcStub;\n"; - for (auto & [name, value ] : m_proxyMembersVariables) { - auto & [type, isConst] = value; - if (isConst) { - blockMgr.out() << "mutable "; - } - blockMgr.out() << type << " " << name << ";\n"; - } - } - } - } - blockMgr.newline(); - - m_proxyMembersVariables.clear(); - - blockMgr.out() << "template <> struct org::bcom::xpcf::ComponentTraits<" + m_nameSpace + "::" + m_className +">\n";//xpcf::grpc::proxy::c.name::c.name_grpcProxy> - { - block_guard classBlk(blockMgr); - blockMgr.out() << "static constexpr const char * UUID = \"" + xpcf::uuids::to_string(proxyUUID) + "\";\n"; - blockMgr.out() << "static constexpr const char * NAME = \"" + m_className + "\";\n"; - blockMgr.out() << "static constexpr const char * DESCRIPTION = \"" + m_className + " grpc client proxy component\";\n"; - } - blockMgr.newline(); - blockMgr.includeGuardsEnd(); -} - -void ProxyGenerator::bindInput(const ParameterDescriptor & p, CppBlockManager & blockMgr) -{ - if (p.type().kind() == type_kind::builtin_t - || p.type().kind() == type_kind::enum_t - || p.type().kind() == type_kind::std_string_t - || p.type().kind() == type_kind::c_string_t) { - if (p.type().needsStaticCast()) { - blockMgr.out() << "reqIn.set_"<< boost::to_lower_copy(p.getName()) << "(static_cast<" << p.type().getRPCType() << ">(" << p.getName() << "));\n"; - } - else { - blockMgr.out() << "reqIn.set_"<< boost::to_lower_copy(p.getName()) << "(" << p.getName() << ");\n"; - } - - } - else if ((p.type().kind() == type_kind::user_defined_t) || (p.type().kind() == type_kind::template_t)) { - blockMgr.out() << "reqIn.set_"<< boost::to_lower_copy(p.getName()) << "(xpcf::serialize<" << p.type().getFullTypeDescription() <<">(" << p.getName() << "));\n"; - } -} - -void ProxyGenerator::bindOutput(const ParameterDescriptor & p, CppBlockManager & blockMgr) -{ - if (p.type().kind() == type_kind::builtin_t - || p.type().kind() == type_kind::enum_t - || p.type().kind() == type_kind::std_string_t) { - if (p.type().needsStaticCast()) { - blockMgr.out() << p.getName() << " = static_cast<" << p.type().getFullTypeDescription() << ">(respOut." << boost::to_lower_copy(p.getName()) <<"());\n"; - } - else { - blockMgr.out() <(respOut."< c, CppBlockManager & blockMgr) -{ - for (auto m : c->methods()) { - blockMgr.out() << m->getReturnType() + " "+ m_className + "::" + m->getDeclaration(); - if (m->isConst()) { - blockMgr.out() << " const"; - } - blockMgr.out() << "\n"; - { - block_guard methodBlk(blockMgr); - blockMgr.out() << "::grpc::ClientContext context;\n"; - blockMgr.out() << m->m_requestName << " reqIn;\n"; - blockMgr.out() << m->m_responseName << " respOut;\n"; - if (m->hasOutputs() && !m->compressionDisabled()) { - blockMgr.out() <<"#ifndef DISABLE_GRPC_COMPRESSION\n"; - blockMgr.out() << "xpcf::grpcCompressionInfos proxyCompressionInfo = xpcf::deduceClientCompressionInfo(m_serviceCompressionInfos, \""<getName()<<"\", m_methodCompressionInfosMap);\n"; - blockMgr.out() << "xpcf::grpcCompressType serverCompressionType = xpcf::prepareClientCompressionContext(context, proxyCompressionInfo);\n"; - blockMgr.out() << "reqIn.set_grpcservercompressionformat (static_cast(serverCompressionType));\n"; - blockMgr.out() <<"#endif\n"; - } - if (m->hasInputs()) { - for (ParameterDescriptor * p: m->m_inParams) { - bindInput(*p, blockMgr); - } - for (ParameterDescriptor * p: m->m_inoutParams) { - bindInput(*p, blockMgr); - } - } - blockMgr.out() <<"#ifdef ENABLE_PROXY_TIMERS\n"; - blockMgr.out() <<"boost::posix_time::ptime start = boost::posix_time::microsec_clock::universal_time();\n"; - blockMgr.out() <<"std::cout << \"====> "<getName()<<" request sent at \" << to_simple_string(start) << std::endl;\n"; - blockMgr.out() <<"#endif\n"; - blockMgr.out() << "::grpc::Status grpcRemoteStatus = m_grpcStub->" + m->m_rpcName + "(&context, reqIn, &respOut);\n"; - blockMgr.out() <<"#ifdef ENABLE_PROXY_TIMERS\n"; - blockMgr.out() <<"boost::posix_time::ptime end = boost::posix_time::microsec_clock::universal_time();\n"; - blockMgr.out() <<"std::cout << \"====> "<getName()<<" response received at \" << to_simple_string(end) << std::endl;\n"; - blockMgr.out() <<"std::cout << \" => elapsed time = \" << ((end - start).total_microseconds() / 1000.00) << \" ms\" << std::endl;\n"; - blockMgr.out() <<"#endif\n"; - blockMgr.out() << "if (!grpcRemoteStatus.ok())"; - { - block_guard condBlk(blockMgr); - blockMgr.out() << "std::cout << \"" + m->m_rpcName + " rpc failed.\" << std::endl;\n"; - blockMgr.out() << "throw xpcf::RemotingException(\"" << m_grpcClassName <<"\",\""<< m->m_rpcName <<"\",static_cast(grpcRemoteStatus.error_code()));\n";//TODO : differentiate semantic return type from status return type : provide status type name ? - } - if (m->hasOutputs()) { - for (ParameterDescriptor * p: m->m_inoutParams) { - bindOutput(*p, blockMgr); - } - for (ParameterDescriptor * p: m->m_outParams) { - bindOutput(*p, blockMgr); - } - } - if (!m->returnType().isVoid()) { - if (m->returnType().kind() == type_kind::builtin_t) { - if (m->returnType().needsStaticCast()) { - blockMgr.out() << "return static_cast<" << m->returnType().getFullTypeDescription() << ">(respOut.xpcfgrpcreturnvalue());\n"; - } - else { - blockMgr.out() << "return respOut.xpcfgrpcreturnvalue();\n"; - } - } - else if ((m->returnType().kind() == type_kind::user_defined_t) || (m->returnType().kind() == type_kind::template_t)) { - if (m->returnType().isConst() && m->returnType().isReference()) { - blockMgr.out() << "m_" << m->getName()<<" = xpcf::deserialize<" << m->returnType().getFullTypeDescription() << ">(respOut.xpcfgrpcreturnvalue());\n"; - blockMgr.out() << "return m_" << m->getName() << ";\n"; - } - else { - blockMgr.out() << "return xpcf::deserialize<" << m->returnType().getFullTypeDescription() << ">(respOut.xpcfgrpcreturnvalue());\n"; - } - } - else if (m->returnType().kind() == type_kind::enum_t) { - if (m->returnType().needsStaticCast()) { - blockMgr.out() << "return static_cast<" << m->returnType().getFullTypeDescription() << ">(respOut.xpcfgrpcreturnvalue());\n"; - } - else { - blockMgr.out() << "return respOut.xpcfgrpcreturnvalue();\n"; - } - } - else if (m->returnType().kind() == type_kind::c_string_t ) { - blockMgr.out() << "m_" << m->getName()<<" = respOut.xpcfgrpcreturnvalue();\n"; - blockMgr.out() << "return m_" << m->getName() << ".c_str();\n"; - } - } - } - blockMgr.newline(); - } -} - -void ProxyGenerator::generateBody(const SRef c, std::map metadata, std::ostream& out) -{ - CppBlockManager blockMgr(out); - blockMgr.out() << "// GRPC Proxy Class implementation generated with xpcf_grpc_gen\n"; - blockMgr.include(m_headerFileName); - blockMgr.include("cstddef",false); - blockMgr.include("boost/date_time.hpp",false); - blockMgr.include("xpcf/core/Exception.h",false); - blockMgr.include("xpcf/remoting/ISerializable.h",false); - blockMgr.include("grpcpp/client_context.h",false); - blockMgr.include("grpcpp/create_channel.h",false); - blockMgr.include("grpcpp/security/credentials.h",false); - blockMgr.include("boost/algorithm/string.hpp",false); - // the body will use the grpcCLient generated from the proto or flat generators hence the following inclusion : - //#include "grpcgeneratedclient.grpc.[pb|fb].h" - blockMgr.out() << "namespace xpcf = org::bcom::xpcf;\n"; - - - blockMgr.newline(); - - blockMgr.out() << "template<> " + m_nameSpace + "::" + m_className + "* xpcf::ComponentFactory::createInstance<"+ m_nameSpace + "::" + m_className + ">();\n"; - blockMgr.newline(); - blockMgr.out() << "namespace " + m_nameSpace + " "; - { - block_guard nspaceBlk(blockMgr); - blockMgr.newline(); - - blockMgr.out() << m_className + "::" + m_className + "():xpcf::ConfigurableBase(xpcf::toMap<"+ m_className + ">())\n"; - { - block_guard methodBlk(blockMgr); - std::string baseInterface; - if (!c->getMetadata().at(ClassDescriptor::MetadataType::INTERFACENAMESPACE).empty()) { - baseInterface = c->getMetadata().at(ClassDescriptor::MetadataType::INTERFACENAMESPACE) + "::"; - } - baseInterface += c->getName(); - blockMgr.out() << "declareInterface<" + baseInterface + ">(this);\n"; - blockMgr.out() << "declareProperty(\"channelUrl\",m_channelUrl);\n"; - blockMgr.out() << "declareProperty(\"channelCredentials\",m_channelCredentials);\n"; - if (!c->compressionDisabled()) { - blockMgr.out() << "m_grpcProxyCompressionConfig.resize("<< c->methods().size() + 1 <<");\n"; - blockMgr.out() << "declarePropertySequence(\"grpc_compress_proxy\", m_grpcProxyCompressionConfig);\n"; - } - } - blockMgr.newline(); - blockMgr.out() << "void " + m_className + "::unloadComponent ()\n"; - { - block_guard methodBlk(blockMgr); - blockMgr.out() << "delete this;\n"; - blockMgr.out() << "return;\n"; - } - blockMgr.newline(); - // grpc channel is opened once in onConfigured, as opening the channel has some overhead, it should be maintain as long as possible - blockMgr.out() << "XPCFErrorCode " + m_className +"::onConfigured()\n"; - { - block_guard methodBlk(blockMgr); - if (c->clientReceiveSizeOverriden() || c->clientSendSizeOverriden()) { - blockMgr.out() << "::grpc::ChannelArguments ch_args;\n"; - if (c->clientReceiveSizeOverriden() ) { - blockMgr.out() << "ch_args.SetMaxReceiveMessageSize("<getClientReceiveSize()<<");\n"; - } - if (c->clientSendSizeOverriden() ) { - blockMgr.out() << "ch_args.SetMaxSendMessageSize("<getClientSendSize()<<");\n"; - } - blockMgr.out() << "m_channel = ::grpc::CreateCustomChannel(m_channelUrl,\n"; - blockMgr.out() << "xpcf::GrpcHelper::getCredentials(static_cast(m_channelCredentials)),\n"; - blockMgr.out() << "ch_args);\n"; - } - else { - blockMgr.out() << "m_channel = ::grpc::CreateChannel(m_channelUrl, xpcf::GrpcHelper::getCredentials(static_cast(m_channelCredentials)));\n"; - } - blockMgr.out() << "m_grpcStub = ::" + c->getMetadata().at(ClassDescriptor::MetadataType::REMOTINGNSPACE) + "::" + m_grpcClassName + "::NewStub(m_channel);\n"; - if (!c->compressionDisabled()) { - blockMgr.out() << "for (auto & compressionLine : m_grpcProxyCompressionConfig) {\n"; - blockMgr.out() << " translateClientConfiguration(compressionLine, m_serviceCompressionInfos, m_methodCompressionInfosMap);\n"; - blockMgr.out() << "}\n"; - } - - blockMgr.out() << "return xpcf::XPCFErrorCode::_SUCCESS;\n"; - } - blockMgr.newline(); - processBodyMethods(c, blockMgr); - } -} - -std::map ProxyGenerator::generateImpl(SRef c, std::map metadata) - -{ - m_nameSpace = "org::bcom::xpcf::grpc::proxy" + c->getName(); - m_className = c->getName() + "_grpcProxy"; - m_headerFileName = m_className + ".h"; - m_cppFileName = m_className + ".cpp"; - m_grpcClassName = (*c)[ClassDescriptor::MetadataType::GRPCSERVICENAME]; - //m_grpcClassName = ?? - if (m_mode == GenerateMode::STD_COUT) { - generateHeader(c, metadata, std::cout); - generateBody(c, metadata, std::cout); - std::cout< metadata) -{ - for (auto [name, uuid] : m_serviceUuidMap) { - std::cout << "Component " << name << " generated uuid = [[xpcf::clientUUID(" << uuid <<")]]" << std::endl; - } - m_serviceUuidMap.clear(); -} - diff --git a/tools/generators/grpc/ProxyGenerator.h b/tools/generators/grpc/ProxyGenerator.h deleted file mode 100644 index 388b97f..0000000 --- a/tools/generators/grpc/ProxyGenerator.h +++ /dev/null @@ -1,65 +0,0 @@ -/** - * @copyright Copyright (c) 2020 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2020-09-25 - */ - -#ifndef PROXYGENERATOR_H -#define PROXYGENERATOR_H -#include - -#include "AbstractGenerator.h" - - - -class ProxyGenerator : public AbstractGenerator -{ -public: - ProxyGenerator(); - ~ProxyGenerator() override; - std::map generateImpl(SRef c, std::map metadata) override; - void finalizeImpl(std::map metadata) override; - -protected: - void generateHeader(const SRef c, std::map metadata, std::ostream& out); - void generateBody(const SRef c, std::map metadata, std::ostream& out); - -private: - void processHeaderMethods(const SRef c, CppBlockManager & blockMgr); - void processBodyMethods(const SRef c, CppBlockManager & blockMgr); - void bindInput(const ParameterDescriptor & p, CppBlockManager & blockMgr); - void bindOutput(const ParameterDescriptor & p, CppBlockManager & blockMgr); - std::string m_nameSpace; - std::string m_className; - std::string m_headerFileName; - std::string m_cppFileName; - std::string m_grpcClassName; - std::map m_serviceUuidMap; - //TODO : replace m_proxyMembersVariables member with method argument forwarding, shouldn't be a member ! - std::map> m_proxyMembersVariables;//works only without simple naming conflict, should be nspaced ! -}; - -template <> struct org::bcom::xpcf::ComponentTraits -{ - static constexpr const char * UUID = "{00d154d0-0758-4a52-a697-b1eb92b59ded}"; - static constexpr const char * NAME = "ProxyGenerator"; - static constexpr const char * DESCRIPTION = "ProxyGenerator implements AbstractGenerator interface"; -}; - -#endif // PROXYGENERATOR_H diff --git a/tools/generators/grpc/RemakenPathHelper.cpp b/tools/generators/grpc/RemakenPathHelper.cpp deleted file mode 100644 index 5c0f432..0000000 --- a/tools/generators/grpc/RemakenPathHelper.cpp +++ /dev/null @@ -1,177 +0,0 @@ -#include "RemakenPathHelper.h" -#include -#include -#include -#include -#include - -#ifdef WIN32 -#include -#include -#else -#include -#include -#endif - -using namespace std; -RemakenPathHelper::RemakenPathHelper() -{ - -} - -#ifndef ROOTFOLDERENV -#define ROOTFOLDERENV "REMAKEN_PKG_ROOT" -#endif - -class Constants { -public: - static constexpr const char * REMAKENPKGROOT = ROOTFOLDERENV; - static constexpr const char * XPCFMODULEROOT = "XPCF_MODULE_ROOT"; - static constexpr const char * REMAKENPKGFILENAME = ".packagespath"; - static constexpr const char * REMAKEN_FOLDER = ".remaken"; - static constexpr const char * REMAKEN_PROFILES_FOLDER = "profiles"; - static constexpr const char * REMAKEN_CACHE_FILE = ".remaken-cache"; - static constexpr const char * ARTIFACTORY_API_KEY = "artifactoryApiKey"; - static constexpr const char * QMAKE_RULES_DEFAULT_TAG = "4.8.0"; - static constexpr const char * PKGINFO_FOLDER = ".pkginfo"; - static constexpr const char * VCPKG_REPOURL = "https://github.com/microsoft/vcpkg"; -}; - -std::string getOS() -{ -#ifdef BOOST_OS_ANDROID_AVAILABLE - return "android"; -#endif -#ifdef BOOST_OS_IOS_AVAILABLE - return "ios"; -#endif -#ifdef BOOST_OS_LINUX_AVAILABLE - return "linux"; -#endif -#ifdef BOOST_OS_SOLARIS_AVAILABLE - return "solaris"; -#endif -#ifdef BOOST_OS_MACOS_AVAILABLE - return "mac"; -#endif -#ifdef BOOST_OS_WINDOWS_AVAILABLE - return "win"; -#endif -} - -std::string getToolChain() -{ -#ifdef BOOST_OS_ANDROID_AVAILABLE - return "clang"; -#endif -#ifdef BOOST_OS_IOS_AVAILABLE - return "clang"; -#endif -#ifdef BOOST_OS_LINUX_AVAILABLE - return "gcc"; -#endif -#ifdef BOOST_OS_SOLARIS_AVAILABLE - return "gcc"; -#endif -#ifdef BOOST_OS_MACOS_AVAILABLE - return "clang"; -#endif -#ifdef BOOST_OS_WINDOWS_AVAILABLE - return "cl"; -#endif -} - - -fs::path RemakenPathHelper::getUTF8PathObserver(const char * sourcePath) -{ - fs::detail::utf8_codecvt_facet utf8; - fs::path utf8ObservedPath(sourcePath, utf8); - return utf8ObservedPath; -} - -fs::path RemakenPathHelper::getUTF8PathObserver(const std::string & sourcePath) -{ - return getUTF8PathObserver(sourcePath.c_str()); -} - -fs::path RemakenPathHelper::getHomePath() -{ - char * homePathStr; - fs::path homePath; -#ifdef WIN32 - homePathStr = getenv("USERPROFILE"); - if (homePathStr == nullptr) { - homePathStr = getenv("HOMEDRIVE"); - if (homePathStr) { - homePath = getUTF8PathObserver(homePathStr); - homePath /= getenv("HOMEPATH"); - } - } - else { - homePath = getUTF8PathObserver(homePathStr); - } -#else - struct passwd* pwd = getpwuid(getuid()); - if (pwd) { - homePathStr = pwd->pw_dir; - } - else { - // try the $HOME environment variable - homePathStr = getenv("HOME"); - } - homePath = getUTF8PathObserver(homePathStr); -#endif - return homePath; -} - -fs::path RemakenPathHelper::getRemakenRoot() { -fs::detail::utf8_codecvt_facet utf8; -fs::path remakenRootPath = getHomePath() / Constants::REMAKEN_FOLDER; -remakenRootPath /= "packages"; -char * rootDirectoryVar = getenv(Constants::REMAKENPKGROOT); -if (rootDirectoryVar != nullptr) { - std::cerr< os2sharedPathEnv = { - {"mac","DYLD_LIBRARY_PATH"}, - {"win","PATH"}, - {"unix","LD_LIBRARY_PATH"}, - {"android","LD_LIBRARY_PATH"}, - {"ios","DYLD_LIBRARY_PATH"}, - {"linux","LD_LIBRARY_PATH"} -}; - - -const std::string_view & RemakenPathHelper::sharedLibraryPathEnvName() -{ - if (os2sharedPathEnv.find(getOS()) == os2sharedPathEnv.end()) { - return os2sharedPathEnv.at("unix"); - } - return os2sharedPathEnv.at(getOS()); -} diff --git a/tools/generators/grpc/RemakenPathHelper.h b/tools/generators/grpc/RemakenPathHelper.h deleted file mode 100644 index cba4980..0000000 --- a/tools/generators/grpc/RemakenPathHelper.h +++ /dev/null @@ -1,42 +0,0 @@ -/** - * @copyright Copyright (c) 2020 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2020-09-25 - */ - -#ifndef REMAKENPATHHELPER_H -#define REMAKENPATHHELPER_H - -#include - -namespace fs = boost::filesystem; - -class RemakenPathHelper -{ -public: - RemakenPathHelper(); - static fs::path computeRemakenRootPackageDir(); - static fs::path getUTF8PathObserver(const std::string & sourcePath); - static fs::path getUTF8PathObserver(const char * sourcePath); - static fs::path getHomePath(); - static fs::path getRemakenRoot(); - static const std::string_view & sharedLibraryPathEnvName(); -}; - -#endif // REMAKENPATHHELPER_H diff --git a/tools/generators/grpc/RemoteServiceGenerator.cpp b/tools/generators/grpc/RemoteServiceGenerator.cpp deleted file mode 100644 index 43b3585..0000000 --- a/tools/generators/grpc/RemoteServiceGenerator.cpp +++ /dev/null @@ -1,117 +0,0 @@ -#include "RemoteServiceGenerator.h" - -namespace xpcf = org::bcom::xpcf; - -template<> RemoteServiceGenerator * xpcf::ComponentFactory::createInstance(); - - - -RemoteServiceGenerator::RemoteServiceGenerator():AbstractGenerator(xpcf::toMap()) -{ - declareInjectable(m_grpcGenerator, "grpc", true); - declareInjectable(m_proxyGenerator, "proxy", true); - declareInjectable(m_serverGenerator, "server", true); - declareInjectable(m_projectGenerator, "project", true); -} - - -RemoteServiceGenerator::~RemoteServiceGenerator() -{ - -} - -void RemoteServiceGenerator::setDestinationFolder(const std::string & folder) -{ - AbstractGenerator::setDestinationFolder(folder); - if (m_grpcGenerator) { - m_grpcGenerator->setDestinationFolder(folder); - } - if (m_proxyGenerator) { - m_proxyGenerator->setDestinationFolder(folder); - } - if (m_serverGenerator) { - m_serverGenerator->setDestinationFolder(folder); - } - if (m_projectGenerator) { - m_projectGenerator->setDestinationFolder(folder); - } -} - -void RemoteServiceGenerator::setGenerateMode(const GenerateMode & mode) -{ - AbstractGenerator::setGenerateMode(mode); - if (m_grpcGenerator) { - m_grpcGenerator->setGenerateMode(mode); - } - if (m_proxyGenerator) { - m_proxyGenerator->setGenerateMode(mode); - } - if (m_serverGenerator) { - m_serverGenerator->setGenerateMode(mode); - } - if (m_projectGenerator) { - m_projectGenerator->setGenerateMode(mode); - } -} - -std::map RemoteServiceGenerator::generateImpl(SRef c, std::map metadata) - -{ - std::string generationStep; - // generation chain is ordered : metadata from grpc generator must be forwarded to proxy, server and project generators - try { - if (m_grpcGenerator) { - generationStep = "GRPC proto files"; - metadata = m_grpcGenerator->generate(c, metadata); - } - if (m_proxyGenerator) { - generationStep = "GRPC C++ client proxy files"; - metadata = m_proxyGenerator->generate(c, metadata); - } - if (m_serverGenerator) { - generationStep = "GRPC C++ server files"; - metadata = m_serverGenerator->generate(c, metadata); - } - if (m_projectGenerator) { - generationStep = "GRPC C++ project files"; - metadata = m_projectGenerator->generate(c, metadata); - } - } - catch (const GenerationException & e) { - std::cerr << "Error generating " << generationStep << " " << e.what(); - } - return metadata; -} - -std::map RemoteServiceGenerator::validateImpl(const SRef c, std::map metadata) -{ - if (m_grpcGenerator) { - metadata = m_grpcGenerator->validate(c, metadata); - } - if (m_proxyGenerator) { - metadata = m_proxyGenerator->validate(c, metadata); - } - if (m_serverGenerator) { - metadata = m_serverGenerator->validate(c, metadata); - } - if (m_projectGenerator) { - metadata = m_projectGenerator->validate(c, metadata); - } - return metadata; -} - -void RemoteServiceGenerator::finalizeImpl(std::map metadata) -{ - if (m_grpcGenerator) { - m_grpcGenerator->finalize(metadata); - } - if (m_proxyGenerator) { - m_proxyGenerator->finalize(metadata); - } - if (m_serverGenerator) { - m_serverGenerator->finalize(metadata); - } - if (m_projectGenerator) { - m_projectGenerator->finalize(metadata); - } -} diff --git a/tools/generators/grpc/RemoteServiceGenerator.h b/tools/generators/grpc/RemoteServiceGenerator.h deleted file mode 100644 index 5146eb0..0000000 --- a/tools/generators/grpc/RemoteServiceGenerator.h +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @copyright Copyright (c) 2020 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2020-09-25 - */ - -#ifndef REMOTESERVICEGENERATOR_H -#define REMOTESERVICEGENERATOR_H -#include - -#include "AbstractGenerator.h" - - - -class RemoteServiceGenerator : public AbstractGenerator -{ -public: - RemoteServiceGenerator(); - ~RemoteServiceGenerator() override; - std::map generateImpl(SRef c, std::map metadata) override; - void setDestinationFolder(const std::string & folder) override; - void setGenerateMode(const GenerateMode & mode = GenerateMode::STD_COUT) override; - std::map validateImpl(const SRef c, std::map metadata) override; - void finalizeImpl(std::map metadata) override; - -private: - SRef m_grpcGenerator; - SRef m_proxyGenerator; - SRef m_serverGenerator; - SRef m_projectGenerator; -}; - - - - -template <> struct org::bcom::xpcf::ComponentTraits -{ - static constexpr const char * UUID = "{0b9f045b-28aa-45c2-b353-e22917208059}"; - static constexpr const char * NAME = "RemoteServiceGenerator"; - static constexpr const char * DESCRIPTION = "RemoteServiceGenerator implements AbstractGenerator interface"; -}; - -#endif // REMOTESERVICEGENERATOR_H diff --git a/tools/generators/grpc/ServerGenerator.cpp b/tools/generators/grpc/ServerGenerator.cpp deleted file mode 100644 index 9c3e581..0000000 --- a/tools/generators/grpc/ServerGenerator.cpp +++ /dev/null @@ -1,346 +0,0 @@ -#include "ServerGenerator.h" -#include -#include -#include -#include - -namespace xpcf = org::bcom::xpcf; - -template<> ServerGenerator * xpcf::ComponentFactory::createInstance(); - -ServerGenerator::ServerGenerator():AbstractGenerator(xpcf::toMap()) -{ -} - - -ServerGenerator::~ServerGenerator() -{ - -} - -void ServerGenerator::processHeaderMethods(const SRef c, CppBlockManager & blockMgr) -{ - for (auto m : c->methods()) { - std::string request = m->m_requestName; - std::string response = m->m_responseName; - blockMgr.out() << "::grpc::Status " + m->m_rpcName + "(::grpc::ServerContext* context, const " + request + "* request, " + response + "* response) override;\n"; - } - blockMgr.newline(); -} - - -void ServerGenerator::generateHeader(const SRef c, std::map metadata, std::ostream& out) -{ - //NOTE : server is configurable to set grpc channel etc... - xpcf::uuids::uuid serverUUID = c->getServerUUID(); - if (serverUUID.is_nil()) { - serverUUID = c->createServerUUID(); - m_serviceUuidMap[m_className] = xpcf::uuids::to_string(serverUUID); - } - - CppBlockManager blockMgr(out); - blockMgr.out() << "// GRPC Server Class Header generated with xpcf_grpc_gen\n"; - blockMgr.newline(); - blockMgr.includeGuardsStart(m_className); - blockMgr.include(c->getMetadata().at(ClassDescriptor::MetadataType::INTERFACEFILEPATH)); // relative or absolute path?? TODO: retrieve filepath from metadata - blockMgr.include("xpcf/component/ConfigurableBase.h",false); - blockMgr.include("xpcf/remoting/IGrpcService.h",false); - blockMgr.include("xpcf/remoting/GrpcHelper.h",false); - blockMgr.include((*c)[ClassDescriptor::MetadataType::GRPCSERVICENAME] + ".grpc.pb.h"); - blockMgr.include("grpc/grpc.h",false); - blockMgr.newline(); - - blockMgr.out() << "namespace " + m_nameSpace; - blockMgr.out() << " "; - { - block_guard scopedNspace(blockMgr); - blockMgr.newline(); - blockMgr.out() << "class " + m_className + ": public org::bcom::xpcf::ConfigurableBase, virtual public org::bcom::xpcf::IGrpcService\n"; - { - block_guard classBlk(blockMgr); - { - block_guard publicBlk(blockMgr); - blockMgr.out() << m_className +"();\n"; - blockMgr.out() << "~"+ m_className +"() override = default;\n"; - blockMgr.out() << "::grpc::Service * getService() override;\n"; - blockMgr.out() << "const char * getServiceName() override { return \""<< c->getName() <<"\"; }\n"; - blockMgr.out() << "void unloadComponent () override final;\n"; - blockMgr.out() << "org::bcom::xpcf::XPCFErrorCode onConfigured() override;\n"; - blockMgr.newline(); - - blockMgr.out() << "class " + m_grpcClassName + "Impl: public ::" + c->getMetadata().at(ClassDescriptor::MetadataType::REMOTINGNSPACE) + "::" + m_grpcClassName+"::Service\n"; - { - block_guard innerClassBlk(blockMgr); - { - block_guard innerPublicBlk(blockMgr); - blockMgr.out() << m_grpcClassName + "Impl() = default;\n";// missing something to set the ref toward the injected I* component - // foreach method - processHeaderMethods(c,blockMgr); - std::string baseInterface; - if (!c->getMetadata().at(ClassDescriptor::MetadataType::INTERFACENAMESPACE).empty()) { - baseInterface = c->getMetadata().at(ClassDescriptor::MetadataType::INTERFACENAMESPACE) + "::"; - } - baseInterface += c->getName(); - blockMgr.out() << "SRef<" + baseInterface + "> m_xpcfComponent;\n"; - if (!c->compressionDisabled()) { - blockMgr.out() << "xpcf::grpcServerCompressionInfos m_serviceCompressionInfos;\n"; - blockMgr.out() << "std::map m_methodCompressionInfosMap;\n"; - } - } - } - } - { - block_guard privateBlk(blockMgr); - blockMgr.out() << m_grpcClassName + "Impl m_grpcService;\n"; - if (!c->compressionDisabled()) { - blockMgr.out() << "std::vector m_grpcServerCompressionConfig;\n"; - } - } - } - } - - blockMgr.newline(); - - blockMgr.out() << "template <> struct org::bcom::xpcf::ComponentTraits<" + m_nameSpace + "::" + m_className +">\n";//xpcf::grpc::proxy::c.name::c.name_grpcProxy> - { - block_guard classBlk(blockMgr); - blockMgr.out() << "static constexpr const char * UUID = \"" + xpcf::uuids::to_string(serverUUID) + "\";\n"; - blockMgr.out() << "static constexpr const char * NAME = \"" + m_className + "\";\n"; - blockMgr.out() << "static constexpr const char * DESCRIPTION = \"" + m_className + " grpc server component\";\n"; - } - blockMgr.includeGuardsEnd(); -} - -void ServerGenerator::bindInput(const ParameterDescriptor & p, CppBlockManager & blockMgr) -{ - std::stringstream requestParamTranscription; - if (p.ioType() == ParameterDescriptor::io_type::in || p.ioType() == ParameterDescriptor::io_type::inout) { - if (p.type().kind() == type_kind::builtin_t - || p.type().kind() == type_kind::enum_t - || p.type().kind() == type_kind::std_string_t) { - if (p.type().needsStaticCast()) { - requestParamTranscription << " = static_cast<" << p.type().getFullTypeDescription() << ">(request->" << boost::to_lower_copy(p.getName()) << "());\n"; - } - else { - requestParamTranscription << " = request->" << boost::to_lower_copy(p.getName()) << "();\n"; - } - } - else { - requestParamTranscription << " = xpcf::deserialize<"<(request->" << boost::to_lower_copy(p.getName()) << "());\n"; - } - } - else { - requestParamTranscription << ";\n"; - } - - blockMgr.out() << p.type().getFullTypeDescription() << " " << p.getName() << requestParamTranscription.str(); -} - -void ServerGenerator::bindOutput(const ParameterDescriptor & p, CppBlockManager & blockMgr) -{ - if (p.ioType() == ParameterDescriptor::io_type::inout || p.ioType() == ParameterDescriptor::io_type::out) { - if (p.type().kind() == type_kind::builtin_t - || p.type().kind() == type_kind::enum_t - || p.type().kind() == type_kind::std_string_t) { - if (p.type().needsStaticCast()) { - blockMgr.out() << "response->set_"<< boost::to_lower_copy(p.getName()) <<"(static_cast<"<< p.type().getRPCType() <<">("<set_" << boost::to_lower_copy(p.getName()) << "(" << p.getName() << ");\n"; - } - } - else if (p.type().kind() == type_kind::user_defined_t - || p.type().kind() == type_kind::template_t) { - blockMgr.out() << "response->set_" << boost::to_lower_copy(p.getName()) << "(xpcf::serialize<" << p.type().getFullTypeDescription() <<">(" << p.getName() << "));\n"; - } - } -} - -void ServerGenerator::processBodyMethods(const SRef c, CppBlockManager & blockMgr) -{ - for (auto m : c->methods()) { - std::string request = m->m_requestName; - std::string response = m->m_responseName; - - blockMgr.out() << "::grpc::Status " + m_className +"::"+ m_grpcClassName + "Impl::" + m->m_rpcName + "(::grpc::ServerContext* context, const "+ request + "* request, " + response + "* response)\n"; - { - block_guard methodBlock(blockMgr); - std::stringstream methodCall; - if (!m->returnType().isVoid()) { - if (m->returnType().kind() == type_kind::c_string_t) { - methodCall << "std::string" << " returnValue = "; - } - else { - methodCall << m->returnType().getFullTypeDescription()<< " returnValue = "; - } - } - if (m->hasOutputs() && !m->compressionDisabled()) { - blockMgr.out() <<"#ifndef DISABLE_GRPC_COMPRESSION\n"; - blockMgr.out() << "xpcf::grpcCompressType askedCompressionType = static_cast(request->grpcservercompressionformat());\n"; - blockMgr.out() << "xpcf::grpcServerCompressionInfos serverCompressInfo = xpcf::deduceServerCompressionType(askedCompressionType, m_serviceCompressionInfos, \""<getName()<<"\", m_methodCompressionInfosMap);\n"; - blockMgr.out() << "xpcf::prepareServerCompressionContext(context, serverCompressInfo);\n"; - blockMgr.out() <<"#endif\n"; - } - blockMgr.out() <<"#ifdef ENABLE_SERVER_TIMERS\n"; - blockMgr.out() <<"boost::posix_time::ptime start = boost::posix_time::microsec_clock::universal_time();\n"; - blockMgr.out() <<"std::cout << \"====> "<getName()<<" request received at \" << to_simple_string(start) << std::endl;\n"; - blockMgr.out() <<"#endif\n"; - methodCall << "m_xpcfComponent->" << m->getName() << "("; - uint32_t nbTypes = 0; - for (SRef p : m->m_params) { - if (nbTypes != 0) { - methodCall << ", "; - } - bindInput(*p, blockMgr); - methodCall << p->getName(); - nbTypes++; - } - blockMgr.out() << methodCall.str() << ");\n"; - for (SRef p : m->m_params) { - bindOutput(*p, blockMgr); - } - if (!m->returnType().isVoid()) { - // TODO : serialize return type !!! - if (m->returnType().kind() == type_kind::builtin_t) { - if (m->returnType().needsStaticCast()) { - blockMgr.out() << "response->set_xpcfgrpcreturnvalue(static_cast<"<< m->returnType().getRPCType() <<">(returnValue));\n"; - } - else { - blockMgr.out() << "response->set_xpcfgrpcreturnvalue(returnValue);\n"; - } - } - else if ((m->returnType().kind() == type_kind::user_defined_t) || (m->returnType().kind() == type_kind::template_t)) { - blockMgr.out() << "response->set_xpcfgrpcreturnvalue(xpcf::serialize<" << m->returnType().getFullTypeDescription() << ">(returnValue));\n"; - } - else if (m->returnType().kind() == type_kind::enum_t) { - if (m->returnType().needsStaticCast()) { - blockMgr.out() << "response->set_xpcfgrpcreturnvalue(static_cast<"<< m->returnType().getRPCType() <<">(returnValue));\n"; - } - else { - blockMgr.out() << "response->set_xpcfgrpcreturnvalue(returnValue);\n"; - } - } - else if (m->returnType().kind() == type_kind::c_string_t ) { - blockMgr.out() << "response->set_xpcfgrpcreturnvalue(returnValue);\n"; - } - } - blockMgr.out() <<"#ifdef ENABLE_SERVER_TIMERS\n"; - blockMgr.out() <<"boost::posix_time::ptime end = boost::posix_time::microsec_clock::universal_time();\n"; - blockMgr.out() <<"std::cout << \"====> "<getName()<<" response sent at \" << to_simple_string(end) << std::endl;\n"; - blockMgr.out() <<"std::cout << \" => elapsed time = \" << ((end - start).total_microseconds() / 1000.00) << \" ms\" << std::endl;\n"; - blockMgr.out() <<"#endif\n"; - //boost::posix_time::ptime end = boost::posix_time::microsec_clock::local_time(); - //std::cout << “====>IMappingPipeline_grpcServer::init response sent at “ << to_simple_string(end) - blockMgr.out() << "return ::grpc::Status::OK;\n"; - } - blockMgr.newline(); - } -} - -void ServerGenerator::generateBody(const SRef c, std::map metadata, std::ostream& out) -{ - CppBlockManager blockMgr(out); - out << "// GRPC Server Class implementation generated with xpcf_grpc_gen\n"; - out << "#include \"" + m_headerFileName + "\"\n"; - blockMgr.include("cstddef",false); - blockMgr.include("boost/date_time.hpp",false); - blockMgr.include("xpcf/remoting/ISerializable.h",false); - blockMgr.include("xpcf/remoting/GrpcHelper.h",false); - - // the body will use the grpcCLient generated from the proto or flat generators hence the following inclusion : - //#include "grpcgeneratedclient.grpc.[pb|fb].h" - - - blockMgr.out() << "namespace xpcf = org::bcom::xpcf;\n"; - blockMgr.newline(); - blockMgr.out() << "template<> " + m_nameSpace + "::" + m_className + "* xpcf::ComponentFactory::createInstance<"+ m_nameSpace + "::" + m_className + ">();\n"; - blockMgr.newline(); - - blockMgr.out() << "namespace " + m_nameSpace; - blockMgr.out() << " "; - { - block_guard nspaceBlk(blockMgr); - blockMgr.newline(); - blockMgr.out() << m_className + "::" + m_className + "():xpcf::ConfigurableBase(xpcf::toMap<"+ m_className + ">())\n"; - { - block_guard methodBlock(blockMgr); - blockMgr.out() << "declareInterface(this);\n"; - std::string baseInterface; - if (!c->getMetadata().at(ClassDescriptor::MetadataType::INTERFACENAMESPACE).empty()) { - baseInterface = c->getMetadata().at(ClassDescriptor::MetadataType::INTERFACENAMESPACE) + "::"; - } - baseInterface += c->getName(); - blockMgr.out() << "declareInjectable<" + baseInterface + ">(m_grpcService.m_xpcfComponent);\n"; - if (!c->compressionDisabled()) { - blockMgr.out() << "m_grpcServerCompressionConfig.resize("<< c->methods().size() + 1 <<");\n"; - blockMgr.out() << "declarePropertySequence(\"grpc_compress_server\", m_grpcServerCompressionConfig);\n"; - } - } - blockMgr.newline(); - blockMgr.out() << "void " + m_className + "::unloadComponent ()\n"; - { - block_guard methodBlock(blockMgr); - blockMgr.out() << "delete this;\n"; - blockMgr.out() << "return;\n"; - } - blockMgr.newline(); - blockMgr.out() << "XPCFErrorCode " + m_className +"::onConfigured()\n"; - { - block_guard methodBlock(blockMgr); - if (!c->compressionDisabled()) { - blockMgr.out() << "for (auto & grpcCompressionLine : m_grpcServerCompressionConfig) {\n;"; - blockMgr.out() << " translateServerConfiguration(grpcCompressionLine, m_grpcService.m_serviceCompressionInfos, m_grpcService.m_methodCompressionInfosMap);\n"; - blockMgr.out() << "}\n"; - } - blockMgr.out() << "return xpcf::XPCFErrorCode::_SUCCESS;\n"; - } - blockMgr.newline(); - blockMgr.out() << "::grpc::Service * " + m_className +"::getService()\n"; - { - block_guard methodBlock(blockMgr); - blockMgr.out() << "return &m_grpcService;\n"; - } - processBodyMethods(c, blockMgr); - } -} - -std::map ServerGenerator::generateImpl(SRef c, std::map metadata) -{ - m_nameSpace = "org::bcom::xpcf::grpc::server" + c->getName(); - m_className = c->getName() + "_grpcServer"; - m_headerFileName = m_className + ".h"; - m_cppFileName = m_className + ".cpp"; - m_grpcClassName = (*c)[ClassDescriptor::MetadataType::GRPCSERVICENAME]; - if (m_mode == GenerateMode::STD_COUT) { - generateHeader(c, metadata, std::cout); - generateBody(c, metadata, std::cout); - std::cout< metadata) -{ - for (auto [name, uuid] : m_serviceUuidMap) { - std::cout << "Component " << name << " generated uuid = [[xpcf::serverUUID(" << uuid <<")]]" << std::endl; - } - m_serviceUuidMap.clear(); -} - diff --git a/tools/generators/grpc/ServerGenerator.h b/tools/generators/grpc/ServerGenerator.h deleted file mode 100644 index 1a111b7..0000000 --- a/tools/generators/grpc/ServerGenerator.h +++ /dev/null @@ -1,68 +0,0 @@ -/** - * @copyright Copyright (c) 2020 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2020-09-25 - */ - -#ifndef SERVERGENERATOR_H -#define SERVERGENERATOR_H -#include - -#include "AbstractGenerator.h" - - - -class ServerGenerator : public AbstractGenerator -{ -public: - ServerGenerator(); - ~ServerGenerator() override; - std::map generateImpl(SRef c, std::map metadata) override; - void finalizeImpl(std::map metadata) override; - -protected: - void generateHeader(const SRef c, std::map metadata, std::ostream& out); - void generateBody(const SRef c, std::map metadata, std::ostream& out); - - -private: - void processHeaderMethods(const SRef c, CppBlockManager & blockMgr); - void processBodyMethods(const SRef c, CppBlockManager & blockMgr); - void bindInput(const ParameterDescriptor & p, CppBlockManager & blockMgr); - void bindOutput(const ParameterDescriptor & p, CppBlockManager & blockMgr); - - std::string m_nameSpace; - std::string m_className; - std::string m_headerFileName; - std::string m_cppFileName; - std::string m_grpcClassName; - std::map m_serviceUuidMap; -}; - - - - -template <> struct org::bcom::xpcf::ComponentTraits -{ - static constexpr const char * UUID = "{bcd2ea58-188c-497a-bc8f-f3eaff3368a9}"; - static constexpr const char * NAME = "ServerGenerator"; - static constexpr const char * DESCRIPTION = "ServerGenerator implements AbstractGenerator interface"; -}; - -#endif // SERVERGENERATOR_H diff --git a/tools/generators/grpc/TypeDescriptor.cpp b/tools/generators/grpc/TypeDescriptor.cpp deleted file mode 100755 index 6745537..0000000 --- a/tools/generators/grpc/TypeDescriptor.cpp +++ /dev/null @@ -1,491 +0,0 @@ -#include "TypeDescriptor.h" - -#include -#include -#include -#include -#include -#include - -constexpr const char * TMPLGROUPPREFIX="XPCFGRPCGEN_TMPL_GROUP"; -namespace xpcf = org::bcom::xpcf; - -TypeDescriptor::TypeDescriptor(const cppast::cpp_type & p) -{ - m_descriptorInfo = xpcf::unixpcf::make_unique(p); -} - -TypeDescriptor::TypeDescriptor(UniqueRef info) -{ - m_descriptorInfo = std::move(info); -} - -TypeDescriptor::TypeDescriptor(const std::string & typeName, template_type tmplType, const cppast::cpp_type & p) -{ - m_descriptorInfo = xpcf::unixpcf::make_unique(typeName,tmplType,p); - m_descriptorInfo->m_kind = type_kind::template_t; - m_descriptorInfo->m_isBuiltin = false; -} - -bool isCppFixedWidthType(const cppast::cpp_type & p) -{ - const std::string cppFixedWidthTypeList="int8_t|int16_t|int32_t|int64_t|" - "uint8_t|uint16_t|uint32_t|uint64_t|" - "int_least8_t|int_least16_t|int_least32_t|int_least64_t|" - "uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|" - "int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|" - "uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|" - "intptr_t|uintptr_t|intmax_t|uintmax_t|"; - return (cppFixedWidthTypeList.find(to_string(p) + '|') != std::string::npos); -} - -bool isStdString(const cppast::cpp_type & p) -{ - const std::string typeStr="std::string|std::basic_string|"; - return (typeStr.find(to_string(p) + '|') != std::string::npos); -} - - -const std::map builtinStrToEnumMap = { -{"int8_t",cpp_builtin_type::cpp_int8_t}, -{"int16_t",cpp_builtin_type::cpp_int16_t}, -{"int32_t",cpp_builtin_type::cpp_int32_t}, -{"int64_t",cpp_builtin_type::cpp_int64_t}, -{"uint8_t",cpp_builtin_type::cpp_uint8_t}, -{"uint16_t",cpp_builtin_type::cpp_uint16_t}, -{"uint32_t",cpp_builtin_type::cpp_uint32_t}, -{"uint64_t",cpp_builtin_type::cpp_uint64_t}, -{"int_least8_t",cpp_builtin_type::cpp_int_least8_t}, -{"int_least16_t",cpp_builtin_type::cpp_int_least16_t}, -{"int_least32_t",cpp_builtin_type::cpp_int_least32_t}, -{"int_least64_t",cpp_builtin_type::cpp_int_least64_t}, -{"uint_least8_t",cpp_builtin_type::cpp_uint_least8_t}, -{"uint_least16_t",cpp_builtin_type::cpp_uint_least16_t}, -{"uint_least32_t",cpp_builtin_type::cpp_uint_least32_t}, -{"uint_least64_t",cpp_builtin_type::cpp_uint_least64_t}, -{"int_fast8_t",cpp_builtin_type::cpp_int_fast8_t}, -{"int_fast16_t",cpp_builtin_type::cpp_int_fast16_t}, -{"int_fast32_t",cpp_builtin_type::cpp_int_fast32_t}, -{"int_fast64_t",cpp_builtin_type::cpp_int_fast64_t}, -{"uint_fast8_t",cpp_builtin_type::cpp_uint_fast8_t}, -{"uint_fast16_t",cpp_builtin_type::cpp_uint_fast16_t}, -{"uint_fast32_t",cpp_builtin_type::cpp_uint_fast32_t}, -{"uint_fast64_t",cpp_builtin_type::cpp_uint_fast64_t}, -{"uint_fast64_t",cpp_builtin_type::cpp_uint_fast64_t}, -{"intptr_t",cpp_builtin_type::cpp_intptr_t}, -{"uintptr_t",cpp_builtin_type::cpp_uintptr_t}, -{"intmax_t",cpp_builtin_type::cpp_intmax_t}, -{"uintmax_t",cpp_builtin_type::cpp_uintmax_t}, -}; - -const std::map templateToContainerMap = { -{"std::vector",template_type::vector_t}, -{"std::map",template_type::map_t}, -{"std::unordered_map",template_type::map_t}, -{"std::tuple",template_type::tuple_t}, -{"std::shared_ptr",template_type::sharedptr_t}, -{"SRef",template_type::sharedptr_t}, -}; - -enum cpp_builtin_type cppFixedWidthType(const cppast::cpp_type & p) -{ - return builtinStrToEnumMap.at(cppast::to_string(p)); -} - -bool isContainer(const cppast::cpp_template_instantiation_type& p) -{ - const std::string containerList="std::vector|std::map|std::unordered_map"; - return (containerList.find( p.primary_template().name()) != std::string::npos); -} - - -std::string TypeDescriptor::getFullTypeDescription() const -{ - std::string typeStr = m_descriptorInfo->m_typename; - - std::string nSpace = m_descriptorInfo->m_nameSpace; - if (!nSpace.empty() && nSpace.length() > 0) { - nSpace += "::"; - typeStr = nSpace + m_descriptorInfo->m_typename; - } - - bool severalArgs = false; - if (m_descriptorInfo->m_kind == type_kind::template_t) { - typeStr += "<"; - } - if (m_descriptorInfo->m_tmplArgsVector.size() > 0) { - for (auto & value : m_descriptorInfo->m_tmplArgsVector) { - if (severalArgs) { - typeStr += ","; - } - if (value->kind() == type_kind::template_t) { - typeStr += value->getFullTypeDescription(); - } - else { - std::string nSpace = value->getNamespace(); - if (!nSpace.empty() && nSpace.length() > 0) { - nSpace += "::"; - } - typeStr += nSpace + value->getTypename(); - } - severalArgs = true; - } - } -#ifdef CPPAST_TPLARGS_NOTEXPOSED - else { - for (auto & [key,value] : m_tmplArgs) { - if (severalArgs) { - typeStr += ","; - } - if (value->kind() == type_kind::template_t) { - typeStr += value->getFullTypeDescription(); - } - else { - std::string nSpace = value->getNamespace(); - if (!nSpace.empty() && nSpace.length() > 0) { - nSpace += "::"; - } - typeStr += nSpace + value->getTypename(); - } - severalArgs = true; - } - } -#endif - if (m_descriptorInfo->m_kind == type_kind::template_t) { - typeStr += ">"; - } - return typeStr; -} - -#ifdef CPPAST_TPLARGS_NOTEXPOSED - -const std::map leafTmplRegexpMap = { -{"(std::)*vector\s*<\s*([^<> ]*)\s*>", template_type::vector_t}, -{"(std::)*(map|unordered_map)\s*<\s*([^<>\s]*)\s*>",template_type::map_t}, -{"(std::)*(SRef|SPtr|shared_ptr)+\s*<\s*([^<>]*)\s*>",template_type::sharedptr_t}, -{"(std::)*tuple\s*<\s*([^<>\s]*)\s*>",template_type::tuple_t} -}; - - -// Note : SRef or shared_ptr can be flattened to T *, hence remove the SRef template level -// std::vector>> is equivalent to std::vector*>, -// there is just the need to know the pointer type is not rough but shared_ptr one -std::shared_ptr TypeDescriptor::deduceTemplateType(const std::string & leafTemplate) -{ - std::string combinedVectorRegex = "(std::)*vector\s*<\s*([^<> ]*|SRef<[^<>]*>)\s*>"; - //std::string leafSrefRegex = "(std::)*(SRef|SPtr|shared_ptr)+\s*<\s*([^<>\s]*)\s*>\s*"; - std::string tupleRegex = "(std::)*tuple\s*<\s*([^<>\s]*)\s*>"; - - std::smatch sm; - for (auto & [regexStr, tmplType] : leafTmplRegexpMap) { - std::regex tmplRegex(regexStr, std::regex_constants::extended); - if (std::regex_search(leafTemplate, sm, tmplRegex, std::regex_constants::match_any)) { - std::string matchStr = sm.str(0); - std::string tmplTypeName = matchStr.substr(0,matchStr.find_first_of('<')); - std::cout<<"Found "<< tmplTypeName<<" template "<(tmplTypeName ,tmplType); - } - } - return nullptr; -} - - -void TypeDescriptor::addTemplateArgument(const std::string & arg, const std::shared_ptr & d) -{ - m_tmplArgs[arg]=d; -} - -void TypeDescriptor::linkArgumentsType(const std::string & args, const std::map>> & templateGroups) -{ - std::string argStrRegex = TMPLGROUPPREFIX; - argStrRegex += "[0-9]*"; - std::regex tmplRegex(argStrRegex, std::regex_constants::extended); - std::smatch sm; - std::string argStr = args; - while (std::regex_search(argStr, sm, tmplRegex, std::regex_constants::match_any)) { - std::string matchStr = sm.str(0); - std::cout<<"Add template argument to "< tmplArgs; - std::string leafTemplateGroupRegex = "[^<,]*<[^<>]*>"; - std::regex tmplRegex(leafTemplateGroupRegex, std::regex_constants::extended); - std::smatch sm; - // parsing finds first leaf template instanciation, replace leaf templates with groups identifiers then search for "new"(up level) leaf templates - // until there is no more leaf - while (std::regex_search(regexArgumentStr, sm, tmplRegex, std::regex_constants::match_any)) { - std::string matchStr = sm.str(0); - std::cout<<"Found leaf template "<linkArgumentsType(matchStr, m_templateGroups); - } - } - - // NOTE :doesn't provide the template level ex: T>,K,G> - // matches are V , K , G in the sample, V is an inner template ! - // first search for inner template instantiation - if (argumentStr.find_first_of('<') != argumentStr.npos) { - std::string subTemplateName = argumentStr.substr(0,argumentStr.find_first_of('<')); - std::string subArgs = argumentStr.substr(argumentStr.find_first_of('<')+1,argumentStr.find_last_of('>')-2); - std::cout<<"Inner template name = "< key="<(p); - auto& templateType = static_cast(p); - typeKind = "Template instanciation defined type"; - - derefTypeKind = templateInstType.primary_template().name(); - innerType = templateType.dependee(); - auto ids = templateInstType.primary_template().id(); - exposed = templateInstType.arguments_exposed(); - - for (auto & id : ids) { - if (index.lookup(id).has_value()) { - auto & entity = index.lookup(id).value(); - if (entity.scope_name().has_value()) { - std::cout<<"Scope name "< type [ " << to_string(p) << " ]\n"; - std::cout<<" => type kind [ " << typeKind << " ]\n"; - std::cout<<" => derefed type [ " < arguments are "; - info.m_kind = type_kind::template_t; - info.m_typename = templateInstType.primary_template().name(); - if (isContainer(templateInstType)) { - info.m_templateType = getContainerType(templateInstType); - } - if (!exposed) { -#ifdef CPPAST_TPLARGS_NOTEXPOSED - const std::string & args = templateInstType.unexposed_arguments(); - std::cout< "<(parseType(index, argument.type().value()))); - } - } - } -} - -UniqueRef TypeDescriptor::parseType(const cppast::cpp_entity_index& index, const cppast::cpp_type & p) -{ - std::string constParam = "not const"; - std::string typeKind; - std::string derefTypeKind; - std::reference_wrapper innerType = (p); - std::reference_wrapper currentType = (p); - UniqueRef info = xpcf::unixpcf::make_unique(p); - bool bIsLeaf = true; - do { - if (isCppFixedWidthType(currentType)) { - info->m_typename = cppast::to_string(currentType); - info->m_builtinType = cppFixedWidthType(currentType); - info->m_kind = type_kind::builtin_t; - info->m_isBuiltin = true; - } - if (isStdString(currentType)) { - bIsLeaf = true; - info->m_typename = "std::string"; - info->m_kind = type_kind::std_string_t; - } - if (currentType.get().kind() == cppast::cpp_type_kind::pointer_t) { - if (m_foundConst.size() == 0) { - info->m_const = false; - } - m_foundConst.clear(); - info->m_isReference = true; - info->m_isPointer = true; - typeKind += " pointer"; - // cast to cpp_pointer_type - auto& pointerType = static_cast(currentType.get()); - innerType = pointerType.pointee(); - derefTypeKind = to_string(innerType); - bIsLeaf = false; - } - if (currentType.get().kind() == cppast::cpp_type_kind::array_t) { - typeKind += " array"; - // cast to cpp_array_type - auto& arrayType = static_cast(currentType.get()); - innerType = arrayType.value_type(); - derefTypeKind = to_string(innerType); - bIsLeaf = false; - } - if (currentType.get().kind() == cppast::cpp_type_kind::reference_t) { - // cast to cpp_reference_type - auto& refType = static_cast(currentType.get()); - if (refType.reference_kind() == cppast::cpp_reference::cpp_ref_lvalue) { - info->m_isReference = true; - typeKind += "lvalue ref"; - m_foundRef.push_back(true); - } - else if (refType.reference_kind() == cppast::cpp_reference::cpp_ref_rvalue) { - typeKind += "rvalue ref"; - } - innerType = refType.referee(); - derefTypeKind = to_string(innerType); - bIsLeaf = false; - } - if (currentType.get().kind() == cppast::cpp_type_kind::cv_qualified_t) { - typeKind += " cv_qualified"; - // cast to cpp_cv_qualified_type - auto& cvType = static_cast(currentType.get()); - innerType = cvType.type(); - auto cvQual = cvType.cv_qualifier(); - derefTypeKind = to_string(innerType); - bIsLeaf = false; - if (is_const(cvQual)) { - constParam = "const"; - m_foundConst.push_front(true); - } - } - if (currentType.get().kind() == cppast::cpp_type_kind::builtin_t) { - auto& builtinType = static_cast(currentType.get()); - if (builtinType.builtin_type_kind() != cppast::cpp_builtin_type_kind::cpp_void) { - info->m_void = false; - } - derefTypeKind = to_string(builtinType.builtin_type_kind()); - info->m_typename = cppast::to_string(currentType.get()); - info->m_builtinType = static_cast(builtinType.builtin_type_kind()); - info->m_kind = type_kind::builtin_t; - info->m_isBuiltin = true; - bIsLeaf = true; - } - else { - info->m_void = false; - } - if (currentType.get().kind() == cppast::cpp_type_kind::user_defined_t && - !isCppFixedWidthType(currentType) && - !isStdString(currentType)) { - bIsLeaf = true; - info->m_kind = type_kind::user_defined_t; - auto & userType = static_cast(currentType.get()); - derefTypeKind = "User defined type"; - info->m_typename = userType.entity().name(); - if (userType.entity().no_overloaded().get() > 0) { - auto ids = userType.entity().id(); - for (auto & id : ids) { - if (index.lookup(id).has_value()) { - auto & entity = index.lookup(id).value(); - if (entity.kind() == cppast::cpp_entity_kind::type_alias_t) { - std::cout<<"Entity "<0) { - auto& indexedEntity = userType.entity().get(index)[0u]; - //indexedEntity->kind(); - const cppast::cpp_entity& entity = userType.entity().get(index)[0u].get(); - cppast::cpp_entity_kind knd = entity.kind(); - if (entity.kind() == cppast::cpp_entity_kind::enum_t) { - derefTypeKind = "Enum type"; - info->m_kind = type_kind::enum_t; - } - } - } - } - std::cout<< "=> constness [ " < type [ " << cppast::to_string(currentType) << " ]\n"; - std::cout<<" => type kind [ " << typeKind << " ]\n"; - std::cout<<" => derefed type [ " <m_const = false; - } - else { - info->m_const = true; - } - if (info->m_isBuiltin && info->m_const && info->m_isPointer && info->m_builtinType == cpp_builtin_type::cpp_char) { - info->m_isBuiltin = false; - info->m_kind = type_kind::c_string_t; - } - return info; - /*if (!bIsLeaf) { - parseType(index,innerType); - }*/ -} - -void TypeDescriptor::parse(const cppast::cpp_entity_index& index, const cppast::cpp_type & p) -{ - m_descriptorInfo = parseType(index,p); - std::cout< -#include -#include -#include -#include -#include -#include -#include - -// template typename T to_proto/from_proto OR another solution with IGrpcProtoInterface / IRemotingBufferInterface ?? -// Simple backend [proto|flat] buffers -// Data class C either : -// - inherits from [proto|flat] buffer message class. C.[proto|fbs] file exists -// - can be converted to [proto|flat]::C class with template methods : a C.proto or C.fbs file must exists in the source folder -// - inherits ISerializable ([de]serialize from/to bytes buffer) -// - can be serialized to bytes buffer with template overload - -//XPCF remoting study -//Message options: -//1/ custom buffered messages -//- serialisation interface -//- serialisation generation from cppast using flexbuffers, capnproto. ... or dedicated serialisation type - -//2/ standard messages based upon proto/flat buffers -//- proto/flat buffers file generation - -//Service : -//1 -> type agnostic in/out service for serialisation generation/interface -//2 -> proto/flat based service for proto/flat defined datastructure - -//serialisation generation/interface : -//-> pros : -//- allows an easier integration in existing c++ code - -//-> cons : -//- needs to generate deserialisation code in other languages too - -//proto/flat buffers messages : -//-> pros : -//- cross languages deserialisation is provided out of the box - -//-> cons : -//- needs to generate/create proto files -//- adds a dependency toward proto/flat buffers plugin for grpc - -//Endpoint notion ? Interface with destination configuration ? - -enum class cpp_builtin_type { - cpp_void, //< `void` - - cpp_bool, //< `bool` - - cpp_uchar, //< `unsigned char` - cpp_ushort, //< `unsigned short` - cpp_uint, //< `unsigned int` - cpp_ulong, //< `unsigned long` - cpp_ulonglong, //< `unsigned long long` - cpp_uint128, //< `unsigned __int128` - - cpp_schar, //< `signed char` - cpp_short, //< `short` - cpp_int, //< `int` - cpp_long, //< `long` - cpp_longlong, //< `long long` - cpp_int128, //< `__int128` - - cpp_float, //< `float` - cpp_double, //< `double` - cpp_longdouble, //< `long double` - cpp_float128, //< `__float128` - - cpp_char, //< `char` - cpp_wchar, //< `wchar_t` - cpp_char16, //< `char16_t` - cpp_char32, //< `char32_t` - - cpp_nullptr, //< `decltype(nullptr)` aka `std::nullptr_t` - cpp_int8_t, - cpp_int16_t, - cpp_int32_t, - cpp_int64_t, - - cpp_uint8_t, - cpp_uint16_t, - cpp_uint32_t, - cpp_uint64_t, - - cpp_int_least8_t, - cpp_int_least16_t, - cpp_int_least32_t, - cpp_int_least64_t, - - cpp_uint_least8_t, - cpp_uint_least16_t, - cpp_uint_least32_t, - cpp_uint_least64_t, - - cpp_int_fast8_t, - cpp_int_fast16_t, - cpp_int_fast32_t, - cpp_int_fast64_t, - - cpp_uint_fast8_t, - cpp_uint_fast16_t, - cpp_uint_fast32_t, - cpp_uint_fast64_t, - - cpp_intptr_t, - cpp_uintptr_t, - - cpp_intmax_t, - cpp_uintmax_t -}; - -enum class type_kind { - builtin_t, - c_string_t, - std_string_t, - user_defined_t, - array_t, - enum_t, - template_t -}; - -enum class template_type { - none, - vector_t, - map_t, - tuple_t, - sharedptr_t, - user_defined_t -}; - -class TypeDescriptor -{ -public: - struct TypeDescriptorInfo { - //TypeDescriptorInfo() = default; - - TypeDescriptorInfo(const cppast::cpp_type & cppType):m_cppastType(cppType) {} - TypeDescriptorInfo(const std::string & typeName, template_type tmplType, const cppast::cpp_type & cppType):m_typename(typeName),m_templateType(tmplType),m_cppastType(cppType) {} - std::string m_typename; - bool m_const = true; - bool m_isBuiltin; - bool m_isEnum; - bool m_sharedRef = false; - bool m_isReference = false; - bool m_isPointer = false; - bool m_isContainer = false; - bool m_void = true; - bool isLeaf = false; // false for intermediate template - type_kind m_kind; - mutable std::string m_rpcType; - template_type m_templateType = template_type::none; - cpp_builtin_type m_builtinType; - std::vector> m_tmplArgsVector; // only for template type desc - mutable std::string m_nameSpace = ""; - const cppast::cpp_type & m_cppastType; - }; - TypeDescriptor(const cppast::cpp_type & p); - TypeDescriptor(UniqueRef info); - TypeDescriptor(const std::string & typeName, template_type tmplType, const cppast::cpp_type & p); - const cppast::cpp_type & getCppastType() const { return m_descriptorInfo->m_cppastType; } - void parse(const cppast::cpp_entity_index& index, const cppast::cpp_type & p); - bool isConst() const { return m_descriptorInfo->m_const; } - bool isSharedRef() const { return m_descriptorInfo->m_sharedRef; } - bool isReference() const { return m_descriptorInfo->m_isReference; } - bool isPointer() const { return m_descriptorInfo->m_isPointer; } - bool isVoid() const { return m_descriptorInfo->m_void; } - - type_kind kind() const { return m_descriptorInfo->m_kind; } - const std::string & getTypename() const { return m_descriptorInfo->m_typename; } - template_type getTemplateType() const { return m_descriptorInfo->m_templateType; } - cpp_builtin_type getBuiltinType() const { return m_descriptorInfo->m_builtinType; } - std::string getFullTypeDescription() const; - void enableStaticCast(const std::string & rpcType) const { m_descriptorInfo->m_rpcType = rpcType; m_staticCast = true; } - bool needsStaticCast() const { return m_staticCast; } - const std::string & getRPCType() const { return m_descriptorInfo->m_rpcType; } - const std::string & getNamespace() const { return m_descriptorInfo->m_nameSpace; } - void setNamespace(const std::string & nameSpace) const { m_descriptorInfo->m_nameSpace = nameSpace; } - -private: - UniqueRef parseType(const cppast::cpp_entity_index& index, const cppast::cpp_type & p); -#ifdef CPPAST_TPLARGS_NOTEXPOSED - std::shared_ptr deduceTemplateType(const std::string & leafTemplate); - void addTemplateArgument(const std::string & arg, const std::shared_ptr & d); - void linkArgumentsType(const std::string & args, const std::map>> & templateGroups); - std::string parseTemplateArguments(const std::string & argStr, uint32_t groupNumber = 0); -#endif - void parseTemplateInstanciation(const cppast::cpp_entity_index& index, const cppast::cpp_type & p, TypeDescriptorInfo & info); - - - - std::map>> m_templateGroups; - std::map> m_tmplArgs; // only for template type desc - //bool isLeaf = false; // false for intermediate template - std::deque m_foundConst; - std::deque m_foundRef; - mutable bool m_staticCast = false; - UniqueRef m_descriptorInfo; -}; - -inline void waitForUserInput() -{ - int i; - std::cin >> i; -} - -#endif // TYPEDESCRIPTOR_H diff --git a/tools/generators/grpc/XmlHelpers.h b/tools/generators/grpc/XmlHelpers.h deleted file mode 100644 index a291abd..0000000 --- a/tools/generators/grpc/XmlHelpers.h +++ /dev/null @@ -1,240 +0,0 @@ -#ifndef XMLHELPERS_H -#define XMLHELPERS_H -#include -#include -#include -#include -#include -#include -#include -#include -#include - -typedef enum { - REGISTRY = 0, - CONFIG = 1, - MODULE = 2, - COMPONENT = 3, - INTERFACE = 4, - ALIASES = 5, - FACTORY = 6, - BINDINGS = 7, - BIND = 8, - PROPERTIES = 9, - CONFIGURE = 10, - PROPERTY = 11, -} XML; - - -//template -class XmlBlockManager { -public: - - XmlBlockManager(std::ostream& out):m_out(out) {}; - virtual ~XmlBlockManager() = default; - - void newline() { - m_out << '\n'; - } - - template< XML t = REGISTRY> - void enter(std::initializer_list> attributes = {}) { - switch (t) { - case REGISTRY : - enter("xpcf-registry", attributes); - break; - case CONFIG : - enter("xpcf-configuration", attributes); - break; - case MODULE : - enter("module", attributes); - break; - case COMPONENT: - enter("component", attributes); - break; - case INTERFACE: - enter("interface", attributes); - break; - case ALIASES: - enter("aliases"); - break; - case FACTORY: - enter("factory"); - break; - case BINDINGS: - enter("bindings"); - break; - case BIND: - enter("bind",attributes); - break; - case PROPERTIES: - enter("properties"); - break; - case CONFIGURE: - enter("configure", attributes); - break; - case PROPERTY: - enter("property", attributes); - break; - } - } - - template< XML t = MODULE> - void node(std::initializer_list> attributes = {}) { - // assert for non coherent nodes : registry, etc must be multiline blocks - switch (t) { - case MODULE : - node("module", attributes); - break; - case COMPONENT: - node("component", attributes); - break; - case INTERFACE: - node("interface", attributes); - break; - case BIND: - node("bind", attributes); - break; - case CONFIGURE: - node("configure", attributes); - break; - case PROPERTY: - node("property", attributes); - break; - } - } - - void enter(const std::string & nodeName, std::initializer_list> attributes = {}) { - m_blockNameStack.push(nodeName); - std::string b; - b = indent() + "<" + nodeName; - for (auto & [attrName, attrValue] : attributes) { - b += " " + attrName + "=\"" + attrValue + "\""; - } - b += ">\n"; - m_indentLevel ++; - m_out << b; - } - - void addValue(const std::string & value) { - m_out << indent() + "" + value + "\n"; - } - - void node(const std::string & nodeName, std::initializer_list> attributes = {}) { - std::string b; - b = indent() + "<" + nodeName; - for (auto & [attrName, attrValue] : attributes) { - b += " " + attrName + "=\"" + attrValue + "\""; - } - b += "/>\n"; - m_out << b; - } - - void leave() { - std::string blkName = m_blockNameStack.top(); - m_blockNameStack.pop(); - leave(blkName); - } - - std::ostream& out() { return m_out << indent(); } - - void xmlOpenRootNode(const std::string & nodeName = "xpcf-registry", std::initializer_list> attributes = {{"autoAlias","true"}}) { - out() << "\n"; - m_rootName = nodeName; - enter(m_rootName); - } - - void xmlCloseOpenedNodes() { - while (!m_blockNameStack.empty()) { - leave(); - } - } - - void leave(const std::string & nodeName) { - std::string b; - if (m_indentLevel > 0) { - m_indentLevel --; - } - b = indent() + "\n"; - m_out << b; - } - - std::string indent() { - std::string ind; - for (uint32_t i = 0; i m_blockNameStack; -}; - -class XmlFileManager : public XmlBlockManager { -public: - XmlFileManager(std::unique_ptr xmlFile):m_xmlFile(std::move(xmlFile)), - XmlBlockManager(*xmlFile) {} - - ~XmlFileManager() override { - release(); - } - - void release() override { - XmlBlockManager::release(); - m_xmlFile->close(); - } - - static std::unique_ptr createXmlFileManager(const boost::filesystem::path & fileName) - { - boost::filesystem::detail::utf8_codecvt_facet utf8; - return std::make_unique(std::make_unique(fileName.generic_string(utf8).c_str(), std::ios::out)); - } - -private: - std::unique_ptr m_xmlFile; -}; - -class XmlStringStreamManager : public XmlBlockManager { -public: - XmlStringStreamManager(std::unique_ptr stream):m_stream(std::move(stream)), - XmlBlockManager(*stream) {} - - ~XmlStringStreamManager() override { - release(); - } - -private: - std::unique_ptr m_stream; -}; - -template< XML t = REGISTRY> -class xml_block_guard { -public: - xml_block_guard(XmlBlockManager & mgr, std::initializer_list> attributes = {}):m_blockMgr(mgr) { m_blockMgr.enter(attributes); } - ~xml_block_guard() { m_blockMgr.leave(); } - -private: - XmlBlockManager & m_blockMgr; -}; - -class fstream_guard { -public: - fstream_guard(std::fstream & stream):m_stream(stream) {} - ~fstream_guard() { if (m_stream.is_open()) { m_stream.close(); } } - -private: - std::fstream & m_stream; -}; - - -#endif // CPPHELPERS_H diff --git a/tools/generators/grpc/XpcfConfigGenerator.cpp b/tools/generators/grpc/XpcfConfigGenerator.cpp deleted file mode 100755 index 92d710e..0000000 --- a/tools/generators/grpc/XpcfConfigGenerator.cpp +++ /dev/null @@ -1,128 +0,0 @@ -#include "XpcfConfigGenerator.h" -#include - - -namespace bp = boost::process; -namespace xpcf = org::bcom::xpcf; - -template<> XpcfConfigGenerator * xpcf::ComponentFactory::createInstance(); - -XpcfConfigGenerator::XpcfConfigGenerator():AbstractGenerator(xpcf::toMap()) -{ -} - - -XpcfConfigGenerator::~XpcfConfigGenerator() -{ -} - -std::unique_ptr XpcfConfigGenerator::createXmlFileManager(const std::string & fileName) -{ - fs::detail::utf8_codecvt_facet utf8; - fs::path xmlFilePath(fileName,utf8); - xmlFilePath = m_folder/xmlFilePath; - return XmlFileManager::createXmlFileManager(xmlFilePath); -} - -void XpcfConfigGenerator::initializeImpl(std::map metadata) -{ - if (m_mode == GenerateMode::STD_COUT) { - m_xmlClientMgr = std::make_unique(std::cout); - m_xmlServerMgr = std::make_unique(std::cout); - m_xmlClientPropsMgr = std::make_unique(std::cout); - m_xmlServerPropsMgr = std::make_unique(std::cout); - } - else { - m_xmlClientMgr = createXmlFileManager("xpcfGrpcRemoting" + metadata[MetadataType::PROJECT_NAME] + "Client.xml"); - m_xmlServerMgr = createXmlFileManager("xpcfGrpcRemoting" + metadata[MetadataType::PROJECT_NAME] + "Server.xml"); - m_xmlClientPropsMgr = createXmlFileManager("xpcfGrpcRemoting" + metadata[MetadataType::PROJECT_NAME] + "Client_properties.xml"); - m_xmlServerPropsMgr = createXmlFileManager("xpcfGrpcRemoting" + metadata[MetadataType::PROJECT_NAME] + "Server_properties.xml"); - } - m_xmlClientMgr->xmlOpenRootNode(); - m_xmlClientMgr->enter({{"uuid",metadata[MetadataType::MODULE_UUID]}, - {"name",metadata[MetadataType::MODULE_NAME]}, - {"description",metadata[MetadataType::MODULE_DESCRIPTION]}, - {"path","$REMAKENROOT/modules"}}); - m_xmlServerMgr->xmlOpenRootNode(); - m_xmlServerMgr->enter({{"uuid",metadata[MetadataType::MODULE_UUID]}, - {"name",metadata[MetadataType::MODULE_NAME]}, - {"description",metadata[MetadataType::MODULE_DESCRIPTION]}, - {"path","$REMAKENROOT/modules"}}); - m_xmlClientPropsMgr->xmlOpenRootNode("xpcf-configuration"); - m_xmlClientPropsMgr->enter(); - m_xmlServerPropsMgr->xmlOpenRootNode("xpcf-configuration"); - m_xmlServerPropsMgr->enter(); -} - -std::map XpcfConfigGenerator::generateImpl(SRef c, std::map metadata) -{ - { - xml_block_guard componentBlk(*m_xmlClientMgr, {{"uuid",xpcf::uuids::to_string(c->getClientUUID())}, - {"name",metadata[MetadataType::PROXY_XPCFGRPCCOMPONENTNAME]}, - {"description",metadata[MetadataType::PROXY_XPCFGRPCCOMPONENTNAME]}}); - m_xmlClientMgr->node({{"uuid","125f2007-1bf9-421d-9367-fbdc1210d006"}, - {"name","XPCF::IComponentIntrospect"}, - {"description","Component introspection interface"}}); - m_xmlClientMgr->node({{"uuid", c->getXpcfTrait().uuid}, - {"name", c->getXpcfTrait().name}, - {"description", c->getXpcfTrait().description}}); - } - { - xml_block_guard componentBlk(*m_xmlServerMgr,{{"uuid",xpcf::uuids::to_string(c->getServerUUID())}, - {"name",metadata[MetadataType::SERVER_XPCFGRPCCOMPONENTNAME]}, - {"description",metadata[MetadataType::SERVER_XPCFGRPCCOMPONENTNAME]}}); - m_xmlServerMgr->node({{"uuid","125f2007-1bf9-421d-9367-fbdc1210d006"}, - {"name","XPCF::IComponentIntrospect"}, - {"description","Component introspection interface"}}); - m_xmlServerMgr->node({{"uuid", "baab5e42-2c24-48de-953b-07237af419e4"}, - {"name", "org::bcom::xpcf::IGrpcService"}, - {"description", "xpcf GrpcService interface"}}); - } - { - xml_block_guard componentBlk(*m_xmlClientPropsMgr,{{"component",metadata[MetadataType::PROXY_XPCFGRPCCOMPONENTNAME]}}); - m_xmlClientPropsMgr->enter({{"name","grpc_compress_proxy"}, - {"type","string"}}); - m_xmlClientPropsMgr->addValue("service|none|none"); - for (auto & m : c->methods()) { - m_xmlClientPropsMgr->addValue("method|" + m->getName() + "|none|none"); - } - m_xmlClientPropsMgr->leave(); - } - { - xml_block_guard componentBlk(*m_xmlServerPropsMgr,{{"component",metadata[MetadataType::SERVER_XPCFGRPCCOMPONENTNAME]}}); - m_xmlServerPropsMgr->enter({{"name","grpc_compress_server"}, - {"type","string"}}); - m_xmlServerPropsMgr->addValue("service|none|0"); - for (auto & m : c->methods()) { - m_xmlServerPropsMgr->addValue("method|" + m->getName() + "|none|0"); - } - m_xmlServerPropsMgr->leave(); - } - m_grpcComponentBinds.push_back(metadata.at(MetadataType::SERVER_XPCFGRPCCOMPONENTNAME)); - return metadata; -} - -void XpcfConfigGenerator::finalizeImpl(std::map metadata) -{ - m_xmlClientMgr->leave(); - m_xmlServerMgr->leave(); - { - xml_block_guard factoryBlk(*m_xmlServerMgr); - { - xml_block_guard factoryBlk(*m_xmlServerMgr); - { - xml_block_guard factoryBlk(*m_xmlServerMgr, {{"interface","org::bcom::xpcf::IGrpcService"}}); - for (auto & bind : m_grpcComponentBinds) { - m_xmlServerMgr->node({{"to", bind}}); - } - } - } - } - m_xmlClientMgr->release(); - m_xmlServerMgr->release(); - m_xmlClientPropsMgr->release(); - m_xmlServerPropsMgr->release(); - //to put version in pkgDepsFile for protobuf - //pkg-config --modversion protobuf - // protobuf|3.15.6|protobuf|brew@system -} diff --git a/tools/generators/grpc/XpcfConfigGenerator.h b/tools/generators/grpc/XpcfConfigGenerator.h deleted file mode 100644 index 214f7ba..0000000 --- a/tools/generators/grpc/XpcfConfigGenerator.h +++ /dev/null @@ -1,58 +0,0 @@ -/** - * @copyright Copyright (c) 2020 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2020-09-25 - */ - -#ifndef XPCFCONFIGGENERATOR_H -#define XPCFCONFIGGENERATOR_H -#include - -#include "AbstractGenerator.h" -#include "XmlHelpers.h" - - -class XpcfConfigGenerator : public AbstractGenerator -{ -public: - XpcfConfigGenerator(); - ~XpcfConfigGenerator() override; - std::map generateImpl(SRef c, std::map metadata) override; - //stringstream to aggregate all project info, serialized to out upon destruction ? or unload ? - //howto forward project option generation standalone/embedded ? configurable comp? through metadata ? - void initializeImpl(std::map metadata) override; - void finalizeImpl(std::map metadata) override; - -private: - std::unique_ptr createXmlFileManager(const std::string & fileName); - std::unique_ptr m_xmlClientMgr; - std::unique_ptr m_xmlServerMgr; - std::unique_ptr m_xmlClientPropsMgr; - std::unique_ptr m_xmlServerPropsMgr; - std::vector m_grpcComponentBinds; -}; - -template <> struct org::bcom::xpcf::ComponentTraits -{ - static constexpr const char * UUID = "{E794AA3D-5939-495B-A569-D3EBB536BD2B}"; - static constexpr const char * NAME = "XpcfConfigGenerator"; - static constexpr const char * DESCRIPTION = "XpcfConfigGenerator implements AbstractGenerator interface"; -}; - -#endif // XPCFCONFIGGENERATOR_H diff --git a/tools/generators/grpc/interfaces/IRPCGenerator.h b/tools/generators/grpc/interfaces/IRPCGenerator.h deleted file mode 100644 index 19a6fa7..0000000 --- a/tools/generators/grpc/interfaces/IRPCGenerator.h +++ /dev/null @@ -1,72 +0,0 @@ -/** - * @copyright Copyright (c) 2019 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2020-02-10 - */ -#ifndef IRPCGENERATOR_H -#define IRPCGENERATOR_H - - -#include - -#include "ClassDescriptor.h" - -class IRPCGenerator: public virtual org::bcom::xpcf::IComponentIntrospect -{ -public: - typedef enum { - STD_COUT = 0, - FILE = 1 - } GenerateMode; - - typedef enum { - GRPCPACKAGE, - PROXY_HEADERFILENAME, - PROXY_CPPFILENAME, - PROXY_XPCFGRPCCOMPONENTNAME, - PROXY_XPCFGRPCNAMESPACE, - SERVER_HEADERFILENAME, - SERVER_CPPFILENAME, - SERVER_XPCFGRPCCOMPONENTNAME, - SERVER_XPCFGRPCNAMESPACE, - CPPNAMESPACE, - PROJECT_NAME, - PROJECT_VERSION, - PROJECT_DEPENDENCY_URL, - MODULE_UUID, - MODULE_NAME, - MODULE_DESCRIPTION - } MetadataType; - virtual ~IRPCGenerator() override = default; - virtual void setDestinationFolder(const std::string & folder) = 0; - virtual void setGenerateMode(const GenerateMode & mode = GenerateMode::STD_COUT) = 0; - virtual std::map generate(SRef c, std::map metadata) = 0; - virtual std::map validate(SRef c, std::map metadata) = 0; - virtual void initialize(std::map metadata) = 0; - virtual void finalize(std::map metadata) = 0; -}; - -template <> struct org::bcom::xpcf::InterfaceTraits -{ - static constexpr const char * UUID = "{b4329fcb-7fcf-4801-9315-169dfd42ba41}"; - static constexpr const char * NAME = "IRPCGenerator"; - static constexpr const char * DESCRIPTION = "IRPCGenerator interface description"; -}; - -#endif // IRPCGENERATOR_H diff --git a/tools/generators/grpc/interfaces/ITypeParser.h b/tools/generators/grpc/interfaces/ITypeParser.h deleted file mode 100644 index 0ba28ce..0000000 --- a/tools/generators/grpc/interfaces/ITypeParser.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef ITYPEPARSER_H -#define ITYPEPARSER_H - - -#include -#include "ClassDescriptor.h" -#include "interfaces/IRPCGenerator.h" -#include - -class ITypeParser: virtual public org::bcom::xpcf::IComponentIntrospect -{ -public: - virtual ~ITypeParser() override = default; - virtual std::map> & getParsedInterfaces() = 0 ; - virtual std::map> & getParsedClasses() = 0 ; - //virtual SRef getInterfaceInfo(const std::string & name) = 0; - virtual SRef getClassInfo(const std::string & name) = 0; - virtual SRef getInterfaceInfo(const std::string & name) = 0; - virtual std::map & metadata() = 0; - virtual int parse_database(const std::string & databasePath, const cxxopts::ParseResult & options) = 0; - virtual int parse_file(const std::string& filename, bool fatal_error) = 0; - virtual void parseAst(std::ostream& out, const cppast::cpp_file& file) = 0; - virtual int initOptions(const cxxopts::ParseResult & options) = 0; - - -}; - - - -template <> struct org::bcom::xpcf::InterfaceTraits -{ - static constexpr const char * UUID = "{20be2759-44ea-44ae-8d52-15a5ff9945c1}"; - static constexpr const char * NAME = "ITypeParser"; - static constexpr const char * DESCRIPTION = "ITypeParser interface description"; -}; - -#endif // ITYPEPARSER_H diff --git a/tools/generators/grpc/packagedependencies.txt.template b/tools/generators/grpc/packagedependencies.txt.template deleted file mode 100644 index 1686dd4..0000000 --- a/tools/generators/grpc/packagedependencies.txt.template +++ /dev/null @@ -1 +0,0 @@ -xpcf||xpcf|github|https://github.com/b-com-software-basis/xpcf/releases/download diff --git a/tools/generators/grpc/xpcf_grpc_gen.cpp.template b/tools/generators/grpc/xpcf_grpc_gen.cpp.template deleted file mode 100755 index 5bff877..0000000 --- a/tools/generators/grpc/xpcf_grpc_gen.cpp.template +++ /dev/null @@ -1,297 +0,0 @@ -/** - * @copyright Copyright (c) 2020 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2020-02-10 - */ -#include - -#include - -#include // for generate_code() -#include // for the cpp_entity_kind definition -#include // for is_definition() -#include // for cpp_namespace -#include // for libclang_parser, libclang_compile_config, cpp_entity,... -#include // for visit() -#include -#include -#include -#include -#include "ClassDescriptor.h" -#include -#include -#include -#include "RemoteServiceGenerator.h" -#include "GRPCProtoGenerator.h" -#include "GRPCFlatBufferGenerator.h" -#include "ProxyGenerator.h" -#include "ServerGenerator.h" -#include "ProjectGenerator.h" -#include "XpcfConfigGenerator.h" -#include "ASTParser.h" -#include -namespace xpcf = org::bcom::xpcf; - - -/// Usage samples: -/// --database_file /path/to/database_dir/compile_commands.json --database_dir /path/to/database_dir/ --remove_comments_in_macro --std c++1z - -//$ ./xpcf_grpc_gen -n xpcfSampleComponent -v -r @github -u https://github.com/b-com-software-basis/xpcf/releases/releases/download --std c++1z --database_dir ../../../xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_5_clang_64bit-Debug/ --remove_comments_in_macro -o ~/tmp/grpc_gen_folder_sampleComponent -g protobuf - -//$ ./xpcf_grpc_server -f ~/tmp/grpc_gen_folder_sampleComponent/xpcfGrpcRemotingxpcfSampleComponent.xml -// note server URL should be available either in xpcf conf or in XPCF_GRPC_SERVER_URL env var : to add to grpc_server for env var -//default url is 0.0.0.0:50051 -//$ ./xpcf_grpc_client -f ../../../xpcfGrpcSampleComponentClient.xml - -//$ ./xpcf_grpc_gen -n nom_projet -v version_projet -r @github -u url_projet –std c++1z –database_dir chemin/vers/compilation_database/ –remove_comments_in_macro -o ~/tmp/grpc_gen_folder_sampleComponent -g protobuf - -//$ ./xpcf_grpc_gen -n SolARFramework -v 0.9.0 -r SolARBuild@github -u https://github.com/SolarFramework/SolARFramework —database_dir /home/ltouraine/builds/build-SolARFramework-Desktop_Qt_5_12_6_GCC_64bit-Debug/ –std c++1z —remove_comments_in_macro -g protobuf -o ~/grpcGenSolar - - -//Linux sample grpc process: -//server side -//. ~/workspace/linux-github/linux-xpcf/scripts/set_linux_env.sh -//export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/ltouraine/.conan/data/boost/1.74.0/_/_/package/eeef031d45a4b3fccb233a8660e3255a183c617c/lib:~/.remaken/packages/linux-gcc/xpcf//lib/x86_64/shared/debug/ -//export XPCF_GRPC_SERVER_URL=0.0.0.0:34123 -//./xpcf_grpc_server -f xpcfGrpcSampleComponentServer.xml - -//client side -//. ~/workspace/linux-github/linux-xpcf/scripts/set_linux_env.sh -//./xpcf_grpc_client -f xpcfGrpcSampleComponentClient.xml -// print help options -void print_help(const cxxopts::Options& options) -{ - std::cout << options.help({"", "parsing", "generation"}) << '\n'; -} - -// print error message -void print_error(const std::string& msg) -{ - std::cerr << msg << '\n'; -} - -SRef bindXpcfComponents() { - SRef cmpMgr = xpcf::getComponentManagerInstance(); -#ifdef XPCF_NAMEDINJECTIONAPPROACH - // global component holding all sub components approach with named injections: - cmpMgr->bindLocal(); - cmpMgr->bindLocal("proxy"); - cmpMgr->bindLocal("server"); - cmpMgr->bindLocal("project"); -#else - - // chained injection through base class composite approach : - cmpMgr->bindLocal("service"); - cmpMgr->bindLocal(); - cmpMgr->bindLocal(); - cmpMgr->bindLocal(); - cmpMgr->bindLocal(); - cmpMgr->bindLocal(); -#endif - cmpMgr->bindLocal("astParser"); - return cmpMgr; -} - -int main(int argc, char* argv[]) -try -{ - boost::log::core::get()->set_logging_enabled(false); - SRef cmpMgr = xpcf::getComponentManagerInstance(); - - cxxopts::Options option_list("xpcf_grpc_gen", - "xpcf_grpc_gen - The commandline interface to the grpc generators for xpcf.\n" -"Sample use:\n" -"1/ generate the compilation database from the framework project hosting the xpcf interfaces that will be remoted.\n" -"Within QT Creator for instance, use \"Build->Generate Compilation Database for [project]\"\n\n" -"2/ launch xpcf_grpc_gen with:\n" -"xpcf_grpc_gen -n [framework name] -v [framework version] -r @github -u [framework binary release github url] --std c++1z --database_dir [compilation database folder path] --remove_comments_in_macro -o [code generation destination folder path] -g protobuf -i [relative framework interfaces path beneath the project starting at $HOME - this path will be removed from #include directives]\n\n" -"Example: to generate grpc code from xpcf SampleComponent interfaces the command is (if the xpcf folder is located in the $HOME user folder):\n" -"xpcf_grpc_gen -n xpcfSampleComponent -v -r @github -u https://github.com/b-com-software-basis/xpcf/releases/download --std c++1z --database_dir xpcf/samples/build-xpcfSampleComponent-Desktop_Qt_5_12_10_clang_64bit-Debug/ --remove_comments_in_macro -o ~/tmp/grpc_gen_sampleComponent -g protobuf -i xpcf/samples/sample_component"); - // clang-format off - option_list.add_options() - ("h,help", "display this help and exit") - ("version", "display version information and exit") - ("d,verbose", "be verbose when parsing") - ("n,name", "the parsed project/framework name", - cxxopts::value()) - ("v,project_version", "the parsed project/framework version", - cxxopts::value()) - ("r,repository", "the project/framework host repository type [github,conan,system...] ", - cxxopts::value()) - ("u,url", "the project/framework host repository url", - cxxopts::value()) - ("fatal_errors", "abort program when a parser error occurs, instead of doing error correction") - ("file", "the file that is being parsed", - cxxopts::value()); - option_list.add_options("parsing") - ("database_dir", "set the directory where a 'compile_commands.json' file is located containing build information", - cxxopts::value()) - ("database_file", "set the file name whose configuration will be used regardless of the current file name", - cxxopts::value()) - ("std", "set the C++ standard (c++98, c++03, c++11, c++14, c++1z (experimental))", - cxxopts::value()->default_value(cppast::to_string(cppast::cpp_standard::cpp_latest))) - ("I,include_directory", "add directory to include search path", - cxxopts::value>()) - ("D,macro_definition", "define a macro on the command line", - cxxopts::value>()) - ("U,macro_undefinition", "undefine a macro on the command line", - cxxopts::value>()) - ("f,feature", "enable a custom feature (-fXX flag)", - cxxopts::value>()) - ("gnu_extensions", "enable GNU extensions (equivalent to -std=gnu++XX)") - ("msvc_extensions", "enable MSVC extensions (equivalent to -fms-extensions)") - ("msvc_compatibility", "enable MSVC compatibility (equivalent to -fms-compatibility)") - ("fast_preprocessing", "enable fast preprocessing, be careful, this breaks if you e.g. redefine macros in the same file!") - ("remove_comments_in_macro", "whether or not comments generated by macro are kept, enable if you run into errors"); - option_list.add_options("generation") - ("g,generator", "the message format to use : either 'flatbuffers' or 'protobuf'", - cxxopts::value()->default_value("flatbuffers")) - ("m,module_uuid", "the UUID to use for the XPCF module generated", - cxxopts::value()) - ("i,interfaces_folder", "the relative interfaces root folder (starting from $HOME folder) for the project (this path will be removed from #include directives)", - cxxopts::value()) - ("o,output", "set the destination folder where the generated grpc files will be created. The folder is created if it doesn't already exists", - cxxopts::value()); - - - // clang-format on - // waitForUserInput(); - auto options = option_list.parse(argc, argv); - if (options.count("help")) - print_help(option_list); - else if (options.count("version")) - { - std::string version = MYVERSIONSTRING; - std::cout << "xpcf_grpc_gen version "<< version <() == "protobuf") { -#ifdef XPCF_NAMEDINJECTIONAPPROACH - // global component holding all sub components approach with named injections: - cmpMgr->bindLocal("grpc"); -#else - cmpMgr->bindLocal(); -#endif - } - else if (options["generator"].as() != "flatbuffers") { - print_error("invalid value " + options["generator"].as() + " for generator option. See usage :"); - print_help(option_list); - return 1; - } - else { -#ifdef XPCF_NAMEDINJECTIONAPPROACH - // global component holding all sub components approach with named injections: - cmpMgr->bindLocal("grpc"); -#else - cmpMgr->bindLocal(); -#endif - } - -#ifdef XPCF_NAMEDINJECTIONAPPROACH - - // every injectable is bound : able to resolve the serviceGenerator - auto serviceGenerator = cmpMgr->resolve(); -#else - // every injectable is bound : able to resolve the serviceGenerator - auto serviceGenerator = cmpMgr->resolve("service"); -#endif - if (options.count("output")) { - serviceGenerator->setGenerateMode(IRPCGenerator::GenerateMode::FILE); - serviceGenerator->setDestinationFolder(options["output"].as()); - } - - auto astParser = cmpMgr->resolve("astParser"); - - int result = astParser->initOptions(options); - if (result !=0) { - return result; - } - - cppast::cpp_entity_index idx; // the entity index is used to resolve cross references in the AST - - if (!options.count("file") || options["file"].as().empty()) { - if (options.count("database_dir") && !options["database_dir"].as().empty()) { - std::cout<<"File argument is missing : parsing every file listed in database"<parse_database(options["database_dir"].as(),options); - //parse_database(options["database_dir"].as(),idx,options, [&](const cppast::cpp_entity_index& idx, std::ostream& out, const cppast::cpp_file& file) { astParser->parseAst(idx,out,file); }); - } - else { - print_error("missing one of file or database dir argument"); - return 1; - } - } - else { - result = astParser->parse_file(options["file"].as(), options.count("fatal_errors") == 1); - if (result != 0) - return result; - } - - //update types : try to qualify non fqdn types in parameters ... from classes found during parsing - for (auto & [name,c] : astParser->getParsedInterfaces()) { - for (auto & m: c->methods()) { - for (auto & p : m->m_params) { - std::string knownType = cppast::to_string(p->getCppastType()); - std::string base = knownType.substr(0,knownType.find_first_of("::")); - auto typeFound = astParser->getClassInfo(base); - if (typeFound) { - p->setNamespace(typeFound->getMetadata().at(ClassDescriptor::MetadataType::INTERFACENAMESPACE)); - } else { - typeFound = astParser->getInterfaceInfo(base); - if (typeFound) { - p->setNamespace(typeFound->getMetadata().at(ClassDescriptor::MetadataType::INTERFACENAMESPACE)); - } - } - } - auto & r = m->returnType(); - std::string knownType = cppast::to_string(r.getCppastType()); - std::string base = knownType.substr(0,knownType.find_first_of("::")); - auto typeFound = astParser->getClassInfo(base); - if (typeFound) { - r.setNamespace(typeFound->getMetadata().at(ClassDescriptor::MetadataType::INTERFACENAMESPACE)); - } else { - typeFound = astParser->getInterfaceInfo(base); - if (typeFound) { - r.setNamespace(typeFound->getMetadata().at(ClassDescriptor::MetadataType::INTERFACENAMESPACE)); - } - } - } - } - serviceGenerator->initialize(astParser->metadata()); - for (auto & [name,c] : astParser->getParsedInterfaces()) { - // check every typedescriptor in each method of the interface is known in classes map or is a builtin type?? - // Note : we must find a message/serialized buffer for each type in each interface - astParser->metadata() = serviceGenerator->generate(c, astParser->metadata()); - astParser->metadata() = serviceGenerator->validate(c,astParser->metadata()); - } - serviceGenerator->finalize(astParser->metadata()); - } -} -catch (const cppast::libclang_error& ex) -{ - print_error(std::string("[fatal parsing error] ") + ex.what()); - return 2; -} -catch (org::bcom::xpcf::Exception e) -{ - std::cout << "Xpcf exception: " << e.what() << std::endl; -} diff --git a/tools/generators/grpc/xpcf_grpc_gen.pro b/tools/generators/grpc/xpcf_grpc_gen.pro deleted file mode 100755 index ec5f9bb..0000000 --- a/tools/generators/grpc/xpcf_grpc_gen.pro +++ /dev/null @@ -1,181 +0,0 @@ -TARGET = xpcf_grpc_gen - -LIST = "packagedependencies.txt" "xpcf_grpc_gen.cpp" "xpcf_grpc_gen.cpp" -for(file, LIST) { - !exists(file) { - message("$$TARGET - at least $${file} not present, generate it") - win32 { - system($$shell_quote($$shell_path(../../../scripts/win/update_version.bat))) - } - linux { - system(../../../scripts/unixes/update_version.sh) - } - } -} - -include(../../../version.pri) -VERSION = $${XPCF_VERSION} -message("VERSION = $${XPCF_VERSION}") - -CONFIG += c++1z -CONFIG += console -CONFIG -= qt - -DEFINES += MYVERSION=$${VERSION} -DEFINES += MYVERSIONSTRING=\\\"$${VERSION}\\\" - -#DEFINES += XPCF_NAMEDINJECTIONAPPROACH -REMAKEN_PKGSUBDIR=static - -CONFIG(debug,debug|release) { - DEFINES += _DEBUG=1 - DEFINES += DEBUG=1 - CPPAST_ROOT_BUILD=$${_PRO_FILE_PWD_}/../../../libs/build-cppast-Debug - REMAKEN_PKGSUBDIR=$${REMAKEN_PKGSUBDIR}/debug/$${TARGET}_$${VERSION} -} - -CONFIG(release,debug|release) { - DEFINES += NDEBUG=1 - CPPAST_ROOT_BUILD=$${_PRO_FILE_PWD_}/../../../libs/build-cppast-Release - REMAKEN_PKGSUBDIR=$${REMAKEN_PKGSUBDIR}/release/$${TARGET}_$${VERSION} -} - -package_remaken { - message("Preparing remaken package installation in $${REMAKEN_PKGSUBDIR}") - INSTALLSUBDIR=$${REMAKEN_PKGSUBDIR} -} - -linux { - CPPAST_ROOT_BUILD=$${CPPAST_ROOT_BUILD}/linux-gcc -} - -macx { - CPPAST_ROOT_BUILD=$${CPPAST_ROOT_BUILD}/mac-clang -} - -exists($${CPPAST_ROOT_BUILD}) { -#note : after llvm upgrade from brew, execution of the xpcf_grpc_gen can show errors such as -# [libclang] [error] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/include/xmmintrin.h:1934: use of undeclared identifier '__builtin_ia32_storehps' -# in this case, rebuild cppast and xpcf_grpc_gen - CPPAST_ROOT=$${_PRO_FILE_PWD_}/../../../libs/cppast - INCLUDEPATH += $${CPPAST_ROOT}/include - INCLUDEPATH += $${CPPAST_ROOT_BUILD}/_deps/cxxopts-src/include - INCLUDEPATH += $${CPPAST_ROOT_BUILD}/_deps/type_safe-src/include - INCLUDEPATH += $${CPPAST_ROOT_BUILD}/_deps/type_safe-src/external/debug_assert - LIBS += -L$${CPPAST_ROOT_BUILD}/src -lcppast - LIBS += -L$${CPPAST_ROOT_BUILD}/external/tpl -ltiny-process-library -} else { - error("cppast root build folder ($${CPPAST_ROOT_BUILD} doesn't exist: create cppast root build folder and build cppast prior to running qmake.$$escape_expand(\\n)To build cppast do :$$escape_expand(\\n)cd " $${_PRO_FILE_PWD_} "/../../../libs/$$escape_expand(\\n)./build_cppast.sh" ) -} -win32:CONFIG -= static -win32:CONFIG += shared -QMAKE_TARGET.arch = x86_64 #must be defined prior to include -DEPENDENCIESCONFIG = static recurse -#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib, QMAKE_TARGET.arch and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibconfig.pri inclusion -include (../../../builddefs/qmake/templateappconfig.pri) - -win32 { - # for boost static dependency (https://github.com/microsoft/vcpkg/issues/22495) - DEFINES += BOOST_USE_WINAPI_VERSION=BOOST_WINAPI_VERSION_WIN7 -} - -HEADERS += \ \ - ASTParser.h \ - AbstractGenerator.h \ - ClassDescriptor.h \ - CppHelpers.h \ - GRPCFlatBufferGenerator.h \ - GRPCMessage.h \ - MethodDescriptor.h \ - MockGenerator.h \ - ParameterDescriptor.h \ - GRPCProtoGenerator.h \ - ProjectGenerator.h \ - ProxyGenerator.h \ - RemakenPathHelper.h \ - RemoteServiceGenerator.h \ - ServerGenerator.h \ - TypeDescriptor.h \ - XmlHelpers.h \ - XpcfConfigGenerator.h \ - interfaces/IRPCGenerator.h \ - interfaces/ITypeParser.h - -SOURCES += \ - ASTParser.cpp \ - AbstractGenerator.cpp \ - ClassDescriptor.cpp \ - GRPCFlatBufferGenerator.cpp \ - GRPCMessage.cpp \ - MethodDescriptor.cpp \ - ParameterDescriptor.cpp \ - GRPCProtoGenerator.cpp \ - MockGenerator.cpp \ - ProjectGenerator.cpp \ - ProxyGenerator.cpp \ - RemakenPathHelper.cpp \ - RemoteServiceGenerator.cpp \ - ServerGenerator.cpp \ - TypeDescriptor.cpp \ - XpcfConfigGenerator.cpp \ - xpcf_grpc_gen.cpp - -linux { - LIBS += -ldl - LIBS += -L/home/linuxbrew/.linuxbrew/lib # temporary fix caused by grpc with -lre2 ... without -L in grpc.pc - QMAKE_CXXFLAGS += -fPIC -# LLVM_BINARIES = /home/linuxbrew/.linuxbrew/opt/llvm/bin - LLVM_BINARIES = /usr/bin - LLVM_LIBDIR = $$system($${LLVM_BINARIES}/llvm-config-14 --libdir) - LLVM_INCDIR = $$system($${LLVM_BINARIES}/llvm-config-14 --includedir) - LIBS += -L$${LLVM_LIBDIR} -lclang - LLVM_CLANG_LIBS = $$files($${LLVM_LIBDIR}/libclang*.a) - LIBS += $${LLVM_CLANG_LIBS} - QMAKE_LFLAGS += -L$${LLVM_LIBDIR} - QMAKE_CXXFLAGS += -std=c++17 -I$${LLVM_INCDIR} - DISTFILES += ../../../libs/build_cppast.sh -} - -macx { - QMAKE_MAC_SDK= macosx - - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.14 - # must be migrated to remaken -# cppast and xpcf_grpc_gen depends upon brew llvm installation -# XCode version update needs sometimes to upgrade brew llvm then to rebuild cppast (with the correct link toward llvm) -# cppast cmake line is : -# cmake -DCPPAST_TEMPLATE_FULLARGUMENTSPARSING=ON -DCMAKE_BUILD_TYPE=Debug -DLLVM_CONFIG_BINARY=/usr/local/opt/llvm/bin/llvm-config ../../cppast/ -# Xcode version update needs to set a link from current OS sdk towards MacOSX.sdk cf https://stackoverflow.com/questions/52509602/cant-compile-c-program-on-a-mac-after-upgrade-to-mojave - LLVM_BINARIES = /usr/local/opt/llvm/bin - LLVM_LIBDIR = $$system($${LLVM_BINARIES}/llvm-config --libdir) - LLVM_INCDIR = $$system($${LLVM_BINARIES}/llvm-config --includedir) - LIBS += -L$${LLVM_LIBDIR} -lclang - LLVM_CLANG_LIBS = $$files($${LLVM_LIBDIR}/libclang*.a) - LIBS += $${LLVM_CLANG_LIBS} - QMAKE_LFLAGS += -L$${LLVM_LIBDIR} -L/usr/local/lib - QMAKE_CXXFLAGS += -fasm-blocks -x objective-c++ -std=c++17 -I$${LLVM_INCDIR} - #QMAKE_CXXFLAGS += --coverage - #QMAKE_LFLAGS += --coverage -} - -win32 { - QMAKE_LFLAGS += /MACHINE:X64 - # DEFINES += WIN64 UNICODE _UNICODE - QMAKE_COMPILER_DEFINES += _WIN64 - - LLVM_LIBDIR = $$system(llvm-config.exe --libdir) - LLVM_INCDIR = $$system(llvm-config.exe --includedir) - LIBS += -L\"$${LLVM_LIBDIR}\" -llibclang -lShell32 - # QMAKE_LFLAGS += -L\"$${LLVM_LIBDIR}\" - QMAKE_CXXFLAGS += -I\"$${LLVM_INCDIR}\" - DEFINES += _WIN32_WINNT=0x0A00 - - # Windows Kit (msvc2013 64) - # LIBS += -L$$(WINDOWSSDKDIR)lib/winv6.3/um/x64 -lshell32 -lgdi32 -lComdlg32 - # INCLUDEPATH += $$(WINDOWSSDKDIR)lib/winv6.3/um/x64 - # DISTFILES += ../../../libs/build_cppast.bat -} - -DISTFILES += packagedependencies.txt - - diff --git a/tools/packagedependencies.txt.template b/tools/packagedependencies.txt.template deleted file mode 100644 index 1686dd4..0000000 --- a/tools/packagedependencies.txt.template +++ /dev/null @@ -1 +0,0 @@ -xpcf||xpcf|github|https://github.com/b-com-software-basis/xpcf/releases/download diff --git a/tools/xpcf_grpc_client/grpc_client_sample.xml.template b/tools/xpcf_grpc_client/grpc_client_sample.xml.template deleted file mode 100755 index 2a226c8..0000000 --- a/tools/xpcf_grpc_client/grpc_client_sample.xml.template +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tools/xpcf_grpc_client/packagedependencies.txt.template b/tools/xpcf_grpc_client/packagedependencies.txt.template deleted file mode 100644 index 42809c5..0000000 --- a/tools/xpcf_grpc_client/packagedependencies.txt.template +++ /dev/null @@ -1,2 +0,0 @@ -xpcf||xpcf%XPCF_SHARED_DEPS|github|https://github.com/b-com-software-basis/xpcf/releases/download -xpcf_static_deps||xpcf_static_deps%XPCF_STATIC_DEPS|github|https://github.com/b-com-software-basis/xpcf/releases/download diff --git a/tools/xpcf_grpc_client/xpcfGrpcSampleComponentClient.xml.template b/tools/xpcf_grpc_client/xpcfGrpcSampleComponentClient.xml.template deleted file mode 100644 index ea448c3..0000000 --- a/tools/xpcf_grpc_client/xpcfGrpcSampleComponentClient.xml.template +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tools/xpcf_grpc_client/xpcf_grpc_client.cpp b/tools/xpcf_grpc_client/xpcf_grpc_client.cpp deleted file mode 100755 index 0ba8eb5..0000000 --- a/tools/xpcf_grpc_client/xpcf_grpc_client.cpp +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (C) 2017-2019 Jonathan Müller -// This file is subject to the license terms in the LICENSE file -// found in the top-level directory of this distribution. - -#include - -#include - -#include -#include -#include "IGuitarist.h" -#include "IGuitar.h" -#include "IHuman.h" -#include "IMusician.h" - - -namespace xpcf = org::bcom::xpcf; - -// print help options -void print_help(const cxxopts::Options& options) -{ - std::cout << options.help({""}) << '\n'; -} - -// print error message -void print_error(const std::string& msg) -{ - std::cerr << msg << '\n'; -} - -int main(int argc, char* argv[]) -{ - cxxopts::Options option_list("xpcf_grpc_client", - "xpcf_grpc_client - The commandline interface to the xpcf grpc client test application.\n"); - option_list.add_options() - ("h,help", "display this help and exit") - ("v,version", "display version information and exit") - ("f,file", "xpcf grpc client configuration file", - cxxopts::value()); - - auto options = option_list.parse(argc, argv); - if (options.count("help")) - print_help(option_list); - else if (options.count("version")) - { - std::cout << "xpcf_grpc_client version MYVERSION \n"; - std::cout << '\n'; - } - else if (!options.count("file") || options["file"].as().empty()) { - print_error("missing one of file or database dir argument"); - return 1; - } - MusicScore m; - - - SRef cmpMgr = xpcf::getComponentManagerInstance(); - std::string file = options["file"].as(); - cmpMgr->load(file.c_str()); - auto guitarist = cmpMgr->resolve(); - auto guitar = cmpMgr->resolve(); - auto electricGuitar = cmpMgr->resolve(); - auto human = cmpMgr->resolve(); - auto musician = cmpMgr->resolve(); - std::cout<<"Calling playsolo on empty score"<playSolo(m); - std::cout<<"Calling playScore on empty vector"<playScore(m.m_score); - m.add("A4",0.4); - m.add("C5",0.2); - m.add("E5",0.4); - std::cout<<"Calling playsolo on score with notes"<playSolo(m); - std::cout<<"Calling playModifyScore on score with notes"<playModifyScore(m.m_score); - std::cout<<"Score after playModifyScore called"<getGuitarBrand()<getNbStrings()<getTuneType()<()) -{ - declareInterface(this); - declareProperty("server_address",m_serverAddress); - declareProperty("server_credentials",m_serverCredentials); - declareProperty("max_receive_message_size", m_receiveMessageMaxSize); - declareProperty("max_send_message_size", m_sendMessageMaxSize); - declareInjectable(m_services); -} - -GrpcServerManager::~GrpcServerManager() -{ -} - -void GrpcServerManager::unloadComponent () -{ - // provide component cleanup strategy - // default strategy is to delete self, uncomment following line in this case : - // delete this; - return; -} - -XPCFErrorCode GrpcServerManager::onConfigured() -{ - return XPCFErrorCode::_SUCCESS; -} - -void GrpcServerManager::registerService(grpc::Service * service) -{ - m_builder.RegisterService(service); -} - -void GrpcServerManager::registerService(const std::string & host, grpc::Service * service) -{ - m_builder.RegisterService(host, service); -} - -void GrpcServerManager::registerService(SRef service) -{ - registerService(service->getService()); -} - -void GrpcServerManager::registerService(const std::string &host, SRef service) -{ - registerService(host, service->getService()); -} - -void GrpcServerManager::runServer() -{ - if (m_receiveMessageMaxSize > 0) { - m_builder.SetMaxReceiveMessageSize(m_receiveMessageMaxSize); - } - - if (m_sendMessageMaxSize > 0) { - m_builder.SetMaxSendMessageSize(m_sendMessageMaxSize); - } - m_builder.AddListeningPort(m_serverAddress, GrpcHelper::getServerCredentials(static_cast(m_serverCredentials))); - for (auto service: *m_services) { - std::cout << "Registering IGrpcService # " << service->getServiceName() << std::endl; - registerService(service); - } - std::unique_ptr server(m_builder.BuildAndStart()); - std::cout << "Server listening on " << m_serverAddress << std::endl; - server->Wait(); -} - -}}} diff --git a/tools/xpcf_grpc_server/GrpcServerManager.h b/tools/xpcf_grpc_server/GrpcServerManager.h deleted file mode 100644 index 0b347bf..0000000 --- a/tools/xpcf_grpc_server/GrpcServerManager.h +++ /dev/null @@ -1,64 +0,0 @@ -/** - * @copyright Copyright (c) 2019 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2019-11-15 - */ - -#ifndef GRPCPROTOGENERATOR_H -#define GRPCPROTOGENERATOR_H -#include -#include -#include -#include -#include - -namespace org { namespace bcom { namespace xpcf { - -class GrpcServerManager : public ConfigurableBase, virtual public IGrpcServerManager -{ -public: - GrpcServerManager(); - ~GrpcServerManager() override; - void unloadComponent () override; - XPCFErrorCode onConfigured() override; - void registerService(grpc::Service * service) override; - void registerService(const std::string & host, grpc::Service * service) override; - void registerService(SRef service) override; - void registerService(const std::string & host, SRef service) override; - void runServer() override; - -private: - grpc::ServerBuilder m_builder; - std::string m_serverAddress = "0.0.0.0:50051"; - uint32_t m_serverCredentials = grpcCredentials::InsecureChannelCredentials; - int64_t m_receiveMessageMaxSize = -1; - int64_t m_sendMessageMaxSize = -1; - SRef >> m_services; -}; - -}}} - -template <> struct org::bcom::xpcf::ComponentTraits -{ - static constexpr const char * UUID = "{7FD1E545-F2F5-44A0-B30E-51B477455077}"; - static constexpr const char * NAME = "GrpcServerManager"; - static constexpr const char * DESCRIPTION = "GrpcServerManager implements IGrpcServerManager interface"; -}; - -#endif // GRPCPROTOGENERATOR_H diff --git a/tools/xpcf_grpc_server/grpc_server_sample.xml.template b/tools/xpcf_grpc_server/grpc_server_sample.xml.template deleted file mode 100644 index 2a226c8..0000000 --- a/tools/xpcf_grpc_server/grpc_server_sample.xml.template +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tools/xpcf_grpc_server/packagedependencies.txt.template b/tools/xpcf_grpc_server/packagedependencies.txt.template deleted file mode 100644 index 42809c5..0000000 --- a/tools/xpcf_grpc_server/packagedependencies.txt.template +++ /dev/null @@ -1,2 +0,0 @@ -xpcf||xpcf%XPCF_SHARED_DEPS|github|https://github.com/b-com-software-basis/xpcf/releases/download -xpcf_static_deps||xpcf_static_deps%XPCF_STATIC_DEPS|github|https://github.com/b-com-software-basis/xpcf/releases/download diff --git a/tools/xpcf_grpc_server/xpcfGrpcSampleComponentServer.xml.template b/tools/xpcf_grpc_server/xpcfGrpcSampleComponentServer.xml.template deleted file mode 100644 index 33fcd34..0000000 --- a/tools/xpcf_grpc_server/xpcfGrpcSampleComponentServer.xml.template +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tools/xpcf_grpc_server/xpcf_grpc_server.cpp b/tools/xpcf_grpc_server/xpcf_grpc_server.cpp deleted file mode 100755 index eaa30e4..0000000 --- a/tools/xpcf_grpc_server/xpcf_grpc_server.cpp +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (C) 2017-2019 Jonathan Müller -// This file is subject to the license terms in the LICENSE file -// found in the top-level directory of this distribution. - -#include - -#include - -#include -#include -#include "GrpcServerManager.h" -#include -#include -#include - -namespace fs = boost::filesystem; - -namespace xpcf = org::bcom::xpcf; - -// print help options -void print_help(const cxxopts::Options& options) -{ - std::cout << options.help({""}) << '\n'; -} - -// print error message -void print_error(const std::string& msg) -{ - std::cerr << msg << '\n'; -} - -void tryConfigureServer(SRef server, const std::string & propName, const std::string & envVarName) -{ - char * envValue = getenv(envVarName.c_str()); - if (envValue != nullptr) { - xpcf::IProperty::PropertyType type = server->bindTo()->getProperty(propName.c_str())->getType(); - switch (type) { - case xpcf::IProperty::PropertyType::IProperty_CHARSTR: - server->bindTo()->getProperty(propName.c_str())->setStringValue(envValue); - break; - - case xpcf::IProperty::PropertyType::IProperty_UINTEGER: - server->bindTo()->getProperty(propName.c_str())->setUnsignedIntegerValue(std::atoi(envValue)); - break; - - case xpcf::IProperty::PropertyType::IProperty_LONG: - server->bindTo()->getProperty(propName.c_str())->setLongValue(std::atol(envValue)); - break; - default: - std::cout<<"GrpcServerManager Property type not handled"< cmpMgr = xpcf::getComponentManagerInstance(); - cmpMgr->bindLocal(); - std::string configSrc; - fs::path currentPath(boost::filesystem::initial_path().generic_string(utf8)); - configSrc = currentPath.generic_string(utf8); - - cxxopts::Options option_list("xpcf_grpc_server", - "xpcf_grpc_server - The commandline interface to the xpcf grpc server application.\n"); - option_list.add_options() - ("h,help", "display this help and exit") - ("v,version", "display version information and exit") - ("f,file", "xpcf grpc server configuration file", - cxxopts::value()) - ("d,folder", "xpcf grpc server configuration folder (every xpcf xml file in the folder is loaded)", - cxxopts::value()); - - auto options = option_list.parse(argc, argv); - if (options.count("help")) - print_help(option_list); - else if (options.count("version")) - { - std::cout << "xpcf_grpc_server version MYVERSION \n"; - std::cout << '\n'; - } - else if ((!options.count("file") || options["file"].as().empty()) - && (!options.count("folder") || options["folder"].as().empty())) { - print_error("missing one of file or folder argument, using " + configSrc + " folder as default"); - cmpMgr->load(configSrc.c_str(),false); - } - - if (options.count("file") && !options["file"].as().empty()) { - configSrc = options["file"].as(); - cmpMgr->load(configSrc.c_str()); - } - if (options.count("folder") && !options["folder"].as().empty()) { - configSrc = options["folder"].as(); - cmpMgr->load(configSrc.c_str(),false); - } - auto serverMgr = cmpMgr->resolve(); - tryConfigureServer(serverMgr, "server_address", "XPCF_GRPC_SERVER_URL"); - tryConfigureServer(serverMgr, "server_credentials", "XPCF_GRPC_CREDENTIALS"); - tryConfigureServer(serverMgr, "max_receive_message_size", "XPCF_GRPC_MAX_RECV_MSG_SIZE"); - tryConfigureServer(serverMgr, "max_send_message_size", "XPCF_GRPC_MAX_SEND_MSG_SIZE"); - - std::cout<<"xpcf_grpc_server listens on: "<bindTo()->getProperty("server_address")->getStringValue()<runServer(); - return 0; -} diff --git a/tools/xpcf_grpc_server/xpcf_grpc_server.pri b/tools/xpcf_grpc_server/xpcf_grpc_server.pri deleted file mode 100755 index c90fc12..0000000 --- a/tools/xpcf_grpc_server/xpcf_grpc_server.pri +++ /dev/null @@ -1,108 +0,0 @@ -LIST = "packagedependencies.txt" "grpc_server_sample.xml" "xpcfGrpcSampleComponentServer.xml" -for(file, LIST) { - !exists(file) { - message("$$TARGET - at least $${file} not present, generate it") - win32 { - system(../../scripts/win/update_version.bat) - } - linux { - system(../../scripts/unixes/update_version.sh) - } - } -} - -! exists(../../version.pri) { - win32 { - system(scripts/win/update_version.bat -t ../../version.pri) - } - linux { - system(scripts/unixes/update_version.sh -t ../../version.pri) - } - system(cd $${currentPath}) -} -include(../../version.pri) -VERSION=$${XPCF_VERSION} - -CONFIG += c++1z -CONFIG += console -CONFIG -= qt - -DEFINES += MYVERSION=$${VERSION} -DEFINES += WITHREMOTING - -CONFIG(debug,debug|release) { - DEFINES += _DEBUG=1 - DEFINES += DEBUG=1 - CPPAST_ROOT_BUILD=$${_PRO_FILE_PWD_}/../../libs/build-cppast-Debug -} - -CONFIG(release,debug|release) { - DEFINES += NDEBUG=1 - CPPAST_ROOT_BUILD=$${_PRO_FILE_PWD_}/../../libs/build-cppast-Release -} - -linux { - CPPAST_ROOT_BUILD=$${CPPAST_ROOT_BUILD}/linux-gcc -} - -macx { - CPPAST_ROOT_BUILD=$${CPPAST_ROOT_BUILD}/mac-clang -} - -win32:CONFIG -= static -win32:CONFIG += shared -QMAKE_TARGET.arch = x86_64 #must be defined prior to include -DEPENDENCIESCONFIG = shared install_recurse -#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib, QMAKE_TARGET.arch and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibconfig.pri inclusion -include (../../builddefs/qmake/templateappconfig.pri) - -HEADERS += \ - GrpcServerManager.h - - -SOURCES += \ - GrpcServerManager.cpp\ - xpcf_grpc_server.cpp - - -linux { - LIBS += -ldl - LIBS += -L/home/linuxbrew/.linuxbrew/lib # temporary fix caused by grpc with -lre2 ... without -L in grpc.pc -} - - -macx { - DEFINES += _MACOS_TARGET_ - QMAKE_MAC_SDK= macosx - QMAKE_CFLAGS += -mmacosx-version-min=10.7 #-x objective-c++ - QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -std=c++17 -fPIC#-x objective-c++ - QMAKE_LFLAGS += -mmacosx-version-min=10.7 -v -lstdc++ - LIBS += -lstdc++ -lc -lpthread - LIBS += -L/usr/local/lib -} - -win32 { - QMAKE_LFLAGS += /MACHINE:X64 - DEFINES += WIN64 UNICODE _UNICODE - QMAKE_COMPILER_DEFINES += _WIN64 - - # Windows Kit (msvc2013 64) - LIBS += -L$$(WINDOWSSDKDIR)lib/winv6.3/um/x64 -lshell32 -lgdi32 -lComdlg32 - INCLUDEPATH += $$(WINDOWSSDKDIR)lib/winv6.3/um/x64 -} - -INCLUDEPATH += $${CPPAST_ROOT_BUILD}/_deps/cxxopts-src/include - -DISTFILES += \ - grpc_server_sample.xml \ - packagedependencies.txt \ - xpcfGrpcSampleComponentServer.xml - -xml_files.path = $${PROJECTDEPLOYDIR} -xml_files.files = xpcfGrpcSampleComponentServer.xml - -xpcf_grpc_xml_files.path = $${USERHOMEFOLDER}/.xpcf/grpc -xpcf_grpc_xml_files.files = xpcfGrpcSampleComponentServer.xml - -INSTALLS += xml_files xpcf_grpc_xml_files - diff --git a/tools/xpcf_grpc_server/xpcf_grpc_server.pro b/tools/xpcf_grpc_server/xpcf_grpc_server.pro deleted file mode 100755 index 57e8c25..0000000 --- a/tools/xpcf_grpc_server/xpcf_grpc_server.pro +++ /dev/null @@ -1,5 +0,0 @@ -TARGET = xpcf_grpc_server - -DEFINES += XPCF_SHARED_DEPS - -include(xpcf_grpc_server.pri) \ No newline at end of file diff --git a/tools/xpcf_grpc_server/xpcf_grpc_server_static_deps.pro b/tools/xpcf_grpc_server/xpcf_grpc_server_static_deps.pro deleted file mode 100644 index c5aa248..0000000 --- a/tools/xpcf_grpc_server/xpcf_grpc_server_static_deps.pro +++ /dev/null @@ -1,6 +0,0 @@ -TARGET = xpcf_grpc_server_static_deps - -DEFINES += XPCF_STATIC_DEPS -DEFINES += XPCF_USE_BOOST - -include(xpcf_grpc_server.pri) \ No newline at end of file diff --git a/tutorial/ComponentTemplate.cpp b/tutorial/ComponentTemplate.cpp index a66dc20..87d07c1 100644 --- a/tutorial/ComponentTemplate.cpp +++ b/tutorial/ComponentTemplate.cpp @@ -25,21 +25,14 @@ XPCF_DEFINE_FACTORY_CREATE_INSTANCE(client::ComponentTemplate); namespace client { -ComponentTemplate::ComponentTemplate ():ComponentBase(xpcf::toMap()) +ComponentTemplate::ComponentTemplate () { - addInterface(this); + setUUID(ComponentTemplate::UUID); + addInterface(this,ITemplateInterface::UUID, "interface ITemplateInterface"); } ComponentTemplate::~ComponentTemplate () { } -void ComponentTemplate::unloadComponent () -{ - std::cout< struct InterfaceTraits -{ - // a new UUID for each new interface must be set using uuidgen - static constexpr const char * UUID = "AC4D2F09-0DF1-412E-874D-9245718F4753"; - static constexpr const char * DESCRIPTION = "client::ITemplateInterface interface"; }; } #endif diff --git a/tutorial/remaken-xpcfComponentTemplate.pc.in b/tutorial/bcom-xpcfComponentTemplate.pc.in similarity index 100% rename from tutorial/remaken-xpcfComponentTemplate.pc.in rename to tutorial/bcom-xpcfComponentTemplate.pc.in diff --git a/tutorial/container_main.cpp b/tutorial/container_main.cpp new file mode 100644 index 0000000..d9385cd --- /dev/null +++ b/tutorial/container_main.cpp @@ -0,0 +1,46 @@ +/** + * @copyright Copyright (c) 2015 All Right Reserved, B-com http://www.b-com.com/ + * + * This file is subject to the B<>Com License. + * All other rights reserved. + * + * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY + * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A + * PARTICULAR PURPOSE. + * + * @author Loïc Touraine + * + * @file + * @brief description of file + * @date 2015-09-18 + */ + +#include "ComponentTemplate.h" + +#include "ComponentBase.h" +#include "ContainerFactory.h" +#include + +namespace xpcf=org::bcom::xpcf; + +XPCF_DECLARE_CONTAINER("3F975C08-3AD1-4361-8B7B-214C17F19DE9","TemplateContainer") + +extern "C" XPCF_EXPORT_API void XPCF_getComponent(const boost::uuids::uuid& componentUUID,SRef& interfaceRef) +{ + boost::uuids::uuid uuidOf_XPCF_CID_ComponentTemplate = xpcf::toUUID( client::ComponentTemplate::UUID ); + // Test the UUID to be sure that this library implements this component. + if (componentUUID == uuidOf_XPCF_CID_ComponentTemplate ) + { + xpcf::ComponentFactory::createComponent(interfaceRef); + } + /*else if (aClsid == uuidOf_XPCF_CID_OtherComponent ) + { + xpcf::ComponentFactory::createComponent(interfaceRef); + }*/ + +} + +XPCF_BEGIN_COMPONENTS_DECLARATION +XPCF_ADD_COMPONENT(client::ComponentTemplate::UUID,"Component Template") +XPCF_END_COMPONENTS_DECLARATION diff --git a/tutorial/module_main.cpp b/tutorial/module_main.cpp deleted file mode 100644 index 99ff9ba..0000000 --- a/tutorial/module_main.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/** - * @copyright Copyright (c) 2015 All Right Reserved, B-com http://www.b-com.com/ - * - * This file is subject to the B<>Com License. - * All other rights reserved. - * - * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY - * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A - * PARTICULAR PURPOSE. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2015-09-18 - */ - -#include "ComponentTemplate.h" - -#include "xpcf/module/ModuleFactory.h" -#include - -namespace xpcf=org::bcom::xpcf; - - -/** - * Declare module. - */ -XPCF_DECLARE_MODULE("3F975C08-3AD1-4361-8B7B-214C17F19DE9","TemplateModule") - -/** - * This method is the module entry point. - * XPCF uses this method to create components available in the module. - * - * Each component exposed must be declared inside a xpcf::tryCreateComponent() call. - */ -extern "C" XPCF_MODULEHOOKS_API xpcf::XPCFErrorCode XPCF_getComponent(const xpcf::uuids::uuid& componentUUID,SRef& interfaceRef) -{ - xpcf::XPCFErrorCode errCode = xpcf::XPCFErrorCode::_FAIL; - errCode = xpcf::tryCreateComponent(componentUUID,interfaceRef); - if (errCode != xpcf::XPCFErrorCode::_SUCCESS) { - // create other component if needed - } - return errCode; -} - -/** - * The declarations below populate list of the components available in the module (it represents the module index). - * XPCF uses this index to introspect the components available in a module, providing the ability to generate the configuration file skeleton from the code. - */ -XPCF_BEGIN_COMPONENTS_DECLARATION -XPCF_ADD_COMPONENT(client::ComponentTemplate) -XPCF_END_COMPONENTS_DECLARATION diff --git a/tutorial/module_traits.h b/tutorial/module_traits.h deleted file mode 100644 index b1c13b6..0000000 --- a/tutorial/module_traits.h +++ /dev/null @@ -1,45 +0,0 @@ -/** - * @copyright Copyright (c) 2018 B-com http://www.b-com.com/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @author Loïc Touraine - * - * @file - * @brief description of file - * @date 2018-06-25 - */ - -#ifndef MODULE_TRAITS_H -#define MODULE_TRAITS_H 1 - -#include "xpcf/component/ComponentTraits.h" - -namespace client { - class ComponentTemplate; -} - -/** - * @struct ComponentTraits instanciation - * The code below shows the instanciation of the ComponentTraits template struct for client::ComponentTemplate type. - * The syntax is the full template instanciation syntax. - * It only requires "ComponentTraits.h" inclusion. - */ - template <> struct org::bcom::xpcf::ComponentTraits - { - // a new UUID for each component must be created ! - static constexpr const char * UUID = "40F7D2F4-523E-4497-A848-9A6F17456019"; - static constexpr const char * DESCRIPTION = "client::ComponentTemplate - not configurable"; - }; - -#endif diff --git a/tutorial/packagedependencies.txt b/tutorial/packagedependencies.txt index 08ee569..05f5e2b 100644 --- a/tutorial/packagedependencies.txt +++ b/tutorial/packagedependencies.txt @@ -1,2 +1,2 @@ -xpcf|2.0.0|xpcf|bcomBuild|http://repository.b-com.com/amc-generic +xpcf|1.0.0|xpcf|bcomBuild|http://repository.b-com.com/amc-generic boost|1.64.0|boost-include|thirdParties|http://repository.b-com.com/amc-generic diff --git a/tutorial/xpcfComponentTemplate.pro b/tutorial/xpcfComponentTemplate.pro index cf945a4..c81254e 100644 --- a/tutorial/xpcfComponentTemplate.pro +++ b/tutorial/xpcfComponentTemplate.pro @@ -7,9 +7,10 @@ FRAMEWORK = $${TARGET} VERSION=1.0.0 DEFINES += MYVERSION=$${VERSION} -CONFIG += c++17 +CONFIG += c++11 CONFIG += shared +PROJECTDEPLOYDIR = $$(BCOMDEVROOT)/$${INSTALLSUBDIR}/$${FRAMEWORK}/$${VERSION} DEPENDENCIESCONFIG = sharedlib #NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibbundle.pri inclusion include (builddefs/qmake/templatelibconfig.pri) @@ -36,8 +37,8 @@ unix { macx { DEFINES += _MACOS_TARGET_ QMAKE_MAC_SDK= macosx - QMAKE_CFLAGS += -mmacosx-version-min=10.7 #-x objective-c++ - QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -std=c++17 -O3 -fPIC#-x objective-c++ + QMAKE_CFLAGS += -mmacosx-version-min=10.7 -std=c11 #-x objective-c++ + QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -std=c11 -std=c++11 -O3 -fPIC#-x objective-c++ QMAKE_LFLAGS += -mmacosx-version-min=10.7 -v -lstdc++ LIBS += -lstdc++ -lc -lpthread } diff --git a/version.pri.template b/version.pri.template deleted file mode 100644 index 7e09fa7..0000000 --- a/version.pri.template +++ /dev/null @@ -1 +0,0 @@ -XPCF_VERSION= \ No newline at end of file diff --git a/wizards/qtcreator/INSTALL.txt b/wizards/qtcreator/INSTALL.txt deleted file mode 100644 index 1eea688..0000000 --- a/wizards/qtcreator/INSTALL.txt +++ /dev/null @@ -1,5 +0,0 @@ -============ QT CREATOR XPCF WIZARDS INSTALLATION ================= - -To install qt creator xpcf wizards, run within the current directory : -- For unix(e)s like systems (Linux, macos ...) : ./install.sh -- For windows : install.bat diff --git a/wizards/qtcreator/classes/xpcf/component/component_thin.png b/wizards/qtcreator/classes/xpcf/component/component_thin.png deleted file mode 100755 index bb5f26b..0000000 Binary files a/wizards/qtcreator/classes/xpcf/component/component_thin.png and /dev/null differ diff --git a/wizards/qtcreator/classes/xpcf/component/component_thin.svg b/wizards/qtcreator/classes/xpcf/component/component_thin.svg deleted file mode 100755 index 0108af6..0000000 --- a/wizards/qtcreator/classes/xpcf/component/component_thin.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/wizards/qtcreator/classes/xpcf/component/componenttemplate.cpp b/wizards/qtcreator/classes/xpcf/component/componenttemplate.cpp deleted file mode 100644 index 5279714..0000000 --- a/wizards/qtcreator/classes/xpcf/component/componenttemplate.cpp +++ /dev/null @@ -1,52 +0,0 @@ -%{Cpp:LicenseTemplate}\ -#include "%{HdrFileName}" - -namespace xpcf = org::bcom::xpcf; - -template<> %{Class} * xpcf::ComponentFactory::createInstance<%{Class}>(); - -%{JS: Cpp.openNamespaces('%{Class}')} - -%{CN}::%{CN}():xpcf::%{BaseComponentClass}(xpcf::toMap<%{CN}>()) -{ - @if '%{Base}' && '%{Base}' !== 'None' - declareInterface<%{Base}>(this); - @endif - // Inject declarations come here : declare any component that must be injected to your component through its interface /////////////////////////..///// declareInjectable(m_filter); - // - // Inject declaration can have a name : - // declareInjectable(m_blurFilter, "blurFilter"); - // - // Inject declaration can be optional i.e. not finding a binding component for the interface is not an error : - // declareInjectable(m_imageFilter, false); - - @if '%{BaseComponentClass}' === 'ConfigurableBase' - // wrap any component member variable to expose as properties with declareProperty() with T matching the variable type - // For example : declareProperty("blurFactor",m_blurFactor); - // declareProperty("name",m_memberVariable) also works with template type deduction when m_memberVariable is a supported type of IProperty - @endif -} - - -%{CN}::~%{CN}() -{ - -} - -void %{CN}::unloadComponent () -{ - // provide component cleanup strategy - // default strategy is to delete self, uncomment following line in this case : - // delete this; - return; -} - -@if '%{BaseComponentClass}' === 'ConfigurableBase' -xpcf::XPCFErrorCode %{CN}::onConfigured() -{ - // Add custom onConfigured code - return xpcf::XPCFErrorCode::_SUCCESS; -} -@endif - -%{JS: Cpp.closeNamespaces('%{Class}')}\ diff --git a/wizards/qtcreator/classes/xpcf/component/componenttemplate.h b/wizards/qtcreator/classes/xpcf/component/componenttemplate.h deleted file mode 100644 index 3568340..0000000 --- a/wizards/qtcreator/classes/xpcf/component/componenttemplate.h +++ /dev/null @@ -1,46 +0,0 @@ -%{Cpp:LicenseTemplate}\ -#ifndef %{GUARD} -#define %{GUARD} -@if '%{BaseComponentClass}' === 'ConfigurableBase' -#include -@else -#include -@endif - -@if '%{Base}' && '%{Base}' !== 'None' -#include "%{JS: Cpp.classToFileName('%{Base}', '%{JS: Util.preferredSuffix('text/x-c++hdr')}')}" -@endif - -%{JS: Cpp.openNamespaces('%{Class}')} - -@if '%{Base}' && '%{Base}' !== 'None' -class %{CN} : public org::bcom::xpcf::%{BaseComponentClass}, virtual public %{Base} -@else -class %{CN}: public org::bcom::xpcf::%{BaseComponentClass} -@endif -{ -public: - %{CN}(); - ~%{CN}() override; - void unloadComponent () override; - - @if '%{BaseComponentClass}' === 'ConfigurableBase' - org::bcom::xpcf::XPCFErrorCode onConfigured() override; - @endif -}; - - -%{JS: Cpp.closeNamespaces('%{Class}')} - -template <> struct org::bcom::xpcf::ComponentTraits<%{Class}> -{ - static constexpr const char * UUID = "%{UUID}"; - static constexpr const char * NAME = "%{CN}"; - @if '%{Base}' - static constexpr const char * DESCRIPTION = "%{CN} implements %{Base} interface"; - @else - static constexpr const char * DESCRIPTION = "%{CN} component description"; - @endif -}; - -#endif // %{GUARD}\ diff --git a/wizards/qtcreator/classes/xpcf/component/wizard.json b/wizards/qtcreator/classes/xpcf/component/wizard.json deleted file mode 100644 index 7d0042c..0000000 --- a/wizards/qtcreator/classes/xpcf/component/wizard.json +++ /dev/null @@ -1,145 +0,0 @@ -{ - "version": 1, - "supportedProjectTypes": [ ], - "id": "A.XPCFComponent", - "category": "O.XPCF", - "trDescription": "Creates a C++ XPCF component.", - "trDisplayName": "XPCF Component Class", - "trDisplayCategory": "XPCF", - "icon": "component_thin.png", - "enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0}", - - "options": - [ - { "key": "TargetPath", "value": "%{Path}" }, - { "key": "HdrPath", "value": "%{Path}/%{HdrFileName}" }, - { "key": "SrcPath", "value": "%{Path}/%{SrcFileName}" }, - { "key": "CN", "value": "%{JS: Cpp.className('%{Class}')}" }, - { "key": "Base", "value": "%{JS: ( '%{BaseCB}' === '' ) ? '%{BaseEdit}' : '%{BaseCB}'}" }, - { "key": "isQObject", "value": "%{JS: [ 'QObject', 'QWidget', 'QMainWindow', 'QDeclarativeItem', 'QQuickItem'].indexOf('%{Base}') >= 0 }" }, - { "key": "GUARD", "value": "%{JS: Cpp.headerGuard('%{HdrFileName}')}" }, - { "key": "BaseComponentClass", "value": "%{BaseComponentClassCB}" }, - { "key": "ModuleName", "value": "%{ProjectName}"}, - { "key": "ComponentUUID","value": "%{componentUUIDEdit}" } - ], - - "pages": - [ - { - "trDisplayName": "Define Class", - "trShortTitle": "Details", - "typeId": "Fields", - "data" : - [ - { - "name": "Class", - "trDisplayName": "Class name:", - "mandatory": true, - "type": "LineEdit", - "data": { "validator": "(?:(?:[a-zA-Z_][a-zA-Z_0-9]*::)*[a-zA-Z_][a-zA-Z_0-9]*|)" } - }, - { - "name": "BaseCB", - "trDisplayName": "Base class:", - "type": "ComboBox", - "data": - { - "items": [ { "trKey": "", "value": "None" }, { "trKey": "", "value": "" } ] - } - }, - { - "name": "BaseEdit", - "type": "LineEdit", - "enabled": "%{JS: '%{BaseCB}' === ''}", - "mandatory": false, - "data": - { - "trText": "", - "trDisabledText": "%{BaseCB}" - } - }, - - { - "name": "Sp1", - "type": "Spacer", - "data": { "factor": 2 } - }, - { - "name": "BaseComponentClassCB", - "trDisplayName": "Configurable component ?", - "type": "CheckBox", - "data": - { - "checkedValue": "ConfigurableBase", - "uncheckedValue": "ComponentBase", - "checked": false - } - }, - { - "name": "Sp2", - "type": "Spacer" - }, - - { - "name": "HdrFileName", - "type": "LineEdit", - "trDisplayName": "Header file:", - "mandatory": true, - "data": { "trText": "%{JS: Util.fileName('%{Class}', '%{JS: Util.preferredSuffix('text/x-c++hdr')}')}" } - }, - { - "name": "SrcFileName", - "type": "LineEdit", - "trDisplayName": "Source file:", - "mandatory": true, - "data": { "trText": "%{JS: Util.fileName('%{Class}', '%{JS: Util.preferredSuffix('text/x-c++src')}')}" } - }, - { - "name": "Path", - "type": "PathChooser", - "trDisplayName": "Path:", - "mandatory": true, - "data": - { - "kind": "existingDirectory", - "basePath": "%{InitialPath}", - "path": "%{InitialPath}" - } - } - ] - }, - { - "trDisplayName": "Project Management", - "trShortTitle": "Summary", - "typeId": "Summary" - } - ], - - "generators": - [ - { - "typeId": "File", - "data": - [ - { - "source": "componenttemplate.h", - "target": "%{HdrPath}", - "openInEditor": true, - "options": [ - { "key": "Cpp:License:FileName", "value": "%{HdrFileName}" }, - { "key": "Cpp:License:ClassName", "value": "%{CN}" } - ] - }, - { - "source": "componenttemplate.cpp", - "target": "%{SrcPath}", - "openInEditor": true, - "options": [ - { "key": "Cpp:License:FileName", "value": "%{SrcFileName}" }, - { "key": "Cpp:License:ClassName", "value": "%{CN}" } - ] - } - ] - } - ] -} diff --git a/wizards/qtcreator/classes/xpcf/interface/interface_blue_thin.png b/wizards/qtcreator/classes/xpcf/interface/interface_blue_thin.png deleted file mode 100755 index 45b78e6..0000000 Binary files a/wizards/qtcreator/classes/xpcf/interface/interface_blue_thin.png and /dev/null differ diff --git a/wizards/qtcreator/classes/xpcf/interface/interface_blue_thin.svg b/wizards/qtcreator/classes/xpcf/interface/interface_blue_thin.svg deleted file mode 100755 index ea4aeac..0000000 --- a/wizards/qtcreator/classes/xpcf/interface/interface_blue_thin.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/wizards/qtcreator/classes/xpcf/interface/interfacetemplate.h b/wizards/qtcreator/classes/xpcf/interface/interfacetemplate.h deleted file mode 100644 index 61673af..0000000 --- a/wizards/qtcreator/classes/xpcf/interface/interfacetemplate.h +++ /dev/null @@ -1,33 +0,0 @@ -%{Cpp:LicenseTemplate}\ -#ifndef %{GUARD} -#define %{GUARD} - - -@if '%{Base}' && '%{Base}' !== 'None' -#include "%{Base}.h" -@else -#include -@endif - -%{JS: Cpp.openNamespaces('%{Class}')} - -@if '%{Base}' && '%{Base}' !== 'None' -class %{CN} : virtual public %{Base} -@else -class %{CN}: virtual public org::bcom::xpcf::IComponentIntrospect -@endif -{ -public: - virtual ~%{CN}() override = default; -}; - -%{JS: Cpp.closeNamespaces('%{Class}')} - -template <> struct org::bcom::xpcf::InterfaceTraits<%{Class}> -{ - static constexpr const char * UUID = "%{UUID}"; - static constexpr const char * NAME = "%{CN}"; - static constexpr const char * DESCRIPTION = "%{CN} interface description"; -}; - -#endif // %{GUARD}\ diff --git a/wizards/qtcreator/classes/xpcf/interface/wizard.json b/wizards/qtcreator/classes/xpcf/interface/wizard.json deleted file mode 100644 index 821a836..0000000 --- a/wizards/qtcreator/classes/xpcf/interface/wizard.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "version": 1, - "supportedProjectTypes": [ ], - "id": "A.XPCFInterface", - "category": "O.XPCF", - "trDescription": "Creates a C++ XPCF interface.", - "trDisplayName": "XPCF Interface Class", - "trDisplayCategory": "XPCF", - "icon": "interface_blue_thin.png", - "enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0}", - - "options": - [ - { "key": "TargetPath", "value": "%{Path}" }, - { "key": "HdrPath", "value": "%{Path}/%{HdrFileName}" }, - { "key": "CN", "value": "%{JS: Cpp.className('%{Class}')}" }, - { "key": "Base", "value": "%{JS: ( '%{BaseCB}' === '' ) ? '%{BaseEdit}' : '%{BaseCB}'}" }, - { "key": "isQObject", "value": "%{JS: [ 'QObject', 'QWidget', 'QMainWindow', 'QDeclarativeItem', 'QQuickItem'].indexOf('%{Base}') >= 0 }" }, - { "key": "GUARD", "value": "%{JS: Cpp.headerGuard('%{HdrFileName}')}" }, - { "key": "InterfaceUUID","value": "%{interfaceUUIDEdit}" } - ], - - "pages": - [ - { - "trDisplayName": "Define Class", - "trShortTitle": "Details", - "typeId": "Fields", - "data" : - [ - { - "name": "Class", - "trDisplayName": "Class name:", - "mandatory": true, - "type": "LineEdit", - "data": { "validator": "(?:(?:[a-zA-Z_][a-zA-Z_0-9]*::)*[a-zA-Z_][a-zA-Z_0-9]*|)" } - }, - { - "name": "BaseCB", - "trDisplayName": "Base class:", - "type": "ComboBox", - "data": - { - "items": [ { "trKey": "", "value": "None" }, { "trKey": "", "value": "" } ] - } - }, - { - "name": "BaseEdit", - "type": "LineEdit", - "enabled": "%{JS: '%{BaseCB}' === ''}", - "mandatory": false, - "data": - { - "trText": "%{BaseCB}", - "trDisabledText": "%{BaseCB}" - } - }, - { - "name": "Sp1", - "type": "Spacer", - "data": { "factor": 2 } - }, - - - { - "name": "HdrFileName", - "type": "LineEdit", - "trDisplayName": "Header file:", - "mandatory": true, - "data": { "trText": "%{JS: Util.fileName('%{Class}', '%{JS: Util.preferredSuffix('text/x-c++hdr')}')}" } - }, - { - "name": "Path", - "type": "PathChooser", - "trDisplayName": "Path:", - "mandatory": true, - "data": - { - "kind": "existingDirectory", - "basePath": "%{InitialPath}", - "path": "%{InitialPath}" - } - } - ] - }, - { - "trDisplayName": "Project Management", - "trShortTitle": "Summary", - "typeId": "Summary" - } - ], - - "generators": - [ - { - "typeId": "File", - "data": - [ - { - "source": "interfacetemplate.h", - "target": "%{HdrPath}", - "openInEditor": true, - "options": [ - { "key": "Cpp:License:FileName", "value": "%{HdrFileName}" }, - { "key": "Cpp:License:ClassName", "value": "%{CN}" } - ] - } - ] - } - ] -} diff --git a/wizards/qtcreator/install.bat b/wizards/qtcreator/install.bat deleted file mode 100644 index ac54949..0000000 --- a/wizards/qtcreator/install.bat +++ /dev/null @@ -1,33 +0,0 @@ -@echo off -setlocal enableextensions -IF NOT EXIST %APPDATA%\QtProject\qtcreator\templates\wizards\classes ( - echo "Creating wizards folder: %APPDATA%\QtProject\qtcreator\templates\wizards\classes" - md %APPDATA%\QtProject\qtcreator\templates\wizards\classes -) -IF NOT EXIST %APPDATA%\QtProject\qtcreator\templates\wizards\projects ( - echo "Creating wizards folder: %APPDATA%\QtProject\qtcreator\templates\wizards\projects" - md %APPDATA%\QtProject\qtcreator\templates\wizards\projects -) -echo "Copying XPCF classes wizards to: %APPDATA%\QtProject\qtcreator\templates\wizards\classes\xpcf" -xcopy classes\xpcf %APPDATA%\QtProject\qtcreator\templates\wizards\classes\xpcf /s /e /i /y - -echo "Copying XPCF projects wizards to: %APPDATA%\QtProject\qtcreator\templates\wizards\projects" -xcopy projects %APPDATA%\QtProject\qtcreator\templates\wizards\projects /s /e /i /y - -IF NOT EXIST %USERPROFILE%\.remaken\rules ( - echo "WARNING : default remaken rules folder doesn't exist in %USERPROFILE%\.remaken\rules" - echo "==> Check your remaken installation" - echo "==> NOTE: XPCF module wizard will not find default remaken qmake rules, you may should to either:" - echo " - use local qmake rules inside your project folder" - echo " - reinstall remaken before using the wizard" - rem ADD URL toward remaken binary release -) -IF NOT EXIST %USERPROFILE%\.remaken\rules\qmake ( - echo "WARNING : default remaken qmake rules folder doesn't exist in %USERPROFILE%\.remaken\rules\qmake" - echo "==> Check your remaken installation" - echo "==> NOTE: XPCF module wizard will not find default remaken qmake rules, you may should to either:" - echo " - use local qmake rules inside your project folder" - echo " - reinstall remaken before using the wizard" - rem ADD URL toward remaken binary release -) -endlocal diff --git a/wizards/qtcreator/install.sh b/wizards/qtcreator/install.sh deleted file mode 100755 index f4dcb12..0000000 --- a/wizards/qtcreator/install.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -if [ ! -d "$HOME/.config/QtProject/qtcreator/templates/wizards/classes" ]; then - echo "Creating wizards folder: $HOME/.config/QtProject/qtcreator/templates/wizards/classes/" - mkdir -p $HOME/.config/QtProject/qtcreator/templates/wizards/classes/ -fi -if [ ! -d "$HOME/.config/QtProject/qtcreator/templates/wizards/projects" ]; then - echo "Creating wizards folder: $HOME/.config/QtProject/qtcreator/templates/wizards/projects/" - mkdir -p $HOME/.config/QtProject/qtcreator/templates/wizards/projects/ -fi - -echo "Copying XPCF classes wizards to: $HOME/.config/QtProject/qtcreator/templates/wizards/classes/xpcf" -cp -r classes/xpcf $HOME/.config/QtProject/qtcreator/templates/wizards/classes/ - -echo "Copying XPCF projects wizards to: $HOME/.config/QtProject/qtcreator/templates/wizards/projects/" -cp -r projects/xpcf\ module $HOME/.config/QtProject/qtcreator/templates/wizards/projects -cp -r projects/xpcf\ application $HOME/.config/QtProject/qtcreator/templates/wizards/projects - -echo "Copying REMAKEN projects wizards to: $HOME/.config/QtProject/qtcreator/templates/wizards/projects/" -cp -r projects/remaken $HOME/.config/QtProject/qtcreator/templates/wizards/projects - -if [ ! -d "$HOME/.remaken/rules/" ]; then - echo "Creating default remaken rules folder: $HOME/.remaken/rules/" - mkdir -p $HOME/.remaken/rules -fi - -if [ ! -d "$HOME/.remaken/rules/qmake" ]; then - if ! [ -x "$(which git)" ]; then - echo "WARNING : git not available and default remaken qmake rules folder doesn't exist in $HOME/.remaken/rules/qmake" - echo "==> Check your remaken installation" - echo "==> NOTE: XPCF module wizard will not find default remaken qmake rules, you may should to either:" - echo " - install git and relaunch this script" - echo " - use local qmake rules inside your project folder" - echo " - reinstall remaken before using the wizard" - # replace with apt-get/brew ?? - else - echo "Cloning default rules from github https://github.com/b-com-software-basis/builddefs-qmake to $HOME/.remaken/rules/qmake" - git clone https://github.com/b-com-software-basis/builddefs-qmake $HOME/.remaken/rules/qmake - fi -fi diff --git a/wizards/qtcreator/projects/remaken/application/CMakeLists.txt b/wizards/qtcreator/projects/remaken/application/CMakeLists.txt deleted file mode 100644 index 6393118..0000000 --- a/wizards/qtcreator/projects/remaken/application/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -project(%{ProjectName}) -add_executable(${PROJECT_NAME} "%{CppFileName}") diff --git a/wizards/qtcreator/projects/remaken/application/application.pro b/wizards/qtcreator/projects/remaken/application/application.pro deleted file mode 100644 index 2ef1fb7..0000000 --- a/wizards/qtcreator/projects/remaken/application/application.pro +++ /dev/null @@ -1,117 +0,0 @@ -QT -= core gui -CONFIG -= app_bundle qt - -TARGET = %{ApplicationName} -@if '%{ApplicationName}' === '%{PackageNameKey}' -FRAMEWORK = $${TARGET} -@else -FRAMEWORK = %{PackageNameKey} -@endif -@if '%{InstallSubDir}' -INSTALLSUBDIR = %{InstallSubDir} -@endif -VERSION=%{PackageVersionKey} -DEFINES += $${TARGET}VERSION=\\\"$${VERSION}\\\" - -CONFIG += c++1z -CONFIG += shared -CONFIG += console -CONFIG -= qt - -# Uncomment following line to add more verbose information from builddefs-qmake rules -# CONFIG += verbose -# Uncomment following line to prepare remaken package -# CONFIG += package_remaken - -## Configuration for Visual Studio to install binaries and dependencies. Work also for QT Creator by replacing QMAKE_INSTALL -@if '%{withQTVS}' && '%{withQTVS}' === 'QTVS' -CONFIG += with_qtvs -@else -# Uncomment following line to use rules with QTVS plugin mode for visual studio -# CONFIG += with_qtvs -@endif - -with_qtvs { - PROJECTCONFIG = QTVS -} - -include(findremakenrules.pri) - -@if '%{dependenciesBuildMode}' === 'shared' -DEPENDENCIESCONFIG = sharedlib -REMAKEN_PKGSUBDIR=shared -@else -DEPENDENCIESCONFIG = staticlib -REMAKEN_PKGSUBDIR=static -@endif -@if '%{recurseDependencies}' === 'recurse' && '%{dependenciesInstallMode}' !== 'install_recurse' -DEPENDENCIESCONFIG += recurse -@endif -@if '%{dependenciesInstallMode}' !== 'noinstall' -DEPENDENCIESCONFIG += %{dependenciesInstallMode} -@endif - -CONFIG(debug,debug|release) { - DEFINES += _DEBUG=1 - DEFINES += DEBUG=1 - REMAKEN_PKGSUBDIR=$${REMAKEN_PKGSUBDIR}/debug -} - -CONFIG(release,debug|release) { - DEFINES += NDEBUG=1 - REMAKEN_PKGSUBDIR=$${REMAKEN_PKGSUBDIR}/release -} - -package_remaken { - message("Preparing remaken package installation in $${REMAKEN_PKGSUBDIR}") - INSTALLSUBDIR=$${REMAKEN_PKGSUBDIR} -} - -#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibbundle.pri inclusion -include ($${QMAKE_REMAKEN_RULES_ROOT}/templateappconfig.pri) - -DEFINES += BOOST_ALL_NO_LIB -DEFINES += BOOST_ALL_DYN_LINK - -SOURCES += \ - %{CppFileName} - -unix { -} - -macx { - DEFINES += _MACOS_TARGET_ - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.14 - QMAKE_MAC_SDK= macosx - QMAKE_CFLAGS += -mmacosx-version-min=10.7 #-x objective-c++ - QMAKE_CXXFLAGS += -fasm-blocks -mmacosx-version-min=10.7 -std=c++17 -fPIC#-x objective-c++ - QMAKE_LFLAGS += -mmacosx-version-min=10.7 -v -lstdc++ - LIBS += -lstdc++ -lc -lpthread -} - -win32 { - QMAKE_LFLAGS += /MACHINE:X64 - DEFINES += WIN64 UNICODE _UNICODE - QMAKE_COMPILER_DEFINES += _WIN64 - - # Windows Kit (msvc2013 64) - LIBS += -L$$(WINDOWSSDKDIR)lib/winv6.3/um/x64 -lshell32 -lgdi32 -lComdlg32 - INCLUDEPATH += $$(WINDOWSSDKDIR)lib/winv6.3/um/x64 - } - -INCLUDEPATH += $${PWD} - -DISTFILES += \ - Makefile - -OTHER_FILES += \ - packagedependencies.txt - -with_qtvs { -#NOTE : Must be placed at the end of the .pro -@if '%{remakenRules}' === 'local' - include (builddefs/qmake/remaken_install_target.pri) -@else - include ($${QMAKE_REMAKEN_RULES_ROOT}/remaken_install_target.pri) -@endif -} \ No newline at end of file diff --git a/wizards/qtcreator/projects/remaken/application/application_icon.png b/wizards/qtcreator/projects/remaken/application/application_icon.png deleted file mode 100644 index 7bc4c2d..0000000 Binary files a/wizards/qtcreator/projects/remaken/application/application_icon.png and /dev/null differ diff --git a/wizards/qtcreator/projects/remaken/application/findremakenrules.pri b/wizards/qtcreator/projects/remaken/application/findremakenrules.pri deleted file mode 100644 index 0447288..0000000 --- a/wizards/qtcreator/projects/remaken/application/findremakenrules.pri +++ /dev/null @@ -1,43 +0,0 @@ -# Author(s) : Loic Touraine, Stephane Leduc - -android { - # unix path - USERHOMEFOLDER = $$clean_path($$(HOME)) - isEmpty(USERHOMEFOLDER) { - # windows path - USERHOMEFOLDER = $$clean_path($$(USERPROFILE)) - isEmpty(USERHOMEFOLDER) { - USERHOMEFOLDER = $$clean_path($$(HOMEDRIVE)$$(HOMEPATH)) - } - } -} - -unix:!android { - USERHOMEFOLDER = $$clean_path($$(HOME)) -} - -win32 { - USERHOMEFOLDER = $$clean_path($$(USERPROFILE)) - isEmpty(USERHOMEFOLDER) { - USERHOMEFOLDER = $$clean_path($$(HOMEDRIVE)$$(HOMEPATH)) - } -} - -exists(builddefs/qmake) { - QMAKE_REMAKEN_RULES_ROOT=builddefs/qmake -} -else { - QMAKE_REMAKEN_RULES_ROOT = $$clean_path($$(REMAKEN_RULES_ROOT)) - !isEmpty(QMAKE_REMAKEN_RULES_ROOT) { - QMAKE_REMAKEN_RULES_ROOT = $$clean_path($$(REMAKEN_RULES_ROOT)/qmake) - } - else { - QMAKE_REMAKEN_RULES_ROOT = $${USERHOMEFOLDER}/.remaken/rules/qmake - } -} - -!exists($${QMAKE_REMAKEN_RULES_ROOT}) { - error("Unable to locate remaken rules in " $${QMAKE_REMAKEN_RULES_ROOT} ". Either check your remaken installation, or provide the path to your remaken qmake root folder rules in REMAKEN_RULES_ROOT environment variable.") -} - -message("Remaken qmake build rules used : " $$QMAKE_REMAKEN_RULES_ROOT) \ No newline at end of file diff --git a/wizards/qtcreator/projects/remaken/application/main.cpp b/wizards/qtcreator/projects/remaken/application/main.cpp deleted file mode 100644 index 56adb33..0000000 --- a/wizards/qtcreator/projects/remaken/application/main.cpp +++ /dev/null @@ -1,4 +0,0 @@ -int main(int argc, char* argv[]) -{ - return 0; -} \ No newline at end of file diff --git a/wizards/qtcreator/projects/remaken/application/packagedependencies_tmpl.txt b/wizards/qtcreator/projects/remaken/application/packagedependencies_tmpl.txt deleted file mode 100644 index e69de29..0000000 diff --git a/wizards/qtcreator/projects/remaken/application/wizard.json b/wizards/qtcreator/projects/remaken/application/wizard.json deleted file mode 100644 index 6177bf6..0000000 --- a/wizards/qtcreator/projects/remaken/application/wizard.json +++ /dev/null @@ -1,229 +0,0 @@ -{ - "version": 1, - "supportedProjectTypes": [ "Qt4ProjectManager.Qt4Project" ], - "id": "R.RemakenApplication", - "category": "I.RemakenProjects", - "trDescription": "Creates a simple remaken C++ application.", - "trDisplayName": "Remaken Application template", - "trDisplayCategory": "Remaken Projects", - "icon": "application_icon.png", - "enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0 && ([ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 || [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0)}", - - "options": - [ - { "key": "ProjectFile", "value": "%{ProFile}" }, - { "key": "ProFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" }, - { "key": "ApplicationName", "value": "%{ProjectName}"}, - { "key": "PackageVersionKey", "value": "%{PackageVersion}"}, - { "key": "PackageNameKey", "value": "%{PackageName}"}, - { "key": "InstallSubDir", "value": "%{InstallSubFolder}"}, - { "key": "CppFileName", "value": "%{JS: '%{ProjectName}' + '_main.' + Util.preferredSuffix('text/x-c++src')}" }, - { "key": "withQTVS","value": "%{UseQTVS}" }, - { "key": "dependenciesBuildMode","value": "%{DepsBuildMode}" }, - { "key": "recurseDependencies","value": "%{RecursiveDeps}" }, - { "key": "dependenciesInstallMode","value": "%{InstallMode}" } - ], - - "pages": - [ - { - "trDisplayName": "Project Location", - "trShortTitle": "Location", - "typeId": "Project" - }, - { - "trDisplayName": "Define Project Details", - "trShortTitle": "Details", - "typeId": "Fields", - "data": - [ - { - "name": "ProjectPageDescription", - "type": "Label", - "span": true, - "data": - { - "trText": "Specify basic information about the build options to use for the application.", - "wordWrap": true - } - }, - { - "name": "Sp10", - "type": "Spacer" - }, - { - "name": "PackageName", - "trDisplayName": "Package name :", - "type": "LineEdit", - "mandatory": true, - "data": - { - "trText": "%{ProjectName}", - "trDisabledText": "%{ProjectName}" - } - }, - { - "name": "PackageDescription", - "type": "Label", - "span": false, - "data": - { - "trText": "-> (used to install several modules in the same package - defaults to the project name)", - "wordWrap": true - } - }, - { - "name": "Sp11", - "type": "Spacer" - }, - { - "name": "PackageVersion", - "trDisplayName": "Package version :", - "type": "LineEdit", - "mandatory": true, - "data": - { - "trText": "1.0.0", - "trDisabledText": "1.0.0" - } - }, - { - "name": "InstallSubFolder", - "trDisplayName": "Package installation sub folder :", - "type": "LineEdit", - "mandatory": false, - "data": - { - "trText": "", - "trDisabledText": "" - } - }, - { - "name": "DepsBuildMode", - "trDisplayName": "Dependencies type:", - "type": "ComboBox", - "data": - { - "index": 0, - "items": - [ - { - "trKey": "Shared libraries", - "value": "shared" - }, - { - "trKey": "Static libraries", - "value": "static" - } - ] - } - }, - { - "name": "Sp0", - "type": "Spacer" - }, - { - "name": "InstallMode", - "trDisplayName": "Dependencies installation mode:", - "type": "ComboBox", - "data": - { - "index": 0, - "items": - [ - { - "trKey": "don't install dependencies", - "value": "noinstall" - }, - { - "trKey": "install first level dependencies", - "value": "install" - }, - { - "trKey": "install recursively all dependencies", - "value": "install_recurse" - } - ] - } - }, - { - "name": "Sp1", - "type": "Spacer" - }, - { - "name": "RecursiveDeps", - "trDisplayName": "Recursively find dependencies", - "type": "CheckBox", - "data": - { - "checkedValue": "recurse", - "uncheckedValue": "norecurse", - "checked": "%{JS: value('InstallMode') === 'install_recurse' ? 'true' : 'false'}" - } - }, - { - "name": "Sp2", - "type": "Spacer" - }, - { - "name": "UseQTVS", - "trDisplayName": "Use QTVS", - "type": "CheckBox", - "data": - { - "checkedValue": "QTVS", - "uncheckedValue": "noQTVS" - } - } - ] - }, - { - "trDisplayName": "Kit Selection", - "trShortTitle": "Kits", - "typeId": "Kits", - "enabled": "%{JS: ! %{IsSubproject}}", - "data": { "projectFilePath": "%{ProjectFile}" } - }, - { - "trDisplayName": "Project Management", - "trShortTitle": "Summary", - "typeId": "Summary" - } - ], - "generators": - [ - { - "typeId": "File", - "data": - [ - { - "source": "application.pro", - "target": "%{ProFile}", - "openAsProject": true, - "condition": "%{JS: '%{BuildSystem}' === 'qmake'}" - }, - { - "source": "findremakenrules.pri", - "target": "findremakenrules.pri", - "openAsProject": false, - "condition": "%{JS: '%{BuildSystem}' === 'qmake'}" - }, - { - "source": "main.cpp", - "target": "%{CppFileName}", - "openInEditor": true - }, - { - "source": "packagedependencies_tmpl.txt", - "target": "packagedependencies.txt", - "openInEditor": true - }, - { - "source": "../git.ignore", - "target": ".gitignore", - "condition": "%{JS: ! %{IsSubproject} && '%{VersionControl}' === 'G.Git'}" - } - ] - } - ] -} diff --git a/wizards/qtcreator/projects/remaken/library/CMakeLists.txt b/wizards/qtcreator/projects/remaken/library/CMakeLists.txt deleted file mode 100644 index 6393118..0000000 --- a/wizards/qtcreator/projects/remaken/library/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -project(%{ProjectName}) -add_executable(${PROJECT_NAME} "%{CppFileName}") diff --git a/wizards/qtcreator/projects/remaken/library/findremakenrules.pri b/wizards/qtcreator/projects/remaken/library/findremakenrules.pri deleted file mode 100644 index 0447288..0000000 --- a/wizards/qtcreator/projects/remaken/library/findremakenrules.pri +++ /dev/null @@ -1,43 +0,0 @@ -# Author(s) : Loic Touraine, Stephane Leduc - -android { - # unix path - USERHOMEFOLDER = $$clean_path($$(HOME)) - isEmpty(USERHOMEFOLDER) { - # windows path - USERHOMEFOLDER = $$clean_path($$(USERPROFILE)) - isEmpty(USERHOMEFOLDER) { - USERHOMEFOLDER = $$clean_path($$(HOMEDRIVE)$$(HOMEPATH)) - } - } -} - -unix:!android { - USERHOMEFOLDER = $$clean_path($$(HOME)) -} - -win32 { - USERHOMEFOLDER = $$clean_path($$(USERPROFILE)) - isEmpty(USERHOMEFOLDER) { - USERHOMEFOLDER = $$clean_path($$(HOMEDRIVE)$$(HOMEPATH)) - } -} - -exists(builddefs/qmake) { - QMAKE_REMAKEN_RULES_ROOT=builddefs/qmake -} -else { - QMAKE_REMAKEN_RULES_ROOT = $$clean_path($$(REMAKEN_RULES_ROOT)) - !isEmpty(QMAKE_REMAKEN_RULES_ROOT) { - QMAKE_REMAKEN_RULES_ROOT = $$clean_path($$(REMAKEN_RULES_ROOT)/qmake) - } - else { - QMAKE_REMAKEN_RULES_ROOT = $${USERHOMEFOLDER}/.remaken/rules/qmake - } -} - -!exists($${QMAKE_REMAKEN_RULES_ROOT}) { - error("Unable to locate remaken rules in " $${QMAKE_REMAKEN_RULES_ROOT} ". Either check your remaken installation, or provide the path to your remaken qmake root folder rules in REMAKEN_RULES_ROOT environment variable.") -} - -message("Remaken qmake build rules used : " $$QMAKE_REMAKEN_RULES_ROOT) \ No newline at end of file diff --git a/wizards/qtcreator/projects/remaken/library/git.ignore b/wizards/qtcreator/projects/remaken/library/git.ignore deleted file mode 100644 index 259148f..0000000 --- a/wizards/qtcreator/projects/remaken/library/git.ignore +++ /dev/null @@ -1,32 +0,0 @@ -# Prerequisites -*.d - -# Compiled Object files -*.slo -*.lo -*.o -*.obj - -# Precompiled Headers -*.gch -*.pch - -# Compiled Dynamic libraries -*.so -*.dylib -*.dll - -# Fortran module files -*.mod -*.smod - -# Compiled Static libraries -*.lai -*.la -*.a -*.lib - -# Executables -*.exe -*.out -*.app diff --git a/wizards/qtcreator/projects/remaken/library/library.pro b/wizards/qtcreator/projects/remaken/library/library.pro deleted file mode 100644 index 12212f6..0000000 --- a/wizards/qtcreator/projects/remaken/library/library.pro +++ /dev/null @@ -1,126 +0,0 @@ -QT -= core gui -CONFIG -= app_bundle qt - -TARGET = %{LibraryName} -@if '%{LibraryName}' === '%{PackageNameKey}' -FRAMEWORK = $${TARGET} -@else -FRAMEWORK = %{PackageNameKey} -@endif -@if '%{InstallSubDir}' -INSTALLSUBDIR = %{InstallSubDir} -@endif -VERSION=%{PackageVersionKey} -DEFINES += $${TARGET}VERSION=\\\"$${VERSION}\\\" - -CONFIG += c++1z -# Uncomment following line to add more verbose information from builddefs-qmake rules -# CONFIG += verbose -# Uncomment following line to prepare remaken package -# CONFIG += package_remaken - -## Configuration for Visual Studio to install binaries and dependencies. Work also for QT Creator by replacing QMAKE_INSTALL -@if '%{withQTVS}' && '%{withQTVS}' === 'QTVS' -CONFIG += with_qtvs -@else -# Uncomment following line to use rules with QTVS plugin mode for visual studio -# CONFIG += with_qtvs -@endif - -with_qtvs { - PROJECTCONFIG = QTVS -} - -include(findremakenrules.pri) - -@if '%{libraryBuildMode}' === 'static' -CONFIG += staticlib -@endif - -!staticlib { - CONFIG += shared - REMAKEN_PKGSUBDIR=shared -} else { - CONFIG -= shared - REMAKEN_PKGSUBDIR=static -} - -CONFIG(debug,debug|release) { - DEFINES += _DEBUG=1 - DEFINES += DEBUG=1 - REMAKEN_PKGSUBDIR=$${REMAKEN_PKGSUBDIR}/debug -} - -CONFIG(release,debug|release) { - DEFINES += NDEBUG=1 - REMAKEN_PKGSUBDIR=$${REMAKEN_PKGSUBDIR}/release -} - -package_remaken { - message("Preparing remaken package installation in $${REMAKEN_PKGSUBDIR}") - INSTALLSUBDIR=$${REMAKEN_PKGSUBDIR} -} - - -@if '%{dependenciesBuildMode}' === 'shared' -DEPENDENCIESCONFIG = sharedlib -@else -DEPENDENCIESCONFIG = staticlib -@endif - -@if '%{recurseDependencies}' === 'recurse' && '%{dependenciesInstallMode}' !== 'install_recurse' -DEPENDENCIESCONFIG += recurse -@endif -@if '%{dependenciesInstallMode}' !== 'noinstall' -DEPENDENCIESCONFIG += %{dependenciesInstallMode} -@endif - -#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibbundle.pri inclusion -include ($${QMAKE_REMAKEN_RULES_ROOT}/templatelibconfig.pri) - - -DEFINES += BOOST_ALL_NO_LIB -DEFINES += BOOST_ALL_DYN_LINK - -SOURCES += \ - - -HEADERS += \ - %{LibraryName}API.h -unix { -} - -macx { - DEFINES += _MACOS_TARGET_ - QMAKE_MAC_SDK= macosx - QMAKE_CFLAGS += -mmacosx-version-min=10.7 #-x objective-c++ - QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -std=c++17 -fPIC#-x objective-c++ - QMAKE_LFLAGS += -mmacosx-version-min=10.7 -v -lstdc++ - LIBS += -lstdc++ -lc -lpthread -} - -win32 { - DEFINES += _X86_VC12_TARGET_ - DEFINES += MBCS _MBCS - } - -INCLUDEPATH += $${PWD} - -header_files.path = $${PROJECTDEPLOYDIR}/interfaces/ -header_files.files = $$files($${PWD}/*.h) - -INSTALLS += header_files -DISTFILES += \ - Makefile - -OTHER_FILES += \ - packagedependencies.txt - -with_qtvs { -#NOTE : Must be placed at the end of the .pro -@if '%{remakenRules}' === 'local' - include (builddefs/qmake/remaken_install_target.pri) -@else - include ($${QMAKE_REMAKEN_RULES_ROOT}/remaken_install_target.pri) -@endif -} \ No newline at end of file diff --git a/wizards/qtcreator/projects/remaken/library/library_API.h b/wizards/qtcreator/projects/remaken/library/library_API.h deleted file mode 100644 index 301b8ad..0000000 --- a/wizards/qtcreator/projects/remaken/library/library_API.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef %{LibraryName}API_H -#define %{LibraryName}API_H - -#if _WIN32 -#ifdef %{LibraryName}_API_DLLEXPORT -#define %{LibraryName}_EXPORT_API __declspec(dllexport) -#else -#define %{LibraryName}_EXPORT_API __declspec(dllimport) -#endif -#else //!_WIN32 -#define %{LibraryName}_EXPORT_API -#endif //!_WIN32 - -#endif diff --git a/wizards/qtcreator/projects/remaken/library/library_icon.png b/wizards/qtcreator/projects/remaken/library/library_icon.png deleted file mode 100644 index d795fe8..0000000 Binary files a/wizards/qtcreator/projects/remaken/library/library_icon.png and /dev/null differ diff --git a/wizards/qtcreator/projects/remaken/library/library_icon.svg b/wizards/qtcreator/projects/remaken/library/library_icon.svg deleted file mode 100644 index afec6e7..0000000 --- a/wizards/qtcreator/projects/remaken/library/library_icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/wizards/qtcreator/projects/remaken/library/packagedependencies_tmpl.txt b/wizards/qtcreator/projects/remaken/library/packagedependencies_tmpl.txt deleted file mode 100644 index e69de29..0000000 diff --git a/wizards/qtcreator/projects/remaken/library/remaken-library.pc.in b/wizards/qtcreator/projects/remaken/library/remaken-library.pc.in deleted file mode 100644 index 583761d..0000000 --- a/wizards/qtcreator/projects/remaken/library/remaken-library.pc.in +++ /dev/null @@ -1,13 +0,0 @@ -libname=@TARGET@ -prefix=/usr/local -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${prefix}/interfaces - -Name: @TARGET@ -Description: -Version: @VERSION@ -Requires: -Libs: -L${libdir} -l${libname} -Libs.private: ${libdir}/${pfx}${libname}.${lext} -Cflags: -I${includedir} diff --git a/wizards/qtcreator/projects/remaken/library/wizard.json b/wizards/qtcreator/projects/remaken/library/wizard.json deleted file mode 100644 index ccd5b3c..0000000 --- a/wizards/qtcreator/projects/remaken/library/wizard.json +++ /dev/null @@ -1,256 +0,0 @@ -{ - "version": 1, - "supportedProjectTypes": [ "Qt4ProjectManager.Qt4Project" ], - "id": "R.RemakenLibrary", - "category": "I.RemakenProjects", - "trDescription": "Creates a simple remaken C++ template library.", - "trDisplayName": "Remaken Library template", - "trDisplayCategory": "Remaken Projects", - "icon": "library_icon.png", - "enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0 && ([ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 || [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0)}", - - "options": - [ - { "key": "ProjectFile", "value": "%{ProFile}" }, - { "key": "ProFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" }, - { "key": "LibraryName", "value": "%{ProjectName}"}, - { "key": "PackageNameKey", "value": "%{PackageName}"}, - { "key": "PackageVersionKey", "value": "%{PackageVersion}"}, - { "key": "InstallSubDir", "value": "%{InstallSubFolder}"}, - { "key": "withQTVS","value": "%{UseQTVS}" }, - { "key": "libraryBuildMode","value": "%{BuildMode}" }, - { "key": "dependenciesBuildMode","value": "%{DepsBuildMode}" }, - { "key": "recurseDependencies","value": "%{RecursiveDeps}" }, - { "key": "dependenciesInstallMode","value": "%{InstallMode}" } - ], - - "pages": - [ - { - "trDisplayName": "Project Location", - "trShortTitle": "Location", - "typeId": "Project" - }, - { - "trDisplayName": "Define Project Details", - "trShortTitle": "Details", - "typeId": "Fields", - "data": - [ - { - "name": "ProjectPageDescription", - "type": "Label", - "span": true, - "data": - { - "trText": "Specify basic information about the build options to use for the XPCF module.", - "wordWrap": true - } - }, - { - "name": "Sp1", - "type": "Spacer" - }, - { - "name": "PackageName", - "trDisplayName": "Package name :", - "type": "LineEdit", - "mandatory": true, - "data": - { - "trText": "%{ProjectName}", - "trDisabledText": "%{ProjectName}" - } - }, - { - "name": "PackageDescription", - "type": "Label", - "span": false, - "data": - { - "trText": "-> (used to install several modules in the same package - defaults to the project name)", - "wordWrap": true - } - }, - { - "name": "Sp2", - "type": "Spacer" - }, - { - "name": "PackageVersion", - "trDisplayName": "Package version :", - "type": "LineEdit", - "mandatory": true, - "data": - { - "trText": "1.0.0", - "trDisabledText": "1.0.0" - } - }, - - { - "name": "InstallSubFolder", - "trDisplayName": "Package installation sub folder :", - "type": "LineEdit", - "mandatory": false, - "data": - { - "trText": "", - "trDisabledText": "" - } - }, - { - "name": "BuildMode", - "trDisplayName": "Target type:", - "type": "ComboBox", - "data": - { - "index": 0, - "items": - [ - { - "trKey": "Shared Library", - "value": "shared" - }, - { - "trKey": "Statically Linked Library", - "value": "static" - } - ] - } - }, - { - "name": "DepsBuildMode", - "trDisplayName": "Dependencies type:", - "type": "ComboBox", - "data": - { - "index": 0, - "items": - [ - { - "trKey": "Shared libraries", - "value": "shared" - }, - { - "trKey": "Static libraries", - "value": "static" - } - ] - } - }, - { - "name": "Sp3", - "type": "Spacer" - }, - { - "name": "InstallMode", - "trDisplayName": "Dependencies installation mode:", - "type": "ComboBox", - "data": - { - "index": 0, - "items": - [ - { - "trKey": "don't install dependencies", - "value": "noinstall" - }, - { - "trKey": "install first level dependencies", - "value": "install" - }, - { - "trKey": "install recursively all dependencies", - "value": "install_recurse" - } - ] - } - }, - { - "name": "Sp4", - "type": "Spacer" - }, - { - "name": "RecursiveDeps", - "trDisplayName": "Recursively find dependencies", - "type": "CheckBox", - "data": - { - "checkedValue": "recurse", - "uncheckedValue": "norecurse", - "checked": "%{JS: value('InstallMode') === 'install_recurse' ? 'true' : 'false'}" - } - }, - { - "name": "Sp5", - "type": "Spacer" - }, - { - "name": "UseQTVS", - "trDisplayName": "Use QTVS", - "type": "CheckBox", - "data": - { - "checkedValue": "QTVS", - "uncheckedValue": "noQTVS" - } - } - ] - }, - { - "trDisplayName": "Kit Selection", - "trShortTitle": "Kits", - "typeId": "Kits", - "enabled": "%{JS: ! %{IsSubproject}}", - "data": { "projectFilePath": "%{ProjectFile}" } - }, - { - "trDisplayName": "Project Management", - "trShortTitle": "Summary", - "typeId": "Summary" - } - ], - "generators": - [ - { - "typeId": "File", - "data": - [ - { - "source": "library.pro", - "target": "%{ProFile}", - "openAsProject": true, - "condition": "%{JS: '%{BuildSystem}' === 'qmake'}" - }, - { - "source": "findremakenrules.pri", - "target": "findremakenrules.pri", - "openAsProject": false, - "condition": "%{JS: '%{BuildSystem}' === 'qmake'}" - }, - { - "source": "remaken-library.pc.in", - "target": "%{JS: 'bcom-' + '%{ProjectName}' + '.pc.in'}", - "openAsProject": false, - "condition": "%{JS: '%{BuildSystem}' === 'qmake'}" - }, - { - "source": "library_API.h", - "target": "%{LibraryName}API.h", - "openInEditor": true - }, - { - "source": "packagedependencies_tmpl.txt", - "target": "packagedependencies.txt", - "openInEditor": true - }, - { - "source": "git.ignore", - "target": ".gitignore", - "condition": "%{JS: ! %{IsSubproject} && '%{VersionControl}' === 'G.Git'}" - } - ] - } - ] -} diff --git a/wizards/qtcreator/projects/xpcf application/application_icon.png b/wizards/qtcreator/projects/xpcf application/application_icon.png deleted file mode 100644 index 7bc4c2d..0000000 Binary files a/wizards/qtcreator/projects/xpcf application/application_icon.png and /dev/null differ diff --git a/wizards/qtcreator/projects/xpcf application/application_icon.svg b/wizards/qtcreator/projects/xpcf application/application_icon.svg deleted file mode 100644 index afec6e7..0000000 --- a/wizards/qtcreator/projects/xpcf application/application_icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/wizards/qtcreator/projects/xpcf application/findremakenrules.pri b/wizards/qtcreator/projects/xpcf application/findremakenrules.pri deleted file mode 100644 index 3a13c89..0000000 --- a/wizards/qtcreator/projects/xpcf application/findremakenrules.pri +++ /dev/null @@ -1,43 +0,0 @@ -# Author(s) : Loic Touraine, Stephane Leduc - -android { - # unix path - USERHOMEFOLDER = $$clean_path($$(HOME)) - isEmpty(USERHOMEFOLDER) { - # windows path - USERHOMEFOLDER = $$clean_path($$(USERPROFILE)) - isEmpty(USERHOMEFOLDER) { - USERHOMEFOLDER = $$clean_path($$(HOMEDRIVE)$$(HOMEPATH)) - } - } -} - -unix:!android { - USERHOMEFOLDER = $$clean_path($$(HOME)) -} - -win32 { - USERHOMEFOLDER = $$clean_path($$(USERPROFILE)) - isEmpty(USERHOMEFOLDER) { - USERHOMEFOLDER = $$clean_path($$(HOMEDRIVE)$$(HOMEPATH)) - } -} - -exists(builddefs/qmake) { - QMAKE_REMAKEN_RULES_ROOT=builddefs/qmake -} -else { - QMAKE_REMAKEN_RULES_ROOT = $$clean_path($$(REMAKEN_RULES_ROOT)) - !isEmpty(QMAKE_REMAKEN_RULES_ROOT) { - QMAKE_REMAKEN_RULES_ROOT = $$clean_path($$(REMAKEN_RULES_ROOT)/qmake) - } - else { - QMAKE_REMAKEN_RULES_ROOT=$${USERHOMEFOLDER}/.remaken/rules/qmake - } -} - -!exists($${QMAKE_REMAKEN_RULES_ROOT}) { - error("Unable to locate remaken rules in " $${QMAKE_REMAKEN_RULES_ROOT} ". Either check your remaken installation, or provide the path to your remaken qmake root folder rules in REMAKEN_RULES_ROOT environment variable.") -} - -message("Remaken qmake build rules used : " $$QMAKE_REMAKEN_RULES_ROOT) \ No newline at end of file diff --git a/wizards/qtcreator/projects/xpcf application/git.ignore b/wizards/qtcreator/projects/xpcf application/git.ignore deleted file mode 100644 index 259148f..0000000 --- a/wizards/qtcreator/projects/xpcf application/git.ignore +++ /dev/null @@ -1,32 +0,0 @@ -# Prerequisites -*.d - -# Compiled Object files -*.slo -*.lo -*.o -*.obj - -# Precompiled Headers -*.gch -*.pch - -# Compiled Dynamic libraries -*.so -*.dylib -*.dll - -# Fortran module files -*.mod -*.smod - -# Compiled Static libraries -*.lai -*.la -*.a -*.lib - -# Executables -*.exe -*.out -*.app diff --git a/wizards/qtcreator/projects/xpcf application/main.cpp b/wizards/qtcreator/projects/xpcf application/main.cpp deleted file mode 100644 index bedeb52..0000000 --- a/wizards/qtcreator/projects/xpcf application/main.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include - -namespace xpcf=org::bcom::xpcf; - - -/** - * Declare module. - */ -int main(int argc, char ** argv) -{ - SRef xpcfComponentManager = xpcf::getComponentManagerInstance(); - xpcf::XPCFErrorCode err = xpcfComponentManager->load(); - /* sample component resolution - SRef component = xpcfComponentManager->resolve(); - */ - // call InterfaceType methods below - //... - return 0; -} diff --git a/wizards/qtcreator/projects/xpcf application/packagedependencies_tmpl.txt b/wizards/qtcreator/projects/xpcf application/packagedependencies_tmpl.txt deleted file mode 100644 index d6d7a22..0000000 --- a/wizards/qtcreator/projects/xpcf application/packagedependencies_tmpl.txt +++ /dev/null @@ -1 +0,0 @@ -xpcf|%{XPCFVersion}|xpcf|github|https://github.com/ diff --git a/wizards/qtcreator/projects/xpcf application/wizard.json b/wizards/qtcreator/projects/xpcf application/wizard.json deleted file mode 100644 index d68d31c..0000000 --- a/wizards/qtcreator/projects/xpcf application/wizard.json +++ /dev/null @@ -1,251 +0,0 @@ -{ - "version": 1, - "supportedProjectTypes": [ "Qt4ProjectManager.Qt4Project" ], - "id": "R.XPCFApplication", - "category": "I.XPCFProjects", - "trDescription": "Creates a simple XPCF C++ application using component and module.", - "trDisplayName": "XPCF Application template", - "trDisplayCategory": "XPCF Projects", - "icon": "application_icon.png", - "enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0 && ([ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 || [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0)}", - - "options": - [ - { "key": "ProjectFile", "value": "%{ProFile}" }, - { "key": "ProFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" }, - { "key": "ApplicationName", "value": "%{ProjectName}"}, - { "key": "PackageNameKey", "value": "%{PackageName}"}, - { "key": "PackageVersionKey", "value": "%{PackageVersion}"}, - { "key": "InstallSubDir", "value": "%{InstallSubFolder}"}, - { "key": "XPCFVersion", "value": "%{JS: Util.fileName(Util.baseName('%{XPCFVersionPath}') , Util.completeSuffix('%{XPCFVersionPath}'))}"}, - { "key": "CppFileName", "value": "%{JS: '%{ProjectName}' + '_main.' + Util.preferredSuffix('text/x-c++src')}" }, - { "key": "withQTVS","value": "%{UseQTVS}" }, - { "key": "dependenciesBuildMode","value": "%{DepsBuildMode}" }, - { "key": "recurseDependencies","value": "%{RecursiveDeps}" }, - { "key": "dependenciesInstallMode","value": "%{InstallMode}" } - ], - - "pages": - [ - { - "trDisplayName": "Project Location", - "trShortTitle": "Location", - "typeId": "Project" - }, - { - "trDisplayName": "Define Project Details", - "trShortTitle": "Details", - "typeId": "Fields", - "data": - [ - { - "name": "ProjectPageDescription", - "type": "Label", - "span": true, - "data": - { - "trText": "Specify basic information about the build options to use for the XPCF application.", - "wordWrap": true - } - }, - { - "name": "Sp10", - "type": "Spacer" - }, - { - "name": "PackageName", - "trDisplayName": "Package name :", - "type": "LineEdit", - "mandatory": true, - "data": - { - "trText": "%{ProjectName}", - "trDisabledText": "%{ProjectName}" - } - }, - { - "name": "PackageDescription", - "type": "Label", - "span": false, - "data": - { - "trText": "-> (used to install several modules in the same package - defaults to the project name)", - "wordWrap": true - } - }, - { - "name": "Sp11", - "type": "Spacer" - }, - { - "name": "PackageVersion", - "trDisplayName": "Package version :", - "type": "LineEdit", - "mandatory": true, - "data": - { - "trText": "1.0.0", - "trDisabledText": "1.0.0" - } - }, - { - "name": "InstallSubFolder", - "trDisplayName": "Package installation sub folder :", - "type": "LineEdit", - "mandatory": false, - "data": - { - "trText": "", - "trDisabledText": "" - } - }, - { - "name": "DepsBuildMode", - "trDisplayName": "Dependencies type:", - "type": "ComboBox", - "data": - { - "index": 0, - "items": - [ - { - "trKey": "Shared libraries", - "value": "shared" - }, - { - "trKey": "Static libraries", - "value": "static" - } - ] - } - }, - { - "name": "Sp0", - "type": "Spacer" - }, - { - "name": "InstallMode", - "trDisplayName": "Dependencies installation mode:", - "type": "ComboBox", - "data": - { - "index": 0, - "items": - [ - { - "trKey": "don't install dependencies", - "value": "noinstall" - }, - { - "trKey": "install first level dependencies", - "value": "install" - }, - { - "trKey": "install recursively all dependencies", - "value": "install_recurse" - } - ] - } - }, - { - "name": "Sp1", - "type": "Spacer" - }, - { - "name": "RecursiveDeps", - "trDisplayName": "Recursively find dependencies", - "type": "CheckBox", - "data": - { - "checkedValue": "recurse", - "uncheckedValue": "norecurse", - "checked": "%{JS: value('InstallMode') === 'install_recurse' ? 'true' : 'false'}" - } - }, - { - "name": "Sp2", - "type": "Spacer" - }, - { - "name": "UseQTVS", - "trDisplayName": "Use QTVS", - "type": "CheckBox", - "data": - { - "checkedValue": "QTVS", - "uncheckedValue": "noQTVS" - } - } - ] - }, - { - "trDisplayName": "Choose XPCF version", - "trShortTitle": "XPCF Version", - "typeId": "Fields", - "enabled": "%{JS: ! %{IsSubproject}}", - "data": - [ - { - "name": "XPCFVersionPath", - "trDisplayName": "XPCF version directory:", - "type": "PathChooser", - "mandatory": true, - "data": - { - "kind": "existingDirectory", - "basePath": "%{InitialPath}/.remaken/packages/", - "path": "%{InitialPath}/.remaken/packages/" - } - } - ] - }, - { - "trDisplayName": "Kit Selection", - "trShortTitle": "Kits", - "typeId": "Kits", - "enabled": "%{JS: ! %{IsSubproject}}", - "data": { "projectFilePath": "%{ProjectFile}" } - }, - { - "trDisplayName": "Project Management", - "trShortTitle": "Summary", - "typeId": "Summary" - } - ], - "generators": - [ - { - "typeId": "File", - "data": - [ - { - "source": "xpcfApplication.pro", - "target": "%{ProFile}", - "openAsProject": true, - "condition": "%{JS: '%{BuildSystem}' === 'qmake'}" - }, - { - "source": "findremakenrules.pri", - "target": "findremakenrules.pri", - "openAsProject": false, - "condition": "%{JS: '%{BuildSystem}' === 'qmake'}" - }, - { - "source": "main.cpp", - "target": "%{CppFileName}", - "openInEditor": true - }, - { - "source": "packagedependencies_tmpl.txt", - "target": "packagedependencies.txt", - "openInEditor": true - }, - { - "source": "git.ignore", - "target": ".gitignore", - "condition": "%{JS: ! %{IsSubproject} && '%{VersionControl}' === 'G.Git'}" - } - ] - } - ] -} diff --git a/wizards/qtcreator/projects/xpcf application/xpcfApplication.pro b/wizards/qtcreator/projects/xpcf application/xpcfApplication.pro deleted file mode 100644 index e0f77f3..0000000 --- a/wizards/qtcreator/projects/xpcf application/xpcfApplication.pro +++ /dev/null @@ -1,123 +0,0 @@ -QT -= core gui -CONFIG -= app_bundle qt - -TARGET = %{ApplicationName} -TARGET = %{ModuleName} -@if '%{ApplicationName}' === '%{PackageNameKey}' -FRAMEWORK = $${TARGET} -@else -FRAMEWORK = %{PackageNameKey} -@endif -@if '%{InstallSubDir}' -INSTALLSUBDIR = %{InstallSubDir} -@endif -VERSION=%{PackageVersionKey} -DEFINES += $${TARGET}VERSION=\\\"$${VERSION}\\\" - -CONFIG += c++1z -CONFIG += console -CONFIG += shared - -# Uncomment following line to add more verbose information from builddefs-qmake rules -# CONFIG += verbose -# Uncomment following line to prepare remaken package -# CONFIG += package_remaken - -@if '%{withQTVS}' && '%{withQTVS}' === 'QTVS' -CONFIG += with_qtvs -@else -# Uncomment following line to use rules with QTVS plugin mode for visual studio -# CONFIG += with_qtvs -@endif - -with_qtvs { - PROJECTCONFIG = QTVS -} - -include(findremakenrules.pri) - -@if '%{dependenciesBuildMode}' === 'shared' -DEPENDENCIESCONFIG = sharedlib -REMAKEN_PKGSUBDIR=shared -@else -DEPENDENCIESCONFIG = staticlib -REMAKEN_PKGSUBDIR=static -@endif -@if '%{recurseDependencies}' === 'recurse' && '%{dependenciesInstallMode}' !== 'install_recurse' -DEPENDENCIESCONFIG += recurse -@endif -@if '%{dependenciesInstallMode}' !== 'noinstall' -DEPENDENCIESCONFIG += %{dependenciesInstallMode} -@endif - -CONFIG(debug,debug|release) { - DEFINES += _DEBUG=1 - DEFINES += DEBUG=1 - REMAKEN_PKGSUBDIR=$${REMAKEN_PKGSUBDIR}/debug -} - -CONFIG(release,debug|release) { - DEFINES += NDEBUG=1 - REMAKEN_PKGSUBDIR=$${REMAKEN_PKGSUBDIR}/release -} - -package_remaken { - message("Preparing remaken package installation in $${REMAKEN_PKGSUBDIR}") - INSTALLSUBDIR=$${REMAKEN_PKGSUBDIR} -} - -## Configuration for Visual Studio to install binaries and dependencies. Work also for QT Creator by replacing QMAKE_INSTALL -@if '%{withQTVS}' && '%{withQTVS}' === 'QTVS' -PROJECTCONFIG = QTVS -@endif - -#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibbundle.pri inclusion -include ($${QMAKE_REMAKEN_RULES_ROOT}/templateappconfig.pri) - -#DEFINES += BOOST_ALL_NO_LIB -DEFINES += BOOST_ALL_DYN_LINK -DEFINES += BOOST_AUTO_LINK_NOMANGLE -DEFINES += BOOST_LOG_DYN_LINK - -HEADERS += \ - -SOURCES += \ - %{CppFileName} - -unix { - LIBS += -ldl - QMAKE_CXXFLAGS += -DBOOST_LOG_DYN_LINK -} - -macx { - QMAKE_MAC_SDK= macosx - QMAKE_CXXFLAGS += -fasm-blocks -x objective-c++ -} - -win32 { - QMAKE_LFLAGS += /MACHINE:X64 - DEFINES += WIN64 UNICODE _UNICODE - QMAKE_COMPILER_DEFINES += _WIN64 - QMAKE_CXXFLAGS += -wd4250 -wd4251 -wd4244 -wd4275 - - # Windows Kit (msvc2013 64) - LIBS += -L$$(WINDOWSSDKDIR)lib/winv6.3/um/x64 -lshell32 -lgdi32 -lComdlg32 - INCLUDEPATH += $$(WINDOWSSDKDIR)lib/winv6.3/um/x64 - } - -INCLUDEPATH += $${PWD} - -DISTFILES += \ - Makefile - -OTHER_FILES += \ - packagedependencies.txt - -with_qtvs { -#NOTE : Must be placed at the end of the .pro -@if '%{remakenRules}' === 'local' - include (builddefs/qmake/remaken_install_target.pri) -@else - include ($${QMAKE_REMAKEN_RULES_ROOT}/remaken_install_target.pri) -@endif -} diff --git a/wizards/qtcreator/projects/xpcf module/findremakenrules.pri b/wizards/qtcreator/projects/xpcf module/findremakenrules.pri deleted file mode 100644 index 0447288..0000000 --- a/wizards/qtcreator/projects/xpcf module/findremakenrules.pri +++ /dev/null @@ -1,43 +0,0 @@ -# Author(s) : Loic Touraine, Stephane Leduc - -android { - # unix path - USERHOMEFOLDER = $$clean_path($$(HOME)) - isEmpty(USERHOMEFOLDER) { - # windows path - USERHOMEFOLDER = $$clean_path($$(USERPROFILE)) - isEmpty(USERHOMEFOLDER) { - USERHOMEFOLDER = $$clean_path($$(HOMEDRIVE)$$(HOMEPATH)) - } - } -} - -unix:!android { - USERHOMEFOLDER = $$clean_path($$(HOME)) -} - -win32 { - USERHOMEFOLDER = $$clean_path($$(USERPROFILE)) - isEmpty(USERHOMEFOLDER) { - USERHOMEFOLDER = $$clean_path($$(HOMEDRIVE)$$(HOMEPATH)) - } -} - -exists(builddefs/qmake) { - QMAKE_REMAKEN_RULES_ROOT=builddefs/qmake -} -else { - QMAKE_REMAKEN_RULES_ROOT = $$clean_path($$(REMAKEN_RULES_ROOT)) - !isEmpty(QMAKE_REMAKEN_RULES_ROOT) { - QMAKE_REMAKEN_RULES_ROOT = $$clean_path($$(REMAKEN_RULES_ROOT)/qmake) - } - else { - QMAKE_REMAKEN_RULES_ROOT = $${USERHOMEFOLDER}/.remaken/rules/qmake - } -} - -!exists($${QMAKE_REMAKEN_RULES_ROOT}) { - error("Unable to locate remaken rules in " $${QMAKE_REMAKEN_RULES_ROOT} ". Either check your remaken installation, or provide the path to your remaken qmake root folder rules in REMAKEN_RULES_ROOT environment variable.") -} - -message("Remaken qmake build rules used : " $$QMAKE_REMAKEN_RULES_ROOT) \ No newline at end of file diff --git a/wizards/qtcreator/projects/xpcf module/git.ignore b/wizards/qtcreator/projects/xpcf module/git.ignore deleted file mode 100644 index 259148f..0000000 --- a/wizards/qtcreator/projects/xpcf module/git.ignore +++ /dev/null @@ -1,32 +0,0 @@ -# Prerequisites -*.d - -# Compiled Object files -*.slo -*.lo -*.o -*.obj - -# Precompiled Headers -*.gch -*.pch - -# Compiled Dynamic libraries -*.so -*.dylib -*.dll - -# Fortran module files -*.mod -*.smod - -# Compiled Static libraries -*.lai -*.la -*.a -*.lib - -# Executables -*.exe -*.out -*.app diff --git a/wizards/qtcreator/projects/xpcf module/module.pro b/wizards/qtcreator/projects/xpcf module/module.pro deleted file mode 100644 index 2a34d19..0000000 --- a/wizards/qtcreator/projects/xpcf module/module.pro +++ /dev/null @@ -1,126 +0,0 @@ -QT -= core gui -CONFIG -= app_bundle qt - -TARGET = %{ModuleName} -@if '%{ModuleName}' === '%{PackageNameKey}' -FRAMEWORK = $${TARGET} -@else -FRAMEWORK = %{PackageNameKey} -@endif -@if '%{InstallSubDir}' -INSTALLSUBDIR = %{InstallSubDir} -@endif -VERSION=%{PackageVersionKey} -DEFINES += $${TARGET}VERSION=\\\"$${VERSION}\\\" - -# Uncomment following line to add more verbose information from builddefs-qmake rules -# CONFIG += verbose -# Uncomment following line to prepare remaken package -# CONFIG += package_remaken - -@if '%{withQTVS}' && '%{withQTVS}' === 'QTVS' -CONFIG += with_qtvs -@else -# Uncomment following line to use rules with QTVS plugin mode for visual studio -# CONFIG += with_qtvs -@endif - -with_qtvs { - PROJECTCONFIG = QTVS -} - -CONFIG += c++1z -CONFIG += shared - -staticlib { - DEPENDENCIESCONFIG = staticlib - REMAKEN_PKGSUBDIR=static -} else { - DEPENDENCIESCONFIG = sharedlib - REMAKEN_PKGSUBDIR=shared -} - -CONFIG(debug,debug|release) { - DEFINES += _DEBUG=1 - DEFINES += DEBUG=1 - REMAKEN_PKGSUBDIR=$${REMAKEN_PKGSUBDIR}/debug -} - -CONFIG(release,debug|release) { - DEFINES += NDEBUG=1 - REMAKEN_PKGSUBDIR=$${REMAKEN_PKGSUBDIR}/release -} - -package_remaken { - message("Preparing remaken package installation in $${REMAKEN_PKGSUBDIR}") - INSTALLSUBDIR=$${REMAKEN_PKGSUBDIR} -} - -include(findremakenrules.pri) - -@if '%{dependenciesBuildMode}' === 'shared' -DEPENDENCIESCONFIG = sharedlib -@else -DEPENDENCIESCONFIG = staticlib -@endif -@if '%{recurseDependencies}' === 'recurse' && '%{dependenciesInstallMode}' !== 'install_recurse' -DEPENDENCIESCONFIG += recurse -@endif -@if '%{dependenciesInstallMode}' !== 'noinstall' -DEPENDENCIESCONFIG += %{dependenciesInstallMode} -@endif - -## Configuration for Visual Studio to install binaries and dependencies. Work also for QT Creator by replacing QMAKE_INSTALL -@if '%{withQTVS}' && '%{withQTVS}' === 'QTVS' -PROJECTCONFIG = QTVS -@endif - -#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibbundle.pri inclusion -include ($${QMAKE_REMAKEN_RULES_ROOT}/templatelibconfig.pri) - - -DEFINES += BOOST_ALL_NO_LIB -DEFINES += BOOST_ALL_DYN_LINK - -SOURCES += \ - %{CppFileName} - -HEADERS += \ - %{ModuleName}API.h -unix { -} - -macx { - DEFINES += _MACOS_TARGET_ - QMAKE_MAC_SDK= macosx - QMAKE_CFLAGS += -mmacosx-version-min=10.7 #-x objective-c++ - QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -std=c++17 -fPIC#-x objective-c++ - QMAKE_LFLAGS += -mmacosx-version-min=10.7 -v -lstdc++ - LIBS += -lstdc++ -lc -lpthread -} - -win32 { - DEFINES += _X86_VC12_TARGET_ - DEFINES += MBCS _MBCS - } - -INCLUDEPATH += $${PWD} - -header_files.path = $${PROJECTDEPLOYDIR}/interfaces/ -header_files.files = $$files($${PWD}/I*.h) - -INSTALLS += header_files -DISTFILES += \ - Makefile - -OTHER_FILES += \ - packagedependencies.txt - -with_qtvs { -#NOTE : Must be placed at the end of the .pro -@if '%{remakenRules}' === 'local' - include (builddefs/qmake/remaken_install_target.pri) -@else - include ($${QMAKE_REMAKEN_RULES_ROOT}/remaken_install_target.pri) -@endif -} diff --git a/wizards/qtcreator/projects/xpcf module/module_API.h b/wizards/qtcreator/projects/xpcf module/module_API.h deleted file mode 100644 index 462c939..0000000 --- a/wizards/qtcreator/projects/xpcf module/module_API.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef %{ModuleName}API_H -#define %{ModuleName}API_H - -#if _WIN32 -#ifdef %{ModuleName}_API_DLLEXPORT -#define %{ModuleName}_EXPORT_API __declspec(dllexport) -#else -#define %{ModuleName}_EXPORT_API __declspec(dllimport) -#endif -#else //!_WIN32 -#define %{ModuleName}_EXPORT_API -#endif //!_WIN32 - -#endif diff --git a/wizards/qtcreator/projects/xpcf module/module_icon.png b/wizards/qtcreator/projects/xpcf module/module_icon.png deleted file mode 100644 index d795fe8..0000000 Binary files a/wizards/qtcreator/projects/xpcf module/module_icon.png and /dev/null differ diff --git a/wizards/qtcreator/projects/xpcf module/module_icon.svg b/wizards/qtcreator/projects/xpcf module/module_icon.svg deleted file mode 100644 index afec6e7..0000000 --- a/wizards/qtcreator/projects/xpcf module/module_icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/wizards/qtcreator/projects/xpcf module/module_main.cpp b/wizards/qtcreator/projects/xpcf module/module_main.cpp deleted file mode 100644 index ce50898..0000000 --- a/wizards/qtcreator/projects/xpcf module/module_main.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include -#include - -namespace xpcf=org::bcom::xpcf; - -/** - * @ingroup xpcfmodule - */ -/** - * Declare module. - */ -XPCF_DECLARE_MODULE("%{UUID}","%{ModuleNamespace}","%{ModuleName} module description"); - -/** - * This method is the module entry point. - * XPCF uses this method to create components available in the module. - * - * Each component exposed must be declared inside a xpcf::tryCreateComponent() call. - */ -extern "C" XPCF_MODULEHOOKS_API xpcf::XPCFErrorCode XPCF_getComponent(const xpcf::uuids::uuid& componentUUID,SRef& interfaceRef) -{ - xpcf::XPCFErrorCode errCode = xpcf::XPCFErrorCode::_FAIL; - /* Sample code to declare components instanciation - errCode = xpcf::tryCreateComponent<%{ModuleNamespace}::componentType>(componentUUID,interfaceRef); - if (errCode != xpcf::XPCFErrorCode::_SUCCESS) { - errCode = xpcf::tryCreateComponent<%{ModuleNamespace}::otherComponentType>(componentUUID,interfaceRef); - } - */ - return errCode; -} - -/** - * The declarations below populate list of the components available in the module (it represents the module index). - * XPCF uses this index to introspect the components available in a module, providing the ability to generate the configuration file skeleton from the code. - */ -XPCF_BEGIN_COMPONENTS_DECLARATION -/* sample components declarations -XPCF_ADD_COMPONENT(%{ModuleNamespace}::componentType) -XPCF_ADD_COMPONENT(%{ModuleNamespace}::otherComponentType) -*/ -XPCF_END_COMPONENTS_DECLARATION diff --git a/wizards/qtcreator/projects/xpcf module/module_thin.png b/wizards/qtcreator/projects/xpcf module/module_thin.png deleted file mode 100755 index 33dcf64..0000000 Binary files a/wizards/qtcreator/projects/xpcf module/module_thin.png and /dev/null differ diff --git a/wizards/qtcreator/projects/xpcf module/module_thin.svg b/wizards/qtcreator/projects/xpcf module/module_thin.svg deleted file mode 100755 index a993a5e..0000000 --- a/wizards/qtcreator/projects/xpcf module/module_thin.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/wizards/qtcreator/projects/xpcf module/packagedependencies_tmpl.txt b/wizards/qtcreator/projects/xpcf module/packagedependencies_tmpl.txt deleted file mode 100644 index d6d7a22..0000000 --- a/wizards/qtcreator/projects/xpcf module/packagedependencies_tmpl.txt +++ /dev/null @@ -1 +0,0 @@ -xpcf|%{XPCFVersion}|xpcf|github|https://github.com/ diff --git a/wizards/qtcreator/projects/xpcf module/remaken-module.pc.in b/wizards/qtcreator/projects/xpcf module/remaken-module.pc.in deleted file mode 100644 index 85d11cb..0000000 --- a/wizards/qtcreator/projects/xpcf module/remaken-module.pc.in +++ /dev/null @@ -1,9 +0,0 @@ -libname=@TARGET@ -prefix=/usr/local -includedir=${prefix}/interfaces - -Name: @TARGET@ -Description: -Version: @VERSION@ -Requires: -Cflags: -I${includedir} diff --git a/wizards/qtcreator/projects/xpcf module/wizard.json b/wizards/qtcreator/projects/xpcf module/wizard.json deleted file mode 100644 index ff82027..0000000 --- a/wizards/qtcreator/projects/xpcf module/wizard.json +++ /dev/null @@ -1,283 +0,0 @@ -{ - "version": 1, - "supportedProjectTypes": [ "Qt4ProjectManager.Qt4Project" ], - "id": "R.XPCFModuleLibrary", - "category": "I.XPCFProjects", - "trDescription": "Creates a simple XPCF C++ template module.", - "trDisplayName": "XPCF Module template", - "trDisplayCategory": "XPCF Projects", - "icon": "module_thin.png", - "enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0 && ([ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 || [ %{Plugins} ].indexOf('CMakeProjectManager') >= 0)}", - - "options": - [ - { "key": "ProjectFile", "value": "%{ProFile}" }, - { "key": "ProFile", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" }, - { "key": "ModuleName", "value": "%{ProjectName}"}, - { "key": "PackageNameKey", "value": "%{PackageName}"}, - { "key": "PackageVersionKey", "value": "%{PackageVersion}"}, - { "key": "InstallSubDir", "value": "%{InstallSubFolder}"}, - { "key": "XPCFVersion", "value": "%{JS: Util.fileName(Util.baseName('%{XPCFVersionPath}') , Util.completeSuffix('%{XPCFVersionPath}'))}"}, - { "key": "ModuleNamespace","value": "%{ModuleNamespaceName}" }, - { "key": "CppFileName", "value": "%{JS: '%{ProjectName}' + '_main.' + Util.preferredSuffix('text/x-c++src')}" }, - { "key": "withQTVS","value": "%{UseQTVS}" }, - { "key": "dependenciesBuildMode","value": "%{DepsBuildMode}" }, - { "key": "recurseDependencies","value": "%{RecursiveDeps}" }, - { "key": "dependenciesInstallMode","value": "%{InstallMode}" } - ], - - "pages": - [ - { - "trDisplayName": "Project Location", - "trShortTitle": "Location", - "typeId": "Project" - }, - { - "trDisplayName": "Define Project Details", - "trShortTitle": "Details", - "typeId": "Fields", - "data": - [ - { - "name": "ProjectPageDescription", - "type": "Label", - "span": true, - "data": - { - "trText": "Specify basic information about the build options to use for the XPCF module.", - "wordWrap": true - } - }, - { - "name": "Sp10", - "type": "Spacer" - }, - { - "name": "PackageName", - "trDisplayName": "Package name :", - "type": "LineEdit", - "mandatory": true, - "data": - { - "trText": "%{ProjectName}", - "trDisabledText": "%{ProjectName}" - } - }, - { - "name": "PackageDescription", - "type": "Label", - "span": false, - "data": - { - "trText": "-> (used to install several modules in the same package - defaults to the project name)", - "wordWrap": true - } - }, - { - "name": "Sp11", - "type": "Spacer" - }, - { - "name": "PackageVersion", - "trDisplayName": "Package version :", - "type": "LineEdit", - "mandatory": true, - "data": - { - "trText": "1.0.0", - "trDisabledText": "1.0.0" - } - }, - { - "name": "InstallSubFolder", - "trDisplayName": "Package installation sub folder :", - "type": "LineEdit", - "mandatory": false, - "data": - { - "trText": "", - "trDisabledText": "" - } - }, - { - "name": "DepsBuildMode", - "trDisplayName": "Dependencies type:", - "type": "ComboBox", - "data": - { - "index": 0, - "items": - [ - { - "trKey": "Shared libraries", - "value": "shared" - }, - { - "trKey": "Static libraries", - "value": "static" - } - ] - } - }, - { - "name": "Sp0", - "type": "Spacer" - }, - { - "name": "InstallMode", - "trDisplayName": "Dependencies installation mode:", - "type": "ComboBox", - "data": - { - "index": 0, - "items": - [ - { - "trKey": "don't install dependencies", - "value": "noinstall" - }, - { - "trKey": "install first level dependencies", - "value": "install" - }, - { - "trKey": "install recursively all dependencies", - "value": "install_recurse" - } - ] - } - }, - { - "name": "Sp1", - "type": "Spacer" - }, - { - "name": "RecursiveDeps", - "trDisplayName": "Recursively find dependencies", - "type": "CheckBox", - "data": - { - "checkedValue": "recurse", - "uncheckedValue": "norecurse", - "checked": "%{JS: value('InstallMode') === 'install_recurse' ? 'true' : 'false'}" - } - }, - { - "name": "Sp2", - "type": "Spacer" - }, - { - "name": "UseQTVS", - "trDisplayName": "Use QTVS", - "type": "CheckBox", - "data": - { - "checkedValue": "QTVS", - "uncheckedValue": "noQTVS" - } - } - ] - }, - { - "trDisplayName": "Choose XPCF version", - "trShortTitle": "XPCF Version", - "typeId": "Fields", - "enabled": "%{JS: ! %{IsSubproject}}", - "data": - [ - { - "name": "XPCFVersionDescription", - "type": "Label", - "data": - { - "trText": "Provide the XPCF package version to use: select the x.y.z directory where XPCF is located (i.e. the x.y.z folder where x,y and z are numbers):", - "wordWrap": true - } - }, - { - "name": "XPCFVersionPath", - "trDisplayName": "XPCF version folder:", - "type": "PathChooser", - "mandatory": true, - "data": - { - "kind": "existingDirectory", - "basePath": "%{InitialPath}/.remaken/packages/", - "path": "%{InitialPath}/.remaken/packages/" - } - }, - { - "name": "ModuleNamespaceName", - "trDisplayName": "Module namespace:", - "type": "LineEdit", - "mandatory": true, - "data": - { - "trText": "%{ProjectName}", - "trDisabledText": "%{ProjectName}" - } - } - ] - }, - { - "trDisplayName": "Kit Selection", - "trShortTitle": "Kits", - "typeId": "Kits", - "enabled": "%{JS: ! %{IsSubproject}}", - "data": { "projectFilePath": "%{ProjectFile}" } - }, - { - "trDisplayName": "Project Management", - "trShortTitle": "Summary", - "typeId": "Summary" - } - ], - "generators": - [ - { - "typeId": "File", - "data": - [ - { - "source": "module.pro", - "target": "%{ProFile}", - "openAsProject": true, - "condition": "%{JS: '%{BuildSystem}' === 'qmake'}" - }, - { - "source": "findremakenrules.pri", - "target": "findremakenrules.pri", - "openAsProject": false, - "condition": "%{JS: '%{BuildSystem}' === 'qmake'}" - }, - { - "source": "remaken-module.pc.in", - "target": "%{JS: 'bcom-' + '%{ProjectName}' + '.pc.in'}", - "openAsProject": false, - "condition": "%{JS: '%{BuildSystem}' === 'qmake'}" - }, - { - "source": "module_main.cpp", - "target": "%{CppFileName}", - "openInEditor": true - }, - { - "source": "module_API.h", - "target": "%{ModuleName}API.h", - "openInEditor": true - }, - { - "source": "packagedependencies_tmpl.txt", - "target": "packagedependencies.txt", - "openInEditor": true - }, - { - "source": "git.ignore", - "target": ".gitignore", - "condition": "%{JS: ! %{IsSubproject} && '%{VersionControl}' === 'G.Git'}" - } - ] - } - ] -} diff --git a/xpcf-std.pro b/xpcf-std.pro deleted file mode 100644 index a8bd6eb..0000000 --- a/xpcf-std.pro +++ /dev/null @@ -1,212 +0,0 @@ -TARGET = xpcf-std - -!exists(version.pri) { - message("$$TARGET - version.pri not present, generate it") - win32 { - system(scripts/win/update_version.bat) - } - linux { - system(scripts/unixes/update_version.sh) - } -} - -include(version.pri) -QT -= core gui -CONFIG -= app_bundle qt - -FRAMEWORK = $${TARGET} -VERSION=XPCF_VERSION -DEFINES += XPCFVERSION=\\\"$${VERSION}\\\" - -CONFIG += c++1z -CONFIG += shared - -macx { - #CONFIG += use_brew_llvm - # howto setup conan to use brew llvm ? -} - -DEPENDENCIESCONFIG = staticlib -#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibbundle.pri inclusion -include (builddefs/qmake/templatelibconfig.pri) - -staticlib { - DEFINES += XPCF_STATIC -} else { - DEFINES += XPCF_SHARED - DEFINES += XPCF_SHARED_DEPS -} - -CONFIG(debug,debug|release) { -# DEFINES += XPCF_WITH_LOGS - DEFINES += "XPCFDEBUG" - DEFINES += XPCFSUBDIRSEARCH=\\\"debug\\\" -} - -CONFIG(release,debug|release) { - DEFINES += XPCFSUBDIRSEARCH=\\\"release\\\" -} - -DEFINES += BOOST_ALL_NO_LIB - -DEFINES += TIXML_USE_STL - -SOURCES += \ - src/AliasManager.cpp \ - src/Factory.cpp \ - src/InjectableMetadata.cpp \ - src/Registry.cpp \ - src/tinyxml2.cpp \ - src/tinyxmlhelper.cpp \ - src/ComponentMetadata.cpp \ - src/InterfaceMetadata.cpp \ - src/MethodMetadata.cpp \ - src/ComponentBase.cpp \ - src/ComponentManager.cpp \ - src/ModuleMetadata.cpp \ - src/PathBuilder.cpp \ - src/ModuleManager.cpp \ - src/Enumerator.cpp \ - src/Property.cpp \ - src/PropertyMap.cpp \ - src/Exception.cpp \ - src/PropertyManager.cpp \ - src/ConfigurableBase.cpp \ - src/BaseTask.cpp \ - src/BaseException.cpp - -HEADERS += \ - interfaces/swig/xpcf_api.i \ - interfaces/swig/xpcf_collection.i \ - interfaces/swig/xpcf_component.i \ - interfaces/swig/xpcf_core.i \ - interfaces/swig/xpcf_module.i \ - interfaces/swig/xpcf_properties.i \ - interfaces/swig/xpcf_threading.i \ - interfaces/swig/xpcf_traits.i \ - interfaces/xpcf/api/InjectableMetadata.h \ - interfaces/xpcf/core/helpers.h \ - interfaces/xpcf/threading/MultiConsumer.h \ - src/AliasManager.h \ - src/Factory.h \ - src/Registry.h \ - src/tinyxml2.h \ - src/tinyxmlhelper.h \ - src/ComponentManager.h \ - src/PathBuilder.h \ - src/ModuleManager.h \ - src/Enumerator.h \ - src/Collection.h \ - src/Property.h \ - src/PropertyMap.h \ - src/PropertySequenceWrapper.h \ - src/PropertyWrapper.h \ - src/PropertyManager.h \ - src/BlockEnumerator.h \ - interfaces/xpcf/core/Result.h \ - interfaces/xpcf/core/BaseException.h \ - interfaces/xpcf/core/Exception.h \ - interfaces/xpcf/core/XPCFErrorCode.h \ - interfaces/xpcf/core/refs.h \ - interfaces/xpcf/core/traits.h \ - interfaces/xpcf/core/uuid.h \ - interfaces/xpcf/api/InterfaceTraits.h \ - interfaces/xpcf/api/IComponentIntrospect.h \ - interfaces/xpcf/api/IComponentManager.h \ - interfaces/xpcf/api/IModuleManager.h \ - interfaces/xpcf/api/IConfigurable.h \ - interfaces/xpcf/api/ComponentMetadata.h \ - interfaces/xpcf/api/ModuleMetadata.h \ - interfaces/xpcf/api/InterfaceMetadata.h \ - interfaces/xpcf/api/IInjectable.h \ - interfaces/xpcf/component/ComponentBase.h \ - interfaces/xpcf/component/ComponentFactory.h \ - interfaces/xpcf/component/ComponentTraits.h \ - interfaces/xpcf/component/ConfigurableBase.h \ - interfaces/xpcf/module/IModuleIndex.h \ - interfaces/xpcf/module/ModuleFactory.h \ - interfaces/xpcf/properties/IProperty.h \ - interfaces/xpcf/properties/IPropertyMap.h \ - interfaces/xpcf/collection/IEnumerable.h \ - interfaces/xpcf/collection/IEnumerator.h \ - interfaces/xpcf/collection/ICollection.h \ - interfaces/xpcf/xpcf.h \ - interfaces/xpcf/xpcf_api_define.h \ - interfaces/xpcf/threading/BaseTask.h \ - interfaces/xpcf/threading/SharedBuffer.h \ - interfaces/xpcf/threading/SharedFifo.h \ - interfaces/xpcf/threading/ITask.h \ - interfaces/xpcf/threading/SharedCircularBuffer.h \ - interfaces/xpcf/threading/FiberFifos.h \ - interfaces/xpcf/threading/SharedLifo.h \ - interfaces/xpcf/threading/DropBuffer.h - -contains(DEFINES, "WITHREMOTING") { -SOURCES += \ - src/GrpcManager.cpp - -HEADERS += \ - src/GrpcManager.h \ - interfaces/xpcf/remoting/IGrpcServerManager.h \ - interfaces/xpcf/remoting/IGrpcService.h -} - -linux { - QMAKE_LFLAGS += -ldl -} - -macx { - DEFINES += _MACOS_TARGET_ - QMAKE_MAC_SDK= macosx - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.15 - QMAKE_CFLAGS += -mmacosx-version-min=10.14 #-x objective-c++ - QMAKE_CXXFLAGS += -mmacosx-version-min=10.14 -std=c++17 -fPIC#-x objective-c++ - QMAKE_LFLAGS += -mmacosx-version-min=10.14 -v -lstdc++ - LIBS += -lstdc++ -lc -lpthread -} - -win32 { - DEFINES += _X86_VC12_TARGET_ - DEFINES += MBCS _MBCS - } - -INCLUDEPATH += $${PWD} $${PWD}/interfaces $${PWD}/libs/stduuid/include -include(builddefs/qmake/code_analysis/remaken_code_scanner.prf) - -h_api_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/api -h_api_files.files = $$files($${PWD}/interfaces/xpcf/api/*) -h_collection_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/collection -h_collection_files.files = $$files($${PWD}/interfaces/xpcf/collection/*) -h_component_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/component -h_component_files.files = $$files($${PWD}/interfaces/xpcf/component/*) -h_core_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/core -h_core_files.files = $$files($${PWD}/interfaces/xpcf/core/*) -h_module_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/module -h_module_files.files = $$files($${PWD}/interfaces/xpcf/module/*) -h_properties_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/properties -h_properties_files.files = $$files($${PWD}/interfaces/xpcf/properties/*) -h_threading_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/threading -h_threading_files.files = $$files($${PWD}/interfaces/xpcf/threading/*) -h_xpcf_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf -h_xpcf_files.files = $${PWD}/interfaces/xpcf/xpcf.h -h_xpcf_files.files += $${PWD}/interfaces/xpcf/xpcf_api_define.h - - - -INSTALLS += h_api_files h_collection_files h_component_files h_core_files h_module_files h_properties_files h_threading_files h_xpcf_files -!contains(DEFINES, "XPCF_USE_BOOST") { - h_uuid_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/core/stduuid - h_uuid_files.files = $$files($${PWD}/libs/stduuid/include/*) - INSTALLS += h_uuid_files -} - -contains(DEFINES, "WITHREMOTING") { - h_remoting_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/remoting - h_remoting_files.files = $$files($${PWD}/interfaces/xpcf/remoting/*) - INSTALLS += h_remoting_files -} - -message("LFLAGS="$${QMAKE_LFLAGS}) -DISTFILES += \ - Makefile \ - doc/xpcf-registry-sample.xml diff --git a/xpcf.pro b/xpcf.pro old mode 100755 new mode 100644 index 589cf72..bad71e4 --- a/xpcf.pro +++ b/xpcf.pro @@ -1,270 +1,80 @@ -TARGET = xpcf - -!exists(version.pri) { - message("$$TARGET - version.pri not present, generate it") - win32 { - system(scripts/win/update_version.bat) - } - linux { - system(scripts/unixes/update_version.sh) - } -} - -include(version.pri) QT -= core gui CONFIG -= app_bundle qt +TARGET = xpcf +INSTALLSUBDIR = bcomBuild FRAMEWORK = $${TARGET} -VERSION=$${XPCF_VERSION} - -DEFINES += XPCFVERSION=\\\"$${VERSION}\\\" +VERSION=1.0.0 +DEFINES += MYVERSION=$${VERSION} -CONFIG += c++1z -#CONFIG += verbose -!staticlib { - CONFIG += shared -} else { - CONFIG -= shared -} -#message($${CONFIG}) -#CONFIG += verbose - -# Uncomment following line to prepare remaken package -#CONFIG += package_remaken - -macx { - #CONFIG += use_brew_llvm - # howto setup conan to use brew llvm ? -} +CONFIG += c++11 +CONFIG += shared -DEFINES += WITHREMOTING -DEFINES += XPCF_USE_BOOST -#DEFINES += XPCF_WITH_LOGS +PROJECTDEPLOYDIR = $$(BCOMDEVROOT)/$${INSTALLSUBDIR}/$${FRAMEWORK}/$${VERSION} +DEPENDENCIESCONFIG = sharedlib +#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibbundle.pri inclusion +include (builddefs/qmake/templatelibconfig.pri) staticlib { DEFINES += XPCF_STATIC - DEPENDENCIESCONFIG = staticlib - REMAKEN_PKGSUBDIR=static } else { DEFINES += XPCF_SHARED - DEFINES += XPCF_SHARED_DEPS - DEFINES += BOOST_ALL_DYN_LINK - DEPENDENCIESCONFIG = sharedlib - REMAKEN_PKGSUBDIR=shared -} - -CONFIG(debug,debug|release) { -# DEFINES += XPCF_WITH_LOGS - DEFINES += "XPCFDEBUG" - DEFINES += XPCFSUBDIRSEARCH=\\\"debug\\\" - REMAKEN_PKGSUBDIR=$${REMAKEN_PKGSUBDIR}/debug/$${TARGET}_$${VERSION} -} - -CONFIG(release,debug|release) { - DEFINES += XPCFSUBDIRSEARCH=\\\"release\\\" - REMAKEN_PKGSUBDIR=$${REMAKEN_PKGSUBDIR}/release/$${TARGET}_$${VERSION} } -package_remaken { - message("Preparing remaken package installation in $${REMAKEN_PKGSUBDIR}") - INSTALLSUBDIR=$${REMAKEN_PKGSUBDIR} -} - -message("CONFIG="$${CONFIG}) - -macx { - # EXPERIMENTAL : needs to use remaken configure first - # REMAKENCONFIG += use_remaken_parser -} - -#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibbundle.pri inclusion -include (builddefs/qmake/templatelibconfig.pri) - - -CONFIG(debug,debug|release) { -# DEFINES += XPCF_WITH_LOGS - DEFINES += "XPCFDEBUG" - DEFINES += XPCFSUBDIRSEARCH=\\\"debug\\\" -} - -CONFIG(release,debug|release) { - DEFINES += XPCFSUBDIRSEARCH=\\\"release\\\" -} - -DEFINES += BOOST_ALL_NO_LIB - - DEFINES += TIXML_USE_STL + SOURCES += \ - src/AliasManager.cpp \ - src/Factory.cpp \ - src/InjectableMetadata.cpp \ - src/Registry.cpp \ src/tinyxml2.cpp \ src/tinyxmlhelper.cpp \ src/ComponentMetadata.cpp \ + src/ContainerMetadata.cpp \ src/InterfaceMetadata.cpp \ src/MethodMetadata.cpp \ src/ComponentBase.cpp \ - src/ComponentManager.cpp \ - src/ModuleMetadata.cpp \ - src/PathBuilder.cpp \ - src/ModuleManager.cpp \ - src/Enumerator.cpp \ - src/Property.cpp \ - src/PropertyMap.cpp \ - src/Exception.cpp \ - src/PropertyManager.cpp \ - src/ConfigurableBase.cpp \ - src/BaseTask.cpp \ - src/ErrorMessage.cpp \ - src/BaseException.cpp - -HEADERS += \ - interfaces/xpcf/api/IAliasManager.h \ - interfaces/xpcf/api/IRegistryManager.h \ - interfaces/xpcf/api/InjectableMetadata.h \ - interfaces/xpcf/core/helpers.h \ - interfaces/xpcf/remoting/BaseBuffer.h \ - interfaces/xpcf/remoting/ISerializable.h \ - interfaces/xpcf/threading/MultiConsumer.h \ - interfaces/private/xpcf/AliasManager.h \ - interfaces/private/xpcf/Factory.h \ - interfaces/private/xpcf/Registry.h \ - interfaces/private/xpcf/tinyxml2.h \ - interfaces/private/xpcf/tinyxmlhelper.h \ - interfaces/private/xpcf/ComponentManager.h \ - interfaces/private/xpcf/PathBuilder.h \ - interfaces/private/xpcf/MethodMetadata.h \ - interfaces/private/xpcf/ModuleManager.h \ - interfaces/private/xpcf/Property.h \ - interfaces/private/xpcf/PropertyMap.h \ - interfaces/private/xpcf/PropertySequenceWrapper.h \ - interfaces/private/xpcf/PropertyWrapper.h \ - interfaces/private/xpcf/PropertyManager.h \ - interfaces/xpcf/core/Result.h \ - interfaces/xpcf/core/ErrorMessage.h \ - interfaces/xpcf/core/BaseException.h \ - interfaces/xpcf/core/Exception.h \ - interfaces/xpcf/core/XPCFErrorCode.h \ - interfaces/xpcf/core/refs.h \ - interfaces/xpcf/core/traits.h \ - interfaces/xpcf/core/uuid.h \ - interfaces/xpcf/api/InterfaceTraits.h \ - interfaces/xpcf/api/IComponentIntrospect.h \ - interfaces/xpcf/api/IComponentManager.h \ - interfaces/xpcf/api/IModuleManager.h \ - interfaces/xpcf/api/IConfigurable.h \ - interfaces/xpcf/api/ComponentMetadata.h \ - interfaces/xpcf/api/ModuleMetadata.h \ - interfaces/xpcf/api/InterfaceMetadata.h \ - interfaces/xpcf/api/IInjectable.h \ - interfaces/xpcf/api/IFactory.h \ - interfaces/xpcf/component/ComponentBase.h \ - interfaces/xpcf/component/ComponentFactory.h \ - interfaces/xpcf/component/ComponentTraits.h \ - interfaces/xpcf/component/ConfigurableBase.h \ - interfaces/xpcf/module/IModuleIndex.h \ - interfaces/xpcf/module/ModuleFactory.h \ - interfaces/xpcf/properties/IProperty.h \ - interfaces/xpcf/properties/IPropertyMap.h \ - interfaces/xpcf/collection/IEnumerable.h \ - interfaces/xpcf/collection/IEnumerator.h \ - interfaces/xpcf/collection/ICollection.h \ - interfaces/xpcf/collection/Collection.h \ - interfaces/xpcf/collection/Enumerator.h \ - interfaces/xpcf/collection/BlockEnumerator.h \ - interfaces/xpcf/xpcf.h \ - interfaces/xpcf/xpcf_api_define.h \ - interfaces/xpcf/threading/BaseTask.h \ - interfaces/xpcf/threading/SharedBuffer.h \ - interfaces/xpcf/threading/SharedFifo.h \ - interfaces/xpcf/threading/ITask.h \ - interfaces/xpcf/threading/SharedCircularBuffer.h \ - interfaces/xpcf/threading/FiberFifos.h \ - interfaces/xpcf/threading/SharedLifo.h \ - interfaces/xpcf/threading/DropBuffer.h - -contains(DEFINES, "WITHREMOTING") { -SOURCES += \ - src/GrpcManager.cpp + src/ComponentManager.cpp HEADERS += \ - interfaces/private/xpcf/src/GrpcManager.h \ - interfaces/xpcf/remoting/IGrpcServerManager.h \ - interfaces/xpcf/remoting/IGrpcService.h \ - interfaces/xpcf/remoting/GrpcHelper.h -} - -linux { - QMAKE_LFLAGS += -ldl - #LIBS += -L/home/linuxbrew/.linuxbrew/lib # temporary fix caused by grpc with -lre2 ... without -L in grpc.pc + src/tinyxml2.h \ + src/tinyxmlhelper.h \ + interfaces/XPCF_NullObject.h \ + interfaces/InterfaceMetadata.h \ + interfaces/ComponentMetadata.h \ + interfaces/ContainerMetadata.h \ + interfaces/MethodMetadata.h \ + interfaces/IComponentIntrospect.h \ + interfaces/ComponentBase.h \ + #interfaces/IComponentManager.h \ + interfaces/XPCF_definitions.h \ + interfaces/ComponentFactory.h \ + interfaces/ContainerFactory.h \ + interfaces/IComponentManager.h \ + src/ComponentManager.h + + +unix { } macx { DEFINES += _MACOS_TARGET_ QMAKE_MAC_SDK= macosx - QMAKE_CFLAGS += -mmacosx-version-min=10.7 #-x objective-c++ - QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -std=c++17 -fPIC#-x objective-c++ + QMAKE_CFLAGS += -mmacosx-version-min=10.7 -std=c11 #-x objective-c++ + QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -std=c11 -std=c++11 -fPIC#-x objective-c++ QMAKE_LFLAGS += -mmacosx-version-min=10.7 -v -lstdc++ LIBS += -lstdc++ -lc -lpthread - LIBS += -L/usr/local/lib # temporary fix caused by grpc with -lre2 ... without -L in grpc.pc } win32 { DEFINES += _X86_VC12_TARGET_ DEFINES += MBCS _MBCS + DEFINES += BOOST_ALL_NO_LIB } INCLUDEPATH += $${PWD} $${PWD}/interfaces -#include(builddefs/qmake/code_analysis/bcom_code_scanner.prf) - -h_api_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/api -h_api_files.files = $$files($${PWD}/interfaces/xpcf/api/*) -h_collection_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/collection -h_collection_files.files = $$files($${PWD}/interfaces/xpcf/collection/*) -h_component_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/component -h_component_files.files = $$files($${PWD}/interfaces/xpcf/component/*) -h_core_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/core -h_core_files.files = $$files($${PWD}/interfaces/xpcf/core/*) -h_module_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/module -h_module_files.files = $$files($${PWD}/interfaces/xpcf/module/*) -h_properties_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/properties -h_properties_files.files = $$files($${PWD}/interfaces/xpcf/properties/*) -h_threading_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/threading -h_threading_files.files = $$files($${PWD}/interfaces/xpcf/threading/*) -h_xpcf_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf -h_xpcf_files.files = $${PWD}/interfaces/xpcf/xpcf.h -h_xpcf_files.files += $${PWD}/interfaces/xpcf/xpcf_api_define.h -qt_wizards.files = $$files($${PWD}/wizards/*,recursive=true) -qt_wizards.path = $${PROJECTDEPLOYDIR}/wizards - -INSTALLS += h_api_files h_collection_files h_component_files h_core_files h_module_files h_properties_files h_threading_files h_xpcf_files qt_wizards -contains(DEFINES, "WITHREMOTING") { - h_remoting_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/remoting - h_remoting_files.files = $$files($${PWD}/interfaces/xpcf/remoting/*) - INSTALLS += h_remoting_files -} - -OTHER_FILES += \ -interfaces/swig/swig.i \ -interfaces/swig/XPCF_Api.i \ -interfaces/swig/XPCF_Bindings.i \ -interfaces/swig/XPCF_Collection.i \ -interfaces/swig/XPCF_Component.i \ -interfaces/swig/XPCF_Core.i \ -interfaces/swig/XPCF_Module.i \ -interfaces/swig/XPCF_Properties.i \ -interfaces/swig/XPCF_Threading.i \ -interfaces/swig/XPCF_Traits.i \ +header_files.path = $${PROJECTDEPLOYDIR}/interfaces/ +header_files.files = $$files($${PWD}/interfaces/*.h) +INSTALLS += header_files DISTFILES += \ - Makefile \ - doc/xpcf-registry-sample.xml \ - packagedependencies-android.txt \ - packagedependencies-linux.txt \ - packagedependencies-mac.txt \ - packagedependencies-win.txt \ - packagedependencies.txt + Makefile diff --git a/xpcf_static_deps.pro b/xpcf_static_deps.pro deleted file mode 100644 index e1b7ebe..0000000 --- a/xpcf_static_deps.pro +++ /dev/null @@ -1,235 +0,0 @@ -!exists(version.pri) { - message("$$TARGET - version.pri not present, generate it") - win32 { - system(scripts/win/update_version.bat) - } - linux { - system(scripts/unixes/update_version.sh) - } -} - -include(version.pri) -VERSION=$${XPCF_VERSION} - -QT -= core gui -CONFIG -= app_bundle qt -TARGET = xpcf_static_deps -FRAMEWORK = $${TARGET} - -DEFINES += XPCFVERSION=\\\"$${VERSION}\\\" - -CONFIG += c++1z -#CONFIG += staticlib -#CONFIG += verbose -#!staticlib { - CONFIG += shared -#} else { -# CONFIG -= shared -#} -#message($${CONFIG}) -#CONFIG += verbose - -# Uncomment following line to prepare remaken package -#CONFIG += package_remaken - -DEFINES += WITHREMOTING -DEFINES += XPCF_USE_BOOST - -DEFINES += XPCF_SHARED -DEPENDENCIESCONFIG = staticlib #sharedlib -REMAKEN_PKGSUBDIR=shared - -CONFIG(debug,debug|release) { - DEFINES += "XPCFDEBUG" - DEFINES += XPCFSUBDIRSEARCH=\\\"debug\\\" - REMAKEN_PKGSUBDIR=$${REMAKEN_PKGSUBDIR}/debug/$${TARGET}_$${VERSION} -} - -CONFIG(release,debug|release) { - DEFINES += XPCFSUBDIRSEARCH=\\\"release\\\" - REMAKEN_PKGSUBDIR=$${REMAKEN_PKGSUBDIR}/release/$${TARGET}_$${VERSION} -} - -package_remaken { - message("Preparing remaken package installation in $${REMAKEN_PKGSUBDIR}") - INSTALLSUBDIR=$${REMAKEN_PKGSUBDIR} -} - -message("CONFIG="$${CONFIG}) - -#NOTE : CONFIG as staticlib or sharedlib, DEPENDENCIESCONFIG as staticlib or sharedlib and PROJECTDEPLOYDIR MUST BE DEFINED BEFORE templatelibbundle.pri inclusion -include (builddefs/qmake/templatelibconfig.pri) - -CONFIG(debug,debug|release) { - DEFINES += "XPCFDEBUG" - DEFINES += XPCFSUBDIRSEARCH=\\\"debug\\\" -} - -CONFIG(release,debug|release) { - DEFINES += XPCFSUBDIRSEARCH=\\\"release\\\" -} - -DEFINES += TIXML_USE_STL - -SOURCES += \ - src/AliasManager.cpp \ - src/Factory.cpp \ - src/InjectableMetadata.cpp \ - src/Registry.cpp \ - src/tinyxml2.cpp \ - src/tinyxmlhelper.cpp \ - src/ComponentMetadata.cpp \ - src/InterfaceMetadata.cpp \ - src/MethodMetadata.cpp \ - src/ComponentBase.cpp \ - src/ComponentManager.cpp \ - src/ModuleMetadata.cpp \ - src/PathBuilder.cpp \ - src/ModuleManager.cpp \ - src/Enumerator.cpp \ - src/Property.cpp \ - src/PropertyMap.cpp \ - src/Exception.cpp \ - src/PropertyManager.cpp \ - src/ConfigurableBase.cpp \ - src/BaseTask.cpp \ - src/ErrorMessage.cpp \ - src/BaseException.cpp - -HEADERS += \ - interfaces/xpcf/api/IAliasManager.h \ - interfaces/xpcf/api/IRegistryManager.h \ - interfaces/xpcf/api/InjectableMetadata.h \ - interfaces/xpcf/core/helpers.h \ - interfaces/xpcf/remoting/BaseBuffer.h \ - interfaces/xpcf/remoting/ISerializable.h \ - interfaces/xpcf/threading/MultiConsumer.h \ - interfaces/private/xpcf/AliasManager.h \ - interfaces/private/xpcf/Factory.h \ - interfaces/private/xpcf/Registry.h \ - interfaces/private/xpcf/tinyxml2.h \ - interfaces/private/xpcf/tinyxmlhelper.h \ - interfaces/private/xpcf/ComponentManager.h \ - interfaces/private/xpcf/PathBuilder.h \ - interfaces/private/xpcf/MethodMetadata.h \ - interfaces/private/xpcf/ModuleManager.h \ - interfaces/private/xpcf/Property.h \ - interfaces/private/xpcf/PropertyMap.h \ - interfaces/private/xpcf/PropertySequenceWrapper.h \ - interfaces/private/xpcf/PropertyWrapper.h \ - interfaces/private/xpcf/PropertyManager.h \ - interfaces/xpcf/core/Result.h \ - interfaces/xpcf/core/ErrorMessage.h \ - interfaces/xpcf/core/BaseException.h \ - interfaces/xpcf/core/Exception.h \ - interfaces/xpcf/core/XPCFErrorCode.h \ - interfaces/xpcf/core/refs.h \ - interfaces/xpcf/core/traits.h \ - interfaces/xpcf/core/uuid.h \ - interfaces/xpcf/api/InterfaceTraits.h \ - interfaces/xpcf/api/IComponentIntrospect.h \ - interfaces/xpcf/api/IComponentManager.h \ - interfaces/xpcf/api/IModuleManager.h \ - interfaces/xpcf/api/IConfigurable.h \ - interfaces/xpcf/api/ComponentMetadata.h \ - interfaces/xpcf/api/ModuleMetadata.h \ - interfaces/xpcf/api/InterfaceMetadata.h \ - interfaces/xpcf/api/IInjectable.h \ - interfaces/xpcf/api/IFactory.h \ - interfaces/xpcf/component/ComponentBase.h \ - interfaces/xpcf/component/ComponentFactory.h \ - interfaces/xpcf/component/ComponentTraits.h \ - interfaces/xpcf/component/ConfigurableBase.h \ - interfaces/xpcf/module/IModuleIndex.h \ - interfaces/xpcf/module/ModuleFactory.h \ - interfaces/xpcf/properties/IProperty.h \ - interfaces/xpcf/properties/IPropertyMap.h \ - interfaces/xpcf/collection/IEnumerable.h \ - interfaces/xpcf/collection/IEnumerator.h \ - interfaces/xpcf/collection/ICollection.h \ - interfaces/xpcf/collection/Collection.h \ - interfaces/xpcf/collection/Enumerator.h \ - interfaces/xpcf/collection/BlockEnumerator.h \ - interfaces/xpcf/xpcf.h \ - interfaces/xpcf/xpcf_api_define.h \ - interfaces/xpcf/threading/BaseTask.h \ - interfaces/xpcf/threading/SharedBuffer.h \ - interfaces/xpcf/threading/SharedFifo.h \ - interfaces/xpcf/threading/ITask.h \ - interfaces/xpcf/threading/SharedCircularBuffer.h \ - interfaces/xpcf/threading/FiberFifos.h \ - interfaces/xpcf/threading/SharedLifo.h \ - interfaces/xpcf/threading/DropBuffer.h - -contains(DEFINES, "WITHREMOTING") { -SOURCES += \ - src/GrpcManager.cpp - -HEADERS += \ - interfaces/private/xpcf/src/GrpcManager.h \ - interfaces/xpcf/remoting/IGrpcServerManager.h \ - interfaces/xpcf/remoting/IGrpcService.h \ - interfaces/xpcf/remoting/GrpcHelper.h -} - -linux { - QMAKE_LFLAGS += -ldl - #LIBS += -L/home/linuxbrew/.linuxbrew/lib # temporary fix caused by grpc with -lre2 ... without -L in grpc.pc -} - -win32 { - DEFINES += _X86_VC12_TARGET_ - DEFINES += MBCS _MBCS - } - -INCLUDEPATH += $${PWD} $${PWD}/interfaces -#include(builddefs/qmake/code_analysis/bcom_code_scanner.prf) - -h_api_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/api -h_api_files.files = $$files($${PWD}/interfaces/xpcf/api/*) -h_collection_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/collection -h_collection_files.files = $$files($${PWD}/interfaces/xpcf/collection/*) -h_component_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/component -h_component_files.files = $$files($${PWD}/interfaces/xpcf/component/*) -h_core_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/core -h_core_files.files = $$files($${PWD}/interfaces/xpcf/core/*) -h_module_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/module -h_module_files.files = $$files($${PWD}/interfaces/xpcf/module/*) -h_properties_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/properties -h_properties_files.files = $$files($${PWD}/interfaces/xpcf/properties/*) -h_threading_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/threading -h_threading_files.files = $$files($${PWD}/interfaces/xpcf/threading/*) -h_xpcf_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf -h_xpcf_files.files = $${PWD}/interfaces/xpcf/xpcf.h -h_xpcf_files.files += $${PWD}/interfaces/xpcf/xpcf_api_define.h -qt_wizards.files = $$files($${PWD}/wizards/*,recursive=true) -qt_wizards.path = $${PROJECTDEPLOYDIR}/wizards - -INSTALLS += h_api_files h_collection_files h_component_files h_core_files h_module_files h_properties_files h_threading_files h_xpcf_files qt_wizards -contains(DEFINES, "WITHREMOTING") { - h_remoting_files.path = $${PROJECTDEPLOYDIR}/interfaces/xpcf/remoting - h_remoting_files.files = $$files($${PWD}/interfaces/xpcf/remoting/*) - INSTALLS += h_remoting_files -} - -OTHER_FILES += \ -interfaces/swig/swig.i \ -interfaces/swig/XPCF_Api.i \ -interfaces/swig/XPCF_Bindings.i \ -interfaces/swig/XPCF_Collection.i \ -interfaces/swig/XPCF_Component.i \ -interfaces/swig/XPCF_Core.i \ -interfaces/swig/XPCF_Module.i \ -interfaces/swig/XPCF_Properties.i \ -interfaces/swig/XPCF_Threading.i \ -interfaces/swig/XPCF_Traits.i \ - - -DISTFILES += \ - Makefile \ - doc/xpcf-registry-sample.xml \ - packagedependencies-android.txt \ - packagedependencies-linux.txt \ - packagedependencies-mac.txt \ - packagedependencies-win.txt \ - packagedependencies.txt