diff --git a/.gitignore b/.gitignore index d80ea9cee9..e75af825e0 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ Thumbs.db customization.lua # The COMMIT info is generated everytime CMake is run COMMIT.md +*_codegen.cpp diff --git a/.gitmodules b/.gitmodules index 0bfcb7f59d..112e7a1300 100644 --- a/.gitmodules +++ b/.gitmodules @@ -29,3 +29,6 @@ [submodule "ext/date"] path = ext/date url = https://github.com/HowardHinnant/date +[submodule "support/coding/codegen"] + path = support/coding/codegen + url = https://github.com/OpenSpace/codegen diff --git a/CMakeLists.txt b/CMakeLists.txt index 7343b90e4a..a3c2a8c767 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # @@ -29,7 +29,7 @@ project(OpenSpace) set(OPENSPACE_VERSION_MAJOR 0) set(OPENSPACE_VERSION_MINOR 16) set(OPENSPACE_VERSION_PATCH 0) -set(OPENSPACE_VERSION_STRING "Beta-8 RC1") +set(OPENSPACE_VERSION_STRING "Beta-8") set(OPENSPACE_BASE_DIR "${PROJECT_SOURCE_DIR}") set(OPENSPACE_CMAKE_EXT_DIR "${OPENSPACE_BASE_DIR}/support/cmake") @@ -37,14 +37,11 @@ set(GHOUL_BASE_DIR "${OPENSPACE_BASE_DIR}/ext/ghoul") include(${OPENSPACE_CMAKE_EXT_DIR}/module_common.cmake) include(${OPENSPACE_CMAKE_EXT_DIR}/global_variables.cmake) -include(${OPENSPACE_CMAKE_EXT_DIR}/handle_applications.cmake) -include(${OPENSPACE_CMAKE_EXT_DIR}/handle_modules.cmake) include(${GHOUL_BASE_DIR}/support/cmake/copy_shared_libraries.cmake) include(${GHOUL_BASE_DIR}/support/cmake/handle_external_library.cmake) include(${GHOUL_BASE_DIR}/support/cmake/message_macros.cmake) begin_header("Configuring OpenSpace project") -message(STATUS "CMake version: ${CMAKE_VERSION}") # Bail out if the user tries to generate a 32 bit project. if (NOT ${CMAKE_SIZEOF_VOID_P} EQUAL 8) @@ -55,26 +52,28 @@ endif () # Cleanup project # ########################################################################################## set(OPENSPACE_APPS_DIR "${OPENSPACE_BASE_DIR}/apps") -set(OPENSPACE_EXT_DIR "${OPENSPACE_BASE_DIR}/ext") -if (NOT EXISTS ${OPENSPACE_EXT_DIR}/ghoul/CMakeLists.txt) - message(FATAL_ERROR "Git submodules are missing. Please run \n" - "git submodule update --init --recursive \n" - "to download the missing dependencies." +if (NOT EXISTS "${OPENSPACE_BASE_DIR}/ext/ghoul/CMakeLists.txt") + message(FATAL_ERROR "Git submodules are missing. Please run " + "git submodule update --init --recursive to download the missing dependencies." ) endif () -set_property(GLOBAL PROPERTY USE_FOLDERS On) +set_property(GLOBAL PROPERTY USE_FOLDERS ON) set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER CMake) mark_as_advanced(CMAKE_BACKWARDS_COMPATIBILITY CMAKE_BUILD_TYPE CMAKE_DEBUG_POSTFIX CMAKE_INSTALL_PREFIX CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET - CMAKE_OSX_SYSROOT CMAKE_RELEASE_POSTFIX) + CMAKE_OSX_SYSROOT CMAKE_RELEASE_POSTFIX +) # Set build output directories set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${OPENSPACE_CMAKE_EXT_DIR}) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OPENSPACE_BASE_DIR}/bin) +# "OpenSpace Helper" is not a valid CMake target name under OLD +cmake_policy(SET CMP0037 NEW) + ########################################################################################## # Main # ########################################################################################## @@ -103,7 +102,7 @@ execute_process( ) if (NOT OPENSPACE_GIT_STATUS_RETURN EQUAL 0) set(OPENSPACE_GIT_STATUS "uncommitted changes") -else() +else () set(OPENSPACE_GIT_STATUS "") endif () @@ -133,62 +132,35 @@ if (MSVC) set(GHOUL_OPTIMIZATION_ENABLE_OTHER_OPTIMIZATIONS ${OPENSPACE_OPTIMIZATION_ENABLE_OTHER_OPTIMIZATIONS} CACHE BOOL "" FORCE) endif () +option(OPENSPACE_WITH_ABUFFER_RENDERER "Compile ABuffer Renderer" OFF) + if (UNIX AND CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -stdlib=libc++") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++ -lc++abi") endif () -include(src/CMakeLists.txt) +add_subdirectory(ext) -########################################################################################## -# Add external dependencies # -########################################################################################## -# System libraries -if (APPLE) - begin_dependency("Core Libraries") - target_include_directories(openspace-core PUBLIC "/Developer/Headers/FlatCarbon") - find_library(COREFOUNDATION_LIBRARY CoreFoundation) - find_library(CARBON_LIBRARY Carbon) - find_library(COCOA_LIBRARY Carbon) - find_library(APP_SERVICES_LIBRARY ApplicationServices) - mark_as_advanced(CARBON_LIBRARY COCOA_LIBRARY APP_SERVICES_LIBRARY) - target_link_libraries(openspace-core PUBLIC ${CARBON_LIBRARY} ${COREFOUNDATION_LIBRARY} - ${COCOA_LIBRARY} ${APP_SERVICES_LIBRARY}) - end_dependency() -endif () +add_subdirectory(src) -# Ghoul -add_subdirectory(${OPENSPACE_EXT_DIR}/ghoul) -target_link_libraries(openspace-core PUBLIC Ghoul) -set_openspace_compile_settings(Ghoul) -set_folder_location(Lua "External") -set_folder_location(lz4 "External") -set_folder_location(GhoulTest "Unit Tests") -link_directories("${GHOUL_LIBRARY_DIRS}") +add_subdirectory(support/coding/codegen) +# It is important that the __codegen.h do not actually exist so +# that this target is never considered as finished +add_custom_target( + run_codegen + ALL DEPENDS + "${CMAKE_CURRENT_BINARY_DIR}/__codegen.h" +) +add_dependencies(run_codegen codegen) +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/__codegen.h" + COMMAND codegen ARGS "${OPENSPACE_BASE_DIR}/modules" "${OPENSPACE_BASE_DIR}/src" + VERBATIM +) +set_folder_location(codegen-lib "support") +set_folder_location(codegen "support") +set_folder_location(run_codegen "support") -# Spice -begin_dependency("Spice") -add_subdirectory(${OPENSPACE_EXT_DIR}/spice) -target_link_libraries(openspace-core PUBLIC Spice) -set_folder_location(Spice "External") -end_dependency() - -# Curl -begin_dependency("CURL") -if (WIN32) - set(CURL_ROOT_DIR "${OPENSPACE_EXT_DIR}/curl") - target_include_directories(openspace-core SYSTEM PUBLIC ${CURL_ROOT_DIR}/include) - target_link_libraries(openspace-core PUBLIC ${CURL_ROOT_DIR}/lib/libcurl.lib) - target_compile_definitions(openspace-core PUBLIC "OPENSPACE_CURL_ENABLED" "CURL_STATICLIB") -else () - find_package(CURL) - if (CURL_FOUND) - target_include_directories(openspace-core SYSTEM PUBLIC ${CURL_INCLUDE_DIRS}) - target_link_libraries(openspace-core PUBLIC ${CURL_LIBRARIES}) - target_compile_definitions(openspace-core PUBLIC "OPENSPACE_CURL_ENABLED") - endif () -endif () -end_dependency() # Qt # Unfortunately, we have to set this value manually; sigh @@ -202,6 +174,7 @@ if (APPLE) "~/Qt/5.10/clang_64/lib/cmake" "~/Qt/5.11/clang_64/lib/cmake" "~/Qt/5.12/clang_64/lib/cmake" + "~/Qt/5.15.1/clang_64/lib/cmake" ) endif () @@ -217,20 +190,23 @@ if (MSVC) endif () begin_header("Configuring Modules") -set(OPENSPACE_EXTERNAL_MODULES_PATHS "" CACHE STRING "List of external modules") -handle_modules("${OPENSPACE_BASE_DIR}/modules" "${OPENSPACE_EXTERNAL_MODULES_PATHS}") +add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/modules") end_header("End: Configuring Modules") -message(STATUS "") + + +add_subdirectory(support/coding/codegen/tests) +set_folder_location(run_test_codegen "Unit Tests/support") +set_folder_location(codegentest "Unit Tests") + begin_header("Configuring Applications") -handle_applications() +add_subdirectory("${OPENSPACE_APPS_DIR}") end_header("End: Configuring Applications") -message(STATUS "") option(OPENSPACE_HAVE_TESTS "Activate the OpenSpace unit tests" ON) if (OPENSPACE_HAVE_TESTS) begin_header("Generating OpenSpace unit test") - add_subdirectory("${OPENSPACE_BASE_DIR}/tests") + add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/tests") end_header() endif (OPENSPACE_HAVE_TESTS) @@ -252,29 +228,13 @@ if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT) # find CEF to initialize it properly. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake") include(webbrowser_helpers) -elseif (OPENSPACE_MODULE_WEBBROWSER) - message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.") +elseif () + message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again") endif () ########################################################################################## # Misc settings # ########################################################################################## -option(OPENSPACE_WITH_ABUFFER_RENDERER "Compile ABuffer Renderer" OFF) -if (OPENSPACE_WITH_ABUFFER_RENDERER) - target_compile_definitions(openspace-core PUBLIC "OPENSPACE_WITH_ABUFFER_RENDERER") -endif () - -option(OPENSPACE_WITH_INSTRUMENTATION "Add instrumentation options" OFF) -if (OPENSPACE_WITH_INSTRUMENTATION) - target_compile_definitions(openspace-core PUBLIC "OPENSPACE_WITH_INSTRUMENTATION") -endif () - - -# Just in case, create the bin directory -add_custom_command( - TARGET openspace-core - PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} -) # Manage the CPack packaging include(${OPENSPACE_CMAKE_EXT_DIR}/packaging.cmake) diff --git a/CREDITS.md b/CREDITS.md index 5e074cc2aa..c7201a953d 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -3,29 +3,38 @@ Alexander Bock Emil Axelsson Kalle Bladin Jonathas Costa +Gene Payne Jonas Strandstedt Michal Marcinkowski -Joakim Kilby -Gene Payne +Elon Olsson +Emma Broman Micah Acinapura +Joakim Kilby +Lovisa Hassler +Mikael Petterson Erik Sundén +Stefan Lindblad +Malin Ejdbo +Corrie Roe Eric Myers Sebastian Piwell Erik Broberg Jonathan Bosson Michael Nilsson -Elon Olsson Jonathan Franzen +Karin Reidarman Hans-Christian Helltegen Anton Arbring Oskar Carlbaum Matthew Territo Jonathan Grangien Klas Eskilson +Aniisa Bihi Tomas Forsyth Rosin Niclas Hultberg Rickard Lindtstedt +Ingela Rossing Michael Sjöström Michael Novén Christoffer Särevall @@ -35,8 +44,10 @@ Christoffer Särevall Anteige arfon DavidLaidlaw +johnriedel mik3caprio mingenuity nbartzokas nealmcb noahdasanaike +sa5bke diff --git a/Jenkinsfile b/Jenkinsfile index 53b9c5ab90..5fc5351950 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -92,100 +92,171 @@ parallel tools: { ) recordIssues( id: 'tools-cppcheck', - tool: cppCheck() + tool: cppCheck(pattern: 'build/cppcheck.xml') ) } cleanWs() } // node('tools') }, -linux_gcc: { - node('linux' && 'gcc') { - stage('linux-gcc/scm') { - deleteDir(); - gitHelper.checkoutGit(url, branch); - } - stage('linux-gcc/build(make)') { - def cmakeCompileOptions = moduleCMakeFlags(); - cmakeCompileOptions += ' -DMAKE_BUILD_TYPE=Release'; - // Not sure why the linking of OpenSpaceTest takes so long - compileHelper.build(compileHelper.Make(), compileHelper.Gcc(), cmakeCompileOptions, 'OpenSpace', 'build-make'); - compileHelper.recordCompileIssues(compileHelper.Gcc()); - } - stage('linux-gcc/build(ninja)') { - def cmakeCompileOptions = moduleCMakeFlags(); - cmakeCompileOptions += '-DMAKE_BUILD_TYPE=Release'; - // Not sure why the linking of OpenSpaceTest takes so long - compileHelper.build(compileHelper.Ninja(), compileHelper.Gcc(), cmakeCompileOptions, 'OpenSpace', 'build-ninja'); - } - stage('linux-gcc/test') { - // testHelper.runUnitTests('build/OpenSpaceTest'); - } - cleanWs() - } // node('linux') -}, -linux_clang: { - node('linux' && 'clang') { - stage('linux-clang/scm') { - deleteDir() - gitHelper.checkoutGit(url, branch); - } - stage('linux-clang/build(make)') { - def cmakeCompileOptions = moduleCMakeFlags() - cmakeCompileOptions += ' -DMAKE_BUILD_TYPE=Release' - // Not sure why the linking of OpenSpaceTest takes so long - compileHelper.build(compileHelper.Make(), compileHelper.Clang(), cmakeCompileOptions, 'OpenSpace', 'build-make'); - compileHelper.recordCompileIssues(compileHelper.Clang()); - } - stage('linux-clang/build(ninja)') { - def cmakeCompileOptions = moduleCMakeFlags() - cmakeCompileOptions += '-DMAKE_BUILD_TYPE=Release' - // Not sure why the linking of OpenSpaceTest takes so long - compileHelper.build(compileHelper.Ninja(), compileHelper.Clang(), cmakeCompileOptions, 'OpenSpace', 'build-ninja'); - } - stage('linux-clang/test') { - // testHelper.runUnitTests('build/OpenSpaceTest'); - } - cleanWs() - } // node('linux') -}, -windows: { - node('windows') { - ws("${env.JENKINS_BASE}/O/${env.BRANCH_NAME}/${env.BUILD_ID}") { - stage('windows/scm') { +linux_gcc_make: { + if (env.USE_BUILD_OS_LINUX == 'true') { + node('linux' && 'gcc') { + stage('linux-gcc-make/scm') { deleteDir(); gitHelper.checkoutGit(url, branch); } - stage('windows/build(msvc)') { + stage('linux-gcc-make/build') { + def cmakeCompileOptions = moduleCMakeFlags(); + cmakeCompileOptions += ' -DMAKE_BUILD_TYPE=Release'; + // Not sure why the linking of OpenSpaceTest takes so long + compileHelper.build(compileHelper.Make(), compileHelper.Gcc(), cmakeCompileOptions, 'OpenSpace', 'build-make'); + compileHelper.recordCompileIssues(compileHelper.Gcc()); + } + stage('linux-gcc-make/test') { + // testHelper.runUnitTests('build/OpenSpaceTest'); + // testHelper.runUnitTests('bin/codegentest') + } + cleanWs() + } // node('linux') + } +}, +linux_gcc_ninja: { + if (env.USE_BUILD_OS_LINUX == 'true') { + node('linux' && 'gcc') { + stage('linux-gcc-ninja/scm') { + deleteDir(); + gitHelper.checkoutGit(url, branch); + } + stage('linux-gcc-ninja/build') { + def cmakeCompileOptions = moduleCMakeFlags(); + cmakeCompileOptions += '-DMAKE_BUILD_TYPE=Release'; + // Not sure why the linking of OpenSpaceTest takes so long + compileHelper.build(compileHelper.Ninja(), compileHelper.Gcc(), cmakeCompileOptions, 'OpenSpace', 'build-ninja'); + } + stage('linux-gcc-ninja/test') { + // testHelper.runUnitTests('build/OpenSpaceTest'); + // testHelper.runUnitTests('bin/codegentest') + } + cleanWs() + } // node('linux') + } +}, +linux_clang_make: { + if (env.USE_BUILD_OS_LINUX == 'true') { + node('linux' && 'clang') { + stage('linux-clang-make/scm') { + deleteDir() + gitHelper.checkoutGit(url, branch); + } + stage('linux-clang-make/build') { + def cmakeCompileOptions = moduleCMakeFlags() + cmakeCompileOptions += ' -DMAKE_BUILD_TYPE=Release' + // Not sure why the linking of OpenSpaceTest takes so long + compileHelper.build(compileHelper.Make(), compileHelper.Clang(), cmakeCompileOptions, 'OpenSpace', 'build-make'); + compileHelper.recordCompileIssues(compileHelper.Clang()); + } + stage('linux-clang-make/test') { + // testHelper.runUnitTests('build/OpenSpaceTest'); + // testHelper.runUnitTests('bin/codegentest') + } + cleanWs() + } // node('linux') + } +}, +linux_clang_ninja: { + if (env.USE_BUILD_OS_LINUX == 'true') { + node('linux' && 'clang') { + stage('linux-clang-ninja/scm') { + deleteDir() + gitHelper.checkoutGit(url, branch); + } + stage('linux-clang-ninja/build') { + def cmakeCompileOptions = moduleCMakeFlags() + cmakeCompileOptions += '-DMAKE_BUILD_TYPE=Release' + // Not sure why the linking of OpenSpaceTest takes so long + compileHelper.build(compileHelper.Ninja(), compileHelper.Clang(), cmakeCompileOptions, 'OpenSpace', 'build-ninja'); + } + stage('linux-clang-ninja/test') { + // testHelper.runUnitTests('build/OpenSpaceTest'); + // testHelper.runUnitTests('bin/codegentest') + } + cleanWs() + } // node('linux') + } +}, +windows_msvc: { + if (env.USE_BUILD_OS_WINDOWS == 'true') { + node('windows') { + stage('windows-msvc/scm') { + deleteDir(); + gitHelper.checkoutGit(url, branch); + } + stage('windows-msvc/build') { compileHelper.build(compileHelper.VisualStudio(), compileHelper.VisualStudio(), moduleCMakeFlags(), '', 'build-msvc'); compileHelper.recordCompileIssues(compileHelper.VisualStudio()); } - stage('windows/build(ninja)') { - compileHelper.build(compileHelper.Ninja(), compileHelper.VisualStudio(), moduleCMakeFlags(), '', 'build-ninja'); - } - stage('windows/test') { + stage('windows-msvc/test') { // Currently, the unit tests are failing on Windows // testHelper.runUnitTests('bin\\Debug\\OpenSpaceTest') + testHelper.runUnitTests('bin\\Debug\\codegentest') } + cleanWs() } // node('windows') - cleanWs() - } // node('windows') + } }, -macos: { - node('macos') { - stage('macos/scm') { - deleteDir(); - gitHelper.checkoutGit(url, branch); - } - stage('macos/build(make)') { - compileHelper.build(compileHelper.Make(), compileHelper.Clang(), moduleCMakeFlags(), '', 'build-make'); - } - stage('macos/build(xcode)') { - compileHelper.build(compileHelper.Xcode(), compileHelper.Xcode(), moduleCMakeFlags(), '', 'build-xcode'); - } - stage('macos/test') { - // Currently, the unit tests are crashing on OS X - // testHelper.runUnitTests('build/Debug/OpenSpaceTest') - } - cleanWs() - } // node('macos') +// windows_ninja: { +// if (env.USE_BUILD_OS_WINDOWS == 'true') { +// node('windows') { +// ws("${env.JENKINS_BASE}/O/${env.BRANCH_NAME}/${env.BUILD_ID}") { +// stage('windows-ninja/scm') { +// deleteDir(); +// gitHelper.checkoutGit(url, branch); +// } +// stage('windows-ninja/build') { +// compileHelper.build(compileHelper.Ninja(), compileHelper.VisualStudio(), moduleCMakeFlags(), '', 'build-ninja'); +// } +// stage('windows-ninja/test') { +// // Currently, the unit tests are failing on Windows +// // testHelper.runUnitTests('bin\\Debug\\OpenSpaceTest') +// } +// } // node('windows') +// cleanWs() +// } // node('windows') +// } +// }, +macos_make: { + if (env.USE_BUILD_OS_MACOS == 'true') { + node('macos') { + stage('macos-make/scm') { + deleteDir(); + gitHelper.checkoutGit(url, branch); + } + stage('macos-make/build') { + compileHelper.build(compileHelper.Make(), compileHelper.Clang(), moduleCMakeFlags(), '', 'build-make'); + } + stage('macos-make/test') { + // Currently, the unit tests are crashing on OS X + // testHelper.runUnitTests('build/Debug/OpenSpaceTest') + } + cleanWs() + } // node('macos') + } +}, +macos_xcode: { + if (env.USE_BUILD_OS_MACOS == 'true') { + node('macos') { + stage('macos-xcode/scm') { + deleteDir(); + gitHelper.checkoutGit(url, branch); + } + stage('macos-xcode/build') { + compileHelper.build(compileHelper.Xcode(), compileHelper.Xcode(), moduleCMakeFlags(), '', 'build-xcode'); + } + stage('macos-xcode/test') { + // Currently, the unit tests are crashing on OS X + // testHelper.runUnitTests('build/Debug/OpenSpaceTest') + } + cleanWs() + } // node('macos') + } } diff --git a/LICENSE.md b/LICENSE.md index 4e0881c01c..de2f93f1ad 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2014-2020 +Copyright (c) 2014-2021 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software diff --git a/README.md b/README.md index 24a9baf505..19d721dd2a 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -[OpenSpace](http://openspaceproject.com) is an open source, non-commercial, and freely available interactive data visualization software designed to visualize the entire known universe and portray our ongoing efforts to investigate the cosmos. Bringing the latest techniques from data visualization research to the general public, OpenSpace supports interactive presentation of dynamic data from observations, simulations, and space mission planning and operations. The software works on multiple operating systems (Windows, Linux, MacOS) with an extensible architecture powering high resolution tiled displays and planetarium domes, making use of the latest graphic card technologies for rapid data throughput. In addition, OpenSpace enables simultaneous connections across the globe creating opportunity for shared experiences among audiences worldwide. +[OpenSpace](http://openspaceproject.com) is an open source, non-commercial, and freely available interactive data visualization software designed to visualize the entire known universe and portray our ongoing efforts to investigate the cosmos. Bringing the latest techniques from data visualization research to the general public, OpenSpace supports interactive presentation of dynamic data from observations, simulations, and space mission planning and operations. The software works on multiple operating systems (Windows, Linux, MacOS) with an extensible architecture powering high resolution tiled displays and planetarium domes, making use of the latest graphic card technologies for rapid data throughput. In addition, OpenSpace enables simultaneous connections across the globe creating opportunity for shared experiences among audiences worldwide. -The project stems from the same academic collaboration between Sweden’s [Linköping University](https://www.liu.se) (LiU) and the [American Museum of Natural History](https://www.amnh.org) (AMNH) that led to the creation of Uniview and its parent company [SCISS](http://sciss.se). Development of the software began several years ago through a close collaboration with NASA Goddard’s [Community Coordinated Modeling Center](https://ccmc.gsfc.nasa.gov) (CCMC) to model space weather forecasting and continued with visualizations of NASA’s New Horizons mission to Pluto and ESA’s Rosetta mission. This promising set of preliminary work provided a foundation for recent NASA funding, which has extended the collaboration to include the University of Utah’s [Scientific Computing and Imaging](https://www.sci.utah.edu) (SCI) Institute, [New York University](https://www.nyu.edu)’s Tandon School of Engineering, multiple informal science institutions across the United States, and multiple, international vendors. Current areas of focus within OpenSpace include: +The project stems from the same academic collaboration between Sweden’s [Linköping University](https://www.liu.se) (LiU) and the [American Museum of Natural History](https://www.amnh.org) (AMNH) that led to the creation of Uniview and its parent company [SCISS](http://sciss.se). Development of the software began several years ago through a close collaboration with NASA Goddard’s [Community Coordinated Modeling Center](https://ccmc.gsfc.nasa.gov) (CCMC) to model space weather forecasting and continued with visualizations of NASA’s New Horizons mission to Pluto and ESA’s Rosetta mission. This promising set of preliminary work provided a foundation for recent NASA funding, which has extended the collaboration to include the University of Utah’s [Scientific Computing and Imaging](https://www.sci.utah.edu) (SCI) Institute, [New York University](https://www.nyu.edu)’s Tandon School of Engineering, multiple informal science institutions across the United States, and multiple, international vendors. Current areas of focus within OpenSpace include: - Visualization of dynamic simulations via interactive volumetric rendering, as a priority for communicating research in astrophysics. -- Utilization of NASA’s SPICE observational geometry system with its Planetary Data Service (PDS) to enable space mission visualization that reveal how missions are designed to gather science. +- Utilization of NASA’s SPICE observational geometry system with its Planetary Data Service (PDS) to enable space mission visualizations that reveal how missions are designed to gather science. - Globe browsing techniques across spatial and temporal scales to examine scientific campaigns on multiple planets, including close up surface exploration. OpenSpace requires graphics support for [OpenGL](https://www.opengl.org/) version 3.3. -This repository contains the source code and example scenes for OpenSpace, but does not contain any data. To build and install the client, we refer to the [OpenSpace Wiki](http://wiki.openspaceproject.com/), specifically [building](http://wiki.openspaceproject.com/docs/developers/compiling/general) for [Windows](http://wiki.openspaceproject.com/docs/developers/compiling/windows), [Linux (Ubuntu)](http://wiki.openspaceproject.com/docs/developers/compiling/ubuntu), and [MacOS](http://wiki.openspaceproject.com/docs/developers/compiling/macos). Required preexisting dependencies are: [Boost](http://www.boost.org/) and [Qt](http://www.qt.io/download). Feel free to create issues for missing features, bug reports, or compile problems or contact us via [email](mailto:alexander.bock@me.com?subject=OpenSpace:). +This repository contains the source code and example scenes for OpenSpace, but does not contain any data. To build and install the client, we refer to the [OpenSpace Wiki](http://wiki.openspaceproject.com/), specifically [building](http://wiki.openspaceproject.com/docs/developers/compiling/general) for [Windows](http://wiki.openspaceproject.com/docs/developers/compiling/windows), [Linux (Ubuntu)](http://wiki.openspaceproject.com/docs/developers/compiling/ubuntu), and [MacOS](http://wiki.openspaceproject.com/docs/developers/compiling/macos). Required preexisting dependencies are: [Boost](http://www.boost.org/) and [Qt](http://www.qt.io/download). Feel free to create issues for missing features, bug reports, or compile problems or contact us via [email](mailto:alexander.bock@me.com?subject=OpenSpace:). Regarding any issues, you are very welcome on our [Slack support channel](https://openspacesupport.slack.com) to which you can freely [sign-up](https://join.slack.com/t/openspacesupport/shared_invite/zt-37niq6y9-T0JaCIk4UoFLI4VF5U9Vsw). diff --git a/support/cmake/handle_applications.cmake b/apps/CMakeLists.txt similarity index 50% rename from support/cmake/handle_applications.cmake rename to apps/CMakeLists.txt index 45db49da6b..cbc8540483 100644 --- a/support/cmake/handle_applications.cmake +++ b/apps/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # @@ -22,63 +22,51 @@ # OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # ########################################################################################## - -function (handle_applications) - # Get a list of all of the application directories - file(GLOB appDirs RELATIVE ${OPENSPACE_APPS_DIR} ${OPENSPACE_APPS_DIR}/*) - # Remove the .DS_Store present on Mac - list(REMOVE_ITEM appDirs ".DS_Store") - - # Print all the enabled modules - # message(STATUS "Enabled modules:") - # list(LENGTH enabled_module_names enabled_module_count) - # math(EXPR enabled_module_count "${enabled_module_count} - 1") - # foreach (val RANGE ${enabled_module_count}) - # list(GET enabled_module_names ${val} name) - # list(GET enabled_module_paths ${val} path) - - # message(STATUS "\t${name} (${path})") - # endforeach () - - message(STATUS "Enabled applications:") - foreach (app ${appDirs}) - string(TOUPPER ${app} upper_app) - if (OPENSPACE_APPLICATION_${upper_app}) - message(STATUS "\t${app} (${OPENSPACE_APPS_DIR}/${app})") - endif () - endforeach () - - - # First create all of the options for the applications. In case that one of the - # applications fail to include later, we still want all of them listed - foreach (app ${appDirs}) - set(app_dir "${OPENSPACE_APPS_DIR}/${app}") - string(TOUPPER ${app} upper_app) - - get_application_attribute_default(${app_dir} is_default_application) - option(OPENSPACE_APPLICATION_${upper_app} "Build ${app} application" ${is_default_application}) - endforeach () - - foreach (app ${appDirs}) - set(app_dir "${OPENSPACE_APPS_DIR}/${app}") - string(TOUPPER ${app} upper_app) - if (OPENSPACE_APPLICATION_${upper_app}) - begin_header("Application: ${app}") - add_subdirectory(${app_dir}) - end_header("End: Application: ${app}") - endif () - endforeach () -endfunction() - - # Returns whether the application located at 'path' is a default application or not function (get_application_attribute_default path result) - set(${result} OFF PARENT_SCOPE) - if (EXISTS "${path}/include.cmake") - unset(DEFAULT_APPLICATION) - include(${path}/include.cmake) - if (DEFINED DEFAULT_APPLICATION) - set(${result} ${DEFAULT_APPLICATION} PARENT_SCOPE) - endif () + set(${result} OFF PARENT_SCOPE) + if (EXISTS "${path}/include.cmake") + unset(DEFAULT_APPLICATION) + include(${path}/include.cmake) + if (DEFINED DEFAULT_APPLICATION) + set(${result} ${DEFAULT_APPLICATION} PARENT_SCOPE) endif () + endif () endfunction() + +# Get a list of all of the application directories +file(GLOB app_dirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*) +# Remove the .DS_Store present on Mac +list(REMOVE_ITEM app_dirs ".DS_Store") +list(REMOVE_ITEM app_dirs "CMakeLists.txt") + + + + +message(STATUS "Enabled applications:") +foreach (app ${app_dirs}) + string(TOUPPER ${app} upper_app) + if (OPENSPACE_APPLICATION_${upper_app}) + message(STATUS "\t${app} (${CMAKE_CURRENT_SOURCE_DIR}/${app})") + endif () +endforeach () + +# First create all of the options for the applications. In case that one of the +# applications fail to include later, we still want all of them listed +foreach (app ${app_dirs}) + set(app_dir "${CMAKE_CURRENT_SOURCE_DIR}/${app}") + string(TOUPPER ${app} upper_app) + + get_application_attribute_default(${app_dir} is_default_application) + option(OPENSPACE_APPLICATION_${upper_app} "Build ${app} application" ${is_default_application}) +endforeach () + +foreach (app ${app_dirs}) + set(app_dir "${CMAKE_CURRENT_SOURCE_DIR}/${app}") + string(TOUPPER ${app} upper_app) + if (OPENSPACE_APPLICATION_${upper_app}) + begin_header("Application: ${app}") + add_subdirectory(${app_dir}) + end_header("End: Application: ${app}") + endif () +endforeach () diff --git a/apps/OpenSpace-MinVR/CMakeLists.txt b/apps/OpenSpace-MinVR/CMakeLists.txt index a13829c550..f83661443e 100644 --- a/apps/OpenSpace-MinVR/CMakeLists.txt +++ b/apps/OpenSpace-MinVR/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # diff --git a/apps/OpenSpace-MinVR/main.cpp b/apps/OpenSpace-MinVR/main.cpp index cd1191434b..80d2be0229 100644 --- a/apps/OpenSpace-MinVR/main.cpp +++ b/apps/OpenSpace-MinVR/main.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/CMakeLists.txt b/apps/OpenSpace/CMakeLists.txt index 6df54e9086..7622653bf6 100644 --- a/apps/OpenSpace/CMakeLists.txt +++ b/apps/OpenSpace/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # @@ -27,6 +27,9 @@ include(${GHOUL_BASE_DIR}/support/cmake/message_macros.cmake) include(${OPENSPACE_CMAKE_EXT_DIR}/application_definition.cmake) include(${OPENSPACE_CMAKE_EXT_DIR}/global_variables.cmake) +# We are getting all_enabled_modules from the handle_applications.cmake file which gets +# it from the main CMakeLists file + ##### # OpenVR ##### @@ -34,8 +37,6 @@ option(OPENSPACE_OPENVR_SUPPORT "Build OpenSpace application with OpenVR support if (OPENSPACE_OPENVR_SUPPORT) begin_header("Dependency: OpenVR") - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${OPENSPACE_EXT_DIR}/sgct/cmake/modules/") - find_package(OpenVR REQUIRED) set(SGCT_OPENVR_DEFINITIONS OPENVR_SUPPORT) @@ -43,14 +44,14 @@ if (OPENSPACE_OPENVR_SUPPORT) if (WIN32) find_path(SGCT_OPENVR_INCLUDE_DIRECTORY NAMES SGCTOpenVR.h - PATHS ${OPENSPACE_EXT_DIR}/sgct/additional_includes/openvr NO_DEFAULT_PATH + PATHS ${OPENSPACE_BASE_DIR}/ext/sgct/additional_includes/openvr NO_DEFAULT_PATH REQUIRED ) else () find_path(SGCT_OPENVR_INCLUDE_DIRECTORY NAMES SGCTOpenVR.h PATH_SUFFIXES SGCTOpenVR - PATHS ${OPENSPACE_EXT_DIR}/sgct/additional_includes/openvr + PATHS ${OPENSPACE_BASE_DIR}/ext/sgct/additional_includes/openvr REQUIRED ) endif () @@ -89,10 +90,7 @@ create_new_application(OpenSpace ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns ) -set_source_files_properties( - ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns - PROPERTIES MACOSX_PACKAGE_LOCATION "Resources" -) +set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") target_include_directories( OpenSpace PRIVATE @@ -101,7 +99,7 @@ target_include_directories( ${SPOUT_INCLUDE_DIRS} ) -target_link_libraries(OpenSpace PUBLIC openspace-core ${OPENVR_LIBRARY} ${SPOUT_LIBRARY}) +target_link_libraries(OpenSpace PRIVATE openspace-core openspace-module-collection ${OPENVR_LIBRARY} ${SPOUT_LIBRARY}) target_compile_definitions(OpenSpace PRIVATE ${SGCT_OPENVR_DEFINITIONS} @@ -115,8 +113,7 @@ set(SGCT_DEP_INCLUDE_FREETYPE OFF CACHE BOOL "" FORCE) set(SGCT_DEP_INCLUDE_FMT OFF CACHE BOOL "" FORCE) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/ext/sgct) -target_include_directories(OpenSpace SYSTEM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/ext/sgct/include) -target_link_libraries(OpenSpace PUBLIC sgct) +target_link_libraries(OpenSpace PRIVATE sgct) set_folder_location(sgct "External") set_folder_location(glfw "External/SGCT") @@ -128,15 +125,14 @@ set_folder_location(vrpn "External/SGCT") set_folder_location(zlibstatic "External/SGCT") if (UNIX AND (NOT APPLE)) - target_link_libraries(OpenSpace PUBLIC Xcursor Xinerama X11) + target_link_libraries(OpenSpace PRIVATE Xcursor Xinerama X11) endif () end_header("Dependency: SGCT") begin_header("Dependency: Profile Editor") add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/ext/launcher) -# target_include_directories(OpenSpace SYSTEM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/ext/launcher/include) -target_link_libraries(OpenSpace PUBLIC openspace-ui-launcher) +target_link_libraries(OpenSpace PRIVATE openspace-ui-launcher) end_header("Dependency: Profile Editor") @@ -158,17 +154,17 @@ if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT) set_cef_targets("${CEF_ROOT}" OpenSpace) run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}") -elseif (OPENSPACE_MODULE_WEBBROWSER) +elseif () message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.") endif () if (MSVC) begin_header("Dependency: Dbghelp") # This library is used for being able to output the callstack if an exception escapes - target_link_libraries(OpenSpace PUBLIC Dbghelp.lib) + target_link_libraries(OpenSpace PRIVATE Dbghelp.lib) end_header() endif () if (OPENSPACE_NVTOOLS_ENABLED) - target_link_libraries(OpenSpace "${OPENSPACE_NVTOOLS_PATH}/lib/x64/nvToolsExt64_1.lib") + target_link_libraries(OpenSpace PRIVATE "${OPENSPACE_NVTOOLS_PATH}/lib/x64/nvToolsExt64_1.lib") endif () diff --git a/apps/OpenSpace/ext/launcher/CMakeLists.txt b/apps/OpenSpace/ext/launcher/CMakeLists.txt index 573d872042..460f486412 100644 --- a/apps/OpenSpace/ext/launcher/CMakeLists.txt +++ b/apps/OpenSpace/ext/launcher/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # @@ -90,3 +90,11 @@ set_openspace_compile_settings(openspace-ui-launcher) target_include_directories(openspace-ui-launcher PUBLIC include) target_link_libraries(openspace-ui-launcher PUBLIC Qt5::Core Qt5::Gui Qt5::Widgets openspace-core) +if (MSVC) +set(MSVC_WARNINGS + "/wd4619" # #pragma warning: there is no warning number (raised by Qt headers) + "/wd4946" # reinterpret_cast used between related classes: +) +target_compile_options(openspace-ui-launcher INTERFACE ${MSVC_WARNINGS}) + +endif () diff --git a/apps/OpenSpace/ext/launcher/include/filesystemaccess.h b/apps/OpenSpace/ext/launcher/include/filesystemaccess.h index 4538e33835..e0bcc51d56 100644 --- a/apps/OpenSpace/ext/launcher/include/filesystemaccess.h +++ b/apps/OpenSpace/ext/launcher/include/filesystemaccess.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/include/launcherwindow.h b/apps/OpenSpace/ext/launcher/include/launcherwindow.h index 6b7283ea23..a8be7350a4 100644 --- a/apps/OpenSpace/ext/launcher/include/launcherwindow.h +++ b/apps/OpenSpace/ext/launcher/include/launcherwindow.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/include/profile/additionalscriptsdialog.h b/apps/OpenSpace/ext/launcher/include/profile/additionalscriptsdialog.h index c8288565bc..563a0ec5a7 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/additionalscriptsdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/additionalscriptsdialog.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/include/profile/assetsdialog.h b/apps/OpenSpace/ext/launcher/include/profile/assetsdialog.h index 4bb35e62f2..0e81238f1c 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/assetsdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/assetsdialog.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/include/profile/assettreeitem.h b/apps/OpenSpace/ext/launcher/include/profile/assettreeitem.h index 375fae968b..1274297db1 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/assettreeitem.h +++ b/apps/OpenSpace/ext/launcher/include/profile/assettreeitem.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/include/profile/assettreemodel.h b/apps/OpenSpace/ext/launcher/include/profile/assettreemodel.h index 1426e3ff39..26f538a6fa 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/assettreemodel.h +++ b/apps/OpenSpace/ext/launcher/include/profile/assettreemodel.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/include/profile/cameradialog.h b/apps/OpenSpace/ext/launcher/include/profile/cameradialog.h index 34b497b34a..eeb6a32c06 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/cameradialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/cameradialog.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/include/profile/deltatimesdialog.h b/apps/OpenSpace/ext/launcher/include/profile/deltatimesdialog.h index 3d192af852..744a1db8ac 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/deltatimesdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/deltatimesdialog.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * @@ -61,7 +61,7 @@ public: * * \param evt #QKeyEvent object for the key press event */ - void keyPressEvent(QKeyEvent* evt); + virtual void keyPressEvent(QKeyEvent* evt) override; private slots: diff --git a/apps/OpenSpace/ext/launcher/include/profile/keybindingsdialog.h b/apps/OpenSpace/ext/launcher/include/profile/keybindingsdialog.h index 2bc01477ca..f242f19e42 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/keybindingsdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/keybindingsdialog.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * @@ -56,7 +56,7 @@ public: * * \param evt #QKeyEvent object for the key press event */ - void keyPressEvent(QKeyEvent* evt); + virtual void keyPressEvent(QKeyEvent* evt) override; private slots: void listItemSelected(); diff --git a/apps/OpenSpace/ext/launcher/include/profile/line.h b/apps/OpenSpace/ext/launcher/include/profile/line.h index ebe27607dc..12d2aa9658 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/line.h +++ b/apps/OpenSpace/ext/launcher/include/profile/line.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h b/apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h index eae3617543..f20d680f92 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/marknodesdialog.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * @@ -51,7 +51,7 @@ public: * * \param evt #QKeyEvent object for the key press event */ - void keyPressEvent(QKeyEvent* evt); + void keyPressEvent(QKeyEvent* evt) override; private slots: void listItemSelected(); diff --git a/apps/OpenSpace/ext/launcher/include/profile/metadialog.h b/apps/OpenSpace/ext/launcher/include/profile/metadialog.h index f3a79acdfd..51c500f972 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/metadialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/metadialog.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h b/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h index c2c419528f..6ca0c5b209 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/modulesdialog.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * @@ -52,7 +52,7 @@ public: * * \param evt #QKeyEvent object for the key press event */ - void keyPressEvent(QKeyEvent* evt); + virtual void keyPressEvent(QKeyEvent* evt) override; private slots: void listItemSelected(); diff --git a/apps/OpenSpace/ext/launcher/include/profile/profileedit.h b/apps/OpenSpace/ext/launcher/include/profile/profileedit.h index d8de4c4ab9..7c12634fdd 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/profileedit.h +++ b/apps/OpenSpace/ext/launcher/include/profile/profileedit.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * @@ -75,7 +75,7 @@ public: * * \param evt #QKeyEvent object for the key press event */ - void keyPressEvent(QKeyEvent* evt); + virtual void keyPressEvent(QKeyEvent* evt) override; private slots: void duplicateProfile(); diff --git a/apps/OpenSpace/ext/launcher/include/profile/propertiesdialog.h b/apps/OpenSpace/ext/launcher/include/profile/propertiesdialog.h index ac13ed474e..0938bc8659 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/propertiesdialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/propertiesdialog.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * @@ -53,7 +53,7 @@ public: * * \param evt #QKeyEvent object for the key press event */ - void keyPressEvent(QKeyEvent* evt); + virtual void keyPressEvent(QKeyEvent* evt) override; private slots: void listItemSelected(); diff --git a/apps/OpenSpace/ext/launcher/include/profile/timedialog.h b/apps/OpenSpace/ext/launcher/include/profile/timedialog.h index 9a0a6c4421..394b477f0f 100644 --- a/apps/OpenSpace/ext/launcher/include/profile/timedialog.h +++ b/apps/OpenSpace/ext/launcher/include/profile/timedialog.h @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/src/filesystemaccess.cpp b/apps/OpenSpace/ext/launcher/src/filesystemaccess.cpp index f0a98ce58d..7c9634b47e 100644 --- a/apps/OpenSpace/ext/launcher/src/filesystemaccess.cpp +++ b/apps/OpenSpace/ext/launcher/src/filesystemaccess.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * @@ -56,14 +56,13 @@ void FileSystemAccess::parseChildDirElements(QFileInfo fileInfo, std::string spa QFileInfoList fileList = dir.entryInfoList(_fileFilterOptions); for (int i = 0; i < fileList.size(); i++) { - QFileInfo fileInfo = fileList[i]; - std::string res = space + fileInfo.fileName().toStdString(); + QFileInfo fi = fileList[i]; + std::string res = space + fi.fileName().toStdString(); - if (fileInfo.isDir()) { + if (fi.isDir()) { if (level != 0 || (level == 0 && isApprovedPath(res))) { dirNames.push_back(res); - parseChildDirElements(fileInfo, (space + " "), level + 1, dirNames, - output); + parseChildDirElements(fi, (space + " "), level + 1, dirNames, output); } } else { diff --git a/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp b/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp index 6d1e775849..6d50f5788c 100644 --- a/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp +++ b/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -220,8 +221,17 @@ QWidget* LauncherWindow::createCentralWidget() { connect( startButton, &QPushButton::released, [this]() { - _shouldLaunch = true; - close(); + if (_profileBox->currentText().isEmpty()) { + QMessageBox::critical( + this, + "Empty Profile", + "Cannot launch with an empty profile" + ); + } + else { + _shouldLaunch = true; + close(); + } } ); startButton->setObjectName("large"); @@ -301,6 +311,13 @@ void LauncherWindow::populateProfilesList(std::string preset) { _profileBox->clear(); + if (!std::filesystem::exists(_profilePath)) { + LINFOC( + "LauncherWindow", + fmt::format("Could not find profile folder '{}'", _profilePath) + ); + return; + } // Add all the files with the .profile extension to the dropdown for (const fs::directory_entry& p : fs::directory_iterator(_profilePath)) { if (p.path().extension() != ".profile") { @@ -321,12 +338,20 @@ void LauncherWindow::populateWindowConfigsList(std::string preset) { namespace fs = std::filesystem; _windowConfigBox->clear(); - // Add all the files with the .xml extension to the dropdown - for (const fs::directory_entry& p : fs::directory_iterator(_configPath)) { - if (p.path().extension() != ".xml") { - continue; + if (std::filesystem::exists(_configPath)) { + // Add all the files with the .xml extension to the dropdown + for (const fs::directory_entry& p : fs::directory_iterator(_configPath)) { + if (p.path().extension() != ".xml") { + continue; + } + _windowConfigBox->addItem(QString::fromStdString(p.path().stem().string())); } - _windowConfigBox->addItem(QString::fromStdString(p.path().stem().string())); + } + else { + LINFOC( + "LauncherWindow", + fmt::format("Could not find config folder '{}'", _configPath) + ); } // Try to find the requested configuration file and set it as the current one. As we diff --git a/apps/OpenSpace/ext/launcher/src/profile/additionalscriptsdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/additionalscriptsdialog.cpp index 30a6ccec84..7c584e2f13 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/additionalscriptsdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/additionalscriptsdialog.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/src/profile/assetsdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/assetsdialog.cpp index e8d99b617c..9993f43ce9 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/assetsdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/assetsdialog.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * @@ -207,12 +207,9 @@ QString AssetsDialog::createTextSummary() { return ""; } QString summary; - for (int i = 0; i < summaryItems.size(); ++i) { + for (size_t i = 0; i < summaryItems.size(); ++i) { bool existsInFilesystem = summaryItems.at(i)->doesExistInFilesystem(); - constexpr const char* ExistsFormat = "{}
"; - constexpr const char* NotExistsFormat = "{}
"; - std::string s = existsInFilesystem ? fmt::format("{}
", summaryPaths.at(i)) : fmt::format("{}
", summaryPaths.at(i)); @@ -233,6 +230,6 @@ void AssetsDialog::parseSelections() { accept(); } -void AssetsDialog::selected(const QModelIndex& sel) { +void AssetsDialog::selected(const QModelIndex&) { _summary->setText(createTextSummary()); } diff --git a/apps/OpenSpace/ext/launcher/src/profile/assettreeitem.cpp b/apps/OpenSpace/ext/launcher/src/profile/assettreeitem.cpp index 199a755fb1..e08f79d3ec 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/assettreeitem.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/assettreeitem.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * @@ -55,7 +55,7 @@ int AssetTreeItem::row() const { _parentItem->_childItems.cend(), this ); - return std::distance(_parentItem->_childItems.cbegin(), it); + return static_cast(std::distance(_parentItem->_childItems.cbegin(), it)); } else { return 0; @@ -63,11 +63,11 @@ int AssetTreeItem::row() const { } int AssetTreeItem::columnCount() const { - return _itemData.size(); + return static_cast(_itemData.size()); } QVariant AssetTreeItem::data(int column) const { - if (column < 0 || column >= _itemData.size()) { + if (column < 0 || column >= static_cast(_itemData.size())) { return QVariant(); } else { @@ -76,7 +76,7 @@ QVariant AssetTreeItem::data(int column) const { } bool AssetTreeItem::setData(int column, const QVariant& value) { - if (column < 0 || column >= _itemData.size()) { + if (column < 0 || column >= static_cast(_itemData.size())) { return false; } @@ -112,11 +112,11 @@ bool AssetTreeItem::doesExistInFilesystem() const { } QString AssetTreeItem::name() const { - return QString(data(0).toString()); + return data(0).toString(); } bool AssetTreeItem::insertChildren(int position, int count, int columns) { - if (position < 0 || position > _childItems.size()) { + if (position < 0 || position > static_cast(_childItems.size())) { return false; } @@ -130,7 +130,7 @@ bool AssetTreeItem::insertChildren(int position, int count, int columns) { } bool AssetTreeItem::removeChildren(int position, int count) { - if (position < 0 || position + count > _childItems.size()) { + if (position < 0 || position + count > static_cast(_childItems.size())) { return false; } @@ -143,7 +143,7 @@ bool AssetTreeItem::removeChildren(int position, int count) { } bool AssetTreeItem::insertColumns(int position, int columns) { - if (position < 0 || position > _itemData.size()) { + if (position < 0 || position > static_cast(_itemData.size())) { return false; } diff --git a/apps/OpenSpace/ext/launcher/src/profile/assettreemodel.cpp b/apps/OpenSpace/ext/launcher/src/profile/assettreemodel.cpp index 16b7ba2b77..60bd29f6e2 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/assettreemodel.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/assettreemodel.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp index 2137770c36..c5adbc8c6d 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/cameradialog.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * @@ -191,22 +191,22 @@ QWidget* CameraDialog::createNavStateWidget() { QWidget* posBox = new QWidget; QBoxLayout* posLayout = new QHBoxLayout(posBox); posLayout->setContentsMargins(0, 0, 0, 0); - posLayout->addWidget(new QLabel("X")); + posLayout->addWidget(new QLabel("X [m]")); _navState.positionX = new QLineEdit; _navState.positionX->setValidator(new QDoubleValidator); - _navState.positionX->setToolTip("Camera position vector (x)"); + _navState.positionX->setToolTip("Camera position vector (x) [m]"); posLayout->addWidget(_navState.positionX); - posLayout->addWidget(new QLabel("Y")); + posLayout->addWidget(new QLabel("Y [m]")); _navState.positionY = new QLineEdit; _navState.positionY->setValidator(new QDoubleValidator); - _navState.positionY->setToolTip("Camera position vector (y)"); + _navState.positionY->setToolTip("Camera position vector (y) [m]"); posLayout->addWidget(_navState.positionY); - posLayout->addWidget(new QLabel("Z")); + posLayout->addWidget(new QLabel("Z [m]")); _navState.positionZ = new QLineEdit; _navState.positionZ->setValidator(new QDoubleValidator); - _navState.positionZ->setToolTip("Camera position vector (z)"); + _navState.positionZ->setToolTip("Camera position vector (z) [m]"); posLayout->addWidget(_navState.positionZ); layout->addWidget(posBox, 3, 1); } @@ -277,7 +277,7 @@ QWidget* CameraDialog::createGeoWidget() { _geoState.longitude->setToolTip("Longitude of camera focus point (+/- 180 degrees)"); layout->addWidget(_geoState.longitude, 2, 1); - layout->addWidget(new QLabel("Altitude"), 3, 0); + layout->addWidget(new QLabel("Altitude [m]"), 3, 0); _geoState.altitude = new QLineEdit; _geoState.altitude->setValidator(new QDoubleValidator); _geoState.altitude->setToolTip("Altitude of camera (meters)"); @@ -308,7 +308,7 @@ bool CameraDialog::areRequiredFormsFilledAndValid() { allFormsOk = false; addErrorMsg("Position Z is empty"); } - int upVectorCount = 0; + const bool hasUpX = !_navState.upX->text().isEmpty(); const bool hasUpY = !_navState.upY->text().isEmpty(); const bool hasUpZ = !_navState.upZ->text().isEmpty(); diff --git a/apps/OpenSpace/ext/launcher/src/profile/deltatimesdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/deltatimesdialog.cpp index 8beac8fb1d..33db001533 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/deltatimesdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/deltatimesdialog.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * @@ -75,7 +75,7 @@ namespace { break; } } - return checkForTimeDescription(i, value); + return checkForTimeDescription(static_cast(i), value); } } // namespace @@ -230,8 +230,8 @@ void DeltaTimesDialog::listItemSelected() { void DeltaTimesDialog::setLabelForKey(int index, bool editMode, std::string color) { std::string labelS = "Set Simulation Time Increment for key"; - if (index >= _data.size()) { - index = _data.size() - 1; + if (index >= static_cast(_data.size())) { + index = static_cast(_data.size()) - 1; } if (editMode) { labelS += " '" + createSummaryForDeltaTime(index, false) + "':"; @@ -242,14 +242,14 @@ void DeltaTimesDialog::setLabelForKey(int index, bool editMode, std::string colo } void DeltaTimesDialog::valueChanged(const QString& text) { - if (_seconds->text().isEmpty()) { + if (text.isEmpty()) { _errorMsg->setText(""); } else { - int value = _seconds->text().toDouble(); + int value = text.toDouble(); if (value != 0) { _value->setText(QString::fromStdString( - timeDescription(_seconds->text().toDouble())) + timeDescription(text.toDouble())) ); _errorMsg->setText(""); } @@ -358,14 +358,14 @@ void DeltaTimesDialog::parseSelections() { if ((_data.size() == 1) && (_data.at(0) == 0)) { _data.clear(); } - int finalNonzeroIndex = _data.size() - 1; + int finalNonzeroIndex = static_cast(_data.size()) - 1; for (; finalNonzeroIndex >= 0; --finalNonzeroIndex) { if (_data.at(finalNonzeroIndex) != 0) { break; } } std::vector tempDt; - for (size_t i = 0; i < (finalNonzeroIndex + 1); ++i) { + for (int i = 0; i < (finalNonzeroIndex + 1); ++i) { tempDt.push_back(_data[i]); } _profile.setDeltaTimes(tempDt); diff --git a/apps/OpenSpace/ext/launcher/src/profile/keybindingsdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/keybindingsdialog.cpp index 2201d728ba..8ea5dcf272 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/keybindingsdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/keybindingsdialog.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * @@ -323,7 +323,7 @@ void KeybindingsDialog::keySelected(int index) { int KeybindingsDialog::indexInKeyMapping(std::vector& mapVector, int keyInt) { const auto it = std::find(mapVector.cbegin(), mapVector.cend(), keyInt); - return std::distance(mapVector.cbegin(), it); + return static_cast(std::distance(mapVector.cbegin(), it)); } bool KeybindingsDialog::isLineEmpty(int index) { @@ -338,8 +338,6 @@ bool KeybindingsDialog::isLineEmpty(int index) { } void KeybindingsDialog::listItemAdded() { - int currentListSize = _list->count(); - _data.push_back(BlankKey); _list->addItem(new QListWidgetItem(" (Enter details below & click 'Save')")); // Scroll down to that blank line highlighted diff --git a/apps/OpenSpace/ext/launcher/src/profile/line.cpp b/apps/OpenSpace/ext/launcher/src/profile/line.cpp index 336dc722a0..c7f2821cf1 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/line.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/line.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/src/profile/marknodesdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/marknodesdialog.cpp index 604827f837..9af27989c7 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/marknodesdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/marknodesdialog.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * @@ -112,7 +112,7 @@ void MarkNodesDialog::listItemAdded() { std::string itemToAdd = _newNode->text().toStdString(); const auto it = std::find(_data.cbegin(), _data.cend(), itemToAdd); if (it != _data.end()) { - _list->setCurrentRow(std::distance(_data.cbegin(), it)); + _list->setCurrentRow(static_cast(std::distance(_data.cbegin(), it))); } else { _data.push_back(itemToAdd); @@ -131,7 +131,7 @@ void MarkNodesDialog::listItemRemove() { QListWidgetItem* item = _list->currentItem(); int index = _list->row(item); - if (index < 0 || index >= _markedNodesListItems.size()) { + if (index < 0 || index >= static_cast(_markedNodesListItems.size())) { return; } diff --git a/apps/OpenSpace/ext/launcher/src/profile/metadialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/metadialog.cpp index c96c206426..1edba2fdee 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/metadialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/metadialog.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/src/profile/modulesdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/modulesdialog.cpp index 217ea9e5d8..5f7ad9f7f4 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/modulesdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/modulesdialog.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/src/profile/profileedit.cpp b/apps/OpenSpace/ext/launcher/src/profile/profileedit.cpp index 46e7a8d942..2b945851a4 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/profileedit.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/profileedit.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * @@ -50,7 +50,7 @@ using namespace openspace; namespace { - QString labelText(int size, QString title) { + QString labelText(size_t size, QString title) { QString label; if (size > 0) { label = title + " (" + QString::number(size) + ")"; @@ -98,9 +98,9 @@ ProfileEdit::ProfileEdit(Profile& profile, const std::string& profileName, const std::vector& readOnlyProfiles, QWidget* parent) : QDialog(parent) + , _profile(profile) , _assetBasePath(std::move(assetBasePath)) , _profileBasePath(std::move(profileBasePath)) - , _profile(profile) , _readOnlyProfiles(readOnlyProfiles) { setWindowTitle("Profile Editor"); @@ -373,7 +373,7 @@ void ProfileEdit::duplicateProfile() { // will remove the suffix here first profile = profile.substr(0, it); } - catch (const std::invalid_argument& e) { + catch (const std::invalid_argument&) { // If this exception is thrown, we did find a separator character but the // substring afterwards was not a number, so the user just added a separator // by themselves. In this case we don't do anything diff --git a/apps/OpenSpace/ext/launcher/src/profile/propertiesdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/propertiesdialog.cpp index 5ae897d8b8..8e1f9477f9 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/propertiesdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/propertiesdialog.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/launcher/src/profile/timedialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/timedialog.cpp index 678b5bf504..03d9526b82 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/timedialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/timedialog.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index f3094de5ba..fed1f55a0b 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit f3094de5ba02d86ee899f4108cf066e37652c65e +Subproject commit fed1f55a0b259a70a5ad8461a4e56f07990609f1 diff --git a/apps/OpenSpace/main.cpp b/apps/OpenSpace/main.cpp index c41a94245f..b370da39e6 100644 --- a/apps/OpenSpace/main.cpp +++ b/apps/OpenSpace/main.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * @@ -41,13 +41,11 @@ #include #include #include -//#include -#include -#ifdef _WIN32 +#include +#ifdef WIN32 #define GLFW_EXPOSE_NATIVE_WIN32 -#else -#define GLFW_INCLUDE_NONE #endif +#include #include #include #include @@ -224,6 +222,8 @@ void mainInitFunc(GLFWwindow*) { global::openSpaceEngine->initialize(); LDEBUG("Initializing OpenSpace Engine finished"); +#ifndef __APPLE__ + // Apparently: "Cocoa: Regular windows do not have icons on macOS" { std::string path = absPath("${DATA}/openspace-icon.png"); int x; @@ -242,6 +242,7 @@ void mainInitFunc(GLFWwindow*) { stbi_image_free(icons[0].pixels); } +#endif // __APPLE__ currentWindow = Engine::instance().windows().front().get(); currentViewport = currentWindow->viewports().front().get(); @@ -575,18 +576,18 @@ void mainPostDrawFunc() { glBindTexture(GL_TEXTURE_2D, texId); w.leftOrMain.handle->SendTexture( texId, - GL_TEXTURE_2D, + GLuint(GL_TEXTURE_2D), window.framebufferResolution().x, window.framebufferResolution().y ); } if (w.right.initialized) { - const GLuint texId = window.frameBufferTexture(Window::TextureIndex::RightEye); - glBindTexture(GL_TEXTURE_2D, texId); + const GLuint tId = window.frameBufferTexture(Window::TextureIndex::RightEye); + glBindTexture(GL_TEXTURE_2D, tId); w.right.handle->SendTexture( - texId, - GL_TEXTURE_2D, + tId, + GLuint(GL_TEXTURE_2D), window.framebufferResolution().x, window.framebufferResolution().y ); @@ -925,6 +926,9 @@ void setSgctDelegateFunctions() { return currentWindow->swapGroupFrameNumber(); }; + sgctDelegate.setScreenshotFolder = [](std::string path) { + Settings::instance().setCapturePath(std::move(path)); + }; } void checkCommandLineForSettings(int& argc, char** argv, bool& hasSGCT, bool& hasProfile, @@ -1008,9 +1012,7 @@ std::string selectedSgctProfileFromLauncher(LauncherWindow& lw, bool hasCliSGCTC return config; } -int main(int argc, char** argv) { - glfwInit(); - +int main(int argc, char* argv[]) { #ifdef WIN32 SetUnhandledExceptionFilter(generateMiniDump); #endif // WIN32 @@ -1166,19 +1168,38 @@ int main(int argc, char** argv) { sgctFunctionName ); + // (abock, 2020-12-07) For some reason on Apple the keyboard handler in CEF will call + // the Qt one even if the QApplication was destroyed, leading to invalid memory + // access. The only way we could fix this for the release was to keep the + // QApplication object around until the end of the program. Even though the Qt + // keyboard handler gets called, it doesn't do anything so everything still works. +#ifdef __APPLE__ + int qac = 0; + QApplication app(qac, nullptr); +#endif // __APPLE__ + bool skipLauncher = (hasProfile && hasSGCTConfig) || global::configuration->bypassLauncher; if (!skipLauncher) { +#ifndef __APPLE__ int qac = 0; QApplication app(qac, nullptr); - LauncherWindow win(!hasProfile, - *global::configuration, !hasSGCTConfig, windowCfgPreset, nullptr); +#endif // __APPLE__ + + LauncherWindow win( + !hasProfile, + *global::configuration, + !hasSGCTConfig, + windowCfgPreset, + nullptr + ); win.show(); app.exec(); if (!win.wasLaunchSelected()) { exit(EXIT_SUCCESS); } + glfwInit(); global::configuration->profile = win.selectedProfile(); windowConfiguration = selectedSgctProfileFromLauncher( @@ -1188,7 +1209,14 @@ int main(int argc, char** argv) { labelFromCfgFile, xmlExt ); + } else { + glfwInit(); } + if (global::configuration->profile.empty()) { + LFATAL("Cannot launch with an empty profile"); + exit(EXIT_FAILURE); + } + // Prepend the outgoing sgctArguments with the program name // as well as the configuration file that sgct is supposed to use @@ -1197,7 +1225,7 @@ int main(int argc, char** argv) { arguments.insert(arguments.begin() + 2, absPath(windowConfiguration)); // Need to set this before the creation of the sgct::Engine - + Log::instance().setLogToConsole(false); Log::instance().setShowTime(false); Log::instance().setShowLogLevel(false); diff --git a/apps/Sync/CMakeLists.txt b/apps/Sync/CMakeLists.txt index 71bfbf3859..58ba3cbf69 100644 --- a/apps/Sync/CMakeLists.txt +++ b/apps/Sync/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # @@ -37,7 +37,7 @@ create_new_application(Sync MACOSX_BUNDLE ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns ) -target_link_libraries(Sync PUBLIC openspace-core) +target_link_libraries(Sync PRIVATE openspace-core openspace-module-collection) # Web Browser and Web gui # Why not put these in the module's path? Because they do not have access to the diff --git a/apps/Sync/main.cpp b/apps/Sync/main.cpp index 7ea54a745a..1de9e7aad5 100644 --- a/apps/Sync/main.cpp +++ b/apps/Sync/main.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/TaskRunner/CMakeLists.txt b/apps/TaskRunner/CMakeLists.txt index 8fa2b9bbd1..c000cb973f 100644 --- a/apps/TaskRunner/CMakeLists.txt +++ b/apps/TaskRunner/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # @@ -37,7 +37,7 @@ create_new_application(TaskRunner MACOSX_BUNDLE ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns ) -target_link_libraries(TaskRunner PUBLIC openspace-core) +target_link_libraries(TaskRunner PRIVATE openspace-core openspace-module-collection) # Web Browser and Web gui # Why not put these in the module's path? Because they do not have access to the diff --git a/apps/TaskRunner/main.cpp b/apps/TaskRunner/main.cpp index f41d8105ab..cd2c1be9ac 100644 --- a/apps/TaskRunner/main.cpp +++ b/apps/TaskRunner/main.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * @@ -107,6 +107,7 @@ int main(int argc, char** argv) { using namespace openspace; ghoul::initialize(); + global::create(); // Register the path of the executable, // to make it possible to find other files in the same directory. @@ -117,9 +118,9 @@ int main(int argc, char** argv) { ); std::string configFile = configuration::findConfiguration(); - global::configuration = configuration::loadConfigurationFromFile(configFile); - openspace::global::openSpaceEngine.registerPathTokens(); - global::openSpaceEngine.initialize(); + *global::configuration = configuration::loadConfigurationFromFile(configFile); + openspace::global::openSpaceEngine->registerPathTokens(); + global::openSpaceEngine->initialize(); ghoul::cmdparser::CommandlineParser commandlineParser( "OpenSpace TaskRunner", @@ -157,5 +158,7 @@ int main(int argc, char** argv) { std::cout << "TASK > "; } + global::destroy(); + ghoul::deinitialize(); return 0; }; diff --git a/apps/Wormhole/CMakeLists.txt b/apps/Wormhole/CMakeLists.txt index a268c81d2c..2478659808 100644 --- a/apps/Wormhole/CMakeLists.txt +++ b/apps/Wormhole/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2020 # +# Copyright (c) 2014-2021 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # @@ -38,7 +38,7 @@ create_new_application( ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns ) -target_link_libraries(Wormhole PUBLIC openspace-core) +target_link_libraries(Wormhole PRIVATE openspace-core openspace-module-collection) # Web Browser and Web gui # Why not put these in the module's path? Because they do not have access to the diff --git a/apps/Wormhole/main.cpp b/apps/Wormhole/main.cpp index 487244aef8..adfec873be 100644 --- a/apps/Wormhole/main.cpp +++ b/apps/Wormhole/main.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2020 * + * Copyright (c) 2014-2021 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/data/assets/base.asset b/data/assets/base.asset index ee94a61231..e89a6a74c9 100644 --- a/data/assets/base.asset +++ b/data/assets/base.asset @@ -7,22 +7,62 @@ asset.require('./base_blank') -- Specifying which other assets should be loaded in this scene asset.require('scene/solarsystem/sun/sun') asset.require('scene/solarsystem/sun/glare') +asset.require('scene/solarsystem/sun/habitablezone') asset.require('scene/solarsystem/sun/default_layers') asset.require('scene/solarsystem/planets/planets') asset.require('scene/solarsystem/planets/default_layers') -asset.require('scene/solarsystem/planets/mars/moons/phobos') -asset.require('scene/solarsystem/planets/mars/moons/deimos') asset.require('scene/solarsystem/dwarf_planets/pluto/system') asset.require('scene/solarsystem/dwarf_planets/pluto/default_layers') asset.require('scene/solarsystem/dwarf_planets/pluto/charon/default_layers') asset.require('scene/milkyway/milkyway/volume') asset.require('scene/milkyway/constellations/constellation_art') asset.require('scene/milkyway/constellations/constellation_keybinds') +asset.require('scene/milkyway/objects/orionnebula/orionnebula') asset.require('util/launcher_images') +-- For exoplanet system visualizations +asset.require('scene/milkyway/exoplanets/exoplanets_data') +asset.require('scene/milkyway/exoplanets/exoplanets_textures') + local assetHelper = asset.require('util/asset_helper') -assetHelper.requireAll(asset, 'scene/milkyway/exoplanets') -assetHelper.requireAll(asset, 'scene/digitaluniverse') +asset.require('scene/digitaluniverse/2dF') +asset.require('scene/digitaluniverse/2mass') +asset.require('scene/digitaluniverse/6dF') +asset.require('scene/digitaluniverse/abell') +asset.require('scene/digitaluniverse/alternatestarlabels') +asset.require('scene/digitaluniverse/backgroundradiation') +-- asset.require('scene/digitaluniverse/backgroundradiation_multiverse') +asset.require('scene/digitaluniverse/clusters') +asset.require('scene/digitaluniverse/constellationbounds') +asset.require('scene/digitaluniverse/constellations') +asset.require('scene/digitaluniverse/deepsky') +asset.require('scene/digitaluniverse/dwarfs') +asset.require('scene/digitaluniverse/exoplanets') +asset.require('scene/digitaluniverse/globularclusters') +asset.require('scene/digitaluniverse/grids') +asset.require('scene/digitaluniverse/groups') +asset.require('scene/digitaluniverse/h2regions') +asset.require('scene/digitaluniverse/kepler') +asset.require('scene/digitaluniverse/localdwarfs') +asset.require('scene/digitaluniverse/milkyway') +asset.require('scene/digitaluniverse/milkyway_arm_labels') +asset.require('scene/digitaluniverse/milkyway_data') +asset.require('scene/digitaluniverse/milkyway_label') +asset.require('scene/digitaluniverse/milkyway_sphere') +asset.require('scene/digitaluniverse/obassociations') +asset.require('scene/digitaluniverse/openclusters') +asset.require('scene/digitaluniverse/planetarynebulae') +asset.require('scene/digitaluniverse/pulsars') +asset.require('scene/digitaluniverse/quasars') +asset.require('scene/digitaluniverse/sdss') +asset.require('scene/digitaluniverse/starlabels') +asset.require('scene/digitaluniverse/starorbits') +asset.require('scene/digitaluniverse/stars') +asset.require('scene/digitaluniverse/superclusters') +asset.require('scene/digitaluniverse/supernovaremnants') +asset.require('scene/digitaluniverse/tully') +asset.require('scene/digitaluniverse/voids') + asset.require('customization/globebrowsing') diff --git a/data/assets/customization/globebrowsing.asset b/data/assets/customization/globebrowsing.asset index f9ed7a949e..ae89b790de 100644 --- a/data/assets/customization/globebrowsing.asset +++ b/data/assets/customization/globebrowsing.asset @@ -1,10 +1,13 @@ --- Add require statements for assets exporting the neccessary globes --- here we add Mars, Moon and Mercury: -asset.require('../scene/solarsystem/planets/mars/mars') -asset.require('../scene/solarsystem/planets/earth/moon/moon') -asset.require('../scene/solarsystem/planets/mercury/mercury') - +---------------------------------------- +-- Configuration options for this asset local CreateFocusNodes = false +local AddMarsLayers = true +local AddMoonLayers = true +local AddMercuryLayers = true +---------------------------------------- + +-- If you add layers for different planets than listed here, be sure to add an +-- asset.require(...) statement in here similar to the ones that are used below -- Add folders to this list that contain .info files describing patches -- OBS: Even on Windows, you have to use forward slashes (/) or double backslashes (\\) @@ -51,6 +54,24 @@ local vrt_folders = { } } +-- Add require statements for assets exporting the neccessary globes +-- here we add Mars, Moon and Mercury: +if AddMarsLayers then + asset.require('../scene/solarsystem/planets/mars/mars') +else + vrt_folders['Mars'] = nil +end +if AddMoonLayers then + asset.require('../scene/solarsystem/planets/earth/moon/moon') +else + vrt_folders['Moon'] = nil +end +if AddMercuryLayers then + asset.require('../scene/solarsystem/planets/mercury/mercury') +else + vrt_folders['Mercury'] = nil +end + asset.onInitialize(function () -- Add local patches described at the top of this file for obj, list in pairs(vrt_folders) do diff --git a/data/assets/examples/discs.asset b/data/assets/examples/discs.asset new file mode 100644 index 0000000000..0b15b2115b --- /dev/null +++ b/data/assets/examples/discs.asset @@ -0,0 +1,25 @@ +local assetHelper = asset.require('util/asset_helper') + +local color = {0.0, 1.0, 1.0} + +-- @TODO (emmbr 2020-02-03) Potential threading issue later on? This will run on the main thread +local singeColorTexturePath = openspace.createSingeColorImage("example_ring_color", color) + +local BasicDisc = { + Identifier = "BasicDisc", + Parent = "Root", + Renderable = { + Type = "RenderableDisc", + Texture = singeColorTexturePath, + Size = 1e10, + Width = 0.5 + }, + GUI = { + Name = "Basic Disc", + Path = "/Examples/Discs" + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { + BasicDisc +}) diff --git a/data/assets/examples/grids.asset b/data/assets/examples/grids.asset index 8f001c06ad..e29652e3bc 100644 --- a/data/assets/examples/grids.asset +++ b/data/assets/examples/grids.asset @@ -1,6 +1,6 @@ local assetHelper = asset.require('util/asset_helper') -local scale = 3E11 +local scale = 149597870700 -- 1 AU local radialGrid = { Identifier = "ExampleRadialGrid", @@ -14,9 +14,10 @@ local radialGrid = { Renderable = { Type = "RenderableRadialGrid", Opacity = 0.8, - GridColor = {0.6, 1.0, 0.7}, + Color = { 0.6, 1.0, 0.7 }, LineWidth = 3.0, - GridSegments = {3, 4}, + GridSegments = { 3, 4 }, + OuterSize = 1.0, InnerRadius = 0.2, Enabled = false }, @@ -36,10 +37,10 @@ local planarGrid = { }, Renderable = { Type = "RenderableGrid", - GridColor = {0.0, 1.0, 0.8}, + Color = { 0.0, 1.0, 0.8 }, LineWidth = 2.0, - Segments = {5, 10}, - Size = {1, 2}, + Segments = { 5, 10 }, + Size = { 1, 2 }, Enabled = false }, GUI = { @@ -48,7 +49,51 @@ local planarGrid = { } } -assetHelper.registerSceneGraphNodesAndExport(asset, { - radialGrid, - planarGrid +local sphericalGrid = { + Identifier = "ExampleSphericalGrid", + Transform = { + Scale = { + Type = "StaticScale", + Scale = scale + } + }, + Renderable = { + Type = "RenderableSphericalGrid", + Color = { 1.0, 0.5, 0.2 }, + LineWidth = 2.0, + Segments = 40, + Enabled = false + }, + GUI = { + Name = "Example Spherical Grid", + Path = "/Examples/Grids" + } +} + +local boxGrid = { + Identifier = "ExampleBoxGrid", + Transform = { + Scale = { + Type = "StaticScale", + Scale = scale + } + }, + Renderable = { + Type = "RenderableBoxGrid", + Color = { 0.5, 0.0, 1.0 }, + LineWidth = 2.0, + Size = { 2, 2, 2 }, + Enabled = false + }, + GUI = { + Name = "Example Box Grid", + Path = "/Examples/Grids" + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { + radialGrid, + planarGrid, + sphericalGrid, + boxGrid }) diff --git a/data/assets/scene/digitaluniverse/6dF.asset b/data/assets/scene/digitaluniverse/6dF.asset index a77c03fd11..c7871b5e69 100644 --- a/data/assets/scene/digitaluniverse/6dF.asset +++ b/data/assets/scene/digitaluniverse/6dF.asset @@ -30,7 +30,7 @@ local object = { ColorRange = { { 0.0, 0.075 }, { 1.0, 10.0 } }, Unit = "Mpc", ScaleFactor = 534.0, - BillboardMaxSize = 7.0, + BillboardMaxSize = 9.0, EnablePixelSizeControl = true, }, GUI = { diff --git a/data/assets/scene/digitaluniverse/backgroundradiation.asset b/data/assets/scene/digitaluniverse/backgroundradiation.asset index 1a7e4d7d44..fbe1002e5e 100644 --- a/data/assets/scene/digitaluniverse/backgroundradiation.asset +++ b/data/assets/scene/digitaluniverse/backgroundradiation.asset @@ -1,13 +1,5 @@ local assetHelper = asset.require('util/asset_helper') - - - -local textures = asset.syncedResource({ - Name = "Background Radiation Textures", - Type = "HttpSynchronization", - Identifier = "digitaluniverse_backgroundradiation_textures", - Version = 2 -}) +local textures = asset.require('./backgroundradiation_textures').textures local speck = asset.syncedResource({ Name = "Background Radiation Speck Files", @@ -94,126 +86,6 @@ local planck = { } } -local multiverse_planck_1 = { - Identifier = "PlanckMultiverse1", - Transform = { - Translation = { - Type = "StaticTranslation", - Position = { 0.0, 0.0, 2000E23} - }, - Rotation = { - Type = "StaticRotation", - Rotation = { 0, 0, 3.14159265359 } - } - }, - Renderable = { - Type = "RenderableSphere", - Enabled = false, - Size = 3975.41417036064E23, - Segments = 80, - Opacity = 0.3, - Texture = textures .. "/cmb4k.jpg", - Orientation = "Both", - MirrorTexture = true, - UseAdditiveBlending = true, - FadeInThreshold = 0.4 - }, - GUI = { - Name = "Planck Multiverse 1", - Path = "/Universe/Cosmic Microwave Background" - } -} - -local multiverse_planck_2 = { - Identifier = "PlanckMultiverse2", - Transform = { - Translation = { - Type = "StaticTranslation", - Position = { 2500E23, 0.0, 2000E23} - }, - Rotation = { - Type = "StaticRotation", - Rotation = { 0, 0, 3.14159265359 } - } - }, - Renderable = { - Type = "RenderableSphere", - Enabled = false, - Size = 3975.41417036064E23, - Segments = 80, - Opacity = 0.3, - Texture = textures .. "/cmb4k.jpg", - Orientation = "Both", - MirrorTexture = true, - UseAdditiveBlending = true, - FadeInThreshold = 0.4 - }, - GUI = { - Name = "Planck Multiverse 2", - Path = "/Universe/Cosmic Microwave Background" - } -} - -local multiverse_planck_3 = { - Identifier = "PlanckMultiverse3", - Transform = { - Translation = { - Type = "StaticTranslation", - Position = { 2500E23, 5000E23, 2000E23} - }, - Rotation = { - Type = "StaticRotation", - Rotation = { 0, 0, 3.14159265359 } - } - }, - Renderable = { - Type = "RenderableSphere", - Enabled = false, - Size = 3975.41417036064E23, - Segments = 80, - Opacity = 0.3, - Texture = textures .. "/cmb4k.jpg", - Orientation = "Both", - MirrorTexture = true, - UseAdditiveBlending = true, - FadeInThreshold = 0.4 - }, - GUI = { - Name = "Planck Multiverse 3", - Path = "/Universe/Cosmic Microwave Background" - } -} - -local multiverse_planck_4 = { - Identifier = "PlanckMultiverse4", - Transform = { - Translation = { - Type = "StaticTranslation", - Position = { 0.0, 10000E23, 0.0 } - }, - Rotation = { - Type = "StaticRotation", - Rotation = { 0, 0, 3.14159265359 } - } - }, - Renderable = { - Type = "RenderableSphere", - Enabled = false, - Size = 3975.41417036064E23, - Segments = 80, - Opacity = 0.3, - Texture = textures .. "/cmb4k.jpg", - Orientation = "Both", - MirrorTexture = true, - UseAdditiveBlending = true, - FadeInThreshold = 0.4 - }, - GUI = { - Name = "Planck Multiverse 4", - Path = "/Universe/Cosmic Microwave Background" - } -} - local Halpha = { Identifier = "HAlpha", @@ -244,8 +116,7 @@ local Halpha = { assetHelper.registerSceneGraphNodesAndExport(asset, { - wmap, cbe, planck, multiverse_planck_1, multiverse_planck_2, multiverse_planck_3, - multiverse_planck_4, Halpha + wmap, cbe, planck, Halpha }) @@ -254,12 +125,11 @@ asset.meta = { Version = "2.0", Description = [[Various AllSky images for the Milky Way and observable Universe. Included: Wilkinson Microwave Anisotropy Probe (WMAP), Cosmic Background Explorer, - Planck, Planck Multiverse 1-4, and H Alpha

