From 2ef858a948742eaf175d80d30e9489be7c0deb48 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Tue, 13 Jun 2023 16:19:57 -0400 Subject: [PATCH] latest from CODA-OSS and NITRO --- .../coda-oss/UnitTest/UnitTest.vcxproj | 379 ----- .../UnitTest/UnitTest.vcxproj.filters | 280 ---- .../nitro/externals/coda-oss/UnitTest/pch.h | 102 -- .../externals/coda-oss/UnitTest/types.cpp | 22 - .../modules/c++/coda-oss-lite.vcxproj | 514 ------- .../modules/c++/coda-oss-lite.vcxproj.filters | 1226 ----------------- .../c++/coda_oss/include/coda_oss/cstddef.h | 32 - .../coda_oss/include/coda_oss/type_traits.h | 33 - .../modules/c++/mem/include/mem/AutoPtr.h | 133 -- .../modules/c++/mem/include/mem/ScopedPtr.h | 165 --- .../c++/mem/include/mem/SharedPtrCpp11.h | 49 - .../modules/c++/std/include/import/cpp14.h | 60 - .../modules/c++/std/include/std/cstddef | 27 - .../modules/c++/std/include/std/memory | 27 - .../modules/c++/std/include/std/optional | 27 - .../modules/c++/std/include/std/type_traits | 28 - .../modules/c++/str/include/str/Manip.h | 207 --- .../c++/str/source/EncodedStringView.cpp | 215 --- .../coda-oss/modules/c++/str/source/Manip.cpp | 361 ----- .../c++/sys/include/sys/ByteSwapValue.h | 200 --- .../coda-oss/modules/c++/types/CMakeLists.txt | 11 - .../modules/c++/types/include/types/complex.h | 145 -- .../c++/types/unittests/test_complex.cpp | 56 - .../coda-oss/modules/c++/types/wscript | 10 - .../c++/xml.lite/include/xml/lite/Document.h | 212 --- .../include/xml/lite/MinidomHandler.h | 181 --- 26 files changed, 4702 deletions(-) delete mode 100644 externals/nitro/externals/coda-oss/UnitTest/UnitTest.vcxproj delete mode 100644 externals/nitro/externals/coda-oss/UnitTest/UnitTest.vcxproj.filters delete mode 100644 externals/nitro/externals/coda-oss/UnitTest/pch.h delete mode 100644 externals/nitro/externals/coda-oss/UnitTest/types.cpp delete mode 100644 externals/nitro/externals/coda-oss/modules/c++/coda-oss-lite.vcxproj delete mode 100644 externals/nitro/externals/coda-oss/modules/c++/coda-oss-lite.vcxproj.filters delete mode 100644 externals/nitro/externals/coda-oss/modules/c++/coda_oss/include/coda_oss/cstddef.h delete mode 100644 externals/nitro/externals/coda-oss/modules/c++/coda_oss/include/coda_oss/type_traits.h delete mode 100644 externals/nitro/externals/coda-oss/modules/c++/mem/include/mem/AutoPtr.h delete mode 100644 externals/nitro/externals/coda-oss/modules/c++/mem/include/mem/ScopedPtr.h delete mode 100644 externals/nitro/externals/coda-oss/modules/c++/mem/include/mem/SharedPtrCpp11.h delete mode 100644 externals/nitro/externals/coda-oss/modules/c++/std/include/import/cpp14.h delete mode 100644 externals/nitro/externals/coda-oss/modules/c++/std/include/std/cstddef delete mode 100644 externals/nitro/externals/coda-oss/modules/c++/std/include/std/memory delete mode 100644 externals/nitro/externals/coda-oss/modules/c++/std/include/std/optional delete mode 100644 externals/nitro/externals/coda-oss/modules/c++/std/include/std/type_traits delete mode 100644 externals/nitro/externals/coda-oss/modules/c++/str/include/str/Manip.h delete mode 100644 externals/nitro/externals/coda-oss/modules/c++/str/source/EncodedStringView.cpp delete mode 100644 externals/nitro/externals/coda-oss/modules/c++/str/source/Manip.cpp delete mode 100644 externals/nitro/externals/coda-oss/modules/c++/sys/include/sys/ByteSwapValue.h delete mode 100644 externals/nitro/externals/coda-oss/modules/c++/types/CMakeLists.txt delete mode 100644 externals/nitro/externals/coda-oss/modules/c++/types/include/types/complex.h delete mode 100644 externals/nitro/externals/coda-oss/modules/c++/types/unittests/test_complex.cpp delete mode 100644 externals/nitro/externals/coda-oss/modules/c++/types/wscript delete mode 100644 externals/nitro/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/Document.h delete mode 100644 externals/nitro/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/MinidomHandler.h diff --git a/externals/nitro/externals/coda-oss/UnitTest/UnitTest.vcxproj b/externals/nitro/externals/coda-oss/UnitTest/UnitTest.vcxproj deleted file mode 100644 index 53ad1802e..000000000 --- a/externals/nitro/externals/coda-oss/UnitTest/UnitTest.vcxproj +++ /dev/null @@ -1,379 +0,0 @@ - - - - - Debug - x64 - - - Release - x64 - - - - 17.0 - {34A31B3F-47C5-441D-AB22-3C85B3C5314E} - Win32Proj - UnitTest - 10.0 - NativeUnitTestProject - - - - DynamicLibrary - true - v143 - false - Unicode - - - DynamicLibrary - false - v143 - true - false - Unicode - - - - - - - - - - - - - - - true - - - false - - - - Use - Level4 - true - $(VCInstallDir)UnitTest\include;$(ProjectDir);$(SolutionDir)modules\c++\;$(SolutionDir)modules\c++\avx\include\;$(SolutionDir)modules\c++\cli\include\;$(SolutionDir)modules\c++\config\include\;$(SolutionDir)modules\c++\coda_oss\include\;$(SolutionDir)modules\c++\gsl\include\;$(SolutionDir)modules\c++\io\include\;$(SolutionDir)modules\c++\std\include\;$(SolutionDir)modules\c++\str\include\;$(SolutionDir)modules\c++\sys\include\;$(SolutionDir)modules\c++\except\include\;$(SolutionDir)modules\c++\logging\include\;$(SolutionDir)modules\c++\math\include\;$(SolutionDir)modules\c++\math.linear\include\;$(SolutionDir)modules\c++\math.poly\include\;$(SolutionDir)modules\c++\mem\include\;$(SolutionDir)modules\c++\mt\include\;$(SolutionDir)modules\c++\polygon\include\;$(SolutionDir)modules\c++\re\include\;$(SolutionDir)modules\c++\types\include\;$(SolutionDir)modules\c++\units\include\;%(AdditionalIncludeDirectories) - _DEBUG;%(PreprocessorDefinitions);MT_DEFAULT_PINNING=0;RE_ENABLE_STD_REGEX=1 - true - pch.h - true - true - Guard - ProgramDatabase - true - true - true - true - true - /Zc:__cplusplus %(AdditionalOptions) - stdcpp17 - - - Windows - $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) - - - - - Use - Level3 - true - true - true - $(VCInstallDir)UnitTest\include;$(ProjectDir);$(SolutionDir)modules\c++\;$(SolutionDir)modules\c++\avx\include\;$(SolutionDir)modules\c++\cli\include\;$(SolutionDir)modules\c++\config\include\;$(SolutionDir)modules\c++\coda_oss\include\;$(SolutionDir)modules\c++\gsl\include\;$(SolutionDir)modules\c++\io\include\;$(SolutionDir)modules\c++\std\include\;$(SolutionDir)modules\c++\str\include\;$(SolutionDir)modules\c++\sys\include\;$(SolutionDir)modules\c++\except\include\;$(SolutionDir)modules\c++\logging\include\;$(SolutionDir)modules\c++\math\include\;$(SolutionDir)modules\c++\math.linear\include\;$(SolutionDir)modules\c++\math.poly\include\;$(SolutionDir)modules\c++\mem\include\;$(SolutionDir)modules\c++\mt\include\;$(SolutionDir)modules\c++\polygon\include\;$(SolutionDir)modules\c++\re\include\;$(SolutionDir)modules\c++\types\include\;$(SolutionDir)modules\c++\units\include\;%(AdditionalIncludeDirectories) - NDEBUG;%(PreprocessorDefinitions);MT_DEFAULT_PINNING=0;RE_ENABLE_STD_REGEX=1 - true - pch.h - true - Guard - true - true - true - true - true - /Zc:__cplusplus %(AdditionalOptions) - stdcpp17 - - - Windows - true - true - $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories) - - - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - - - - - - - - - - Create - Create - - - - - - - - - - - - - - - - {9997e895-5161-4ddf-8f3f-099894cb2f21} - - - - - - \ No newline at end of file diff --git a/externals/nitro/externals/coda-oss/UnitTest/UnitTest.vcxproj.filters b/externals/nitro/externals/coda-oss/UnitTest/UnitTest.vcxproj.filters deleted file mode 100644 index fd7344987..000000000 --- a/externals/nitro/externals/coda-oss/UnitTest/UnitTest.vcxproj.filters +++ /dev/null @@ -1,280 +0,0 @@ - - - - - - - mt - - - mt - - - mt - - - mt - - - mt - - - mt - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - cli - - - cli - - - io - - - io - - - io - - - io - - - math - - - math - - - math - - - math - - - math - - - math - - - math - - - math.linear - - - math.poly - - - math.linear - - - math.linear - - - math.linear - - - math.linear - - - math.linear - - - math.linear - - - math.linear - - - math.linear - - - math.linear - - - math.poly - - - math.poly - - - math.poly - - - math.poly - - - math.poly - - - math.poly - - - math.poly - - - mem - - - polygon - - - str - - - types - - - units - - - units - - - types - - - types - - - types - - - str - - - str - - - mem - - - mem - - - mem - - - mem - - - mem - - - mem - - - mem - - - polygon - - - avx - - - avx - - - logging - - - logging - - - logging - - - re - - - re - - - mt - - - types - - - - - - - - - {ea90a933-47d1-448a-8265-3742d1ce18f8} - - - {e3f97021-8c19-46cb-962c-d1cea71da3a2} - - - {4e86a44b-1997-42e6-86bc-f4167698b3a1} - - - {5f9ed5ed-863e-4dd6-a5dd-e22758218112} - - - {d343bd9f-8b19-4740-bdf8-39d687ab56bf} - - - {a4045a72-e6a4-4421-9eab-818136f2d22c} - - - {90e2ffd7-1b9a-4096-b2fa-b41159333682} - - - {cf1423ec-9599-4936-9563-afdcdda85f62} - - - {331ec48a-ac3a-4a63-b410-23701adec599} - - - {87b5dc54-ceaf-4f37-b074-41b295b8a92d} - - - {d444ddb7-6b00-495a-94d6-a2674cbfea83} - - - {7a48027a-9dd9-4700-a6fc-703dc7468721} - - - {0afb2127-0ee7-46d6-963c-132a7830a7d7} - - - {3baea66d-2852-40fe-8482-e3f6ba1a81e0} - - - {d205c017-7e98-456f-923f-2f78870a3d7d} - - - \ No newline at end of file diff --git a/externals/nitro/externals/coda-oss/UnitTest/pch.h b/externals/nitro/externals/coda-oss/UnitTest/pch.h deleted file mode 100644 index 26d745b78..000000000 --- a/externals/nitro/externals/coda-oss/UnitTest/pch.h +++ /dev/null @@ -1,102 +0,0 @@ -// pch.h: This is a precompiled header file. -// Files listed below are compiled only once, improving build performance for future builds. -// This also affects IntelliSense performance, including code completion and many code browsing features. -// However, files listed here are ALL re-compiled if any one of them is updated between builds. -// Do not add files here that you will be updating frequently as this negates the performance advantage. - -#ifndef PCH_H -#define PCH_H - -// add headers that you want to pre-compile here - -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers -#pragma warning(push) -#pragma warning(disable: 5105) // macro expansion producing '...' has undefined behavior -#include -#include -#include -#pragma warning(pop) -#undef min -#undef max - -#define _USE_MATH_DEFINES -#include -#include - -#include "import/std.h" - -#include -#include -#include -#include -#include -#include -#include // std::endian - -#include "CppUnitTest.h" - -#include "coda_oss/span.h" -#include "gsl/gsl.h" -#include "import/sys.h" -#include "import/math.h" -#include "import/str.h" -#include "str/EncodedStringView.h" -#include "import/except.h" -#include "import/mem.h" -#include -#include -#include -#include "import/cli.h" -#include "polygon/DrawPolygon.h" -#include "polygon/PolygonMask.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "io/StringStream.h" - -#include "TestCase.h" - -#endif //PCH_H diff --git a/externals/nitro/externals/coda-oss/UnitTest/types.cpp b/externals/nitro/externals/coda-oss/UnitTest/types.cpp deleted file mode 100644 index 3d03155b3..000000000 --- a/externals/nitro/externals/coda-oss/UnitTest/types.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include "pch.h" -#include "CppUnitTest.h" - -namespace types -{ -TEST_CLASS(test_page_row_col){ public: -#include "types/unittests/test_page_row_col.cpp" -}; - -TEST_CLASS(test_range){ public: -#include "types/unittests/test_range.cpp" -}; - -TEST_CLASS(test_range_list){ public: -#include "types/unittests/test_range_list.cpp" -}; - -TEST_CLASS(test_complex){ public: -#include "types/unittests/test_complex.cpp" -}; - -} \ No newline at end of file diff --git a/externals/nitro/externals/coda-oss/modules/c++/coda-oss-lite.vcxproj b/externals/nitro/externals/coda-oss/modules/c++/coda-oss-lite.vcxproj deleted file mode 100644 index 7e132aa6f..000000000 --- a/externals/nitro/externals/coda-oss/modules/c++/coda-oss-lite.vcxproj +++ /dev/null @@ -1,514 +0,0 @@ - - - - - Debug - x64 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create - Create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 16.0 - Win32Proj - {9997e895-5161-4ddf-8f3f-099894cb2f21} - codaoss - 10.0 - coda-oss-lite - - - - DynamicLibrary - true - v143 - - - DynamicLibrary - false - v143 - true - - - - - - - - - - - - - - - true - true - AllRules.ruleset - - - false - - - - EnableAllWarnings - true - _DEBUG;_LIB;%(PreprocessorDefinitions);CODA_OSS_EXPORTS;CODA_OSS_DLL;MT_DEFAULT_PINNING=0;RE_ENABLE_STD_REGEX=1 - pch.h - cli\include\;coda_oss\include;config\include\;except\include\;gsl\include\;io\include\;logging\include\;math\include\;math.linear\include\;math.poly\include\;mem\include\;mt\include\;plugin\include\;polygon\include\;re\include\;sio.lite\include\;std\include\;str\include\;sys\include\;tiff\include;types\include\;units\include\ - Use - pch.h - true - Guard - ProgramDatabase - true - true - true - true - true - /Zc:__cplusplus %(AdditionalOptions) - true - stdcpp17 - - - - - true - - - - - Level3 - true - true - true - NDEBUG;_LIB;%(PreprocessorDefinitions);CODA_OSS_EXPORTS;CODA_OSS_DLL;MT_DEFAULT_PINNING=0;RE_ENABLE_STD_REGEX=1 - pch.h - cli\include\;coda_oss\include;config\include\;except\include\;gsl\include\;io\include\;logging\include\;math\include\;math.linear\include\;math.poly\include\;mem\include\;mt\include\;plugin\include\;polygon\include\;re\include\;sio.lite\include\;std\include\;str\include\;sys\include\;tiff\include;types\include\;units\include\ - Use - pch.h - true - Guard - true - true - true - true - true - /Zc:__cplusplus %(AdditionalOptions) - stdcpp17 - - - - - true - true - true - - - - - - \ No newline at end of file diff --git a/externals/nitro/externals/coda-oss/modules/c++/coda-oss-lite.vcxproj.filters b/externals/nitro/externals/coda-oss/modules/c++/coda-oss-lite.vcxproj.filters deleted file mode 100644 index 428dcd63a..000000000 --- a/externals/nitro/externals/coda-oss/modules/c++/coda-oss-lite.vcxproj.filters +++ /dev/null @@ -1,1226 +0,0 @@ - - - - - - - config - - - config - - - gsl - - - gsl - - - gsl - - - gsl - - - coda_oss - - - coda_oss - - - coda_oss - - - coda_oss - - - coda_oss - - - coda_oss - - - coda_oss - - - coda_oss - - - coda_oss - - - except - - - except - - - except - - - except - - - except - - - except - - - except - - - str - - - str - - - str - - - str - - - str - - - str - - - str - - - str - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - types - - - types - - - types - - - types - - - types - - - mem - - - mem - - - mem - - - mem - - - mem - - - mem - - - mem - - - mem - - - mem - - - mem - - - mem - - - mem - - - mem - - - mem - - - math - - - math - - - math - - - math - - - math - - - units - - - units - - - units - - - math.linear - - - math.linear - - - math.linear - - - math.linear - - - math.linear - - - math.linear - - - math.poly - - - math.poly - - - math.poly - - - math.poly - - - math.poly - - - math.poly - - - math.poly - - - math.poly - - - polygon - - - polygon - - - polygon - - - config - - - include - - - cli - - - cli - - - cli - - - cli - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - mt - - - mt - - - mt - - - mt - - - mt - - - mt - - - mt - - - mt - - - mt - - - mt - - - mt - - - mt - - - mt - - - mt - - - mt - - - mt - - - mt - - - mt - - - mt - - - mt - - - mt - - - mt - - - mt - - - mt - - - mt - - - avx - - - logging - - - logging - - - logging - - - logging - - - logging - - - logging - - - logging - - - logging - - - logging - - - logging - - - logging - - - logging - - - logging - - - logging - - - logging - - - logging - - - logging - - - logging - - - re - - - re - - - re - - - sio.lite - - - sio.lite - - - sio.lite - - - sio.lite - - - sio.lite - - - sio.lite - - - sio.lite - - - sio.lite - - - sio.lite - - - tiff - - - tiff - - - tiff - - - tiff - - - tiff - - - tiff - - - tiff - - - tiff - - - tiff - - - tiff - - - tiff - - - tiff - - - tiff - - - tiff - - - sio.lite - - - sio.lite - - - plugin - - - plugin - - - plugin - - - sys - - - mem - - - mem - - - std - - - std - - - std - - - config - - - sys - - - sys - - - mt - - - sys - - - sys - - - types - - - - - - except - - - except - - - except - - - except - - - str - - - str - - - str - - - str - - - str - - - str - - - str - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - sys - - - types - - - types - - - mem - - - mem - - - math - - - math - - - math - - - math.linear - - - polygon - - - cli - - - cli - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - io - - - mt - - - mt - - - mt - - - mt - - - mt - - - mt - - - logging - - - logging - - - logging - - - logging - - - logging - - - logging - - - logging - - - logging - - - logging - - - logging - - - logging - - - logging - - - logging - - - logging - - - re - - - re - - - sio.lite - - - sio.lite - - - sio.lite - - - sio.lite - - - tiff - - - tiff - - - tiff - - - tiff - - - tiff - - - tiff - - - tiff - - - tiff - - - tiff - - - tiff - - - tiff - - - plugin - - - sys - - - sys - - - - - {89602880-5929-45e9-a603-d13f81972397} - - - {619ad1da-f21c-4027-9b5d-23f08225b96f} - - - {59f3d9a1-06d3-4779-aef2-cc55223c3017} - - - {3051f4b6-dad4-47ea-b4bd-d25d9e09f782} - - - {44a8dfa7-099c-4dd5-87b6-3b05ce13580b} - - - {d714ac63-ef19-4629-a13f-59b550604842} - - - {d8059280-e435-4365-be67-865195b9e813} - - - {3613caf2-18d1-4af7-bfa0-a3712a44da45} - - - {0e318d08-1ee3-4644-a299-a81e436c9a32} - - - {6d8f380f-54e3-4d0d-bd1a-a2edd0efbaa7} - - - {1bf84676-4c62-4e2b-b943-59bf82f89126} - - - {b3d7f0e3-2e9f-4a19-b181-27cace7536c0} - - - {15f9b62f-d17e-4d84-bc34-de6fd5fbcb33} - - - {f2544ccb-0933-44c7-af39-cd986982af3d} - - - {9050a469-23a5-4da0-92b1-a07a8e52e9fc} - - - {de76f131-1cd6-4c3d-aa9c-37ca3b5079f0} - - - {cc681a99-da96-483e-a92a-eab0ea3a0ec0} - - - {4875d8c0-f285-460a-98a9-38a60f3fcffd} - - - {9720bf2c-6d77-4685-9318-d6e714065c99} - - - {9f9acff4-c149-4908-ae9d-67557974f4ee} - - - {83ae731c-66f7-468c-bc71-7cb57a363b5b} - - - {327a7b72-9a2d-48e4-9c23-2b5b9d2f3519} - - - {d76b6d3f-51f8-4cf8-bc56-35f720080a8b} - - - {387bc6cb-323a-42b3-8502-4fac72586d12} - - - - - gsl - - - gsl - - - gsl - - - gsl - - - gsl - - - gsl - - - gsl - - - gsl - - - gsl - - - gsl - - - std - - - std - - - std - - - std - - - std - - - std - - - std - - - std - - - sys - - - \ No newline at end of file diff --git a/externals/nitro/externals/coda-oss/modules/c++/coda_oss/include/coda_oss/cstddef.h b/externals/nitro/externals/coda-oss/modules/c++/coda_oss/include/coda_oss/cstddef.h deleted file mode 100644 index 68a7ad5dc..000000000 --- a/externals/nitro/externals/coda-oss/modules/c++/coda_oss/include/coda_oss/cstddef.h +++ /dev/null @@ -1,32 +0,0 @@ -/* ========================================================================= - * This file is part of coda_oss-c++ - * ========================================================================= - * - * (C) Copyright 2020, Maxar Technologies, Inc. - * - * coda_oss-c++ is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; If not, http://www.gnu.org/licenses/. - * - */ -#pragma once -#ifndef CODA_OSS_coda_oss_cstddef_h_INCLUDED_ -#define CODA_OSS_coda_oss_cstddef_h_INCLUDED_ - -#include - -namespace coda_oss -{ - using byte = std::byte; -} - -#endif // CODA_OSS_coda_oss_cstddef_h_INCLUDED_ diff --git a/externals/nitro/externals/coda-oss/modules/c++/coda_oss/include/coda_oss/type_traits.h b/externals/nitro/externals/coda-oss/modules/c++/coda_oss/include/coda_oss/type_traits.h deleted file mode 100644 index a5a3df63a..000000000 --- a/externals/nitro/externals/coda-oss/modules/c++/coda_oss/include/coda_oss/type_traits.h +++ /dev/null @@ -1,33 +0,0 @@ -/* ========================================================================= - * This file is part of coda_oss-c++ - * ========================================================================= - * - * (C) Copyright 2022, Maxar Technologies, Inc. - * - * coda_oss-c++ is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; If not, http://www.gnu.org/licenses/. - * - */ -#ifndef CODA_OSS_coda_oss_type_traits_h_INCLUDED_ -#define CODA_OSS_coda_oss_type_traits_h_INCLUDED_ -#pragma once - -#include - -#include "coda_oss/namespace_.h" -namespace coda_oss -{ -using std::is_trivially_copyable; -} - -#endif // CODA_OSS_coda_oss_type_traits_h_INCLUDED_ diff --git a/externals/nitro/externals/coda-oss/modules/c++/mem/include/mem/AutoPtr.h b/externals/nitro/externals/coda-oss/modules/c++/mem/include/mem/AutoPtr.h deleted file mode 100644 index ee3eba601..000000000 --- a/externals/nitro/externals/coda-oss/modules/c++/mem/include/mem/AutoPtr.h +++ /dev/null @@ -1,133 +0,0 @@ -/* ========================================================================= - * This file is part of mem-c++ - * ========================================================================= - * - * (C) Copyright 2004 - 2018, MDA Information Systems LLC - * (C) Copyright 2022, Maxar Technologies, Inc. - * - * mem-c++ is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; If not, - * see . - * - */ - -#ifndef CODA_OSS_mem_AutoPtr_h_INCLUDED_ -#define CODA_OSS_mem_AutoPtr_h_INCLUDED_ -#pragma once - -#include - -#include "mem/SharedPtr.h" - -namespace mem -{ -// std::auto_ptr (deprecated in C++17) is copyable while -// std::unique_ptr (new in C++11) isn't. While unique_ptr -// is right, making the change doesn't always work well with -// legacy code. Using shared_ptr instead of unique_ptr is -// copyable, but that changes semantics: the "old" copied-from -// object is still valid. -// -// Thus, this class to help make the transition easier. -// Using (very) sparingly! - -template -class AutoPtr final -{ - std::unique_ptr ptr_; - -public: - // https://en.cppreference.com/w/cpp/memory/auto_ptr/auto_ptr - explicit AutoPtr(T* p = nullptr) noexcept : ptr_(p) - { - } - - AutoPtr& operator=(AutoPtr& r) noexcept - { - reset(r.release()); - return *this; - } - AutoPtr(AutoPtr& r) noexcept - { - *this = r; - } - AutoPtr& operator=(const AutoPtr&) = delete; // can't change a "const" object - AutoPtr(const AutoPtr&) = delete; - - ~AutoPtr() = default; - AutoPtr(AutoPtr&&) = default; - AutoPtr& operator=(AutoPtr&&) = default; - - template - AutoPtr& operator=(std::unique_ptr&& p) noexcept - { - ptr_ = std::move(p); - return *this; - } - template - AutoPtr(std::unique_ptr&& p) noexcept - { - *this = std::move(p); - } - - template // std::auto_ptr can cause deprecated warnings - AutoPtr& assign(TAutoPtr p) noexcept - { - ptr_.reset(p.release()); - return *this; - } - template // std::auto_ptr can cause deprecated warnings - AutoPtr& operator=(TAutoPtr p) noexcept - { - return assign(p); - } - template // std::auto_ptr can cause deprecated warnings - AutoPtr(TAutoPtr p) noexcept - { - *this = assign(p); - } - - - T* get() const noexcept - { - return ptr_.get(); - } - - T* release() noexcept - { - return ptr_.release(); - } - - template - void reset(U* p = nullptr) noexcept - { - ptr_.reset(p); - } - - T& operator*() const noexcept - { - return *get(); - } - T* operator->() const noexcept - { - return get(); - } - - operator std::unique_ptr& () { return ptr_; } - operator const std::unique_ptr& () const { return ptr_; } - -}; - -} // namespace mem - -#endif // CODA_OSS_mem_AutoPtr_h_INCLUDED_ diff --git a/externals/nitro/externals/coda-oss/modules/c++/mem/include/mem/ScopedPtr.h b/externals/nitro/externals/coda-oss/modules/c++/mem/include/mem/ScopedPtr.h deleted file mode 100644 index 8b1c1d075..000000000 --- a/externals/nitro/externals/coda-oss/modules/c++/mem/include/mem/ScopedPtr.h +++ /dev/null @@ -1,165 +0,0 @@ -/* ========================================================================= - * This file is part of mem-c++ - * ========================================================================= - * - * (C) Copyright 2004 - 2014, MDA Information Systems LLC - * (C) Copyright 2021, Maxar Technologies, Inc. - * - * mem-c++ is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; If not, - * see . - * - */ - -#pragma once -#ifndef CODA_OSS_mem_ScopedPtr_h_INCLUDED_ -#define CODA_OSS_mem_ScopedPtr_h_INCLUDED_ - -#include - -#include -#include -#include - -#include "sys/Conf.h" -#include "mem/SharedPtr.h" - -namespace mem -{ -/*! - * \class ScopedPtr - * \brief This class provides RAII for object allocations via new. It is a - * light wrapper around std::unique_ptr and has the same semantics - * except that the copy constructor and assignment operator are deep - * copies (by using T's clone() method) rather than transferring - * ownership. - * - * This is useful for cases where you have a class which has a member - * variable that's dynamically allocated and you want to provide a - * valid copy constructor / assignment operator. With raw pointers or - * std::unique_ptr's, you'll have to write the copy constructor / - * assignment operator for this class - this is tedious and - * error-prone since you need to include all the members in the class. - * Using ScopedCloneablePtr's instead, the compiler-generated copy - * constructor and assignment operator for your class will be correct - * (if all the other member variables are POD or have correct - * copy constructors / assignment operators). - */ -template -class ScopedPtr -{ - std::unique_ptr mPtr; - - void duplicate(const T& from, std::true_type) - { - reset(from.clone()); - } - void duplicate(const T& from, std::false_type) - { - reset(std::make_unique(from)); - } - -public: - explicit ScopedPtr(T* ptr = nullptr) - { - reset(ptr); - } - - explicit ScopedPtr(std::unique_ptr&& ptr) - { - reset(std::move(ptr)); - } - - ScopedPtr(const ScopedPtr& rhs) - { - *this = rhs; - } - - const ScopedPtr& operator=(const ScopedPtr& rhs) - { - if (this != &rhs) - { - auto rhs_ptr = rhs.get(); - if (rhs_ptr != nullptr) - { - duplicate(*rhs_ptr, TCopyIsClone()); - } - else - { - reset(); - } - } - - return *this; - } - - ScopedPtr(ScopedPtr&&) = default; - ScopedPtr& operator=(ScopedPtr&&) = default; - - bool operator==(const ScopedPtr& rhs) const noexcept - { - auto ptr = get(); - auto rhs_ptr = rhs.get(); - if (ptr == nullptr && rhs_ptr == nullptr) - { - return true; // both NULL: equal - } - if (ptr == nullptr || rhs_ptr == nullptr) - { - return false; // either NULL, but not both (above): not equal - } - return *ptr == *rhs_ptr; // compare the (non-NULL) objects - } - - bool operator!=(const ScopedPtr& rhs) const noexcept - { - return !(*this == rhs); - } - - explicit operator bool() const noexcept - { - return get() == nullptr ? false : true; - } - - T* get() const noexcept - { - return mPtr.get(); - } - - T& operator*() const - { - auto ptr = get(); - assert(ptr != nullptr); - return *ptr; - } - - T* operator->() const noexcept - { - auto ptr = get(); - assert(ptr != nullptr); - return ptr; - } - - void reset(T* ptr = nullptr) - { - mPtr.reset(ptr); - } - - void reset(std::unique_ptr&& ptr) - { - mPtr = std::move(ptr); - } -}; -} - -#endif // CODA_OSS_mem_ScopedPtr_h_INCLUDED_ diff --git a/externals/nitro/externals/coda-oss/modules/c++/mem/include/mem/SharedPtrCpp11.h b/externals/nitro/externals/coda-oss/modules/c++/mem/include/mem/SharedPtrCpp11.h deleted file mode 100644 index 619d7b045..000000000 --- a/externals/nitro/externals/coda-oss/modules/c++/mem/include/mem/SharedPtrCpp11.h +++ /dev/null @@ -1,49 +0,0 @@ -/* ========================================================================= - * This file is part of mem-c++ - * ========================================================================= - * - * (C) Copyright 2004 - 2018, MDA Information Systems LLC - * - * mem-c++ is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; If not, - * see . - * - */ - -#pragma once -#ifndef CODA_OSS_mem_SharedPtrCpp11_h_INCLUDED_ -#define CODA_OSS_mem_SharedPtrCpp11_h_INCLUDED_ - -#include -#include - -#include "sys/CPlusPlus.h" - -namespace mem -{ -// Pretty much give-up on mem::SharedPtr as it's too hard to get something that will -// compile with all the different compilers; let somebody else worry about that -// via std::shared_ptr. The only code change is use_count() instead of getCount(), -// and that's mostly used in unit-tests. -template -using SharedPtr = std::shared_ptr; -} // namespace mem - -// try to make code changes a tiny bit easier? -template -inline long getCount(const std::shared_ptr& p) noexcept // be sure const& so that calling doesn't increment! -{ - return p.use_count(); -} - -#endif // CODA_OSS_mem_SharedPtrCpp11_h_INCLUDED_ diff --git a/externals/nitro/externals/coda-oss/modules/c++/std/include/import/cpp14.h b/externals/nitro/externals/coda-oss/modules/c++/std/include/import/cpp14.h deleted file mode 100644 index 1bc2640a5..000000000 --- a/externals/nitro/externals/coda-oss/modules/c++/std/include/import/cpp14.h +++ /dev/null @@ -1,60 +0,0 @@ -/* ========================================================================= - * This file is part of std-c++ - * ========================================================================= - * - * (C) Copyright 2004 - 2014, MDA Information Systems LLC - * (C) Copyright 2023, Maxar Technologies, Inc. - * - * std-c++ is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; If not, - * see . - * - */ - -#pragma once -#ifndef CODA_OSS_import_cpp14_h_INCLUDED_ -#define CODA_OSS_import_cpp14_h_INCLUDED_ - -// Common C++14 headers -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#endif // CODA_OSS_import_cpp14_h_INCLUDED_ - - diff --git a/externals/nitro/externals/coda-oss/modules/c++/std/include/std/cstddef b/externals/nitro/externals/coda-oss/modules/c++/std/include/std/cstddef deleted file mode 100644 index 794d21efb..000000000 --- a/externals/nitro/externals/coda-oss/modules/c++/std/include/std/cstddef +++ /dev/null @@ -1,27 +0,0 @@ -/* ========================================================================= - * This file is part of std-c++ - * ========================================================================= - * - * (C) Copyright 2021, Maxar Technologies, Inc. - * - * std-c++ is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; If not, http://www.gnu.org/licenses/. - * - */ -#pragma once -#ifndef CODA_OSS_std_cstddef_INCLUDED_ -#define CODA_OSS_std_cstddef_INCLUDED_ - -#include - -#endif // CODA_OSS_std_cstddef_INCLUDED_ \ No newline at end of file diff --git a/externals/nitro/externals/coda-oss/modules/c++/std/include/std/memory b/externals/nitro/externals/coda-oss/modules/c++/std/include/std/memory deleted file mode 100644 index 4cbd01d7c..000000000 --- a/externals/nitro/externals/coda-oss/modules/c++/std/include/std/memory +++ /dev/null @@ -1,27 +0,0 @@ -/* ========================================================================= - * This file is part of std-c++ - * ========================================================================= - * - * (C) Copyright 2021, Maxar Technologies, Inc. - * - * std-c++ is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; If not, http://www.gnu.org/licenses/. - * - */ -#pragma once -#ifndef CODA_OSS_std_memory_INCLUDED_ -#define CODA_OSS_std_memory_INCLUDED_ - -#include - -#endif // CODA_OSS_std_memory_INCLUDED_ \ No newline at end of file diff --git a/externals/nitro/externals/coda-oss/modules/c++/std/include/std/optional b/externals/nitro/externals/coda-oss/modules/c++/std/include/std/optional deleted file mode 100644 index 54345783f..000000000 --- a/externals/nitro/externals/coda-oss/modules/c++/std/include/std/optional +++ /dev/null @@ -1,27 +0,0 @@ -/* ========================================================================= - * This file is part of std-c++ - * ========================================================================= - * - * (C) Copyright 2021, Maxar Technologies, Inc. - * - * std-c++ is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; If not, http://www.gnu.org/licenses/. - * - */ -#pragma once -#ifndef CODA_OSS_std_optional_INCLUDED_ -#define CODA_OSS_std_optional_INCLUDED_ - -#include - -#endif // CODA_OSS_std_optional_INCLUDED_ \ No newline at end of file diff --git a/externals/nitro/externals/coda-oss/modules/c++/std/include/std/type_traits b/externals/nitro/externals/coda-oss/modules/c++/std/include/std/type_traits deleted file mode 100644 index cbcd0bfd8..000000000 --- a/externals/nitro/externals/coda-oss/modules/c++/std/include/std/type_traits +++ /dev/null @@ -1,28 +0,0 @@ -/* ========================================================================= - * This file is part of std-c++ - * ========================================================================= - * - * (C) Copyright 2022, Maxar Technologies, Inc. - * - * std-c++ is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; If not, http://www.gnu.org/licenses/. - * - */ -#pragma once -#ifndef CODA_OSS_std_type_traits_INCLUDED_ -#define CODA_OSS_std_type_traits_INCLUDED_ - -#include - -#endif // CODA_OSS_std_type_traits_INCLUDED_ - diff --git a/externals/nitro/externals/coda-oss/modules/c++/str/include/str/Manip.h b/externals/nitro/externals/coda-oss/modules/c++/str/include/str/Manip.h deleted file mode 100644 index ee95a4663..000000000 --- a/externals/nitro/externals/coda-oss/modules/c++/str/include/str/Manip.h +++ /dev/null @@ -1,207 +0,0 @@ -/* ========================================================================= - * This file is part of str-c++ - * ========================================================================= - * - * (C) Copyright 2004 - 2014, MDA Information Systems LLC - * - * str-c++ is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; If not, - * see . - * - */ - -#ifndef __STR_MANIP_H__ -#define __STR_MANIP_H__ - -#include -#include - -#include -#include - -#include "config/compiler_extensions.h" -#include "config/Exports.h" -#include "coda_oss/CPlusPlus.h" -#include "coda_oss/string.h" -#include "str/Convert.h" - -namespace str -{ - -CODA_OSS_disable_warning_push -#if _MSC_VER -#pragma warning(disable: 26460) //The reference argument 's' for function 'str::data' can be marked as const (con.3). -#endif - // non-const overload for .data() in C++17 -template -inline CharT* data(std::basic_string& s) noexcept -{ - return s.data(); -} -CODA_OSS_disable_warning_pop -template -inline const CharT* data(const std::basic_string& s) noexcept // to make generic programming easier -{ - return s.data(); -} - -/** - * Trim the white space off the back and front of a string - * @param s String to trim - */ -CODA_OSS_API void trim(std::string& s); -CODA_OSS_API std::string trim(const std::string& s); -CODA_OSS_API void trim(coda_oss::u8string& s); -CODA_OSS_API coda_oss::u8string trim(const coda_oss::u8string& s); - -/** - * Checks the end of s with match - * @param s String to check - * @param match String to compare with - * @return true if it matches, otherwise false - */ -CODA_OSS_API bool endsWith(const std::string& s, const std::string& match); -CODA_OSS_API bool ends_with(const std::string& s, const std::string&) noexcept; - -/** - * Checks the start of s with match - * @param s String to check - * @param s String to compare with - * @return true if it matches, otherwise false - */ -CODA_OSS_API bool startsWith(const std::string& s, const std::string& match); -CODA_OSS_API bool starts_with(const std::string& s, const std::string&) noexcept; - - -/** - * finds the first instance of "search" and - * substitutes it for "replace", it then returns - * the start of search, so you can loop and replace - * all instances of "search". - * @param str String to check - * @param search String to search for - * @param replace String to replace with - * @param start starting position to start search - * @return position of first find, str.length() if not found - */ -CODA_OSS_API size_t replace(std::string& str, - const std::string& search, - const std::string& replace, - size_t start = 0); - -/** - * finds all instances of "search" and - * substitutes them for "replace" - * @param string String to check - * @param search String to search for - * @param replace String to replace with - */ -CODA_OSS_API void replaceAll(std::string& string, - const std::string& search, - const std::string& replace); - -/** - * Returns true if the string contains the match - */ -CODA_OSS_API bool contains(const std::string& str, const std::string& match); - - -/** - * Returns true if the string contains only letters. - */ -CODA_OSS_API bool isAlpha(const std::string& s); - -/** - * Returns true if the string contains only letters and spaces. - */ -CODA_OSS_API bool isAlphaSpace(const std::string& s); - -/** - * Returns true if the string contains only digits. This does not include - * decimal points. - */ -CODA_OSS_API bool isNumeric(const std::string& s); - -/** - * Returns true if the string contains only digits and spaces. - */ -CODA_OSS_API bool isNumericSpace(const std::string& s); - -/** - * Returns true if the string contains only whitespace characters (or empty). - */ -CODA_OSS_API bool isWhitespace(const std::string& s); - -/** - * Returns true if the string contains only letters and digits. - */ -CODA_OSS_API bool isAlphanumeric(const std::string& s); - -/** - * Returns true if the string contains only ASCII printable characters. - */ -CODA_OSS_API bool isAsciiPrintable(const std::string& s); - -/** - * Returns true if the string contains only the given allowed characters. - */ -CODA_OSS_API bool containsOnly(const std::string& s, const std::string& validChars); - -/** - * Splits a string based on a splitter string. Similar to tokenization, except - * the splitter string can be of any length. - * @param s String to check - * @param splitter String to split upon - * @return vector of strings - */ -CODA_OSS_API std::vector split(const std::string& s, - const std::string& splitter = " ", - size_t maxSplit = std::string::npos); - -//! Uses std::transform to convert all chars to lower case -//! Uses std::transform to convert all chars to upper case -CODA_OSS_API void lower(std::string& s); -CODA_OSS_API void upper(std::string& s); - -/*! - * Replaces any characters that are invalid in XML (&, <, >, ', ") with their - * escaped counterparts - */ -CODA_OSS_API void escapeForXML(std::string& str); - -template -inline std::string join(const std::vector& toks, const std::string& with) -{ - if (toks.empty()) - return ""; - - const auto len = toks.size(); - std::ostringstream oss; - size_t i = 0; - for (; i < len - 1; i++) - { - oss << str::toString(toks[i]) << with; - } - oss << str::toString(toks[i]); - return oss.str(); -} - -// CASE INSENSTIVE string comparision routines. -// Short names w/o a "case insenstive" indicator would seem OK as -// normal (i.e., case sensitive) comparisons will use `==` and `!=` operators. -CODA_OSS_API bool eq(const std::string& lhs, const std::string& rhs) noexcept; -CODA_OSS_API bool ne(const std::string& lhs, const std::string& rhs) noexcept; - -} - -#endif diff --git a/externals/nitro/externals/coda-oss/modules/c++/str/source/EncodedStringView.cpp b/externals/nitro/externals/coda-oss/modules/c++/str/source/EncodedStringView.cpp deleted file mode 100644 index 385293601..000000000 --- a/externals/nitro/externals/coda-oss/modules/c++/str/source/EncodedStringView.cpp +++ /dev/null @@ -1,215 +0,0 @@ -/* ========================================================================= - * This file is part of str-c++ - * ========================================================================= - * - * (C) Copyright 2004 - 2014, MDA Information Systems LLC - * (C) Copyright 2022, Maxar Technologies, Inc. - * - * str-c++ is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; If not, - * see . - * - */ - -#include "str/EncodedStringView.h" - -#include -#include - -#include -#include "coda_oss/span.h" - -#include "str/Convert.h" -#include "str/Encoding.h" -#include "str/EncodedString.h" - -enum class PlatformType -{ - Windows, - Linux, - // MacOS -}; - -#ifdef _WIN32 -static auto Platform = PlatformType::Windows; -#else -static auto Platform = PlatformType::Linux; -#endif - -inline std::u16string to_u16string(std::string::const_pointer s, size_t sz, bool is_utf8 /* is 's' UTF-8? */) -{ - if (is_utf8) - { - return str::to_u16string(str::cast(s), sz); - } - return str::to_u16string(str::cast(s), sz); -} - -static std::string to_native(coda_oss::u8string::const_pointer p, size_t sz) -{ - if (Platform == PlatformType::Windows) - { - std::string retval; - str::details::utf8to1252(p, sz, retval); - return retval; - } - if (Platform == PlatformType::Linux) - { - return std::string(str::cast(p), sz); - } - throw std::logic_error("Unknown platform."); -} - -static std::string to_native(str::W1252string::const_pointer p, size_t sz) -{ - if (Platform == PlatformType::Windows) - { - return std::string(str::cast(p), sz); - } - if (Platform == PlatformType::Linux) - { - std::string retval; - str::details::w1252to8(p, sz, retval); - return retval; - } - throw std::logic_error("Unknown platform."); -} - -template -inline coda_oss::span make_span(const CharT* s, size_t c) -{ - return coda_oss::span(s, c); -} -template -inline coda_oss::span make_span(const CharT* s) -{ - auto s_ = str::cast(s); - return make_span(s, strlen(s_)); -} -template -inline coda_oss::span make_span(const std::basic_string& s) -{ - return make_span(s.c_str(), s.size()); -} -template -inline coda_oss::span make_span(coda_oss::span s) -{ - auto s_ = str::cast(s.data()); - return coda_oss::span(s_, s.size()); -} - -str::EncodedStringView::EncodedStringView(std::string::const_pointer p, std::string::size_type c) : mString(make_span(p, c)) { } -str::EncodedStringView::EncodedStringView(std::string::const_pointer p) : mString(make_span(p)) { } -str::EncodedStringView::EncodedStringView(const std::string& s) : mString(make_span(s)){ } - -str::EncodedStringView::EncodedStringView(coda_oss::span s) : mString(make_span(s)), mIsUtf8(true) {} -str::EncodedStringView::EncodedStringView(coda_oss::u8string::const_pointer p, coda_oss::u8string::size_type c) : EncodedStringView(make_span(p, c)) { } -str::EncodedStringView::EncodedStringView(coda_oss::u8string::const_pointer p) : EncodedStringView(make_span(p)) { } -str::EncodedStringView::EncodedStringView(const coda_oss::u8string& s) : EncodedStringView(make_span(s)) { } - -str::EncodedStringView::EncodedStringView(coda_oss::span s) : mString(make_span(s)), mIsUtf8(false) {} -str::EncodedStringView::EncodedStringView(str::W1252string::const_pointer p, str::W1252string::size_type c) : EncodedStringView(make_span(p, c)) { } -str::EncodedStringView::EncodedStringView(str::W1252string::const_pointer p) : EncodedStringView(make_span(p)) { } -str::EncodedStringView::EncodedStringView(const str::W1252string& s) : EncodedStringView(make_span(s)) { } - -std::string str::EncodedStringView::native() const -{ - const auto s = mString.data(); - const auto sz = mString.size(); - return mIsUtf8 ? to_native(str::cast(s), sz) - : to_native(str::cast(s), sz); -} - -coda_oss::u8string str::EncodedStringView::u8string() const -{ - return mIsUtf8 ? - str::cast(mString.data()) : // copy - str::to_u8string(str::cast(mString.data()), mString.size()); -} -std::string str::EncodedStringView::asUtf8() const -{ - const auto result = u8string(); - return str::c_str(result); // cast & copy -} - -std::u16string str::EncodedStringView::u16string() const -{ - return ::to_u16string(mString.data(), mString.size(), mIsUtf8); -} - -inline std::u32string to_u32string(std::string::const_pointer s, size_t sz, bool is_utf8 /* is 's' UTF-8? */) -{ - if (is_utf8) - { - return str::to_u32string(str::cast(s), sz); - } - return str::to_u32string(str::cast(s), sz); -} -std::u32string str::EncodedStringView::u32string() const -{ - return ::to_u32string(mString.data(), mString.size(), mIsUtf8); -} - -std::wstring str::EncodedStringView::wstring() const // UTF-16 on Windows, UTF-32 on Linux -{ - const auto p = mString.data(); - const auto sz = mString.size(); - const auto s = - // Need to use #ifdef's because str::cast() checks to be sure the sizes are correct. - #ifdef _WIN32 - ::to_u16string(p, sz, mIsUtf8); // std::wstring is UTF-16 on Windows - #else - ::to_u32string(p, sz, mIsUtf8); // std::wstring is UTF-32 on Linux - #endif - return str::c_str(s); // copy -} - -str::W1252string str::EncodedStringView::w1252string() const -{ - return mIsUtf8 ? - str::to_w1252string(str::cast(mString.data()), mString.size()) : - str::cast(mString.data()); // copy -} -std::string str::EncodedStringView::asWindows1252() const -{ - const auto result = w1252string(); - return str::c_str(result); // cast & copy -} - -bool str::EncodedStringView::operator_eq(const EncodedStringView& rhs) const -{ - auto& lhs = *this; - - // if encoding is the same, strcmp() will work - if (lhs.mIsUtf8 == rhs.mIsUtf8) // both are UTF-8 or both are Windows-1252 - { - // But we can avoid that call if the pointers are the same - const auto pLhs = lhs.mString.data(); - const auto pRhs = rhs.mString.data(); - if ((pLhs == pRhs) && (rhs.mString.size() == rhs.mString.size())) - { - return true; - } - return strcmp(pLhs, pRhs) == 0; - } - - // LHS and RHS have different encodings, but one must be UTF-8 - assert((lhs.mIsUtf8 && !rhs.mIsUtf8) || (!lhs.mIsUtf8 && rhs.mIsUtf8)); // should have used strcmp(), above - auto& utf8 = lhs.mIsUtf8 ? lhs : rhs; - auto& w1252 = !lhs.mIsUtf8 ? lhs : rhs; - - // If UTF-8 is native on this platform, convert to UTF-8; otherwise do a native comparision - return mNativeIsUtf8 ? utf8.c_u8str() == w1252.u8string() : utf8.native() == w1252.mString.data(); -} - - diff --git a/externals/nitro/externals/coda-oss/modules/c++/str/source/Manip.cpp b/externals/nitro/externals/coda-oss/modules/c++/str/source/Manip.cpp deleted file mode 100644 index 9efdac716..000000000 --- a/externals/nitro/externals/coda-oss/modules/c++/str/source/Manip.cpp +++ /dev/null @@ -1,361 +0,0 @@ -/* ========================================================================= - * This file is part of str-c++ - * ========================================================================= - * - * (C) Copyright 2004 - 2014, MDA Information Systems LLC - * - * str-c++ is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; If not, - * see . - * - */ -#include "str/Manip.h" - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "str/Convert.h" -#include "str/Encoding.h" - -namespace -{ -char transformCheck(int c, int (*transform)(int)) -{ - // Ensure the character can be represented - // as an unsigned char or is 'EOF', as the - // behavior for all other characters is undefined - if ((c >= 0 && c <= UCHAR_MAX) || c == EOF) - { - return static_cast(transform(c)); - } - else - { - // Invalid char for transform: no-op - return static_cast(c); - } -} - -char tolowerCheck(char c) -{ - return transformCheck(c, tolower); -} - -char toupperCheck(char c) -{ - return transformCheck(c, toupper); -} -} - - -namespace str -{ - -// TODO: https://stackoverflow.com/questions/31959532/best-way-to-remove-white-spaces-from-stdstring -template -inline void trim_(std::basic_string & s) -{ - size_t i; - for (i = 0; i < s.length(); i++) - { - if (!iswspace(static_cast(s[i]))) - break; - } - s.erase(0, i); - - for (i = s.length() - 1; (int) i >= 0; i--) - { - if (!iswspace(static_cast(s[i]))) - break; - - } - if (i + 1 < s.length()) - s.erase(i + 1); -} -void trim(std::string& s) -{ - trim_(s); -} -std::string trim(const std::string& str) -{ - auto retval = str; - trim(retval); - return retval; -} -void trim(coda_oss::u8string& s) -{ - trim_(s); -} -coda_oss::u8string trim(const coda_oss::u8string& str) -{ - auto retval = str; - trim(retval); - return retval; -} - -bool ends_with(const std::string& s, const std::string& match) noexcept -{ - const size_t mLen = match.length(); - const size_t sLen = s.length(); - for (size_t i = 0; i < sLen && i < mLen; ++i) - if (!(s[sLen - i - 1] == match[mLen - i - 1])) - return false; - return sLen >= mLen; -} -bool endsWith(const std::string& s, const std::string& match) -{ - return ends_with(s, match); -} - -bool starts_with(const std::string& s, const std::string& match) noexcept -{ - const size_t mLen = match.length(); - const size_t sLen = s.length(); - for (size_t i = 0; i < sLen && i < mLen; ++i) - if (!(s[i] == match[i])) - return false; - return sLen >= mLen; -} -bool startsWith(const std::string& s, const std::string& match) -{ - return starts_with(s, match); -} - -size_t replace(std::string& str, - const std::string& search, - const std::string& replace, - size_t start) -{ - size_t index = str.find(search, start); - - if (index != std::string::npos) - { - // ASAN error: str.replace(index, search.length(), replace); - str = str.substr(0, index) + replace + str.substr(index + search.length()); - start = index; - } - else - { - start = str.length(); - } - - return start; -} - -void replaceAll(std::string& string, - const std::string& search, - const std::string& replace) -{ - size_t start = 0; - while (start < string.length()) - { - start = str::replace(string, search, replace, start); - // skip ahead -- - // avoids inifinite loop if replace contains search - start += replace.length(); - } -} - -bool contains(const std::string& str, const std::string& match) -{ - return str.find(match) != std::string::npos; -} - -static inline bool isTest(const std::string& s, int (*is)(int)) -{ - for (const auto& ch : s) - { - if (!is(ch)) - return false; - } - return !s.empty(); -} - -bool isAlpha(const std::string& s) -{ - return isTest(s, isalpha); -} - -template -static inline bool isTest(const std::string& s, int (*is1)(int), Pred is2) -{ - for (const auto& ch : s) - { - if (!is1(ch) && !is2(ch)) - return false; - } - return !s.empty(); -} - -bool isAlphaSpace(const std::string& s) -{ - return isTest(s, isalpha, isspace); -} - -bool isNumeric(const std::string& s) -{ - return isTest(s, isdigit); -} - -bool isNumericSpace(const std::string& s) -{ - return isTest(s, isdigit, isspace); -} - -bool isWhitespace(const std::string& s) -{ - for (const auto& ch : s) - { - if (!isspace(ch)) - return false; - } - return true; -} - -bool isAlphanumeric(const std::string& s) -{ - return isTest(s, isalpha, isdigit); -} - -bool isAsciiPrintable(const std::string& s) -{ - for (const auto& ch : s) - { - char c = ch; - if (c < 32 || c > 126) - return false; - } - return true; -} - -bool containsOnly(const std::string& s, const std::string& validChars) -{ - typedef std::string::const_iterator StringIter; - std::vector chars(255, false); - for (StringIter it = validChars.begin(); it != validChars.end(); ++it) - chars[(unsigned int)*it] = true; - for (StringIter it = s.begin(); it != s.end(); ++it) - if (!chars[(unsigned int)*it]) - return false; - return true; -} - -std::vector split(const std::string& s, - const std::string& splitter, size_t maxSplit) -{ - std::vector < std::string > vec; - const auto str_l = s.length(); - const auto split_l = splitter.length(); - size_t pos = 0; - while (pos < str_l && maxSplit != 1) - { - auto nextPos = s.find(splitter, pos); - if (nextPos == std::string::npos) - nextPos = str_l; - if (nextPos != pos) - vec.push_back(s.substr(pos, nextPos - pos)); - pos = nextPos + split_l; - if (maxSplit != std::string::npos && vec.size() >= maxSplit - 1) - break; - } - - if (pos < str_l) - vec.push_back(s.substr(pos)); - - return vec; -} -template -inline void transform(std::basic_string& s, Fn f) -{ - (void) std::transform(s.begin(), s.end(), s.begin(), f); -} -void lower(std::string& s) -{ - transform(s, tolowerCheck); -} -void upper(std::string& s) -{ - transform(s, toupperCheck); -} - -void escapeForXML(std::string& str) -{ - // & needs to be first or else it'll mess up the other characters that we - // replace - replaceAll(str, "&", "&"); - replaceAll(str, "<", "<"); - replaceAll(str, ">", ">"); - replaceAll(str, "\"", """); - replaceAll(str, "'", "'"); - replaceAll(str, "\n", " "); - replaceAll(str, "\r", " "); -} - -// https://en.cppreference.com/w/cpp/string/char_traits -class ci_char_traits final : public std::char_traits -{ - // Use our own routine rather than strcasecmp() so that the same - // toupperCheck() is used as when calling upper(). - static auto to_upper(char ch) noexcept - { - return toupperCheck(ch); - } - - static int compare(const char* s1, const char* s2, std::size_t n) noexcept - { - while (n-- != 0) - { - if (to_upper(*s1) < to_upper(*s2)) - return -1; - if (to_upper(*s1) > to_upper(*s2)) - return 1; - ++s1; - ++s2; - } - return 0; - } - - public: - static int compare(const std::string& s1, const std::string& s2) noexcept - { - if (s1.length() < s2.length()) - { - return -1; - } - if (s1.length() > s2.length()) - { - return 1; - } - assert(s1.length() == s2.length()); - return compare(s1.c_str(), s2.c_str(), s1.length()); - } -}; - -bool eq(const std::string& lhs, const std::string& rhs) noexcept -{ - return ci_char_traits::compare(lhs, rhs) == 0; -} -bool ne(const std::string& lhs, const std::string& rhs) noexcept -{ - return ci_char_traits::compare(lhs, rhs) != 0; -} - -} diff --git a/externals/nitro/externals/coda-oss/modules/c++/sys/include/sys/ByteSwapValue.h b/externals/nitro/externals/coda-oss/modules/c++/sys/include/sys/ByteSwapValue.h deleted file mode 100644 index 4bc9132a3..000000000 --- a/externals/nitro/externals/coda-oss/modules/c++/sys/include/sys/ByteSwapValue.h +++ /dev/null @@ -1,200 +0,0 @@ -/* ========================================================================= - * This file is part of sys-c++ - * ========================================================================= - * - * (C) Copyright 2004 - 2014, MDA Information Systems LLC - * (C) Copyright 2021, Maxar Technologies, Inc. - * - * sys-c++ is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; If not, - * see . - * - */ - -#pragma once -#ifndef CODA_OSS_sys_ByteSwapValue_h_INCLUDED_ -#define CODA_OSS_sys_ByteSwapValue_h_INCLUDED_ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "config/Exports.h" - -#include "Span.h" - -namespace sys -{ - /*! - * Swap bytes for a single value into output buffer. API is `span` rather than `void*` since - * for a single value we know the size. These "low level" routines may be less efficient than - * the templates since it's not possible to specialize on a specific size. - * - * \param buffer to transform - * \param[out] outputBuffer buffer to write swapped elements to - */ - coda_oss::span CODA_OSS_API byteSwap( - coda_oss::span pIn, coda_oss::span outPtr); - - namespace details - { - // "cast" a single value to bytes - template - inline auto as_bytes(const T& v) noexcept - { - return sys::as_bytes(&v, 1); - } - template - inline auto as_writable_bytes(T& v) noexcept - { - return sys::as_writable_bytes(&v, 1); - } - - template - inline auto swapUIntBytes(coda_oss::span inBytes, coda_oss::span outBytes, - std::nothrow_t) noexcept - { - static_assert(std::is_unsigned::value, "TUInt must be 'unsigned'"); - assert(sizeof(TUInt) == inBytes.size()); - assert(inBytes.size() == outBytes.size()); - - const void* const pIn_ = inBytes.data(); - auto const pIn = static_cast(pIn_); - void* const pOut_ = outBytes.data(); - auto const pOut = static_cast(pOut_); - - *pOut = coda_oss::byteswap(*pIn); // at long last, swap the bytes - - // Give the raw byte-swapped bytes back to the caller for easy serialization - return as_bytes(*pOut); - } - template - inline auto swapUIntBytes(coda_oss::span inBytes, coda_oss::span outBytes) - { - if (sizeof(TUInt) != inBytes.size()) - { - throw std::invalid_argument("'inBytes.size() != sizeof(TUInt)"); - } - if (inBytes.size() != outBytes.size()) - { - throw std::invalid_argument("'inBytes.size() != outBytes.size()"); - } - return swapUIntBytes(inBytes, outBytes, std::nothrow); - } - - // This is a template so that we can have specializations for different sizes. - // By specializing on `size_t`, a `float` can be "cast" to `uint32_t` (via - // `std::byte`) for byte-swapping. - template - inline auto swapBytes(coda_oss::span inBytes, coda_oss::span outBytes) - { - if (elemSize != inBytes.size()) - { - throw std::invalid_argument("'inBytes.size() != elemSize"); - } - return sys::byteSwap(inBytes, outBytes); // size that wasn't specialized - } - - // avoid copy-paste errors - #define CODA_OSS_define_swapBytes_specialization_(T) template <> inline auto swapBytes \ - (coda_oss::span inBytes, coda_oss::span outBytes) { return swapUIntBytes(inBytes, outBytes); } - CODA_OSS_define_swapBytes_specialization_(uint8_t) // no `;`, it's not needed and generates a -Wpedantic warning - CODA_OSS_define_swapBytes_specialization_(uint16_t) - CODA_OSS_define_swapBytes_specialization_(uint32_t) - CODA_OSS_define_swapBytes_specialization_(uint64_t) - #undef CODA_OSS_define_swapBytes_specialization_ - - template - inline constexpr bool is_byte_swappable() noexcept - { - // Trying to byte-swap anything other than integers is likely to cause - // problems (or at least confusion): - // * `struct`s have padding that should be ignored. - // * each individual member of a `struct` should be byte-swaped - // * byte-swaped `float` or `double` bits are nonsense - return (std::is_integral::value || std::is_enum::value) || !std::is_compound::value; - } - } - - /*! - * Function to swap one element irrespective of size. - * Returns the raw byte-swapped bytes for easy serialization. - */ - template - inline auto byteSwapValue(coda_oss::span inBytes, coda_oss::span outBytes) - { - static_assert(details::is_byte_swappable(), "T should not be a 'struct'"); - return details::swapBytes(inBytes, outBytes); - } - template - inline auto byteSwapValue(T in, coda_oss::span outBytes) - { - return byteSwapValue(details::as_bytes(in), outBytes); - } - template - inline auto byteSwapValue(T in) - { - std::vector retval(sizeof(T)); - std::ignore = byteSwapValue(in, make_span(retval)); - return retval; - } - - // Reverse the above: turn `span` back to T after byte-swapping - template - inline auto byteSwapValue(coda_oss::span in) - { - // Don't want to cast the swapped bytes in `in` to T* as they might not be valid; - // e.g., a byte-swapped `float` could be garbage. - T retval; - byteSwapValue(in, details::as_writable_bytes(retval)); - return retval; - } - - /*! - * Function to swap one element irrespective of size. The inplace - * buffer function should be preferred. - * - * To specialize complex float, first include the complex library - * \code - #include - * \endcode - * - * Then put an overload in as specified below: - * \code - template std::complex byteSwap(std::complex val) - { - std::complex out(byteSwap(val.real()), - byteSwap(val.imag())); - return out; - } - * \endcode - * - */ - template inline T byteSwap(T val) - { - T out; - std::ignore = byteSwapValue(val, details::as_writable_bytes(out)); - return out; - } -} -#endif // CODA_OSS_sys_ByteSwapValue_h_INCLUDED_ diff --git a/externals/nitro/externals/coda-oss/modules/c++/types/CMakeLists.txt b/externals/nitro/externals/coda-oss/modules/c++/types/CMakeLists.txt deleted file mode 100644 index d1accfb2e..000000000 --- a/externals/nitro/externals/coda-oss/modules/c++/types/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -set(MODULE_NAME types) - -coda_add_module(${MODULE_NAME} - VERSION 1.0 - DEPS coda_oss-c++ config-c++ gsl-c++ coda_oss-c++) - -coda_add_tests( - MODULE_NAME ${MODULE_NAME} - DIRECTORY "unittests" - DEPS sys-c++ - UNITTEST) diff --git a/externals/nitro/externals/coda-oss/modules/c++/types/include/types/complex.h b/externals/nitro/externals/coda-oss/modules/c++/types/include/types/complex.h deleted file mode 100644 index f6051594c..000000000 --- a/externals/nitro/externals/coda-oss/modules/c++/types/include/types/complex.h +++ /dev/null @@ -1,145 +0,0 @@ -/* ========================================================================= - * This file is part of types-c++ - * ========================================================================= - * - * (C) Copyright 2004 - 2014, MDA Information Systems LLC - * (C) Copyright 2023, Maxar Technologies, Inc. - * - * types-c++ is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; If not, - * see . - * - */ - -#pragma once -#ifndef CODA_OSS_types_complex_h_INCLUDED_ -#define CODA_OSS_types_complex_h_INCLUDED_ - -#include - -// TODO: remove this once TIntergers are switched to types::details::complex -// '...': warning STL4037: The effect of instantiating the template std::complex for any type other than float, double, or long double is unspecified. You can define _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING to suppress this warning. -#ifndef _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING -#define _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING -#endif - -#include -#include - -#include "config/disable_compiler_warnings.h" -#include "coda_oss/CPlusPlus.h" - -namespace types -{ -namespace details -{ -/*! - * \class complex - * \brief Our own implementation of std::complex for SIX and friends. - * - * `std::complex` is no longer valid C++; provide a (partial) work-around. - * See https://en.cppreference.com/w/cpp/numeric/complex for detals. - * - * SIX (and others) mostly use `std::complex` as a - * convenient package for two values; very little "complex math" is done - * using integers. - */ -template -struct complex final -{ - using value_type = T; - static_assert(!std::is_floating_point::value, "Use std::complex for floating-point."); - static_assert(std::is_signed::value, "T should be a signed integer."); - - complex(value_type re = 0, value_type im = 0) : z{re, im} {} - complex(const complex&) = default; - complex& operator=(const complex&) = default; - complex(complex&&) = default; - complex& operator=(complex&&) = default; - ~complex() = default; - - // If someone already has a std::complex, is there any harm in creating ours? - complex(const std::complex& z_) : complex(z_.real(), z_.imag()) {} - - value_type real() const - { - return z[0]; - } - void real(value_type value) - { - z[0] = value; - } - - value_type imag() const - { - return z[1]; - } - void imag(value_type value) - { - z[1] = value; - } - -private: - value_type z[2]{0, 0}; -}; - -CODA_OSS_disable_warning_push -#ifdef _MSC_VER -#pragma warning(disable: 4996) // '...': warning STL4037: The effect of instantiating the template std::complex for any type other than float, double, or long double is unspecified. You can define _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING to suppress this warning. -#endif - -template -inline const std::complex& cast(const complex& z) -{ - // Getting different results with GCC vs MSVC :-( So just use - // std::complex Assume by the time we're actually using C++23 with a - // compiler that enforces this restriction, "something" will be different. - const void* const pZ_ = &z; - return *static_cast*>(pZ_); -} - -CODA_OSS_disable_warning_pop - -// https://en.cppreference.com/w/cpp/numeric/complex/abs -template -inline auto abs(const complex& z) -{ - return abs(cast(z)); -} - -} - -//// Have the compiler pick between std::complex and details::complex -//template -//using complex = std::conditional_t::value, std::complex, details::complex>; -//static_assert(std::is_same, complex>::value, "should be details::complex"); -template -using complex = std::complex; - -static_assert(std::is_same, complex>::value, "should be std::complex"); -static_assert(sizeof(std::complex) == sizeof(complex), "sizeof(sizeof(std::complex) != sizeof(complex)"); - -// Convenient aliases -using zfloat = complex; // std::complex -using zdouble = complex; // std::complex -//using zlong_double = complex; // std::complex - -// Intentionally using somewhat cumbersome names -// TODO: switch TIntergers to types::details::complex -using zint8_t = complex; // details:complex -using zint16_t = complex; // details:complex -using zint32_t = complex; // details::complex -using zint64_t = complex; // details::complex -} - -#endif // CODA_OSS_types_complex_h_INCLUDED_ diff --git a/externals/nitro/externals/coda-oss/modules/c++/types/unittests/test_complex.cpp b/externals/nitro/externals/coda-oss/modules/c++/types/unittests/test_complex.cpp deleted file mode 100644 index 6410e48f3..000000000 --- a/externals/nitro/externals/coda-oss/modules/c++/types/unittests/test_complex.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* ========================================================================= - * This file is part of types-c++ - * ========================================================================= - * - * (C) Copyright 2004 - 2017, MDA Information Systems LLC - * - * types-c++ is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; If not, - * see . - * - */ - -#include "TestCase.h" - -#include - -TEST_CASE(TestCxShort_abs) -{ - constexpr auto real = 123; - constexpr auto imag = -321; - - CODA_OSS_disable_warning_push - #ifdef _MSC_VER - #pragma warning(disable: 4996) // '...': warning STL4037: The effect of instantiating the template std::complex for any type other than float, double, or long double is unspecified. You can define _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING to suppress this warning. - #endif - const std::complex cx_short(real, imag); - CODA_OSS_disable_warning_pop - const auto expected = abs(cx_short); - - CODA_OSS_disable_warning_push - #ifdef _MSC_VER - #pragma warning(disable: 4996) // '...': warning STL4037: The effect of instantiating the template std::complex for any type other than float, double, or long double is unspecified. You can define _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING to suppress this warning. - #endif - const types::zint16_t types_zint16(cx_short); - CODA_OSS_disable_warning_pop - auto actual = abs(types_zint16); - TEST_ASSERT_EQ(actual, expected); - - const types::complex types_cx_int16(cx_short); - actual = abs(types_cx_int16); - TEST_ASSERT_EQ(actual, expected); -} - -TEST_MAIN( - TEST_CHECK(TestCxShort_abs); - ) diff --git a/externals/nitro/externals/coda-oss/modules/c++/types/wscript b/externals/nitro/externals/coda-oss/modules/c++/types/wscript deleted file mode 100644 index 67379c3bb..000000000 --- a/externals/nitro/externals/coda-oss/modules/c++/types/wscript +++ /dev/null @@ -1,10 +0,0 @@ -NAME = 'types' -VERSION = '1.0' -MODULE_DEPS = 'coda_oss config gsl coda_oss' -UNITTEST_DEPS = 'sys' - -options = configure = distclean = lambda p: None - -def build(bld): - bld.module(**globals()) - diff --git a/externals/nitro/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/Document.h b/externals/nitro/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/Document.h deleted file mode 100644 index 76ab1dd13..000000000 --- a/externals/nitro/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/Document.h +++ /dev/null @@ -1,212 +0,0 @@ -/* ========================================================================= - * This file is part of xml.lite-c++ - * ========================================================================= - * - * (C) Copyright 2004 - 2014, MDA Information Systems LLC - * - * xml.lite-c++ is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; If not, - * see . - * - */ - -#ifndef CODA_OSS_xml_lite_Doocument_h_INCLUDED_ -#define CODA_OSS_xml_lite_Doocument_h_INCLUDED_ -#pragma once - -/*! - * \file Document.h - * \brief File describing the tree API - * - * This is a simple alternative to the DOM API. It is very similar, - * but is a solution intended more for speed and simplicity. The - * DOM API offers far more functionality, where this version implements - * only the widely used features. In this file, we are only concerned - * with the data structure for implementing the XML reader, not the reader - * itself. - */ - -#include - -#include -#include -#include "coda_oss/string.h" - -#include "xml/lite/Element.h" -#include "xml/lite/QName.h" - -namespace xml -{ -namespace lite -{ -/*! - * \class Document - * \brief This class is the organizer for a tree of elements. - * - * Use the Document to access the Element nodes contained within. - * The DocumentParser will build a tree that you can use. - */ -struct Document // SOAPDocument derives :-( -{ - //! Constructor - Document(Element* rootNode = nullptr, bool own = true) : - mRootNode(rootNode), mOwnRoot(own) - { - } - #ifndef SWIG // SWIG doesn't like std::unique_ptr - explicit Document(std::unique_ptr&& rootNode) : // implicitly own=true - Document(rootNode.release(), true /*own*/) - { - } - #endif // SWIG - - /*! - * Destroy the xml tree. This deletes the nodes if they exist - * Careful, this may delete your copy if you are not careful - */ - virtual ~Document() noexcept(false) - { - destroy(); - } - - #ifndef SWIG // SWIG doesn't like std::unique_ptr - std::unique_ptr& clone(std::unique_ptr& doc) const - { - doc = std::make_unique(); - - auto cloneRoot = std::make_unique(); - cloneRoot->clone(*mRootNode); - doc->setRootElement(std::move(cloneRoot)); - return doc; - } - Document* clone() const - { - std::unique_ptr doc; - return clone(doc).release(); - } - #endif // SWIG - - /*! - * Factory-type method for creating a new Element - * \param qname The qname of the new element - * \param uri The URI of the new element - * \param characterData The character data (if any) - * \return A new element - */ - virtual Element *createElement(const std::string & qname, const std::string & uri, std::string characterData = ""); - #ifndef SWIG // SWIG doesn't like std::unique_ptr - std::unique_ptr createElement(const xml::lite::QName&, const std::string& characterData) const; - std::unique_ptr createElement(const xml::lite::QName&, const coda_oss::u8string& characterData) const; - #endif // SWIG - - /*! - * Blanket destructor. This thing deletes everything - */ - void destroy(); - - /*! - * Insert an element under this element. Secretly, this - * tree does not really care whether or not the element in - * question is added to this tree or another tree, or just - * an element. It simply connects the two items - * \param element Element to add - * \param underThis Element to add element to - */ - void insert(Element * element, Element * underThis); - - /*! - * Remove an element from the tree, starting at the root - * \param toDelete The node to delete (This DOES do deletion) - */ - void remove(Element * toDelete); - - /*! - * Remove an element from the tree, starting at the second param - * \param toDelete The node to delete (This DOES do deletion) - * \param fromHere The place to start looking for. This could - * be an optimization depending on the task, so I allow it to remain - * public - */ - void remove(Element * toDelete, Element * fromHere); - - /*! - * Sets the internal root element - * \param element The node to set. - */ - void setRootElement(Element * element, bool own = true); - #ifndef SWIG // SWIG doesn't like std::unique_ptr - void setRootElement(std::unique_ptr&& element) // implicitly own=true - { - setRootElement(element.release(), true /*own*/); - } - #endif // SWIG - - /*! - * Retrieves the internal root element - * \return The root node - */ - Element *getRootElement(bool steal = false) - { - if (steal) - mOwnRoot = false; - return mRootNode; - } - #ifndef SWIG // SWIG doesn't like std::unique_ptr - std::unique_ptr& getRootElement(std::unique_ptr& rootNode) // implicitly steal=true - { - rootNode.reset(getRootElement(true /*steal*/)); - return rootNode; - } - #endif // SWIG - Element *getRootElement() const - { - return mRootNode; - } - -private: - Document(const Document&); - Document& operator=(const Document&); - - //! The root node element - Element *mRootNode; - bool mOwnRoot; -}; - -inline Element& getRootElement(Document& doc) -{ - auto retval = doc.getRootElement(); - assert(retval != nullptr); - return *retval; -} -inline const Element& getRootElement(const Document& doc) -{ - auto retval = doc.getRootElement(); - assert(retval != nullptr); - return *retval; -} -inline Element& getRootElement(Document* pDoc) -{ - assert(pDoc != nullptr); - return getRootElement(*pDoc); -} -inline const Element& getRootElement(const Document* pDoc) -{ - assert(pDoc != nullptr); - return getRootElement(*pDoc); -} - -} -} - -#endif // CODA_OSS_xml_lite_Doocument_h_INCLUDED_ - diff --git a/externals/nitro/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/MinidomHandler.h b/externals/nitro/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/MinidomHandler.h deleted file mode 100644 index e8d9e2567..000000000 --- a/externals/nitro/externals/coda-oss/modules/c++/xml.lite/include/xml/lite/MinidomHandler.h +++ /dev/null @@ -1,181 +0,0 @@ -/* ========================================================================= - * This file is part of xml.lite-c++ - * ========================================================================= - * - * (C) Copyright 2004 - 2014, MDA Information Systems LLC - * - * xml.lite-c++ is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; If not, - * see . - * - */ - -#ifndef CODA_OSS_xml_lite_MinidomHandler_h_INCLUDED_ -#define CODA_OSS_xml_lite_MinidomHandler_h_INCLUDED_ -#pragma once - -/*! - * \file MinidomHandler.h - * \brief A fast, small, alternative to DOM. - * - * This handler inherits a ContentHandler, and loads all components - * into a more simple and logical tree structure. Whereas, in DOM, - * EVERYTHING is a node, here, the hierarchical approach is used. - * An element is a tagset (i.e., <blah att1="hello">hi I'm dan</blah>, - * and embedded tags are children. To walk the tree, get the top- - * level element and walk it. - * - * There is memory allocation in this file, however, the paradigm is - * that since it occurs internally, it should be deleted internally - * as well. Thus, when the Document goes out of scope (i.e., the destructor - * is called), it will delete its element nodes. This makes sense if you - * consider that, without the parser, there is no tree. So, let the - * parser handle its own business. - * - * \todo Add iterators - */ - -#include -#include -#include "coda_oss/string.h" - -#include "str/EncodedString.h" -#include "str/EncodedStringView.h" -#include "XMLReader.h" -#include "io/StandardStreams.h" -#include "Document.h" - -namespace xml -{ -namespace lite -{ -/*! - * \class MinidomHandler - * \brief This class is an XML reader that fills a tree. - * - * The class has a tree that it populates with XML data as - * it parses, The Document* is owned by this class, no matter, - * whether it is allocated externally or not. DONT delete it - * explicitly unless you are looking for disaster. - */ -struct MinidomHandler final : public ContentHandler -{ - //! Constructor. Uses default document - MinidomHandler() - { - setDocument(std::make_unique()); - } - - //! Destructor - ~ MinidomHandler() - { - setDocument(nullptr, true); - } - MinidomHandler(const MinidomHandler&) = delete; - MinidomHandler& operator=(const MinidomHandler&) = delete; - MinidomHandler(MinidomHandler&&) = default; - MinidomHandler& operator=(MinidomHandler&&) = default; - - void setDocument(Document *newDocument, bool own = true); - void setDocument(std::unique_ptr&&); // own = true - - /** - * Retrieves the Document. - * @param steal if specified, ownership will be given up (if owned) - */ - Document *getDocument(bool steal = false) - { - if (steal) - mOwnDocument = false; - return mDocument; - } - std::unique_ptr& getDocument(std::unique_ptr&); // steal = true - - Document *getDocument() const - { - return mDocument; - } - - /*! - * This is the function overload for handling char data. - * We append the chunk to the current data, and add the - * length to the top of the bytes stack. - * \param value The value of the char data - * \param length The length of the char data - */ - void characters(const char* value, int length) override; - bool vcharacters(const void /*XMLCh*/*, size_t length) override; - - /*! - * This method is fired when a new tag is entered. - * We use our newElement() method to spawn a new - * element and we set its tag to our tag param and its attributes - * to our atts param. We then push it on the node stack, - * and we reset the char data byte count stack for this new object - * \param uri The uri - * \param localName The local name - * \param qname The qname - * \param atts The attributes - */ - void startElement(const std::string & uri, - const std::string & localName, - const std::string & qname, - const Attributes & atts) override; - - /*! - * Handles the actual popping of the node off the node - * stack, and the adjustment of that node's character data. - * Here we add the node to the tree - * \param uri The uri - * \param localName The local name - * \param qname The qname - */ - void endElement(const std::string & uri, - const std::string & localName, - const std::string & qname) override; - - void clear(); - - /*! - * If set to true, whitespaces will be preserved in the parsed - * character data. Otherwise, it will be trimmed. - */ - void preserveCharacterData(bool preserve); - -private: - /*! - * We want to push only the proper amount of bytes - * to the node when we start writing. Here we chew - * up the pieces we take as we are taking them. - * \return The chracter data for the node - */ - coda_oss::u8string adjustCharacterData(); - - /*! - * Trim the white space off the back and front of a string - * \param s String to trim - */ - static void trim(coda_oss::u8string& s); - - coda_oss::u8string currentCharacterData; - std::stack bytesForElement; - std::stack nodeStack; - Document* mDocument = nullptr; - bool mOwnDocument = true; - bool mPreserveCharData = false; - void characters(coda_oss::u8string&&); -}; -} -} - -#endif // CODA_OSS_xml_lite_MinidomHandler_h_INCLUDED_