diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e6435510..9392c385f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ == CHANGELOG == -**NOTE: This changelog is not maintained for prerelease versions** +**NOTE: This changelog is not maintained for 2.0** -You may view the changes since 1.1.3 here: https://github.com/jonwd7/nifskope/releases +You may view the 2.0 changes here: https://github.com/hexabits/nifskope/releases This is version 1.1.3 of NifSkope. diff --git a/NifSkope.pro b/NifSkope.pro index 1c0bc5a69..bf5e93dbd 100644 --- a/NifSkope.pro +++ b/NifSkope.pro @@ -2,7 +2,7 @@ ## BUILD OPTIONS ############################### -TEMPLATE = app +TEMPLATE = vcapp TARGET = NifSkope QT += xml opengl network widgets @@ -13,8 +13,8 @@ contains(QT_VERSION, ^5\\.[0-6]\\..*) { error("Minimum required version is Qt 5.7") } -# C++11/14 Support -CONFIG += c++14 +# C++ Standard Support +CONFIG += c++20 # Dependencies CONFIG += nvtristrip qhull zlib lz4 fsengine gli @@ -40,6 +40,7 @@ CONFIG(debug, debug|release) { # Require explicit DEFINES += \ + _USE_MATH_DEFINES \ # Define M_PI, etc. in cmath QT_NO_CAST_FROM_BYTEARRAY \ # QByteArray deprecations QT_NO_URL_CAST_FROM_STRING \ # QUrl deprecations QT_DISABLE_DEPRECATED_BEFORE=0x050300 #\ # Disable all functions deprecated as of 5.3 @@ -143,6 +144,7 @@ HEADERS += \ src/data/nifvalue.h \ src/gl/marker/constraints.h \ src/gl/marker/furniture.h \ + srg/gl/BSMesh.h \ src/gl/bsshape.h \ src/gl/controllers.h \ src/gl/glcontroller.h \ @@ -152,12 +154,14 @@ HEADERS += \ src/gl/glparticles.h \ src/gl/glproperty.h \ src/gl/glscene.h \ + src/gl/glshape.h \ src/gl/gltex.h \ src/gl/gltexloaders.h \ src/gl/gltools.h \ src/gl/icontrollable.h \ src/gl/renderer.h \ src/io/material.h \ + src/io/MeshFile.h \ src/io/nifstream.h \ src/lib/importex/3ds.h \ src/lib/nvtristripwrapper.h \ @@ -195,6 +199,8 @@ HEADERS += \ src/ui/settingsdialog.h \ src/ui/settingspane.h \ src/xml/nifexpr.h \ + src/xml/xmlconfig.h \ + src/gamemanager.h \ src/glview.h \ src/message.h \ src/nifskope.h \ @@ -202,11 +208,17 @@ HEADERS += \ src/version.h \ lib/dds.h \ lib/dxgiformat.h \ - lib/half.h + lib/half.h \ + lib/json.hpp \ + lib/stb_image.h \ + lib/stb_image_write.h \ + lib/tiny_gltf.h SOURCES += \ + src/data/nifitem.cpp \ src/data/niftypes.cpp \ src/data/nifvalue.cpp \ + srg/gl/BSMesh.cpp \ src/gl/bsshape.cpp \ src/gl/controllers.cpp \ src/gl/glcontroller.cpp \ @@ -216,16 +228,19 @@ SOURCES += \ src/gl/glparticles.cpp \ src/gl/glproperty.cpp \ src/gl/glscene.cpp \ + src/gl/glshape.cpp \ src/gl/gltex.cpp \ src/gl/gltexloaders.cpp \ src/gl/gltools.cpp \ src/gl/renderer.cpp \ src/io/material.cpp \ + src/io/MeshFile.cpp \ src/io/nifstream.cpp \ src/lib/importex/3ds.cpp \ src/lib/importex/importex.cpp \ src/lib/importex/obj.cpp \ src/lib/importex/col.cpp \ + src/lib/importex/gltf.cpp \ src/lib/nvtristripwrapper.cpp \ src/lib/qhull.cpp \ src/model/basemodel.cpp \ @@ -278,6 +293,7 @@ SOURCES += \ src/xml/kfmxml.cpp \ src/xml/nifexpr.cpp \ src/xml/nifxml.cpp \ + src/gamemanager.cpp \ src/glview.cpp \ src/main.cpp \ src/message.cpp \ @@ -309,12 +325,10 @@ fsengine { INCLUDEPATH += lib/fsengine HEADERS += \ lib/fsengine/bsa.h \ - lib/fsengine/fsengine.h \ - lib/fsengine/fsmanager.h + lib/fsengine/fsengine.h SOURCES += \ lib/fsengine/bsa.cpp \ - lib/fsengine/fsengine.cpp \ - lib/fsengine/fsmanager.cpp + lib/fsengine/fsengine.cpp } nvtristrip { @@ -346,6 +360,9 @@ gli { } zlib { + macx { + DEFINES += Z_HAVE_UNISTD_H + } !*msvc*:QMAKE_CFLAGS += -isystem ../nifskope/lib/zlib !*msvc*:QMAKE_CXXFLAGS += -isystem ../nifskope/lib/zlib else:INCLUDEPATH += lib/zlib @@ -406,7 +423,7 @@ win32 { # Standards conformance to match GCC and clang !isEmpty(_MSC_VER):greaterThan(_MSC_VER, 1900) { - QMAKE_CXXFLAGS += /permissive- /std:c++latest + QMAKE_CXXFLAGS += /permissive- /std:c++20 } # LINKER FLAGS @@ -430,8 +447,8 @@ win32 { QMAKE_CXXFLAGS_DEBUG *= -Og -g3 QMAKE_CXXFLAGS_RELEASE *= -O3 -mfpmath=sse - # C++11 Support - QMAKE_CXXFLAGS_RELEASE *= -std=c++14 + # C++ Standard Support + QMAKE_CXXFLAGS_RELEASE *= -std=c++20 # Extension flags QMAKE_CXXFLAGS_RELEASE *= -msse2 -msse @@ -479,7 +496,7 @@ win32:contains(QT_ARCH, i386) { } XML += \ - build/docsys/nifxml/nif.xml \ + build/nif.xml \ build/docsys/kfmxml/kfm.xml QSS += \ @@ -494,7 +511,8 @@ win32:contains(QT_ARCH, i386) { READMES += \ CHANGELOG.md \ LICENSE.md \ - README.md + README.md \ + README_GLTF.md copyDirs( $$SHADERS, shaders ) #copyDirs( $$LANG, lang ) @@ -516,8 +534,12 @@ win32:contains(QT_ARCH, i386) { $$[QT_INSTALL_PLUGINS]/imageformats/qtga$${DLLEXT} \ $$[QT_INSTALL_PLUGINS]/imageformats/qwebp$${DLLEXT} + styles += \ + $$[QT_INSTALL_PLUGINS]/styles/qwindowsvistastyle$${DLLEXT} + copyFiles( $$platforms, platforms, true ) copyFiles( $$imageformats, imageformats, true ) + copyFiles( $$styles, styles, true ) } } # end build_pass diff --git a/NifSkope_functions.pri b/NifSkope_functions.pri index ad95f8136..f2b4d9268 100644 --- a/NifSkope_functions.pri +++ b/NifSkope_functions.pri @@ -30,18 +30,21 @@ defineReplace(getSed) { SEDPATH = /sed.exe exists($${GNUWIN32}$${SEDPATH}) { - sedbin = $${GNUWIN32}$${SEDPATH} + sedbin = $${GNUWIN32}$${QMAKE_DIR_SEP} } else:exists($${CYGWIN}$${SEDPATH}) { - sedbin = $${CYGWIN}$${SEDPATH} + sedbin = $${CYGWIN}$${QMAKE_DIR_SEP} } else:exists($${CYGWIN64}$${SEDPATH}) { - sedbin = $${CYGWIN64}$${SEDPATH} + sedbin = $${CYGWIN64}$${QMAKE_DIR_SEP} } else { #message(Neither GnuWin32 or Cygwin were found) - sedbin = $$system(where sed 2> NUL) + SEDSYS = $$system(where sed 2> NUL) + SEDLIST = $$split(SEDSYS, "sed.exe") + SEDBIN = $$member(SEDLIST, 0) + sedbin = $$syspath($${SEDBIN}) } !isEmpty(sedbin) { - sedbin = \"$${sedbin}\" + sedbin = \"$${sedbin}sed.exe\" } } diff --git a/README.md b/README.md index 9c6a6d88e..7a30e8429 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,14 @@ -# NifSkope 2.0.dev7 +# NifSkope 2.0.dev9 -NifSkope is a tool for opening and editing the NetImmerse file format (NIF). NIF is used by video games such as Morrowind, Oblivion, Skyrim, Fallout 3, Fallout: New Vegas, Civilization IV, and more. +NifSkope is a tool for opening and editing the NetImmerse file format (NIF). NIF is used by video games such as Morrowind, Oblivion, Skyrim, Fallout 3/NV/4/76, Starfield, Civilization IV, and more. ### Download -You can download the latest official release from [GitHub](https://github.com/niftools/nifskope/releases). More frequent development builds are posted in the [NifTools Discord](https://discord.gg/ZFjdN4x), pinned to #software. - - -### Discussion & Help - -- Visit the [NifTools Discord](https://discord.gg/ZFjdN4x). To receive support use the #software channel. -- Visit the [NifTools.org](https://forum.niftools.org/) forum. To receive support for NifSkope please use the [Support subforum](https://forum.niftools.org/24-nifskope/). +You can download the latest official release from [niftools/nifskope](https://github.com/niftools/nifskope/releases). More frequent development builds are posted at [hexabits/nifskope](https://github.com/hexabits/nifskope/releases). ### Issues -Anyone can [report issues at GitHub](https://github.com/niftools/nifskope/issues) or in the NifTools.org [Support subforum](https://forum.niftools.org/24-nifskope/). +Anyone can [report issues at GitHub](https://github.com/niftools/nifskope/issues). ### Contribute @@ -27,8 +21,6 @@ git clone --recursive git://github.com//nifskope.git For information about development: -- Visit our [Discord #dev channel](https://discord.gg/zvWZrrJ). -- Visit the NifTools.org [development subforum](https://forum.niftools.org/6-nifskope-development/). - Refer to our [GitHub wiki](https://github.com/niftools/nifskope/wiki#wiki-development) for information on compilation. @@ -36,6 +28,9 @@ For information about development: Refer to these other documents in your installation folder or at the links provided: + +## [GLTF IMPORT/EXPORT](https://github.com/niftools/nifskope/blob/develop/README_GLTF.md) + ## [TROUBLESHOOTING](https://github.com/niftools/nifskope/blob/develop/TROUBLESHOOTING.md) ## [CHANGELOG](https://github.com/niftools/nifskope/blob/develop/CHANGELOG.md) diff --git a/README_GLTF.md b/README_GLTF.md new file mode 100644 index 000000000..de42d0575 --- /dev/null +++ b/README_GLTF.md @@ -0,0 +1,44 @@ +# NifSkope glTF 2.0 Exporter v1.0 + +# glTF Import + +glTF Import into NifSkope will be implemented in a subsequent release. + +# glTF Export + +glTF export is currently supported on static and skinned Starfield meshes. + +To view and export Starfield meshes, you must first: + +1. Enable and add the path to your Starfield installation in Settings > Resources. +2. Add the archives or extracted folders containing `geometries` to Archives or Paths in Settings > Resources, under Starfield. + +Skinned meshes currently require a small amount of setup before export. For the Blender glTF importer they require certain import options. + +## Skinned meshes + +### Pre-Export + +If the mesh does not have a skeleton with a `COM` or `COM_Twin` NiNode in its NIF, you need to: + +1. Open the skeleton.nif for that skinned mesh (e.g. `meshes\actors\human\characterassets\skeleton.nif`) +2. Copy (Ctrl-C) the `COM` NiNode in skeleton.nif +3. Paste (Ctrl-V) the entire `COM` branch onto the mesh NIF's root NiNode (0) +4. Export to glTF + +In Starfield, this needs to be done for meshes skinned on the human skeleton. +This does not need to be done for most creatures, as they come with a `COM_Twin` node. + +**Note:** This step will be more automated in the future. + +### Pre-Blender Import + +In the Blender glTF import window: + +1. Ensure "Guess Original Bind Pose" is **unchecked**. + +## Blender scripts + +Blender scripts are provided for use with glTF exports. They may be opened and run from the Scripting tab inside Blender. + +1. `gltf_lod_blender_script.py` is included in the `scripts` folder for managing LOD visibility in exported glTF. diff --git a/build/README.md.in b/build/README.md.in index e7fd2df0e..3e3763854 100644 --- a/build/README.md.in +++ b/build/README.md.in @@ -1,20 +1,14 @@ # NifSkope @VERSION@ -NifSkope is a tool for opening and editing the NetImmerse file format (NIF). NIF is used by video games such as Morrowind, Oblivion, Skyrim, Fallout 3, Fallout: New Vegas, Civilization IV, and more. +NifSkope is a tool for opening and editing the NetImmerse file format (NIF). NIF is used by video games such as Morrowind, Oblivion, Skyrim, Fallout 3/NV/4/76, Starfield, Civilization IV, and more. ### Download -You can download the latest official release from [GitHub](https://github.com/niftools/nifskope/releases). More frequent development builds are posted in the [NifTools Discord](https://discord.gg/ZFjdN4x), pinned to #software. - - -### Discussion & Help - -- Visit the [NifTools Discord](https://discord.gg/ZFjdN4x). To receive support use the #software channel. -- Visit the [NifTools.org](https://forum.niftools.org/) forum. To receive support for NifSkope please use the [Support subforum](https://forum.niftools.org/24-nifskope/). +You can download the latest official release from [niftools/nifskope](https://github.com/niftools/nifskope/releases). More frequent development builds are posted at [hexabits/nifskope](https://github.com/hexabits/nifskope/releases). ### Issues -Anyone can [report issues at GitHub](https://github.com/niftools/nifskope/issues) or in the NifTools.org [Support subforum](https://forum.niftools.org/24-nifskope/). +Anyone can [report issues at GitHub](https://github.com/niftools/nifskope/issues). ### Contribute @@ -27,8 +21,6 @@ git clone --recursive git://github.com//nifskope.git For information about development: -- Visit our [Discord #dev channel](https://discord.gg/zvWZrrJ). -- Visit the NifTools.org [development subforum](https://forum.niftools.org/6-nifskope-development/). - Refer to our [GitHub wiki](https://github.com/niftools/nifskope/wiki#wiki-development) for information on compilation. @@ -36,6 +28,9 @@ For information about development: Refer to these other documents in your installation folder or at the links provided: + +## [GLTF IMPORT/EXPORT](https://github.com/niftools/nifskope/blob/develop/README_GLTF.md) + ## [TROUBLESHOOTING](https://github.com/niftools/nifskope/blob/develop/TROUBLESHOOTING.md) ## [CHANGELOG](https://github.com/niftools/nifskope/blob/develop/CHANGELOG.md) diff --git a/build/VERSION b/build/VERSION index 589a5b993..81b9f9a0c 100644 --- a/build/VERSION +++ b/build/VERSION @@ -1 +1 @@ -2.0.dev7 +2.0.dev9 diff --git a/build/docsys b/build/docsys index 07dc05fe2..0ffd95a50 160000 --- a/build/docsys +++ b/build/docsys @@ -1 +1 @@ -Subproject commit 07dc05fe2c09ac8f1defd4e94c90fe60202cb191 +Subproject commit 0ffd95a50c277e761ab664b68a827502d163c083 diff --git a/build/nif.xml b/build/nif.xml new file mode 100644 index 000000000..832a539e7 --- /dev/null +++ b/build/nif.xml @@ -0,0 +1,8427 @@ + + + + + + Dark Age of Camelot + Star Trek: Bridge Commander + Dark Age of Camelot + Dark Age of Camelot, Star Trek: Bridge Commander + {{Munch's Oddysee}}, Oblivion + Freedom Force + {{Morrowind}}, {{Freedom Force}} + Dark Age of Camelot + Civilization IV + Dark Age of Camelot, Civilization IV + {{Culpa Innata}}, Civilization IV, Dark Age of Camelot, Empire Earth II + {{Zoo Tycoon 2}}, Civilization IV, Oblivion + Oblivion + {{Freedom Force vs. the 3rd Reich}}, {{Axis and Allies}}, {{Empire Earth II}}, {{Kohan 2}}, {{Sid Meier's Pirates!}}, Dark Age of Camelot, Civilization IV, Wildlife Park 2, The Guild 2, NeoSteam + Oblivion + Oblivion + {{Pro Cycling Manager}}, {{Prison Tycoon}}, {{Red Ocean}}, {{Wildlife Park 2}}, Civilization IV, Loki + {{Blood Bowl}} + Oblivion + WorldShift + WorldShift + {{WorldShift}} + {{Civilization IV}}, {{Sid Meier's Railroads}}, Florensia, Ragnarok Online 2, IRIS Online + {{Oblivion KF}} + Fallout 3 + {{Oblivion}} + {{Shin Megami Tensei: Imagine}} + {{Florensia}}, Empire Earth III, Atlantica Online, IRIS Online, Wizard101 + Fallout 3, Fallout NV + Fallout 3 + Fallout 3, Fallout NV + Fallout 3, Fallout NV + Fallout 3, Fallout NV + Fallout 3, Fallout NV + Fallout 3, Fallout NV + Fallout 3, Fallout NV + {{Fallout 3}}, {{Fallout NV}} + {{Skyrim}} + {{Skyrim SE}} + {{Fallout 4}} + Fallout 4 (LS_Mirelurk.nif, Screen.nif) + {{Fallout 76}} + {{Empire Earth III}}, {{FFT Online}}, Atlantica Online, IRIS Online, Wizard101 + Emerge + Emerge + Emerge + Emerge + {{Bully SE}}, Warhammer, Lazeska, Howling Sword, Ragnarok Online 2, Divinity 2 (0x10000) + {{Divinity 2}} + MicroVolts, KrazyRain + {{MicroVolts}}, {{IRIS Online}}, {{Ragnarok Online 2}}, KrazyRain, Atlantica Online, Wizard101 + Epic Mickey + Epic Mickey + Epic Mickey 2 + Emerge + Emerge + Rocksmith, Rocksmith 2014 + Ghost In The Shell: First Assault, MapleStory 2 + + + + + + + + + + + + + + + + + + Commonly used version expressions. + NOTE: `string` should be wrapped in parentheses for string subsitutions in larger expressions. + NOTE: BSVER 'Greater Than' Expressions only ever apply to BS i.e. BSVER GT 0. + WARNING: BSVER 'Less Than' Expressions also apply to NI i.e. BSVER EQ 0. + NiStream that are not Bethesda. + NiStream that are Bethesda. + All NI + BS until BSVER 16. + All NI + BS before Fallout 3. + All NI + BS until Fallout 3. + All NI + BS before SSE. + All NI + BS before Fallout 4. + All NI + BS until Fallout 4. + Skyrim, SSE, and Fallout 4 + FO3 and later. + Skyrim and later. + SSE and later. + SSE only. + Fallout 4 strictly, excluding stream 132 and 139 in dev files. + Fallout 4/76 including dev files. + Later than Bethesda 130. + Bethesda 130 and later. + Bethesda 132 and later. + Bethesda 152 and later. + Fallout 76 stream 155 only. + Fallout 76 stream 152 and higher + Bethesda 20.2 only. + Divinity 2 + + + + + + + + + The set of versions that any Basic, Compound, NiObject, Enum, or Bitflags is restricted to. + + + + + + + + + + + + Commonly used default values. + + + + + + + + + + + + + + + + + + + + + + + + + + + + Commonly used range values. + + + + + + + + + + + + + + + + + + + + + + Global Tokens. + NOTE: These must be listed after the above tokens so that they replace last. For example, `verexpr` uses these tokens. + + + + + + + All Operators except for unary not (!), parentheses, and member of (\) + NOTE: These can be ignored entirely by string substitution and dealt with directly. + NOTE: These must be listed after the above tokens so that they replace last. For example, `verexpr` uses these tokens. + + + + + + + + + + + + + + + + + + + + + + An unsigned 64-bit integer. + + + + A signed 64-bit integer. + + + + A little-endian unsigned 32-bit integer. + + + + An unsigned 32-bit integer. + + + + A signed 32-bit integer. + + + + An unsigned 16-bit integer. + + + + A signed 16-bit integer. + + + + An 8-bit character. + + + + An unsigned 8-bit integer. + + + + A boolean; 32-bit from 4.0.0.2, and 8-bit from 4.1.0.1 on. + + + + A 16-bit (signed?) integer, which is used in the header to refer to a particular object type in a object type string array. + The upper bit appears to be a flag used for PhysX block types. + + + + A 32-bit integer that stores the version in hexadecimal format with each byte representing a number in the version string. + + Some widely-used versions and their hex representation: + 4.0.0.2: 0x04000002 + 4.1.0.12: 0x0401000C + 4.2.0.2: 0x04020002 + 4.2.1.0: 0x04020100 + 4.2.2.0: 0x04020200 + 10.0.1.0: 0x0A000100 + 10.1.0.0: 0x0A010000 + 10.2.0.0: 0x0A020000 + 20.0.0.4: 0x14000004 + 20.0.0.5: 0x14000005 + + + + A standard 32-bit floating point number. + + + + A 16-bit floating point number. + + + + A variable length string that ends with a newline character (0x0A). The string starts as follows depending on the version: + + Version <= 10.0.1.0: 'NetImmerse File Format' + Version >= 10.1.0.0: 'Gamebryo File Format' + + + + A variable length string that ends with a newline character (0x0A). + + + + A signed 32-bit integer, referring to a object before this one in the hierarchy. Examples: Bones, gravity objects. + + + + A signed 32-bit integer, used to refer to another object; -1 means no reference. These should always point down the hierarchy. Other types are used for indexes that point to objects higher up. + + + + A 32-bit unsigned integer, used to refer to strings in a NiStringPalette. + + + + A 32-bit unsigned integer, used to refer to strings in the header. + + + + Describes the options for the accum root on NiControllerSequence. + + + + + + + + + + + + + + Describes how the vertex colors are blended with the filtered texture color. + + + + + + + + + The type of texture. + + + + + + + + + + + + + + + + The type of animation interpolation (blending) that will be used on the associated key frames. + + + + + + + + + Bethesda Havok. Material descriptor for a Havok shape in Oblivion. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bethesda Havok. Material descriptor for a Havok shape in Fallout 3 and Fallout NV. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bethesda Havok. Material descriptor for a Havok shape in Skyrim. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bethesda Havok. Describes the collision layer a body belongs to in Oblivion. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bethesda Havok. Describes the collision layer a body belongs to in Fallout 3 and Fallout NV. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bethesda Havok. Describes the collision layer a body belongs to in Skyrim. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + hkpMoppCode::BuildType + A byte describing if MOPP Data is organized into chunks (PS3) or not (PC) + + + + + + + Target platform for NiPersistentSrcTextureRendererData (later than 30.1). + + + + Target renderer for NiPersistentSrcTextureRendererData (until 30.1). + + + + Describes the pixel format used by the NiPixelData object to store a texture. + + + + + + + + + + + + + + + + + + + + Describes whether pixels have been tiled from their standard row-major format to a format optimized for a particular platform. + + + + Describes the pixel format used by the NiPixelData object to store a texture. + + + + Describes how each pixel should be accessed on NiPixelFormat. + + + + Describes the color depth in an NiTexture. + + + + + + + + + + + Describes how mipmaps are handled in an NiTexture. + + + + + + + Describes how transparency is handled in an NiTexture. + + + + + + + + Describes the availiable texture clamp modes, i.e. the behavior of UV mapping outside the [0,1] range. + + + + + + + + Describes the availiable texture filter modes, i.e. the way the pixels in a texture are displayed on screen. + + + + + + + + + + + Describes how to apply vertex colors for NiVertexColorProperty. + + + + + + + Describes which lighting equation components influence the final vertex color for NiVertexColorProperty. + + + + + + The animation cyle behavior. + + + + + + + The force field type. + + + + + + Determines the way the billboard will react to the camera. + Billboard mode is stored in lowest 3 bits although Oblivion vanilla nifs uses values higher than 7. + + + + + + + + + + + + + + + Describes stencil buffer test modes for NiStencilProperty. + + + + + + + + + + + + Describes the actions which can occur as a result of tests for NiStencilProperty. + + + + + + + + + + Describes the face culling options for NiStencilProperty. + + + + + + + + Describes Z-buffer test modes for NiZBufferProperty. + "Less than" = closer to camera, "Greater than" = further from camera. + + + + + + + + + + + + Describes alpha blend modes for NiAlphaProperty. + + + + hkpMotion::MotionType. Motion type of a rigid body determines what happens when it is simulated. + + + + + + + + + + + + + + hkpRigidBodyDeactivator::DeactivatorType. Deactivator Type determines which mechanism Havok will use to classify the body as deactivated. + + + + + + + hkpRigidBodyCinfo::SolverDeactivation. + A list of possible solver deactivation settings. This value defines how aggressively the solver deactivates objects. + Note: Solver deactivation does not save CPU, but reduces creeping of movable objects in a pile quite dramatically. + + + + + + + + + + hkpCollidableQualityType. Describes the priority and quality of collisions for a body, + e.g. you may expect critical game play objects to have solid high-priority collisions so that they never sink into ground, + or may allow penetrations for visual debris objects. + Notes: + - Fixed and keyframed objects cannot interact with each other. + - Debris can interpenetrate but still responds to Bullet hits. + - Critical objects are forced to not interpenetrate. + - Moving objects can interpenetrate slightly with other Moving or Debris objects but nothing else. + + + + + + + + + + + + + + Describes the type of gravitational force. + + + + + + + Describes which aspect of the NiTextureTransform the NiTextureTransformController will modify. + + + + + + + + + Describes the decay function of bomb forces. + + + + + + + Describes the symmetry type of bomb forces. + + + + + + + Controls the way the a particle mesh emitter determines the starting speed and direction of the particles that are emitted. + + + + + + + Controls which parts of the mesh that the particles are emitted from. + + + + + + + + + The type of information that is stored in a texture used by an NiTextureEffect. + + + + + + + + Determines the way that UV texture coordinates are generated. + + + + + + + + + + + + + + Used by NiMaterialColorControllers to select which type of color in the controlled object that will be animated. + + + + + + + + Used by NiLightColorControllers to select which type of color in the controlled object that will be animated. + + + + + + Used by NiGeometryData to control the volatility of the mesh. + Consistency Type is masked to only the upper 4 bits (0xF000). Dirty mask is the lower 12 (0x0FFF) but only used at runtime. + + + + + + + Describes the way that NiSortAdjustNode modifies the sorting behavior for the subtree below it. + + + + + + The propagation mode controls scene graph traversal during collision detection operations for NiCollisionData. + + + + + + + + + The collision mode controls the type of collision operation that is to take place for NiCollisionData. + + + + + + + + + + + + + + + + + + hkpMaterial::ResponseType + + + + + + + + Biped bodypart data used for visibility control of triangles. Options are Fallout 3, except where marked for Skyrim (uses SBP prefix) + Skyrim BP names are listed only for vanilla names, different creatures have different defnitions for naming. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Values for configuring the shader type in a BSLightingShaderProperty + + + + + + + + + + + + + + Values for configuring the shader type in a BSLightingShaderProperty + + + + An unsigned 32-bit integer, describing which float variable in BSEffectShaderProperty to animate. + + + + + + + + + + + + + + An unsigned 32-bit integer, describing which color in BSEffectShaderProperty to animate. + + + + + An unsigned 32-bit integer, describing which float variable in BSLightingShaderProperty to animate. + + + + + + + + + + + + + + An unsigned 32-bit integer, describing which integral value in BSLightingShaderProperty to animate. + + + + An unsigned 32-bit integer, describing which color in BSLightingShaderProperty to animate. + + + + + + hkpConstraintData::ConstraintType. Describes the type of bhkConstraint. + + + + + + + + + + + + + + + + + Flags for NiDitherProperty + + + + Flags for NiShadeProperty + + + + Flags for NiSpecularProperty + + + + Flags for NiWireframeProperty + + + + Flags for NiGeomMorpherController + + + + + + Flags for NiTimeController + + + + + + + + + + + Flags for NiAlphaProperty + + + + + + + Bethesda-only. Always true for weapon blood after FO3. + Bethesda-only. True if the Alpha Threshold is externally controlled. + + + + Flags for NiFogProperty + + + + + + Flags for NiStencilProperty + + + + + + + + + + Flags for NiTexturingProperty + + + + + + + Flags for NiTexturingProperty + + + + + + + Flags for NiVertexColorProperty + + + + + + + Flags for NiZBufferProperty + + + + + + + + + + Flags for NiAGDDataStream + + + + + + + + + + Unused for non-Bethesda, non-bhk NiGeometryData. + + + + + + + + + + + Used only if the Layer is 8 (or 32/33 for Skyrim and later). + + + If Layer is CHARCONTROLLER (CC), true means "CC Trigger Only". + + + + A string of given length. + The string length. + The string itself. + + + + A string of given length, using a ushort to store string length. + The string length. + The string itself. + + + + A string type. + The normal string. + The string index. + + + + Currently, #T# must be a basic type due to nif.xml restrictions. + + + + + + A mapping or hash table between NiFixedString keys and a generic value. + Currently, #T# must be a basic type due to nif.xml restrictions. + + + + + + An array of bytes. + The number of bytes in this array + The bytes which make up the array + + + + An array of bytes. + The number of bytes in this array + The number of bytes in this array + The bytes which make up the array + + + + A color without alpha (red, green, blue). + Red color component. + Green color component. + Blue color component. + + + + A color without alpha (red, green, blue). + Red color component. + Green color component. + Blue color component. + + + + A color with alpha (red, green, blue, alpha). + Red component. + Green component. + Blue component. + Alpha. + + + + A color with alpha (red, green, blue, alpha). + Red color component. + Green color component. + Blue color component. + Alpha color component. + + + + A string that contains the path to a file. + The normal string. + The string index. + + + + The NIF file footer. + The number of root references. + List of root NIF objects. If there is a camera, for 1st person view, then this NIF object is referred to as well in this list, even if it is not a root object (usually we want the camera to be attached to the Bip Head node). + + + + The distance range where a specific level of detail applies. + Begining of range. + End of Range. + + + + + Group of vertex indices of vertices that match. + Number of vertices in this group. + The vertex indices. + + + + A vector in 3D space (x,y,z). + First coordinate. + Second coordinate. + Third coordinate. + + + + A vector in 3D space (x,y,z). + First coordinate. + Second coordinate. + Third coordinate. + + + + A vector in 3D space (x,y,z). + First coordinate. + Second coordinate. + Third coordinate. + + + + A 4-dimensional vector. + First coordinate. + Second coordinate. + Third coordinate. + Fourth coordinate. + + + + A quaternion. + The w-coordinate. + The x-coordinate. + The y-coordinate. + The z-coordinate. + + + + A quaternion as it appears in the havok objects. + The x-coordinate. + The y-coordinate. + The z-coordinate. + The w-coordinate. + + + + A 2x2 matrix of float values. Stored in OpenGL column-major format. + Member 1,1 (top left) + Member 2,1 (bottom left) + Member 1,2 (top right) + Member 2,2 (bottom right) + + + + A 3x3 rotation matrix; M^T M=identity, det(M)=1. Stored in OpenGL column-major format. + Member 1,1 (top left) + Member 2,1 + Member 3,1 (bottom left) + Member 1,2 + Member 2,2 + Member 3,2 + Member 1,3 (top right) + Member 2,3 + Member 3,3 (bottom left) + + + + A 3x4 transformation matrix. + The (1,1) element. + The (2,1) element. + The (3,1) element. + The (1,2) element. + The (2,2) element. + The (3,2) element. + The (1,3) element. + The (2,3) element. + The (3,3) element. + The (1,4) element. + The (2,4) element. + The (3,4) element. + + + + A 4x4 transformation matrix. + The (1,1) element. + The (2,1) element. + The (3,1) element. + The (4,1) element. + The (1,2) element. + The (2,2) element. + The (3,2) element. + The (4,2) element. + The (1,3) element. + The (2,3) element. + The (3,3) element. + The (4,3) element. + The (1,4) element. + The (2,4) element. + The (3,4) element. + The (4,4) element. + + + + A 3x3 Havok matrix stored in 4x3 due to memory alignment. + + + + Unused + + + + Unused + + + + Unused + + + + Description of a mipmap within an NiPixelData object. + Width of the mipmap image. + Height of the mipmap image. + Offset into the pixel data array where this mipmap starts. + + + + A set of NiNode references. + Number of node references that follow. + The list of NiNode references. + + + + Specific to Bethesda-specific header export strings. + The string length. + The string itself, null terminated (the null terminator is taken into account in the length byte). + + + + NiBoneLODController::SkinInfo. Reference to shape and skin instance. + + + + + + A set of NiBoneLODController::SkinInfo. + + + + + + NiSkinData::BoneVertData. A vertex and its weight. + The vertex index, in the mesh. + The vertex weight - between 0.0 and 1.0 + + + + Used in NiDefaultAVObjectPalette. + Object name. + Object reference. + + + + In a .kf file, this links to a controllable object, via its name (or for version 10.2.0.0 and up, a link and offset to a NiStringPalette that contains the name), and a sequence of interpolators that apply to this controllable object, via links. + For Controller ID, NiInterpController::GetCtlrID() virtual function returns a string formatted specifically for the derived type. + For Interpolator ID, NiInterpController::GetInterpolatorID() virtual function returns a string formatted specifically for the derived type. + The string formats are documented on the relevant niobject blocks. + Name of a controllable object in another NIF file. + + + + + + Idle animations tend to have low values for this, and high values tend to correspond with the important parts of the animations. + + The name of the animated NiAVObject. + The RTTI type of the NiProperty the controller is attached to, if applicable. + The RTTI type of the NiTimeController. + An ID that can uniquely identify the controller among others of the same type on the same NiObjectNET. + An ID that can uniquely identify the interpolator among others of the same type on the same NiObjectNET. + + Refers to the NiStringPalette which contains the name of the controlled NIF object. + Offset in NiStringPalette to the name of the animated NiAVObject. + Offset in NiStringPalette to the RTTI type of the NiProperty the controller is attached to, if applicable. + Offset in NiStringPalette to the RTTI type of the NiTimeController. + Offset in NiStringPalette to an ID that can uniquely identify the controller among others of the same type on the same NiObjectNET. + Offset in NiStringPalette to an ID that can uniquely identify the interpolator among others of the same type on the same NiObjectNET. + + The name of the animated NiAVObject. + The RTTI type of the NiProperty the controller is attached to, if applicable. + The RTTI type of the NiTimeController. + An ID that can uniquely identify the controller among others of the same type on the same NiObjectNET. + An ID that can uniquely identify the interpolator among others of the same type on the same NiObjectNET. + + + + Information about how the file was exported + + + + + + + + + + + The NIF file header. + 'NetImmerse File Format x.x.x.x' (versions <= 10.0.1.2) or 'Gamebryo File Format x.x.x.x' (versions >= 10.1.0.0), with x.x.x.x the version written out. Ends with a newline character (0x0A). + + The NIF version, in hexadecimal notation: 0x04000002, 0x0401000C, 0x04020002, 0x04020100, 0x04020200, 0x0A000100, 0x0A010000, 0x0A020000, 0x14000004, ... + Determines the endianness of the data in the file. + An extra version number, for companies that decide to modify the file format. + Number of file objects. + + + Number of object types in this NIF file. + List of all object types used in this NIF file. + List of all object types used in this NIF file. + Maps file objects on their corresponding type: first file object is of type object_types[object_type_index[0]], the second of object_types[object_type_index[1]], etc. + Array of block sizes + Number of strings. + Maximum string length. + Strings. + + + + + + A list of \\0 terminated strings. + A bunch of 0x00 seperated strings. + Length of the palette string is repeated here. + + + + Tension, bias, continuity. + Tension. + Bias. + Continuity. + + + + A generic key with support for interpolation. Type 1 is normal linear interpolation, type 2 has forward and backward tangents, and type 3 has tension, bias and continuity arguments. Note that color4 and byte always seem to be of type 1. + Time of the key. + The key value. + Key forward tangent. + The key backward tangent. + The TBC of the key. + + + + Array of vector keys (anything that can be interpolated, except rotations). + Number of keys in the array. + The key type. + The keys. + + + + A special version of the key type used for quaternions. Never has tangents. #T# should always be Quaternion. + Time the key applies. + Time the key applies. + Value of the key. + The TBC of the key. + + + + Texture coordinates (u,v). As in OpenGL; image origin is in the lower left corner. + First coordinate. + Second coordinate. + + + + Texture coordinates (u,v). + First coordinate. + Second coordinate. + + + + Describes the order of scaling and rotation matrices. Translate, Scale, Rotation, Center are from TexDesc. + Back = inverse of Center. FromMaya = inverse of the V axis with a positive translation along V of 1 unit. + + + + + + + NiTexturingProperty::Map. Texture description. + Link to the texture image. + NiSourceTexture object index. + 0=clamp S clamp T, 1=clamp S wrap T, 2=wrap S clamp T, 3=wrap S wrap T + 0=nearest, 1=bilinear, 2=trilinear, 3=..., 4=..., 5=... + Texture mode flags; clamp and filter mode stored in upper byte with 0xYZ00 = clamp mode Y, filter mode Z. + + The texture coordinate set in NiGeometryData that this texture slot will use. + L can range from 0 to 3 and are used to specify how fast a texture gets blurry. + K is used as an offset into the mipmap levels and can range from -2047 to 2047. Positive values push the mipmap towards being blurry and negative values make the mipmap sharper. + + + Whether or not the texture coordinates are transformed. + The UV translation. + The UV scale. + The W axis rotation in texture space. + Depending on the source, scaling can occur before or after rotation. + The origin around which the texture rotates. + + + + NiTexturingProperty::ShaderMap. Shader texture description. + + + Unique identifier for the Gamebryo shader system. + + + + List of three vertex indices. + First vertex index. + Second vertex index. + Third vertex index. + + + + The bits of BSVertexDesc that describe the enabled vertex attributes. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skinning data for a submesh, optimized for hardware skinning. Part of NiSkinPartition. + Number of vertices in this submesh. + Number of triangles in this submesh. + Number of bones influencing this submesh. + Number of strips in this submesh (zero if not stripped). + Number of weight coefficients per vertex. The Gamebryo engine seems to work well only if this number is equal to 4, even if there are less than 4 influences per vertex. + List of bones. + Do we have a vertex map? + Maps the weight/influence lists in this submesh to the vertices in the shape being skinned. + Maps the weight/influence lists in this submesh to the vertices in the shape being skinned. + Do we have vertex weights? + The vertex weights. + The vertex weights. + The strip lengths. + Do we have triangle or strip data? + The strips. + The strips. + The triangles. + The triangles. + Do we have bone indices? + Bone indices, they index into 'Bones'. + + + + + + + + A plane. + The plane normal. + The plane constant. + + + + Divinity 2 specific NiBound extension. + + Corners are only non-zero if Num Corners is 2. Hardcoded to 2. + + + + A sphere. + The sphere's center. + The sphere's radius. + + + + + A 3D curve made up of control points and knots. + + + + + + + + + + + + Whether each transform component is valid. + + + + The rotation part of the transformation matrix. + The translation vector. + Scaling part (only uniform scaling is supported). + + + + Bethesda Animation. Furniture entry points. It specifies the direction(s) from where the actor is able to enter (and leave) the position. + + + + + + + + + Bethesda Animation. Animation type used on this position. This specifies the function of this position. + + + + + + + Bethesda Animation. Describes a furniture position? + Offset of furniture marker. + Furniture marker orientation. + Refers to a furnituremarkerxx.nif file. Always seems to be the same as Position Ref 2. + Refers to a furnituremarkerxx.nif file. Always seems to be the same as Position Ref 1. + Similar to Orientation, in float form. + + + + + + Bethesda Havok. A triangle with extra data used for physics. + The triangle. + Additional havok information on how triangles are welded. + This is the triangle's normal. + + + + Geometry morphing data component. + Name of the frame. + The number of morph keys that follow. + Unlike most objects, the presense of this value is not conditional on there being keys. + The morph key frames. + + Morph vectors. + + + + Called NiPerParticleData in NiOldParticles. + Holds the state of a particle at the time the system was saved. + Particle direction and speed. + + + + Timestamp of the last update. + + Usually matches array index + + + + NiSkinData::BoneData. Skinning data component. + Offset of the skin from this bone in bind position. + Note that its a Sphere Containing Axis Aligned Box not a minimum volume Sphere + Number of weighted vertices. + The vertex weights. + The vertex weights. + + + + Bethesda Havok. Collision filter info representing Layer, Flags, Part Number, and Group all combined into one uint. + The layer the collision belongs to. + The layer the collision belongs to. + The layer the collision belongs to. + + + + + + Bethesda Havok. Material wrapper for varying material enums by game. + + The material of the shape. + The material of the shape. + The material of the shape. + + + + Bethesda Havok. Havok Information for packed TriStrip shapes. + + The number of vertices that form this sub shape. + The material of the subshape. + + + + Havok AABB using min/max coordinates instead of center/half extents. + Coordinates of the corner with the lowest numerical values. + Coordinates of the corner with the highest numerical values. + + + + hkpConstraintInstance::ConstraintPriority. Priority used for the constraint. + Values 2, 4, and 5 are unused or internal use only. + + + + + + Bethesda extension of hkpConstraintInstance. + Always 2 (Hardcoded). Number of bodies affected by this constraint. + The entity affected by this constraint. + The entity affected by this constraint. + Either PSI or TOI priority. TOI is higher priority. + + + + Bethesda extension of hkpConstraintChainInstance. + + + + + + + Bethesda extension of hkpPositionConstraintMotor. + A motor which tries to reach a desired position/angle given a max force and recovery speed. + This motor is a good choice for driving a ragdoll to a given pose. + Minimum motor force + Maximum motor force + Relative stiffness + Motor damping value + A factor of the current error to calculate the recovery velocity + A constant velocity which is used to recover from errors + Is Motor enabled + + + + Bethesda extension of hkpVelocityConstraintMotor. Tries to reach and keep a desired target velocity. + Minimum motor force + Maximum motor force + Relative stiffness + + + Is Motor enabled + + + + Bethesda extension of hkpSpringDamperConstraintMotor. + Tries to reach a given target position using an angular spring which has a spring constant. + Minimum motor force + Maximum motor force + The spring constant in N/m + The spring damping in Nsec/m + Is Motor enabled + + + + + + + hkConstraintCinfo::SaveMotor(). Not a Bethesda extension of hkpConstraintMotor, but a wrapper for its serialization function. + + + + + + + + Serialization data for bhkRagdollConstraint. + The area of movement can be represented as a main cone + 2 orthogonal cones which may subtract from the main cone volume depending on limits. + + The point where the constraint is attached to its parent rigidbody. + Defines the orthogonal plane in which the body can move, the orthogonal directions in which the shape can be controlled (the direction orthogonal on this one and Twist A). + Central directed axis of the cone in which the object can rotate. Orthogonal on Plane A. + The point where the constraint is attached to the other rigidbody. + Defines the orthogonal plane in which the shape can be controlled (the direction orthogonal on this one and Twist B). + Central directed axis of the cone in which the object can rotate. Orthogonal on Plane B. + + + Central directed axis of the cone in which the object can rotate. Orthogonal on Plane A. + Defines the orthogonal plane in which the body can move, the orthogonal directions in which the shape can be controlled (the direction orthogonal on this one and Twist A). + Defines the orthogonal directions in which the shape can be controlled (namely in this direction, and in the direction orthogonal on this one and Twist A). + Point around which the object will rotate. Defines the orthogonal directions in which the shape can be controlled (namely in this direction, and in the direction orthogonal on this one and Twist A). + Central directed axis of the cone in which the object can rotate. Orthogonal on Plane B. + Defines the orthogonal plane in which the body can move, the orthogonal directions in which the shape can be controlled (the direction orthogonal on this one and Twist A). + Defines the orthogonal directions in which the shape can be controlled (namely in this direction, and in the direction orthogonal on this one and Twist A). + Defines the orthogonal directions in which the shape can be controlled (namely in this direction, and in the direction orthogonal on this one and Twist A). + + Maximum angle the object can rotate around the vector orthogonal on Plane A and Twist A relative to the Twist A vector. Note that Cone Min Angle is not stored, but is simply minus this angle. + Minimum angle the object can rotate around Plane A, relative to Twist A. + Maximum angle the object can rotate around Plane A, relative to Twist A. + Minimum angle the object can rotate around Twist A, relative to Plane A. + Maximum angle the object can rotate around Twist A, relative to Plane A. + Maximum friction, typically 0 or 10. In Fallout 3, typically 100. + + + + + + Serialization data for bhkLimitedHingeConstraint. + This constraint allows rotation about a specified axis, limited by specified boundaries. + + + Pivot point around which the object will rotate. + Axis of rotation. + Vector in the rotation plane which defines the zero angle. + Vector in the rotation plane, orthogonal on the previous one, which defines the positive direction of rotation. This is always the vector product of Axis A and Perp Axis In A1. + Pivot A in second entity coordinate system. + Axis A in second entity coordinate system. + Perp Axis In A2 in second entity coordinate system. + + + Axis of rotation. + Vector in the rotation plane which defines the zero angle. + Vector in the rotation plane, orthogonal on the previous one, which defines the positive direction of rotation. This is always the vector product of Axis A and Perp Axis In A1. + Pivot point around which the object will rotate. + Axis A in second entity coordinate system. + Perp Axis In A1 in second entity coordinate system. + Perp Axis In A2 in second entity coordinate system. + Pivot A in second entity coordinate system. + + Minimum rotation angle. + Maximum rotation angle. + Maximum friction, typically either 0 or 10. In Fallout 3, typically 100. + + + + + + Serialization data for bhkHingeConstraint. A basic hinge with no angular limits or motor. + + Pivot point around which the object will rotate. + Vector in the rotation plane which defines the zero angle. + Vector in the rotation plane, orthogonal on the previous one, which defines the positive direction of rotation. + Pivot A in second entity coordinate system. + Axis A (vector orthogonal on Perp Axes) in second entity coordinate system. + + + Axis of rotation. + Vector in the rotation plane which defines the zero angle. + Vector in the rotation plane, orthogonal on the previous one, which defines the positive direction of rotation. This is always the vector product of Axis A and Perp Axis In A1. + Pivot point around which the object will rotate. + Axis A in second entity coordinate system. + Perp Axis In A1 in second entity coordinate system. + Perp Axis In A2 in second entity coordinate system. + Pivot A in second entity coordinate system. + + + + Serialization data for bhkBallAndSocketConstraint. + Point-to-point constraint that attempts to keep the pivot point of two bodies in the same space. + Constraint pivot in Entity A space. + Constraint pivot in Entity B space. + + + + Serialization data for bhkPrismaticConstraint. + Creates a rail between two bodies that allows translation along a single axis with linear limits and a motor. + All three rotation axes and the remaining two translation axes are fixed. + + Pivot. + Rotation axis. + Plane normal. Describes the plane the object is able to move on. + Describes the axis the object is able to travel along. Unit vector. + Describes the axis the object is able to travel along in B coordinates. Unit vector. + Pivot in B coordinates. + Rotation axis. + Plane normal. Describes the plane the object is able to move on in B coordinates. + + + Describes the axis the object is able to travel along. Unit vector. + Rotation axis. + Plane normal. Describes the plane the object is able to move on. + Pivot. + Describes the axis the object is able to travel along in B coordinates. Unit vector. + Rotation axis. + Plane normal. Describes the plane the object is able to move on in B coordinates. + Pivot in B coordinates. + + Describe the min distance the object is able to travel. + Describe the max distance the object is able to travel. + Friction. + + + + + + bhkStiffSpringConstraint serialization data. Holds two bodies at a specified distance from one another. + + + + + + + Used to store skin weights in NiTriShapeSkinController. + The amount that this bone affects the vertex. + The index of the vertex that this weight applies to. + + + + + Determines how the raw image data is stored in NiRawImageData. + + + + + + Box Bounding Volume + + + + + + + Capsule Bounding Volume + + + + + + + + + + + + + Type of collision data. + + + + + + + + + + + + + + + + + + + Transformation data for the bone at this index in bhkPoseArray. + + + + + + + A list of transforms for each bone in bhkPoseArray. + + + + + + Array of Vectors for Decal placement in BSDecalPlacementVectorExtraData. + + Vector XYZ coords + Vector Normals + + + + Editor flags for the Body Partitions. + + + + + + Body part list for DismemberSkinInstance + Flags related to the Body Partition + Body Part Index + + + + Stores Bone Level of Detail info in a BSBoneLODExtraData + + + + + + hkpBSMaterial, a subclass of hkpMeshMaterial. hkpMeshMaterial is a base class for material info for hkMeshShapes. + + + + + + Bethesda extension of hkpCompressedMeshShape::BigTriangle. Triangles that don't fit the maximum size. + + + + + + + Bethesda extension of hkQsTransform. The scale vector is not serialized. + A vector that moves the chunk by the specified amount. W is not used. + Rotation. Reference point for rotation is bhkRigidBody translation. + + + + Bethesda extension of hkpCompressedMeshShape::Chunk. A compressed chunk of hkpCompressedMeshShape geometry. + + Index of material in bhkCompressedMeshShapeData::Chunk Materials + Index of another chunk in the chunks list. + Index of transformation in bhkCompressedMeshShapeData::Chunk Transforms + + + + + + + + + + + + bhkMalleableConstraint serialization data. A constraint wrapper used to soften or harden constraints. + Type of constraint. + + + + + + + + + + + + + + A constraint wrapper for polymorphic hkpConstraintData serialization. + Type of constraint. + + + + + + + + + + + + Abstract object type. + + + + Unknown. + + + + + + + + + Unknown. Only found in 2.3 nifs. + Name of this object. + + + + + + A count. + + + + + Unknown! + + + + + Unknown! + + + + + Unknown! + + + + + Unknown! + + + + + + LEGACY (pre-10.1). Abstract base class for particle system modifiers. + Next particle modifier. + Points to the particle system controller parent. + + + + Particle system collider. + Amount of bounce for the collider. + Spawn particles on impact? + Kill particles on impact? + Spawner to use for the collider. + Link to parent. + The next collider. + The object whose position and orientation are the basis of the collider. + + + + + + + Bethesda extension of hkReferencedObject, the base for all classes in the Havok SDK. + + + + Bethesda class to combine NiObject and hkReferencedObject so that Havok classes can be read/written with NiStream. + + + + hkWorldObjectCinfo::Property struct + + + + + + + + + + + + + + Bethesda extension of hkpWorldObject, the base class for hkpEntity and hkpPhantom. + The shape for this collision object. + + + + + + + Bethesda extension of hkpPhantom. A Phantom is the core non-physical object in the system. + Receives events when an overlap with another phantom or an entity begins or ends. + + + + Bethesda extension of hkpAabbPhantom. A non-physical object made up of only an AABB. + - Very fast as they use only broadphase collision detection. + - Used for triggers/regions where a shape is not necessary. + + + + + + Bethesda extension of hkpShapePhantom, a base for hkpSimpleShapePhantom and hkpCachingShapePhantom. + + + + Bethesda extension of hkpSimpleShapePhantom. A Phantom with arbitrary shape and transform. + Does not do any narrowphase caching, in contrast to hkpCachingShapePhantom. + + + + + + How the body reacts to collisions. See hkResponseType for hkpWorld default implementations. + + Lowers the frequency for processContactCallbacks. A value of 5 means that a callback is raised every 5th frame. The default is once every 65535 frames. + + + + Bethesda extension of hkpEntity. An Entity is the core physical object in the system. + + + + + + + + + + + + A vector that moves the body by the specified amount. Only enabled in bhkRigidBodyT objects. + The rotation Yaw/Pitch/Roll to apply to the body. Only enabled in bhkRigidBodyT objects. + Linear velocity. + Angular velocity. + Defines how the mass is distributed among the body, i.e. how difficult it is to rotate around any given axis. + The body's center of mass. + The body's mass in kg. A mass of zero represents an immovable object. + Reduces the movement of the body over time. A value of 0.1 will remove 10% of the linear velocity every second. + Reduces the movement of the body over time. A value of 0.05 will remove 5% of the angular velocity every second. + How smooth its surfaces is and how easily it will slide along other bodies. + + How "bouncy" the body is, i.e. how much energy it has after colliding. Less than 1.0 loses energy, greater than 1.0 gains energy. + If the restitution is not 0.0 the object will need extra CPU for all new collisions. + + Maximal linear velocity. + Maximal angular velocity. + + The maximum allowed penetration for this object. + This is a hint to the engine to see how much CPU the engine should invest to keep this object from penetrating. + A good choice is 5% - 20% of the smallest diameter of the object. + + Motion system? Overrides Quality when on Keyframed? + The initial deactivator type of the body. + How aggressively the engine will try to zero the velocity for slow objects. This does not save CPU. + The type of interaction with other objects. + + + + + + + + + + + + A vector that moves the body by the specified amount. Only enabled in bhkRigidBodyT objects. + The rotation Yaw/Pitch/Roll to apply to the body. Only enabled in bhkRigidBodyT objects. + Linear velocity. + Angular velocity. + Defines how the mass is distributed among the body, i.e. how difficult it is to rotate around any given axis. + The body's center of mass. + The body's mass in kg. A mass of zero represents an immovable object. + Reduces the movement of the body over time. A value of 0.1 will remove 10% of the linear velocity every second. + Reduces the movement of the body over time. A value of 0.05 will remove 5% of the angular velocity every second. + + + How smooth its surfaces is and how easily it will slide along other bodies. + + + How "bouncy" the body is, i.e. how much energy it has after colliding. Less than 1.0 loses energy, greater than 1.0 gains energy. + If the restitution is not 0.0 the object will need extra CPU for all new collisions. + + Maximal linear velocity. + Maximal angular velocity. + + The maximum allowed penetration for this object. + This is a hint to the engine to see how much CPU the engine should invest to keep this object from penetrating. + A good choice is 5% - 20% of the smallest diameter of the object. + + Motion system? Overrides Quality when on Keyframed? + + How aggressively the engine will try to zero the velocity for slow objects. This does not save CPU. + The type of interaction with other objects. + + + + + + + + + + + + A vector that moves the body by the specified amount. Only enabled in bhkRigidBodyT objects. + The rotation Yaw/Pitch/Roll to apply to the body. Only enabled in bhkRigidBodyT objects. + Linear velocity. + Angular velocity. + Defines how the mass is distributed among the body, i.e. how difficult it is to rotate around any given axis. + The body's center of mass. + The body's mass in kg. A mass of zero represents an immovable object. + Reduces the movement of the body over time. A value of 0.1 will remove 10% of the linear velocity every second. + Reduces the movement of the body over time. A value of 0.05 will remove 5% of the angular velocity every second. + + How smooth its surfaces is and how easily it will slide along other bodies. + + + How "bouncy" the body is, i.e. how much energy it has after colliding. Less than 1.0 loses energy, greater than 1.0 gains energy. + If the restitution is not 0.0 the object will need extra CPU for all new collisions. + + Maximal linear velocity. + Maximal angular velocity. + Motion system? Overrides Quality when on Keyframed? + + How aggressively the engine will try to zero the velocity for slow objects. This does not save CPU. + + + The maximum allowed penetration for this object. + This is a hint to the engine to see how much CPU the engine should invest to keep this object from penetrating. + A good choice is 5% - 20% of the smallest diameter of the object. + + + + + + + + + + + + + + + + This is the default body type for all "normal" usable and static world objects. The "T" suffix + marks this body as active for translation and rotation, a normal bhkRigidBody ignores those + properties. Because the properties are equal, a bhkRigidBody may be renamed into a bhkRigidBodyT and vice-versa. + + + + + + 1 = respond to wind + 1 = respond to wind + + + + The "T" suffix marks this body as active for translation and rotation. + + + + + Bethesda extension of hkpAction. hkpAction performs some action on a body or bodies during every simulation step. + + + + Bethesda extension of hkpUnaryAction. hkpUnaryAction performs an action on one body. + + + + + + Bethesda extension of hkpBinaryAction. hkpBinaryAction performs an action on two bodies. + + + + + + + Bethesda extension of hkpConstraintData. Base class for all constraints. + + + + + Bethesda extension of hkpLimitedHingeConstraintData. Hinge constraint with limits and a motor. + Enabling the motor will remove any friction. + + + + + Bethesda extension of hkpMalleableConstraintData. Constraint wrapper used to soften or harden constraints. + Does not affect angular limits or angular motors. + + + + + Bethesda extension of hkpStiffSpringConstraintData. Holds two bodies at a specified distance from one another. + + + + + Bethesda extension of hkpRagdollConstraintData. Creates a joint between two bodies with 3 degrees of freedom and a motor. + Enabling the motor will remove any friction. + The area of movement can be represented as a main cone + 2 orthogonal cones which may subtract from the main cone volume depending on limits. + + + + + Bethesda extension of hkpPrismaticConstraintData. + Creates a rail between two bodies that allows translation along a single axis with linear limits and a motor. + All three rotation axes and the remaining two translation axes are fixed. + + + + + Bethesda extension of hkpHingeConstraintData. A basic hinge with no angular limits or motor. + + + + + Bethesda extension of hkpBallAndSocketConstraintData. + Point-to-point constraint that attempts to keep the pivot point of two bodies in the same space. + + + + + Bethesda extension of hkpBallSocketChainData. A chain of ball and socket constraints. + Should equal (Num Chained Entities - 1) * 2 + Two pivot points A and B for each constraint. + High values are harder and more reactive, lower values are smoother. + Defines damping strength for the current velocity. + Restitution (amount of elasticity) of constraints. Added to the diagonal of the constraint matrix. A value of 0.0 can result in a division by zero with some chain configurations. + Maximum distance error in constraints allowed before stabilization algorithm kicks in. A smaller distance causes more resistance. + + + + + The base class for narrowphase collision detection objects. + All narrowphase collision detection is performed between pairs of bhkShape objects by creating appropriate collision agents. + + + + Contains a bhkShape and an additional transform for that shape. + The shape that this object transforms. + The material of the shape. + + + A transform matrix. + + + + An imaginary abstract base to solve inheritance issues in nif.xml with Havok serialization not matching class hierarchy. + + + + An interface that produces a set of spheres that represent a simplified version of the shape. + The material of the shape. + + + + An interface that allows testing convex sets using the GJK algorithm. Also holds a radius value for creating a shell. + The radius is used to create a thin shell that is used as the shape surface. + + + + An interface for a shape which can collide with an array of spheres. + The material of the shape. + + + + Contains a normal and distance from the origin, bounded by a given AABB. + + + Distance from the origin to the plane. + + + + + + A sphere. + + + + A cylinder. + + + + + + + + + A capsule. + + First point on the capsule's axis. + Matches first capsule radius. + Second point on the capsule's axis. + Matches second capsule radius. + + + + A box. + + A cube stored in Half Extents. A unit cube (1.0, 1.0, 1.0) would be stored as 0.5, 0.5, 0.5. + Unused as Havok stores the Half Extents as hkVector4 with the W component unused. + + + + A convex shape built from vertices. Note that if the shape is used in + a non-static object (such as clutter), then they will simply fall + through ground when they are under a bhkListShape. + + + Number of vertices. + Vertices. Fourth component is 0. Lexicographically sorted. + The number of half spaces. + Half spaces as determined by the set of vertices above. First three components define the normal pointing to the exterior, fourth component is the signed distance of the separating plane to the origin: it is minus the dot product of v and n, where v is any vertex on the separating plane, and n is the normal. Lexicographically sorted. + + + + Contains a bhkConvexShape and an additional transform for that shape. + The advantage of using bhkConvexTransformShape over bhkTransformShape is that it does not require additional agents to be created as it is itself convex. + The shape that this object transforms. + The material of the shape. + + + A transform matrix. + + + + + + + + + + + A compound shape made up of spheres. This is useful as an approximation for complex shapes, as collision detection for spheres is very fast. + However, if two bhkMultiSphereShape collide, every sphere needs to be checked against every other sphere. + Example: 10 spheres colliding with 10 spheres will result in 100 collision checks. + Therefore shapes like bhkCapsuleShape or bhkConvexVerticesShape should be preferred. + + + The spheres which make up the multi sphere shape. Max of 8. + + + + Bethesda extension of hkpBvTreeShape. hkpBvTreeShape adds a bounding volume tree to an hkpShapeCollection. + A bounding volume tree is useful for testing collision between a moving object and large static geometry. + The shape. + + + + Number of bytes for MOPP data. + + XYZ: Origin of the object in mopp coordinates. This is the minimum of all vertices in the packed shape along each axis, minus 0.1. + W: The scaling factor to quantize the MOPP: the quantization factor is equal to 256*256 divided by this number. + In Oblivion files, scale is taken equal to 256*256*254 / (size + 0.2) where size is the largest dimension of the bounding box of the packed shape. + + Tells if MOPP Data was organized into smaller chunks (PS3) or not (PC) + The tree of bounding volume data. + + + + Bethesda extension of hkpMoppBvTreeShape. hkpMoppBvTreeShape is a bounding volume tree using Havok-proprietary MOPP code. + + + + + + + + An interface to a collection of bhkShapes. + + + + A list of shapes. + + Shapes collected in a bhkListShape may not have the correct collision sound/FX due to HavokMaterial issues. + Do not put a bhkPackedNiTriStripsShape in the Sub Shapes. Use a separate collision nodes without a list shape for those. + + List of shapes. Max of 256. + The material of the shape. + + + + Always zeroed. Seemingly unused, or 0 for all values means no override. + + + + Bethesda extension of hkpMeshShape, but using NiTriStripsData instead of Havok storage. + Appears in one old Oblivion NIF, but only in certain distributions. NIF version 10.0.1.0 only. + + + + + + + + + + + + + Bethesda custom hkpShapeCollection using custom packed tri strips data. + + + + + + + + Same as radius + Same as scale. + + + + + Bethesda custom hkpShapeCollection using NiTriStripsData for geometry storage. + The material of the shape. + + + + + + + + + + + + A generic extra data object. + Name of this object. + Block number of the next extra data object. + The extra data was sometimes stored as binary directly on NiExtraData. + Ignore binary data after 4.x as the child block will cover it. + + + + Abstract base class for all interpolators of bool, float, NiQuaternion, NiPoint3, NiColorA, and NiQuatTransform data. + + + + Abstract base class for interpolators that use NiAnimationKeys (Key, KeyGrp) for interpolation. + + + + Animates a color value over time. + + + + + + Uses NiFloatKeys to animate a float value over time. + Pose value if lacking NiFloatData. + + + + + An interpolator for transform keyframes. + + + + + + Uses NiPosKeys to animate an NiPoint3 value over time. + Pose value if lacking NiPosData. + + + + + + + + Used to make an object follow a predefined spline path. + + -1 = Negative, 1 = Positive + Max angle in radians. + + 0, 1, or 2 representing X, Y, or Z. + + + + + + Uses NiBoolKeys to animate a bool value over time. + Pose value if lacking NiBoolData. + + + + + Uses NiBoolKeys to animate a bool value over time. + Unlike NiBoolInterpolator, it ensures that keys have not been missed between two updates. + + + + Flags for NiBlendInterpolator + + + + Interpolator item for array in NiBlendInterpolator. + Reference to an interpolator. + + + + + + + + + Abstract base class for all NiInterpolators that blend the results of sub-interpolators together to compute a final weighted value. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Abstract base class for interpolators storing data via a B-spline. + Animation start time. + Animation stop time. + + + + + + Extra Data for pre-3.0 versions + + + + + + + + + Abstract base class for NiObjects that support names, extra data, and time controllers. + Configures the main shader path + Name of this controllable object, used to refer to the object in .kf files. + + Extra data object index. (The first in a chain) + The number of Extra Data objects referenced through the list. + List of extra data indices. + Controller object index. (The first in a chain) + + + + This is the most common collision object found in NIF files. It acts as a real object that + is visible and possibly (if the body allows for it) interactive. The node itself + is simple, it only has three properties. + For this type of collision object, bhkRigidBody or bhkRigidBodyT is generally used. + Index of the AV object referring to this collision object. + + + + Collision box. + + + Use Alternate Bounding Volume. + + + + + bhkNiCollisionObject flags. + 0x100 and 0x200 are only for bhkBlendCollisionObject + + + + Abstract base class to merge NiCollisionObject with Bethesda Havok. + + OB-FO3: Add 0x28 (SET_LOCAL | USE_VEL) for ANIM_STATIC layer objects. + Post-FO3: Always add 0x80 (SYNC_ON_UPDATE). + + + + + + + + + + + + + + Primary Bethesda Havok object. + + + + Bethesda Havok object used in skeletons. + + + + + + + + Bethesda Havok object for phantoms such as bhkAabbPhantom. + + + + Bethesda Havok object for shape phantoms such as bhkSimpleShapePhantom. + + + + Abstract audio-visual base class from which all of Gamebryo's scene graph objects inherit. + + Basic flags for AV objects. For Bethesda streams above 26 only. + ALL: FO4 lacks the 0x80000 flag always. Skyrim lacks it sometimes. + BSTreeNode: 0x8080E (pre-FO4), 0x400E (FO4) + BSLeafAnimNode: 0x808000E (pre-FO4), 0x500E (FO4) + BSDamageStage, BSBlastNode: 0x8000F (pre-FO4), 0x2000000F (FO4) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Basic flags for AV objects. + The translation vector. + The rotation part of the transformation matrix. + Scaling part (only uniform scaling is supported). + Unknown function. Always seems to be (0, 0, 0) + + All rendering properties attached to this object. + + + + + + + + + Abstract base class for dynamic effects such as NiLights or projected texture effects. + If true, then the dynamic effect is applied to affected nodes during rendering. + + If a node appears in this list, then its entire subtree will be affected by the effect. + As of 4.0 the pointer hash is no longer stored alongside each NiObject on disk, yet this node list still refers to the pointer hashes. Cannot leave the type as Ptr because the link will be invalid. + + If a node appears in this list, then its entire subtree will be affected by the effect. + + + + Abstract base class that represents light sources in a scene graph. + For Bethesda Stream 130 (FO4), NiLight now directly inherits from NiAVObject. + Scales the overall brightness of all light components. + + + + + + + Abstract base class representing all rendering properties. Subclasses are attached to NiAVObjects to control their rendering. + + + + Unknown + + + + + The set order for each derived class of NiPSysModifier. + Note: For Skyrim, BSPSysStripUpdateModifier is 8000 and for FO3 it is 2500. + + + + Abstract base class for all particle system modifiers. + Used to locate the modifier. + + Modifier's priority in the particle modifier chain. + + + + + + + + + + + + + + + + + + + + + + + + + + + + NiParticleSystem parent of this modifier. + Whether or not the modifier is active. + + + + Abstract base class for all particle system emitters. + Speed / Inertia of particle movement. + Adds an amount of randomness to Speed. + Declination / First axis. + Declination randomness / First axis. + Planar Angle / Second axis. + Planar Angle randomness / Second axis . + Defines color of a birthed particle. + Size of a birthed particle. + Particle Radius randomness. + Duration until a particle dies. + Adds randomness to Life Span. + + + + Abstract base class for particle emitters that emit particles from a volume. + Node parent of this modifier? + + + + Abstract base class that provides the base timing and update functionality for all the Gamebryo animation controllers. + Index of the next controller. + + Frequency (is usually 1.0). + Phase (usually 0.0). + Controller start time. + Controller stop time. + Controller target (object index of the first controllable ancestor of this object). + + + + + + Abstract base class for all NiTimeController objects using NiInterpolator objects to animate their target objects. + + + + + DEPRECATED (20.6) + The number of target pointers that follow. + NiNode Targets to be controlled. + + + + DEPRECATED (20.5), replaced by NiMorphMeshModifier. + Time controller for geometry morphing. + + Geometry morphing data index. + + + + + + + + + + Unknown! Used by Daoc->'healing.nif'. + + + + Unknown! Used by Daoc. + This controller's data. + + + + Uses a single NiInterpolator to animate its target value. + + + + + DEPRECATED (10.2), RENAMED (10.2) to NiTransformController + A time controller object for animation key frames. + + + + + NiTransformController replaces NiKeyframeController. + + + + A particle system modifier controller. + NiInterpController::GetCtlrID() string format: + '%s' + Where %s = Value of "Modifier Name" + Used to find the modifier pointer. + + + + Particle system emitter controller. + NiInterpController::GetInterpolatorID() string format: + ['BirthRate', 'EmitterActive'] (for "Interpolator" and "Visibility Interpolator" respectively) + + + + + + A particle system modifier controller that animates a boolean value for particles. + + + + A particle system modifier controller that animates active/inactive state for particles. + + + + + A particle system modifier controller that animates a floating point value for particles. + + + + + Animates the declination value on an NiPSysEmitter object. + + + + Animates the declination variation value on an NiPSysEmitter object. + + + + Animates the size value on an NiPSysEmitter object. + + + + Animates the lifespan value on an NiPSysEmitter object. + + + + Animates the speed value on an NiPSysEmitter object. + + + + Animates the strength value of an NiPSysGravityModifier. + + + + + Abstract base class for all NiInterpControllers that use an NiInterpolator to animate their target float value. + + + + Changes the image a Map (TexDesc) will use. Uses a float interpolator to animate the texture index. + Often used for performing flipbook animation. + Target texture slot (0=base, 4=glow). + + + Time between two flips. + delta = (start_time - stop_time) / sources.num_indices + + + The texture sources. + The image sources + + + + Animates the alpha value of a property using an interpolator. + + + + + Used to animate a single member of an NiTextureTransform. + NiInterpController::GetCtlrID() string formats: + ['%1-%2-TT_TRANSLATE_U', '%1-%2-TT_TRANSLATE_V', '%1-%2-TT_ROTATE', '%1-%2-TT_SCALE_U', '%1-%2-TT_SCALE_V'] + (Depending on "Operation" enumeration, %1 = Value of "Shader Map", %2 = Value of "Texture Slot") + Is the target map a shader map? + The target texture slot. + Controls which aspect of the texture transform to modify. + + + + + Animates the dimmer value of an NiLight. + + + + Abstract base class for all NiInterpControllers that use a NiInterpolator to animate their target boolean value. + + + + Animates the visibility of an NiAVObject. + + + + + Abstract base class for all NiInterpControllers that use an NiInterpolator to animate their target NiPoint3 value. + + + + Time controller for material color. Flags are used for color selection in versions below 10.1.0.0. + Bits 4-5: Target Color (00 = Ambient, 01 = Diffuse, 10 = Specular, 11 = Emissive) + NiInterpController::GetCtlrID() string formats: + ['AMB', 'DIFF', 'SPEC', 'SELF_ILLUM'] (Depending on "Target Color") + Selects which color to control. + + + + + Animates the ambient, diffuse and specular colors of an NiLight. + NiInterpController::GetCtlrID() string formats: + ['Diffuse', 'Ambient'] (Depending on "Target Color") + + + + + + + Abstract base class for all extra data controllers. + NiInterpController::GetCtlrID() string format: + '%s' + Where %s = Value of "Extra Data Name" + + + + + Animates an NiColorExtraData object attached to an NiAVObject. + + + + Animates an NiFloatExtraData object attached to an NiAVObject. + NiInterpController::GetCtlrID() string format is same as parent. + Number of extra bytes. + + + + + + + Animates an NiFloatsExtraData object attached to an NiAVObject. + NiInterpController::GetCtlrID() string format: + '%s[%d]' + Where %s = Value of "Extra Data Name", %d = Value of "Floats Extra Data Index" + + + + + + Animates an NiFloatsExtraData object attached to an NiAVObject. + NiInterpController::GetCtlrID() string format: + '%s[%d]' + Where %s = Value of "Extra Data Name", %d = Value of "Floats Extra Data Index" + + + + + DEPRECATED (20.5), Replaced by NiSkinningLODController. + Level of detail controller for bones. Priority is arranged from low to high. + + Number of LODs. + Number of node arrays. + A list of node sets (each set a sequence of bones). + Number of shape groups. + List of shape groups. + The size of the second list of shape groups. + Group of NiTriShape indices. + + + + A simple LOD controller for bones. + + + + Shader. + The shader name. + Extra data associated with the shader. A value of -1 means the shader is the default implementation. + + The name of the material. + Extra data associated with the material. A value of -1 means the material is the default implementation. + The index of the currently active material. + Cyanide extension (Blood Bowl). + + Whether the materials for this object always needs to be updated before rendering with them. + + + + Describes a visible scene element with vertices like a mesh, a particle system, lines, etc. + Bethesda 20.2.0.7 NIFs: NiGeometry was changed to BSGeometry. + Most new blocks (e.g. BSTriShape) do not refer to NiGeometry except NiParticleSystem was changed to use BSGeometry. + This causes massive inheritance problems so the rows below are doubled up to exclude NiParticleSystem for Bethesda Stream 100+ + and to add data exclusive to BSGeometry. + + + + Data index (NiTriShapeData/NiTriStripData). + Data index (NiTriShapeData/NiTriStripData). + + + + + + + + + + Describes a mesh, built from triangles. + + + + Mesh data: vertices, vertex normals, etc. + Bethesda 20.2.0.7 NIFs: NiParticlesData no longer inherits from NiGeometryData and inherits NiObject directly. + "Num Vertices" is renamed to "BS Max Vertices" for Bethesda 20.2 because Vertices, Normals, Tangents, Colors, and UV arrays + do not have length for NiPSysData regardless of "Num" or booleans. + + Always zero. + Number of vertices. + Number of vertices. + Bethesda uses this for max number of particles in NiPSysData. + Used with NiCollision objects when OBB or TRI is set. + + Is the vertex array present? (Always non-zero.) + The mesh vertices. + + + + Do we have lighting normals? These are essential for proper lighting: if not present, the model will only be influenced by ambient light. + The lighting normals. + Tangent vectors. + Bitangent vectors. + + + + + Do we have vertex colors? These are usually used to fine-tune the lighting of the model. + + Note: how vertex colors influence the model can be controlled by having a NiVertexColorProperty object as a property child of the root node. If this property object is not present, the vertex colors fine-tune lighting. + + Note 2: set to either 0 or 0xFFFFFFFF for NifTexture compatibility. + + The vertex colors. + The lower 6 bits of this field represent the number of UV texture sets. The rest is unused. + + Do we have UV coordinates? + + Note: for compatibility with NifTexture, set this value to either 0x00000000 or 0xFFFFFFFF. + + The UV texture coordinates. They follow the OpenGL standard: some programs may require you to flip the second coordinate. + Consistency Flags + + + + + + + + Describes a mesh, built from triangles. + Number of triangles. + + + + Unknown. Is apparently only used in skeleton.nif files. + Seems to be always zero. + + + + Bethesda-specific collision bounding box for skeletons. + Center of the bounding box. + Dimensions of the bounding box from center. + + + + Unknown. Marks furniture sitting positions? + + + + + + Particle modifier that adds a percentage of object space translation and rotation to particles born in world space. + Amount of blending? + + + + Particle emitter that uses a node, its children and subchildren to emit from. Emission will be evenly spread along points from nodes leading to their direct parents/children only. + + + + Particle Modifier that uses the wind value from the gamedata to alter the path of particles. + The amount of force wind will have on particles. + + + + Bethesda custom tri strips data block for bhkPackedNiTriStripsShape. + + + + + + + Compression on read may not be supported. Vertices may be packed in ushort that are not IEEE standard half-precision. + + + + + + + Transparency. Flags 0x00ED. + + Threshold for alpha testing + + + + + + Ambient light source. + + + + + + + Generic rotating particles data object. + Bethesda 20.2.0.7 NIFs: NiParticlesData no longer inherits from NiGeometryData and inherits NiObject directly. + The maximum number of particles (matches the number of vertices). + The particles' size. + Is the particle size array present? + The individual particle sizes. + The number of active particles at the time the system was saved. This is also the number of valid entries in the following arrays. + Is the particle size array present? + The individual particle sizes. + Is the particle rotation array present? + The individual particle rotations. + Are the angles of rotation present? + Angles of rotation + Are axes of rotation present? + Axes of rotation. + + + How many quads to use in BSPSysSubTexModifier for texture atlasing + 2,4,8,16,32,64 are potential values. If "Has" was no then this should be 256, which represents a 16x16 framed image, which is invalid + Defines UV offsets + Sets aspect ratio for Subtexture Offset UV quads + + + + + + + + Rotating particles data object. + Is the particle rotation array present? + The individual particle rotations. + + + + Particle system data object (with automatic normals?). + + + + Particle system data. + + + + + + + + + + Particle meshes data. + + + + + + + + + Binary extra data object. Used to store tangents and bitangents in Oblivion. + The binary data. + + + + Voxel extra data object. + + + + + Voxel data object. + + + + + + + + + + + + + + Blends bool values together. + The pose value. Invalid if using data. + + + + Blends float values together. + The pose value. Invalid if using data. + + + + Blends NiPoint3 values together. + The pose value. Invalid if using data. + + + + Blends NiQuatTransform values together. + + + + + Wrapper for boolean animation keys. + The boolean keys. + + + + Boolean extra data. + The boolean extra data value. + + + + Contains an NiBSplineBasis for use in interpolation of open, uniform B-Splines. + The number of control points of the B-spline (number of frames of animation plus degree of B-spline minus one). + + + + Uses B-Splines to animate a float value over time. + Base value when curve not defined. + Handle into the data. (USHRT_MAX for invalid handle.) + + + + NiBSplineFloatInterpolator plus the information required for using compact control points. + + + + + + Uses B-Splines to animate an NiPoint3 value over time. + Base value when curve not defined. + Handle into the data. (USHRT_MAX for invalid handle.) + + + + NiBSplinePoint3Interpolator plus the information required for using compact control points. + + + + + + Supports the animation of position, rotation, and scale using an NiQuatTransform. + The NiQuatTransform can be an unchanging pose or interpolated from B-Spline control point channels. + + Handle into the translation data. (USHRT_MAX for invalid handle.) + Handle into the rotation data. (USHRT_MAX for invalid handle.) + Handle into the scale data. (USHRT_MAX for invalid handle.) + + + + NiBSplineTransformInterpolator plus the information required for using compact control points. + + + + + + + + + + + + + Contains one or more sets of control points for use in interpolation of open, uniform B-Splines, stored as either float or compact. + + Float values representing the control data. + + Signed shorts representing the data from 0 to 1 (scaled by SHRT_MAX). + + + + Camera object. + Obsolete flags. + Frustrum left. + Frustrum right. + Frustrum top. + Frustrum bottom. + Frustrum near. + Frustrum far. + Determines whether perspective is used. Orthographic means no perspective. + Viewport left. + Viewport right. + Viewport top. + Viewport bottom. + Level of detail adjust. + + Deprecated. Array is always zero length on disk write. + Deprecated. Array is always zero length on disk write. + + + + + Wrapper for color animation keys. + The color keys. + + + + Extra data in the form of NiColorA (red, green, blue, alpha). + RGBA Color? + + + + Controls animation sequences on a specific branch of the scene graph. + Whether transformation accumulation is enabled. If accumulation is not enabled, the manager will treat all sequence data on the accumulation root as absolute data instead of relative delta values. + + + + + + + Root node in NetImmerse .kf files (until version 10.0). + The sequence name by which the animation system finds and manages this sequence. + The name of the NiAVObject serving as the accumulation root. This is where all accumulated translations, scales, and rotations are applied. + + + + + + + + + + + Root node in Gamebryo .kf files (version 10.0.1.0 and up). + The weight of a sequence describes how it blends with other sequences at the same priority. + + + + + + + + + The owner of this sequence. + The name of the NiAVObject serving as the accumulation root. This is where all accumulated translations, scales, and rotations are applied. + + + + + + + + + Abstract base class for indexing NiAVObject by name. + + + + NiAVObjectPalette implementation. Used to quickly look up objects by name. + Scene root of the object palette. + Number of objects. + The objects. + + + + Directional light source. + + + + NiDitherProperty allows the application to turn the dithering of interpolated colors and fog values on and off. + + + + + DEPRECATED (10.2), REMOVED (20.5). Replaced by NiTransformController and NiLookAtInterpolator. + The data for the controller. + + + + Wrapper for 1D (one-dimensional) floating point animation keys. + The keys. + + + + Extra float data. + The float data. + + + + Extra float array data. + Number of floats in the next field. + Float data. + + + + NiFogProperty allows the application to enable, disable and control the appearance of fog. + + Depth of the fog in normalized units. 1.0 = begins at near plane. 0.5 = begins halfway between the near and far planes. + The color of the fog. + + + + LEGACY (pre-10.1) particle modifier. Applies a gravitational field on the particles. + + The strength/force of this gravity. + The force field type. + The position of the mass point relative to the particle system. + The direction of the applied acceleration. + + + + + + Extra integer data. + The value of the extra data. + + + + Controls animation and collision. Integer holds flags: + Bit 0 : enable havok, bAnimated(Skyrim) + Bit 1 : enable collision, bHavok(Skyrim) + Bit 2 : is skeleton nif?, bRagdoll(Skyrim) + Bit 3 : enable animation, bComplex(Skyrim) + Bit 4 : FlameNodes present, bAddon(Skyrim) + Bit 5 : EditorMarkers present, bEditorMarker(Skyrim) + Bit 6 : bDynamic(Skyrim) + Bit 7 : bArticulated(Skyrim) + Bit 8 : bIKTarget(Skyrim)/needsTransformUpdates + Bit 9 : bExternalEmit(Skyrim) + Bit 10: bMagicShaderParticles(Skyrim) + Bit 11: bLights(Skyrim) + Bit 12: bBreakable(Skyrim) + Bit 13: bSearchedBreakable(Skyrim) .. Runtime only? + + + + Extra integer array data. + Number of integers. + Integers. + + + + An extended keyframe controller. + A link to more keyframe data. + + + + DEPRECATED (10.2), RENAMED (10.2) to NiTransformData. + Wrapper for transformation animation keys. + The number of quaternion rotation keys. If the rotation type is XYZ (type 4) then this *must* be set to 1, and in this case the actual number of keys is stored in the XYZ Rotations field. + The type of interpolation to use for rotation. Can also be 4 to indicate that separate X, Y, and Z values are used for the rotation instead of Quaternions. + The rotation keys if Quaternion rotation is used. + + Individual arrays of keys for rotating X, Y, and Z individually. + Translation keys. + Scale keys. + + + + + + + + + + DEPRECATED (10.2), REMOVED (20.5) + Replaced by NiTransformController and NiLookAtInterpolator. + + + + + + NiLookAtInterpolator rotates an object so that it always faces a target object. + + + + + + + + + + + Describes the surface properties of an object e.g. translucency, ambient color, diffuse color, emissive color, and specular color. + Property flags. + How much the material reflects ambient light. + How much the material reflects diffuse light. + How much light the material reflects in a specular manner. + How much light the material emits. + The material glossiness. + The material transparency (1=non-transparant). Refer to a NiAlphaProperty object in this material's parent NiTriShape object, when alpha is not 1. + + + + + DEPRECATED (20.5), replaced by NiMorphMeshModifier. + Geometry morphing data. + Number of morphing object. + Number of vertices. + This byte is always 1 in all official files. + The geometry morphing objects. + + + + Generic node object for grouping. + The number of child objects. + List of child node object indices. + The number of references to effect objects that follow. + List of node effects. ADynamicEffect? + + + + A NiNode used as a skeleton bone? + + + + Found in Munch's Oddysee + + + + Morrowind specific. + + + + Firaxis-specific UI widgets? + + + + + + Unknown. + + + + Unknown. + + + + Number of unknown links. + Unknown pointers to other buttons. Maybe other buttons in a group so they can be switch off if this one is switched on? + + + + These nodes will always be rotated to face the camera creating a billboard effect for any attached objects. + + In pre-10.1.0.0 the Flags field is used for BillboardMode. + Bit 0: hidden + Bits 1-2: collision mode + Bit 3: unknown (set in most official meshes) + Bits 5-6: billboard mode + + Collision modes: + 00 NONE + 01 USE_TRIANGLES + 10 USE_OBBS + 11 CONTINUE + + Billboard modes: + 00 ALWAYS_FACE_CAMERA + 01 ROTATE_ABOUT_UP + 10 RIGID_FACE_CAMERA + 11 ALWAYS_FACE_CENTER + The way the billboard will react to the camera. + + + + Bethesda-specific extension of Node with animation properties stored in the flags, often 42? + + + + Unknown. + + + + Flags for NiSwitchNode. + + + + + + Represents groups of multiple scenegraph subtrees, only one of which (the "active child") is drawn at any given time. + + + + + + Level of detail selector. Links to different levels of detail of the same model, used to switch a geometry at a specified distance. + + + + + + + + NiPalette objects represent mappings from 8-bit indices to 24-bit RGB or 32-bit RGBA colors. + Not boolean but used as one, always 8-bit. + The number of palette entries. Always 256 but can also be 16. + The color palette. + The color palette. + + + + LEGACY (pre-10.1) particle modifier. + + + + + + + The position of the mass point relative to the particle system? + The direction of the applied acceleration? + + + + LEGACY (pre-10.1) particle modifier. + + + + + LEGACY (pre-10.1) particle modifier. + The time from the beginning of the particle lifetime during which the particle grows. + The time from the end of the particle lifetime during which the particle fades. + + + + LEGACY (pre-10.1) particle modifier. + + + + + + LEGACY (pre-10.1) particle modifier. + + + + + + + Generic particle system node. + + + + LEGACY (pre-10.1). NiParticles which do not house normals and generate them at runtime. + + + + LEGACY (pre-10.1). Particle meshes. + + + + LEGACY (pre-10.1). Particle meshes data. + + + + + A particle system. + Contains members to mimic inheritance shifts for Bethesda 20.2, where NiParticles switched to inheriting BSGeometry. + Until inheritance shifts are supported, the members are on NiParticleSystem instead of NiParticles for module reasons. + + + + + + + + If true, Particles are birthed into world space. If false, Particles are birthed into object space. + The number of modifier references. + The list of particle modifiers. + + + + Particle system. + + + + + + + + + A generic particle system time controller object. + Particle speed in old files + Particle speed + Particle random speed modifier + + vertical emit direction [radians] + 0.0 : up + 1.6 : horizontal + 3.1416 : down + + emitter's vertical opening angle [radians] + horizontal emit direction + emitter's horizontal opening angle + + + Particle size + Particle emit start time + Particle emit stop time + + Particle emission rate in old files + Particle emission rate (particles per second) + Particle lifetime + Particle lifetime random modifier + + + + The object which acts as the basis for the particle emitter. + + + + + + Particle velocity + + The particle's age. + + Timestamp of the last update. + Unknown short + Particle/vertex index matches array index + + Size of the following array. (Maximum number of simultaneous active particles) + Number of valid entries in the following array. (Number of active particles at the time the system was saved) + + + Link to some optional particle modifiers (NiGravity, NiParticleGrowFade, NiParticleBomb, ...) + + + + + + + + + A particle system controller, used by BS in conjunction with NiBSParticleNode. + + + + DEPRECATED (10.2), REMOVED (20.5). Replaced by NiTransformController and NiPathInterpolator. + Time controller for a path. + + -1 = Negative, 1 = Positive + Max angle in radians. + + 0, 1, or 2 representing X, Y, or Z. + + + + + + Component Type + Data Storage Convention + Bits per component + + + + + NiPixelFormat is not the parent to NiPixelData/NiPersistentSrcTextureRendererData, + but actually a member class loaded at the top of each. The two classes are not related. + However, faking this inheritance is useful for several things. + The format of the pixels in this internally stored image. + + 0x000000ff (for 24bpp and 32bpp) or 0x00000000 (for 8bpp) + 0x0000ff00 (for 24bpp and 32bpp) or 0x00000000 (for 8bpp) + 0x00ff0000 (for 24bpp and 32bpp) or 0x00000000 (for 8bpp) + 0xff000000 (for 32bpp) or 0x00000000 (for 24bpp and 8bpp) + Bits per pixel, 0 (Compressed), 8, 24 or 32. + + [96,8,130,0,0,65,0,0] if 24 bits per pixel + [129,8,130,32,0,65,12,0] if 32 bits per pixel + [34,0,0,0,0,0,0,0] if 8 bits per pixel + [X,0,0,0,0,0,0,0] if 0 (Compressed) bits per pixel where X = PixelFormat + + Seems to always be zero. + Bits per pixel, 0 (Compressed), 8, 24 or 32. + + + + + + Channel Data + + + + + + + + + + + + + + + + + A texture. + + + + + + + + + + + + + + + + + + + LEGACY (pre-10.1) particle modifier. + + + + + + + + + + A point light. + + + + + + + Wrapper for position animation keys. + + + + + Wrapper for rotation animation keys. + + + + + + + + Particle modifier that controls and updates the age of particles in the system. + Should the particles spawn on death? + The spawner to use on death. + + + + Particle modifier that applies an explosive force to particles. + The object whose position and orientation are the basis of the force. + The local direction of the force. + How the bomb force will decrease with distance. + The acceleration the bomb will apply to particles. + + + + + + Particle modifier that creates and updates bound volumes. + Optimize by only computing the bound of (1 / Update Skip) of the total particles each frame. + + + + Particle emitter that uses points within a defined Box shape to emit from. + + + + + + + Particle modifier that adds a defined shape to act as a collision object for particles to interact with. + + + + + Particle modifier that adds keyframe data to modify color/alpha values of particles over time. + + + + + Particle emitter that uses points within a defined Cylinder shape to emit from. + + + + + + Particle modifier that applies a linear drag force to particles. + The object whose position and orientation are the basis of the force. + The local direction of the force. + The amount of drag to apply to particles. + The distance up to which particles are fully affected. + The distance at which particles cease to be affected. + + + + DEPRECATED (10.2). Particle system emitter controller data. + + + + + + + Particle modifier that applies a gravitational force to particles. + The object whose position and orientation are the basis of the force. + The local direction of the force. + How the force diminishes by distance. + The acceleration of the force. + The type of gravitational force. + Adds a degree of randomness. + Scale for turbulence. + + + + + Particle modifier that controls the time it takes to grow and shrink a particle. + The time taken to grow from 0 to their specified size. + Specifies the particle generation to which the grow effect should be applied. This is usually generation 0, so that newly created particles will grow. + The time taken to shrink from their specified size to 0. + Specifies the particle generation to which the shrink effect should be applied. This is usually the highest supported generation for the particle system. + A multiplier on the base particle scale. + + + + Particle emitter that uses points on a specified mesh to emit from. + + The meshes which are emitted from. + The method by which the initial particle velocity will be computed. + The manner in which particles are emitted from the Emitter Meshes. + The emission axis if VELOCITY_USE_DIRECTION. + + + + Particle modifier that updates mesh particles using the age of each particle. + + + + + + + + + + + + + + + + + + + + + + + Similar to a Flip Controller, this handles particle texture animation on a single texture atlas + Starting frame/position on atlas + Random chance to start on a different frame? + Ending frame/position on atlas + Frame to start looping + + + + + + + Particle Collider object which particles will interact with. + Width of the plane along the X Axis. + Height of the plane along the Y Axis. + Axis defining a plane, relative to Collider Object. + Axis defining a plane, relative to Collider Object. + + + + Particle Collider object which particles will interact with. + + + + + Particle modifier that updates the particle positions based on velocity and last update time. + + + + Particle modifier that calls reset on a target upon looping. + + + + Particle modifier that adds rotations to particles. + Initial Rotation Speed in radians per second. + Distributes rotation speed over the range [Speed - Variation, Speed + Variation]. + + + Initial Rotation Angle in radians. + Distributes rotation angle over the range [Angle - Variation, Angle + Variation]. + Randomly negate the initial rotation speed? + Assign a random axis to new particles? + Initial rotation axis. + + + + Particle modifier that spawns additional copies of a particle. + Number of allowed generations for spawning. Particles whose generations are >= will not be spawned. + The likelihood of a particular particle being spawned. Must be between 0.0 and 1.0. + The minimum particles to spawn for any given original particle. + The maximum particles to spawn for any given original particle. + How much the spawned particle speed can vary. + How much the spawned particle direction can vary. + Lifespan assigned to spawned particles. + The amount the lifespan can vary. + + + + + WorldShift-specific Particle Spawn modifier + + Default of FLT_MIN would indicate End Time but it seems more like Frequency/Tick Rate or Start Time. + + + + + Particle emitter that uses points within a sphere shape to emit from. + + + + + Particle system controller, tells the system to update its simulation. + + + + Base for all force field particle modifiers. + The object whose position and orientation are the basis of the field. + Magnitude of the force. + How the magnitude diminishes with distance from the Field Object. + Whether or not to use a distance from the Field Object after which there is no effect. + Maximum distance after which there is no effect. + + + + Particle system modifier, implements a vortex field force for particles. + Direction of the vortex field in Field Object's space. + + + + Particle system modifier, implements a gravity field force for particles. + Direction of the gravity field in Field Object's space. + + + + Particle system modifier, implements a drag field force for particles. + Whether or not the drag force applies only in the direction specified. + Direction in which the force applies if Use Direction is true. + + + + Particle system modifier, implements a turbulence field force for particles. + How many turbulence updates per second. + + + + + + + + + + + + + + + + + Particle system controller for force field magnitude. + + + + Particle system controller for force field attenuation. + + + + Particle system controller for force field maximum distance. + + + + Particle system controller for air field air friction. + + + + Particle system controller for air field inherit velocity. + + + + Particle system controller for air field spread. + + + + Particle system controller for emitter initial rotation speed. + + + + Particle system controller for emitter initial rotation speed variation. + + + + Particle system controller for emitter initial rotation angle. + + + + Particle system controller for emitter initial rotation angle variation. + + + + Particle system controller for emitter planar angle. + + + + Particle system controller for emitter planar angle variation. + + + + Particle system modifier, updates the particle velocity to simulate the effects of air movements like wind, fans, or wake. + Direction of the particle velocity + How quickly particles will accelerate to the magnitude of the air field. + How much of the air field velocity will be added to the particle velocity. + + + + The angle of the air field cone if Enable Spread is true. + + + + Guild 2-Specific node + + + + + + + + + + + Unknown controller + + + + Particle system modifier, updates the particle velocity to simulate the effects of point gravity. + If zero, no attenuation. + + + + Abstract class used for different types of LOD selections. + + + + NiRangeLODData controls switching LOD levels based on Z depth from the camera to the NiLODNode. + + + + + + + NiScreenLODData controls switching LOD levels based on proportion of the screen that a bound would include. + + + + + + + + Unknown. + + + + DEPRECATED (pre-10.1), REMOVED (20.3). + Keyframe animation root node, in .kf files. + + + + Determines whether flat shading or smooth shading is used on a shape. + + + + + Skinning data. + Offset of the skin from this bone in bind position. + Number of bones. + This optionally links a NiSkinPartition for hardware-acceleration information. + Enables Vertex Weights for this NiSkinData. + Contains offset data for each node that this skin is influenced by. + + + + Skinning instance. + Skinning data reference. + Refers to a NiSkinPartition objects, which partitions the mesh such that every vertex is only influenced by a limited number of bones. + Armature root node. + The number of node bones referenced as influences. + List of all armature bones. + + + + Old version of skinning instance. + The number of node bones referenced as influences. + The number of vertex weights stored for each bone. + List of all armature bones. + Contains skin weight data for each node that this skin is influenced by. + + + + Skinning data, optimized for hardware skinning. The mesh is partitioned in submeshes such that each vertex of a submesh is influenced only by a limited and fixed number of bones. + + + + + + + + + + A texture. + + + + NiTexture::FormatPrefs. These preferences are a request to the renderer to use a format the most closely matches the settings and may be ignored. + Requests the way the image will be stored. + Requests if mipmaps are used or not. + Requests no alpha, 1-bit alpha, or + + + + Describes texture source and properties. + Is the texture external? + + The external texture file name. + The original source filename of the image embedded by the referred NiPixelData object. + + NiPixelData or NiPersistentSrcTextureRendererData + NiPixelData or NiPersistentSrcTextureRendererData + A set of preferences for the texture format. They are a request only and the renderer may ignore them. + If set, then the application cannot assume that any dynamic changes to the pixel data will show in the rendered image. + A hint to the renderer that the texture can be loaded directly from a texture file into a renderer-specific resource, bypassing the NiPixelData object. + Pixel Data is NiPersistentSrcTextureRendererData instead of NiPixelData. + + + + Gives specularity to a shape. Flags 0x0001. + + + + + LEGACY (pre-10.1) particle modifier. + + + + + + A spot. + + + Describes the distribution of light. + + + + Allows control of stencil testing. + Property flags. + Enables or disables the stencil test. + Selects the compare mode function. + + A bit mask. The default is 0xffffffff. + + + + Used to enabled double sided faces. Default is 3 (DRAW_BOTH). + + + A bit mask. The default is 0xffffffff. + + + + Extra data in the form of text. + Used in various official or user-defined ways, e.g. preventing optimization on objects ("NiOptimizeKeep", "sgoKeep"). + The string. + + + + List of 0x00-seperated strings, which are names of controlled objects and controller types. Used in .kf files in conjunction with NiControllerSequence. + A bunch of 0x00 seperated strings. + + + + Extra data in the form of a list of strings. + Number of strings. + The strings. + + + + Extra data that holds an array of NiTextKey objects for use in animation sequences. + The number of text keys that follow. + List of textual notes and at which time they take effect. Used for designating the start and stop of animations and the triggering of sounds. + + + + Represents an effect that uses projected textures such as projected lights (gobos), environment maps, and fog maps. + Model projection matrix. Always identity? + Model projection translation. Always (0,0,0)? + Texture Filtering mode. + + Texture Clamp mode. + The type of effect that the texture is used for. + The method that will be used to generate UV coordinates for the texture effect. + Image index. + Source texture index. + Determines whether a clipping plane is used. Always 8-bit. + + + + + + + + LEGACY (pre-10.1) + + Either 210 or 194. + + + + + + LEGACY (pre-10.1) + 0 if the texture is internal to the NIF file. + The filepath to the texture. + Link to the internally stored image data. + + + + + + LEGACY (pre-10.1) + + Property flags. + Link to the texture image. + + + + + Describes how a fragment shader should be configured for a given piece of geometry. + Property flags. + Property flags. + Determines how the texture will be applied. Seems to have special functions in Oblivion. + Number of textures. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Wrapper for transformation animation keys. + + + + A shape node that refers to singular triangle data. + + + + Holds mesh data using a list of singular triangles. + Num Triangles times 3. + Do we have triangle data? + Triangle data. + Triangle face data. + Number of shared normals groups. + The shared normals. + + + + A shape node that refers to data organized into strips of triangles + + + + Holds mesh data using strips of triangles. + + The number of points in each triangle strip. + Do we have strip point data? + The points in the Triangle strips. Size is the sum of all entries in Strip Lengths. + The points in the Triangle strips. Size is the sum of all entries in Strip Lengths. + + + + Unknown + + + The number of child objects. + List of child node object indices. + + + + + + Holds mesh data using a list of singular triangles. + + + + LEGACY (pre-10.1) + Sub data of NiBezierMesh + + + + + + + + + + + + + LEGACY (pre-10.1) + Unknown + + + + + + + + + + + + + + + A shape node that holds continuous level of detail information. + Seems to be specific to Freedom Force. + Found in: Freedom Force, Spellbinder + + + + Holds mesh data for continuous level of detail shapes. + Presumably a progressive mesh with triangles specified by edge splits. + Found in: Freedom Force, Spellbinder + + + + + + + + + + + + + A copy of NiSkinInstance for use with NiClod meshes. + Found in: Freedom Force, Spellbinder + + + + DEPRECATED (pre-10.1), REMOVED (20.3). + Time controller for texture coordinates. + + Texture coordinate controller data index. + + + + DEPRECATED (pre-10.1), REMOVED (20.3) + Texture coordinate data. + + Four UV data groups. Appear to be U translation, V translation, U scaling/tiling, V scaling/tiling. + + + + + DEPRECATED (20.5). + Extra data in the form of a vector (as x, y, z, w components). + The vector data. + + + + Property of vertex colors. This object is referred to by the root object of the NIF file whenever some NiTriShapeData object has vertex colors with non-default settings; if not present, vertex colors have vertex_mode=2 and lighting_mode=1. + + In Flags from 20.1.0.3 on. + In Flags from 20.1.0.3 on. + + + + DEPRECATED (10.x), REMOVED (?) + Not used in skinning. + Unsure of use - perhaps for morphing animation or gravity. + Number of vertices. + The vertex weights. + + + + DEPRECATED (10.2), REMOVED (?), Replaced by NiBoolData. + Visibility data for a controller. + + + + + + Allows applications to switch between drawing solid geometry or wireframe outlines. + + + + + Allows applications to set the test and write modes of the renderer's Z-buffer and to set the comparison function used for the Z-buffer test. + + + Z-Test function. In Flags from 20.1.0.3 on. + + + + + Morrowind-specific node for collision mesh. + + + + LEGACY (pre-10.1) + Raw image data. + Image width + Image height + The format of the raw image data. + Image pixel data. + Image pixel data. + + + + + + Used to turn sorting off for individual subtrees in a scene. Useful if objects must be drawn in a fixed order. + Sorting + + + + + Represents cube maps that are created from either a set of six image files, six blocks of pixel data, or a single pixel data with six faces. + + + + + + Object which manages a NxScene object and the Gamebryo objects that interact with it. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Object which caches the properties of NxScene, stored as a snapshot in a NiPhysXScene. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A PhysX prop which holds information about PhysX actors in a Gamebryo scene + + + + + + + + + + + + + + For serialization of PhysX objects and to attach them to the scene. + + + + + + + + + + + + + + + For serializing NxActor objects. + + + + + + + + + + + + + + + + + + + + + + + + + + For serializing NxBodyDesc objects. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A PhysX Joint abstract base class. + + + + + + + + + + + + + + + A 6DOF (6 degrees of freedom) joint. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + For serializing NxShapeDesc objects + + + + + + + + + + + + + + + + + + + + Holds mesh data for streaming. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + For serializing NxMaterialDesc objects. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + For serializing NxClothDesc objects. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A destination is a link between a PhysX actor and a Gamebryo object being driven by the physics. + + + + + + Base for destinations that set a rigid body state. + + + + Connects PhysX rigid body actors to a scene node. + + + + + A source is a link between a Gamebryo object and a PhysX actor. + + + + + + Sets state of a rigid body PhysX actor. + + + + + Sets state of kinematic PhysX actor. + + + + Sends Gamebryo scene state to a PhysX dynamic actor. + + + + Wireframe geometry. + + + + Wireframe geometry data. + Is vertex connected to other (next?) vertex? + + + + Two dimensional screen elements. + + Offset in vertex array. + + Offset in indices array. + + + + DEPRECATED (20.5), functionality included in NiMeshScreenElements. + Two dimensional screen elements. + + + + + + + + + + + + + DEPRECATED (20.5), replaced by NiMeshScreenElements. + Two dimensional screen elements. + + + + NiRoomGroup represents a set of connected rooms i.e. a game level. + Object that represents the room group as seen from the outside. + + + + + + + + + + NiRoom objects represent cells in a cell-portal culling system. + + + + + The portals which see into the room. + + The portals which see out of the room. + + All geometry associated with the room. Seems to be Ref for legacy. + + + + NiPortal objects are grouping nodes that support aggressive visibility culling. + They represent flat polygonal regions through which a part of a scene graph can be viewed. + + Unused in 20.x, possibly also 10.x. + + + Root of the scenegraph which is to be seen through this portal. + + + + Bethesda-specific fade node. + + + + FO3 Shader Type + + + + + + + + + + + + + Shader Property Flags + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Shader Property Flags 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bethesda-specific property. + + + + Scales the intensity of the environment/cube map. + + + + Bethesda-specific property. + How to handle texture borders. + + + + Bethesda-specific property. + The texture glow map. + At this cosine of angle falloff will be equal to Falloff Start Opacity + At this cosine of angle falloff will be equal to Falloff Stop Opacity + Alpha falloff multiplier at start angle + Alpha falloff multiplier at end angle + + + + Bethesda-specific property. + Texture Set + The amount of distortion. **Not based on physically accurate refractive index** (0=none) (0-1) + Rate of texture movement for refraction shader. + The number of passes the parallax shader can apply. + The strength of the parallax. + + Glow color and alpha + + + + This controller is used to animate float variables in BSEffectShaderProperty. + Which float variable in BSEffectShaderProperty to animate. + + + + This controller is used to animate colors in BSEffectShaderProperty. + Which color in BSEffectShaderProperty to animate. + + + + This controller is used to animate float variables in BSLightingShaderProperty. + Which float variable in BSLightingShaderProperty to animate. + + + + This controller is used to animate float variables in BSLightingShaderProperty. + NOTE: FO4 CK reports this block as unsupported. + NOTE: FO4 CK reports this as unsupported. Which integral variable in BSLightingShaderProperty to animate. + + + + This controller is used to animate colors in BSLightingShaderProperty. + Which color in BSLightingShaderProperty to animate. + + + + + + Skyrim, Paired with dummy TriShapes, this controller generates lightning shapes for special effects. + First interpolator controls Generation. + References generation interpolator. + References interpolator for Mutation of strips + References subdivision interpolator. + References branches interpolator. + References branches variation interpolator. + References length interpolator. + References length variation interpolator. + References width interpolator. + References interpolator for amplitude control. 0=straight, 50=wide + + + + How far lightning will stretch to. + How far lightning variation will stretch to. + How wide the bolt will be. + Influences forking behavior with a multiplier. + + + + + Reference to a shader property. + + + + Bethesda-specific Texture Set. + + Textures. + 0: Diffuse + 1: Normal/Gloss + 2: Glow(SLSF2_Glow_Map)/Skin/Hair/Rim light(SLSF2_Rim_Lighting) + 3: Height/Parallax + 4: Environment + 5: Environment Mask + 6: Subsurface for Multilayer Parallax + 7: Back Lighting Map (SLSF2_Back_Lighting) + + + + + Bethesda-specific property. Found in Fallout3 + + + + Sets what sky function this object fulfills in BSSkyShaderProperty or SkyShaderProperty. + + + + + + + + + Bethesda-specific property. Found in Fallout3 + The texture. + Sky Object Type + + + + Bethesda-specific property. + Texture file name + + + + Bethesda-specific property. + + + + Bethesda-specific property. + + + + Bethesda-specific property. + Texture file name + + + + Bethesda-specific property. + + + + Bethesda-specific property. + + + + Bethesda-specific property. + + + + Skyrim Shader Property Flags 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skyrim Shader Property Flags 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Fallout 4 Shader Property Flags 1 + + + + Fallout 4 Shader Property Flags 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bethesda shader property for Skyrim and later. + Skyrim Shader Flags for setting render/shader options. + Skyrim Shader Flags for setting render/shader options. + Fallout 4 Shader Flags. Mostly overridden if "Name" is a path to a BGSM/BGEM file. + Fallout 4 Shader Flags. Mostly overridden if "Name" is a path to a BGSM/BGEM file. + + + + + + Offset UVs + Offset UV Scale to repeat tiling textures, see above. + Texture Set, can have override in an esm/esp + Glow color and alpha + Multiplied emissive colors + + How to handle texture borders. + The material opacity (1=opaque). Greater than 1.0 is used to affect alpha falloff i.e. staying opaque longer based on vertex alpha and alpha mask. + The amount of distortion. **Not based on physically accurate refractive index** (0=none) + The material specular power, or glossiness. + The base roughness, multiplied by the smoothness map. + Adds a colored highlight. + Brightness of specular highlight. (0=not visible) + Controls strength for envmap/backlight/rim/softlight lighting effect? + Controls strength for envmap/backlight/rim/softlight lighting effect? + + + + + + + + + + + + + Scales the intensity of the environment/cube map. + + + + + Tints the base texture. Overridden by game settings. + + Tints the base texture. Overridden by game settings. + + + How far from the surface the inner layer appears to be. + Depth of inner parallax layer effect. + Scales the inner parallax layer texture. + How strong the environment/cube map is. + CK lists "snow material" when used. + Eye cubemap scale + Offset to set center for left eye cubemap + Offset to set center for right eye cubemap + + + + Bethesda effect shader property for Skyrim and later. + + + + + + + + + Offset UVs + Offset UV Scale to repeat tiling textures + points to an external texture. + + How to handle texture borders. + + + + At this cosine of angle falloff will be equal to Falloff Start Opacity + At this cosine of angle falloff will be equal to Falloff Stop Opacity + Alpha falloff multiplier at start angle + Alpha falloff multiplier at end angle + + Base color + Multiplier for Base Color (RGB part) + + Points to an external texture, used as palette for SLSF1_Greyscale_To_PaletteColor/SLSF1_Greyscale_To_PaletteAlpha. + + + + + + + + + + + + + Skyrim water shader property flags + + + + Skyrim water shader property, different from "WaterShaderProperty" seen in Fallout. + + + + + + + Offset UVs. Seems to be unused, but it fits with the other Skyrim shader properties. + Offset UV Scale to repeat tiling textures, see above. + + + + + Skyrim Sky shader block. + + + + + + + Offset UVs. Seems to be unused, but it fits with the other Skyrim shader properties. + Offset UV Scale to repeat tiling textures, see above. + points to an external texture. + + + + + Bethesda-specific skin instance. + + + + + + Bethesda-specific extra data. Lists locations and normals on a mesh that are appropriate for decal placement. + + + + + + Bethesda-specific particle modifier. + + + + + + + + + + + + + Flags for BSValueNode. + + + + Bethesda-specific node. Found on fxFire effects + + + + + + + Bethesda-Specific (mesh?) Particle System. + + + + + Bethesda-Specific (mesh?) Particle System Data. + + + + + + + + + Bethesda-Specific (mesh?) Particle System Modifier. + + + + + + Bethesda-Specific time controller. + + + + + + Bethesda-Specific particle system. + + + + + + + + + Particle system (multi?) emitter controller. + + + + + + + Bethesda-Specific time controller. + + + + + Bethesda-Specific node. + + + + + + + Bethesda-Specific node. + + + + + + + Bethesda-Specific node. + + + + Bethesda-Specific node. + + + + + Bethesda-specific time controller. + + + + + A list of shapes. However, + - The sub shapes must ALL be convex: Sphere, Capsule, Cylinder, Convex Vertices, Convex Transform + - The radius of all shapes must be identical + - The number of sub shapes is restricted to 255 + - The number of vertices of each sub shape is restricted to 255 + + For this reason you most likely cannot combine Sphere Shapes, Capsule Shapes, and Convex Vertices Shapes, + as their Radius values differ in function. (Sphere/Capsule radius = physical size, CVS radius = padding/shell) + + Shapes collected in a bhkConvexListShape may not have the correct material noise. + + List of shapes. Max of 255. + The material of the shape. + + + + + If true, an AABB of the children's AABBs is used, which is faster but larger than building an AABB from each child. + A distance which is used for getClosestPoint(). If the object being tested is closer, the children are recursed. Otherwise it returns this value. + + + + Bethesda-specific class. + + + + + + + Bethesda-specific interpolator. + + + + + + + Anim note types. + + + + + + + Bethesda-specific object. + Type of this note. + Location in time. + + + + + + + Bethesda-specific object. + Number of BSAnimNote objects. + BSAnimNote objects. + + + + Bethesda custom bhkUnaryAction. Does not hold a link to the body like other bhkUnaryActions however. + + + + + + + + + Culling modes for multi bound nodes. + + + + + + + + + Bethesda-specific node. + + + + + + Bethesda-specific object. + + + + + Abstract base type for bounding data. + + + + Oriented bounding box. + Center of the box. + Size of the box along each axis. + Rotation of the bounding box. + + + + Bethesda-specific object. + + + + + + This is only defined because of recursion issues. + + + + + + + + Bethesda-specific. Describes groups of triangles either segmented in a grid (for LOD) or by body part for skinned FO4 meshes. + + Index = previous Index + previous Num Tris in Segment * 3 + The number of triangles belonging to this segment + + + + + + + Bethesda-specific AV object. + Number of segments in the square grid + Configuration of each segment + + + + Bethesda-specific object. + Position of the AABB's center + Extent of the AABB in all directions + + + + Type of data in this channel + Number of bytes per element of this channel + Total number of bytes of this channel (num vertices times num bytes per element) + Number of bytes per element in all channels together. Sum of num channel bytes per element over all block infos. + Unsure. The block in which this channel is stored? Usually there is only one block, and so this is zero. + Offset (in bytes) of this channel. Sum of all num channel bytes per element of all preceeding block infos. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No longer appears to occur in any vanilla files. Older versions of FNV had the block in nvdlc01vaultposter01.nif. + + + + Usually there is exactly one block. + + + + + Bethesda-specific extra data. + + + + + + Bethesda-specific time controller. + + + + Bethesda-Specific node. + + + + Bethesda extension of hkpBreakableConstraintData, a wrapper around hkpConstraintInstance. + The constraint can "break" i.e. stop applying the forces to each body to keep them constrained. + The wrapped constraint. + The larger the value, the harder to "break" the constraint. + No: Constraint stays active. Yes: Constraint gets removed when breaking threshold is exceeded. + + + + Bethesda extension of hkpReorientAction (or similar). Will try to reorient a body to stay facing a given direction. + + + + + + + + + + Found in Fallout 3 .psa files, extra ragdoll info for NPCs/creatures. (usually idleanims\deathposes.psa) + Defines different kill poses. The game selects the pose randomly and applies it to a skeleton immediately upon ragdolling. + Poses can be previewed in GECK Object Window-Actor Data-Ragdoll and selecting Pose Matching tab. + + + + + + + + Found in Fallout 3, more ragdoll info? (meshes\ragdollconstraint\*.rdt) + + + + + + Data for bhkRagdollTemplate + + + + + + + + + + + + A range of indices, which make up a region (such as a submesh). + + + + + + Sets how objects are to be cloned. + + + + + + + The data format of components. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Determines how a data stream is used? + + + + + + + + Determines how the data stream is accessed? + + + + + + + + + + + + + + The size in bytes of this data stream. + + Number of regions (such as submeshes). + The regions in the mesh. Regions can be used to mark off submeshes which are independent draw calls. + Number of components of the data (matches corresponding field in MeshData). + The format of each component in this data stream. + + + + + + + Type of data (POSITION, POSITION_BP, INDEX, NORMAL, NORMAL_BP, + TEXCOORD, BLENDINDICES, BLENDWEIGHT, BONE_PALETTE, COLOR, DISPLAYLIST, + MORPH_POSITION, BINORMAL_BP, TANGENT_BP). + + + An extra index of the data. For example, if there are 3 uv maps, + then the corresponding TEXCOORD data components would have indices + 0, 1, and 2, respectively. + + + + + Reference to a data stream object which holds the data used by this reference. + Sets whether this stream data is per-instance data for use in hardware instancing. + The number of submesh-to-region mappings that this data stream has. + A lookup table that maps submeshes to regions. + + Describes the semantic of each component. + + + + An object that can be rendered. + Per-material data. + + + + Describes the type of primitives stored in a mesh object. + + + + + + + + + + A sync point corresponds to a particular stage in per-frame processing. + + + + + + + + + + + + Base class for mesh modifiers. + + The sync points supported by this mesh modifier for SubmitTasks. + + The sync points supported by this mesh modifier for CompleteTasks. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + When non-zero, equal to the number of primitives. + When non-zero, equal to the number of primitives. + Some integer associated with each primitive. + + + The max value to appear in the Mapped Primitives array. + + + + The primitive type of the mesh, such as triangles or lines. + + The number of submeshes contained in this mesh. + Sets whether hardware instancing is being used. + The combined bounding volume of all submeshes. + + + + + + + + + + Manipulates a mesh with the semantic MORPHWEIGHTS using an NiMorphMeshModifier. + + + + + + + + + The element semantic. + Whether or not to normalize the data. + + + + Performs linear-weighted blending between a set of target data streams. + + FLAG_RELATIVETARGETS = 0x01 + FLAG_UPDATENORMALS = 0x02 + FLAG_NEEDSUPDATE = 0x04 + FLAG_ALWAYSUPDATE = 0x08 + FLAG_NEEDSCOMPLETION = 0x10 + FLAG_SKINNED = 0x20 + FLAG_SWSKINNED = 0x40 + + The number of morph targets. + The number of morphing data stream elements. + Semantics and normalization of the morphing data stream elements. + + + + + USE_SOFTWARE_SKINNING = 0x0001 + RECOMPUTE_BOUNDS = 0x0002 + + The root bone of the skeleton. + The transform that takes the root bone parent coordinate system into the skin coordinate system. + The number of bones referenced by this mesh modifier. + Pointers to the bone nodes that affect this skin. + The transforms that go from bind-pose space to bone space. + The bounds of the bones. Only stored if the RECOMPUTE_BOUNDS bit is set. + + + + An instance of a hardware-instanced mesh in a scene graph. + The instanced mesh this object represents. + + + + + Mesh modifier that provides per-frame instancing capabilities in Gamebryo. + + + + + + + + + + + + + + + + + Defines the levels of detail for a given character and dictates the character's current LOD. + + + + + + + + + + + + + + + + + + + Describes the various methods that may be used to specify the orientation of the particles. + + + + Represents a particle system. + + + + + + + + + + + + + + + + + + + + + + + + + + + Represents a particle system that uses mesh particles instead of sprite-based particles. + + + + + + + + + + A mesh modifier that uses particle system data to generate camera-facing quads. + + + + A mesh modifier that uses particle system data to generate aligned quads for each particle. + + + + + + + + + + + + + + + + + + + + + + + + The mesh modifier that performs all particle system simulation. + + + + + + Abstract base class for a single step in the particle system simulation process. It has no seralized data. + + + + + + + + + + + + Encapsulates a floodgate kernel that updates particle size, colors, and rotations. + + The particle size keys. + The loop behavior for the size keys. + + The particle color keys. + The loop behavior for the color keys. + + The particle rotation keys. + The loop behavior for the rotation keys. + The the amount of time over which a particle's size is ramped from 0.0 to 1.0 in seconds + The the amount of time over which a particle's size is ramped from 1.0 to 0.0 in seconds + Specifies the particle generation to which the grow effect should be applied. This is usually generation 0, so that newly created particles will grow. + Specifies the particle generation to which the shrink effect should be applied. This is usually the highest supported generation for the particle system, so that particles will shrink immediately before getting killed. + + + + + Encapsulates a floodgate kernel that simulates particle forces. + + The forces affecting the particle system. + + + + Encapsulates a floodgate kernel that simulates particle colliders. + + The colliders affecting the particle system. + + + + Encapsulates a floodgate kernel that updates mesh particle alignment and transforms. + + The particle rotation keys. + The loop behavior for the rotation keys. + + + + Encapsulates a floodgate kernel that updates particle positions and ages. As indicated by its name, this step should be attached last in the NiPSSimulator mesh modifier. + + + + Updates the bounding volume for an NiPSParticleSystem object. + Number of particle bounds to skip updating every frame. Higher = more updates each frame. + + + + + + This is used by the Floodgate kernel to determine which NiPSForceHelpers functions to call. + + + + Abstract base class for all particle forces. + + + The force type is set by each derived class and cannot be changed. + + + + + + + + + + + + + + + Abstract base class for all particle field forces. + + + + + + + + + Applies a linear drag force to particles. + + + + + + + + + Applies a gravitational force to particles. + + + + + + + + + + + Applies an explosive force to particles. + + + + + + + + + + Inside a field, updates particle velocity to simulate the effects of air movements. + + + + + + + + + + Inside a field, updates particle velocity to simulate the effects of directional gravity. + + + + + + + Inside a field, updates particle velocity to simulate the effects of drag. + + + + + + Inside a field, updates particle velocity to simulate the effects of point gravity. + + + + + + Inside a field, updates particle velocity to simulate the effects of turbulence. + + + + + Inside a field, updates particle velocity to simulate the effects of a vortex. + + + + + + + Abstract base class for all particle emitters. + + + + + + + + + + + + + + + + + + + + + + + + + Abstract base class for particle emitters that emit particles from a volume. + + + + + + A particle emitter that emits particles from a rectangular volume. + + + + + + + A particle emitter that emits particles from a spherical volume. + + + + + A particle emitter that emits particles from a cylindrical volume. + + + + + + A particle emitter that emits particles from a toroidal volume. + + + + + + Emits particles from one or more NiMesh objects. A random mesh emitter is selected for each particle emission. + + + + + + + + + + Emits particles from a curve. + + + + + + + + + + Abstract base class for all particle emitter time controllers. + + + + + Abstract base class for controllers that animate a floating point value on an NiPSEmitter object. + + + + Animates particle emission and birth rate. + + + + + Abstract base class for all particle force time controllers. + + + + + Abstract base class for controllers that animate a Boolean value on an NiPSForce object. + + + + Abstract base class for controllers that animate a floating point value on an NiPSForce object. + + + + Animates whether or not an NiPSForce object is active. + + + + Animates the strength value of an NiPSGravityForce object. + + + + Animates the attenuation value of an NiPSFieldForce object. + + + + Animates the magnitude value of an NiPSFieldForce object. + + + + Animates the max distance value of an NiPSFieldForce object. + + + + Animates the speed value on an NiPSEmitter object. + + + + Animates the size value on an NiPSEmitter object. + + + + Animates the declination value on an NiPSEmitter object. + + + + Animates the declination variation value on an NiPSEmitter object. + + + + Animates the planar angle value on an NiPSEmitter object. + + + + Animates the planar angle variation value on an NiPSEmitter object. + + + + Animates the rotation angle value on an NiPSEmitter object. + + + + Animates the rotation angle variation value on an NiPSEmitter object. + + + + Animates the rotation speed value on an NiPSEmitter object. + + + + Animates the rotation speed variation value on an NiPSEmitter object. + + + + Animates the lifespan value on an NiPSEmitter object. + + + + Calls ResetParticleSystem on an NiPSParticleSystem target upon looping. + + + + + + This is used by the Floodgate kernel to determine which NiPSColliderHelpers functions to call. + + + + Abstract base class for all particle colliders. + + + + + + + + + + A planar collider for particles. + + + + + + + + + A spherical collider for particles. + + + + + + Creates a new particle whose initial parameters are based on an existing particle. + + + + + + + + + + + + + + + + Implements Gamebryo particle systems that use PhysX actors for the particles + + + + + + + + + + + + + A PhysX prop which holds information about a PhysX particle system prop. + + + + + + An object which interfaces between the PhysX scene and the Gamebryo particle system. + + + + + Adds additional sync points to a NiPSSimulator mesh modifier. + + + + Used to set the post-simulation state of particles in a physics-enabled particle system. + + + + Used to push the results of the particle system update into the PhysX actors. + + + + + + The name of the animated NiAVObject. + The RTTI type of the NiProperty the controller is attached to, if applicable. + The RTTI type of the NiTimeController. + An ID that can uniquely identify the controller among others of the same type on the same NiObjectNET. + An ID that can uniquely identify the interpolator among others of the same type on the same NiObjectNET. + + Channel Indices are BASE/POS = 0, ROT = 1, SCALE = 2, FLAG = 3 + Channel Types are: + INVALID = 0, COLOR, BOOL, FLOAT, POINT3, ROT = 5 + Any channel may be | 0x40 which means POSED + The FLAG (3) channel flags affects the whole evaluator: + REFERENCED = 0x1, TRANSFORM = 0x2, ALWAYSUPDATE = 0x4, SHUTDOWN = 0x8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + For floating point as boolean, 0.0 indicates false and 1.0 indicates true. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Handle into the data. (USHRT_MAX for invalid handle.) + + + + + + + + + Handle into the data. (USHRT_MAX for invalid handle.) + + + + + + + + + Handle into the data. (USHRT_MAX for invalid handle.) + + + + + + + + + + Handle into the translation data. (USHRT_MAX for invalid handle.) + Handle into the rotation data. (USHRT_MAX for invalid handle.) + Handle into the scale data. (USHRT_MAX for invalid handle.) + + + + + + + + + + + + + + + + + + + + + + + -1 = Negative, 1 = Positive + Max angle in radians. + + 0, 1, or 2 representing X, Y, or Z. + + + + + + Root node in Gamebryo .kf files (20.5.0.1 and up). + For 20.5.0.0, "NiSequenceData" is an alias for "NiControllerSequence" and this is not handled in nifxml. + This was not found in any 20.5.0.0 KFs available and they instead use NiControllerSequence directly. + After 20.5.0.1, Controlled Blocks are no longer used and instead the sequences uses NiEvaluator. + + + + + + + + + + + The name of the NiAVObject serving as the accumulation root. This is where all accumulated translations, scales, and rotations are applied. + + + + + Flags for NiShadowGenerator. + Bit Patterns: + AUTO_CALC_NEARFAR = (AUTO_NEAR_DIST | AUTO_FAR_DIST) = 0xC0 + AUTO_CALC_FULL = (AUTO_NEAR_DIST | AUTO_FAR_DIST | AUTO_DIR_LIGHT_FRUSTUM_WIDTH | AUTO_DIR_LIGHT_FRUSTUM_POSITION) = 0x3C0 + + + + An NiShadowGenerator object is attached to an NiDynamicEffect object to inform the shadowing system that the effect produces shadows. + + + + + + + + + + + + + + + + Blood Bowl Specific + Used on things like hair/tails in conjunction with bones to animate them. + + + The number of node bones referenced as influences. + List of all armature bones. + The number of node bones referenced as influences. + List of all armature bones. + + + + Divinity 2 specific block + + + + + + + + + Compressed collision mesh. + Points to root node? + + A shell that is added around the shape. + + Scale + A shell that is added around the shape. + Scale + The collision mesh data. + + + + hkpWeldingUtility::WeldingType + + + + hkpCompressedMeshShape::MaterialType + + + + + + + + A compressed mesh shape for collision in Skyrim. + Number of bits in the shape-key reserved for a triangle index + Number of bits in the shape-key reserved for a triangle index and its winding + Mask used to get the triangle index and winding from a shape-key/ + Mask used to get the triangle index from a shape-key. + Quantization error. + + + + + Unused. + + Unused. + + Unused. + + Materials used by Chunks. Chunks refer to this table by index. + Number of hkpNamedMeshMaterial. Unused. + Number of chunk transformations + Transforms used by Chunks. Chunks refer to this table by index. + + Vertices paired with Big Tris (triangles that are too large for chunks) + + Triangles that are too large to fit in a chunk. + + + Number of hkpCompressedMeshShape::ConvexPiece. Unused. + + + + Orientation marker for Skyrim's inventory view. + How to show the nif in the player's inventory. + Typically attached to the root node of the nif tree. + If not present, then Skyrim will still show the nif in inventory, + using the default values. + Name should be 'INV' (without the quotes). + For rotations, a short of "4712" appears as "4.712" but "959" appears as "0.959" meshes\weapons\daedric\daedricbowskinned.nif + + + + Zoom factor. + + + + Unknown + Number of bone entries + Bone Entry + + + + Links a nif with a Havok Behavior .hkx animation file + Name of the hkx file. + Unknown, has to do with blending appended bones onto an actor. + + + + A controller that trails a bone behind an actor. + How long it takes to rotate about an actor back to rest position. + How the bone lags rotation + How far bone will tail an actor. + + + + A variation on NiTriShape, for visibility control over vertex groups. + + + + + + + Furniture Marker for actors + + + + Unknown, related to trees. + + + + Node for handling Trees, Switches branch configurations for variation? + + + + + + + + + + + Fallout 4 Tri Shape + + + + + + + + + + + + + + + + + + + + + Fallout 4 LOD Tri Shape + + + + + + + If Bone ID is 0xffffffff, this value refers to the Segment at the listed index. Otherwise this is the "Biped Object", which is like the body part types in Skyrim and earlier. + A hash of the bone name string. + Maximum of 8. + + + + + + + + > + + + + + Fallout 4 Sub-Index Tri Shape + + + + + + + + + + + + + Fallout 4 Physics System + + + + Fallout 4 Collision Object + + Note: The CK Preview scenegraph reports these bits incorrectly. + + + + + + + Fallout 4 Collision System + + + + + Fallout 4 Ragdoll System + + + + + Fallout 4 Extra Data + + + + Fallout 4 Cloth data + + + + + + + Fallout 4 Bone Transform + + + + + + + + Fallout 4 Skin Instance + + + + + + + + + + Fallout 4 Bone Data + + + + + + Fallout 4 Positional Data + + + + + + + + + + + + + + Fallout 4 Item Slot Parent + + + + + + Fallout 4 Item Slot Child + + + + + + + Fallout 4 Eye Center Data + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This is the data necessary to access the shared geometry in a PSG/CSG file. + BSCRC32 of the filename without the PSG/CSG extension. + Offset of the geometry data in the PSG/CSG file. + + + + Fallout 4 Packed Combined Geometry Data. + Geometry is baked into the file and given a list of transforms to position each copy. + + + + + + + + + + + Fallout 4 Packed Combined Shared Geometry Data. + Geometry is NOT baked into the file. It is instead a reference to the geometry via a CSG filename hash and data offset. + + + + + + + + + + + + + + + + + + + + + + + + + Large ref flag. + + + + + Distant Object flags. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Fallout 76 Collision Query Proxy Data + + + + diff --git a/lib/fsengine/bsa.cpp b/lib/fsengine/bsa.cpp index df5d8bd21..596959931 100644 --- a/lib/fsengine/bsa.cpp +++ b/lib/fsengine/bsa.cpp @@ -77,18 +77,14 @@ static bool BSAReadSizedString( QFile & bsa, QString & s ) return false; } -QByteArray gUncompress( const QByteArray & data, const int size ) +QByteArray gUncompress( const char * data, const int size ) { - if ( data.size() <= 4 ) { - qWarning( "gUncompress: Input data is truncated" ); - return QByteArray(); - } - QByteArray result; + result.reserve( size ); int ret; z_stream strm; - static const int CHUNK_SIZE = 1024; + static const int CHUNK_SIZE = 4096; char out[CHUNK_SIZE]; /* allocate inflate state */ @@ -96,7 +92,7 @@ QByteArray gUncompress( const QByteArray & data, const int size ) strm.zfree = Z_NULL; strm.opaque = Z_NULL; strm.avail_in = size; - strm.next_in = (Bytef*)(data.data()); + strm.next_in = (Bytef*)(data); ret = inflateInit2( &strm, 15 + 32 ); // gzip decoding Q_ASSERT( ret == Z_OK ); @@ -128,6 +124,16 @@ QByteArray gUncompress( const QByteArray & data, const int size ) return result; } +QByteArray gUncompress( const QByteArray & data, const int size ) +{ + if ( data.size() <= 4 ) { + qWarning( "gUncompress: Input data is truncated" ); + return QByteArray(); + } + + return gUncompress( data.data(), size ); +} + // see bsa.h BSA::BSA( const QString & filename ) : FSArchiveFile(), bsa( filename ), bsaInfo( QFileInfo(filename) ), status( "initialized" ) @@ -160,7 +166,7 @@ bool BSA::canOpen( const QString & fn ) if ( magic == F4_BSAHEADER_FILEID ) { if ( f.read( (char *) & version, sizeof( version ) ) != 4 ) return false; - return version == F4_BSAHEADER_VERSION; + return version == F4_BSAHEADER_VERSION || version == SF_BSAHEADER_VERSION2 || version == SF_BSAHEADER_VERSION3; } else if ( magic == OB_BSAHEADER_FILEID ) { if ( f.read( (char *)&version, sizeof( version ) ) != 4 ) return false; @@ -192,13 +198,22 @@ bool BSA::open() if ( magic == F4_BSAHEADER_FILEID ) { bsa.read( (char*)&version, sizeof( version ) ); - if ( version != F4_BSAHEADER_VERSION ) - throw QString( "file version" ); + //if ( version != F4_BSAHEADER_VERSION ) + // throw QString( "file version" ); F4BSAHeader header; if ( bsa.read( (char *)&header, sizeof( header ) ) != sizeof( header ) ) throw QString( "header size" ); + quint32 unk1 = 0; + quint32 unk2 = 0; + if ( version == SF_BSAHEADER_VERSION2 || version == SF_BSAHEADER_VERSION3 ) { + bsa.read((char*)&unk1, sizeof(quint32)); + bsa.read((char*)&unk2, sizeof(quint32)); + } + if ( version == SF_BSAHEADER_VERSION3 ) + bsa.read((char*)&version3flag, sizeof(quint32)); + numFiles = header.numFiles; auto offset = header.nameTableOffset; @@ -216,10 +231,14 @@ bool BSA::open() } } + // Two new ints for Starfield + quint32 OFFSET = (version == F4_BSAHEADER_VERSION) ? 8 : 16; + OFFSET = (version >= SF_BSAHEADER_VERSION3) ? 20 : OFFSET; + QString h = QString::fromLatin1( header.type, 4 ); if ( h == "GNRL" ) { // General BA2 Format - if ( bsa.seek( sizeof( header ) + 8 ) ) { + if ( bsa.seek( sizeof( header ) + OFFSET ) ) { for ( quint32 i = 0; i < numFiles; i++ ) { F4GeneralInfo finfo; bsa.read( (char*)&finfo, sizeof( F4GeneralInfo ) ); @@ -235,7 +254,7 @@ bool BSA::open() } } else if ( h == "DX10" ) { // Texture BA2 Format - if ( bsa.seek( sizeof( header ) + 8 ) ) { + if ( bsa.seek( sizeof( header ) + OFFSET ) ) { for ( quint32 i = 0; i < numFiles; i++ ) { F4Tex tex; bsa.read( (char*)&tex.header, 24 ); @@ -333,7 +352,7 @@ bool BSA::open() folderInfos << info; } - for ( const BSAFolderInfo folderInfo : folderInfos ) { + for ( const BSAFolderInfo& folderInfo : folderInfos ) { QString folderName; if ( ! BSAReadSizedString( bsa, folderName ) || folderName.isEmpty() ) { @@ -575,8 +594,27 @@ bool BSA::fileContents( const QString & fn, QByteArray & content ) ddsHeader.dwPitchOrLinearSize = file->tex.header.width * file->tex.header.height; // 8bpp break; - case DXGI_FORMAT_BC7_UNORM: + case DXGI_FORMAT_BC4_UNORM: case DXGI_FORMAT_BC1_UNORM_SRGB: + ddsHeader.ddspf.dwFlags = DDS_FOURCC; + ddsHeader.ddspf.dwFourCC = MAKEFOURCC( 'D', 'X', '1', '0' ); + ddsHeader.dwPitchOrLinearSize = file->tex.header.width * file->tex.header.height / 2; + + dx10 = true; + dx10Header.dxgiFormat = DXGI_FORMAT( file->tex.header.format ); + break; + case DXGI_FORMAT_R8G8B8A8_UNORM: + case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB: + ddsHeader.ddspf.dwFlags = DDS_FOURCC; + ddsHeader.ddspf.dwFourCC = MAKEFOURCC( 'D', 'X', '1', '0' ); + ddsHeader.dwPitchOrLinearSize = file->tex.header.width * file->tex.header.height * 4; + + dx10 = true; + dx10Header.dxgiFormat = DXGI_FORMAT( file->tex.header.format ); + break; + + case DXGI_FORMAT_BC7_UNORM: + case DXGI_FORMAT_BC5_SNORM: case DXGI_FORMAT_BC2_UNORM_SRGB: case DXGI_FORMAT_BC3_UNORM_SRGB: case DXGI_FORMAT_BC7_UNORM_SRGB: @@ -587,7 +625,6 @@ bool BSA::fileContents( const QString & fn, QByteArray & content ) dx10 = true; dx10Header.dxgiFormat = DXGI_FORMAT( file->tex.header.format ); break; - default: supported = false; break; @@ -620,7 +657,7 @@ bool BSA::fileContents( const QString & fn, QByteArray & content ) // Start at 1st chunk now for ( int i = 0; i < file->tex.chunks.count(); i++ ) { - F4TexChunk chunk = file->tex.chunks[i]; + const F4TexChunk & chunk = file->tex.chunks[i]; if ( bsa.seek( chunk.offset ) ) { QByteArray chunkData; @@ -723,6 +760,11 @@ const BSA::BSAFolder * BSA::getFolder( QString fn ) const return folders.value( fn ); } +const BSA::BSAFolder * BSA::getRootFolder() const +{ + return root; +} + // see bsa.h const BSA::BSAFile * BSA::getFile( QString fn ) const { @@ -873,7 +915,7 @@ bool BSAProxyModel::filterAcceptsRow( int sourceRow, const QModelIndex & sourceP if ( filetypes.count() ) { typeMatch = false; for ( auto f : filetypes ) { - typeMatch |= key1.endsWith( f ); + typeMatch |= key1.endsWith( f, Qt::CaseInsensitive ); } } diff --git a/lib/fsengine/bsa.h b/lib/fsengine/bsa.h index 16b4d8312..827b9fda8 100644 --- a/lib/fsengine/bsa.h +++ b/lib/fsengine/bsa.h @@ -58,6 +58,8 @@ using namespace std; #define F3_BSAHEADER_VERSION 0x68 //!< Version number of a Fallout 3 BSA #define SSE_BSAHEADER_VERSION 0x69 //!< Version number of a Skyrim SE BSA #define F4_BSAHEADER_VERSION 0x01 //!< Version number of a Fallout 4 BA2 +#define SF_BSAHEADER_VERSION2 0x02 //!< Version number of a Starfield BA2 +#define SF_BSAHEADER_VERSION3 0x03 //!< Version number of a Starfield BA2 /* Archive flags */ #define OB_BSAARCHIVE_PATHNAMES 0x0001 //!< Whether the BSA has names for paths @@ -327,6 +329,8 @@ class BSA final : public FSArchiveFile //! Gets the specified folder, or the root folder if not found const BSAFolder * getFolder( QString fn ) const; + //! Gets the root folder + const BSAFolder * getRootFolder() const; //! Gets the specified file, or null if not found const BSAFile * getFile( QString fn ) const; @@ -342,6 +346,8 @@ class BSA final : public FSArchiveFile quint32 version = 0; + quint32 version3flag; + //! Mutual exclusion handler QMutex bsaMutex; diff --git a/lib/fsengine/fsengine.cpp b/lib/fsengine/fsengine.cpp index e8d7514e7..245c9ae51 100644 --- a/lib/fsengine/fsengine.cpp +++ b/lib/fsengine/fsengine.cpp @@ -48,7 +48,7 @@ std::shared_ptr FSArchiveHandler::openArchive( const QString & if ( BSA::canOpen( fn ) ) { BSA * bsa = new BSA( fn ); - if ( bsa->open() ) { + if ( bsa && bsa->open() ) { //qDebug() << "BSA Open: " << fn; return std::shared_ptr( new FSArchiveHandler( bsa ) ); } diff --git a/lib/fsengine/fsmanager.cpp b/lib/fsengine/fsmanager.cpp deleted file mode 100644 index e6531be5a..000000000 --- a/lib/fsengine/fsmanager.cpp +++ /dev/null @@ -1,161 +0,0 @@ -/***** BEGIN LICENSE BLOCK ***** - -BSD License - -Copyright (c) 2005-2015, NIF File Format Library and Tools -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the NIF File Format Library and Tools project may not be - used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -***** END LICENCE BLOCK *****/ - - -#include "fsmanager.h" -#include "fsengine.h" -#include "bsa.h" - -#include -#include -#include -#include -#include -#include -#include - - -//! Global BSA file manager -static FSManager * theFSManager = nullptr; -// see fsmanager.h -FSManager* FSManager::get() -{ - if (!theFSManager) - theFSManager = new FSManager(); - return theFSManager; -} - -void FSManager::del() -{ - if ( theFSManager ) { - delete theFSManager; - theFSManager = nullptr; - } -} - -// see fsmanager.h -QList FSManager::archiveList() -{ - QList archives; - for ( std::shared_ptr an : get()->archives.values() ) { - archives.append( an->getArchive() ); - } - return archives; -} - -// see fsmanager.h -FSManager::FSManager( QObject * parent ) - : QObject( parent ), automatic( false ) -{ - initialize(); -} - -// see fsmanager.h -FSManager::~FSManager() -{ - archives.clear(); -} - -void FSManager::initialize() -{ - QSettings cfg; - QStringList list = cfg.value( "Settings/Resources/Archives", QStringList() ).toStringList(); - - for ( const QString an : list ) { - if ( auto a = FSArchiveHandler::openArchive( an ) ) - archives.insert( an, a ); - } -} - -// see fsmanager.h -QStringList FSManager::regPathBSAList( QString regKey, QString dataDir ) -{ - QStringList list; -#ifdef Q_OS_WIN32 - QSettings reg( regKey, QSettings::Registry32Format ); - QString dataPath = reg.value( "Installed Path" ).toString(); - if ( ! dataPath.isEmpty() ) - { - if ( ! dataPath.endsWith( '/' ) && ! dataPath.endsWith( '\\' ) ) - dataPath += "/"; - dataPath += dataDir; - QDir fs( dataPath ); - for ( const QString& fn : fs.entryList( { "*.bsa", "*.ba2" }, QDir::Files ) ) - { - list << QDir::fromNativeSeparators(dataPath + QDir::separator() + fn); - } - } -#endif - return list; -} - -QStringList FSManager::autodetectArchives( const QString & folder ) -{ - QStringList list; - -#ifdef Q_OS_WIN32 - list << regPathBSAList( "HKEY_LOCAL_MACHINE\\SOFTWARE\\Bethesda Softworks\\Morrowind", "Data Files" ); - list << regPathBSAList( "HKEY_LOCAL_MACHINE\\SOFTWARE\\Bethesda Softworks\\Oblivion", "Data" ); - list << regPathBSAList( "HKEY_LOCAL_MACHINE\\SOFTWARE\\Bethesda Softworks\\Fallout3", "Data" ); - list << regPathBSAList( "HKEY_LOCAL_MACHINE\\SOFTWARE\\Bethesda Softworks\\FalloutNV", "Data" ); - list << regPathBSAList( "HKEY_LOCAL_MACHINE\\SOFTWARE\\Bethesda Softworks\\Skyrim", "Data" ); - list << regPathBSAList( "HKEY_LOCAL_MACHINE\\SOFTWARE\\Bethesda Softworks\\Fallout4", "Data" ); - list << regPathBSAList( "HKEY_LOCAL_MACHINE\\SOFTWARE\\Bethesda Softworks\\Skyrim Special Edition", "Data" ); -#endif - - return filterArchives( list, folder ); -} - -QStringList FSManager::filterArchives( const QStringList & list, const QString & folder ) -{ - QStringList listCopy; - if ( !folder.isEmpty() ) { - // Looking for a specific folder here - // Remove the BSAs that do not contain this folder - for ( auto f : list ) { - auto handler = FSArchiveHandler::openArchive( f ); - if ( handler ) { - auto bsa = handler->getArchive(); - if ( bsa ) { - auto rootFolder = bsa->getFolder( "" ); - if ( rootFolder->children.contains( folder.toLower() ) ) { - listCopy.append( f ); - } - } - } - } - } else { - listCopy = list; - } - - return listCopy; -} diff --git a/lib/fsengine/fsmanager.h b/lib/fsengine/fsmanager.h deleted file mode 100644 index 20e460e35..000000000 --- a/lib/fsengine/fsmanager.h +++ /dev/null @@ -1,86 +0,0 @@ -/***** BEGIN LICENSE BLOCK ***** - -BSD License - -Copyright (c) 2005-2015, NIF File Format Library and Tools -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the NIF File Format Library and Tools project may not be - used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -***** END LICENCE BLOCK *****/ - - -#ifndef FSMANAGER_H -#define FSMANAGER_H - - -#include -#include -#include - -#include - -class FSArchiveHandler; -class FSArchiveFile; - -//! The file system manager class. -class FSManager : public QObject -{ - Q_OBJECT -public: - //! Gets the global file system manager - static FSManager * get(); - - //! Deletes the manager - static void del(); - - //! Gets the list of globally registered BSA files - static QList archiveList(); - - //! Filters a list of BSAs from a provided list - static QStringList filterArchives( const QStringList & list, const QString & folder = "" ); - -protected: - //! Constructor - FSManager( QObject * parent = nullptr ); - //! Destructor - ~FSManager(); - -protected: - QMap > archives; - bool automatic; - - //! Builds a list of global BSAs on Windows platforms - static QStringList autodetectArchives( const QString & folder = "" ); - //! Helper function to build a list of BSAs - static QStringList regPathBSAList( QString regKey, QString dataDir ); - - void initialize(); - - friend class NifSkope; - friend class SettingsResources; -}; - -#endif - diff --git a/lib/json.hpp b/lib/json.hpp new file mode 100644 index 000000000..f44b20163 --- /dev/null +++ b/lib/json.hpp @@ -0,0 +1,24608 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +/****************************************************************************\ + * Note on documentation: The source files contain links to the online * + * documentation of the public API at https://json.nlohmann.me. This URL * + * contains the most recent documentation and should also be applicable to * + * previous versions; documentation for deprecated functions is not * + * removed, but marked deprecated. See "Generate documentation" section in * + * file docs/README.md. * +\****************************************************************************/ + +#ifndef INCLUDE_NLOHMANN_JSON_HPP_ +#define INCLUDE_NLOHMANN_JSON_HPP_ + +#include // all_of, find, for_each +#include // nullptr_t, ptrdiff_t, size_t +#include // hash, less +#include // initializer_list +#ifndef JSON_NO_IO + #include // istream, ostream +#endif // JSON_NO_IO +#include // random_access_iterator_tag +#include // unique_ptr +#include // string, stoi, to_string +#include // declval, forward, move, pair, swap +#include // vector + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + + +#include + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + + +// This file contains all macro definitions affecting or depending on the ABI + +#ifndef JSON_SKIP_LIBRARY_VERSION_CHECK + #if defined(NLOHMANN_JSON_VERSION_MAJOR) && defined(NLOHMANN_JSON_VERSION_MINOR) && defined(NLOHMANN_JSON_VERSION_PATCH) + #if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 11 || NLOHMANN_JSON_VERSION_PATCH != 2 + #warning "Already included a different version of the library!" + #endif + #endif +#endif + +#define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum) +#define NLOHMANN_JSON_VERSION_MINOR 11 // NOLINT(modernize-macro-to-enum) +#define NLOHMANN_JSON_VERSION_PATCH 2 // NOLINT(modernize-macro-to-enum) + +#ifndef JSON_DIAGNOSTICS + #define JSON_DIAGNOSTICS 0 +#endif + +#ifndef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON + #define JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 0 +#endif + +#if JSON_DIAGNOSTICS + #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS _diag +#else + #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS +#endif + +#if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON + #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON _ldvcmp +#else + #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON +#endif + +#ifndef NLOHMANN_JSON_NAMESPACE_NO_VERSION + #define NLOHMANN_JSON_NAMESPACE_NO_VERSION 0 +#endif + +// Construct the namespace ABI tags component +#define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) json_abi ## a ## b +#define NLOHMANN_JSON_ABI_TAGS_CONCAT(a, b) \ + NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) + +#define NLOHMANN_JSON_ABI_TAGS \ + NLOHMANN_JSON_ABI_TAGS_CONCAT( \ + NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS, \ + NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON) + +// Construct the namespace version component +#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) \ + _v ## major ## _ ## minor ## _ ## patch +#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(major, minor, patch) \ + NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) + +#if NLOHMANN_JSON_NAMESPACE_NO_VERSION +#define NLOHMANN_JSON_NAMESPACE_VERSION +#else +#define NLOHMANN_JSON_NAMESPACE_VERSION \ + NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(NLOHMANN_JSON_VERSION_MAJOR, \ + NLOHMANN_JSON_VERSION_MINOR, \ + NLOHMANN_JSON_VERSION_PATCH) +#endif + +// Combine namespace components +#define NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) a ## b +#define NLOHMANN_JSON_NAMESPACE_CONCAT(a, b) \ + NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) + +#ifndef NLOHMANN_JSON_NAMESPACE +#define NLOHMANN_JSON_NAMESPACE \ + nlohmann::NLOHMANN_JSON_NAMESPACE_CONCAT( \ + NLOHMANN_JSON_ABI_TAGS, \ + NLOHMANN_JSON_NAMESPACE_VERSION) +#endif + +#ifndef NLOHMANN_JSON_NAMESPACE_BEGIN +#define NLOHMANN_JSON_NAMESPACE_BEGIN \ + namespace nlohmann \ + { \ + inline namespace NLOHMANN_JSON_NAMESPACE_CONCAT( \ + NLOHMANN_JSON_ABI_TAGS, \ + NLOHMANN_JSON_NAMESPACE_VERSION) \ + { +#endif + +#ifndef NLOHMANN_JSON_NAMESPACE_END +#define NLOHMANN_JSON_NAMESPACE_END \ + } /* namespace (inline namespace) NOLINT(readability/namespace) */ \ + } // namespace nlohmann +#endif + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + + +#include // transform +#include // array +#include // forward_list +#include // inserter, front_inserter, end +#include // map +#include // string +#include // tuple, make_tuple +#include // is_arithmetic, is_same, is_enum, underlying_type, is_convertible +#include // unordered_map +#include // pair, declval +#include // valarray + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + + +#include // nullptr_t +#include // exception +#if JSON_DIAGNOSTICS + #include // accumulate +#endif +#include // runtime_error +#include // to_string +#include // vector + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + + +#include // array +#include // size_t +#include // uint8_t +#include // string + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + + +#include // declval, pair +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + + +#include + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template struct make_void +{ + using type = void; +}; +template using void_t = typename make_void::type; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +// https://en.cppreference.com/w/cpp/experimental/is_detected +struct nonesuch +{ + nonesuch() = delete; + ~nonesuch() = delete; + nonesuch(nonesuch const&) = delete; + nonesuch(nonesuch const&&) = delete; + void operator=(nonesuch const&) = delete; + void operator=(nonesuch&&) = delete; +}; + +template class Op, + class... Args> +struct detector +{ + using value_t = std::false_type; + using type = Default; +}; + +template class Op, class... Args> +struct detector>, Op, Args...> +{ + using value_t = std::true_type; + using type = Op; +}; + +template class Op, class... Args> +using is_detected = typename detector::value_t; + +template class Op, class... Args> +struct is_detected_lazy : is_detected { }; + +template class Op, class... Args> +using detected_t = typename detector::type; + +template class Op, class... Args> +using detected_or = detector; + +template class Op, class... Args> +using detected_or_t = typename detected_or::type; + +template class Op, class... Args> +using is_detected_exact = std::is_same>; + +template class Op, class... Args> +using is_detected_convertible = + std::is_convertible, To>; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include + + +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-FileCopyrightText: 2016-2021 Evan Nemerson +// SPDX-License-Identifier: MIT + +/* Hedley - https://nemequ.github.io/hedley + * Created by Evan Nemerson + */ + +#if !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < 15) +#if defined(JSON_HEDLEY_VERSION) + #undef JSON_HEDLEY_VERSION +#endif +#define JSON_HEDLEY_VERSION 15 + +#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) && !defined(__ICL) + #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) && !defined(__ICL) + #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) && !defined(__ICL) + #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(JSON_HEDLEY_MSVC_VERSION) + #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) && !defined(__ICL) + #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, __INTEL_COMPILER_UPDATE) +#elif defined(__INTEL_COMPILER) && !defined(__ICL) + #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_INTEL_CL_VERSION) + #undef JSON_HEDLEY_INTEL_CL_VERSION +#endif +#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && defined(__ICL) + #define JSON_HEDLEY_INTEL_CL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER, __INTEL_COMPILER_UPDATE, 0) +#endif + +#if defined(JSON_HEDLEY_INTEL_CL_VERSION_CHECK) + #undef JSON_HEDLEY_INTEL_CL_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_INTEL_CL_VERSION) + #define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_CL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_INTEL_CL_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_MCST_LCC_VERSION) + #undef JSON_HEDLEY_MCST_LCC_VERSION +#endif +#if defined(__LCC__) && defined(__LCC_MINOR__) + #define JSON_HEDLEY_MCST_LCC_VERSION JSON_HEDLEY_VERSION_ENCODE(__LCC__ / 100, __LCC__ % 100, __LCC_MINOR__) +#endif + +#if defined(JSON_HEDLEY_MCST_LCC_VERSION_CHECK) + #undef JSON_HEDLEY_MCST_LCC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_MCST_LCC_VERSION) + #define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_MCST_LCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_MCST_LCC_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_CRAY_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__) && \ + !defined(JSON_HEDLEY_MCST_LCC_VERSION) + #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) && \ + ( \ + (!defined(JSON_HEDLEY_IAR_VERSION) || JSON_HEDLEY_IAR_VERSION_CHECK(8,5,9)) \ + ) +# 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) JSON_HEDLEY_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) JSON_HEDLEY_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 + +#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) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,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 + +/* 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") +# if JSON_HEDLEY_HAS_WARNING("-Wc++1z-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\"") \ + _Pragma("clang diagnostic ignored \"-Wc++1z-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\"") \ + _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \ + xpr \ + JSON_HEDLEY_DIAGNOSTIC_POP +# endif +# 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(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_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:1478 1786)) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(20,7,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1216,1444,1445") +#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_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444") +#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_INTEL_CL_VERSION_CHECK(2021,1,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") +#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 161") +#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_INTEL_CL_VERSION_CHECK(2021,1,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(20,7,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097,1098") +#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") +#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097") +#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_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunused-function") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("clang diagnostic ignored \"-Wunused-function\"") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("GCC diagnostic ignored \"-Wunused-function\"") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(1,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION __pragma(warning(disable:4505)) +#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("diag_suppress 3142") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION +#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) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated("Since " # since)) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated("Since " #since "; use " #replacement)) +#elif \ + (JSON_HEDLEY_HAS_EXTENSION(attribute_deprecated_with_message) && !defined(JSON_HEDLEY_IAR_VERSION)) || \ + 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) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__("Since " #since))) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__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_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) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,10,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) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,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) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #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_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) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__)) + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) __attribute__((__warn_unused_result__)) +#elif (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 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) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #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) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #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) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,10,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) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,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) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,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) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(10,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #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) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #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) && !defined(JSON_HEDLEY_PGI_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(9,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) +# 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) && !defined(JSON_HEDLEY_INTEL_CL_VERSION)) || \ + 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) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) +# 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) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #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) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,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) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) +# 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) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #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_INTEL_CL_VERSION_CHECK(2021,1,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__) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #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_INTEL_CL_VERSION_CHECK(2021,1,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) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #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) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) +# define JSON_HEDLEY_ALWAYS_INLINE __attribute__((__always_inline__)) JSON_HEDLEY_INLINE +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,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) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) + #define JSON_HEDLEY_NEVER_INLINE __attribute__((__noinline__)) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,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) \ + ) \ + ) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) +# 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) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_NO_THROW __attribute__((__nothrow__)) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,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) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #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) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #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) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #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) && !defined(JSON_HEDLEY_IAR_VERSION)) || \ + 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) && !defined(JSON_HEDLEY_INTEL_CL_VERSION)) || \ + 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) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,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) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,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) && (!defined(__cplusplus) || JSON_HEDLEY_HAS_WARNING("-Wbitfield-enum-conversion")) + #define JSON_HEDLEY_FLAGS __attribute__((__flag_enum__)) +#else + #define JSON_HEDLEY_FLAGS +#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)) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,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 (except those affecting ABI) +// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them + +// #include + + +// 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 the user manually specified the used c++ version this is skipped +#if !defined(JSON_HAS_CPP_20) && !defined(JSON_HAS_CPP_17) && !defined(JSON_HAS_CPP_14) && !defined(JSON_HAS_CPP_11) + #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 + // the cpp 11 flag is always specified because it is the minimal required version + #define JSON_HAS_CPP_11 +#endif + +#ifdef __has_include + #if __has_include() + #include + #endif +#endif + +#if !defined(JSON_HAS_FILESYSTEM) && !defined(JSON_HAS_EXPERIMENTAL_FILESYSTEM) + #ifdef JSON_HAS_CPP_17 + #if defined(__cpp_lib_filesystem) + #define JSON_HAS_FILESYSTEM 1 + #elif defined(__cpp_lib_experimental_filesystem) + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 + #elif !defined(__has_include) + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 + #elif __has_include() + #define JSON_HAS_FILESYSTEM 1 + #elif __has_include() + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 + #endif + + // std::filesystem does not work on MinGW GCC 8: https://sourceforge.net/p/mingw-w64/bugs/737/ + #if defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ == 8 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before GCC 8: https://en.cppreference.com/w/cpp/compiler_support + #if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 8 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before Clang 7: https://en.cppreference.com/w/cpp/compiler_support + #if defined(__clang_major__) && __clang_major__ < 7 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before MSVC 19.14: https://en.cppreference.com/w/cpp/compiler_support + #if defined(_MSC_VER) && _MSC_VER < 1914 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before iOS 13 + #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 130000 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before macOS Catalina + #if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + #endif +#endif + +#ifndef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 0 +#endif + +#ifndef JSON_HAS_FILESYSTEM + #define JSON_HAS_FILESYSTEM 0 +#endif + +#ifndef JSON_HAS_THREE_WAY_COMPARISON + #if defined(__cpp_impl_three_way_comparison) && __cpp_impl_three_way_comparison >= 201907L \ + && defined(__cpp_lib_three_way_comparison) && __cpp_lib_three_way_comparison >= 201907L + #define JSON_HAS_THREE_WAY_COMPARISON 1 + #else + #define JSON_HAS_THREE_WAY_COMPARISON 0 + #endif +#endif + +#ifndef JSON_HAS_RANGES + // ranges header shipping in GCC 11.1.0 (released 2021-04-27) has syntax error + #if defined(__GLIBCXX__) && __GLIBCXX__ == 20210427 + #define JSON_HAS_RANGES 0 + #elif defined(__cpp_lib_ranges) + #define JSON_HAS_RANGES 1 + #else + #define JSON_HAS_RANGES 0 + #endif +#endif + +#ifdef JSON_HAS_CPP_17 + #define JSON_INLINE_VARIABLE inline +#else + #define JSON_INLINE_VARIABLE +#endif + +#if JSON_HEDLEY_HAS_ATTRIBUTE(no_unique_address) + #define JSON_NO_UNIQUE_ADDRESS [[no_unique_address]] +#else + #define JSON_NO_UNIQUE_ADDRESS +#endif + +// disable documentation warnings on clang +#if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wdocumentation" + #pragma clang diagnostic ignored "-Wdocumentation-unknown-command" +#endif + +// allow disabling 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 overriding assert +#if !defined(JSON_ASSERT) + #include // assert + #define JSON_ASSERT(x) assert(x) +#endif + +// allow to access some private functions (needed by the test suite) +#if defined(JSON_TESTS_PRIVATE) + #define JSON_PRIVATE_UNLESS_TESTED public +#else + #define JSON_PRIVATE_UNLESS_TESTED private +#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, \ + class CustomBaseClass> + +#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); +#define NLOHMANN_JSON_FROM_WITH_DEFAULT(v1) nlohmann_json_t.v1 = nlohmann_json_j.value(#v1, nlohmann_json_default_obj.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__)) } + +#define NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(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) { const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __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__)) } + +#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(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) { const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + +// inspired from https://stackoverflow.com/a/26745591 +// allows to call any std function as if (e.g. with begin): +// using std::begin; begin(x); +// +// it allows using the detected idiom to retrieve the return type +// of such an expression +#define NLOHMANN_CAN_CALL_STD_FUNC_IMPL(std_name) \ + namespace detail { \ + using std::std_name; \ + \ + template \ + using result_of_##std_name = decltype(std_name(std::declval()...)); \ + } \ + \ + namespace detail2 { \ + struct std_name##_tag \ + { \ + }; \ + \ + template \ + std_name##_tag std_name(T&&...); \ + \ + template \ + using result_of_##std_name = decltype(std_name(std::declval()...)); \ + \ + template \ + struct would_call_std_##std_name \ + { \ + static constexpr auto const value = ::nlohmann::detail:: \ + is_detected_exact::value; \ + }; \ + } /* namespace detail2 */ \ + \ + template \ + struct would_call_std_##std_name : detail2::would_call_std_##std_name \ + { \ + } + +#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 + +#ifndef JSON_DISABLE_ENUM_SERIALIZATION + #define JSON_DISABLE_ENUM_SERIALIZATION 0 +#endif + +#ifndef JSON_USE_GLOBAL_UDLS + #define JSON_USE_GLOBAL_UDLS 1 +#endif + +#if JSON_HAS_THREE_WAY_COMPARISON + #include // partial_ordering +#endif + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/////////////////////////// +// JSON type enumeration // +/////////////////////////// + +/*! +@brief the JSON type enumeration + +This enumeration collects the different JSON types. It is internally used to +distinguish the stored values, and the functions @ref basic_json::is_null(), +@ref basic_json::is_object(), @ref basic_json::is_array(), +@ref basic_json::is_string(), @ref basic_json::is_boolean(), +@ref basic_json::is_number() (with @ref basic_json::is_number_integer(), +@ref basic_json::is_number_unsigned(), and @ref basic_json::is_number_float()), +@ref basic_json::is_discarded(), @ref basic_json::is_primitive(), and +@ref basic_json::is_structured() rely on it. + +@note There are three enumeration entries (number_integer, number_unsigned, and +number_float), because the library distinguishes these three types for numbers: +@ref basic_json::number_unsigned_t is used for unsigned integers, +@ref basic_json::number_integer_t is used for signed integers, and +@ref basic_json::number_float_t is used for floating-point numbers or to +approximate integers which do not fit in the limits of their respective type. + +@sa see @ref basic_json::basic_json(const value_t value_type) -- create a JSON +value with the default value for a given type + +@since version 1.0.0 +*/ +enum class value_t : std::uint8_t +{ + null, ///< null value + object, ///< object (unordered set of name/value pairs) + array, ///< array (ordered collection of values) + string, ///< string value + boolean, ///< boolean value + number_integer, ///< number value (signed integer) + number_unsigned, ///< number value (unsigned integer) + number_float, ///< number value (floating-point) + binary, ///< binary array (ordered collection of bytes) + discarded ///< discarded by the parser callback function +}; + +/*! +@brief comparison operator for JSON types + +Returns an ordering that is similar to Python: +- order: null < boolean < number < object < array < string < binary +- furthermore, each type is not smaller than itself +- discarded values are not comparable +- binary is represented as a b"" string in python and directly comparable to a + string; however, making a binary array directly comparable with a string would + be surprising behavior in a JSON file. + +@since version 1.0.0 +*/ +#if JSON_HAS_THREE_WAY_COMPARISON + inline std::partial_ordering operator<=>(const value_t lhs, const value_t rhs) noexcept // *NOPAD* +#else + inline bool operator<(const value_t lhs, const value_t rhs) noexcept +#endif +{ + static constexpr std::array order = {{ + 0 /* null */, 3 /* object */, 4 /* array */, 5 /* string */, + 1 /* boolean */, 2 /* integer */, 2 /* unsigned */, 2 /* float */, + 6 /* binary */ + } + }; + + const auto l_index = static_cast(lhs); + const auto r_index = static_cast(rhs); +#if JSON_HAS_THREE_WAY_COMPARISON + if (l_index < order.size() && r_index < order.size()) + { + return order[l_index] <=> order[r_index]; // *NOPAD* + } + return std::partial_ordering::unordered; +#else + return l_index < order.size() && r_index < order.size() && order[l_index] < order[r_index]; +#endif +} + +// GCC selects the built-in operator< over an operator rewritten from +// a user-defined spaceship operator +// Clang, MSVC, and ICC select the rewritten candidate +// (see GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105200) +#if JSON_HAS_THREE_WAY_COMPARISON && defined(__GNUC__) +inline bool operator<(const value_t lhs, const value_t rhs) noexcept +{ + return std::is_lt(lhs <=> rhs); // *NOPAD* +} +#endif + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/*! +@brief replace all occurrences of a substring by another string + +@param[in,out] s the string to manipulate; changed so that all + occurrences of @a f are replaced with @a t +@param[in] f the substring to replace with @a t +@param[in] t the string to replace @a f + +@pre The search string @a f must not be empty. **This precondition is +enforced with an assertion.** + +@since version 2.0.0 +*/ +template +inline void replace_substring(StringType& s, const StringType& f, + const StringType& t) +{ + JSON_ASSERT(!f.empty()); + for (auto pos = s.find(f); // find first occurrence of f + pos != StringType::npos; // make sure f was found + s.replace(pos, f.size(), t), // replace with t, and + pos = s.find(f, pos + t.size())) // find next occurrence of f + {} +} + +/*! + * @brief string escaping as described in RFC 6901 (Sect. 4) + * @param[in] s string to escape + * @return escaped string + * + * Note the order of escaping "~" to "~0" and "/" to "~1" is important. + */ +template +inline StringType escape(StringType s) +{ + replace_substring(s, StringType{"~"}, StringType{"~0"}); + replace_substring(s, StringType{"/"}, StringType{"~1"}); + return s; +} + +/*! + * @brief string unescaping as described in RFC 6901 (Sect. 4) + * @param[in] s string to unescape + * @return unescaped string + * + * Note the order of escaping "~1" to "/" and "~0" to "~" is important. + */ +template +static void unescape(StringType& s) +{ + replace_substring(s, StringType{"~1"}, StringType{"/"}); + replace_substring(s, StringType{"~0"}, StringType{"~"}); +} + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + + +#include // size_t + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/// struct to capture the start position of the current token +struct position_t +{ + /// the total number of characters read + std::size_t chars_read_total = 0; + /// the number of characters read in the current line + std::size_t chars_read_current_line = 0; + /// the number of lines read + std::size_t lines_read = 0; + + /// conversion to size_t to preserve SAX interface + constexpr operator size_t() const + { + return chars_read_total; + } +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-FileCopyrightText: 2018 The Abseil Authors +// SPDX-License-Identifier: MIT + + +#include // array +#include // size_t +#include // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type +#include // index_sequence, make_index_sequence, index_sequence_for + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template +using uncvref_t = typename std::remove_cv::type>::type; + +#ifdef JSON_HAS_CPP_14 + +// the following utilities are natively available in C++14 +using std::enable_if_t; +using std::index_sequence; +using std::make_index_sequence; +using std::index_sequence_for; + +#else + +// alias templates to reduce boilerplate +template +using enable_if_t = typename std::enable_if::type; + +// The following code is taken from https://github.com/abseil/abseil-cpp/blob/10cb35e459f5ecca5b2ff107635da0bfa41011b4/absl/utility/utility.h +// which is part of Google Abseil (https://github.com/abseil/abseil-cpp), licensed under the Apache License 2.0. + +//// START OF CODE FROM GOOGLE ABSEIL + +// integer_sequence +// +// Class template representing a compile-time integer sequence. An instantiation +// of `integer_sequence` has a sequence of integers encoded in its +// type through its template arguments (which is a common need when +// working with C++11 variadic templates). `absl::integer_sequence` is designed +// to be a drop-in replacement for C++14's `std::integer_sequence`. +// +// Example: +// +// template< class T, T... Ints > +// void user_function(integer_sequence); +// +// int main() +// { +// // user_function's `T` will be deduced to `int` and `Ints...` +// // will be deduced to `0, 1, 2, 3, 4`. +// user_function(make_integer_sequence()); +// } +template +struct integer_sequence +{ + using value_type = T; + static constexpr std::size_t size() noexcept + { + return sizeof...(Ints); + } +}; + +// index_sequence +// +// A helper template for an `integer_sequence` of `size_t`, +// `absl::index_sequence` is designed to be a drop-in replacement for C++14's +// `std::index_sequence`. +template +using index_sequence = integer_sequence; + +namespace utility_internal +{ + +template +struct Extend; + +// Note that SeqSize == sizeof...(Ints). It's passed explicitly for efficiency. +template +struct Extend, SeqSize, 0> +{ + using type = integer_sequence < T, Ints..., (Ints + SeqSize)... >; +}; + +template +struct Extend, SeqSize, 1> +{ + using type = integer_sequence < T, Ints..., (Ints + SeqSize)..., 2 * SeqSize >; +}; + +// Recursion helper for 'make_integer_sequence'. +// 'Gen::type' is an alias for 'integer_sequence'. +template +struct Gen +{ + using type = + typename Extend < typename Gen < T, N / 2 >::type, N / 2, N % 2 >::type; +}; + +template +struct Gen +{ + using type = integer_sequence; +}; + +} // namespace utility_internal + +// Compile-time sequences of integers + +// make_integer_sequence +// +// This template alias is equivalent to +// `integer_sequence`, and is designed to be a drop-in +// replacement for C++14's `std::make_integer_sequence`. +template +using make_integer_sequence = typename utility_internal::Gen::type; + +// make_index_sequence +// +// This template alias is equivalent to `index_sequence<0, 1, ..., N-1>`, +// and is designed to be a drop-in replacement for C++14's +// `std::make_index_sequence`. +template +using make_index_sequence = make_integer_sequence; + +// index_sequence_for +// +// Converts a typename pack into an index sequence of the same length, and +// is designed to be a drop-in replacement for C++14's +// `std::index_sequence_for()` +template +using index_sequence_for = make_index_sequence; + +//// END OF CODE FROM GOOGLE ABSEIL + +#endif + +// dispatch utility (taken from ranges-v3) +template struct priority_tag : priority_tag < N - 1 > {}; +template<> struct priority_tag<0> {}; + +// taken from ranges-v3 +template +struct static_const +{ + static JSON_INLINE_VARIABLE constexpr T value{}; +}; + +#ifndef JSON_HAS_CPP_17 + template + constexpr T static_const::value; +#endif + +template +inline constexpr std::array make_array(Args&& ... args) +{ + return std::array {{static_cast(std::forward(args))...}}; +} + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + + +#include // numeric_limits +#include // false_type, is_constructible, is_integral, is_same, true_type +#include // declval +#include // tuple + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + + +#include // random_access_iterator_tag + +// #include + +// #include + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template +struct iterator_types {}; + +template +struct iterator_types < + It, + void_t> +{ + using difference_type = typename It::difference_type; + using value_type = typename It::value_type; + using pointer = typename It::pointer; + using reference = typename It::reference; + using iterator_category = typename It::iterator_category; +}; + +// This is required as some compilers implement std::iterator_traits in a way that +// doesn't work with SFINAE. See https://github.com/nlohmann/json/issues/1341. +template +struct iterator_traits +{ +}; + +template +struct iterator_traits < T, enable_if_t < !std::is_pointer::value >> + : iterator_types +{ +}; + +template +struct iterator_traits::value>> +{ + using iterator_category = std::random_access_iterator_tag; + using value_type = T; + using difference_type = ptrdiff_t; + using pointer = T*; + using reference = T&; +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN + +NLOHMANN_CAN_CALL_STD_FUNC_IMPL(begin); + +NLOHMANN_JSON_NAMESPACE_END + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN + +NLOHMANN_CAN_CALL_STD_FUNC_IMPL(end); + +NLOHMANN_JSON_NAMESPACE_END + +// #include + +// #include + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_ + #define INCLUDE_NLOHMANN_JSON_FWD_HPP_ + + #include // int64_t, uint64_t + #include // map + #include // allocator + #include // string + #include // vector + + // #include + + + /*! + @brief namespace for Niels Lohmann + @see https://github.com/nlohmann + @since version 1.0.0 + */ + NLOHMANN_JSON_NAMESPACE_BEGIN + + /*! + @brief default JSONSerializer template argument + + This serializer ignores the template arguments and uses ADL + ([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl)) + for serialization. + */ + template + struct adl_serializer; + + /// a class to store JSON values + /// @sa https://json.nlohmann.me/api/basic_json/ + template class ObjectType = + std::map, + template class ArrayType = std::vector, + class StringType = std::string, class BooleanType = bool, + class NumberIntegerType = std::int64_t, + class NumberUnsignedType = std::uint64_t, + class NumberFloatType = double, + template class AllocatorType = std::allocator, + template class JSONSerializer = + adl_serializer, + class BinaryType = std::vector, // cppcheck-suppress syntaxError + class CustomBaseClass = void> + class basic_json; + + /// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document + /// @sa https://json.nlohmann.me/api/json_pointer/ + template + class json_pointer; + + /*! + @brief default specialization + @sa https://json.nlohmann.me/api/json/ + */ + using json = basic_json<>; + + /// @brief a minimal map-like container that preserves insertion order + /// @sa https://json.nlohmann.me/api/ordered_map/ + template + struct ordered_map; + + /// @brief specialization that maintains the insertion order of object keys + /// @sa https://json.nlohmann.me/api/ordered_json/ + using ordered_json = basic_json; + + NLOHMANN_JSON_NAMESPACE_END + +#endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_ + + +NLOHMANN_JSON_NAMESPACE_BEGIN +/*! +@brief detail namespace with internal helper functions + +This namespace collects functions that should not be exposed, +implementations of some @ref basic_json methods, and meta-programming helpers. + +@since version 2.1.0 +*/ +namespace detail +{ + +///////////// +// helpers // +///////////// + +// Note to maintainers: +// +// Every trait in this file expects a non CV-qualified type. +// The only exceptions are in the 'aliases for detected' section +// (i.e. those of the form: decltype(T::member_function(std::declval()))) +// +// In this case, T has to be properly CV-qualified to constraint the function arguments +// (e.g. to_json(BasicJsonType&, const T&)) + +template struct is_basic_json : std::false_type {}; + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +struct is_basic_json : std::true_type {}; + +// used by exceptions create() member functions +// true_type for pointer to possibly cv-qualified basic_json or std::nullptr_t +// false_type otherwise +template +struct is_basic_json_context : + std::integral_constant < bool, + is_basic_json::type>::type>::value + || std::is_same::value > +{}; + +////////////////////// +// json_ref helpers // +////////////////////// + +template +class json_ref; + +template +struct is_json_ref : std::false_type {}; + +template +struct is_json_ref> : std::true_type {}; + +////////////////////////// +// aliases for detected // +////////////////////////// + +template +using mapped_type_t = typename T::mapped_type; + +template +using key_type_t = typename T::key_type; + +template +using value_type_t = typename T::value_type; + +template +using difference_type_t = typename T::difference_type; + +template +using pointer_t = typename T::pointer; + +template +using reference_t = typename T::reference; + +template +using iterator_category_t = typename T::iterator_category; + +template +using to_json_function = decltype(T::to_json(std::declval()...)); + +template +using from_json_function = decltype(T::from_json(std::declval()...)); + +template +using get_template_function = decltype(std::declval().template get()); + +// trait checking if JSONSerializer::from_json(json const&, udt&) exists +template +struct has_from_json : std::false_type {}; + +// trait checking if j.get is valid +// use this trait instead of std::is_constructible or std::is_convertible, +// both rely on, or make use of implicit conversions, and thus fail when T +// has several constructors/operator= (see https://github.com/nlohmann/json/issues/958) +template +struct is_getable +{ + static constexpr bool value = is_detected::value; +}; + +template +struct has_from_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> +{ + using serializer = typename BasicJsonType::template json_serializer; + + static constexpr bool value = + is_detected_exact::value; +}; + +// This trait checks if JSONSerializer::from_json(json const&) exists +// this overload is used for non-default-constructible user-defined-types +template +struct has_non_default_from_json : std::false_type {}; + +template +struct has_non_default_from_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> +{ + using serializer = typename BasicJsonType::template json_serializer; + + static constexpr bool value = + is_detected_exact::value; +}; + +// This trait checks if BasicJsonType::json_serializer::to_json exists +// Do not evaluate the trait when T is a basic_json type, to avoid template instantiation infinite recursion. +template +struct has_to_json : std::false_type {}; + +template +struct has_to_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> +{ + using serializer = typename BasicJsonType::template json_serializer; + + static constexpr bool value = + is_detected_exact::value; +}; + +template +using detect_key_compare = typename T::key_compare; + +template +struct has_key_compare : std::integral_constant::value> {}; + +// obtains the actual object key comparator +template +struct actual_object_comparator +{ + using object_t = typename BasicJsonType::object_t; + using object_comparator_t = typename BasicJsonType::default_object_comparator_t; + using type = typename std::conditional < has_key_compare::value, + typename object_t::key_compare, object_comparator_t>::type; +}; + +template +using actual_object_comparator_t = typename actual_object_comparator::type; + +/////////////////// +// is_ functions // +/////////////////// + +// https://en.cppreference.com/w/cpp/types/conjunction +template struct conjunction : std::true_type { }; +template struct conjunction : B { }; +template +struct conjunction +: std::conditional(B::value), conjunction, B>::type {}; + +// https://en.cppreference.com/w/cpp/types/negation +template struct negation : std::integral_constant < bool, !B::value > { }; + +// Reimplementation of is_constructible and is_default_constructible, due to them being broken for +// std::pair and std::tuple until LWG 2367 fix (see https://cplusplus.github.io/LWG/lwg-defects.html#2367). +// This causes compile errors in e.g. clang 3.5 or gcc 4.9. +template +struct is_default_constructible : std::is_default_constructible {}; + +template +struct is_default_constructible> + : conjunction, is_default_constructible> {}; + +template +struct is_default_constructible> + : conjunction, is_default_constructible> {}; + +template +struct is_default_constructible> + : conjunction...> {}; + +template +struct is_default_constructible> + : conjunction...> {}; + +template +struct is_constructible : std::is_constructible {}; + +template +struct is_constructible> : is_default_constructible> {}; + +template +struct is_constructible> : is_default_constructible> {}; + +template +struct is_constructible> : is_default_constructible> {}; + +template +struct is_constructible> : is_default_constructible> {}; + +template +struct is_iterator_traits : std::false_type {}; + +template +struct is_iterator_traits> +{ + private: + using traits = iterator_traits; + + public: + static constexpr auto value = + is_detected::value && + is_detected::value && + is_detected::value && + is_detected::value && + is_detected::value; +}; + +template +struct is_range +{ + private: + using t_ref = typename std::add_lvalue_reference::type; + + using iterator = detected_t; + using sentinel = detected_t; + + // to be 100% correct, it should use https://en.cppreference.com/w/cpp/iterator/input_or_output_iterator + // and https://en.cppreference.com/w/cpp/iterator/sentinel_for + // but reimplementing these would be too much work, as a lot of other concepts are used underneath + static constexpr auto is_iterator_begin = + is_iterator_traits>::value; + + public: + static constexpr bool value = !std::is_same::value && !std::is_same::value && is_iterator_begin; +}; + +template +using iterator_t = enable_if_t::value, result_of_begin())>>; + +template +using range_value_t = value_type_t>>; + +// The following implementation of is_complete_type is taken from +// https://blogs.msdn.microsoft.com/vcblog/2015/12/02/partial-support-for-expression-sfinae-in-vs-2015-update-1/ +// and is written by Xiang Fan who agreed to using it in this library. + +template +struct is_complete_type : std::false_type {}; + +template +struct is_complete_type : std::true_type {}; + +template +struct is_compatible_object_type_impl : std::false_type {}; + +template +struct is_compatible_object_type_impl < + BasicJsonType, CompatibleObjectType, + enable_if_t < is_detected::value&& + is_detected::value >> +{ + using object_t = typename BasicJsonType::object_t; + + // macOS's is_constructible does not play well with nonesuch... + static constexpr bool value = + is_constructible::value && + is_constructible::value; +}; + +template +struct is_compatible_object_type + : is_compatible_object_type_impl {}; + +template +struct is_constructible_object_type_impl : std::false_type {}; + +template +struct is_constructible_object_type_impl < + BasicJsonType, ConstructibleObjectType, + enable_if_t < is_detected::value&& + is_detected::value >> +{ + using object_t = typename BasicJsonType::object_t; + + static constexpr bool value = + (is_default_constructible::value && + (std::is_move_assignable::value || + std::is_copy_assignable::value) && + (is_constructible::value && + std::is_same < + typename object_t::mapped_type, + typename ConstructibleObjectType::mapped_type >::value)) || + (has_from_json::value || + has_non_default_from_json < + BasicJsonType, + typename ConstructibleObjectType::mapped_type >::value); +}; + +template +struct is_constructible_object_type + : is_constructible_object_type_impl {}; + +template +struct is_compatible_string_type +{ + static constexpr auto value = + is_constructible::value; +}; + +template +struct is_constructible_string_type +{ + // launder type through decltype() to fix compilation failure on ICPC +#ifdef __INTEL_COMPILER + using laundered_type = decltype(std::declval()); +#else + using laundered_type = ConstructibleStringType; +#endif + + static constexpr auto value = + conjunction < + is_constructible, + is_detected_exact>::value; +}; + +template +struct is_compatible_array_type_impl : std::false_type {}; + +template +struct is_compatible_array_type_impl < + BasicJsonType, CompatibleArrayType, + enable_if_t < + is_detected::value&& + is_iterator_traits>>::value&& +// special case for types like std::filesystem::path whose iterator's value_type are themselves +// c.f. https://github.com/nlohmann/json/pull/3073 + !std::is_same>::value >> +{ + static constexpr bool value = + is_constructible>::value; +}; + +template +struct is_compatible_array_type + : is_compatible_array_type_impl {}; + +template +struct is_constructible_array_type_impl : std::false_type {}; + +template +struct is_constructible_array_type_impl < + BasicJsonType, ConstructibleArrayType, + enable_if_t::value >> + : std::true_type {}; + +template +struct is_constructible_array_type_impl < + BasicJsonType, ConstructibleArrayType, + enable_if_t < !std::is_same::value&& + !is_compatible_string_type::value&& + is_default_constructible::value&& +(std::is_move_assignable::value || + std::is_copy_assignable::value)&& +is_detected::value&& +is_iterator_traits>>::value&& +is_detected::value&& +// special case for types like std::filesystem::path whose iterator's value_type are themselves +// c.f. https://github.com/nlohmann/json/pull/3073 +!std::is_same>::value&& + is_complete_type < + detected_t>::value >> +{ + using value_type = range_value_t; + + static constexpr bool value = + std::is_same::value || + has_from_json::value || + has_non_default_from_json < + BasicJsonType, + value_type >::value; +}; + +template +struct is_constructible_array_type + : is_constructible_array_type_impl {}; + +template +struct is_compatible_integer_type_impl : std::false_type {}; + +template +struct is_compatible_integer_type_impl < + RealIntegerType, CompatibleNumberIntegerType, + enable_if_t < std::is_integral::value&& + std::is_integral::value&& + !std::is_same::value >> +{ + // is there an assert somewhere on overflows? + using RealLimits = std::numeric_limits; + using CompatibleLimits = std::numeric_limits; + + static constexpr auto value = + is_constructible::value && + CompatibleLimits::is_integer && + RealLimits::is_signed == CompatibleLimits::is_signed; +}; + +template +struct is_compatible_integer_type + : is_compatible_integer_type_impl {}; + +template +struct is_compatible_type_impl: std::false_type {}; + +template +struct is_compatible_type_impl < + BasicJsonType, CompatibleType, + enable_if_t::value >> +{ + static constexpr bool value = + has_to_json::value; +}; + +template +struct is_compatible_type + : is_compatible_type_impl {}; + +template +struct is_constructible_tuple : std::false_type {}; + +template +struct is_constructible_tuple> : conjunction...> {}; + +template +struct is_json_iterator_of : std::false_type {}; + +template +struct is_json_iterator_of : std::true_type {}; + +template +struct is_json_iterator_of : std::true_type +{}; + +// checks if a given type T is a template specialization of Primary +template