Data Reference: Planck/ESA and - the Planck Collaboration, Wilkinson Microwave Anisotropy Probe/NASA, Doug + Planck, and H Alpha

Data Reference: Planck/ESA and the Planck + Collaboration, Wilkinson Microwave Anisotropy Probe/NASA, Doug Finkbeiner (Princeton)]], Author = "Brian Abbott (AMNH), OpenSpace Team", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe", - Identifiers = {"WMAP", "CBE", "Planck", "PlanckMultiverse1", "PlanckMultiverse2", - "PlanckMultiverse3", "PlanckMultiverse4", "HAlpha"} + Identifiers = {"WMAP", "CBE", "Planck", "HAlpha"} } diff --git a/data/assets/scene/digitaluniverse/backgroundradiation_multiverse.asset b/data/assets/scene/digitaluniverse/backgroundradiation_multiverse.asset new file mode 100644 index 0000000000..69cbb46808 --- /dev/null +++ b/data/assets/scene/digitaluniverse/backgroundradiation_multiverse.asset @@ -0,0 +1,141 @@ +local assetHelper = asset.require('util/asset_helper') +local textures = asset.require('./backgroundradiation_textures').textures + +local multiverse_planck_1 = { + Identifier = "PlanckMultiverse1", + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.0, 0.0, 2000E23} + }, + Rotation = { + Type = "StaticRotation", + Rotation = { 0, 0, 3.14159265359 } + } + }, + Renderable = { + Type = "RenderableSphere", + Enabled = false, + Size = 3975.41417036064E23, + Segments = 80, + Opacity = 0.3, + Texture = textures .. "/cmb4k.jpg", + Orientation = "Both", + MirrorTexture = true, + UseAdditiveBlending = true, + FadeInThreshold = 0.4 + }, + GUI = { + Name = "Planck Multiverse 1", + Path = "/Universe/Cosmic Microwave Background" + } +} + +local multiverse_planck_2 = { + Identifier = "PlanckMultiverse2", + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 2500E23, 0.0, 2000E23} + }, + Rotation = { + Type = "StaticRotation", + Rotation = { 0, 0, 3.14159265359 } + } + }, + Renderable = { + Type = "RenderableSphere", + Enabled = false, + Size = 3975.41417036064E23, + Segments = 80, + Opacity = 0.3, + Texture = textures .. "/cmb4k.jpg", + Orientation = "Both", + MirrorTexture = true, + UseAdditiveBlending = true, + FadeInThreshold = 0.4 + }, + GUI = { + Name = "Planck Multiverse 2", + Path = "/Universe/Cosmic Microwave Background" + } +} + +local multiverse_planck_3 = { + Identifier = "PlanckMultiverse3", + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 2500E23, 5000E23, 2000E23} + }, + Rotation = { + Type = "StaticRotation", + Rotation = { 0, 0, 3.14159265359 } + } + }, + Renderable = { + Type = "RenderableSphere", + Enabled = false, + Size = 3975.41417036064E23, + Segments = 80, + Opacity = 0.3, + Texture = textures .. "/cmb4k.jpg", + Orientation = "Both", + MirrorTexture = true, + UseAdditiveBlending = true, + FadeInThreshold = 0.4 + }, + GUI = { + Name = "Planck Multiverse 3", + Path = "/Universe/Cosmic Microwave Background" + } +} + +local multiverse_planck_4 = { + Identifier = "PlanckMultiverse4", + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.0, 10000E23, 0.0 } + }, + Rotation = { + Type = "StaticRotation", + Rotation = { 0, 0, 3.14159265359 } + } + }, + Renderable = { + Type = "RenderableSphere", + Enabled = false, + Size = 3975.41417036064E23, + Segments = 80, + Opacity = 0.3, + Texture = textures .. "/cmb4k.jpg", + Orientation = "Both", + MirrorTexture = true, + UseAdditiveBlending = true, + FadeInThreshold = 0.4 + }, + GUI = { + Name = "Planck Multiverse 4", + Path = "/Universe/Cosmic Microwave Background" + } +} + + +assetHelper.registerSceneGraphNodesAndExport(asset, { + multiverse_planck_1, multiverse_planck_2, multiverse_planck_3, multiverse_planck_4 +}) + + +asset.meta = { + Name = "Multiverse Background Radiation", + Version = "2.0", + Description = [[ Non-physical representation of the location of hypothetical + cosmic microwave background radiation images how they would be observed from other + locations in the universe.
This is not a measured dataset!]], + Author = "Brian Abbott (AMNH), OpenSpace Team", + URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", + License = "AMNH Digital Universe", + Identifiers = { "PlanckMultiverse1", "PlanckMultiverse2", + "PlanckMultiverse3", "PlanckMultiverse4" } +} diff --git a/data/assets/scene/digitaluniverse/backgroundradiation_textures.asset b/data/assets/scene/digitaluniverse/backgroundradiation_textures.asset new file mode 100644 index 0000000000..e58983b118 --- /dev/null +++ b/data/assets/scene/digitaluniverse/backgroundradiation_textures.asset @@ -0,0 +1,8 @@ +local textures = asset.syncedResource({ + Name = "Background Radiation Textures", + Type = "HttpSynchronization", + Identifier = "digitaluniverse_backgroundradiation_textures", + Version = 2 +}) + +asset.export('textures', textures) diff --git a/data/assets/scene/digitaluniverse/deepsky.asset b/data/assets/scene/digitaluniverse/deepsky.asset index 8d858cc663..3c16db2cbb 100644 --- a/data/assets/scene/digitaluniverse/deepsky.asset +++ b/data/assets/scene/digitaluniverse/deepsky.asset @@ -33,7 +33,7 @@ local deepSkyPoints = { TextColor = { 0.1, 0.4, 0.6 }, TextSize = 20.50, TextMinSize = 16.0, - Unit = "Mpc", + Unit = "pc", -- Fade in value in the same unit as "Unit" --FadeInDistances = { 0.05, 1.0 }, -- Max size in pixels @@ -68,7 +68,7 @@ local deepSkyImages = { TexturePath = textures, Luminosity = "radius", ScaleLuminosity = 0.001, - Unit = "Mpc", + Unit = "pc", -- Fade in value in the same unit as "Unit" --FadeInDistances = {0.001, 0.05010}, PlaneMinSize = 5.0 diff --git a/data/assets/scene/digitaluniverse/digitaluniverse.asset b/data/assets/scene/digitaluniverse/digitaluniverse.asset new file mode 100644 index 0000000000..9bdf3c367a --- /dev/null +++ b/data/assets/scene/digitaluniverse/digitaluniverse.asset @@ -0,0 +1,37 @@ +asset.require('./2dF') +asset.require('./2mass') +asset.require('./6dF') +asset.require('./abell') +asset.require('./alternatestarlabels') +asset.require('./backgroundradiation') +asset.require('./backgroundradiation_multiverse') +asset.require('./clusters') +asset.require('./constellationbounds') +asset.require('./constellations') +asset.require('./deepsky') +asset.require('./dwarfs') +asset.require('./exoplanets') +asset.require('./globularclusters') +asset.require('./grids') +asset.require('./groups') +asset.require('./h2regions') +asset.require('./kepler') +asset.require('./localdwarfs') +asset.require('./milkyway') +asset.require('./milkyway_arm_labels') +asset.require('./milkyway_data') +asset.require('./milkyway_label') +asset.require('./milkyway_sphere') +asset.require('./obassociations') +asset.require('./openclusters') +asset.require('./planetarynebulae') +asset.require('./pulsars') +asset.require('./quasars') +asset.require('./sdss') +asset.require('./starlabels') +asset.require('./starorbits') +asset.require('./stars') +asset.require('./superclusters') +asset.require('./supernovaremnants') +asset.require('./tully') +asset.require('./voids') diff --git a/data/assets/scene/digitaluniverse/dwarfs.asset b/data/assets/scene/digitaluniverse/dwarfs.asset index 1efccea999..8641e25771 100644 --- a/data/assets/scene/digitaluniverse/dwarfs.asset +++ b/data/assets/scene/digitaluniverse/dwarfs.asset @@ -32,10 +32,10 @@ local object = { TextColor = { 0.5, 0.1, 0.2 }, TextSize = 14.6, TextMinSize = 10.0, - ScaleFactor = 370, + ScaleFactor = 372.1, --CorrectionSizeEndDistance = 16.1, --CorrectionSizeFactor = 7.75, - BillboardMaxSize = 18.0, + BillboardMaxSize = 20.0, EnablePixelSizeControl = true, Unit = "pc" }, diff --git a/data/assets/scene/digitaluniverse/exoplanets.asset b/data/assets/scene/digitaluniverse/exoplanets.asset index 027f5de52e..ec4e7e1c3a 100644 --- a/data/assets/scene/digitaluniverse/exoplanets.asset +++ b/data/assets/scene/digitaluniverse/exoplanets.asset @@ -13,7 +13,7 @@ local speck = asset.syncedResource({ Name = "Exoplanets Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_exoplanets_speck", - Version = 1 + Version = 2 }) local object = { @@ -27,7 +27,7 @@ local object = { Texture = textures .. "/target-blue.png", File = speck .. "/expl.speck", LabelFile = speck .. "/expl.label", - ScaleFactor = 392.5, + ScaleFactor = 388.67923, TextColor = { 0.3, 0.3, 0.8 }, TextSize = 14.8, TextMaxSize = 200.0, @@ -35,7 +35,7 @@ local object = { CorrectionSizeEndDistance = 15.23, CorrectionSizeFactor = 13.3, Unit = "pc", - BillboardMaxSize = 52.0, + BillboardMaxSize = 75.0, EnablePixelSizeControl = true, }, GUI = { diff --git a/data/assets/scene/digitaluniverse/grids.asset b/data/assets/scene/digitaluniverse/grids.asset index 2699247df4..16f4afd20b 100644 --- a/data/assets/scene/digitaluniverse/grids.asset +++ b/data/assets/scene/digitaluniverse/grids.asset @@ -40,7 +40,7 @@ local radio = { Type = "RenderableSphericalGrid", Enabled = false, Opacity = 1.0, - GridColor = { 0.3, 0.84, 1.0 }, + Color = { 0.3, 0.84, 1.0 }, LineWidth = 2.0 }, GUI = { @@ -66,7 +66,7 @@ local oort = { Type = "RenderableSphericalGrid", Enabled = false, Opacity = 0.8, - GridColor = { 0.8, 0.4, 0.4 }, + Color = { 0.8, 0.4, 0.4 }, LineWidth = 2.0 }, GUI = { @@ -92,7 +92,7 @@ local ecliptic = { Type = "RenderableSphericalGrid", Enabled = false, Opacity = 1.0, - GridColor = { 0.74, 0.26, 0.26 }, + Color = { 0.74, 0.26, 0.26 }, LineWidth = 2.0 }, GUI = { @@ -146,7 +146,7 @@ local equatorial = { Type = "RenderableSphericalGrid", Enabled = false, Opacity = 0.8, - GridColor = { 0.69, 0.68, 0.29 }, + Color = { 0.69, 0.68, 0.29 }, LineWidth = 2.0 }, GUI = { @@ -197,7 +197,7 @@ local galactic = { Enabled = false, LineWidth = 2.0, Opacity = 1.0, - GridColor = { 0.0, 0.6, 0.6 } + Color = { 0.0, 0.6, 0.6 } }, GUI = { Name = "Galactic Sphere", @@ -550,6 +550,6 @@ asset.meta = { License = "AMNH Digital Universe", Identifiers = {"RadioSphere", "OortSphere", "EclipticSphere", "EclipticSphereLabels", "Equatorial", "EquatorialSphereLabels", "GalacticSphere", "GalacticSphereLabels", - "1ldGrid", "1lmGrid", "1lyGrid", "10lyGrid", "100lyGrid", "1klyGrid" "10klyGrid", + "1ldGrid", "1lmGrid", "1lyGrid", "10lyGrid", "100lyGrid", "1klyGrid", "10klyGrid", "100klyGrid", "1MlyGrid", "10MlyGrid", "100MlyGrid", "20GlyGrid"} } diff --git a/data/assets/scene/digitaluniverse/kepler.asset b/data/assets/scene/digitaluniverse/kepler.asset index 212071b5fe..04fc503c77 100644 --- a/data/assets/scene/digitaluniverse/kepler.asset +++ b/data/assets/scene/digitaluniverse/kepler.asset @@ -29,7 +29,7 @@ local object = { CorrectionSizeEndDistance = 15.86, CorrectionSizeFactor = 8.59, Unit = "pc", - BillboardMaxSize = 23.0, + BillboardMaxSize = 30.0, EnablePixelSizeControl = true }, GUI = { diff --git a/data/assets/scene/digitaluniverse/stars.asset b/data/assets/scene/digitaluniverse/stars.asset index 7328d0fae4..e269202667 100644 --- a/data/assets/scene/digitaluniverse/stars.asset +++ b/data/assets/scene/digitaluniverse/stars.asset @@ -66,7 +66,8 @@ local sunstar = { MagnitudeExponent = 6.2, SizeComposition = "Distance Modulus", RenderMethod = "Texture Based", -- or PSF - FadeInDistances = { 0.0001, 0.1 } + FadeInDistances = { 0.0001, 0.1 }, + RenderableType = "PostDeferredTransparent" }, GUI = { Name = "Sun", diff --git a/data/assets/scene/digitaluniverse/tully.asset b/data/assets/scene/digitaluniverse/tully.asset index 2bc40a8ac4..42438baa5e 100644 --- a/data/assets/scene/digitaluniverse/tully.asset +++ b/data/assets/scene/digitaluniverse/tully.asset @@ -23,7 +23,7 @@ local tullyPoints = { Enabled = true, Color = { 1.0, 0.4, 0.2 }, Opacity = 0.99, - ScaleFactor = 500.0, + ScaleFactor = 504.0, File = speck .. "/tully.speck", Texture = textures .. "/point3A.png", --ColorMap = speck .. "/tully.cmap", @@ -46,7 +46,7 @@ local tullyPoints = { -- Fade in value in the same unit as "Unit" FadeInDistances = { 0.001, 1.0 }, -- Max size in pixels - BillboardMaxSize = 5, + BillboardMaxSize = 7, BillboardMinSize = 0, --CorrectionSizeEndDistance = 22.0, --CorrectionSizeFactor = 10.45 diff --git a/data/assets/scene/milkyway/exoplanets/exoplanets_data.asset b/data/assets/scene/milkyway/exoplanets/exoplanets_data.asset index b49f091844..0d2ab171e8 100644 --- a/data/assets/scene/milkyway/exoplanets/exoplanets_data.asset +++ b/data/assets/scene/milkyway/exoplanets/exoplanets_data.asset @@ -2,6 +2,17 @@ local DataPath = asset.syncedResource({ Name = "Exoplanet Data Files", Type = "HttpSynchronization", Identifier = "exoplanets_data", - Version = 1 + Version = 2 }) asset.export("DataPath", DataPath) + +asset.meta = { + Name = "Exoplanet Data", + Version = "2.0", + Description = [[ The data that is used for the exoplanet systems. The data has been + derived from the 'Planetary Systems Composite Data' dataset from the NASA Exoplanet + Archive]], + Author = "OpenSpace Team", + URL = "https://exoplanetarchive.ipac.caltech.edu/docs/data.html", + License = "MIT license", +} diff --git a/data/assets/scene/milkyway/exoplanets/exoplanets_textures.asset b/data/assets/scene/milkyway/exoplanets/exoplanets_textures.asset index 287b29d61e..9efd63b65c 100644 --- a/data/assets/scene/milkyway/exoplanets/exoplanets_textures.asset +++ b/data/assets/scene/milkyway/exoplanets/exoplanets_textures.asset @@ -1,7 +1,19 @@ +asset.require('./../habitable_zones/habitable_zone_textures') + local TexturesPath = asset.syncedResource({ Name = "Exoplanet Textures", Type = "HttpSynchronization", Identifier = "exoplanets_textures", - Version = 1 + Version = 2 }) asset.export("TexturesPath", TexturesPath) + +asset.meta = { + Name = "Exoplanet Textures", + Version = "2.0", + Description = [[ Adds all textures that are required for the exoplanet system + visualizations]], + Author = "OpenSpace Team", + URL = "http://openspaceproject.com", + License = "MIT license", +} diff --git a/data/assets/scene/milkyway/habitable_zones/habitable_zone_textures.asset b/data/assets/scene/milkyway/habitable_zones/habitable_zone_textures.asset new file mode 100644 index 0000000000..0687c70693 --- /dev/null +++ b/data/assets/scene/milkyway/habitable_zones/habitable_zone_textures.asset @@ -0,0 +1,17 @@ +local TexturesPath = asset.syncedResource({ + Name = "Habitable Zone Textures", + Type = "HttpSynchronization", + Identifier = "habitable_zone_textures", + Version = 1 +}) +asset.export("TexturesPath", TexturesPath) + +asset.meta = { + Name = "Habitable Zone Textures", + Version = "1.0", + Description = [[ Default textures that can be used for the habitable zone + rendering]], + Author = "OpenSpace Team", + URL = "http://openspaceproject.com", + License = "MIT license", +} diff --git a/data/assets/scene/milkyway/objects/orionnebula/cluster.asset b/data/assets/scene/milkyway/objects/orionnebula/cluster.asset index 910aca0673..d02f8c3a5f 100644 --- a/data/assets/scene/milkyway/objects/orionnebula/cluster.asset +++ b/data/assets/scene/milkyway/objects/orionnebula/cluster.asset @@ -16,25 +16,16 @@ local OrionClusterStars = { Type = "RenderableStars", File = sync .. "/oricluster.speck", Texture = sync .. "/halo.png", - Texture = sync .. "/colorbv.cmap", + ColorMap = sync .. "/colorbv.cmap", MagnitudeExponent = 5.02, SizeComposition = "Distance Modulus", RenderMethod = "Texture Based" }, GUI = { Name = "Orion Nebula Star Cluster", - Path = "/Milky Way/Stars" - } -} - -assetHelper.registerSceneGraphNodesAndExport(asset, { OrionClusterStars }) - - -asset.meta = { - Name = "Orion Nebula Star Cluster", - Version = "1.0", - Description = [[ In order to have an accurate depiction of the Orion nebula, we need -to include the star cluster that was birthed from it. We turned to a study of the + Path = "/Milky Way/Orion", + Description = [[ In order to have an accurate depiction of the Orion nebula, we +need to include the star cluster that was birthed from it. We turned to a study of the cluster's stellar population by Lynne Hillenbrand, who was working at the University of California, Berkeley at the time. The catalog from her paper contains more than 1500 stars, about half the stars in the actual cluster. The cluster is very crowded, with a @@ -45,7 +36,18 @@ Knowing the size of the cluster and approximating the shape to be roughly spheri placed each star along a line of sight through this imaginary sphere centered on the cluster. In this sense, these data are observed data and the view from Earth is accurate. But the distance of each star has been derived from this educated-guess approach for the -cluster distribution. ]], +cluster distribution. ]] + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { OrionClusterStars }) + + +asset.meta = { + Name = "Orion Nebula Star Cluster", + Version = "1.0", + Description = [[ Digital Universe asset for the Orion star cluster. To be used in + conjunction with nebula model. Use orionnebula.asset to include both.]], Author = "AMNH Digital Universe", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe", diff --git a/data/assets/scene/milkyway/objects/orionnebula/nebula.asset b/data/assets/scene/milkyway/objects/orionnebula/nebula.asset index dc99a09a4f..8c5a86cf8e 100644 --- a/data/assets/scene/milkyway/objects/orionnebula/nebula.asset +++ b/data/assets/scene/milkyway/objects/orionnebula/nebula.asset @@ -31,7 +31,20 @@ local NebulaHolder = { }, GUI = { Name = "Orion Nebula", - Path = "/Milky Way/Objects", + Path = "/Milky Way/Orion", + Description = [[ In the Digital Universe model of the Orion Nebula, we depict the +ionization front effectively as a terrain, with a flat Hubble image of the nebula mapped +on the undulating surface. In reality, the ionization front has a slight thickness to +it - about a third of a light year - but is quite thin compared to the overall size of +the nebula, which stretches about ten light years from side to side.

Close into +the center, we see small teardrop-shaped structures with their narrow ends pointing away +from the bright star: these are protoplanetary disks, or proplyds, of dense gas and dust +surrounding young stars. The larger formations that one sees farther away from the center +of the nebula take on a cup-like shape, with the narrow end pointing away from the +nebulas center. These enormous structures are bow shocks that delineate the region where +highspeed winds from the central star slow from supersonic to subsonic speeds. You can +think of an HII region as a sort of tremendous explosion, taking place over millennia, +and the bow shocks are part of the outward rush of material. ]] } } @@ -54,15 +67,17 @@ local OrionNebulaModel = { Opacity = 1.0, DisableFaceCulling = false, SpecularIntensity = 0.0, - AmbientIntensity = 0.45, - DiffuseIntensity = 0.0, + AmbientIntensity = 0.0, + DiffuseIntensity = 1.0, + --PerformShading = false, RotationVector = { 0.000000, 22.300000, 0.000000 }, LightSources = LIGHTS; }, GUI = { Name = "Orion Nebula Model", - Path = "/Milky Way/Objects", - Hidden = true + Path = "/Milky Way/Orion", + Hidden = true, + Description = "Orion Nebula 3D model. See Orion Nebula for description." } } @@ -85,15 +100,17 @@ local OrionNebulaShocksModel = { Opacity = 1.0, DisableFaceCulling = false, SpecularIntensity = 0.0, - AmbientIntensity = 0.19, - DiffuseIntensity = 0.4, + AmbientIntensity = 0.0, + DiffuseIntensity = 1.0, + --PerformShading = false, RotationVector = { 0.000000, 22.300000, 0.000000 }, LightSources = LIGHTS; }, GUI = { Name = "Orion Nebula Shocks", - Path = "/Milky Way/Objects", - Hidden = false + Path = "/Milky Way/Orion", + Hidden = false, + Description = "Orion Nebula Shocks 3D model. See Orion Nebula for description." } } @@ -116,15 +133,17 @@ local OrionNebulaProplydsModel = { Opacity = 1.0, DisableFaceCulling = false, SpecularIntensity = 0.0, - AmbientIntensity = 1.0, + AmbientIntensity = 0.0, DiffuseIntensity = 1.0, + --PerformShading = false, RotationVector = { 0.000000, 22.300000, 0.000000 }, LightSources = LIGHTS; }, GUI = { Name = "Orion Nebula Proplyds", - Path = "/Milky Way/Objects", - Hidden = false + Path = "/Milky Way/Orion", + Hidden = false, + Description = "Orion Nebula Proplyds 3D model. See Orion Nebula for description." } } @@ -139,22 +158,12 @@ assetHelper.registerSceneGraphNodesAndExport(asset, { asset.meta = { Name = "Orion Nebula Model", Version = "1.0", - Description = [[ In the Digital Universe model of the Orion Nebula, we depict the -ionization front effectively as a terrain, with a flat Hubble image of the nebula mapped -on the undulating surface. In reality, the ionization front has a slight thickness to -it - about a third of a light year - but is quite thin compared to the overall size of -the nebula, which stretches about ten light years from side to side.

Close into -the center, we see small teardrop-shaped structures with their narrow ends pointing away -from the bright star: these are protoplanetary disks, or proplyds, of dense gas and dust -surrounding young stars. The larger formations that one sees farther away from the center -of the nebula take on a cup-like shape, with the narrow end pointing away from the -nebulas center. These enormous structures are bow shocks that delineate the region where -highspeed winds from the central star slow from supersonic to subsonic speeds. You can -think of an HII region as a sort of tremendous explosion, taking place over millennia, -and the bow shocks are part of the outward rush of material. ]], + Description = [[ Digital Universe asset for the Orion nebula 3D model. This asset + contains seperate models for the nebula, proplyds and shocks. To be used in + conjunction with orion star cluster. Use orionnebula.asset to include both.]], Author = "AMNH Digital Universe", URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe", License = "AMNH Digital Universe", - Identifiers = {"OrionNebulaModel", "OrionNebulaModel", "OrionNebulaProplydsModel", + Identifiers = {"OrionNebulaHolder", "OrionNebulaModel", "OrionNebulaProplydsModel", "OrionNebulaShocksModel"} } diff --git a/data/assets/scene/milkyway/objects/orionnebula/transforms.asset b/data/assets/scene/milkyway/objects/orionnebula/transforms.asset index 15bc241234..3461943c80 100644 --- a/data/assets/scene/milkyway/objects/orionnebula/transforms.asset +++ b/data/assets/scene/milkyway/objects/orionnebula/transforms.asset @@ -18,8 +18,9 @@ local NebulaPosition = { }, GUI = { Name = "Orion Nebula Position", - Path = "/Milky Way/Objects", - Hidden = true + Path = "/Milky Way/Orion", + Hidden = true, + Description = "Static position for Orion Nebula" } } diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/charon.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/charon.asset index 35e6fe6436..4b6aa574c2 100644 --- a/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/charon.asset +++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/charon.asset @@ -31,16 +31,17 @@ local Charon = { Enable = false, FileName = labelsPath .. "/charon.labels", LabelAlignmentOption = "Horizontally", -- or Circularly - LabelsFontSize = 14.0, + LabelsFontSize = 40.0, LabelsSize = 8.0, LabelsMinSize = 1.0, LabelsMaxSize = 1500.0, ProximityEnabled = false, LabelsFadeInEnabled = true, - FadeInStartingDistance = 500000.0, - FadeOutStartingDistance = 1000000.0, + LabelsFadeOutEnabled = true, + FadeInStartingDistance = 2000000.0, + FadeOutStartingDistance = 800000.0, LabelsForceDomeRendering = true, - LabelsDistanceEPS = 1350000.0, + LabelsDistanceEPS = 250000.0, LabelsColor = { 1.0, 1.0, 0.0 } } }, diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto.asset index 667c201781..5299ebc5dd 100644 --- a/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto.asset +++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto.asset @@ -31,16 +31,17 @@ local Pluto = { Enable = false, FileName = labelsPath .. "/pluto.labels", LabelAlignmentOption = "Horizontally", -- or Circularly - LabelsFontSize = 14.0, + LabelsFontSize = 28.0, LabelsSize = 8.0, LabelsMinSize = 1.0, LabelsMaxSize = 1500.0, ProximityEnabled = false, LabelsFadeInEnabled = true, - FadeInStartingDistance = 500000.0, - FadeOutStartingDistance = 1000000.0, + LabelsFadeOutEnabled = true, + FadeInStartingDistance = 4000000.0, + FadeOutStartingDistance = 650000.0, LabelsForceDomeRendering = true, - LabelsDistanceEPS = 1350000.0, + LabelsDistanceEPS = 500000.0, LabelsColor = { 1.0, 1.0, 0.0 } } }, diff --git a/data/assets/scene/solarsystem/missions/pioneer/pioneer10.asset b/data/assets/scene/solarsystem/missions/pioneer/pioneer10.asset index f76730f83c..8f7ad17c31 100644 --- a/data/assets/scene/solarsystem/missions/pioneer/pioneer10.asset +++ b/data/assets/scene/solarsystem/missions/pioneer/pioneer10.asset @@ -15,7 +15,7 @@ local kernelsList = {kernelsFolder .. '/p10-a.bsp'} local Pioneer10NAIF = "-23" local Pioneer10 = { - Identifier = "Pioneer10", + Identifier = "Pioneer_10", Parent = sunTransforms.SolarSystemBarycenter.Identifier, Transform = { Translation = { @@ -27,13 +27,15 @@ local Pioneer10 = { }, Renderable = model.PioneerModel, GUI = { - Name = "Pioneer 10", - Path = "/Solar System/Missions/Pioneer/10" + Name = "Pioneer 10 Spacecraft", + Path = "/Solar System/Missions/Pioneer", + Description = [[Pioneer 10 Spacecraft. Positioned by SPICE data.]] + } } local Pioneer10Trail = { - Identifier = "Pioneer10Trail", + Identifier = "Pioneer_10Trail", Parent = sunTransforms.SolarSystemBarycenter.Identifier, Renderable = { Type = "RenderableTrailTrajectory", @@ -51,8 +53,10 @@ local Pioneer10Trail = { -- 6545 is the number of days between the Start and End time (aka sample every 2d) }, GUI = { - Name = "Pioneer 10 Trail", - Path = "/Solar System/Missions/Pioneer/10" + Name = "Pioneer 10 Trail (SPICE)", + Path = "/Solar System/Missions/Pioneer", + Description = [[Pioneer 10 Trail, spanning March 3rd, 1972 to January 2nd, 1990. + Data from SPICE]] } } @@ -60,3 +64,15 @@ assetHelper.registerSceneGraphNodesAndExport(asset, { Pioneer10, Pioneer10Trail, }) + + +asset.meta = { + Name = "Pioneer 10", + Version = "1.0", + Description = [[ Pioneer 10 Model and Trail. Driven by SPICE data for high accuracy + from March 3rd, 1972 to January 2nd, 1990.]], + Author = "OpenSpace Team", + URL = "http://openspaceproject.com", + License = "MIT license", + Identifiers = {"Pioneer_10", "Pioneer_10Trail"} +} diff --git a/data/assets/scene/solarsystem/missions/pioneer/pioneer11.asset b/data/assets/scene/solarsystem/missions/pioneer/pioneer11.asset index 5e69367ae1..ae51e753a8 100644 --- a/data/assets/scene/solarsystem/missions/pioneer/pioneer11.asset +++ b/data/assets/scene/solarsystem/missions/pioneer/pioneer11.asset @@ -30,13 +30,14 @@ local Pioneer11 = { }, Renderable = model.PioneerModel, GUI = { - Name = "Pioneer 11", - Path = "/Solar System/Missions/Pioneer/11" + Name = "Pioneer 11 Spacecraft", + Path = "/Solar System/Missions/Pioneer", + Description = [[Pioneer 11 Spacecraft. Positioned by SPICE data.]] } } local Pioneer11Trail = { - Identifier = "Pioneer11Trail", + Identifier = "Pioneer_11Trail", Parent = sunTransforms.SolarSystemBarycenter.Identifier, Renderable = { Type = "RenderableTrailTrajectory", @@ -54,8 +55,10 @@ local Pioneer11Trail = { --6087 is the number of days between the Start and End time (so sample every 2d) }, GUI = { - Name = "Pioneer 11 Trail", - Path = "/Solar System/Missions/Pioneer/11" + Name = "Pioneer 11 Trail (SPICE)", + Path = "/Solar System/Missions/Pioneer", + Description = [[Pioneer 11 Trail, spanning April 6th, 1973 to January 2nd, 1990. + Data from SPICE.]] } } @@ -63,3 +66,15 @@ assetHelper.registerSceneGraphNodesAndExport(asset, { Pioneer11, Pioneer11Trail, }) + + +asset.meta = { + Name = "Pioneer 11", + Version = "1.0", + Description = [[ Pioneer 11 Model and Trail. Driven by SPICE data for high accuracy + from April 6th, 1973 to January 2nd, 1990.]], + Author = "OpenSpace Team", + URL = "http://openspaceproject.com", + License = "MIT license", + Identifiers = {"Pioneer_11", "Pioneer_11Trail"} +} diff --git a/data/assets/scene/solarsystem/missions/pioneer/pioneermodel.asset b/data/assets/scene/solarsystem/missions/pioneer/pioneermodel.asset index 1903e5bb71..a0b1b632ff 100644 --- a/data/assets/scene/solarsystem/missions/pioneer/pioneermodel.asset +++ b/data/assets/scene/solarsystem/missions/pioneer/pioneermodel.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') - +local sunTransforms = asset.require('scene/solarsystem/sun/transforms') local modelFolder = asset.syncedResource({ Name = "Pioneer 10/11 Models", @@ -21,3 +21,13 @@ local ModelRenderable = { } asset.export("PioneerModel", ModelRenderable) + +asset.meta = { + Name = "Pioneer Model", + Version = "1.0", + Description = [[ Pioneer model asset. Used by both pioneer 10 and pioneer 11 asset. + Untextured version of model from NASA 3D resources.]], + Author = "NASA", + URL = "https://nasa3d.arc.nasa.gov/detail/eoss-pioneer", + License = "NASA" +} \ No newline at end of file diff --git a/data/assets/scene/solarsystem/missions/voyagerpioneer/voyager1_2__pioneer10_11.asset b/data/assets/scene/solarsystem/missions/voyagerpioneer/voyager1_2__pioneer10_11.asset index b609658789..02be5ab03e 100644 --- a/data/assets/scene/solarsystem/missions/voyagerpioneer/voyager1_2__pioneer10_11.asset +++ b/data/assets/scene/solarsystem/missions/voyagerpioneer/voyager1_2__pioneer10_11.asset @@ -20,8 +20,10 @@ local voyager1 = { TimeStampSubsampleFactor = 1 }, GUI = { - Name = "Voyager 1", - Path = "/Solar System/Missions" + Name = "Voyager 1 Trail", + Path = "/Solar System/Missions/Voyager", + Description = [[Voyager 1 Trail, spanning September 6th, 1977 to December 31st, + 2030. Data from JPL Horizons.]] } } @@ -43,8 +45,10 @@ local voyager2 = { TimeStampSubsampleFactor = 1 }, GUI = { - Name = "Voyager 2", - Path = "/Solar System/Missions" + Name = "Voyager 2 Trail", + Path = "/Solar System/Missions/Voyager", + Description = [[Voyager 2 Trail, spanning August 21st, 1977 to December 31st, 2030. + Data from JPL Horizons.]] } } @@ -66,8 +70,10 @@ local pioneer10 = { TimeStampSubsampleFactor = 1 }, GUI = { - Name = "Pioneer 10", - Path = "/Solar System/Missions" + Name = "Pioneer 10 Trail", + Path = "/Solar System/Missions/Pioneer", + Description = [[Pioneer 10 Trail, spanning March 4th, 1972 to December 31st, 2030. + Data from JPL Horizons.]] } } @@ -89,9 +95,24 @@ local pioneer11 ={ TimeStampSubsampleFactor = 1 }, GUI = { - Name = "Pioneer 11", - Path = "/Solar System/Missions" + Name = "Pioneer 11 Trail", + Path = "/Solar System/Missions/Pioneer", + Description = [[Pioneer 11 Trail, spanning April 7th, 1973 to December 31st, 2030. + Data from JPL Horizons.]] } } assetHelper.registerSceneGraphNodesAndExport(asset, { voyager1, voyager2, pioneer10, pioneer11 }) + + +asset.meta = { + Name = "Pioneer and Voyager Trails", + Version = "1.0", + Description = [[ Pioneer 10, Pioneer 11, Voyager 1 and Voyager 2 trails. Driven by JPL + Horizons data for better performance then spice but lower resolution. Data is from + shortly after mission launches until December 31st, 2030.]], + Author = "OpenSpace Team", + URL = "http://openspaceproject.com", + License = "MIT license", + Identifiers = {"Pioneer10", "Pioneer11", "Voyager1", "Voyager2"} +} \ No newline at end of file diff --git a/data/assets/scene/solarsystem/planets/default_layers.asset b/data/assets/scene/solarsystem/planets/default_layers.asset index 4fc2b0ada0..37649a9ed0 100644 --- a/data/assets/scene/solarsystem/planets/default_layers.asset +++ b/data/assets/scene/solarsystem/planets/default_layers.asset @@ -8,6 +8,8 @@ asset.require('./jupiter/ganymede/default_layers') asset.require('./jupiter/io/default_layers') asset.require('./mars/default_layers') +asset.require('./mars/moons/layers/colorlayers/deimos_viking') +asset.require('./mars/moons/layers/colorlayers/phobos_viking') asset.require('./mercury/default_layers') diff --git a/data/assets/scene/solarsystem/planets/earth/atmosphere.asset b/data/assets/scene/solarsystem/planets/earth/atmosphere.asset index 9bb7b5cadd..e52677d158 100644 --- a/data/assets/scene/solarsystem/planets/earth/atmosphere.asset +++ b/data/assets/scene/solarsystem/planets/earth/atmosphere.asset @@ -6,110 +6,98 @@ local assetHelper = asset.require('util/asset_helper') -- local earthEllipsoid = { 6378137.0, 6378137.0, 6356752.314245 } local earthEllipsoid = { 6378137.0, 6378137.0, 6378137.0 } local Atmosphere = { - Identifier = "EarthAtmosphere", - Parent = transforms.Earth.Identifier, - Renderable = { - Type = "RenderableAtmosphere", - Atmosphere = { - -- Atmosphere radius in Km - AtmosphereRadius = 6447.0, - PlanetRadius = 6377.0, - PlanetAverageGroundReflectance = 0.1, - GroundRadianceEmittion = 0.6, - SunIntensity = 6.9, - Rayleigh = { - Coefficients = { - -- Wavelengths are given in 10^-9m - Wavelengths = { 680, 550, 440 }, - -- Reflection coefficients are given in km^-1 - Scattering = { 5.8E-3, 13.5E-3, 33.1E-3 }, - -- In Rayleigh scattering, the coefficients of absorption and scattering are the same. - }, - -- Thichkness of atmosphere if its density were uniform, in Km - H_R = 8.0 - }, - --[[ - Ozone = { - Coefficients = { - -- Extinction coefficients - Extinction = {3.426, 8.298, 0.356} - }, - H_O = 8.0, - }, - ]] - -- Default - Mie = { - Coefficients = { - -- Reflection coefficients are given in km^-1 - Scattering = { 4.0e-3, 4.0e-3, 4.0e-3 }, - -- Extinction coefficients are a fraction of the Mie coefficients - Extinction = { 4.0e-3/0.9, 4.0e-3/0.9, 4.0e-3/0.9 } - }, - -- Height scale (atmosphere thickness for constant density) in Km - H_M = 1.2, - -- Mie Phase Function Value (G e [-1.0, 1.0]. If G = 1.0, Mie phase function = Rayleigh Phase Function) - G = 0.85 - }, - -- Clear Sky - -- Mie = { - -- Coefficients = { - -- Scattering = {20e-3, 20e-3, 20e-3}, - -- Extinction = 1.0/0.9, - -- } - -- H_M = 1.2, - -- G = 0.76, - -- }, - -- Cloudy - -- Mie = { - -- Coefficients = { - -- Scattering = {3e-3, 3e-3, 3e-3}, - -- Extinction = 1.0/0.9, - -- } - -- H_M = 3.0, - -- G = 0.65, - -- }, - Image = { - ToneMapping = jToneMapping, - Exposure = 0.4, - Background = 1.8, - Gamma = 1.85 - }, - Debug = { - PreCalculatedTextureScale = 1.0, - SaveCalculatedTextures = false - } + Identifier = "EarthAtmosphere", + Parent = transforms.Earth.Identifier, + Renderable = { + Type = "RenderableAtmosphere", + -- Atmosphere radius in Km + AtmosphereHeight = 6447.0 - 6377.0, + PlanetRadius = 6377.0, + PlanetAverageGroundReflectance = 0.1, + GroundRadianceEmission = 0.6, + SunIntensity = 6.9, + Rayleigh = { + Coefficients = { + -- Wavelengths are given in 10^-9m + Wavelengths = { 680, 550, 440 }, + -- Reflection coefficients are given in km^-1 + Scattering = { 5.8E-3, 13.5E-3, 33.1E-3 }, + -- In Rayleigh scattering, the coefficients of absorption and scattering are the same. }, - ShadowGroup = { - Source1 = { - Name = "Sun", - -- All radius in meters - Radius = 696.3E6 - }, - --Source2 = { Name = "Monolith", Radius = 0.01E6, }, - Caster1 = { - Name = "Moon", - -- All radius in meters - Radius = 1.737E6 - } - --Caster2 = { Name = "Independency Day Ship", Radius = 0.0, } - } + -- Thichkness of atmosphere if its density were uniform, in Km + H_R = 8.0 + }, + --[[ + Ozone = { + Coefficients = { + -- Extinction coefficients + Extinction = {3.426, 8.298, 0.356} + }, + H_O = 8.0, + }, + ]] + -- Default + Mie = { + Coefficients = { + -- Reflection coefficients are given in km^-1 + Scattering = { 4.0e-3, 4.0e-3, 4.0e-3 }, + -- Extinction coefficients are a fraction of the Mie coefficients + Extinction = { 4.0e-3/0.9, 4.0e-3/0.9, 4.0e-3/0.9 } + }, + -- Height scale (atmosphere thickness for constant density) in Km + H_M = 1.2, + -- Mie Phase Function Value (G e [-1.0, 1.0]. If G = 1.0, Mie phase function = Rayleigh Phase Function) + G = 0.85 + }, + -- Clear Sky + -- Mie = { + -- Coefficients = { + -- Scattering = {20e-3, 20e-3, 20e-3}, + -- Extinction = 1.0/0.9, + -- } + -- H_M = 1.2, + -- G = 0.76, + -- }, + -- Cloudy + -- Mie = { + -- Coefficients = { + -- Scattering = {3e-3, 3e-3, 3e-3}, + -- Extinction = 1.0/0.9, + -- } + -- H_M = 3.0, + -- G = 0.65, + -- }, + Debug = { + PreCalculatedTextureScale = 1.0, + SaveCalculatedTextures = false }, - GUI = { - Name = "Earth Atmosphere", - Path = "/Solar System/Planets/Earth", - Description = [[ Atmosphere of Earth.]] + ShadowGroup = { + Sources = { + { Name = "Sun", Radius = 696.3E6 }, + -- { Name = "Monolith", Radius = 0.01E6 } + }, + Casters = { + { Name = "Moon", Radius = 1.737E6 }, + -- { Name = "Independence Day Ship", Radius = 0.0 } + } } + }, + GUI = { + Name = "Earth Atmosphere", + Path = "/Solar System/Planets/Earth", + Description = [[ Atmosphere of Earth.]] + } } assetHelper.registerSceneGraphNodesAndExport(asset, { Atmosphere }) asset.meta = { - Name = "Earth Atmosphere", - Version = "1.0", - Description = [[ RenderableAtmosphere for Earth.]], - Author = "OpenSpace Team", - URL = "http://openspaceproject.com", - License = "MIT license", - Identifiers = {"EarthAtmosphere"} + Name = "Earth Atmosphere", + Version = "1.0", + Description = [[ RenderableAtmosphere for Earth.]], + Author = "OpenSpace Team", + URL = "http://openspaceproject.com", + License = "MIT license", + Identifiers = { "EarthAtmosphere" } } diff --git a/data/assets/scene/solarsystem/planets/earth/earth.asset b/data/assets/scene/solarsystem/planets/earth/earth.asset index 476414303f..e66cb53329 100644 --- a/data/assets/scene/solarsystem/planets/earth/earth.asset +++ b/data/assets/scene/solarsystem/planets/earth/earth.asset @@ -15,30 +15,26 @@ local Earth = { PerformShading = false, Layers = {}, ShadowGroup = { - Source1 = { - Name = "Sun", - -- All radius in meters - Radius = 696.3E6 + Sources = { + { Name = "Sun", Radius = 696.3E6 }, }, - Caster1 = { - Name = "Moon", - -- All radius in meters - Radius = 1.737E6 + Casters = { + { Name = "Moon", Radius = 1.737E6 }, } }, Labels = { Enable = false, FileName = labelsPath .. "/Earth.labels", LabelAlignmentOption = "Horizontally", -- or Circularly - LabelsFontSize = 41.0, - LabelsSize = 0.52, + LabelsFontSize = 40.0, + LabelsSize = 4.0, LabelsMinSize = 1.0, LabelsMaxSize = 1500.0, ProximityEnabled = false, LabelsFadeInEnabled = true, - LabelsFadeOutEnabled = false, - FadeInStartingDistance = 50000.0, - FadeOutStartingDistance = 80000.0, + LabelsFadeOutEnabled = true, + FadeInStartingDistance = 300000.0, + FadeOutStartingDistance = 10000.0, LabelsForceDomeRendering = true, LabelsDistanceEPS = 1500000.0, LabelsColor = { 1.0, 0.0, 0.0 } diff --git a/data/assets/scene/solarsystem/planets/earth/map_service_configs/GIBS/water/MODIS_Water_Mask.wms b/data/assets/scene/solarsystem/planets/earth/map_service_configs/GIBS/water/MODIS_Water_Mask.wms index 57df99fa5a..8c190c62e5 100644 --- a/data/assets/scene/solarsystem/planets/earth/map_service_configs/GIBS/water/MODIS_Water_Mask.wms +++ b/data/assets/scene/solarsystem/planets/earth/map_service_configs/GIBS/water/MODIS_Water_Mask.wms @@ -1,6 +1,6 @@ - https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/MODIS_Water_Mask/default/2013-08-21/250m/${z}/${y}/${x}.png + https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/MODIS_Terra_L3_Land_Water_Mask/default/2015-08-21/250m/${z}/${y}/${x}.png -180.0 diff --git a/data/assets/scene/solarsystem/planets/earth/moon/moon.asset b/data/assets/scene/solarsystem/planets/earth/moon/moon.asset index c6079124a9..160b880246 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/moon.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/moon.asset @@ -26,15 +26,13 @@ local Moon = { SegmentsPerPatch = 64, Layers = {}, ShadowGroup = { - Source1 = { - Name = sunAsset.Sun.Name, - Radius = 696.3E6 + Sources = { + { Name = sunAsset.Sun.Identifier, Radius = 696.3E6 }, }, - Caster1 = { - Name = earthAsset.Earth.Name, - Radius = 6.371E6 + Casters = { + { Name = earthAsset.Earth.Identifier, Radius = 6.371E6 }, } - }, + }, Labels = { Enable = false, FileName = labelsPath .. "/moon.labels", @@ -45,8 +43,9 @@ local Moon = { LabelsMaxSize = 1500.0, ProximityEnabled = false, LabelsFadeInEnabled = true, + LabelsFadeOutEnabled = true, FadeInStartingDistance = 500000.0, - FadeOutStartingDistance = 1000000.0, + FadeOutStartingDistance = 100000.0, LabelsForceDomeRendering = true, LabelsDistanceEPS = 1350000.0, LabelsColor = { 1.0, 1.0, 0.0 } diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset index 635c56d9f0..2a91bf1261 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset @@ -3,7 +3,7 @@ local satelliteHelper = asset.require('util/tle_helper') local transforms = asset.require('scene/solarsystem/planets/earth/transforms') local sunTransforms = asset.require('scene/solarsystem/sun/transforms') -local url = "https://celestrak.com/satcat/tle.php?CATNR=25544" +local url = "http://celestrak.com/satcat/tle.php?CATNR=25544" local identifier = "ISS" local filename = "ISS.txt" local nodes = {} diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/aqua.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/aqua.asset index 9d2587e1fd..9ebe43df49 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/aqua.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/aqua.asset @@ -3,7 +3,7 @@ local satelliteHelper = asset.require('util/tle_helper') local transforms = asset.require('scene/solarsystem/planets/earth/transforms') local sunTransforms = asset.require('scene/solarsystem/sun/transforms') -local url = "https://celestrak.com/satcat/tle.php?CATNR=27424" +local url = "http://celestrak.com/satcat/tle.php?CATNR=27424" local identifier = "Aqua" local filename = "Aqua.txt" local nodes = {} diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/snpp.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/snpp.asset index ff812053a1..2b251d229d 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/snpp.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/snpp.asset @@ -3,7 +3,7 @@ local satelliteHelper = asset.require('util/tle_helper') local transforms = asset.require('scene/solarsystem/planets/earth/transforms') local sunTransforms = asset.require('scene/solarsystem/sun/transforms') -local url = "https://celestrak.com/satcat/tle.php?CATNR=37849" +local url = "http://celestrak.com/satcat/tle.php?CATNR=37849" local identifier = "SNPP" local filename = "SNPP.txt" local nodes = {} diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/terra.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/terra.asset index 0cdae52344..3d064550ee 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/terra.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/terra.asset @@ -3,7 +3,7 @@ local satelliteHelper = asset.require('util/tle_helper') local transforms = asset.require('scene/solarsystem/planets/earth/transforms') local sunTransforms = asset.require('scene/solarsystem/sun/transforms') -local url = "https://celestrak.com/satcat/tle.php?CATNR=25994" +local url = "http://celestrak.com/satcat/tle.php?CATNR=25994" local identifier = "Terra" local filename = "Terra.txt" local nodes = {} diff --git a/data/assets/scene/solarsystem/planets/jupiter/callisto/callisto.asset b/data/assets/scene/solarsystem/planets/jupiter/callisto/callisto.asset index 09c2888303..580e6c72ca 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/callisto/callisto.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/callisto/callisto.asset @@ -37,8 +37,9 @@ local Callisto = { LabelsMaxSize = 1500.0, ProximityEnabled = false, LabelsFadeInEnabled = true, + LabelsFadeOutEnabled = true, FadeInStartingDistance = 15000000.0, - FadeOutStartingDistance = 1000000.0, + FadeOutStartingDistance = 5000000.0, LabelsForceDomeRendering = true, LabelsDistanceEPS = 1350000.0, LabelsColor = { 1.0, 1.0, 0.0 } diff --git a/data/assets/scene/solarsystem/planets/jupiter/europa/europa.asset b/data/assets/scene/solarsystem/planets/jupiter/europa/europa.asset index 6be8e60814..d3e29eba08 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/europa/europa.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/europa/europa.asset @@ -32,15 +32,16 @@ local Europa = { FileName = labelsPath .. "/europa.labels", LabelAlignmentOption = "Horizontally", -- or Circularly LabelsFontSize = 40.0, - LabelsSize = 10.5, + LabelsSize = 10.0, LabelsMinSize = 1.0, LabelsMaxSize = 1500.0, ProximityEnabled = false, LabelsFadeInEnabled = true, - FadeInStartingDistance = 15000000.0, - FadeOutStartingDistance = 1000000.0, + LabelsFadeOutEnabled = true, + FadeInStartingDistance = 8000000.0, + FadeOutStartingDistance = 5000000.0, LabelsForceDomeRendering = true, - LabelsDistanceEPS = 1350000.0, + LabelsDistanceEPS = 700000.0, LabelsColor = { 1.0, 1.0, 0.0 } } }, diff --git a/data/assets/scene/solarsystem/planets/jupiter/ganymede/ganymede.asset b/data/assets/scene/solarsystem/planets/jupiter/ganymede/ganymede.asset index c93b359f3e..0e53d189d1 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/ganymede/ganymede.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/ganymede/ganymede.asset @@ -37,10 +37,11 @@ local Ganymede = { LabelsMaxSize = 1500.0, ProximityEnabled = false, LabelsFadeInEnabled = true, - FadeInStartingDistance = 15000000.0, - FadeOutStartingDistance = 1000000.0, + LabelsFadeOutEnabled = true, + FadeInStartingDistance = 8000000.0, + FadeOutStartingDistance = 2250000.0, LabelsForceDomeRendering = true, - LabelsDistanceEPS = 1350000.0, + LabelsDistanceEPS = 1750000.0, LabelsColor = {1.0, 1.0, 0.0} } }, diff --git a/data/assets/scene/solarsystem/planets/jupiter/io/io.asset b/data/assets/scene/solarsystem/planets/jupiter/io/io.asset index e64cbfe431..20f2d5a2b6 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/io/io.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/io/io.asset @@ -32,15 +32,16 @@ local Io = { FileName = labelsPath .. "/io.labels", LabelAlignmentOption = "Horizontally", -- or Circularly LabelsFontSize = 40.0, - LabelsSize = 10.5, + LabelsSize = 10.0, LabelsMinSize = 1.0, LabelsMaxSize = 1500.0, ProximityEnabled = false, LabelsFadeInEnabled = true, - FadeInStartingDistance = 15000000.0, - FadeOutStartingDistance = 1000000.0, + LabelsFadeOutEnabled = true, + FadeInStartingDistance = 8500000.0, + FadeOutStartingDistance = 4000000.0, LabelsForceDomeRendering = true, - LabelsDistanceEPS = 1350000.0, + LabelsDistanceEPS = 1000000.0, LabelsColor = { 1.0, 1.0, 0.0 } } }, diff --git a/data/assets/scene/solarsystem/planets/jupiter/jupiter.asset b/data/assets/scene/solarsystem/planets/jupiter/jupiter.asset index 520a72d840..80f4bbd695 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/jupiter.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/jupiter.asset @@ -17,7 +17,18 @@ local Jupiter = { Type = "RenderableGlobe", Radii = { 71492000.0, 71492000.0, 66854000.0 }, SegmentsPerPatch = 64, - Layers = {} + Layers = {}, + ShadowGroup = { + Sources = { + { Name = "Sun", Radius = 696.3E6 }, + }, + Casters = { + { Name = "Ganymede", Radius = 2631000 }, + { Name = "Io", Radius = 1821600 }, + { Name = "Europa", Radius = 1560800 }, + { Name = "Callisto", Radius = 2410000 } + } + } }, Tag = { "planet_solarSystem", "planet_giants" }, GUI = { diff --git a/data/assets/scene/solarsystem/planets/mars/atmosphere.asset b/data/assets/scene/solarsystem/planets/mars/atmosphere.asset index 9f45e9804b..ff627cb98a 100644 --- a/data/assets/scene/solarsystem/planets/mars/atmosphere.asset +++ b/data/assets/scene/solarsystem/planets/mars/atmosphere.asset @@ -8,53 +8,43 @@ local Atmosphere = { Parent = transforms.Mars.Identifier, Renderable = { Type = "RenderableAtmosphere", - Atmosphere = { - -- Atmosphere radius in Km - AtmosphereRadius = 3463.17495, - --PlanetRadius = 3396.19, - --PlanetRadius = 3393.0, - PlanetRadius = 3386.190, - PlanetAverageGroundReflectance = 0.1, - GroundRadianceEmittion = 0.37, - SunIntensity = 13.1, - MieScatteringExtinctionPropCoefficient = 0.23862, - Rayleigh = { - Coefficients = { - -- Wavelengths are given in 10^-9m - Wavelengths = { 680, 550, 440 }, - -- Reflection coefficients are given in km^-1 - Scattering = { 19.918E-3, 13.57E-3, 5.75E-3 } - -- In Rayleigh scattering, the coefficients of - -- absorption and scattering are the same. - }, - -- Thichkness of atmosphere if its density were uniform, in Km - H_R = 10.43979 + -- Atmosphere radius in Km + AtmosphereHeight = 3463.17495 - 3386.190, + PlanetRadius = 3386.190, + PlanetAverageGroundReflectance = 0.1, + GroundRadianceEmission = 0.37, + SunIntensity = 13.1, + MieScatteringExtinctionPropCoefficient = 0.23862, + Rayleigh = { + Coefficients = { + -- Wavelengths are given in 10^-9m + Wavelengths = { 680, 550, 440 }, + -- Reflection coefficients are given in km^-1 + Scattering = { 19.918E-3, 13.57E-3, 5.75E-3 } + -- In Rayleigh scattering, the coefficients of + -- absorption and scattering are the same. }, - -- Default - Mie = { - Coefficients = { - -- Reflection coefficients are given in km^-1 - Scattering = { 53.61771e-3, 53.61771e-3, 53.61771e-3 }, - -- Extinction coefficients are a fraction of the Scattering coefficients - Extinction = { 53.61771e-3/0.98979, 53.61771e-3/0.98979, 53.61771e-3/0.98979 } - }, - -- Mie Height scale (atmosphere thickness for constant density) in Km - H_M = 3.09526, - -- Mie Phase Function Value (G e [-1.0, 1.0]. - -- If G = 1.0, Mie phase function = Rayleigh Phase Function) - G = 0.85 + -- Thichkness of atmosphere if its density were uniform, in Km + H_R = 10.43979 + }, + -- Default + Mie = { + Coefficients = { + -- Reflection coefficients are given in km^-1 + Scattering = { 53.61771e-3, 53.61771e-3, 53.61771e-3 }, + -- Extinction coefficients are a fraction of the Scattering coefficients + Extinction = { 53.61771e-3/0.98979, 53.61771e-3/0.98979, 53.61771e-3/0.98979 } }, - Image = { - ToneMapping = jToneMapping, - Exposure = 0.4, - Background = 1.8, - Gamma = 1.85 - }, - Debug = { - -- PreCalculatedTextureScale is a float from 1.0 to N, with N > 0.0 and N in Naturals (i.e., 1, 2, 3, 4, 5....) - PreCalculatedTextureScale = 1.0, - SaveCalculatedTextures = false - } + -- Mie Height scale (atmosphere thickness for constant density) in Km + H_M = 3.09526, + -- Mie Phase Function Value (G e [-1.0, 1.0]. + -- If G = 1.0, Mie phase function = Rayleigh Phase Function) + G = 0.85 + }, + Debug = { + -- PreCalculatedTextureScale is a float from 1.0 to N, with N > 0.0 and N in Naturals (i.e., 1, 2, 3, 4, 5....) + PreCalculatedTextureScale = 1.0, + SaveCalculatedTextures = false } }, GUI = { diff --git a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/HiRISE.asset b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/hirise.asset similarity index 100% rename from data/assets/scene/solarsystem/planets/mars/layers/colorlayers/HiRISE.asset rename to data/assets/scene/solarsystem/planets/mars/layers/colorlayers/hirise.asset diff --git a/data/assets/scene/solarsystem/planets/mars/layers/heightlayers/hirisels.asset b/data/assets/scene/solarsystem/planets/mars/layers/heightlayers/hirisels.asset index 0fa9c56943..01adfc48b6 100644 --- a/data/assets/scene/solarsystem/planets/mars/layers/heightlayers/hirisels.asset +++ b/data/assets/scene/solarsystem/planets/mars/layers/heightlayers/hirisels.asset @@ -4,7 +4,7 @@ local globeIdentifier = asset.require("./../../mars").Mars.Identifier local layer = { Identifier = "HiRISE-LS-DEM", Name = "HiRISE Local Set DEM", - FilePath = mapServiceConfigs .. "/ESRI/HiRISE/HiRISE_DEM.wms", + FilePath = mapServiceConfigs .. "/ESRI/HiRISE/HiRISE_DEM.dem", Description = [[ HiRISE (High Resolution Imaging Science Experiment) is the most powerful camera ever sent to another planet, one of six instruments onboard the Mars Reconnaissance Orbiter. We launched in 2005, arrived at Mars in 2006 and have diff --git a/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE/HiRISE_DEM.tif b/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE/HiRISE_DEM.dem similarity index 87% rename from data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE/HiRISE_DEM.tif rename to data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE/HiRISE_DEM.dem index f557be2ac1..8446fe69d3 100644 --- a/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE/HiRISE_DEM.tif +++ b/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE/HiRISE_DEM.dem @@ -1,6 +1,6 @@ - http://astro.arcgis.com/arcgis/rest/services/OnMars/HiRISE_DEM/ImageServer/tile/${z}/${y}/${x} + http://astro.arcgis.com/arcgis/rest/services/OnMars/HiRISE_DEM/raw/tile/${z}/${y}/${x} -180 90 @@ -11,7 +11,7 @@ GEOGCS["GCS_Mars_2000_Sphere",DATUM["D_Mars_2000_Sphere",SPHEROID["Mars_2000_Sphere_IAU_IAG",3396190,0]],PRIMEM["Reference_Meridian",0],UNIT["Degree",0.0174532925199433]] 512 512 1 Int16 - + 5 404,400 diff --git a/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE/HiRISE_DEM.wms b/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE/HiRISE_DEM.wms deleted file mode 100644 index bedcb068e0..0000000000 --- a/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE/HiRISE_DEM.wms +++ /dev/null @@ -1,17 +0,0 @@ - - - http://astro.arcgis.com/arcgis/rest/services/OnMars/HiRISE_DEM/ImageServer/tile/${z}/${y}/${x} - - - -180 90 - 180 -90 - 20971520 10485760 - 15 top - - GEOGCS["GCS_Mars_2000_Sphere",DATUM["D_Mars_2000_Sphere",SPHEROID["Mars_2000_Sphere_IAU_IAG",3396190,0]],PRIMEM["Reference_Meridian",0],UNIT["Degree",0.0174532925199433]] - 512 512 - 1 Int16 - - 5 - 404,400 - diff --git a/data/assets/scene/solarsystem/planets/mars/mars.asset b/data/assets/scene/solarsystem/planets/mars/mars.asset index 8bdd08008d..e96320563a 100644 --- a/data/assets/scene/solarsystem/planets/mars/mars.asset +++ b/data/assets/scene/solarsystem/planets/mars/mars.asset @@ -27,15 +27,16 @@ local Mars = { FileName = labelsPath .. "/mars.labels", LabelAlignmentOption = "Horizontally", -- or Circularly LabelsFontSize = 14.0, - LabelsSize = 8.0, + LabelsSize = 9.0, LabelsMinSize = 1.0, LabelsMaxSize = 1500.0, ProximityEnabled = false, LabelsFadeInEnabled = true, - FadeInStartingDistance = 500000.0, - FadeOutStartingDistance = 1000000.0, + LabelsFadeOutEnabled = true, + FadeInStartingDistance = 2000000.0, + FadeOutStartingDistance = 750000.0, LabelsForceDomeRendering = true, - LabelsDistanceEPS = 1350000.0, + LabelsDistanceEPS = 2500000.0, LabelsColor = { 1.0, 1.0, 0.0 } } }, diff --git a/data/assets/scene/solarsystem/planets/mars/moons/layers/colorlayers/deimos_viking.asset b/data/assets/scene/solarsystem/planets/mars/moons/layers/colorlayers/deimos_viking.asset new file mode 100644 index 0000000000..a339e5b425 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/moons/layers/colorlayers/deimos_viking.asset @@ -0,0 +1,29 @@ +local globeIdentifier = asset.require("./../../deimos").Deimos.Identifier + +local layer = { + Identifier = "Deimos_Global_Mosaic_USGS", + Name = "Deimos Global Mosaic [USGS]", + Enabled = true, + FilePath = "WMS:https://wms.wr.usgs.gov/cgi-bin/mapserv?map=/maps/mars/deimos_simp_cyl.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Deimos_Simple_Cylindrical_Rasters&SRS=EPSG:4326&BBOX=-180,-90,360,90", + Description = [[ This Viking-based cylindrical map of Deimos was created by Philip + Stooke with the assistance of Chris Jongkind and Megan Arntz. Control is based on a + shape model and mosaic by Peter Thomas and colleagues at Cornell University. Date + released 26 October 2001. (Description from URL)]] +} + +asset.onInitialize(function () + openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) +end) + +asset.export("layer", layer) + + +asset.meta = { + Name = "Deimos Global Mosaic [USGS]", + Version = "1.0", + Author = "Philip Stooke/NASA", + URL = "https://astrowebmaps.wr.usgs.gov/webmapatlas/Layers/maps.html", + License = "NASA/PDS", + Identifiers = {'Deimos_Global_Mosaic_USGS'} + +} diff --git a/data/assets/scene/solarsystem/planets/mars/moons/layers/colorlayers/phobos_viking.asset b/data/assets/scene/solarsystem/planets/mars/moons/layers/colorlayers/phobos_viking.asset new file mode 100644 index 0000000000..6a0c5b8d9a --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/moons/layers/colorlayers/phobos_viking.asset @@ -0,0 +1,26 @@ +local globeIdentifier = asset.require("./../../phobos").Phobos.Identifier + +local layer = { + Identifier = "Phobos_Global_Shaded_Relief_USGS", + Name = "Phobos Global Shaded Relief [USGS]", + Enabled = true, + FilePath = "WMS:https://wms.wr.usgs.gov/cgi-bin/mapserv?map=/maps/mars/phobos_simp_cyl.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=Phobos_Simple_Cylindrical_Rasters&SRS=EPSG:4326&BBOX=-180,-90,360,90", + Description = [[ Viking-base Phobos shaded relief created by USGS.]] +} + +asset.onInitialize(function () + openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer) +end) + +asset.export("layer", layer) + + +asset.meta = { + Name = "Phobos Global Shaded Relief [USGS]", + Version = "1.0", + Author = "USGS/NASA", + URL = "https://astrowebmaps.wr.usgs.gov/webmapatlas/Layers/maps.html", + License = "NASA/PDS", + Identifiers = {'Phobos_Global_Shaded_Relief_USGS'} + +} diff --git a/data/assets/scene/solarsystem/planets/mercury/mercury.asset b/data/assets/scene/solarsystem/planets/mercury/mercury.asset index c2a9ca1584..4ce1efa083 100644 --- a/data/assets/scene/solarsystem/planets/mercury/mercury.asset +++ b/data/assets/scene/solarsystem/planets/mercury/mercury.asset @@ -27,13 +27,15 @@ local Mercury = { Enable = false, FileName = labelsPath .. "/Mercury.labels", LabelAlignmentOption = "Horizontally", -- or Circularly - LabelsFontSize = 40.0, + LabelsFontSize = 22.0, LabelsSize = 10.0, LabelsMinSize = 1.0, LabelsMaxSize = 1500.0, ProximityEnabled = false, - FadeInStartingDistance = 40000000.0, - FadeOutStartingDistance = 80000.0, + LabelsFadeInEnabled = true, + LabelsFadeOutEnabled = true, + FadeInStartingDistance = 5000000.0, + FadeOutStartingDistance = 1800000.0, LabelsForceDomeRendering = true, LabelsDistanceEPS = 1500000.0, LabelsColor = { 1.0, 1.0, 0.0 } diff --git a/data/assets/scene/solarsystem/planets/planets.asset b/data/assets/scene/solarsystem/planets/planets.asset index d7ea310c0b..2c80f258c5 100644 --- a/data/assets/scene/solarsystem/planets/planets.asset +++ b/data/assets/scene/solarsystem/planets/planets.asset @@ -14,6 +14,8 @@ asset.require('./earth/moon/trail') asset.require('./mars/mars') asset.require('./mars/atmosphere') +asset.require('./mars/moons/phobos') +asset.require('./mars/moons/deimos') asset.require('./jupiter/jupiter') asset.require('./jupiter/major_moons') diff --git a/data/assets/scene/solarsystem/planets/saturn/dione/dione.asset b/data/assets/scene/solarsystem/planets/saturn/dione/dione.asset index bee85a6396..34b711430c 100644 --- a/data/assets/scene/solarsystem/planets/saturn/dione/dione.asset +++ b/data/assets/scene/solarsystem/planets/saturn/dione/dione.asset @@ -29,16 +29,17 @@ local Dione = { Enable = false, FileName = labelsPath .. "/dione.labels", LabelAlignmentOption = "Horizontally", -- or Circularly - LabelsFontSize = 14.0, + LabelsFontSize = 32.0, LabelsSize = 8.0, LabelsMinSize = 1.0, LabelsMaxSize = 1500.0, ProximityEnabled = false, LabelsFadeInEnabled = true, - FadeInStartingDistance = 500000.0, + LabelsFadeOutEnabled = true, + FadeInStartingDistance = 3500000.0, FadeOutStartingDistance = 1000000.0, LabelsForceDomeRendering = true, - LabelsDistanceEPS = 1350000.0, + LabelsDistanceEPS = 200000.0, LabelsColor = { 1.0, 1.0, 0.0 } } }, diff --git a/data/assets/scene/solarsystem/planets/saturn/enceladus/enceladus.asset b/data/assets/scene/solarsystem/planets/saturn/enceladus/enceladus.asset index bb66e85ba2..4dd5e1cff5 100644 --- a/data/assets/scene/solarsystem/planets/saturn/enceladus/enceladus.asset +++ b/data/assets/scene/solarsystem/planets/saturn/enceladus/enceladus.asset @@ -29,16 +29,17 @@ local Enceladus = { Enable = false, FileName = labelsPath .. "/enceladus.labels", LabelAlignmentOption = "Horizontally", -- or Circularly - LabelsFontSize = 14.0, + LabelsFontSize = 22.0, LabelsSize = 8.0, LabelsMinSize = 1.0, LabelsMaxSize = 1500.0, ProximityEnabled = false, LabelsFadeInEnabled = true, - FadeInStartingDistance = 500000.0, - FadeOutStartingDistance = 1000000.0, + LabelsFadeOutEnabled = true, + FadeInStartingDistance = 1000000.0, + FadeOutStartingDistance = 500000.0, LabelsForceDomeRendering = true, - LabelsDistanceEPS = 1350000.0, + LabelsDistanceEPS = 100000.0, LabelsColor = { 1.0, 1.0, 0.0 } } }, diff --git a/data/assets/scene/solarsystem/planets/saturn/iapetus/iapetus.asset b/data/assets/scene/solarsystem/planets/saturn/iapetus/iapetus.asset index ec01d7b69a..fbe22a9aec 100644 --- a/data/assets/scene/solarsystem/planets/saturn/iapetus/iapetus.asset +++ b/data/assets/scene/solarsystem/planets/saturn/iapetus/iapetus.asset @@ -29,16 +29,17 @@ local Iapetus = { Enable = false, FileName = labelsPath .. "/iapetus.labels", LabelAlignmentOption = "Horizontally", -- or Circularly - LabelsFontSize = 14.0, + LabelsFontSize = 30.0, LabelsSize = 8.0, LabelsMinSize = 1.0, LabelsMaxSize = 1500.0, ProximityEnabled = false, LabelsFadeInEnabled = true, - FadeInStartingDistance = 500000.0, - FadeOutStartingDistance = 1000000.0, + LabelsFadeOutEnabled = true, + FadeInStartingDistance = 3500000.0, + FadeOutStartingDistance = 600000.0, LabelsForceDomeRendering = true, - LabelsDistanceEPS = 1350000.0, + LabelsDistanceEPS = 250000.0, LabelsColor = { 1.0, 1.0, 0.0 } } }, diff --git a/data/assets/scene/solarsystem/planets/saturn/mimas/mimas.asset b/data/assets/scene/solarsystem/planets/saturn/mimas/mimas.asset index 1ba8d19d3f..7f1b4efab1 100644 --- a/data/assets/scene/solarsystem/planets/saturn/mimas/mimas.asset +++ b/data/assets/scene/solarsystem/planets/saturn/mimas/mimas.asset @@ -35,10 +35,11 @@ local Mimas = { LabelsMaxSize = 1500.0, ProximityEnabled = false, LabelsFadeInEnabled = true, - FadeInStartingDistance = 500000.0, - FadeOutStartingDistance = 1000000.0, + LabelsFadeOutEnabled = true, + FadeInStartingDistance = 1000000.0, + FadeOutStartingDistance = 400000.0, LabelsForceDomeRendering = true, - LabelsDistanceEPS = 1350000.0, + LabelsDistanceEPS = 25000.0, LabelsColor = { 1.0, 1.0, 0.0 } } }, diff --git a/data/assets/scene/solarsystem/planets/saturn/rhea/rhea.asset b/data/assets/scene/solarsystem/planets/saturn/rhea/rhea.asset index fbbe12a40d..83792b1a33 100644 --- a/data/assets/scene/solarsystem/planets/saturn/rhea/rhea.asset +++ b/data/assets/scene/solarsystem/planets/saturn/rhea/rhea.asset @@ -29,16 +29,17 @@ local Rhea = { Enable = false, FileName = labelsPath .. "/rhea.labels", LabelAlignmentOption = "Horizontally", -- or Circularly - LabelsFontSize = 14.0, + LabelsFontSize = 40.0, LabelsSize = 8.0, LabelsMinSize = 1.0, LabelsMaxSize = 1500.0, ProximityEnabled = false, LabelsFadeInEnabled = true, - FadeInStartingDistance = 500000.0, + LabelsFadeOutEnabled = true, + FadeInStartingDistance = 2500000.0, FadeOutStartingDistance = 1000000.0, LabelsForceDomeRendering = true, - LabelsDistanceEPS = 1350000.0, + LabelsDistanceEPS = 250000.0, LabelsColor = { 1.0, 1.0, 0.0 } } }, diff --git a/data/assets/scene/solarsystem/planets/saturn/tethys/tethys.asset b/data/assets/scene/solarsystem/planets/saturn/tethys/tethys.asset index e4440665df..18a97e75c3 100644 --- a/data/assets/scene/solarsystem/planets/saturn/tethys/tethys.asset +++ b/data/assets/scene/solarsystem/planets/saturn/tethys/tethys.asset @@ -29,16 +29,17 @@ local Tethys = { Enable = false, FileName = labelsPath .. "/tethys.labels", LabelAlignmentOption = "Horizontally", -- or Circularly - LabelsFontSize = 14.0, + LabelsFontSize = 24.0, LabelsSize = 8.0, LabelsMinSize = 1.0, LabelsMaxSize = 1500.0, ProximityEnabled = false, LabelsFadeInEnabled = true, - FadeInStartingDistance = 500000.0, - FadeOutStartingDistance = 1000000.0, + LabelsFadeOutEnabled = true, + FadeInStartingDistance = 1500000.0, + FadeOutStartingDistance = 500000.0, LabelsForceDomeRendering = true, - LabelsDistanceEPS = 1350000.0, + LabelsDistanceEPS = 200000.0, LabelsColor = { 1.0, 1.0, 0.0 } } }, diff --git a/data/assets/scene/solarsystem/planets/saturn/titan/titan.asset b/data/assets/scene/solarsystem/planets/saturn/titan/titan.asset index dd947f3214..eaa851c833 100644 --- a/data/assets/scene/solarsystem/planets/saturn/titan/titan.asset +++ b/data/assets/scene/solarsystem/planets/saturn/titan/titan.asset @@ -30,13 +30,14 @@ local Titan = { FileName = labelsPath .. "/titan.labels", LabelAlignmentOption = "Horizontally", -- or Circularly LabelsFontSize = 14.0, - LabelsSize = 8.0, + LabelsSize = 10.0, LabelsMinSize = 1.0, LabelsMaxSize = 1500.0, ProximityEnabled = false, LabelsFadeInEnabled = true, - FadeInStartingDistance = 500000.0, - FadeOutStartingDistance = 1000000.0, + LabelsFadeOutEnabled = true, + FadeInStartingDistance = 7500000.0, + FadeOutStartingDistance = 6000000.0, LabelsForceDomeRendering = true, LabelsDistanceEPS = 1350000.0, LabelsColor = { 1.0, 1.0, 0.0 } diff --git a/data/assets/scene/solarsystem/planets/venus/atmosphere.asset b/data/assets/scene/solarsystem/planets/venus/atmosphere.asset index 5742ade4a8..71a439877b 100644 --- a/data/assets/scene/solarsystem/planets/venus/atmosphere.asset +++ b/data/assets/scene/solarsystem/planets/venus/atmosphere.asset @@ -8,51 +8,42 @@ local Atmosphere = { Parent = transforms.Venus.Identifier, Renderable = { Type = "RenderableAtmosphere", - Atmosphere = { - -- Atmosphere radius in Km - AtmosphereRadius = 6121.9, - PlanetRadius = 6051.9, - PlanetAverageGroundReflectance = 0.018, - GroundRadianceEmittion = 0.8, - SunIntensity = 11.47, - --MieScatteringExtinctionPropCoefficient = 0.23862, - Rayleigh = { - Coefficients = { - -- Wavelengths are given in 10^-9m - Wavelengths = { 680, 550, 440 }, - -- Reflection coefficients are given in km^-1 - Scattering = { 19.518E-3, 13.83E-3, 3.65E-3 } - -- In Rayleigh scattering, the coefficients of - -- absorption and scattering are the same. - }, - -- Thichkness of atmosphere if its density were uniform, in Km - H_R = 3.53 + -- Atmosphere radius in Km + AtmosphereHeight = 6121.9 - 6051.9, + PlanetRadius = 6051.9, + PlanetAverageGroundReflectance = 0.018, + GroundRadianceEmission = 0.8, + SunIntensity = 11.47, + Rayleigh = { + Coefficients = { + -- Wavelengths are given in 10^-9m + Wavelengths = { 680, 550, 440 }, + -- Reflection coefficients are given in km^-1 + Scattering = { 19.518E-3, 13.83E-3, 3.65E-3 } + -- In Rayleigh scattering, the coefficients of + -- absorption and scattering are the same. }, - -- Default - Mie = { - Coefficients = { - -- Reflection coefficients are given in km^-1 - Scattering = { 53.61771e-3, 53.61771e-3, 53.61771e-3 }, - -- Extinction coefficients are a fraction of the Scattering coefficients - Extinction = { 53.61771e-3/0.98979, 53.61771e-3/0.98979, 53.61771e-3/0.98979 } - }, - -- Mie Height scale (atmosphere thickness for constant density) in Km - H_M = 5.42, - -- Mie Phase Function Value (G e [-1.0, 1.0]. - -- If G = 1.0, Mie phase function = Rayleigh Phase Function) - G = 0.85 + -- Thichkness of atmosphere if its density were uniform, in Km + H_R = 3.53 + }, + -- Default + Mie = { + Coefficients = { + -- Reflection coefficients are given in km^-1 + Scattering = { 53.61771e-3, 53.61771e-3, 53.61771e-3 }, + -- Extinction coefficients are a fraction of the Scattering coefficients + Extinction = { 53.61771e-3/0.98979, 53.61771e-3/0.98979, 53.61771e-3/0.98979 } }, - Image = { - ToneMapping = jToneMapping, - Exposure = 0.4, - Background = 1.8, - Gamma = 1.85 - }, - Debug = { - -- PreCalculatedTextureScale is a float from 1.0 to N, with N > 0.0 and N in Naturals (i.e., 1, 2, 3, 4, 5....) - PreCalculatedTextureScale = 1.0, - SaveCalculatedTextures = false - } + -- Mie Height scale (atmosphere thickness for constant density) in Km + H_M = 5.42, + -- Mie Phase Function Value (G e [-1.0, 1.0]. + -- If G = 1.0, Mie phase function = Rayleigh Phase Function) + G = 0.85 + }, + Debug = { + -- PreCalculatedTextureScale is a float from 1.0 to N, with N > 0.0 and N in Naturals (i.e., 1, 2, 3, 4, 5....) + PreCalculatedTextureScale = 1.0, + SaveCalculatedTextures = false } }, GUI = { diff --git a/data/assets/scene/solarsystem/planets/venus/venus.asset b/data/assets/scene/solarsystem/planets/venus/venus.asset index 0f4c1cbe9f..b1bb529e58 100644 --- a/data/assets/scene/solarsystem/planets/venus/venus.asset +++ b/data/assets/scene/solarsystem/planets/venus/venus.asset @@ -30,15 +30,17 @@ local Venus = { FileName = labelsPath .. "/venus.labels", LabelAlignmentOption = "Horizontally", -- or Circularly LabelsFontSize = 40.0, - LabelsSize = 12.0, + LabelsSize = 10.0, LabelsMinSize = 1.0, LabelsMaxSize = 1500.0, ProximityEnabled = false, LabelsFadeInEnabled = true, - FadeInStartingDistance = 500000.0, - FadeOutStartingDistance = 1000000.0, + LabelsFadeInEnabled = true, + LabelsFadeOutEnabled = true, + FadeInStartingDistance = 7000000.0, + FadeOutStartingDistance = 2000000.0, LabelsForceDomeRendering = true, - LabelsDistanceEPS = 3500000.0, + LabelsDistanceEPS = 4000000.0, LabelsColor = { 1.0, 1.0, 0.0 } } }, diff --git a/data/assets/scene/solarsystem/sun/habitablezone.asset b/data/assets/scene/solarsystem/sun/habitablezone.asset new file mode 100644 index 0000000000..1816f4500b --- /dev/null +++ b/data/assets/scene/solarsystem/sun/habitablezone.asset @@ -0,0 +1,35 @@ +local assetHelper = asset.require("util/asset_helper") +local transforms = asset.require("./transforms") +local textures = asset.require('scene/milkyway/habitable_zones/habitable_zone_textures').TexturesPath + +local HabitableZone = { + Identifier = "SunHabitableZone", + Parent = transforms.SunECLIPJ2000.Identifier, + Renderable = { + Type = "RenderableHabitableZone", + Enabled = false, + Texture = textures .. "/hot_to_cold_faded.png", + EffectiveTemperature = 5780, -- Kelvin + Luminosity = 1, -- solar + Opacity = 0.1, + Optimistic = true + }, + GUI = { + Name = "Sun Habitable Zone", + Path = "/Solar System/Sun", + Description = "Habitable zone for the sun in our solar system." + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { HabitableZone }) + +asset.meta = { + Name = "Sun Habitable Zone", + Version = "1.0", + Description = [[ The habitable zone around our sun, computed using formula and + coefficients by Kopparapu et al. (2015) https://arxiv.org/abs/1404.5292]], + Author = "OpenSpace Team", + URL = "http://openspaceproject.com", + License = "MIT license", + Identifiers = {"SunHabitableZone"} +} diff --git a/data/assets/util/debug_helper.asset b/data/assets/util/debug_helper.asset index f01d50824d..68b04f3197 100644 --- a/data/assets/util/debug_helper.asset +++ b/data/assets/util/debug_helper.asset @@ -41,7 +41,7 @@ local addGrid = function (specification) Type = "RenderableSphericalGrid", Enabled = true, LineWidth = 2.0, - GridColor = color + Color = color }, GUI = { Name = name, diff --git a/data/assets/util/generate_bookmarks.asset b/data/assets/util/generate_bookmarks.asset index b500522d92..d17307d5a6 100644 --- a/data/assets/util/generate_bookmarks.asset +++ b/data/assets/util/generate_bookmarks.asset @@ -36,7 +36,7 @@ local getBookmarks = function (guiPath, bookmarkfile) Type = 'RenderableSphericalGrid', Enabled = false, Opacity = 0.3, - GridColor = { 0.3, 0.84, 1.0}, + Color = { 0.3, 0.84, 1.0}, LineWidth = linewidth }, GUI = { diff --git a/data/assets/util/slide_deck_helper.asset b/data/assets/util/slide_deck_helper.asset index b434466ddf..4698b7c178 100644 --- a/data/assets/util/slide_deck_helper.asset +++ b/data/assets/util/slide_deck_helper.asset @@ -60,9 +60,9 @@ local setCurrentSlide = function (deck, index, interpolationDuration) opacity = 1 end if interpolationDuration == 0 then - openspace.setPropertyValueSingle("ScreenSpace." .. identifier .. ".Alpha", opacity) + openspace.setPropertyValueSingle("ScreenSpace." .. identifier .. ".Opacity", opacity) else - openspace.setPropertyValueSingle("ScreenSpace." .. identifier .. ".Alpha", opacity, interpolationDuration, "QuadraticEaseOut") + openspace.setPropertyValueSingle("ScreenSpace." .. identifier .. ".Opacity", opacity, interpolationDuration, "QuadraticEaseOut") end end end @@ -84,13 +84,13 @@ local toggleSlides = function (deck, interpolationDuration) opacity = 1 end openspace.setPropertyValueSingle( - "ScreenSpace." .. identifier .. ".Alpha", opacity, + "ScreenSpace." .. identifier .. ".Opacity", opacity, interpolationDuration, "QuadraticEaseOut") end else for i, identifier in pairs(deck.SlideIdentifiers) do openspace.setPropertyValueSingle( - "ScreenSpace." .. identifier .. ".Alpha", 0, + "ScreenSpace." .. identifier .. ".Opacity", 0, interpolationDuration, "QuadraticEaseOut") end end diff --git a/data/profiles/asteroids.profile b/data/profiles/asteroids.profile index 70bbb0af63..8e6cb40535 100644 --- a/data/profiles/asteroids.profile +++ b/data/profiles/asteroids.profile @@ -1,6 +1,8 @@ { "assets": [ "base", + "scene/solarsystem/interstellar/c-2019_q4_borisov", + "scene/solarsystem/interstellar/oumuamua", "scene/solarsystem/sssb/amor_asteroid", "scene/solarsystem/sssb/apollo_asteroid", "scene/solarsystem/sssb/aten_asteroid", diff --git a/data/profiles/mars.profile b/data/profiles/mars.profile index 56d2dd82a6..87493a7562 100644 --- a/data/profiles/mars.profile +++ b/data/profiles/mars.profile @@ -39,7 +39,7 @@ "is_local": false, "key": "I", "name": "Setup scene for insight EDL", - "script": "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', -469.300000);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISE-LS-DEM.Settings.Offset', -470.800006);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISE-LS-DEM.Enabled', true);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISE-LS.Enabled', true);openspace.time.setPause(true);openspace.time.setTime('2018 NOV 26 19:39:03.68');openspace.navigation.setNavigationState({Anchor = 'Insight',Pitch = 0.567457E-4,Position = { 1.240506E1,-1.369270E1,-2.423553E0 },ReferenceFrame = 'Root',Up = { 0.441211E0,0.247019E0,0.862737E0 },Yaw = -0.446853E-4});" + "script": "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', -469.300000);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Settings.Offset', -470.800006);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Enabled', true);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.HiRISE-LS.Enabled', true);openspace.time.setPause(true);openspace.time.setTime('2018 NOV 26 19:39:03.68');openspace.navigation.setNavigationState({Anchor = 'Insight',Pitch = 0.567457E-4,Position = { 1.240506E1,-1.369270E1,-2.423553E0 },ReferenceFrame = 'Root',Up = { 0.441211E0,0.247019E0,0.862737E0 },Yaw = -0.446853E-4});" }, { "documentation": "Disable Mars layer settings used for insight EDL", @@ -47,7 +47,7 @@ "is_local": false, "key": "SHIFT+I", "name": "Unset Insight Landing", - "script": "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', 0);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISE-LS-DEM.Settings.Offset', 0);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISE-LS-DEM.Enabled', false);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISE-LS.Enabled', false);" + "script": "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', 0);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Settings.Offset', 0);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Enabled', false);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.HiRISE-LS.Enabled', false);" }, { "documentation": "Sets time and layers for Perseverance landing", @@ -55,7 +55,7 @@ "is_local": false, "key": "P", "name": "Setup and Goto Perseverance", - "script": "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', -1677.088867);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISE-LS-DEM.Settings.Offset', -1677.088867);openspace.time.setPause(true);openspace.time.setTime('2021 FEB 18 20:32:16');openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISE-LS-DEM.Enabled', true);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISE-LS.Enabled', true);openspace.navigation.setNavigationState({Anchor = 'Perseverance',Pitch = 0.567457E-4,Position = { 1.240506E1,-1.369270E1,-2.423553E0 },ReferenceFrame = 'Root',Up = { 0.441211E0,0.247019E0,0.862737E0 },Yaw = -0.446853E-4});" + "script": "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', -1677.088867);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Settings.Offset', -1677.088867);openspace.time.setPause(true);openspace.time.setTime('2021 FEB 18 20:32:16');openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.HiRISE-LS-DEM.Enabled', true);openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.HiRISE-LS.Enabled', true);openspace.navigation.setNavigationState({Anchor = 'Perseverance',Pitch = 0.567457E-4,Position = { 1.240506E1,-1.369270E1,-2.423553E0 },ReferenceFrame = 'Root',Up = { 0.441211E0,0.247019E0,0.862737E0 },Yaw = -0.446853E-4});" } ], "mark_nodes": [ @@ -77,6 +77,6 @@ }, "version": { "major": 1, - "minor": 0 + "minor": 1 } } \ No newline at end of file diff --git a/data/profiles/newhorizons.profile b/data/profiles/newhorizons.profile index abe410ecc9..7f30857769 100644 --- a/data/profiles/newhorizons.profile +++ b/data/profiles/newhorizons.profile @@ -42,7 +42,7 @@ "is_local": false, "key": "A", "name": "Focus on New Horizons", - "script": "\"openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'NewHorizons');openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', '');openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil);" + "script": "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'NewHorizons');openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', '');openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil);" }, { "documentation": "Anchor at New Horizons, Aim at Pluto", @@ -194,7 +194,7 @@ "is_local": false, "key": "SHIFT+T", "name": "Toggle Shadows", - "script": "openspace.setPropertyValueSingle('Scene.PlutoShadow.Renderable.Enabled', not openspace.getPropertyValue('Scene.PlutoShadow.Renderable.Enabled'));" + "script": "openspace.setPropertyValueSingle('Scene.PlutoShadow.Renderable.Enabled', not openspace.getPropertyValue('Scene.PlutoShadow.Renderable.Enabled'));openspace.setPropertyValueSingle('Scene.CharonShadow.Renderable.Enabled', not openspace.getPropertyValue('Scene.CharonShadow.Renderable.Enabled'));" }, { "documentation": "Toggles the trail of New Horizons", @@ -243,4 +243,4 @@ "major": 1, "minor": 0 } -} \ No newline at end of file +} diff --git a/data/tasks/sessFileVersion.task b/data/tasks/sessFileVersion.task new file mode 100644 index 0000000000..61fae36c7f --- /dev/null +++ b/data/tasks/sessFileVersion.task @@ -0,0 +1,6 @@ +return { + { + Type = "ConvertRecFileVersionTask", + InputFilePath = "../../recordings/test-libcurl-certificate.osrec" + } +} diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt new file mode 100644 index 0000000000..0010d35d22 --- /dev/null +++ b/ext/CMakeLists.txt @@ -0,0 +1,76 @@ +########################################################################################## +# # +# OpenSpace # +# # +# Copyright (c) 2014-2021 # +# # +# Permission is hereby granted, free of charge, to any person obtaining a copy of this # +# software and associated documentation files (the "Software"), to deal in the Software # +# without restriction, including without limitation the rights to use, copy, modify, # +# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to # +# permit persons to whom the Software is furnished to do so, subject to the following # +# conditions: # +# # +# The above copyright notice and this permission notice shall be included in all copies # +# or substantial portions of the Software. # +# # +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # +# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # +# PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT # +# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF # +# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE # +# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # +########################################################################################## + +include(${OPENSPACE_CMAKE_EXT_DIR}/set_openspace_compile_settings.cmake) + +# System libraries +if (APPLE) + begin_dependency("Core Libraries") + add_library(external-system-apple INTERFACE) + + target_include_directories(external-system-apple INTERFACE "/Developer/Headers/FlatCarbon") + find_library(COREFOUNDATION_LIBRARY CoreFoundation REQUIRED) + find_library(CARBON_LIBRARY Carbon REQUIRED) + find_library(COCOA_LIBRARY Cocoa REQUIRED) # This was Carbon before + find_library(APP_SERVICES_LIBRARY ApplicationServices REQUIRED) + find_library(APPKIT_LIBRARY AppKit REQUIRED) + mark_as_advanced(COREFOUNDATION_LIBRARY CARBON_LIBRARY COCOA_LIBRARY + APP_SERVICES_LIBRARY APPKIT_LIBRARY + ) + target_link_libraries(external-system-apple INTERFACE # This was PUBLIC before + ${CARBON_LIBRARY} ${COREFOUNDATION_LIBRARY} + ${COCOA_LIBRARY} ${APP_SERVICES_LIBRARY} + ${APPKIT_LIBRARY} + ) + end_dependency() +endif () + +# Ghoul +add_subdirectory(ghoul) +set_folder_location(Lua "External") +set_folder_location(lz4 "External") +set_folder_location(GhoulTest "Unit Tests") + +# Spice +begin_dependency("Spice") +add_subdirectory(spice) +set_folder_location(spice "External") +end_dependency() + +# Curl +begin_dependency("CURL") +add_library(external-curl INTERFACE) +if (WIN32) + target_include_directories(external-curl INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/curl/include") + target_link_libraries(external-curl INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/curl/lib/libcurl.lib") + target_compile_definitions(external-curl INTERFACE "OPENSPACE_CURL_ENABLED" "CURL_STATICLIB") +else () + find_package(CURL) + if (CURL_FOUND) + target_include_directories(external-curl INTERFACE ${CURL_INCLUDE_DIRS}) + target_link_libraries(external-curl INTERFACE ${CURL_LIBRARIES}) + target_compile_definitions(external-curl INTERFACE "OPENSPACE_CURL_ENABLED") + endif () +endif () +end_dependency() diff --git a/ext/json/json.hpp b/ext/json/json.hpp index 5003a4fa2d..a70aaf8cbc 100644 --- a/ext/json/json.hpp +++ b/ext/json/json.hpp @@ -1,7 +1,7 @@ /* __ _____ _____ _____ __| | __| | | | JSON for Modern C++ -| | |__ | | | | | | version 3.6.1 +| | |__ | | | | | | version 3.9.1 |_____|_____|_____|_|___| https://github.com/nlohmann/json Licensed under the MIT License . @@ -31,12 +31,10 @@ SOFTWARE. #define INCLUDE_NLOHMANN_JSON_HPP_ #define NLOHMANN_JSON_VERSION_MAJOR 3 -#define NLOHMANN_JSON_VERSION_MINOR 6 +#define NLOHMANN_JSON_VERSION_MINOR 9 #define NLOHMANN_JSON_VERSION_PATCH 1 #include // all_of, find, for_each -#include // assert -#include // and, not, or #include // nullptr_t, ptrdiff_t, size_t #include // hash, less #include // initializer_list @@ -58,7 +56,6 @@ SOFTWARE. #include // transform #include // array -#include // and, not #include // forward_list #include // inserter, front_inserter, end #include // map @@ -105,6 +102,2216 @@ struct position_t } // namespace detail } // namespace nlohmann +// #include + + +#include // pair +// #include +/* Hedley - https://nemequ.github.io/hedley + * Created by Evan Nemerson + * + * To the extent possible under law, the author(s) have dedicated all + * copyright and related and neighboring rights to this software to + * the public domain worldwide. This software is distributed without + * any warranty. + * + * For details, see . + * SPDX-License-Identifier: CC0-1.0 + */ + +#if !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < 13) +#if defined(JSON_HEDLEY_VERSION) + #undef JSON_HEDLEY_VERSION +#endif +#define JSON_HEDLEY_VERSION 13 + +#if defined(JSON_HEDLEY_STRINGIFY_EX) + #undef JSON_HEDLEY_STRINGIFY_EX +#endif +#define JSON_HEDLEY_STRINGIFY_EX(x) #x + +#if defined(JSON_HEDLEY_STRINGIFY) + #undef JSON_HEDLEY_STRINGIFY +#endif +#define JSON_HEDLEY_STRINGIFY(x) JSON_HEDLEY_STRINGIFY_EX(x) + +#if defined(JSON_HEDLEY_CONCAT_EX) + #undef JSON_HEDLEY_CONCAT_EX +#endif +#define JSON_HEDLEY_CONCAT_EX(a,b) a##b + +#if defined(JSON_HEDLEY_CONCAT) + #undef JSON_HEDLEY_CONCAT +#endif +#define JSON_HEDLEY_CONCAT(a,b) JSON_HEDLEY_CONCAT_EX(a,b) + +#if defined(JSON_HEDLEY_CONCAT3_EX) + #undef JSON_HEDLEY_CONCAT3_EX +#endif +#define JSON_HEDLEY_CONCAT3_EX(a,b,c) a##b##c + +#if defined(JSON_HEDLEY_CONCAT3) + #undef JSON_HEDLEY_CONCAT3 +#endif +#define JSON_HEDLEY_CONCAT3(a,b,c) JSON_HEDLEY_CONCAT3_EX(a,b,c) + +#if defined(JSON_HEDLEY_VERSION_ENCODE) + #undef JSON_HEDLEY_VERSION_ENCODE +#endif +#define JSON_HEDLEY_VERSION_ENCODE(major,minor,revision) (((major) * 1000000) + ((minor) * 1000) + (revision)) + +#if defined(JSON_HEDLEY_VERSION_DECODE_MAJOR) + #undef JSON_HEDLEY_VERSION_DECODE_MAJOR +#endif +#define JSON_HEDLEY_VERSION_DECODE_MAJOR(version) ((version) / 1000000) + +#if defined(JSON_HEDLEY_VERSION_DECODE_MINOR) + #undef JSON_HEDLEY_VERSION_DECODE_MINOR +#endif +#define JSON_HEDLEY_VERSION_DECODE_MINOR(version) (((version) % 1000000) / 1000) + +#if defined(JSON_HEDLEY_VERSION_DECODE_REVISION) + #undef JSON_HEDLEY_VERSION_DECODE_REVISION +#endif +#define JSON_HEDLEY_VERSION_DECODE_REVISION(version) ((version) % 1000) + +#if defined(JSON_HEDLEY_GNUC_VERSION) + #undef JSON_HEDLEY_GNUC_VERSION +#endif +#if defined(__GNUC__) && defined(__GNUC_PATCHLEVEL__) + #define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) +#elif defined(__GNUC__) + #define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, 0) +#endif + +#if defined(JSON_HEDLEY_GNUC_VERSION_CHECK) + #undef JSON_HEDLEY_GNUC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_GNUC_VERSION) + #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GNUC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_MSVC_VERSION) + #undef JSON_HEDLEY_MSVC_VERSION +#endif +#if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 140000000) + #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 10000000, (_MSC_FULL_VER % 10000000) / 100000, (_MSC_FULL_VER % 100000) / 100) +#elif defined(_MSC_FULL_VER) + #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 1000000, (_MSC_FULL_VER % 1000000) / 10000, (_MSC_FULL_VER % 10000) / 10) +#elif defined(_MSC_VER) + #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_VER / 100, _MSC_VER % 100, 0) +#endif + +#if defined(JSON_HEDLEY_MSVC_VERSION_CHECK) + #undef JSON_HEDLEY_MSVC_VERSION_CHECK +#endif +#if !defined(_MSC_VER) + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (0) +#elif defined(_MSC_VER) && (_MSC_VER >= 1400) + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 10000000) + (minor * 100000) + (patch))) +#elif defined(_MSC_VER) && (_MSC_VER >= 1200) + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 1000000) + (minor * 10000) + (patch))) +#else + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_VER >= ((major * 100) + (minor))) +#endif + +#if defined(JSON_HEDLEY_INTEL_VERSION) + #undef JSON_HEDLEY_INTEL_VERSION +#endif +#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) + #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, __INTEL_COMPILER_UPDATE) +#elif defined(__INTEL_COMPILER) + #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, 0) +#endif + +#if defined(JSON_HEDLEY_INTEL_VERSION_CHECK) + #undef JSON_HEDLEY_INTEL_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_INTEL_VERSION) + #define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_PGI_VERSION) + #undef JSON_HEDLEY_PGI_VERSION +#endif +#if defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__) + #define JSON_HEDLEY_PGI_VERSION JSON_HEDLEY_VERSION_ENCODE(__PGIC__, __PGIC_MINOR__, __PGIC_PATCHLEVEL__) +#endif + +#if defined(JSON_HEDLEY_PGI_VERSION_CHECK) + #undef JSON_HEDLEY_PGI_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_PGI_VERSION) + #define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PGI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_SUNPRO_VERSION) + #undef JSON_HEDLEY_SUNPRO_VERSION +#endif +#if defined(__SUNPRO_C) && (__SUNPRO_C > 0x1000) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_C >> 16) & 0xf) * 10) + ((__SUNPRO_C >> 12) & 0xf), (((__SUNPRO_C >> 8) & 0xf) * 10) + ((__SUNPRO_C >> 4) & 0xf), (__SUNPRO_C & 0xf) * 10) +#elif defined(__SUNPRO_C) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_C >> 8) & 0xf, (__SUNPRO_C >> 4) & 0xf, (__SUNPRO_C) & 0xf) +#elif defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x1000) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_CC >> 16) & 0xf) * 10) + ((__SUNPRO_CC >> 12) & 0xf), (((__SUNPRO_CC >> 8) & 0xf) * 10) + ((__SUNPRO_CC >> 4) & 0xf), (__SUNPRO_CC & 0xf) * 10) +#elif defined(__SUNPRO_CC) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_CC >> 8) & 0xf, (__SUNPRO_CC >> 4) & 0xf, (__SUNPRO_CC) & 0xf) +#endif + +#if defined(JSON_HEDLEY_SUNPRO_VERSION_CHECK) + #undef JSON_HEDLEY_SUNPRO_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_SUNPRO_VERSION) + #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_SUNPRO_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION) + #undef JSON_HEDLEY_EMSCRIPTEN_VERSION +#endif +#if defined(__EMSCRIPTEN__) + #define JSON_HEDLEY_EMSCRIPTEN_VERSION JSON_HEDLEY_VERSION_ENCODE(__EMSCRIPTEN_major__, __EMSCRIPTEN_minor__, __EMSCRIPTEN_tiny__) +#endif + +#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK) + #undef JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION) + #define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_EMSCRIPTEN_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_ARM_VERSION) + #undef JSON_HEDLEY_ARM_VERSION +#endif +#if defined(__CC_ARM) && defined(__ARMCOMPILER_VERSION) + #define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCOMPILER_VERSION / 1000000, (__ARMCOMPILER_VERSION % 1000000) / 10000, (__ARMCOMPILER_VERSION % 10000) / 100) +#elif defined(__CC_ARM) && defined(__ARMCC_VERSION) + #define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCC_VERSION / 1000000, (__ARMCC_VERSION % 1000000) / 10000, (__ARMCC_VERSION % 10000) / 100) +#endif + +#if defined(JSON_HEDLEY_ARM_VERSION_CHECK) + #undef JSON_HEDLEY_ARM_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_ARM_VERSION) + #define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_ARM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_IBM_VERSION) + #undef JSON_HEDLEY_IBM_VERSION +#endif +#if defined(__ibmxl__) + #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ibmxl_version__, __ibmxl_release__, __ibmxl_modification__) +#elif defined(__xlC__) && defined(__xlC_ver__) + #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, (__xlC_ver__ >> 8) & 0xff) +#elif defined(__xlC__) + #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, 0) +#endif + +#if defined(JSON_HEDLEY_IBM_VERSION_CHECK) + #undef JSON_HEDLEY_IBM_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_IBM_VERSION) + #define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IBM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_VERSION) + #undef JSON_HEDLEY_TI_VERSION +#endif +#if \ + defined(__TI_COMPILER_VERSION__) && \ + ( \ + defined(__TMS470__) || defined(__TI_ARM__) || \ + defined(__MSP430__) || \ + defined(__TMS320C2000__) \ + ) +#if (__TI_COMPILER_VERSION__ >= 16000000) + #define JSON_HEDLEY_TI_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif +#endif + +#if defined(JSON_HEDLEY_TI_VERSION_CHECK) + #undef JSON_HEDLEY_TI_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_VERSION) + #define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL2000_VERSION) + #undef JSON_HEDLEY_TI_CL2000_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C2000__) + #define JSON_HEDLEY_TI_CL2000_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL2000_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL2000_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL2000_VERSION) + #define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL2000_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL430_VERSION) + #undef JSON_HEDLEY_TI_CL430_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__MSP430__) + #define JSON_HEDLEY_TI_CL430_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL430_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL430_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL430_VERSION) + #define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL430_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_ARMCL_VERSION) + #undef JSON_HEDLEY_TI_ARMCL_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && (defined(__TMS470__) || defined(__TI_ARM__)) + #define JSON_HEDLEY_TI_ARMCL_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_ARMCL_VERSION_CHECK) + #undef JSON_HEDLEY_TI_ARMCL_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_ARMCL_VERSION) + #define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_ARMCL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL6X_VERSION) + #undef JSON_HEDLEY_TI_CL6X_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C6X__) + #define JSON_HEDLEY_TI_CL6X_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL6X_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL6X_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL6X_VERSION) + #define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL6X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL7X_VERSION) + #undef JSON_HEDLEY_TI_CL7X_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__C7000__) + #define JSON_HEDLEY_TI_CL7X_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL7X_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL7X_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL7X_VERSION) + #define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL7X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CLPRU_VERSION) + #undef JSON_HEDLEY_TI_CLPRU_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__PRU__) + #define JSON_HEDLEY_TI_CLPRU_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CLPRU_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CLPRU_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CLPRU_VERSION) + #define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CLPRU_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_CRAY_VERSION) + #undef JSON_HEDLEY_CRAY_VERSION +#endif +#if defined(_CRAYC) + #if defined(_RELEASE_PATCHLEVEL) + #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, _RELEASE_PATCHLEVEL) + #else + #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, 0) + #endif +#endif + +#if defined(JSON_HEDLEY_CRAY_VERSION_CHECK) + #undef JSON_HEDLEY_CRAY_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_CRAY_VERSION) + #define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_CRAY_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_IAR_VERSION) + #undef JSON_HEDLEY_IAR_VERSION +#endif +#if defined(__IAR_SYSTEMS_ICC__) + #if __VER__ > 1000 + #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE((__VER__ / 1000000), ((__VER__ / 1000) % 1000), (__VER__ % 1000)) + #else + #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE(VER / 100, __VER__ % 100, 0) + #endif +#endif + +#if defined(JSON_HEDLEY_IAR_VERSION_CHECK) + #undef JSON_HEDLEY_IAR_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_IAR_VERSION) + #define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IAR_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TINYC_VERSION) + #undef JSON_HEDLEY_TINYC_VERSION +#endif +#if defined(__TINYC__) + #define JSON_HEDLEY_TINYC_VERSION JSON_HEDLEY_VERSION_ENCODE(__TINYC__ / 1000, (__TINYC__ / 100) % 10, __TINYC__ % 100) +#endif + +#if defined(JSON_HEDLEY_TINYC_VERSION_CHECK) + #undef JSON_HEDLEY_TINYC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TINYC_VERSION) + #define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TINYC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_DMC_VERSION) + #undef JSON_HEDLEY_DMC_VERSION +#endif +#if defined(__DMC__) + #define JSON_HEDLEY_DMC_VERSION JSON_HEDLEY_VERSION_ENCODE(__DMC__ >> 8, (__DMC__ >> 4) & 0xf, __DMC__ & 0xf) +#endif + +#if defined(JSON_HEDLEY_DMC_VERSION_CHECK) + #undef JSON_HEDLEY_DMC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_DMC_VERSION) + #define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_DMC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_COMPCERT_VERSION) + #undef JSON_HEDLEY_COMPCERT_VERSION +#endif +#if defined(__COMPCERT_VERSION__) + #define JSON_HEDLEY_COMPCERT_VERSION JSON_HEDLEY_VERSION_ENCODE(__COMPCERT_VERSION__ / 10000, (__COMPCERT_VERSION__ / 100) % 100, __COMPCERT_VERSION__ % 100) +#endif + +#if defined(JSON_HEDLEY_COMPCERT_VERSION_CHECK) + #undef JSON_HEDLEY_COMPCERT_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_COMPCERT_VERSION) + #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_COMPCERT_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_PELLES_VERSION) + #undef JSON_HEDLEY_PELLES_VERSION +#endif +#if defined(__POCC__) + #define JSON_HEDLEY_PELLES_VERSION JSON_HEDLEY_VERSION_ENCODE(__POCC__ / 100, __POCC__ % 100, 0) +#endif + +#if defined(JSON_HEDLEY_PELLES_VERSION_CHECK) + #undef JSON_HEDLEY_PELLES_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_PELLES_VERSION) + #define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PELLES_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_GCC_VERSION) + #undef JSON_HEDLEY_GCC_VERSION +#endif +#if \ + defined(JSON_HEDLEY_GNUC_VERSION) && \ + !defined(__clang__) && \ + !defined(JSON_HEDLEY_INTEL_VERSION) && \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_ARM_VERSION) && \ + !defined(JSON_HEDLEY_TI_VERSION) && \ + !defined(JSON_HEDLEY_TI_ARMCL_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL430_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL2000_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL6X_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL7X_VERSION) && \ + !defined(JSON_HEDLEY_TI_CLPRU_VERSION) && \ + !defined(__COMPCERT__) + #define JSON_HEDLEY_GCC_VERSION JSON_HEDLEY_GNUC_VERSION +#endif + +#if defined(JSON_HEDLEY_GCC_VERSION_CHECK) + #undef JSON_HEDLEY_GCC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_GCC_VERSION) + #define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_HAS_ATTRIBUTE +#endif +#if defined(__has_attribute) + #define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) __has_attribute(attribute) +#else + #define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_GNUC_HAS_ATTRIBUTE +#endif +#if defined(__has_attribute) + #define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) __has_attribute(attribute) +#else + #define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_GCC_HAS_ATTRIBUTE +#endif +#if defined(__has_attribute) + #define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) __has_attribute(attribute) +#else + #define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE +#endif +#if \ + defined(__has_cpp_attribute) && \ + defined(__cplusplus) && \ + (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) __has_cpp_attribute(attribute) +#else + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) (0) +#endif + +#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS) + #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS +#endif +#if !defined(__cplusplus) || !defined(__has_cpp_attribute) + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0) +#elif \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_IAR_VERSION) && \ + (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) && \ + (!defined(JSON_HEDLEY_MSVC_VERSION) || JSON_HEDLEY_MSVC_VERSION_CHECK(19,20,0)) + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(ns::attribute) +#else + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE +#endif +#if defined(__has_cpp_attribute) && defined(__cplusplus) + #define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute) +#else + #define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE +#endif +#if defined(__has_cpp_attribute) && defined(__cplusplus) + #define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute) +#else + #define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_BUILTIN) + #undef JSON_HEDLEY_HAS_BUILTIN +#endif +#if defined(__has_builtin) + #define JSON_HEDLEY_HAS_BUILTIN(builtin) __has_builtin(builtin) +#else + #define JSON_HEDLEY_HAS_BUILTIN(builtin) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_BUILTIN) + #undef JSON_HEDLEY_GNUC_HAS_BUILTIN +#endif +#if defined(__has_builtin) + #define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin) +#else + #define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_BUILTIN) + #undef JSON_HEDLEY_GCC_HAS_BUILTIN +#endif +#if defined(__has_builtin) + #define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin) +#else + #define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_FEATURE) + #undef JSON_HEDLEY_HAS_FEATURE +#endif +#if defined(__has_feature) + #define JSON_HEDLEY_HAS_FEATURE(feature) __has_feature(feature) +#else + #define JSON_HEDLEY_HAS_FEATURE(feature) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_FEATURE) + #undef JSON_HEDLEY_GNUC_HAS_FEATURE +#endif +#if defined(__has_feature) + #define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature) +#else + #define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_FEATURE) + #undef JSON_HEDLEY_GCC_HAS_FEATURE +#endif +#if defined(__has_feature) + #define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature) +#else + #define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_EXTENSION) + #undef JSON_HEDLEY_HAS_EXTENSION +#endif +#if defined(__has_extension) + #define JSON_HEDLEY_HAS_EXTENSION(extension) __has_extension(extension) +#else + #define JSON_HEDLEY_HAS_EXTENSION(extension) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_EXTENSION) + #undef JSON_HEDLEY_GNUC_HAS_EXTENSION +#endif +#if defined(__has_extension) + #define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension) +#else + #define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_EXTENSION) + #undef JSON_HEDLEY_GCC_HAS_EXTENSION +#endif +#if defined(__has_extension) + #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension) +#else + #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE +#endif +#if defined(__has_declspec_attribute) + #define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) __has_declspec_attribute(attribute) +#else + #define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE +#endif +#if defined(__has_declspec_attribute) + #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute) +#else + #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE +#endif +#if defined(__has_declspec_attribute) + #define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute) +#else + #define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_WARNING) + #undef JSON_HEDLEY_HAS_WARNING +#endif +#if defined(__has_warning) + #define JSON_HEDLEY_HAS_WARNING(warning) __has_warning(warning) +#else + #define JSON_HEDLEY_HAS_WARNING(warning) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_WARNING) + #undef JSON_HEDLEY_GNUC_HAS_WARNING +#endif +#if defined(__has_warning) + #define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning) +#else + #define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_WARNING) + #undef JSON_HEDLEY_GCC_HAS_WARNING +#endif +#if defined(__has_warning) + #define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning) +#else + #define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +/* JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ is for + HEDLEY INTERNAL USE ONLY. API subject to change without notice. */ +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ +#endif +#if defined(__cplusplus) +# if JSON_HEDLEY_HAS_WARNING("-Wc++98-compat") +# if JSON_HEDLEY_HAS_WARNING("-Wc++17-extensions") +# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ + _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \ + xpr \ + JSON_HEDLEY_DIAGNOSTIC_POP +# else +# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ + xpr \ + JSON_HEDLEY_DIAGNOSTIC_POP +# endif +# endif +#endif +#if !defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(x) x +#endif + +#if defined(JSON_HEDLEY_CONST_CAST) + #undef JSON_HEDLEY_CONST_CAST +#endif +#if defined(__cplusplus) +# define JSON_HEDLEY_CONST_CAST(T, expr) (const_cast(expr)) +#elif \ + JSON_HEDLEY_HAS_WARNING("-Wcast-qual") || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +# define JSON_HEDLEY_CONST_CAST(T, expr) (__extension__ ({ \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL \ + ((T) (expr)); \ + JSON_HEDLEY_DIAGNOSTIC_POP \ + })) +#else +# define JSON_HEDLEY_CONST_CAST(T, expr) ((T) (expr)) +#endif + +#if defined(JSON_HEDLEY_REINTERPRET_CAST) + #undef JSON_HEDLEY_REINTERPRET_CAST +#endif +#if defined(__cplusplus) + #define JSON_HEDLEY_REINTERPRET_CAST(T, expr) (reinterpret_cast(expr)) +#else + #define JSON_HEDLEY_REINTERPRET_CAST(T, expr) ((T) (expr)) +#endif + +#if defined(JSON_HEDLEY_STATIC_CAST) + #undef JSON_HEDLEY_STATIC_CAST +#endif +#if defined(__cplusplus) + #define JSON_HEDLEY_STATIC_CAST(T, expr) (static_cast(expr)) +#else + #define JSON_HEDLEY_STATIC_CAST(T, expr) ((T) (expr)) +#endif + +#if defined(JSON_HEDLEY_CPP_CAST) + #undef JSON_HEDLEY_CPP_CAST +#endif +#if defined(__cplusplus) +# if JSON_HEDLEY_HAS_WARNING("-Wold-style-cast") +# define JSON_HEDLEY_CPP_CAST(T, expr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wold-style-cast\"") \ + ((T) (expr)) \ + JSON_HEDLEY_DIAGNOSTIC_POP +# elif JSON_HEDLEY_IAR_VERSION_CHECK(8,3,0) +# define JSON_HEDLEY_CPP_CAST(T, expr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("diag_suppress=Pe137") \ + JSON_HEDLEY_DIAGNOSTIC_POP \ +# else +# define JSON_HEDLEY_CPP_CAST(T, expr) ((T) (expr)) +# endif +#else +# define JSON_HEDLEY_CPP_CAST(T, expr) (expr) +#endif + +#if \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ + defined(__clang__) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(2,0,1) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,17) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(8,0,0) || \ + (JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) && defined(__C99_PRAGMA_OPERATOR)) + #define JSON_HEDLEY_PRAGMA(value) _Pragma(#value) +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) + #define JSON_HEDLEY_PRAGMA(value) __pragma(value) +#else + #define JSON_HEDLEY_PRAGMA(value) +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_PUSH) + #undef JSON_HEDLEY_DIAGNOSTIC_PUSH +#endif +#if defined(JSON_HEDLEY_DIAGNOSTIC_POP) + #undef JSON_HEDLEY_DIAGNOSTIC_POP +#endif +#if defined(__clang__) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("clang diagnostic push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("clang diagnostic pop") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("GCC diagnostic push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH __pragma(warning(push)) + #define JSON_HEDLEY_DIAGNOSTIC_POP __pragma(warning(pop)) +#elif JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("pop") +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,4,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("diag_push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("diag_pop") +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)") +#else + #define JSON_HEDLEY_DIAGNOSTIC_PUSH + #define JSON_HEDLEY_DIAGNOSTIC_POP +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wdeprecated-declarations") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warning(disable:1478 1786)") +#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:4996)) +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1291,1718") +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && !defined(__cplusplus) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,E_DEPRECATED_ATT,E_DEPRECATED_ATT_MESS)") +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && defined(__cplusplus) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,symdeprecated,symdeprecated2)") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress=Pe1444,Pe1215") +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warn(disable:2241)") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("clang diagnostic ignored \"-Wunknown-pragmas\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("warning(disable:161)") +#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 1675") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:4068)) +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(16,9,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163") +#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress=Pe161") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-attributes") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("clang diagnostic ignored \"-Wunknown-attributes\"") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("warning(disable:1292)") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:5030)) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097") +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("error_messages(off,attrskipunsup)") +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(18,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1173") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress=Pe1097") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wcast-qual") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("clang diagnostic ignored \"-Wcast-qual\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("warning(disable:2203 2331)") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("GCC diagnostic ignored \"-Wcast-qual\"") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL +#endif + +#if defined(JSON_HEDLEY_DEPRECATED) + #undef JSON_HEDLEY_DEPRECATED +#endif +#if defined(JSON_HEDLEY_DEPRECATED_FOR) + #undef JSON_HEDLEY_DEPRECATED_FOR +#endif +#if JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) + #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated("Since " # since)) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated("Since " #since "; use " #replacement)) +#elif defined(__cplusplus) && (__cplusplus >= 201402L) + #define JSON_HEDLEY_DEPRECATED(since) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since)]]) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since "; use " #replacement)]]) +#elif \ + JSON_HEDLEY_HAS_EXTENSION(attribute_deprecated_with_message) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(18,1,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(18,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0) + #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__("Since " #since))) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__("Since " #since "; use " #replacement))) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(deprecated) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__)) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__)) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_PELLES_VERSION_CHECK(6,50,0) + #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated) +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DEPRECATED(since) _Pragma("deprecated") + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) _Pragma("deprecated") +#else + #define JSON_HEDLEY_DEPRECATED(since) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) +#endif + +#if defined(JSON_HEDLEY_UNAVAILABLE) + #undef JSON_HEDLEY_UNAVAILABLE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(warning) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_UNAVAILABLE(available_since) __attribute__((__warning__("Not available until " #available_since))) +#else + #define JSON_HEDLEY_UNAVAILABLE(available_since) +#endif + +#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT) + #undef JSON_HEDLEY_WARN_UNUSED_RESULT +#endif +#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT_MSG) + #undef JSON_HEDLEY_WARN_UNUSED_RESULT_MSG +#endif +#if (JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard) >= 201907L) + #define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard(msg)]]) +#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard) + #define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(warn_unused_result) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__)) + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) __attribute__((__warn_unused_result__)) +#elif defined(_Check_return_) /* SAL */ + #define JSON_HEDLEY_WARN_UNUSED_RESULT _Check_return_ + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) _Check_return_ +#else + #define JSON_HEDLEY_WARN_UNUSED_RESULT + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) +#endif + +#if defined(JSON_HEDLEY_SENTINEL) + #undef JSON_HEDLEY_SENTINEL +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(sentinel) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) + #define JSON_HEDLEY_SENTINEL(position) __attribute__((__sentinel__(position))) +#else + #define JSON_HEDLEY_SENTINEL(position) +#endif + +#if defined(JSON_HEDLEY_NO_RETURN) + #undef JSON_HEDLEY_NO_RETURN +#endif +#if JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_NO_RETURN __noreturn +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__)) +#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L + #define JSON_HEDLEY_NO_RETURN _Noreturn +#elif defined(__cplusplus) && (__cplusplus >= 201103L) + #define JSON_HEDLEY_NO_RETURN JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[noreturn]]) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(noreturn) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,2,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__)) +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) + #define JSON_HEDLEY_NO_RETURN _Pragma("does_not_return") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) + #define JSON_HEDLEY_NO_RETURN __declspec(noreturn) +#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0) && defined(__cplusplus) + #define JSON_HEDLEY_NO_RETURN _Pragma("FUNC_NEVER_RETURNS;") +#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0) + #define JSON_HEDLEY_NO_RETURN __attribute((noreturn)) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0) + #define JSON_HEDLEY_NO_RETURN __declspec(noreturn) +#else + #define JSON_HEDLEY_NO_RETURN +#endif + +#if defined(JSON_HEDLEY_NO_ESCAPE) + #undef JSON_HEDLEY_NO_ESCAPE +#endif +#if JSON_HEDLEY_HAS_ATTRIBUTE(noescape) + #define JSON_HEDLEY_NO_ESCAPE __attribute__((__noescape__)) +#else + #define JSON_HEDLEY_NO_ESCAPE +#endif + +#if defined(JSON_HEDLEY_UNREACHABLE) + #undef JSON_HEDLEY_UNREACHABLE +#endif +#if defined(JSON_HEDLEY_UNREACHABLE_RETURN) + #undef JSON_HEDLEY_UNREACHABLE_RETURN +#endif +#if defined(JSON_HEDLEY_ASSUME) + #undef JSON_HEDLEY_ASSUME +#endif +#if \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_ASSUME(expr) __assume(expr) +#elif JSON_HEDLEY_HAS_BUILTIN(__builtin_assume) + #define JSON_HEDLEY_ASSUME(expr) __builtin_assume(expr) +#elif \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) + #if defined(__cplusplus) + #define JSON_HEDLEY_ASSUME(expr) std::_nassert(expr) + #else + #define JSON_HEDLEY_ASSUME(expr) _nassert(expr) + #endif +#endif +#if \ + (JSON_HEDLEY_HAS_BUILTIN(__builtin_unreachable) && (!defined(JSON_HEDLEY_ARM_VERSION))) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(18,10,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,5) + #define JSON_HEDLEY_UNREACHABLE() __builtin_unreachable() +#elif defined(JSON_HEDLEY_ASSUME) + #define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0) +#endif +#if !defined(JSON_HEDLEY_ASSUME) + #if defined(JSON_HEDLEY_UNREACHABLE) + #define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, ((expr) ? 1 : (JSON_HEDLEY_UNREACHABLE(), 1))) + #else + #define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, expr) + #endif +#endif +#if defined(JSON_HEDLEY_UNREACHABLE) + #if \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) + #define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (JSON_HEDLEY_STATIC_CAST(void, JSON_HEDLEY_ASSUME(0)), (value)) + #else + #define JSON_HEDLEY_UNREACHABLE_RETURN(value) JSON_HEDLEY_UNREACHABLE() + #endif +#else + #define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (value) +#endif +#if !defined(JSON_HEDLEY_UNREACHABLE) + #define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0) +#endif + +JSON_HEDLEY_DIAGNOSTIC_PUSH +#if JSON_HEDLEY_HAS_WARNING("-Wpedantic") + #pragma clang diagnostic ignored "-Wpedantic" +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wc++98-compat-pedantic") && defined(__cplusplus) + #pragma clang diagnostic ignored "-Wc++98-compat-pedantic" +#endif +#if JSON_HEDLEY_GCC_HAS_WARNING("-Wvariadic-macros",4,0,0) + #if defined(__clang__) + #pragma clang diagnostic ignored "-Wvariadic-macros" + #elif defined(JSON_HEDLEY_GCC_VERSION) + #pragma GCC diagnostic ignored "-Wvariadic-macros" + #endif +#endif +#if defined(JSON_HEDLEY_NON_NULL) + #undef JSON_HEDLEY_NON_NULL +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(nonnull) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) + #define JSON_HEDLEY_NON_NULL(...) __attribute__((__nonnull__(__VA_ARGS__))) +#else + #define JSON_HEDLEY_NON_NULL(...) +#endif +JSON_HEDLEY_DIAGNOSTIC_POP + +#if defined(JSON_HEDLEY_PRINTF_FORMAT) + #undef JSON_HEDLEY_PRINTF_FORMAT +#endif +#if defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && !defined(__USE_MINGW_ANSI_STDIO) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(ms_printf, string_idx, first_to_check))) +#elif defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && defined(__USE_MINGW_ANSI_STDIO) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(gnu_printf, string_idx, first_to_check))) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(format) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(__printf__, string_idx, first_to_check))) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(6,0,0) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __declspec(vaformat(printf,string_idx,first_to_check)) +#else + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) +#endif + +#if defined(JSON_HEDLEY_CONSTEXPR) + #undef JSON_HEDLEY_CONSTEXPR +#endif +#if defined(__cplusplus) + #if __cplusplus >= 201103L + #define JSON_HEDLEY_CONSTEXPR JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(constexpr) + #endif +#endif +#if !defined(JSON_HEDLEY_CONSTEXPR) + #define JSON_HEDLEY_CONSTEXPR +#endif + +#if defined(JSON_HEDLEY_PREDICT) + #undef JSON_HEDLEY_PREDICT +#endif +#if defined(JSON_HEDLEY_LIKELY) + #undef JSON_HEDLEY_LIKELY +#endif +#if defined(JSON_HEDLEY_UNLIKELY) + #undef JSON_HEDLEY_UNLIKELY +#endif +#if defined(JSON_HEDLEY_UNPREDICTABLE) + #undef JSON_HEDLEY_UNPREDICTABLE +#endif +#if JSON_HEDLEY_HAS_BUILTIN(__builtin_unpredictable) + #define JSON_HEDLEY_UNPREDICTABLE(expr) __builtin_unpredictable((expr)) +#endif +#if \ + JSON_HEDLEY_HAS_BUILTIN(__builtin_expect_with_probability) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(9,0,0) +# define JSON_HEDLEY_PREDICT(expr, value, probability) __builtin_expect_with_probability( (expr), (value), (probability)) +# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) __builtin_expect_with_probability(!!(expr), 1 , (probability)) +# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) __builtin_expect_with_probability(!!(expr), 0 , (probability)) +# define JSON_HEDLEY_LIKELY(expr) __builtin_expect (!!(expr), 1 ) +# define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect (!!(expr), 0 ) +#elif \ + JSON_HEDLEY_HAS_BUILTIN(__builtin_expect) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,27) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) +# define JSON_HEDLEY_PREDICT(expr, expected, probability) \ + (((probability) >= 0.9) ? __builtin_expect((expr), (expected)) : (JSON_HEDLEY_STATIC_CAST(void, expected), (expr))) +# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) \ + (__extension__ ({ \ + double hedley_probability_ = (probability); \ + ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 1) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 0) : !!(expr))); \ + })) +# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) \ + (__extension__ ({ \ + double hedley_probability_ = (probability); \ + ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 0) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 1) : !!(expr))); \ + })) +# define JSON_HEDLEY_LIKELY(expr) __builtin_expect(!!(expr), 1) +# define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect(!!(expr), 0) +#else +# define JSON_HEDLEY_PREDICT(expr, expected, probability) (JSON_HEDLEY_STATIC_CAST(void, expected), (expr)) +# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) (!!(expr)) +# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) (!!(expr)) +# define JSON_HEDLEY_LIKELY(expr) (!!(expr)) +# define JSON_HEDLEY_UNLIKELY(expr) (!!(expr)) +#endif +#if !defined(JSON_HEDLEY_UNPREDICTABLE) + #define JSON_HEDLEY_UNPREDICTABLE(expr) JSON_HEDLEY_PREDICT(expr, 1, 0.5) +#endif + +#if defined(JSON_HEDLEY_MALLOC) + #undef JSON_HEDLEY_MALLOC +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(malloc) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_MALLOC __attribute__((__malloc__)) +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) + #define JSON_HEDLEY_MALLOC _Pragma("returns_new_memory") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(14, 0, 0) + #define JSON_HEDLEY_MALLOC __declspec(restrict) +#else + #define JSON_HEDLEY_MALLOC +#endif + +#if defined(JSON_HEDLEY_PURE) + #undef JSON_HEDLEY_PURE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(pure) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(2,96,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) +# define JSON_HEDLEY_PURE __attribute__((__pure__)) +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) +# define JSON_HEDLEY_PURE _Pragma("does_not_write_global_data") +#elif defined(__cplusplus) && \ + ( \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(2,0,1) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) \ + ) +# define JSON_HEDLEY_PURE _Pragma("FUNC_IS_PURE;") +#else +# define JSON_HEDLEY_PURE +#endif + +#if defined(JSON_HEDLEY_CONST) + #undef JSON_HEDLEY_CONST +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(const) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(2,5,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_CONST __attribute__((__const__)) +#elif \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) + #define JSON_HEDLEY_CONST _Pragma("no_side_effect") +#else + #define JSON_HEDLEY_CONST JSON_HEDLEY_PURE +#endif + +#if defined(JSON_HEDLEY_RESTRICT) + #undef JSON_HEDLEY_RESTRICT +#endif +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && !defined(__cplusplus) + #define JSON_HEDLEY_RESTRICT restrict +#elif \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,4) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus)) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \ + defined(__clang__) + #define JSON_HEDLEY_RESTRICT __restrict +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,3,0) && !defined(__cplusplus) + #define JSON_HEDLEY_RESTRICT _Restrict +#else + #define JSON_HEDLEY_RESTRICT +#endif + +#if defined(JSON_HEDLEY_INLINE) + #undef JSON_HEDLEY_INLINE +#endif +#if \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ + (defined(__cplusplus) && (__cplusplus >= 199711L)) + #define JSON_HEDLEY_INLINE inline +#elif \ + defined(JSON_HEDLEY_GCC_VERSION) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(6,2,0) + #define JSON_HEDLEY_INLINE __inline__ +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,1,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_INLINE __inline +#else + #define JSON_HEDLEY_INLINE +#endif + +#if defined(JSON_HEDLEY_ALWAYS_INLINE) + #undef JSON_HEDLEY_ALWAYS_INLINE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(always_inline) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) +# define JSON_HEDLEY_ALWAYS_INLINE __attribute__((__always_inline__)) JSON_HEDLEY_INLINE +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) +# define JSON_HEDLEY_ALWAYS_INLINE __forceinline +#elif defined(__cplusplus) && \ + ( \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) \ + ) +# define JSON_HEDLEY_ALWAYS_INLINE _Pragma("FUNC_ALWAYS_INLINE;") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) +# define JSON_HEDLEY_ALWAYS_INLINE _Pragma("inline=forced") +#else +# define JSON_HEDLEY_ALWAYS_INLINE JSON_HEDLEY_INLINE +#endif + +#if defined(JSON_HEDLEY_NEVER_INLINE) + #undef JSON_HEDLEY_NEVER_INLINE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(noinline) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_NEVER_INLINE __attribute__((__noinline__)) +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) + #define JSON_HEDLEY_NEVER_INLINE __declspec(noinline) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(10,2,0) + #define JSON_HEDLEY_NEVER_INLINE _Pragma("noinline") +#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0) && defined(__cplusplus) + #define JSON_HEDLEY_NEVER_INLINE _Pragma("FUNC_CANNOT_INLINE;") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_NEVER_INLINE _Pragma("inline=never") +#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0) + #define JSON_HEDLEY_NEVER_INLINE __attribute((noinline)) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0) + #define JSON_HEDLEY_NEVER_INLINE __declspec(noinline) +#else + #define JSON_HEDLEY_NEVER_INLINE +#endif + +#if defined(JSON_HEDLEY_PRIVATE) + #undef JSON_HEDLEY_PRIVATE +#endif +#if defined(JSON_HEDLEY_PUBLIC) + #undef JSON_HEDLEY_PUBLIC +#endif +#if defined(JSON_HEDLEY_IMPORT) + #undef JSON_HEDLEY_IMPORT +#endif +#if defined(_WIN32) || defined(__CYGWIN__) +# define JSON_HEDLEY_PRIVATE +# define JSON_HEDLEY_PUBLIC __declspec(dllexport) +# define JSON_HEDLEY_IMPORT __declspec(dllimport) +#else +# if \ + JSON_HEDLEY_HAS_ATTRIBUTE(visibility) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ + ( \ + defined(__TI_EABI__) && \ + ( \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) \ + ) \ + ) +# define JSON_HEDLEY_PRIVATE __attribute__((__visibility__("hidden"))) +# define JSON_HEDLEY_PUBLIC __attribute__((__visibility__("default"))) +# else +# define JSON_HEDLEY_PRIVATE +# define JSON_HEDLEY_PUBLIC +# endif +# define JSON_HEDLEY_IMPORT extern +#endif + +#if defined(JSON_HEDLEY_NO_THROW) + #undef JSON_HEDLEY_NO_THROW +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(nothrow) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_NO_THROW __attribute__((__nothrow__)) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) + #define JSON_HEDLEY_NO_THROW __declspec(nothrow) +#else + #define JSON_HEDLEY_NO_THROW +#endif + +#if defined(JSON_HEDLEY_FALL_THROUGH) + #undef JSON_HEDLEY_FALL_THROUGH +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(fallthrough) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(7,0,0) + #define JSON_HEDLEY_FALL_THROUGH __attribute__((__fallthrough__)) +#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(clang,fallthrough) + #define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[clang::fallthrough]]) +#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(fallthrough) + #define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[fallthrough]]) +#elif defined(__fallthrough) /* SAL */ + #define JSON_HEDLEY_FALL_THROUGH __fallthrough +#else + #define JSON_HEDLEY_FALL_THROUGH +#endif + +#if defined(JSON_HEDLEY_RETURNS_NON_NULL) + #undef JSON_HEDLEY_RETURNS_NON_NULL +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(returns_nonnull) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) + #define JSON_HEDLEY_RETURNS_NON_NULL __attribute__((__returns_nonnull__)) +#elif defined(_Ret_notnull_) /* SAL */ + #define JSON_HEDLEY_RETURNS_NON_NULL _Ret_notnull_ +#else + #define JSON_HEDLEY_RETURNS_NON_NULL +#endif + +#if defined(JSON_HEDLEY_ARRAY_PARAM) + #undef JSON_HEDLEY_ARRAY_PARAM +#endif +#if \ + defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \ + !defined(__STDC_NO_VLA__) && \ + !defined(__cplusplus) && \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_TINYC_VERSION) + #define JSON_HEDLEY_ARRAY_PARAM(name) (name) +#else + #define JSON_HEDLEY_ARRAY_PARAM(name) +#endif + +#if defined(JSON_HEDLEY_IS_CONSTANT) + #undef JSON_HEDLEY_IS_CONSTANT +#endif +#if defined(JSON_HEDLEY_REQUIRE_CONSTEXPR) + #undef JSON_HEDLEY_REQUIRE_CONSTEXPR +#endif +/* JSON_HEDLEY_IS_CONSTEXPR_ is for + HEDLEY INTERNAL USE ONLY. API subject to change without notice. */ +#if defined(JSON_HEDLEY_IS_CONSTEXPR_) + #undef JSON_HEDLEY_IS_CONSTEXPR_ +#endif +#if \ + JSON_HEDLEY_HAS_BUILTIN(__builtin_constant_p) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,19) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) && !defined(__cplusplus)) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) + #define JSON_HEDLEY_IS_CONSTANT(expr) __builtin_constant_p(expr) +#endif +#if !defined(__cplusplus) +# if \ + JSON_HEDLEY_HAS_BUILTIN(__builtin_types_compatible_p) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,24) +#if defined(__INTPTR_TYPE__) + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0)), int*) +#else + #include + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((intptr_t) ((expr) * 0)) : (int*) 0)), int*) +#endif +# elif \ + ( \ + defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && \ + !defined(JSON_HEDLEY_SUNPRO_VERSION) && \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_IAR_VERSION)) || \ + JSON_HEDLEY_HAS_EXTENSION(c_generic_selections) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,3,0) +#if defined(__INTPTR_TYPE__) + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0), int*: 1, void*: 0) +#else + #include + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((intptr_t) * 0) : (int*) 0), int*: 1, void*: 0) +#endif +# elif \ + defined(JSON_HEDLEY_GCC_VERSION) || \ + defined(JSON_HEDLEY_INTEL_VERSION) || \ + defined(JSON_HEDLEY_TINYC_VERSION) || \ + defined(JSON_HEDLEY_TI_ARMCL_VERSION) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(18,12,0) || \ + defined(JSON_HEDLEY_TI_CL2000_VERSION) || \ + defined(JSON_HEDLEY_TI_CL6X_VERSION) || \ + defined(JSON_HEDLEY_TI_CL7X_VERSION) || \ + defined(JSON_HEDLEY_TI_CLPRU_VERSION) || \ + defined(__clang__) +# define JSON_HEDLEY_IS_CONSTEXPR_(expr) ( \ + sizeof(void) != \ + sizeof(*( \ + 1 ? \ + ((void*) ((expr) * 0L) ) : \ +((struct { char v[sizeof(void) * 2]; } *) 1) \ + ) \ + ) \ + ) +# endif +#endif +#if defined(JSON_HEDLEY_IS_CONSTEXPR_) + #if !defined(JSON_HEDLEY_IS_CONSTANT) + #define JSON_HEDLEY_IS_CONSTANT(expr) JSON_HEDLEY_IS_CONSTEXPR_(expr) + #endif + #define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (JSON_HEDLEY_IS_CONSTEXPR_(expr) ? (expr) : (-1)) +#else + #if !defined(JSON_HEDLEY_IS_CONSTANT) + #define JSON_HEDLEY_IS_CONSTANT(expr) (0) + #endif + #define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (expr) +#endif + +#if defined(JSON_HEDLEY_BEGIN_C_DECLS) + #undef JSON_HEDLEY_BEGIN_C_DECLS +#endif +#if defined(JSON_HEDLEY_END_C_DECLS) + #undef JSON_HEDLEY_END_C_DECLS +#endif +#if defined(JSON_HEDLEY_C_DECL) + #undef JSON_HEDLEY_C_DECL +#endif +#if defined(__cplusplus) + #define JSON_HEDLEY_BEGIN_C_DECLS extern "C" { + #define JSON_HEDLEY_END_C_DECLS } + #define JSON_HEDLEY_C_DECL extern "C" +#else + #define JSON_HEDLEY_BEGIN_C_DECLS + #define JSON_HEDLEY_END_C_DECLS + #define JSON_HEDLEY_C_DECL +#endif + +#if defined(JSON_HEDLEY_STATIC_ASSERT) + #undef JSON_HEDLEY_STATIC_ASSERT +#endif +#if \ + !defined(__cplusplus) && ( \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) || \ + JSON_HEDLEY_HAS_FEATURE(c_static_assert) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(6,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + defined(_Static_assert) \ + ) +# define JSON_HEDLEY_STATIC_ASSERT(expr, message) _Static_assert(expr, message) +#elif \ + (defined(__cplusplus) && (__cplusplus >= 201103L)) || \ + JSON_HEDLEY_MSVC_VERSION_CHECK(16,0,0) +# define JSON_HEDLEY_STATIC_ASSERT(expr, message) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(static_assert(expr, message)) +#else +# define JSON_HEDLEY_STATIC_ASSERT(expr, message) +#endif + +#if defined(JSON_HEDLEY_NULL) + #undef JSON_HEDLEY_NULL +#endif +#if defined(__cplusplus) + #if __cplusplus >= 201103L + #define JSON_HEDLEY_NULL JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(nullptr) + #elif defined(NULL) + #define JSON_HEDLEY_NULL NULL + #else + #define JSON_HEDLEY_NULL JSON_HEDLEY_STATIC_CAST(void*, 0) + #endif +#elif defined(NULL) + #define JSON_HEDLEY_NULL NULL +#else + #define JSON_HEDLEY_NULL ((void*) 0) +#endif + +#if defined(JSON_HEDLEY_MESSAGE) + #undef JSON_HEDLEY_MESSAGE +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") +# define JSON_HEDLEY_MESSAGE(msg) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \ + JSON_HEDLEY_PRAGMA(message msg) \ + JSON_HEDLEY_DIAGNOSTIC_POP +#elif \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message msg) +#elif JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(_CRI message msg) +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg)) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg)) +#else +# define JSON_HEDLEY_MESSAGE(msg) +#endif + +#if defined(JSON_HEDLEY_WARNING) + #undef JSON_HEDLEY_WARNING +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") +# define JSON_HEDLEY_WARNING(msg) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \ + JSON_HEDLEY_PRAGMA(clang warning msg) \ + JSON_HEDLEY_DIAGNOSTIC_POP +#elif \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,8,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(GCC warning msg) +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) +# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(message(msg)) +#else +# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_MESSAGE(msg) +#endif + +#if defined(JSON_HEDLEY_REQUIRE) + #undef JSON_HEDLEY_REQUIRE +#endif +#if defined(JSON_HEDLEY_REQUIRE_MSG) + #undef JSON_HEDLEY_REQUIRE_MSG +#endif +#if JSON_HEDLEY_HAS_ATTRIBUTE(diagnose_if) +# if JSON_HEDLEY_HAS_WARNING("-Wgcc-compat") +# define JSON_HEDLEY_REQUIRE(expr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \ + __attribute__((diagnose_if(!(expr), #expr, "error"))) \ + JSON_HEDLEY_DIAGNOSTIC_POP +# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \ + __attribute__((diagnose_if(!(expr), msg, "error"))) \ + JSON_HEDLEY_DIAGNOSTIC_POP +# else +# define JSON_HEDLEY_REQUIRE(expr) __attribute__((diagnose_if(!(expr), #expr, "error"))) +# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) __attribute__((diagnose_if(!(expr), msg, "error"))) +# endif +#else +# define JSON_HEDLEY_REQUIRE(expr) +# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) +#endif + +#if defined(JSON_HEDLEY_FLAGS) + #undef JSON_HEDLEY_FLAGS +#endif +#if JSON_HEDLEY_HAS_ATTRIBUTE(flag_enum) + #define JSON_HEDLEY_FLAGS __attribute__((__flag_enum__)) +#endif + +#if defined(JSON_HEDLEY_FLAGS_CAST) + #undef JSON_HEDLEY_FLAGS_CAST +#endif +#if JSON_HEDLEY_INTEL_VERSION_CHECK(19,0,0) +# define JSON_HEDLEY_FLAGS_CAST(T, expr) (__extension__ ({ \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("warning(disable:188)") \ + ((T) (expr)); \ + JSON_HEDLEY_DIAGNOSTIC_POP \ + })) +#else +# define JSON_HEDLEY_FLAGS_CAST(T, expr) JSON_HEDLEY_STATIC_CAST(T, expr) +#endif + +#if defined(JSON_HEDLEY_EMPTY_BASES) + #undef JSON_HEDLEY_EMPTY_BASES +#endif +#if JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,23918) && !JSON_HEDLEY_MSVC_VERSION_CHECK(20,0,0) + #define JSON_HEDLEY_EMPTY_BASES __declspec(empty_bases) +#else + #define JSON_HEDLEY_EMPTY_BASES +#endif + +/* Remaining macros are deprecated. */ + +#if defined(JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK) + #undef JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK +#endif +#if defined(__clang__) + #define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) (0) +#else + #define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_CLANG_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_CLANG_HAS_ATTRIBUTE +#endif +#define JSON_HEDLEY_CLANG_HAS_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) + +#if defined(JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE +#endif +#define JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) + +#if defined(JSON_HEDLEY_CLANG_HAS_BUILTIN) + #undef JSON_HEDLEY_CLANG_HAS_BUILTIN +#endif +#define JSON_HEDLEY_CLANG_HAS_BUILTIN(builtin) JSON_HEDLEY_HAS_BUILTIN(builtin) + +#if defined(JSON_HEDLEY_CLANG_HAS_FEATURE) + #undef JSON_HEDLEY_CLANG_HAS_FEATURE +#endif +#define JSON_HEDLEY_CLANG_HAS_FEATURE(feature) JSON_HEDLEY_HAS_FEATURE(feature) + +#if defined(JSON_HEDLEY_CLANG_HAS_EXTENSION) + #undef JSON_HEDLEY_CLANG_HAS_EXTENSION +#endif +#define JSON_HEDLEY_CLANG_HAS_EXTENSION(extension) JSON_HEDLEY_HAS_EXTENSION(extension) + +#if defined(JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE +#endif +#define JSON_HEDLEY_CLANG_HAS_DECLSPEC_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) + +#if defined(JSON_HEDLEY_CLANG_HAS_WARNING) + #undef JSON_HEDLEY_CLANG_HAS_WARNING +#endif +#define JSON_HEDLEY_CLANG_HAS_WARNING(warning) JSON_HEDLEY_HAS_WARNING(warning) + +#endif /* !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < X) */ + + +// This file contains all internal macro definitions +// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them + +// exclude unsupported compilers +#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK) + #if defined(__clang__) + #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 + #error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) + #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40800 + #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #endif +#endif + +// C++ language standard detection +#if (defined(__cplusplus) && __cplusplus >= 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L) + #define JSON_HAS_CPP_20 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 +#elif (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 +#elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) + #define JSON_HAS_CPP_14 +#endif + +// disable float-equal warnings on GCC/clang +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + +// disable documentation warnings on clang +#if defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wdocumentation" +#endif + +// allow to disable exceptions +#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(JSON_NOEXCEPTION) + #define JSON_THROW(exception) throw exception + #define JSON_TRY try + #define JSON_CATCH(exception) catch(exception) + #define JSON_INTERNAL_CATCH(exception) catch(exception) +#else + #include + #define JSON_THROW(exception) std::abort() + #define JSON_TRY if(true) + #define JSON_CATCH(exception) if(false) + #define JSON_INTERNAL_CATCH(exception) if(false) +#endif + +// override exception macros +#if defined(JSON_THROW_USER) + #undef JSON_THROW + #define JSON_THROW JSON_THROW_USER +#endif +#if defined(JSON_TRY_USER) + #undef JSON_TRY + #define JSON_TRY JSON_TRY_USER +#endif +#if defined(JSON_CATCH_USER) + #undef JSON_CATCH + #define JSON_CATCH JSON_CATCH_USER + #undef JSON_INTERNAL_CATCH + #define JSON_INTERNAL_CATCH JSON_CATCH_USER +#endif +#if defined(JSON_INTERNAL_CATCH_USER) + #undef JSON_INTERNAL_CATCH + #define JSON_INTERNAL_CATCH JSON_INTERNAL_CATCH_USER +#endif + +// allow to override assert +#if !defined(JSON_ASSERT) + #include // assert + #define JSON_ASSERT(x) assert(x) +#endif + +/*! +@brief macro to briefly define a mapping between an enum and JSON +@def NLOHMANN_JSON_SERIALIZE_ENUM +@since version 3.4.0 +*/ +#define NLOHMANN_JSON_SERIALIZE_ENUM(ENUM_TYPE, ...) \ + template \ + inline void to_json(BasicJsonType& j, const ENUM_TYPE& e) \ + { \ + static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ + static const std::pair m[] = __VA_ARGS__; \ + auto it = std::find_if(std::begin(m), std::end(m), \ + [e](const std::pair& ej_pair) -> bool \ + { \ + return ej_pair.first == e; \ + }); \ + j = ((it != std::end(m)) ? it : std::begin(m))->second; \ + } \ + template \ + inline void from_json(const BasicJsonType& j, ENUM_TYPE& e) \ + { \ + static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ + static const std::pair m[] = __VA_ARGS__; \ + auto it = std::find_if(std::begin(m), std::end(m), \ + [&j](const std::pair& ej_pair) -> bool \ + { \ + return ej_pair.second == j; \ + }); \ + e = ((it != std::end(m)) ? it : std::begin(m))->first; \ + } + +// Ugly macros to avoid uglier copy-paste when specializing basic_json. They +// may be removed in the future once the class is split. + +#define NLOHMANN_BASIC_JSON_TPL_DECLARATION \ + template class ObjectType, \ + template class ArrayType, \ + class StringType, class BooleanType, class NumberIntegerType, \ + class NumberUnsignedType, class NumberFloatType, \ + template class AllocatorType, \ + template class JSONSerializer, \ + class BinaryType> + +#define NLOHMANN_BASIC_JSON_TPL \ + basic_json + +// Macros to simplify conversion from/to types + +#define NLOHMANN_JSON_EXPAND( x ) x +#define NLOHMANN_JSON_GET_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, NAME,...) NAME +#define NLOHMANN_JSON_PASTE(...) NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_GET_MACRO(__VA_ARGS__, \ + NLOHMANN_JSON_PASTE64, \ + NLOHMANN_JSON_PASTE63, \ + NLOHMANN_JSON_PASTE62, \ + NLOHMANN_JSON_PASTE61, \ + NLOHMANN_JSON_PASTE60, \ + NLOHMANN_JSON_PASTE59, \ + NLOHMANN_JSON_PASTE58, \ + NLOHMANN_JSON_PASTE57, \ + NLOHMANN_JSON_PASTE56, \ + NLOHMANN_JSON_PASTE55, \ + NLOHMANN_JSON_PASTE54, \ + NLOHMANN_JSON_PASTE53, \ + NLOHMANN_JSON_PASTE52, \ + NLOHMANN_JSON_PASTE51, \ + NLOHMANN_JSON_PASTE50, \ + NLOHMANN_JSON_PASTE49, \ + NLOHMANN_JSON_PASTE48, \ + NLOHMANN_JSON_PASTE47, \ + NLOHMANN_JSON_PASTE46, \ + NLOHMANN_JSON_PASTE45, \ + NLOHMANN_JSON_PASTE44, \ + NLOHMANN_JSON_PASTE43, \ + NLOHMANN_JSON_PASTE42, \ + NLOHMANN_JSON_PASTE41, \ + NLOHMANN_JSON_PASTE40, \ + NLOHMANN_JSON_PASTE39, \ + NLOHMANN_JSON_PASTE38, \ + NLOHMANN_JSON_PASTE37, \ + NLOHMANN_JSON_PASTE36, \ + NLOHMANN_JSON_PASTE35, \ + NLOHMANN_JSON_PASTE34, \ + NLOHMANN_JSON_PASTE33, \ + NLOHMANN_JSON_PASTE32, \ + NLOHMANN_JSON_PASTE31, \ + NLOHMANN_JSON_PASTE30, \ + NLOHMANN_JSON_PASTE29, \ + NLOHMANN_JSON_PASTE28, \ + NLOHMANN_JSON_PASTE27, \ + NLOHMANN_JSON_PASTE26, \ + NLOHMANN_JSON_PASTE25, \ + NLOHMANN_JSON_PASTE24, \ + NLOHMANN_JSON_PASTE23, \ + NLOHMANN_JSON_PASTE22, \ + NLOHMANN_JSON_PASTE21, \ + NLOHMANN_JSON_PASTE20, \ + NLOHMANN_JSON_PASTE19, \ + NLOHMANN_JSON_PASTE18, \ + NLOHMANN_JSON_PASTE17, \ + NLOHMANN_JSON_PASTE16, \ + NLOHMANN_JSON_PASTE15, \ + NLOHMANN_JSON_PASTE14, \ + NLOHMANN_JSON_PASTE13, \ + NLOHMANN_JSON_PASTE12, \ + NLOHMANN_JSON_PASTE11, \ + NLOHMANN_JSON_PASTE10, \ + NLOHMANN_JSON_PASTE9, \ + NLOHMANN_JSON_PASTE8, \ + NLOHMANN_JSON_PASTE7, \ + NLOHMANN_JSON_PASTE6, \ + NLOHMANN_JSON_PASTE5, \ + NLOHMANN_JSON_PASTE4, \ + NLOHMANN_JSON_PASTE3, \ + NLOHMANN_JSON_PASTE2, \ + NLOHMANN_JSON_PASTE1)(__VA_ARGS__)) +#define NLOHMANN_JSON_PASTE2(func, v1) func(v1) +#define NLOHMANN_JSON_PASTE3(func, v1, v2) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE2(func, v2) +#define NLOHMANN_JSON_PASTE4(func, v1, v2, v3) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE3(func, v2, v3) +#define NLOHMANN_JSON_PASTE5(func, v1, v2, v3, v4) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE4(func, v2, v3, v4) +#define NLOHMANN_JSON_PASTE6(func, v1, v2, v3, v4, v5) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE5(func, v2, v3, v4, v5) +#define NLOHMANN_JSON_PASTE7(func, v1, v2, v3, v4, v5, v6) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE6(func, v2, v3, v4, v5, v6) +#define NLOHMANN_JSON_PASTE8(func, v1, v2, v3, v4, v5, v6, v7) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE7(func, v2, v3, v4, v5, v6, v7) +#define NLOHMANN_JSON_PASTE9(func, v1, v2, v3, v4, v5, v6, v7, v8) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE8(func, v2, v3, v4, v5, v6, v7, v8) +#define NLOHMANN_JSON_PASTE10(func, v1, v2, v3, v4, v5, v6, v7, v8, v9) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE9(func, v2, v3, v4, v5, v6, v7, v8, v9) +#define NLOHMANN_JSON_PASTE11(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE10(func, v2, v3, v4, v5, v6, v7, v8, v9, v10) +#define NLOHMANN_JSON_PASTE12(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE11(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) +#define NLOHMANN_JSON_PASTE13(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE12(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) +#define NLOHMANN_JSON_PASTE14(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE13(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) +#define NLOHMANN_JSON_PASTE15(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE14(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) +#define NLOHMANN_JSON_PASTE16(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE15(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) +#define NLOHMANN_JSON_PASTE17(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE16(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) +#define NLOHMANN_JSON_PASTE18(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE17(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) +#define NLOHMANN_JSON_PASTE19(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE18(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) +#define NLOHMANN_JSON_PASTE20(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE19(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) +#define NLOHMANN_JSON_PASTE21(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE20(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) +#define NLOHMANN_JSON_PASTE22(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE21(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) +#define NLOHMANN_JSON_PASTE23(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE22(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) +#define NLOHMANN_JSON_PASTE24(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE23(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) +#define NLOHMANN_JSON_PASTE25(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE24(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24) +#define NLOHMANN_JSON_PASTE26(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE25(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25) +#define NLOHMANN_JSON_PASTE27(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE26(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26) +#define NLOHMANN_JSON_PASTE28(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE27(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27) +#define NLOHMANN_JSON_PASTE29(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE28(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28) +#define NLOHMANN_JSON_PASTE30(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE29(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29) +#define NLOHMANN_JSON_PASTE31(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE30(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30) +#define NLOHMANN_JSON_PASTE32(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE31(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31) +#define NLOHMANN_JSON_PASTE33(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE32(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32) +#define NLOHMANN_JSON_PASTE34(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE33(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33) +#define NLOHMANN_JSON_PASTE35(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE34(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34) +#define NLOHMANN_JSON_PASTE36(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE35(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) +#define NLOHMANN_JSON_PASTE37(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE36(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36) +#define NLOHMANN_JSON_PASTE38(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE37(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37) +#define NLOHMANN_JSON_PASTE39(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE38(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38) +#define NLOHMANN_JSON_PASTE40(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE39(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39) +#define NLOHMANN_JSON_PASTE41(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE40(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40) +#define NLOHMANN_JSON_PASTE42(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE41(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41) +#define NLOHMANN_JSON_PASTE43(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE42(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42) +#define NLOHMANN_JSON_PASTE44(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE43(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43) +#define NLOHMANN_JSON_PASTE45(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE44(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44) +#define NLOHMANN_JSON_PASTE46(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE45(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45) +#define NLOHMANN_JSON_PASTE47(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE46(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46) +#define NLOHMANN_JSON_PASTE48(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE47(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47) +#define NLOHMANN_JSON_PASTE49(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE48(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48) +#define NLOHMANN_JSON_PASTE50(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE49(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49) +#define NLOHMANN_JSON_PASTE51(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE50(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50) +#define NLOHMANN_JSON_PASTE52(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE51(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51) +#define NLOHMANN_JSON_PASTE53(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE52(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52) +#define NLOHMANN_JSON_PASTE54(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE53(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53) +#define NLOHMANN_JSON_PASTE55(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE54(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54) +#define NLOHMANN_JSON_PASTE56(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE55(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55) +#define NLOHMANN_JSON_PASTE57(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE56(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56) +#define NLOHMANN_JSON_PASTE58(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE57(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57) +#define NLOHMANN_JSON_PASTE59(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE58(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58) +#define NLOHMANN_JSON_PASTE60(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE59(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59) +#define NLOHMANN_JSON_PASTE61(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE60(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60) +#define NLOHMANN_JSON_PASTE62(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE61(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61) +#define NLOHMANN_JSON_PASTE63(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE62(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62) +#define NLOHMANN_JSON_PASTE64(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE63(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63) + +#define NLOHMANN_JSON_TO(v1) nlohmann_json_j[#v1] = nlohmann_json_t.v1; +#define NLOHMANN_JSON_FROM(v1) nlohmann_json_j.at(#v1).get_to(nlohmann_json_t.v1); + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_INTRUSIVE +@since version 3.9.0 +*/ +#define NLOHMANN_DEFINE_TYPE_INTRUSIVE(Type, ...) \ + friend void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + friend void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE +@since version 3.9.0 +*/ +#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Type, ...) \ + inline void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + inline void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +#ifndef JSON_USE_IMPLICIT_CONVERSIONS + #define JSON_USE_IMPLICIT_CONVERSIONS 1 +#endif + +#if JSON_USE_IMPLICIT_CONVERSIONS + #define JSON_EXPLICIT +#else + #define JSON_EXPLICIT explicit +#endif + namespace nlohmann { @@ -146,6 +2353,7 @@ class exception : public std::exception { public: /// returns the explanatory string + JSON_HEDLEY_RETURNS_NON_NULL const char* what() const noexcept override { return m.what(); @@ -155,6 +2363,7 @@ class exception : public std::exception const int id; protected: + JSON_HEDLEY_NON_NULL(3) exception(int id_, const char* what_arg) : id(id_), m(what_arg) {} static std::string name(const std::string& ename, int id_) @@ -194,6 +2403,7 @@ json.exception.parse_error.110 | parse error at 1: cannot read 2 bytes from vect json.exception.parse_error.112 | parse error at 1: error reading CBOR; last byte: 0xF8 | Not all types of CBOR or MessagePack are supported. This exception occurs if an unsupported byte was read. json.exception.parse_error.113 | parse error at 2: expected a CBOR string; last byte: 0x98 | While parsing a map key, a value that is not a string has been read. json.exception.parse_error.114 | parse error: Unsupported BSON record type 0x0F | The parsing of the corresponding BSON record type is not implemented (yet). +json.exception.parse_error.115 | parse error at byte 5: syntax error while parsing UBJSON high-precision number: invalid number text: 1A | A UBJSON high-precision number could not be parsed. @note For an input with n bytes, 1 is the index of the first character and n+1 is the index of the terminating null byte or the end of file. This also @@ -307,6 +2517,7 @@ class invalid_iterator : public exception } private: + JSON_HEDLEY_NON_NULL(3) invalid_iterator(int id_, const char* what_arg) : exception(id_, what_arg) {} }; @@ -360,6 +2571,7 @@ class type_error : public exception } private: + JSON_HEDLEY_NON_NULL(3) type_error(int id_, const char* what_arg) : exception(id_, what_arg) {} }; @@ -380,7 +2592,7 @@ json.exception.out_of_range.403 | key 'foo' not found | The provided key was not json.exception.out_of_range.404 | unresolved reference token 'foo' | A reference token in a JSON Pointer could not be resolved. json.exception.out_of_range.405 | JSON pointer has no parent | The JSON Patch operations 'remove' and 'add' can not be applied to the root element of the JSON value. json.exception.out_of_range.406 | number overflow parsing '10E1000' | A parsed number could not be stored as without changing it to NaN or INF. -json.exception.out_of_range.407 | number overflow serializing '9223372036854775808' | UBJSON and BSON only support integer numbers up to 9223372036854775807. | +json.exception.out_of_range.407 | number overflow serializing '9223372036854775808' | UBJSON and BSON only support integer numbers up to 9223372036854775807. (until version 3.8.0) | json.exception.out_of_range.408 | excessive array size: 8658170730974374167 | The size (following `#`) of an UBJSON array or object exceeds the maximal capacity. | json.exception.out_of_range.409 | BSON key cannot contain code point U+0000 (at byte 2) | Key identifiers to be serialized to BSON cannot contain code point U+0000, since the key is stored as zero-terminated c-string | @@ -406,6 +2618,7 @@ class out_of_range : public exception } private: + JSON_HEDLEY_NON_NULL(3) out_of_range(int id_, const char* what_arg) : exception(id_, what_arg) {} }; @@ -443,6 +2656,7 @@ class other_error : public exception } private: + JSON_HEDLEY_NON_NULL(3) other_error(int id_, const char* what_arg) : exception(id_, what_arg) {} }; } // namespace detail @@ -450,161 +2664,9 @@ class other_error : public exception // #include - -#include // pair - -// This file contains all internal macro definitions -// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them - -// exclude unsupported compilers -#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK) - #if defined(__clang__) - #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 - #error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" - #endif - #elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) - #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40800 - #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" - #endif - #endif -#endif - -// disable float-equal warnings on GCC/clang -#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wfloat-equal" -#endif - -// disable documentation warnings on clang -#if defined(__clang__) - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wdocumentation" -#endif - -// allow for portable deprecation warnings -#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) - #define JSON_DEPRECATED __attribute__((deprecated)) -#elif defined(_MSC_VER) - #define JSON_DEPRECATED __declspec(deprecated) -#else - #define JSON_DEPRECATED -#endif - -// allow for portable nodiscard warnings -#if defined(__has_cpp_attribute) - #if __has_cpp_attribute(nodiscard) - #define JSON_NODISCARD [[nodiscard]] - #elif __has_cpp_attribute(gnu::warn_unused_result) - #define JSON_NODISCARD [[gnu::warn_unused_result]] - #else - #define JSON_NODISCARD - #endif -#else - #define JSON_NODISCARD -#endif - -// allow to disable exceptions -#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(JSON_NOEXCEPTION) - #define JSON_THROW(exception) throw exception - #define JSON_TRY try - #define JSON_CATCH(exception) catch(exception) - #define JSON_INTERNAL_CATCH(exception) catch(exception) -#else - #include - #define JSON_THROW(exception) std::abort() - #define JSON_TRY if(true) - #define JSON_CATCH(exception) if(false) - #define JSON_INTERNAL_CATCH(exception) if(false) -#endif - -// override exception macros -#if defined(JSON_THROW_USER) - #undef JSON_THROW - #define JSON_THROW JSON_THROW_USER -#endif -#if defined(JSON_TRY_USER) - #undef JSON_TRY - #define JSON_TRY JSON_TRY_USER -#endif -#if defined(JSON_CATCH_USER) - #undef JSON_CATCH - #define JSON_CATCH JSON_CATCH_USER - #undef JSON_INTERNAL_CATCH - #define JSON_INTERNAL_CATCH JSON_CATCH_USER -#endif -#if defined(JSON_INTERNAL_CATCH_USER) - #undef JSON_INTERNAL_CATCH - #define JSON_INTERNAL_CATCH JSON_INTERNAL_CATCH_USER -#endif - -// manual branch prediction -#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) - #define JSON_LIKELY(x) __builtin_expect(x, 1) - #define JSON_UNLIKELY(x) __builtin_expect(x, 0) -#else - #define JSON_LIKELY(x) x - #define JSON_UNLIKELY(x) x -#endif - -// C++ language standard detection -#if (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 - #define JSON_HAS_CPP_17 - #define JSON_HAS_CPP_14 -#elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) - #define JSON_HAS_CPP_14 -#endif - -/*! -@brief macro to briefly define a mapping between an enum and JSON -@def NLOHMANN_JSON_SERIALIZE_ENUM -@since version 3.4.0 -*/ -#define NLOHMANN_JSON_SERIALIZE_ENUM(ENUM_TYPE, ...) \ - template \ - inline void to_json(BasicJsonType& j, const ENUM_TYPE& e) \ - { \ - static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ - static const std::pair m[] = __VA_ARGS__; \ - auto it = std::find_if(std::begin(m), std::end(m), \ - [e](const std::pair& ej_pair) -> bool \ - { \ - return ej_pair.first == e; \ - }); \ - j = ((it != std::end(m)) ? it : std::begin(m))->second; \ - } \ - template \ - inline void from_json(const BasicJsonType& j, ENUM_TYPE& e) \ - { \ - static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ - static const std::pair m[] = __VA_ARGS__; \ - auto it = std::find_if(std::begin(m), std::end(m), \ - [j](const std::pair& ej_pair) -> bool \ - { \ - return ej_pair.second == j; \ - }); \ - e = ((it != std::end(m)) ? it : std::begin(m))->first; \ - } - -// Ugly macros to avoid uglier copy-paste when specializing basic_json. They -// may be removed in the future once the class is split. - -#define NLOHMANN_BASIC_JSON_TPL_DECLARATION \ - template class ObjectType, \ - template class ArrayType, \ - class StringType, class BooleanType, class NumberIntegerType, \ - class NumberUnsignedType, class NumberFloatType, \ - template class AllocatorType, \ - template class JSONSerializer> - -#define NLOHMANN_BASIC_JSON_TPL \ - basic_json - // #include -#include // not #include // size_t #include // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type @@ -669,7 +2731,6 @@ constexpr T static_const::value; // #include -#include // not #include // numeric_limits #include // false_type, is_constructible, is_integral, is_same, true_type #include // declval @@ -686,11 +2747,11 @@ namespace nlohmann { namespace detail { -template struct make_void +template struct make_void { using type = void; }; -template using void_t = typename make_void::type; +template using void_t = typename make_void::type; } // namespace detail } // namespace nlohmann @@ -701,10 +2762,10 @@ namespace nlohmann { namespace detail { -template +template struct iterator_types {}; -template +template struct iterator_types < It, void_t +template struct iterator_traits { }; -template +template struct iterator_traits < T, enable_if_t < !std::is_pointer::value >> : iterator_types { }; -template +template struct iterator_traits::value>> { using iterator_category = std::random_access_iterator_tag; @@ -754,7 +2815,7 @@ struct iterator_traits::value>> // #include -// http://en.cppreference.com/w/cpp/experimental/is_detected +// https://en.cppreference.com/w/cpp/experimental/is_detected namespace nlohmann { namespace detail @@ -769,39 +2830,39 @@ struct nonesuch void operator=(nonesuch&&) = delete; }; -template class Op, - class... Args> +template class Op, + class... Args> struct detector { using value_t = std::false_type; using type = Default; }; -template class Op, class... Args> +template class Op, class... Args> struct detector>, Op, Args...> { using value_t = std::true_type; using type = Op; }; -template