From d90e4c41d73df4eaef765af8d59c03d63e9d0c58 Mon Sep 17 00:00:00 2001 From: "J. Daniel Smith" Date: Wed, 15 Nov 2023 14:43:03 -0500 Subject: [PATCH] turn off /Wall for MSVC (#718) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * some projects get indirectrly * trying to build with VS2022 17.2 * scene doesn't use XML * move #pragma warning(disable) to import/xml/lite.h * slam-in "main" * fix compiler diagnostic about "possibly uninitialized result" * update "externals" to remove compiler warnings * cmake -j 8 seems to work * remove more compiler warnings * setAttribute*() overloads * getISMUri() utility routine * double -> float warnings * latest from coda-oss and NITRO * Squashed 'externals/coda-oss/' changes from 1582c6ac9..0657f3297 0657f3297 adjust compiler flags for clean CMake builds (#650) 81285872f build cleanly with all G++ warnings enabled (#649) b9ea37bbf xml::lite::Validator can be moved (#648) 9cfe9a4a8 Merge branch 'master' e989b0910 createElement() needs to be virtual (#646) 4bdaf10d9 Change xml lite function to virtual (#645) d17b57a54 Merge branch 'master' fa00a5430 move debug -g flags to be turned on only if debugging (#644) 6be8f0a2e move debug -g flags to be turned on only if debugging (#644) 44ab72854 routines for simple writing to HDF5 files (#643) aabc5818e remove more C++11 work-arounds (#642) b04ccca17 remove more C++11 work-arounds (#641) e460970a7 increase GCC warnings (#640) 91284249b provide ComplexView iterator support (#639) 453b7ec68 try to get std::make_unique working with old Intel compiler (#638) 5736cfd4d is_trivially_copyable for old Intel compiler (#637) 7c2aea38f use H5 SDK naming conventions (#636) fc3008b8d use 'modern' C pre-processor b44709a95 added ComplexSpansView utility (#635) 986307c9c Merge branch 'master' e1b0fa349 commit (but not build) HDF5 source code (#634) 3fd5ddae5 Merge branch 'main' into develop/remove-cpp11-workarounds 37d7ec76e restore C++14 workarounds for older compilers (#632) 244dfdb3d Merge branch 'develop/main' into develop/remove-cpp11-workarounds 714ca4ed7 restore C++14 workarounds for older compilers 640f2247c Delete hdf5-hdf5-1_13_2.tar.gz eb365cbfb Merge branch 'master' into develop/remove-cpp11-workarounds 57b938eeb don't need __INTEL_COMPILER work-around with C++14 65779f3b1 build C code with -std=gnu99 94dc9280f C++14 work-arounds for an old version of the Intel compiler 3744d05e2 slam-in "main" 82b2fd63b restore some C++14 work-arounds for old compilers that only have partial C++14 support 94f6950a2 Merge branch 'main' into develop/remove-cpp11-workarounds 1ac97fe48 add HDF5 source code (not built) (#612) 8ab982820 Squashed commit of the following: 31781a14a remove C++17 work-arounds c15f6930c Revert " is in C++17" 0fe38c16f restore recent buld.py changes 0c75411ee is in C++17 bbbcd562a remove C++11 work-arounds c1e15e9d9 Merge branch 'main' into main-cpp17 bea818fb0 must use C++17 in this branch 91653a096 another place where C++17 is set 7d555f2be back to C++17 b1969d996 merge main 0792c77bf Merge branch 'main' into develop/remove-cpp11-workarounds e49f273c1 Merge branch 'main' into develop/remove-cpp11-workarounds 240b61044 allow sys::Mutex references, instead of pointers, to be passed to sys::ConditionVar 9500d6f4b Merge branch 'main' into develop/remove-cpp11-workarounds f1529942f std::make_unique instead of new be9b6a71c Squashed commit of the following: 62a2ec4e1 Revert "remove our GSL work-around for C++11" 1db082c21 Revert "try the current "main" of GSL" 44b70edde try the current "main" of GSL 4edbf6bad Revert ""There is no warning 4814"" bcd7458be "There is no warning 4814" c185bf3f1 starting working on MutexCpp11 313bdd1d9 AtomicCounter* files have been removed c1c448051 remove our GSL work-around for C++11 37ae1193e remove our mem::SharedPtr, it's now always std::shared_ptr 71f3c1299 remove no-longer-used NSPR code 8e77cb210 removed no-longer-used Irix and Solaris files fabef6966 use std::atomic for all AtomicCounter implementations ace5b6d5a TEST_FAIL -> TEST_FAIL_MSG 30076c1d1 turns out there was already a TEST_FAIL macro d73ee16fb need "::" to find global test ba01c48df remove C++11 workarounds for C++14 features cbd4a31ae Squashed commit of the following: b21c203b8 Squashed commit of the following: 5b542c60f Squashed commit of the following: cb0cf94ff ByteStream.cpp is now warning-free f5daa37fc cast to DWORD; "const" correctness bfaf644ff #pragma-away compiler warnings from standard headers 72d202dbe Merge branch 'master' into develop/reduce-compiler-warnings b076580cd trying to fix GCC compiler warning 1687dc7fc Merge branch 'master' into develop/reduce-compiler-warnings 2c5db86db Merge branch 'master' into develop/reduce-compiler-warnings 6f76c2e3e Update CMakeLists.txt c3ca4a538 do in-line initialization 8e6733618 remove G++ compiler warning a0eff51cf Merge branch 'master' into develop/reduce-compiler-warnings af19d88a6 Merge branch 'master' into develop/reduce-compiler-warnings ba31cbaa9 use "void*" to avoid reinterpret_cast<> 08da1f8a1 Merge branch 'master' into develop/reduce-compiler-warnings d1d453a2e Merge branch 'master' into develop/reduce-compiler-warnings f5074a996 CODA_OSS_NDEBUG is extra gunk and not used; omit for now. 22de48858 don't even bother compiling our own versions of localtime_s() and gmtime_s() if we're not going to use them (compiler warning about "unused static funtion.") 0c92eba58 tweak NDEBUG/CODA_OSS_NDEBUG; update comments 544604775 Don't need to expose our own versions of localtime_s() and gmtime_s() a050796c1 Merge branch 'develop/reduce-compiler-warnings' of github.com:mdaus/coda-oss into develop/reduce-compiler-warnings fed604617 older compilers want std::string() as argument to std::logic_error() cf2c502a6 do more debug & release builds on GitHub d4aa99256 build some debug targets on Gitlab 368245258 tweak CODA_OSS_DEBUG again for G++ 24ba64f71 tweak how CODA_OSS_DEBUG is set 9680e8f0e add check for _GLIBCXX_DEBUG 943218f83 Merge branch 'master' into develop/reduce-compiler-warnings 01c68e705 %#@*@%)*%@ fix RowCol::cast() again! :-( b8472b457 oops ... gsl::narrow<> should be gsl::narrow_cast<> so that int/double conversion doesn't throw 109255ca8 "final" breaks SWIG; wrap RowCol use of gsl::narrow e51e4c2ad no need to create local just to return e546f2510 Merge branch 'master' into develop/reduce-compiler-warnings d1391f989 use template for to_std_string() overloading 566942680 fix std::char8_t when building with C++20 cf604b1ab fix C++17 build errors 48a0fbedb get rid of coda_oss namespace; use CODA_OSS_cpp17 instead 9706a4336 remove code-analysis diagnostics 50592e4f8 G++ complains about an unneeded call to std::move() 9c7643c3f Merge branch 'master' into develop/reduce-compiler-warnings ecfe1f8a7 more "noexcept" b7ac50fb9 Merge branch 'master' into develop/reduce-compiler-warnings eaecf46ed tweak CODA_OSS_cplusplus from "main" 5773b1ec1 trying to get C++17 WAF build working on Windows a048a00a1 unique names for waf & CMake 7a5a0d5b2 do a better job of setting CODA_OSS_DEBUG 4355aae92 Merge branch 'master' into develop/reduce-compiler-warnings 1fd8cede2 cleanup for VS 2019 16.10 4dffa1394 explicitly =delete copy/assignment df8f8920a Merge branch 'master' into develop/reduce-compiler-warnings 42b4e99b6 remove code-analysis diagnostics 70ce322c9 reduce compiler warnings/code-analysis diagnostics when building six 20eac2f49 Merge branch 'master' into develop/reduce-compiler-warnings ff3ded56d get rid of more compiler warnings/code-analysis diagnostics 669dd51ff Merge branch 'master' into develop/reduce-compiler-warnings 623b65ab9 Merge branch 'master' into develop/reduce-compiler-warnings 11c75df53 fix release build errors 66f048b92 turn on more compiler warnings where possible eb615e315 consolidate calls to mem::make::unique a6f5eb690 reduce use of explicit new 84d5e1b01 use mem::make::unique instead of explicit new 019d726ea = default for default constructors 86ab5d8f3 use std::unique_ptr and "const noexcept" b071972d7 another batch of =default for default constructors 98276da94 more =default for default .ctor()s ceb7bc596 do default constructors with =default 7bed51750 more code-analysis cleanup f9c04b117 "noexcept" code-analysis warnings 6586ae390 need gsl::make_span from gsl/span_ext 722089774 remove gsl/mem dependency cycle d741a0761 use gsl::narrow<> instead of static_cast 99eb4b36e get rid of signed/unsigned mismatch compiler warning 814450522 remove more code-analysis diagnostics c8441b309 Merge branch 'master' into develop/reduce-compiler-warnings e6d70a9ff last of "const" from code-analysis b8445814a mark a few more things as "const" per code-analysis d18544ec7 don't need to create temporary std::strings ee7faa979 still more code-analysis cleanup 5cd6f864d cleanup more code-analysis diagnostics 492fb0a86 one more compiler warning about implicitly deleted copy/assignment b8f782c88 remove compiler warnings about implicitly deleted copy/assignment/move 14d1d1cb8 #pragma-away warnings from GSL 86c40ea6c assert() to prevent some code-analysis diagnostics 7204517a9 make copy/assignment explicit 3ce824079 reduce code-analysis diagnostics 01e367a56 Merge branch 'master' into develop/reduce-compiler-warnings 03f3ddde9 proper printf format 877d7dc93 Merge branch 'master' into develop/reduce-compiler-warnings 5a4a3d575 code-analysis doesn't like C-style casts a3fdae416 code-analysis doesn't like NULL 6309baedc Merge branch 'master' into develop/reduce-compiler-warnings d1194a2fe Merge branch 'master' into develop/reduce-compiler-warnings 535b4757d Merge branch 'develop/reduce-compiler-warnings' of github.com:mdaus/coda-oss into develop/reduce-compiler-warnings a60b95d60 "constexpr" can be hard to get right with older C++11 compilers; don't even try c07b5303e Merge branch 'master' into develop/reduce-compiler-warnings 04306bbee need at least VS2017 to use the real GSL 796ad820b Merge branch 'master' into develop/reduce-compiler-warnings 16c240cd6 Merge branch 'master' into develop/reduce-compiler-warnings e07e89f0c turn on "warnings as errors" for CMAKE builds 5c019f891 complex "constexpr" functions not available with our version of g++ 4ab074a58 fix a few more compiler warnings ... nearing the end! :-) dea7ea41b And still more compiler warnings ... almost done 🤞🏻 fbe3bbb20 remove assorted compiler warnings e60b7fd3c Merge branch 'master' into develop/reduce-compiler-warnings e9df212c6 Arguments should be "const&" to prevent C4866 94e75cbed Merge branch 'master' into develop/reduce-compiler-warnings d3130414a Merge branch 'master' into develop/reduce-compiler-warnings 9a5e71f31 Merge branch 'master' into develop/reduce-compiler-warnings bd27c0232 Merge branch 'master' into develop/reduce-compiler-warnings c053362d2 remove still more compiler warnings 9f133b85a remove some more compiler warnings 0883c729c Merge branch 'master' into develop/reduce-compiler-warnings f4b766880 avoid comparision between signed/unsigned to prevent compiler warning 1e6564a6e eliminate more compiler warnings 85a7b8ad0 remove a few compiler warnings 09c82049f Merge branch 'master' into develop/reduce-compiler-warnings 31f1662fa Merge branch 'master' into develop/reduce-compiler-warnings a313562a3 Merge branch 'feature/fix-compiler-warnings' into develop/reduce-compiler-warnings 8547cdd24 eliminiate GCC warnings from Filesystem.h b5044b2a2 fix several compiler warnings/code-analysis diagnostics 9d2f90b8c GetEnvironmentVariable() and getenv() aren't quite the same 6faa3666f remove more compiler warnings git-subtree-dir: externals/coda-oss git-subtree-split: 0657f3297a806dba9312355b3231bac38f50b5d4 * Squashed 'externals/nitro/' changes from e1a64da1f..e2f038e45 e2f038e45 adjust compiler flags for clean CMake builds (#533) b871d2b9c latest from coda-oss (#532) e8ff6b444 apps: fix display of TREs from file extended header section (#529) 463c9e418 latest from coda-oss (#531) 24ff32863 -j 6 seems to work for SIX, how about NITRO? 713ee8538 -j 6 seems to work for SIX, how about NITRO? 4ccdf5b37 latest from coda-oss (#527) c71acc492 latest from coda-oss (#526) 08cbb96f9 build with older C++14 compilers (#524) git-subtree-dir: externals/nitro git-subtree-split: e2f038e4572376c73fd63e5b35a6b58f6a75fba7 * latest from coda-oss and NITRO * build SIX cleanly with CMake using GCC * build SIX cleanly with CMake using GCC * get closer to a clean build with MSVC * clean CMake build with MSVC * fix Release build * start work on passing in an already constructed xml::lite::validator * a bit closer to being able to create/use xml::lite::validator outside of XMLControl::validate() * Squashed commit of the following: commit bb2bb5aaf944040ea5bc42168b846324287dcad8 Merge: bbba5a210 4c146e7d0 Author: Dan Smith Date: Mon Jun 12 13:04:09 2023 -0400 Merge commit '4c146e7d01b14cf408b0e398cba96705df69090c' into develop/sync_externals commit 4c146e7d01b14cf408b0e398cba96705df69090c Author: Dan Smith Date: Mon Jun 12 13:04:09 2023 -0400 Squashed 'externals/coda-oss/' changes from aeec0131c..c88b9c053 c88b9c053 types::complex (#681) d1244a080 don't need our own make_unique in C++14 (#680) git-subtree-dir: externals/coda-oss git-subtree-split: c88b9c05325c802f88a85ddcebb498be4afacad0 commit bbba5a210c0257f622781914e9d228eeca23341c Author: Dan Smith Date: Mon Jun 12 13:04:06 2023 -0400 latest from CODA-OSS commit 370dd8876136755230624ebc955bc67642b1482b Merge: 58ff5a537 ffe1caafd Author: Dan Smith Date: Mon Jun 12 13:03:25 2023 -0400 Merge branch 'main' into develop/sync_externals commit 58ff5a5371d9158910e99613f4ce6e6fc36e543e Author: Dan Smith Date: Thu Jun 8 16:23:08 2023 -0400 latest from CODA-OSS commit 3bfc33a40274fa7a073983d4e4ddd907e45730d2 Author: Dan Smith Date: Thu Jun 8 14:34:45 2023 -0400 latest from CODA-OSS and NITRO commit 389417a983778ba2a07af9c6dbfea80484324b97 Merge: bce7ba0b1 4ad490fe4 Author: Dan Smith Date: Thu Jun 8 14:34:28 2023 -0400 latest from CODA-OSS and NITRO commit 4ad490fe4224df18ce4a437c40a257af0686140e Author: Dan Smith Date: Thu Jun 8 14:34:22 2023 -0400 Squashed 'externals/nitro/' changes from c8ecbe9ae..05dae18a3 05dae18a3 patch to build other projects 8f974e995 NITRO-2.11.3 (#554) 870aa6afd update to coda-oss 2023-06-05 (#553) 2fd7a0bfa latest from coda-oss (#552) 0eecce004 invoke() utility to reduce code duplication (#550) 59fb02fe9 latest from coda-oss (#551) 9fbf2b7b8 Fill out adapter free block which is used for nitf decompression (#549) 089ba0b5b latest from coda-oss 3b52f0025 latest from coda-oss (#547) 90c6263e2 latest from coda-oss (#544) 90d513ac5 latest from coda-oss (#543) git-subtree-dir: externals/nitro git-subtree-split: 05dae18a3a9c5ad70e1ce814c21ca8ec278829be commit 86929db19a438630d531ca0c34bdcd8e8c527ae9 Author: Dan Smith Date: Thu Jun 8 14:34:18 2023 -0400 Squashed 'externals/coda-oss/' changes from e87c32b4d..aeec0131c aeec0131c assert()s for mem::CopyablePtr (#679) 72b0ebd60 add types::complex_short (#678) 932130a58 patch to build other projects c00c1f203 coda-oss release 2023-06-06 (#677) ef54bbcd5 remove more compiler warnings (#676) dadfc5ce6 distinguish between byte-swapping a buffer and single value (#674) 90187f6cd more xml.lite tweaks for SIDD-3.0/ISM (#675) eb9960772 stronger type-checking for byteSwap() (#673) ff4f820ed xml.lite tweaks to support SIDD 3.0 ISM (#672) b1de8c0e5 std::byte should be a unique type (#671) c05bf9a02 allow enums to be byte-swapped too 1f9fd88d6 remove spurious 47684c45b byteSwap now uses byte buffers (#670) cbc659db2 add swapBytes() utility from SIX (#669) 891481b64 simplify byte-swapping (#668) 540ae763e more byteSwap() tweaks 0774c03c4 threaded byteSwap() (#667) d156370d3 swapping a single-byte value makes no sense c120e3255 be sure parameter is used to avoid compiler warning e85ec9331 --output-on-failure for CTest (#666) e80376197 turn off "there is no warning number" warning c5f0a5d15 A C-string may not be NULL-terminated (#665) 0c5eb29ae use platform-specific routines for byteSwap() (#664) 0b7d581fa remove transform_async() (#663) f6489b6be Merge branch 'main' into feature/xml.lite_tweaks 836c426a2 use function-pointers so that isConsoleOutput is only checked once 56e3c45b1 move depthPrint() functionality into non-member function in preparation for future changes ddcd26d97 Merge branch 'main' into feature/xml.lite_tweaks 69cc0e506 use the more rigorous create_and_check_datatype() 9efb87558 Merge branch 'main' into feature/hdf5 4d2f2f417 more HighFive unittests (#662) 14191a844 HighFive::create_datatype() goes from C++ to HighFive 98583473f utility routines to read string attributes 1fa75ce81 use the C API to read a string attribute 71e7b69f5 still can't figure out how to read a string attribute :-( e96f37a69 test reading the file attributes a25244519 getAttribute() unittest 8f12a3000 getDataType() unittest 857ff0af3 HighFive utility routines (#661) 1d687db57 writeDataSet() utility overload 106aa6894 sigh ... H5Easy::dump() fill fails on Windows/WAF :-( 2641b60b2 Merge branch 'main' into feature/hdf5 35c19e7e8 change actions to @v3 (#660) 212bbd3a3 works on local machine, but not build server ... ? 7125118b0 dump of 1D vector doesn't work :-( c704db435 sigh ... WAF build still failing :-( 01aae4616 does dump() of a 1D vector work? 76a53c813 comment-out H5 writing :-( 0f0e19aff test_highfive_dump() cb8f73795 trying to get highfive_dump() unittest working w/Windows-WAF 6584a264a does test_highfive_create() work? cde6147ce tweak HighFive wrappers (#659) 316566854 Revert "trying HighFive "write" unittests again" a9ec24ca4 trying HighFive "write" unittests again 585ad49a5 tweak names of utility routines 4c91a4d97 make it easier to read a std::vector and std::vecotr 0217ffa26 readDataSet() now works for 1D data 95e8973f2 trying to get hdf5::lite::load() working 4d294611d "const" correctness 5e6305c3f fix load_complex() 4a134dc5f start work on utility routines to read complex data from HDF5 9d76a7f41 Merge branch 'main' into feature/hdf5 8f9667a24 whitepsace ebd3fc99e Merge branch 'main' into feature/hdf5 40091b069 comment-out writing tests for now ... need to figure our WAF bulid failure 935aa3459 be sure the dataset has real data 114b9bf33 update release notes bd9c0b26c tweak HighFive utility routines acda1ef57 turn off diagnostics around expected failures 22a748840 readDataSet() utility routine for HighFive bd88a8c25 HighFive writeDataSet() utility to work with our SpanRC 6142f5b33 use HighFive routines to write a HDF5 file 5bbf1abaf Use HiveFive routines to get info about the file 84fbc8378 duplicate unittests with H5Easy f1f054c03 Merge branch 'main' into feature/hdf5 9b63ca470 fix directory names f6f826689 fix directory names 7aeb82c33 Merge branch 'main' into feature/hdf5 d028baaeb hook up HighFive header-only library (#653) 3083b0a31 Revert "HighFive 2.6.2" 246985a7f Revert ""build" HighFive HDF5 library" a8b75a586 Revert "turn off HighFive Boost support" ec68d5f83 Revert "Add HighFive unittests" f1f85b9e7 Revert "get test_high_five_base more-or-less compiling" 5ea634ee1 Revert "more work on getting HighFive unittests to build" ecc45433c more work on getting HighFive unittests to build bb194788a get test_high_five_base more-or-less compiling d42bde000 Add HighFive unittests ddc86bb32 turn off HighFive Boost support b255122d4 "build" HighFive HDF5 library 396cc3ef2 HighFive 2.6.2 5e5f9d9c0 Merge branch 'main' into feature/hdf5 ee938b4a5 changes from SIX bb764df90 Merge branch 'main' into feature/xml.lite_tweaks de2a24380 make derived classes 'final' if possible 14e19bcd2 Change xml lite function to virtual (#645) 8f42ac8e9 Merge branch 'main' into feature/xml.lite_tweaks 18ad90645 hdf5Write unittest 3462e1179 createFile() and writeFile() overloads ecee81d53 fix typos 197eecfa6 sketch-out hdf5::lite::writeFile() bd2311795 use SpanRC for writeFile(), not yet implemented ea9af7510 simple SpanRC to hold a 2D-size and pointer 027c19ee8 createFile() unittest 1f9d07ecb hook up createFile() 8c7e4473f start hooking up HDF5 writing 146e0bea3 Merge branch 'main' into feature/hdf5 88ca9fcb7 Merge branch 'main' into feature/hdf5 42b604b46 Squashed commit of the following: 10ee602c2 Merge branch 'main' into feature/hdf5 67aa42b69 restore changes from "main" 8bbfcbfbf unittests can be simplified to match fewer "view" classes 126bb802e Merge branch 'main' into feature/hdf5 3f8ba7a42 again, don't need a class just to convert from std::vector<> to std::span<> 24c2b489c Squashed commit of the following: 2703c119d Squashed commit of the following: 9d5228a2b don't need an entire class just to convert a std::vector<> into std::span<> 51bc931dc Merge branch 'main' into feature/hdf5 a84f25816 Squashed commit of the following: c4d2ed696 add missing #include guards, fix type in existing #include guard d541525a0 use a single ComplexViewConstIterator for all views 86e6a459f CODA_OSS_disable_warning causes GCC errors :-( 5d4b9c2cb only need an custom iterator for ComplexSpansView d9f0fb128 hook up iterators b9329e4db initial pass at a ComplexViewConstIterator 635238873 remove compiler warning about unused "constexpr" variables b39f6096f use the casing from H5 to make copy/pasting code slightly easier 0887b13eb Merge branch 'main' into feature/hdf5 bd07df1ca Consistent casing for Dataset, Datatype, Dataspace 7acd30ee2 tweak hdf5.lite dependencies 38ab914df Jupyter notebook for creating H5 files 95a040e0b _small.h5 is now (correctly) FLOAT32 107e7c487 make a simple values() member function to avoid template magic e1feca919 use TEST_SPECIFIC_EXCEPTION macro instead of try/catch 738333688 readDatasetT() now throws for the wrong buffer type 6b2cc2529 Merge branch 'feature/hdf5' of github.com:mdaus/coda-oss into feature/hdf5 310f8fd3d can't get template magic right for copy_axis() 86b306d59 stepping through copy ctors in the debugger is annoying f243e92d6 trying to make wrong type of buffer fail 2b10d9652 read in new sample file a28e59d8c help the compiler with type deduction 49bf5e9bc nested_complex_float_data_small.h5 e029325fc utility routines to "deconstruct" and array of std::complex dede3bd39 Merge branch 'main' into feature/hdf5 904b1ef5e tweak class names, make_() and copy() utility routines 8237b9efb make it harder to pass the wrong types to ComplexViews 4d9aeda2c ComplexArrayView and ComplexParallelView utility classes f5e367dfa test std::span> a4a2844f2 read in the nested "i" and "r" data 115615265 sample file has subgroups 8e1b7869a Merge branch 'feature/hdf5' of github.com:mdaus/coda-oss into feature/hdf5 9f4232a1d update sample H5 file 8c55db73a walk through HDF5 sub-groups 7775ed9c4 Update 123_barfoo_catdog_cx.h5 677975d7c Matlab code to create sample H5 file a0e7dfe07 Update test_hdf5info.cpp 0b67e1602 pass __FILE__ and __LINE__ from calling site for a more accurate exception message 86a677321 skeleton for more sample data 85f79b099 Merge branch 'main' into feature/hdf5 18088e942 Merge branch 'main' into feature/hdf5 3a1d17692 Merge branch 'main' into feature/hdf5 1755c69d7 Merge branch 'main' into feature/hdf5 9ad015432 No more "11" suffix on exception names c20d96251 Squashed commit of the following: c88cee999 other values to be filled-in bca4a4ecd incorporation NamedObject from HDF5 docs 61fa68f72 groupInfo() 460e7d766 datasetInfo() 14eb9b764 start filling in DatasetInfo afe5f1c3a start to fill in DatasetInfo 77a968c72 start filling in GroupInfo d81bcdfd9 openGroup() to open groups (loc) a0cd29469 comment-out "dataset" unittest for now 86e006024 begin filling in FileInfo 366dda6ab a return_type_of utility is needed to deduce the return type e21928263 explicitly pass return type to template 4937ccd11 template to reduce boilerplate when calling try_catch_H5Exceptions b3b5ebde7 use new exception utility routines ea1c03ef0 put exception handling/conversion in a utility routine 819a99d39 utility routine for exception handling 6f34eea97 put utilities in a separate file for easier reuse fcbde4f24 break utility routines into smaller pieces for easier reuse 52358ea8a WIN32 no longer automatically defined? 5a4286472 Revert "build HDF5 with C89" 680e599e9 build HDF5 with C89 a87a07121 Merge branch 'main' into feature/hdf5 8447c1a90 Revert "sym-links instead of copying files" db3b5e12b Merge branch 'main' into feature/xml.lite_tweaks fb60b5696 Merge branch 'main' into feature/hdf5 5110a5cc8 Comments about _u and _q 1a937d32c Merge branch 'main' into feature/xml.lite_tweaks fa06f04d7 get ready for hdf5.lite enhancdements b040c7c43 sym-links instead of copying files aa431bb47 use _u for xml::lite::Uri 3d0c6d58c fix case-sensitive #include filename 93dcd0e52 operator() for getElementByName() 75a93af85 more operator[] overloads to make attribute management easier 4ab8216f8 user-defined string literals to remove some noise around xml::lite::QName f82f0b0fc Merge branch 'main' into feature/xml.lite_tweaks ae30e3644 Merge branch 'feature/xml.lite_tweaks' of github.com:mdaus/coda-oss into feature/xml.lite_tweaks ffdd9beb0 simplify attribute creation 9bf5414f5 simplify attribute creation 82d7a4e95 SWIG gets confused about namespaces 7a61d0741 fix bug on Element ctor uncovered by unittest fdd7e58c1 QName is also in the xerces namespace which confuses SWIG bindings a325b7053 operator+=() overload for addChild daf30e6c0 Merge branch 'feature/xml.lite_tweaks' of github.com:mdaus/coda-oss into feature/xml.lite_tweaks b887d2b47 provide overloads for Element& rather than creating new "reference" types 1fa6bba38 rename test_xmleasy.cpp 7c8c9e0f1 += overload 850da6f63 overload for std::string 4547fc5a7 use UIT-8 strings for characterData 4723462a3 convenient addChild() overloads e48720753 copy over ElementReference from xml.easy a4ca30a0d Merge branch 'main' into feature/xml.lite_tweaks 6ae9f0b71 Revert "check-in of new xml.easy (to move code between computers)" f7466a6d7 Revert "simple routines for single element" a5490230d Revert "make some operators simplier ways of calling functions" c9a25630a Revert "get document creation working" 8af8710b0 Revert "free functions instead of member functions" 16c3847cb Revert "ElementReference distinct from Element" 7d68e156f Revert "ElementMutableReference" 00eb2a282 Merge branch 'main' into feature/xml.lite_tweaks a42969c1f ElementMutableReference a20ae9355 ElementReference distinct from Element 14eeeea0b free functions instead of member functions 4aae014b3 get document creation working 883569269 make some operators simplier ways of calling functions 053bd1212 simple routines for single element 8bf701a2e check-in of new xml.easy (to move code between computers) 41f959051 unittests for creating XML documents from scratch 9752d50ae Merge branch 'main' into feature/xml.lite_tweaks 1531d5709 by default, don't validate strings passed to Uri() 46d13d4bf Merge branch 'master' into feature/xml.lite_tweaks 39b547d32 remove more vestiges of Expat and LibXML ec8274d52 remove LibXML and Expat as they're no longer used/supported. 20eeefeef Merge branch 'master' into feature/xml.lite_tweaks 95074b9b1 update for newer Intel compiler 7024f71e1 Merge branch 'master' into feature/xml.lite_tweaks 57b1cbc83 Merge branch 'master' into feature/xml.lite_tweaks 4b67561c3 remove validate() overload that nobody is using fa15f1e5d Squashed commit of the following: 1484a9090 test the new validate() API 470da70fb hookup StringStreamT routines 2cddf2504 begin hooking up validate() overloads 1b5d910f3 overload validate() for UTF-8 and Windows-1252 03309b8c9 Squashed commit of the following: b72c6c5bf older compiler doesn't like our make_unique af8f00307 validate UTF-8 XML on Linux 211188613 unit-test for LEGACY XML validation 3c1169d2b Squashed commit of the following: 3afff19ca std::filesystem::path for FileInputStreamOS 908d452f8 WIP: validate all of our sample XML files 00f9bb16b validate against a XML schema 243d8c356 Merge branch 'master' into feature/xml.lite_tweaks 2815d707d fix to work with SWIG bindings. :-( 460862132 trying (again) to remove vestiages of old code e3c83a858 Revert "new code should use UTF-8" 811207c92 new code should use UTF-8 0ffd835f9 Squashed commit of the following: 1e7e03ded Merge branch 'master' into feature/xml.lite_tweaks c1d806aff Merge branch 'master' into feature/xml.lite_tweaks 850d3c811 str::strip() that can be easier to use than str::trim() 580ba9c8c explicitly =delete move 2b39831a8 Squashed commit of the following: 39eebdc23 Merge branch 'master' into feature/xml.lite_tweaks 9adf86cba force calling new UTF-8 write() routines ea61b6204 Merge branch 'master' into feature/xml.lite_tweaks 8a34583fa overload to take schemaPaths as filesystem::path 8671b442f parse XML embedded in a binary file ec4a902f1 updates from xerces.lite 80dc4d963 updates from xerces.lite 549766d6c Attributes::contains() no longer catches an exception 8a645ceac need "sys/" when building in other environments 36af08269 super-simple URI validation 78ef28a3e SWIG bindings are a PITA! :-( e9cba8491 SWIG needs help with Uri 8a8d8dc07 another routines used by pre-build SWIG bindings 818e1ec5d pre-build SWIG bindings use getElementByTagName() member function 067cac5d8 old compiler gets confused on unadorned QName ba92c0ae7 more use of Uri and QName 446c7d17a use QName in new code d6f8b0c83 more direct use of QName 90fff1c73 use xml::lite::QName instead of tuple 646cbb5ed more direct use of QName and Uri ba589ea3b make QName more robust bab0ee8b5 createElement() -> addNewElement() e3a145747 grab changes from six-library 32285e95c Merge branch 'master' into feature/xml.lite_tweaks 9f79f0bf6 Merge branch 'master' into feature/xml.lite_tweaks a12bbc32c make it easier to create new Elements with a value fc9967f98 make it easy for callers to addChild() keep a reference to the Element 4627766b7 be sure test_xmlparser works in "externals" of other projects bf2276396 "private" is part of the name-mangling fad92bcc8 making sure copy-ctor is implemented f90fdcead consolidate common XML test code 9fc53f2d5 use str:: utility for casting 6da6f794b still trying to find the right macro for SWIG 0c1b86c56 still trying to fix SWIG fdc6fc9bd trying to fix SWIG build error 7835e8c27 SWIG needs copy-ctor 585695942 disable copy/assignment for Element, it's probably almost always wrong 391fed613 fix double-delete caused by copying 61790fe69 retry parsing XML with Windows-1252 if first parse() fails 63cffac59 change string_encoding to match coda-oss style of PascalCase 010479bbe read an XML file we know is wrongly encoded as Windows-1252 9a0505062 more references instead of pointers 2d44b6951 Reading Windows-1252 w/o "encoding" fails 63dc7b076 read Windows-1252 too c9434c9cb test as UIT-8 too f310ccf0c get reading from UTF-8 XML working on Windows 1fa39c2be get testReadUtf8XmlFile working on Linux 1a83cd815 sys::Path is too much trouble right now ed60aa22c unit-test to read XML from a file a9336db7c Squashed commit of the following: 0825beb0d Merge branch 'master' into feature/xml.lite_tweaks c618489be Merge branch 'master' into feature/xml.lite_tweaks e8e4b8fe1 determine string_encoding based on platform 1f43bcfc2 create a new Element by using the platform to determine "characterData" encoding 961bef66b Merge branch 'master' into feature/xml.lite_tweaks e9798a5cb fix static_assert() 6f7772874 Merge branch 'master' into feature/xml.lite_tweaks b98d4f5a9 Merge branch 'master' into feature/xml.lite_tweaks 1b5abba2a The (old) version of SWIG we're using doesn't like certain C++11 features. 53bdeabaf Merge branch 'master' into feature/xml.lite_tweaks 60cf8ae80 "" doesn't work with decltype() in older C++ 97e72477a reduce getValue() overloads by making "key" a template argument 5e6373e55 reduce code duplication f9e7cfeee provide castValue instead of getValue(T&) cbd0bd8f2 castValue throws instead of returning a bool like getValue(T&) 87c7514fc Merge branch 'master' into feature/xml.lite_tweaks 10cc61223 make getElement*() consistent for zero or >1 results f5b137e3c Merge branch 'master' into feature/xml.lite_tweaks 1765efc62 allow clients to specify toType() and toString() for getValue() and setValue() df8b746e1 allow clients to specify their own toType/toString routines 66702726a Merge branch 'master' into feature/xml.lite_tweaks 6956311f1 Merge branch 'master' into feature/xml.lite_tweaks d505f3593 Merge branch 'master' into feature/xml.lite_tweaks fbd106115 catch a BadCastException and return false from getValue() 3a78377b5 use a template to reduce duplicated code 0ad4b8606 Merge branch 'master' into feature/xml.lite_tweaks a848aa3a2 get & set the characer data as a type f3ee1ee12 utility routines to set an attribute value 595227683 templates to get an attribute value convert to a specific type 06639227b miised a change in last commit 1aa458ef8 add getValue() overloads that return true/false rather than throwing faa6d3075 added getElementByTagName() overloads as that's a very common use-case git-subtree-dir: externals/coda-oss git-subtree-split: aeec0131c51497c5d448a39be0d2df608d93bc15 commit bce7ba0b1ae40e9ddcb4f24610e7e4d702272d54 Merge: 646b70e8d 86929db19 Author: Dan Smith Date: Thu Jun 8 14:34:18 2023 -0400 Merge commit '86929db19a438630d531ca0c34bdcd8e8c527ae9' into develop/sync_externals commit 646b70e8d47438211451493837e6b2d76db4e896 Author: Dan Smith Date: Thu Jun 8 14:34:13 2023 -0400 latest from CODA-OSS and NITRO * slam in "main" * use our own types::complex for complex, et. al. * Have the compiler pick between std::complex and details::complex * more use of types::complex * slam in "main" * build coda-oss.vcxproj in six.sln * match YAML from coda-oss; use msbuild to build six.sln * remove extra '\' * need other stuff from CODA-OSS to build coda-oss.vcxproj * build six.sln against a SIX install * consistent project settings * consistent project settings * Squashed commit of the following: commit c9cb326eee83638e209cf8ad914acf6765b4ed1e Author: J. Daniel Smith Date: Fri Jul 14 10:36:07 2023 -0400 latest from CODA-OSS and NITRO commit fe6ba2a13f2e941b2a83943981676c677e0b07db Merge: 15d0336d3 2e609250f Author: J. Daniel Smith Date: Fri Jul 14 10:32:19 2023 -0400 Merge branch 'main' into develop/sync_externals commit 15d0336d3eed525729b0087b08ad754712aa0164 Author: Dan Smith Date: Mon Jul 10 16:27:24 2023 -0400 =default doesn't implement the destructor commit 61095290d3cb6ae98537eb638c410452bea16553 Author: Dan Smith Date: Mon Jul 10 16:13:37 2023 -0400 somewhere a compiler warning got unsuppressed commit ca98de027cd41fecbff9e8b1b9cdb311969c64f2 Author: Dan Smith Date: Mon Jul 10 15:27:14 2023 -0400 latest from CODA-OSS and NITRO commit 6c6fd14a96c0516297fa7c64522aac3353032b1c Merge: d4c971de4 34b23e92f Author: Dan Smith Date: Mon Jul 10 15:26:54 2023 -0400 sync_externals commit 34b23e92fa6b58a4d0a5f4bc9e4fbc50298b574c Author: Dan Smith Date: Mon Jul 10 15:26:48 2023 -0400 Squashed 'externals/nitro/' changes from 49ec50325..b4ae2d429 b4ae2d429 match YAML from coda-oss 176bcaf6d build NITRO.SLN using msbuild (#562) 85e9043b8 latest from CODA-OSS (#561) git-subtree-dir: externals/nitro git-subtree-split: b4ae2d4290dcc5482970980ebe85719436990647 commit d4c971de47e47d6d8b2d42bfe784cd2ceff28fae Merge: d60eddd07 3b07146d5 Author: Dan Smith Date: Mon Jul 10 15:26:44 2023 -0400 Merge commit '3b07146d57387ad695a7c0745c77c6c891338212' into develop/sync_externals commit 3b07146d57387ad695a7c0745c77c6c891338212 Author: Dan Smith Date: Mon Jul 10 15:26:44 2023 -0400 Squashed 'externals/coda-oss/' changes from c2fc5fc66..f70b4202f f70b4202f account for coda-oss.vcxproj being in other SLNs af3faebfc Remove more compiler/code-analysis warnings (#699) 82be2a6db unittests should work w/o install (#698) dbb90a06d add msbuild for coda-oss.sln (#697) 5a417140a reduce compiler warnings (#696) 288619dfa all modules now part of coda-oss.vcxproj (#695) git-subtree-dir: externals/coda-oss git-subtree-split: f70b4202f19f260941a0245e41301ae232348fc7 commit d60eddd077c52ad97b5d1ed07868d47d9086ee39 Author: Dan Smith Date: Mon Jul 10 15:26:36 2023 -0400 latest from CODA-OSS and NITRO commit e275c075aead24849470f2dbdf5cf99cc8c3253d Merge: d606c616b 417ea3f70 Author: Dan Smith Date: Mon Jul 10 15:26:03 2023 -0400 Merge branch 'main' into develop/sync_externals commit d606c616b54e49098daa1051dd71ec0c96c9c245 Merge: 36beb996e 8e847cb0d Author: Dan Smith Date: Wed Jul 5 14:01:51 2023 -0400 Merge branch 'main' into develop/sync_externals commit 36beb996ee23058033dcf0de043486b571bf0673 Author: Dan Smith Date: Wed Jul 5 13:48:37 2023 -0400 sync_externals commit 11665af92c23e646f6a5cd1585328571ba024f1f Merge: 388bdad2d 9a22788e8 Author: Dan Smith Date: Wed Jul 5 13:48:19 2023 -0400 sync_externals commit 9a22788e84e9ef6e38e4b138ff6fecbd8b35b995 Author: Dan Smith Date: Wed Jul 5 13:48:06 2023 -0400 Squashed 'externals/nitro/' changes from cee9feb42..49ec50325 49ec50325 use new "PlatformToolkit" special environment variable (#560) 6c06e3711 latest from CODA-OSS (#559) git-subtree-dir: externals/nitro git-subtree-split: 49ec50325d0dcdef40b63dd440afdb82d6b6d379 commit ea623b4ee1de1651418d5d4424201df95915dca8 Author: Dan Smith Date: Wed Jul 5 13:48:02 2023 -0400 Squashed 'externals/coda-oss/' changes from 54033e70e..c2fc5fc66 c2fc5fc66 add more projects to coda-oss-lite.vcxproj (#694) ceb86c186 support $(PlatformToolset) as a "special" environment variable (#693) d78a8595a OS::getSIMDInstructionSet() utility (#692) 2d2df467d fix `python3 waf dumplib` git-subtree-dir: externals/coda-oss git-subtree-split: c2fc5fc660c2794d77fac2b71cf0dfae76c22c3e commit 388bdad2d66759d54544f3fd3302b5c2c4c027b6 Merge: f47cbbcc5 ea623b4ee Author: Dan Smith Date: Wed Jul 5 13:48:02 2023 -0400 Merge commit 'ea623b4ee1de1651418d5d4424201df95915dca8' into develop/sync_externals commit f47cbbcc590bc28d09577dda35d3b6f5eb682b20 Author: Dan Smith Date: Wed Jul 5 13:47:40 2023 -0400 latest from CODA-OSS and NITRO commit f25c53a3afee8fa3e016170da928996c6379dc23 Merge: c747f326b d2221ad33 Author: Dan Smith Date: Wed Jul 5 13:47:05 2023 -0400 Merge branch 'main' into develop/sync_externals commit c747f326b60ba8a82b3c33e91aabe2651d6bb13d Author: Dan Smith Date: Mon Jun 19 14:30:50 2023 -0400 latest from CODA-OSS and NITRO commit b142ec4fcb2a8007e35e3d68e0ae752f4b2828d0 Merge: 2829f93c9 3d4e554aa Author: Dan Smith Date: Mon Jun 19 14:30:15 2023 -0400 sync_externals commit 3d4e554aa3934c7157bf9c2e57e2482662938b10 Author: Dan Smith Date: Mon Jun 19 14:30:07 2023 -0400 Squashed 'externals/nitro/' changes from 3f01809fa..cee9feb42 cee9feb42 latest from CODA-OSS (#558) git-subtree-dir: externals/nitro git-subtree-split: cee9feb424b0f9c1f11f37f67a1795b3cc5e8dd1 commit 2829f93c9de0e8787dbe6cb319d6f32143dcdd8e Merge: e47ccf30e 12995e63a Author: Dan Smith Date: Mon Jun 19 14:29:10 2023 -0400 Merge branch 'main' into develop/sync_externals commit e47ccf30e059e0cd32b42dc90a45f4b8a8512caf Author: Dan Smith Date: Mon Jun 19 14:19:10 2023 -0400 latest from CODA-OSS commit 04090c4a13b921f33257662950e46bfc2e58cabb Merge: cc6009422 ac1ccde84 Author: Dan Smith Date: Mon Jun 19 14:18:41 2023 -0400 sync_externals commit ac1ccde84b2be856ac947b2670dd8228c9980889 Author: Dan Smith Date: Mon Jun 19 14:18:34 2023 -0400 Squashed 'externals/nitro/' changes from c8ecbe9ae..3f01809fa 3f01809fa latest from coda-oss (#557) 471fb3fc1 Update test_j2k_loading++.cpp b12caf2fc latest from CODA-OSS (#556) 0cd432624 use sys::make_span (#555) 05dae18a3 patch to build other projects 8f974e995 NITRO-2.11.3 (#554) 870aa6afd update to coda-oss 2023-06-05 (#553) 2fd7a0bfa latest from coda-oss (#552) 0eecce004 invoke() utility to reduce code duplication (#550) 59fb02fe9 latest from coda-oss (#551) 9fbf2b7b8 Fill out adapter free block which is used for nitf decompression (#549) 089ba0b5b latest from coda-oss 3b52f0025 latest from coda-oss (#547) 90c6263e2 latest from coda-oss (#544) 90d513ac5 latest from coda-oss (#543) git-subtree-dir: externals/nitro git-subtree-split: 3f01809fae7d471aa0f1594fc5eec1e3111cd710 commit 1ceb8e3ffb55a240085250cfde3f4d1ab7ef0b04 Author: Dan Smith Date: Mon Jun 19 14:18:30 2023 -0400 Squashed 'externals/coda-oss/' changes from e87c32b4d..54033e70e 54033e70e Merge branch 'main' into feature/complex_short 3c63f9f65 std::numbers from C++20 (#691) 892dd0e00 ComplexInteger and ComplexReal to better match existing naming conventions (#690) b3872181e match coda-oss naming conventions (#688) 704d6867f beef-up our complex type (#687) 47c1c1cd6 check is_absolute() for URLs (#686) c042373e1 be sure our Path::isAbolute() matches std::filesystem::path::absolute() (#684) ad10286bc volatile is about "special" memory, not threading (#685) f4d42005f fix build error in NITRO ff11a5557 keep using std::complex for now (#682) c88b9c053 types::complex (#681) d1244a080 don't need our own make_unique in C++14 (#680) aeec0131c assert()s for mem::CopyablePtr (#679) 72b0ebd60 add types::complex_short (#678) 932130a58 patch to build other projects c00c1f203 coda-oss release 2023-06-06 (#677) ef54bbcd5 remove more compiler warnings (#676) dadfc5ce6 distinguish between byte-swapping a buffer and single value (#674) 90187f6cd more xml.lite tweaks for SIDD-3.0/ISM (#675) eb9960772 stronger type-checking for byteSwap() (#673) ff4f820ed xml.lite tweaks to support SIDD 3.0 ISM (#672) b1de8c0e5 std::byte should be a unique type (#671) c05bf9a02 allow enums to be byte-swapped too 1f9fd88d6 remove spurious 47684c45b byteSwap now uses byte buffers (#670) cbc659db2 add swapBytes() utility from SIX (#669) 891481b64 simplify byte-swapping (#668) 540ae763e more byteSwap() tweaks 0774c03c4 threaded byteSwap() (#667) d156370d3 swapping a single-byte value makes no sense c120e3255 be sure parameter is used to avoid compiler warning e85ec9331 --output-on-failure for CTest (#666) e80376197 turn off "there is no warning number" warning c5f0a5d15 A C-string may not be NULL-terminated (#665) 0c5eb29ae use platform-specific routines for byteSwap() (#664) 0b7d581fa remove transform_async() (#663) f6489b6be Merge branch 'main' into feature/xml.lite_tweaks 836c426a2 use function-pointers so that isConsoleOutput is only checked once 56e3c45b1 move depthPrint() functionality into non-member function in preparation for future changes ddcd26d97 Merge branch 'main' into feature/xml.lite_tweaks 69cc0e506 use the more rigorous create_and_check_datatype() 9efb87558 Merge branch 'main' into feature/hdf5 4d2f2f417 more HighFive unittests (#662) 14191a844 HighFive::create_datatype() goes from C++ to HighFive 98583473f utility routines to read string attributes 1fa75ce81 use the C API to read a string attribute 71e7b69f5 still can't figure out how to read a string attribute :-( e96f37a69 test reading the file attributes a25244519 getAttribute() unittest 8f12a3000 getDataType() unittest 857ff0af3 HighFive utility routines (#661) 1d687db57 writeDataSet() utility overload 106aa6894 sigh ... H5Easy::dump() fill fails on Windows/WAF :-( 2641b60b2 Merge branch 'main' into feature/hdf5 35c19e7e8 change actions to @v3 (#660) 212bbd3a3 works on local machine, but not build server ... ? 7125118b0 dump of 1D vector doesn't work :-( c704db435 sigh ... WAF build still failing :-( 01aae4616 does dump() of a 1D vector work? 76a53c813 comment-out H5 writing :-( 0f0e19aff test_highfive_dump() cb8f73795 trying to get highfive_dump() unittest working w/Windows-WAF 6584a264a does test_highfive_create() work? cde6147ce tweak HighFive wrappers (#659) 316566854 Revert "trying HighFive "write" unittests again" a9ec24ca4 trying HighFive "write" unittests again 585ad49a5 tweak names of utility routines 4c91a4d97 make it easier to read a std::vector and std::vecotr 0217ffa26 readDataSet() now works for 1D data 95e8973f2 trying to get hdf5::lite::load() working 4d294611d "const" correctness 5e6305c3f fix load_complex() 4a134dc5f start work on utility routines to read complex data from HDF5 9d76a7f41 Merge branch 'main' into feature/hdf5 8f9667a24 whitepsace ebd3fc99e Merge branch 'main' into feature/hdf5 40091b069 comment-out writing tests for now ... need to figure our WAF bulid failure 935aa3459 be sure the dataset has real data 114b9bf33 update release notes bd9c0b26c tweak HighFive utility routines acda1ef57 turn off diagnostics around expected failures 22a748840 readDataSet() utility routine for HighFive bd88a8c25 HighFive writeDataSet() utility to work with our SpanRC 6142f5b33 use HighFive routines to write a HDF5 file 5bbf1abaf Use HiveFive routines to get info about the file 84fbc8378 duplicate unittests with H5Easy f1f054c03 Merge branch 'main' into feature/hdf5 9b63ca470 fix directory names f6f826689 fix directory names 7aeb82c33 Merge branch 'main' into feature/hdf5 d028baaeb hook up HighFive header-only library (#653) 3083b0a31 Revert "HighFive 2.6.2" 246985a7f Revert ""build" HighFive HDF5 library" a8b75a586 Revert "turn off HighFive Boost support" ec68d5f83 Revert "Add HighFive unittests" f1f85b9e7 Revert "get test_high_five_base more-or-less compiling" 5ea634ee1 Revert "more work on getting HighFive unittests to build" ecc45433c more work on getting HighFive unittests to build bb194788a get test_high_five_base more-or-less compiling d42bde000 Add HighFive unittests ddc86bb32 turn off HighFive Boost support b255122d4 "build" HighFive HDF5 library 396cc3ef2 HighFive 2.6.2 5e5f9d9c0 Merge branch 'main' into feature/hdf5 ee938b4a5 changes from SIX bb764df90 Merge branch 'main' into feature/xml.lite_tweaks de2a24380 make derived classes 'final' if possible 14e19bcd2 Change xml lite function to virtual (#645) 8f42ac8e9 Merge branch 'main' into feature/xml.lite_tweaks 18ad90645 hdf5Write unittest 3462e1179 createFile() and writeFile() overloads ecee81d53 fix typos 197eecfa6 sketch-out hdf5::lite::writeFile() bd2311795 use SpanRC for writeFile(), not yet implemented ea9af7510 simple SpanRC to hold a 2D-size and pointer 027c19ee8 createFile() unittest 1f9d07ecb hook up createFile() 8c7e4473f start hooking up HDF5 writing 146e0bea3 Merge branch 'main' into feature/hdf5 88ca9fcb7 Merge branch 'main' into feature/hdf5 42b604b46 Squashed commit of the following: 10ee602c2 Merge branch 'main' into feature/hdf5 67aa42b69 restore changes from "main" 8bbfcbfbf unittests can be simplified to match fewer "view" classes 126bb802e Merge branch 'main' into feature/hdf5 3f8ba7a42 again, don't need a class just to convert from std::vector<> to std::span<> 24c2b489c Squashed commit of the following: 2703c119d Squashed commit of the following: 9d5228a2b don't need an entire class just to convert a std::vector<> into std::span<> 51bc931dc Merge branch 'main' into feature/hdf5 a84f25816 Squashed commit of the following: c4d2ed696 add missing #include guards, fix type in existing #include guard d541525a0 use a single ComplexViewConstIterator for all views 86e6a459f CODA_OSS_disable_warning causes GCC errors :-( 5d4b9c2cb only need an custom iterator for ComplexSpansView d9f0fb128 hook up iterators b9329e4db initial pass at a ComplexViewConstIterator 635238873 remove compiler warning about unused "constexpr" variables b39f6096f use the casing from H5 to make copy/pasting code slightly easier 0887b13eb Merge branch 'main' into feature/hdf5 bd07df1ca Consistent casing for Dataset, Datatype, Dataspace 7acd30ee2 tweak hdf5.lite dependencies 38ab914df Jupyter notebook for creating H5 files 95a040e0b _small.h5 is now (correctly) FLOAT32 107e7c487 make a simple values() member function to avoid template magic e1feca919 use TEST_SPECIFIC_EXCEPTION macro instead of try/catch 738333688 readDatasetT() now throws for the wrong buffer type 6b2cc2529 Merge branch 'feature/hdf5' of github.com:mdaus/coda-oss into feature/hdf5 310f8fd3d can't get template magic right for copy_axis() 86b306d59 stepping through copy ctors in the debugger is annoying f243e92d6 trying to make wrong type of buffer fail 2b10d9652 read in new sample file a28e59d8c help the compiler with type deduction 49bf5e9bc nested_complex_float_data_small.h5 e029325fc utility routines to "deconstruct" and array of std::complex dede3bd39 Merge branch 'main' into feature/hdf5 904b1ef5e tweak class names, make_() and copy() utility routines 8237b9efb make it harder to pass the wrong types to ComplexViews 4d9aeda2c ComplexArrayView and ComplexParallelView utility classes f5e367dfa test std::span> a4a2844f2 read in the nested "i" and "r" data 115615265 sample file has subgroups 8e1b7869a Merge branch 'feature/hdf5' of github.com:mdaus/coda-oss into feature/hdf5 9f4232a1d update sample H5 file 8c55db73a walk through HDF5 sub-groups 7775ed9c4 Update 123_barfoo_catdog_cx.h5 677975d7c Matlab code to create sample H5 file a0e7dfe07 Update test_hdf5info.cpp 0b67e1602 pass __FILE__ and __LINE__ from calling site for a more accurate exception message 86a677321 skeleton for more sample data 85f79b099 Merge branch 'main' into feature/hdf5 18088e942 Merge branch 'main' into feature/hdf5 3a1d17692 Merge branch 'main' into feature/hdf5 1755c69d7 Merge branch 'main' into feature/hdf5 9ad015432 No more "11" suffix on exception names c20d96251 Squashed commit of the following: c88cee999 other values to be filled-in bca4a4ecd incorporation NamedObject from HDF5 docs 61fa68f72 groupInfo() 460e7d766 datasetInfo() 14eb9b764 start filling in DatasetInfo afe5f1c3a start to fill in DatasetInfo 77a968c72 start filling in GroupInfo d81bcdfd9 openGroup() to open groups (loc) a0cd29469 comment-out "dataset" unittest for now 86e006024 begin filling in FileInfo 366dda6ab a return_type_of utility is needed to deduce the return type e21928263 explicitly pass return type to template 4937ccd11 template to reduce boilerplate when calling try_catch_H5Exceptions b3b5ebde7 use new exception utility routines ea1c03ef0 put exception handling/conversion in a utility routine 819a99d39 utility routine for exception handling 6f34eea97 put utilities in a separate file for easier reuse fcbde4f24 break utility routines into smaller pieces for easier reuse 52358ea8a WIN32 no longer automatically defined? 5a4286472 Revert "build HDF5 with C89" 680e599e9 build HDF5 with C89 a87a07121 Merge branch 'main' into feature/hdf5 8447c1a90 Revert "sym-links instead of copying files" db3b5e12b Merge branch 'main' into feature/xml.lite_tweaks fb60b5696 Merge branch 'main' into feature/hdf5 5110a5cc8 Comments about _u and _q 1a937d32c Merge branch 'main' into feature/xml.lite_tweaks fa06f04d7 get ready for hdf5.lite enhancdements b040c7c43 sym-links instead of copying files aa431bb47 use _u for xml::lite::Uri 3d0c6d58c fix case-sensitive #include filename 93dcd0e52 operator() for getElementByName() 75a93af85 more operator[] overloads to make attribute management easier 4ab8216f8 user-defined string literals to remove some noise around xml::lite::QName f82f0b0fc Merge branch 'main' into feature/xml.lite_tweaks ae30e3644 Merge branch 'feature/xml.lite_tweaks' of github.com:mdaus/coda-oss into feature/xml.lite_tweaks ffdd9beb0 simplify attribute creation 9bf5414f5 simplify attribute creation 82d7a4e95 SWIG gets confused about namespaces 7a61d0741 fix bug on Element ctor uncovered by unittest fdd7e58c1 QName is also in the xerces namespace which confuses SWIG bindings a325b7053 operator+=() overload for addChild daf30e6c0 Merge branch 'feature/xml.lite_tweaks' of github.com:mdaus/coda-oss into feature/xml.lite_tweaks b887d2b47 provide overloads for Element& rather than creating new "reference" types 1fa6bba38 rename test_xmleasy.cpp 7c8c9e0f1 += overload 850da6f63 overload for std::string 4547fc5a7 use UIT-8 strings for characterData 4723462a3 convenient addChild() overloads e48720753 copy over ElementReference from xml.easy a4ca30a0d Merge branch 'main' into feature/xml.lite_tweaks 6ae9f0b71 Revert "check-in of new xml.easy (to move code between computers)" f7466a6d7 Revert "simple routines for single element" a5490230d Revert "make some operators simplier ways of calling functions" c9a25630a Revert "get document creation working" 8af8710b0 Revert "free functions instead of member functions" 16c3847cb Revert "ElementReference distinct from Element" 7d68e156f Revert "ElementMutableReference" 00eb2a282 Merge branch 'main' into feature/xml.lite_tweaks a42969c1f ElementMutableReference a20ae9355 ElementReference distinct from Element 14eeeea0b free functions instead of member functions 4aae014b3 get document creation working 883569269 make some operators simplier ways of calling functions 053bd1212 simple routines for single element 8bf701a2e check-in of new xml.easy (to move code between computers) 41f959051 unittests for creating XML documents from scratch 9752d50ae Merge branch 'main' into feature/xml.lite_tweaks 1531d5709 by default, don't validate strings passed to Uri() 46d13d4bf Merge branch 'master' into feature/xml.lite_tweaks 39b547d32 remove more vestiges of Expat and LibXML ec8274d52 remove LibXML and Expat as they're no longer used/supported. 20eeefeef Merge branch 'master' into feature/xml.lite_tweaks 95074b9b1 update for newer Intel compiler 7024f71e1 Merge branch 'master' into feature/xml.lite_tweaks 57b1cbc83 Merge branch 'master' into feature/xml.lite_tweaks 4b67561c3 remove validate() overload that nobody is using fa15f1e5d Squashed commit of the following: 1484a9090 test the new validate() API 470da70fb hookup StringStreamT routines 2cddf2504 begin hooking up validate() overloads 1b5d910f3 overload validate() for UTF-8 and Windows-1252 03309b8c9 Squashed commit of the following: b72c6c5bf older compiler doesn't like our make_unique af8f00307 validate UTF-8 XML on Linux 211188613 unit-test for LEGACY XML validation 3c1169d2b Squashed commit of the following: 3afff19ca std::filesystem::path for FileInputStreamOS 908d452f8 WIP: validate all of our sample XML files 00f9bb16b validate against a XML schema 243d8c356 Merge branch 'master' into feature/xml.lite_tweaks 2815d707d fix to work with SWIG bindings. :-( 460862132 trying (again) to remove vestiages of old code e3c83a858 Revert "new code should use UTF-8" 811207c92 new code should use UTF-8 0ffd835f9 Squashed commit of the following: 1e7e03ded Merge branch 'master' into feature/xml.lite_tweaks c1d806aff Merge branch 'master' into feature/xml.lite_tweaks 850d3c811 str::strip() that can be easier to use than str::trim() 580ba9c8c explicitly =delete move 2b39831a8 Squashed commit of the following: 39eebdc23 Merge branch 'master' into feature/xml.lite_tweaks 9adf86cba force calling new UTF-8 write() routines ea61b6204 Merge branch 'master' into feature/xml.lite_tweaks 8a34583fa overload to take schemaPaths as filesystem::path 8671b442f parse XML embedded in a binary file ec4a902f1 updates from xerces.lite 80dc4d963 updates from xerces.lite 549766d6c Attributes::contains() no longer catches an exception 8a645ceac need "sys/" when building in other environments 36af08269 super-simple URI validation 78ef28a3e SWIG bindings are a PITA! :-( e9cba8491 SWIG needs help with Uri 8a8d8dc07 another routines used by pre-build SWIG bindings 818e1ec5d pre-build SWIG bindings use getElementByTagName() member function 067cac5d8 old compiler gets confused on unadorned QName ba92c0ae7 more use of Uri and QName 446c7d17a use QName in new code d6f8b0c83 more direct use of QName 90fff1c73 use xml::lite::QName instead of tuple 646cbb5ed more direct use of QName and Uri ba589ea3b make QName more robust bab0ee8b5 createElement() -> addNewElement() e3a145747 grab changes from six-library 32285e95c Merge branch 'master' into feature/xml.lite_tweaks 9f79f0bf6 Merge branch 'master' into feature/xml.lite_tweaks a12bbc32c make it easier to create new Elements with a value fc9967f98 make it easy for callers to addChild() keep a reference to the Element 4627766b7 be sure test_xmlparser works in "externals" of other projects bf2276396 "private" is part of the name-mangling fad92bcc8 making sure copy-ctor is implemented f90fdcead consolidate common XML test code 9fc53f2d5 use str:: utility for casting 6da6f794b still trying to find the right macro for SWIG 0c1b86c56 still trying to fix SWIG fdc6fc9bd trying to fix SWIG build error 7835e8c27 SWIG needs copy-ctor 585695942 disable copy/assignment for Element, it's probably almost always wrong 391fed613 fix double-delete caused by copying 61790fe69 retry parsing XML with Windows-1252 if first parse() fails 63cffac59 change string_encoding to match coda-oss style of PascalCase 010479bbe read an XML file we know is wrongly encoded as Windows-1252 9a0505062 more references instead of pointers 2d44b6951 Reading Windows-1252 w/o "encoding" fails 63dc7b076 read Windows-1252 too c9434c9cb test as UIT-8 too f310ccf0c get reading from UTF-8 XML working on Windows 1fa39c2be get testReadUtf8XmlFile working on Linux 1a83cd815 sys::Path is too much trouble right now ed60aa22c unit-test to read XML from a file a9336db7c Squashed commit of the following: 0825beb0d Merge branch 'master' into feature/xml.lite_tweaks c618489be Merge branch 'master' into feature/xml.lite_tweaks e8e4b8fe1 determine string_encoding based on platform 1f43bcfc2 create a new Element by using the platform to determine "characterData" encoding 961bef66b Merge branch 'master' into feature/xml.lite_tweaks e9798a5cb fix static_assert() 6f7772874 Merge branch 'master' into feature/xml.lite_tweaks b98d4f5a9 Merge branch 'master' into feature/xml.lite_tweaks 1b5abba2a The (old) version of SWIG we're using doesn't like certain C++11 features. 53bdeabaf Merge branch 'master' into feature/xml.lite_tweaks 60cf8ae80 "" doesn't work with decltype() in older C++ 97e72477a reduce getValue() overloads by making "key" a template argument 5e6373e55 reduce code duplication f9e7cfeee provide castValue instead of getValue(T&) cbd0bd8f2 castValue throws instead of returning a bool like getValue(T&) 87c7514fc Merge branch 'master' into feature/xml.lite_tweaks 10cc61223 make getElement*() consistent for zero or >1 results f5b137e3c Merge branch 'master' into feature/xml.lite_tweaks 1765efc62 allow clients to specify toType() and toString() for getValue() and setValue() df8b746e1 allow clients to specify their own toType/toString routines 66702726a Merge branch 'master' into feature/xml.lite_tweaks 6956311f1 Merge branch 'master' into feature/xml.lite_tweaks d505f3593 Merge branch 'master' into feature/xml.lite_tweaks fbd106115 catch a BadCastException and return false from getValue() 3a78377b5 use a template to reduce duplicated code 0ad4b8606 Merge branch 'master' into feature/xml.lite_tweaks a848aa3a2 get & set the characer data as a type f3ee1ee12 utility routines to set an attribute value 595227683 templates to get an attribute value convert to a specific type 06639227b miised a change in last commit 1aa458ef8 add getValue() overloads that return true/false rather than throwing faa6d3075 added getElementByTagName() overloads as that's a very common use-case git-subtree-dir: externals/coda-oss git-subtree-split: 54033e70e353da94340dd7b96d0b1c6652308952 commit cc6009422ec41dd6e48ade90c37bdbfd97a1bc35 Merge: fec3755e0 1ceb8e3ff Author: Dan Smith Date: Mon Jun 19 14:18:30 2023 -0400 Merge commit '1ceb8e3ffb55a240085250cfde3f4d1ab7ef0b04' into develop/sync_externals commit fec3755e04a8311103aef1ded477b17ce826b044 Author: Dan Smith Date: Mon Jun 19 14:18:05 2023 -0400 latest from CODA-OSS * consistent VCXPROJ settings * fix NITF-C build errors * explicitly link against xerces and xml.lite * match YAML in coda-oss * Squashed commit of the following: commit 5e79844947b46f1102627fa62857e4c40e75b92a Author: Dan Smith Date: Tue Jul 18 14:12:02 2023 -0400 latest from CODA-OSS and NITRO commit 10ed7436736c7e0ee16fe968f67b3602e7668c6a Merge: 8aaead72f 3da54d84f Author: Dan Smith Date: Tue Jul 18 14:11:43 2023 -0400 sync_externals commit 3da54d84f45c202c9e9659926e4cb0f6f9f44dea Author: Dan Smith Date: Tue Jul 18 14:11:35 2023 -0400 Squashed 'externals/nitro/' changes from 225273436..de91d4977 de91d4977 Fix bug creating NITFException (#567) git-subtree-dir: externals/nitro git-subtree-split: de91d49775ed9e0e36c39e368ff8a9d2778353a1 commit 8aaead72f8dd69fbc63ff6713f59d9b362b7d055 Merge: b15154cbb e5f8b9600 Author: Dan Smith Date: Tue Jul 18 14:11:31 2023 -0400 Merge commit 'e5f8b960096a91fe031e147aeea41a34e3b6b060' into develop/sync_externals commit e5f8b960096a91fe031e147aeea41a34e3b6b060 Author: Dan Smith Date: Tue Jul 18 14:11:31 2023 -0400 Squashed 'externals/coda-oss/' changes from e2472acfc..4092fd8e7 4092fd8e7 remove work-around for NITRO bug (#704) git-subtree-dir: externals/coda-oss git-subtree-split: 4092fd8e76d6c833dfa4c5e1e97396174001dd08 commit b15154cbbd90ddb559056b538a1c3c3f182bc2d7 Author: Dan Smith Date: Tue Jul 18 14:11:27 2023 -0400 latest from CODA-OSS and NITRO commit 3649c1c5a397770e38d49acc7d5c3fc9424b1e6b Merge: c8e008348 e3af2bf57 Author: Dan Smith Date: Tue Jul 18 14:10:55 2023 -0400 Merge branch 'main' into develop/sync_externals commit c8e0083487b80086c3b3a34bb21a01dc08f44e97 Author: Dan Smith Date: Tue Jul 18 08:10:01 2023 -0400 latest from CODA-OSS and NITRO commit 13a93434bcf431707161a68e2987ffacacfcbc64 Merge: be953dd0b bd99b0bde Author: Dan Smith Date: Tue Jul 18 08:09:47 2023 -0400 sync_externals commit bd99b0bdeebf9ceb5e62356ddb4f252352637333 Author: Dan Smith Date: Tue Jul 18 08:09:39 2023 -0400 Squashed 'externals/nitro/' changes from b4ae2d429..225273436 225273436 fix YAML for 'main' 5d1c83d11 single project for unittests (#566) 102a019db latest from CODA-OSS (known broken build) (#565) git-subtree-dir: externals/nitro git-subtree-split: 225273436ddfa39b5cbb8a8b81c3f288720a8177 commit 069ec60d6082a207f41aaf7873ea273a31ea8d68 Author: Dan Smith Date: Tue Jul 18 08:09:35 2023 -0400 Squashed 'externals/coda-oss/' changes from f70b4202f..e2472acfc e2472acfc build in NITRO and SIX (#703) 32ccf9105 Use same build paths as Visual Studio (#701) 366ac9f43 Another round of removing compiler warnings (#702) a7f8ef260 Fix compile warnings from building CODA (#700) git-subtree-dir: externals/coda-oss git-subtree-split: e2472acfc1b31119a1dfbeaced003bfdffe80118 commit be953dd0be8403de0d459a3a63b0f458f9946858 Merge: b43b3d0d2 069ec60d6 Author: Dan Smith Date: Tue Jul 18 08:09:35 2023 -0400 Merge commit '069ec60d6082a207f41aaf7873ea273a31ea8d68' into develop/sync_externals commit b43b3d0d206bb8795869104796a5f6ef0d23a4da Author: Dan Smith Date: Tue Jul 18 08:09:17 2023 -0400 latest from CODA-OSS and NITRO commit c9cb326eee83638e209cf8ad914acf6765b4ed1e Author: J. Daniel Smith Date: Fri Jul 14 10:36:07 2023 -0400 latest from CODA-OSS and NITRO commit fe6ba2a13f2e941b2a83943981676c677e0b07db Merge: 15d0336d3 2e609250f Author: J. Daniel Smith Date: Fri Jul 14 10:32:19 2023 -0400 Merge branch 'main' into develop/sync_externals commit 15d0336d3eed525729b0087b08ad754712aa0164 Author: Dan Smith Date: Mon Jul 10 16:27:24 2023 -0400 =default doesn't implement the destructor commit 61095290d3cb6ae98537eb638c410452bea16553 Author: Dan Smith Date: Mon Jul 10 16:13:37 2023 -0400 somewhere a compiler warning got unsuppressed commit ca98de027cd41fecbff9e8b1b9cdb311969c64f2 Author: Dan Smith Date: Mon Jul 10 15:27:14 2023 -0400 latest from CODA-OSS and NITRO commit 6c6fd14a96c0516297fa7c64522aac3353032b1c Merge: d4c971de4 34b23e92f Author: Dan Smith Date: Mon Jul 10 15:26:54 2023 -0400 sync_externals commit 34b23e92fa6b58a4d0a5f4bc9e4fbc50298b574c Author: Dan Smith Date: Mon Jul 10 15:26:48 2023 -0400 Squashed 'externals/nitro/' changes from 49ec50325..b4ae2d429 b4ae2d429 match YAML from coda-oss 176bcaf6d build NITRO.SLN using msbuild (#562) 85e9043b8 latest from CODA-OSS (#561) git-subtree-dir: externals/nitro git-subtree-split: b4ae2d4290dcc5482970980ebe85719436990647 commit 3b07146d57387ad695a7c0745c77c6c891338212 Author: Dan Smith Date: Mon Jul 10 15:26:44 2023 -0400 Squashed 'externals/coda-oss/' changes from c2fc5fc66..f70b4202f f70b4202f account for coda-oss.vcxproj being in other SLNs af3faebfc Remove more compiler/code-analysis warnings (#699) 82be2a6db unittests should work w/o install (#698) dbb90a06d add msbuild for coda-oss.sln (#697) 5a417140a reduce compiler warnings (#696) 288619dfa all modules now part of coda-oss.vcxproj (#695) git-subtree-dir: externals/coda-oss git-subtree-split: f70b4202f19f260941a0245e41301ae232348fc7 commit d4c971de47e47d6d8b2d42bfe784cd2ceff28fae Merge: d60eddd07 3b07146d5 Author: Dan Smith Date: Mon Jul 10 15:26:44 2023 -0400 Merge commit '3b07146d57387ad695a7c0745c77c6c891338212' into develop/sync_externals commit d60eddd077c52ad97b5d1ed07868d47d9086ee39 Author: Dan Smith Date: Mon Jul 10 15:26:36 2023 -0400 latest from CODA-OSS and NITRO commit e275c075aead24849470f2dbdf5cf99cc8c3253d Merge: d606c616b 417ea3f70 Author: Dan Smith Date: Mon Jul 10 15:26:03 2023 -0400 Merge branch 'main' into develop/sync_externals commit d606c616b54e49098daa1051dd71ec0c96c9c245 Merge: 36beb996e 8e847cb0d Author: Dan Smith Date: Wed Jul 5 14:01:51 2023 -0400 Merge branch 'main' into develop/sync_externals commit 36beb996ee23058033dcf0de043486b571bf0673 Author: Dan Smith Date: Wed Jul 5 13:48:37 2023 -0400 sync_externals commit 11665af92c23e646f6a5cd1585328571ba024f1f Merge: 388bdad2d 9a22788e8 Author: Dan Smith Date: Wed Jul 5 13:48:19 2023 -0400 sync_externals commit 9a22788e84e9ef6e38e4b138ff6fecbd8b35b995 Author: Dan Smith Date: Wed Jul 5 13:48:06 2023 -0400 Squashed 'externals/nitro/' changes from cee9feb42..49ec50325 49ec50325 use new "PlatformToolkit" special environment variable (#560) 6c06e3711 latest from CODA-OSS (#559) git-subtree-dir: externals/nitro git-subtree-split: 49ec50325d0dcdef40b63dd440afdb82d6b6d379 commit ea623b4ee1de1651418d5d4424201df95915dca8 Author: Dan Smith Date: Wed Jul 5 13:48:02 2023 -0400 Squashed 'externals/coda-oss/' changes from 54033e70e..c2fc5fc66 c2fc5fc66 add more projects to coda-oss-lite.vcxproj (#694) ceb86c186 support $(PlatformToolset) as a "special" environment variable (#693) d78a8595a OS::getSIMDInstructionSet() utility (#692) 2d2df467d fix `python3 waf dumplib` git-subtree-dir: externals/coda-oss git-subtree-split: c2fc5fc660c2794d77fac2b71cf0dfae76c22c3e commit 388bdad2d66759d54544f3fd3302b5c2c4c027b6 Merge: f47cbbcc5 ea623b4ee Author: Dan Smith Date: Wed Jul 5 13:48:02 2023 -0400 Merge commit 'ea623b4ee1de1651418d5d4424201df95915dca8' into develop/sync_externals commit f47cbbcc590bc28d09577dda35d3b6f5eb682b20 Author: Dan Smith Date: Wed Jul 5 13:47:40 2023 -0400 latest from CODA-OSS and NITRO commit f25c53a3afee8fa3e016170da928996c6379dc23 Merge: c747f326b d2221ad33 Author: Dan Smith Date: Wed Jul 5 13:47:05 2023 -0400 Merge branch 'main' into develop/sync_externals commit c747f326b60ba8a82b3c33e91aabe2651d6bb13d Author: Dan Smith Date: Mon Jun 19 14:30:50 2023 -0400 latest from CODA-OSS and NITRO commit b142ec4fcb2a8007e35e3d68e0ae752f4b2828d0 Merge: 2829f93c9 3d4e554aa Author: Dan Smith Date: Mon Jun 19 14:30:15 2023 -0400 sync_externals commit 3d4e554aa3934c7157bf9c2e57e2482662938b10 Author: Dan Smith Date: Mon Jun 19 14:30:07 2023 -0400 Squashed 'externals/nitro/' changes from 3f01809fa..cee9feb42 cee9feb42 latest from CODA-OSS (#558) git-subtree-dir: externals/nitro git-subtree-split: cee9feb424b0f9c1f11f37f67a1795b3cc5e8dd1 commit 2829f93c9de0e8787dbe6cb319d6f32143dcdd8e Merge: e47ccf30e 12995e63a Author: Dan Smith Date: Mon Jun 19 14:29:10 2023 -0400 Merge branch 'main' into develop/sync_externals commit e47ccf30e059e0cd32b42dc90a45f4b8a8512caf Author: Dan Smith Date: Mon Jun 19 14:19:10 2023 -0400 latest from CODA-OSS commit 04090c4a13b921f33257662950e46bfc2e58cabb Merge: cc6009422 ac1ccde84 Author: Dan Smith Date: Mon Jun 19 14:18:41 2023 -0400 sync_externals commit ac1ccde84b2be856ac947b2670dd8228c9980889 Author: Dan Smith Date: Mon Jun 19 14:18:34 2023 -0400 Squashed 'externals/nitro/' changes from c8ecbe9ae..3f01809fa 3f01809fa latest from coda-oss (#557) 471fb3fc1 Update test_j2k_loading++.cpp b12caf2fc latest from CODA-OSS (#556) 0cd432624 use sys::make_span (#555) 05dae18a3 patch to build other projects 8f974e995 NITRO-2.11.3 (#554) 870aa6afd update to coda-oss 2023-06-05 (#553) 2fd7a0bfa latest from coda-oss (#552) 0eecce004 invoke() utility to reduce code duplication (#550) 59fb02fe9 latest from coda-oss (#551) 9fbf2b7b8 Fill out adapter free block which is used for nitf decompression (#549) 089ba0b5b latest from coda-oss 3b52f0025 latest from coda-oss (#547) 90c6263e2 latest from coda-oss (#544) 90d513ac5 latest from coda-oss (#543) git-subtree-dir: externals/nitro git-subtree-split: 3f01809fae7d471aa0f1594fc5eec1e3111cd710 commit 1ceb8e3ffb55a240085250cfde3f4d1ab7ef0b04 Author: Dan Smith Date: Mon Jun 19 14:18:30 2023 -0400 Squashed 'externals/coda-oss/' changes from e87c32b4d..54033e70e 54033e70e Merge branch 'main' into feature/complex_short 3c63f9f65 std::numbers from C++20 (#691) 892dd0e00 ComplexInteger and ComplexReal to better match existing naming conventions (#690) b3872181e match coda-oss naming conventions (#688) 704d6867f beef-up our complex type (#687) 47c1c1cd6 check is_absolute() for URLs (#686) c042373e1 be sure our Path::isAbolute() matches std::filesystem::path::absolute() (#684) ad10286bc volatile is about "special" memory, not threading (#685) f4d42005f fix build error in NITRO ff11a5557 keep using std::complex for now (#682) c88b9c053 types::complex (#681) d1244a080 don't need our own make_unique in C++14 (#680) aeec0131c assert()s for mem::CopyablePtr (#679) 72b0ebd60 add types::complex_short (#678) 932130a58 patch to build other projects c00c1f203 coda-oss release 2023-06-06 (#677) ef54bbcd5 remove more compiler warnings (#676) dadfc5ce6 distinguish between byte-swapping a buffer and single value (#674) 90187f6cd more xml.lite tweaks for SIDD-3.0/ISM (#675) eb9960772 stronger type-checking for byteSwap() (#673) ff4f820ed xml.lite tweaks to support SIDD 3.0 ISM (#672) b1de8c0e5 std::byte should be a unique type (#671) c05bf9a02 allow enums to be byte-swapped too 1f9fd88d6 remove spurious 47684c45b byteSwap now uses byte buffers (#670) cbc659db2 add swapBytes() utility from SIX (#669) 891481b64 simplify byte-swapping (#668) 540ae763e more byteSwap() tweaks 0774c03c4 threaded byteSwap() (#667) d156370d3 swapping a single-byte value makes no sense c120e3255 be sure parameter is used to avoid compiler warning e85ec9331 --output-on-failure for CTest (#666) e80376197 turn off "there is no warning number" warning c5f0a5d15 A C-string may not be NULL-terminated (#665) 0c5eb29ae use platform-specific routines for byteSwap() (#664) 0b7d581fa remove transform_async() (#663) f6489b6be Merge branch 'main' into feature/xml.lite_tweaks 836c426a2 use function-pointers so that isConsoleOutput is only checked once 56e3c45b1 move depthPrint() functionality into non-member function in preparation for future changes ddcd26d97 Merge branch 'main' into feature/xml.lite_tweaks 69cc0e506 use the more rigorous create_and_check_datatype() 9efb87558 Merge branch 'main' into feature/hdf5 4d2f2f417 more HighFive unittests (#662) 14191a844 HighFive::create_datatype() goes from C++ to HighFive 98583473f utility routines to read string attributes 1fa75ce81 use the C API to read a string attribute 71e7b69f5 still can't figure out how to read a string attribute :-( e96f37a69 test reading the file attributes a25244519 getAttribute() unittest 8f12a3000 getDataType() unittest 857ff0af3 HighFive utility routines (#661) 1d687db57 writeDataSet() utility overload 106aa6894 sigh ... H5Easy::dump() fill fails on Windows/WAF :-( 2641b60b2 Merge branch 'main' into feature/hdf5 35c19e7e8 change actions to @v3 (#660) 212bbd3a3 works on local machine, but not build server ... ? 7125118b0 dump of 1D vector doesn't work :-( c704db435 sigh ... WAF build still failing :-( 01aae4616 does dump() of a 1D vector work? 76a53c813 comment-out H5 writing :-( 0f0e19aff test_highfive_dump() cb8f73795 trying to get highfive_dump() unittest working w/Windows-WAF 6584a264a does test_highfive_create() work? cde6147ce tweak HighFive wrappers (#659) 316566854 Revert "trying HighFive "write" unittests again" a9ec24ca4 trying HighFive "write" unittests again 585ad49a5 tweak names of utility routines 4c91a4d97 make it easier to read a std::vector and std::vecotr 0217ffa26 readDataSet() now works for 1D data 95e8973f2 trying to get hdf5::lite::load() working 4d294611d "const" correctness 5e6305c3f fix load_complex() 4a134dc5f start work on utility routines to read complex data from HDF5 9d76a7f41 Merge branch 'main' into feature/hdf5 8f9667a24 whitepsace ebd3fc99e Merge branch 'main' into feature/hdf5 40091b069 comment-out writing tests for now ... need to figure our WAF bulid failure 935aa3459 be sure the dataset has real data 114b9bf33 update release notes bd9c0b26c tweak HighFive utility routines acda1ef57 turn off diagnostics around expected failures 22a748840 readDataSet() utility routine for HighFive bd88a8c25 HighFive writeDataSet() utility to work with our SpanRC 6142f5b33 use HighFive routines to write a HDF5 file 5bbf1abaf Use HiveFive routines to get info about the file 84fbc8378 duplicate unittests with H5Easy f1f054c03 Merge branch 'main' into feature/hdf5 9b63ca470 fix directory names f6f826689 fix directory names 7aeb82c33 Merge branch 'main' into feature/hdf5 d028baaeb hook up HighFive header-only library (#653) 3083b0a31 Revert "HighFive 2.6.2" 246985a7f Revert ""build" HighFive HDF5 library" a8b75a586 Revert "turn off HighFive Boost support" ec68d5f83 Revert "Add HighFive unittests" f1f85b9e7 Revert "get test_high_five_base more-or-less compiling" 5ea634ee1 Revert "more work on getting HighFive unittests to build" ecc45433c more work on getting HighFive unittests to build bb194788a get test_high_five_base more-or-less compiling d42bde000 Add HighFive unittests ddc86bb32 turn off HighFive Boost support b255122d4 "build" HighFive HDF5 library 396cc3ef2 HighFive 2.6.2 5e5f9d9c0 Merge branch 'main' into feature/hdf5 ee938b4a5 changes from SIX bb764df90 Merge branch 'main' into feature/xml.lite_tweaks de2a24380 make derived classes 'final' if possible 14e19bcd2 Change xml lite function to virtual (#645) 8f42ac8e9 Merge branch 'main' into feature/xml.lite_tweaks 18ad90645 hdf5Write unittest 3462e1179 createFile() and writeFile() overloads ecee81d53 fix typos 197eecfa6 sketch-out hdf5::lite::writeFile() bd2311795 use SpanRC for writeFile(), not yet implemented ea9af7510 simple SpanRC to hold a 2D-size and pointer 027c19ee8 createFile() unittest 1f9d07ecb hook up createFile() 8c7e4473f start hooking up HDF5 writing 146e0bea3 Merge branch 'main' into feature/hdf5 88ca9fcb7 Merge branch 'main' into feature/hdf5 42b604b46 Squashed commit of the following: 10ee602c2 Merge branch 'main' into feature/hdf5 67aa42b69 restore changes from "main" 8bbfcbfbf unittests can be simplified to match fewer "view" classes 126bb802e Merge branch 'main' into feature/hdf5 3f8ba7a42 again, don't need a class just to convert from std::vector<> to std::span<> 24c2b489c Squashed commit of the following: 2703c119d Squashed commit of the following: 9d5228a2b don't need an entire class just to convert a std::vector<> into std::span<> 51bc931dc Merge branch 'main' into feature/hdf5 a84f25816 Squashed commit of the following: c4d2ed696 add missing #include guards, fix type in existing #include guard d541525a0 use a single ComplexViewConstIterator for all views 86e6a459f CODA_OSS_disable_warning causes GCC errors :-( 5d4b9c2cb only need an custom iterator for ComplexSpansView d9f0fb128 hook up iterators b9329e4db initial pass at a ComplexViewConstIterator 635238873 remove compiler warning about unused "constexpr" variables b39f6096f use the casing from H5 to make copy/pasting code slightly easier 0887b13eb Merge branch 'main' into feature/hdf5 bd07df1ca Consistent casing for Dataset, Datatype, Dataspace 7acd30ee2 tweak hdf5.lite dependencies 38ab914df Jupyter notebook for creating H5 files 95a040e0b _small.h5 is now (correctly) FLOAT32 107e7c487 make a simple values() member function to avoid template magic e1feca919 use TEST_SPECIFIC_EXCEPTION macro instead of try/catch 738333688 readDatasetT() now throws for the wrong buffer type 6b2cc2529 Merge branch 'feature/hdf5' of github.com:mdaus/coda-oss into feature/hdf5 310f8fd3d can't get template magic right for copy_axis() 86b306d59 stepping through copy ctors in the debugger is annoying f243e92d6 trying to make wrong type of buffer fail 2b10d9652 read in new sample file a28e59d8c help the compiler with type deduction 49bf5e9bc nested_complex_float_data_small.h5 e029325fc utility routines to "deconstruct" and array of std::complex dede3bd39 Merge branch 'main' into feature/hdf5 904b1ef5e tweak class names, make_() and copy() utility routines 8237b9efb make it harder to pass the wrong types to ComplexViews 4d9aeda2c ComplexArrayView and ComplexParallelView utility classes f5e367dfa test std::span> a4a2844f2 read in the nested "i" and "r" data 115615265 sample file has subgroups 8e1b7869a Merge branch 'feature/hdf5' of github.com:mdaus/coda-oss into feature/hdf5 9f4232a1d update sample H5 file 8c55db73a walk through HDF5 sub-groups 7775ed9c4 Update 123_barfoo_catdog_cx.h5 677975d7c Matlab code to create sample H5 file a0e7dfe07 Update test_hdf5info.cpp 0b67e1602 pass __FILE__ and __LINE__ from calling site for a more accurate exception message 86a677321 skeleton for more sample data 85f79b099 Merge branch 'main' into feature/hdf5 18088e942 Merge branch 'main' into feature/hdf5 3a1d17692 Merge branch 'main' into feature/hdf5 1755c69d7 Merge branch 'main' into feature/hdf5 9ad015432 No more "11" suffix on exception names c20d96251 Squashed commit of the following: c88cee999 other values to be filled-in bca4a4ecd incorporation NamedObject from HDF5 docs 61fa68f72 groupInfo() 460e7d766 datasetInfo() 14eb9b764 start filling in DatasetInfo afe5f1c3a start to fill in DatasetInfo 77a968c72 start filling in GroupInfo d81bcdfd9 openGroup() to open groups (loc) a0cd29469 comment-out "dataset" unittest for now 86e006024 begin filling in FileInfo 366dda6ab a return_type_of utility is needed to deduce the return type e21928263 explicitly pass return type to template 4937ccd11 template to reduce boilerplate when calling try_catch_H5Exceptions b3b5ebde7 use new exception utility routines ea1c03ef0 put exception handling/conversion in a utility routine 819a99d39 utility routine for exception handling 6f34eea97 put utilities in a separate file for easier reuse fcbde4f24 break utility routines into smaller pieces for easier reuse 52358ea8a WIN32 no longer automatically defined? 5a4286472 Revert "build HDF5 with C89" 680e599e9 build HDF5 with C89 a87a07121 Merge branch 'main' into feature/hdf5 8447c1a90 Revert "sym-links instead of copying files" db3b5e12b Merge branch 'main' into feature/xml.lite_tweaks fb60b5696 Merge branch 'main' into feature/hdf5 5110a5cc8 Comments about _u and _q 1a937d32c Merge branch 'main' into feature/xml.lite_tweaks fa06f04d7 get ready for hdf5.lite enhancdements b040c7c43 sym-links instead of copying files aa431bb47 use _u for xml::lite::Uri 3d0c6d58c fix case-sensitive #include filename 93dcd0e52 operator() for getElementByName() 75a93af85 more operator[] overloads to make attribute management easier 4ab8216f8 user-defined string literals to remove some noise around xml::lite::QName f82f0b0fc Merge branch 'main' into feature/xml.lite_tweaks ae30e3644 Merge branch 'feature/xml.lite_tweaks' of github.com:mdaus/coda-oss into feature/xml.lite_tweaks ffdd9beb0 simplify attribute creation 9bf5414f5 simplify attribute creation 82d7a4e95 SWIG gets confused about namespaces 7a61d0741 fix bug on Element ctor uncovered by unittest fdd7e58c1 QName is also in the xerces namespace which confuses SWIG bindings a325b7053 operator+=() overload for addChild daf30e6c0 Merge branch 'feature/xml.lite_tweaks' of github.com:mdaus/coda-oss into feature/xml.lite_tweaks b887d2b47 provide overloads for Element& rather than creating new "reference" types 1fa6bba38 rename test_xmleasy.cpp 7c8c9e0f1 += overload 850da6f63 overload for std::string 4547fc5a7 use UIT-8 strings for characterData 4723462a3 convenient addChild() overloads e48720753 copy over ElementReference from xml.easy a4ca30a0d Merge branch 'main' into feature/xml.lite_tweaks 6ae9f0b71 Revert "check-in of new xml.easy (to move code between computers)" f7466a6d7 Revert "simple routines for single element" a5490230d Revert "make some operators simplier ways of calling functions" c9a25630a Revert "get document creation working" 8af8710b0 Revert "free functions instead of member functions" 16c3847cb Revert "ElementReference distinct from Element" 7d68e156f Revert "ElementMutableReference" 00eb2a282 Merge branch 'main' into feature/xml.lite_tweaks a42969c1f ElementMutableReference a20ae9355 ElementReference distinct from Element 14eeeea0b free functions instead of member functions 4aae014b3 get document creation working 883569269 make some operators simplier ways of calling functions 053bd1212 simple routines for single element 8bf701a2e check-in of new xml.easy (to move code between computers) 41f959051 unittests for creating XML documents from scratch 9752d50ae Merge branch 'main' into feature/xml.lite_tweaks 1531d5709 by default, don't validate strings passed to Uri() 46d13d4bf Merge branch 'master' into feature/xml.lite_tweaks 39b547d32 remove more vestiges of Expat and LibXML ec8274d52 remove LibXML and Expat as they're no longer used/supported. 20eeefeef Merge branch 'master' into feature/xml.lite_tweaks 95074b9b1 update for newer Intel compiler 7024f71e1 Merge branch 'master' into feature/xml.lite_tweaks 57b1cbc83 Merge branch 'master' into feature/xml.lite_tweaks 4b67561c3 remove validate() overload that nobody is using fa15f1e5d Squashed commit of the following: 1484a9090 test the new validate() API 470da70fb hookup StringStreamT routines 2cddf2504 begin hooking up validate() overloads 1b5d910f3 overload validate() for UTF-8 and Windows-1252 03309b8c9 Squashed commit of the following: b72c6c5bf older compiler doesn't like our make_unique af8f00307 validate UTF-8 XML on Linux 211188613 unit-test for LEGACY XML validation 3c1169d2b Squashed commit of the following: 3afff19ca std::filesystem::path for FileInputStreamOS 908d452f8 WIP: validate all of our sample XML files 00f9bb16b validate against a XML schema 243d8c356 Merge branch 'master' into feature/xml.lite_tweaks 2815d707d fix to work with SWIG bindings. :-( 460862132 trying (again) to remove vestiages of old code e3c83a858 Revert "new code should use UTF-8" 811207c92 new code should use UTF-8 0ffd835f9 Squashed commit of the following: 1e7e03ded Merge branch 'master' into feature/xml.lite_tweaks c1d806aff Merge branch 'master' into feature/xml.lite_tweaks 850d3c811 str::strip() that can be easier to use than str::trim() 580ba9c8c explicitly =delete move 2b39831a8 Squashed commit of the following: 39eebdc23 Merge branch 'master' into feature/xml.lite_tweaks 9adf86cba force calling new UTF-8 write() routines ea61b6204 Merge branch 'master' into feature/xml.lite_tweaks 8a34583fa overload to take schemaPaths as filesystem::path 8671b442f parse XML embedded in a binary file ec4a902f1 updates from xerces.lite 80dc4d963 updates from xerces.lite 549766d6c Attributes::contains() no longer catches an exception 8a645ceac need "sys/" when building in other environments 36af08269 super-simple URI validation 78ef28a3e SWIG bindings are a PITA! :-( e9cba8491 SWIG needs help with Uri 8a8d8dc07 another routines used by pre-build SWIG bindings 818e1ec5d pre-build SWIG bindings use getElementByTagName() member function 067cac5d8 old compiler gets confused on unadorned QName ba92c0ae7 more use of Uri and QName 446c7d17a use QName in new code d6f8b0c83 more direct use of QName 90fff1c73 use xml::lite::QName instead of tuple 646cbb5ed more direct use of QName and Uri ba589ea3b make QName more robust bab0ee8b5 createElement() -> addNewElement() e3a145747 grab changes from six-library 32285e95c Merge branch 'master' into feature/xml.lite_tweaks 9f79f0bf6 Merge branch 'master' into feature/xml.lite_tweaks a12bbc32c make it easier to create new Elements with a value fc9967f98 make it easy for callers to addChild() keep a reference to the Element 4627766b7 be sure test_xmlparser works in "externals" of other projects bf2276396 "private" is part of the name-mangling fad92bcc8 making sure copy-ctor is implemented f90fdcead consolidate common XML test code 9fc53f2d5 use str:: utility for casting 6da6f794b still trying to find the right macro for SWIG 0c1b86c56 still trying to fix SWIG fdc6fc9bd trying to fix SWIG build error 7835e8c27 SWIG needs copy-ctor 585695942 disable copy/assignment for Element, it's probably almost always wrong 391fed613 fix double-delete caused by copying 61790fe69 retry parsing XML with Windows-1252 if first parse() fails 63cffac59 change string_encoding to match coda-oss style of PascalCase 010479bbe read an XML file we know is wrongly encoded as Windows-1252 9a0505062 more references instead of pointers 2d44b6951 Reading Windows-1252 w/o "encoding" fails 63dc7b076 read Windows-1252 too c9434c9cb test as UIT-8 too f310ccf0c get reading from UTF-8 XML working on Windows 1fa39c2be get testReadUtf8XmlFile working on Linux 1a83cd815 sys::Path is too much trouble right now ed60aa22c unit-test to read XML from a file a9336db7c Squashed commit of the following: 0825beb0d Merge branch 'master' into feature/xml.lite_tweaks c618489be Merge branch 'master' into feature/xml.lite_tweaks e8e4b8fe1 determine string_encoding based on platform 1f43bcfc2 create a new Element by using the platform to determine "characterData" encoding 961bef66b Merge branch 'master' into feature/xml.lite_tweaks e9798a5cb fix static_assert() 6f7772874 Merge branch 'master' into feature/xml.lite_tweaks b98d4f5a9 Merge branch 'master' into feature/xml.lite_tweaks 1b5abba2a The (old) version of SWIG we're using doesn't like certain C++11 features. 53bdeabaf Merge branch 'master' into feature/xml.lite_tweaks 60cf8ae80 "" doesn't work with decltype() in older C++ 97e72477a reduce getValue() overloads by making "key" a template argument 5e6373e55 reduce code duplication f9e7cfeee provide castValue instead of getValue(T&) cbd0bd8f2 castValue throws instead of returning a bool like getValue(T&) 87c7514fc Merge branch 'master' into feature/xml.lite_tweaks 10cc61223 make getElement*() consistent for zero or >1 results f5b137e3c Merge branch 'master' into feature/xml.lite_tweaks 1765efc62 allow clients to specify toType() and toString() for getValue() and setValue() df8b746e1 allow clients to specify their own toType/toString routines 66702726a Merge branch 'master' into feature/xml.lite_tweaks 6956311f1 Merge branch 'master' into feature/xml.lite_tweaks d505f3593 Merge branch 'master' into feature/xml.lite_tweaks fbd106115 catch a BadCastException and return false from getValue() 3a78377b5 use a template to reduce duplicated code 0ad4b8606 Merge branch 'master' into feature/xml.lite_tweaks a848aa3a2 get & set the characer data as a type f3ee1ee12 utility routines to set an attribute value 595227683 templates to get an attribute value convert to a specific type 06639227b miised a change in last commit 1aa458ef8 add getValue() overloads that return true/false rather than throwing faa6d3075 added getElementByTagName() overloads as that's a very common use-case git-subtree-dir: externals/coda-oss git-subtree-split: 54033e70e353da94340dd7b96d0b1c6652308952 commit cc6009422ec41dd6e48ade90c37bdbfd97a1bc35 Merge: fec3755e0 1ceb8e3ff Author: Dan Smith Date: Mon Jun 19 14:18:30 2023 -0400 Merge commit '1ceb8e3ffb55a240085250cfde3f4d1ab7ef0b04' into develop/sync_externals commit fec3755e04a8311103aef1ded477b17ce826b044 Author: Dan Smith Date: Mon Jun 19 14:18:05 2023 -0400 latest from CODA-OSS * changes from cpp17 * latest from CODA-OSS and NITRO * turn off /Wall for MSVC https://github.com/microsoft/STL/wiki/Changelog#vs-2022-179-preview-1 > *Note*: `/Wall` is not intended for regular production use, as it contains a large number of > extremely noisy and low-value warnings. In general, the STL does not attempt to be `/Wall` clean. --- UnitTest/UnitTest.vcxproj | 2 +- externals/coda-oss/modules/c++/CMakeLists.txt | 7 +- .../coda-oss/modules/c++/coda-oss.vcxproj | 4 +- .../modules/c++/str/include/str/Convert.h | 1 + .../modules/c++/str/source/Convert.cpp | 21 +-- externals/nitro/UnitTest/UnitTest.cpp | 4 +- externals/nitro/UnitTest/UnitTest.vcxproj | 5 +- externals/nitro/UnitTest/nitf-c++.cpp | 2 +- externals/nitro/modules/c++/CMakeLists.txt | 9 +- externals/nitro/modules/c++/nitf-c++.vcxproj | 4 +- .../modules/c++/nitf-c++.vcxproj.filters | 3 + .../nitf/apps/show_nitf++/show_nitf++.vcxproj | 3 +- .../modules/c++/nitf/include/nitf/TRE.hpp | 3 - .../c++/nitf/include/nitf/TREsTyped.hpp | 120 ++++++++++++++++++ .../nitro/modules/c++/nitf/source/TRE.cpp | 38 +++++- .../modules/c++/nitf/source/UnitTests.cpp | 2 +- .../c++/nitf/unittests/test_create_nitf++.cpp | 11 +- .../nitf/unittests/test_j2k_compress_tile.cpp | 4 +- .../test_j2k_compressed_byte_provider.cpp | 5 +- .../c++/nitf/unittests/test_load_plugins.cpp | 4 +- .../c++/nitf/unittests/test_tre_create++.cpp | 3 +- .../c++/nitf/unittests/test_tre_mods++.cpp | 54 +++++++- .../c++/nitf/unittests/test_tre_mods.cpp | 30 +++-- externals/nitro/modules/c/CMakeLists.txt | 9 +- .../nitro/modules/c/j2k/J2KCompress.vcxproj | 2 +- .../nitro/modules/c/j2k/J2KDecompress.vcxproj | 2 +- externals/nitro/modules/c/nitf-c.vcxproj | 3 +- .../nitro/modules/c/nitf/TEST_DES.vcxproj | 113 +++++++++++++++++ .../modules/c/nitf/XML_DATA_CONTENT.vcxproj | 2 +- .../c/nitf/include/nitf/PluginIdentifier.h | 1 + .../c/nitf/include/nitf/PluginRegistry.h | 15 ++- .../modules/c/nitf/source/PluginRegistry.c | 118 +++++++++++++---- externals/nitro/modules/c/nitf/source/TREs.c | 102 ++++++++++++--- .../nitro/modules/c/nrt/source/DLLUnix.c | 2 +- .../nitro/modules/c/nrt/source/DLLWin32.c | 2 +- externals/nitro/nitro.sln | 84 +----------- six/modules/c++/CMakeLists.txt | 7 +- six/modules/c++/cphd/cphd.vcxproj | 2 +- six/modules/c++/cphd03/cphd03.vcxproj | 2 +- .../check_valid_six.vcxproj | 2 +- .../samples/crop_sicd.dir/crop_sicd.vcxproj | 2 +- six/modules/c++/scene/scene.vcxproj | 2 +- .../c++/six.convert/six.convert.vcxproj | 2 +- six/modules/c++/six.sicd/six.sicd.vcxproj | 3 +- .../six.sicd/source/ComplexToAMP8IPHS8I.cpp | 2 +- six/modules/c++/six.sicd/source/Utilities.cpp | 2 +- six/modules/c++/six.sidd/six.sidd.vcxproj | 2 +- six/modules/c++/six/six.vcxproj | 2 +- 48 files changed, 610 insertions(+), 214 deletions(-) create mode 100644 externals/nitro/modules/c++/nitf/include/nitf/TREsTyped.hpp create mode 100644 externals/nitro/modules/c/nitf/TEST_DES.vcxproj diff --git a/UnitTest/UnitTest.vcxproj b/UnitTest/UnitTest.vcxproj index d98ea5b10e..4040374a29 100644 --- a/UnitTest/UnitTest.vcxproj +++ b/UnitTest/UnitTest.vcxproj @@ -55,7 +55,7 @@ Use - Level3 + Level4 true $(SolutionDir);$(SolutionDir)six\modules\c++\scene\include;$(SolutionDir)six\modules\c++\six\include;$(SolutionDir)six\modules\c++\six.sidd\include;$(SolutionDir)six\modules\c++\six.sicd\include;$(SolutionDir)six\modules\c++\cphd\include;$(SolutionDir)six\modules\c++\cphd03\include;$(SolutionDir)externals\nitro\modules\c\nrt\include;$(SolutionDir)externals\nitro\modules\c\nitf\include;$(SolutionDir)externals\nitro\modules\c++\nitf\include;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration);$(SolutionDir)out\install\$(Platform)-$(Configuration)\include;$(SolutionDir)out\install\$(Platform)-$(Configuration);$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories) _DEBUG;SIX_DEFAULT_SCHEMA_PATH=R"($(SolutionDir)install-$(Configuration)-$(Platform).$(PlatformToolset)\conf\schema\six)";%(PreprocessorDefinitions);_SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING diff --git a/externals/coda-oss/modules/c++/CMakeLists.txt b/externals/coda-oss/modules/c++/CMakeLists.txt index d30fb57661..694e037aa9 100644 --- a/externals/coda-oss/modules/c++/CMakeLists.txt +++ b/externals/coda-oss/modules/c++/CMakeLists.txt @@ -3,8 +3,11 @@ set(TARGET_LANGUAGE c++) if (MSVC) # By default, there is a /W3 on the command-line from somewhere (?); adding # /Wn results in a compiler warning. - #add_compile_options(/W4) # /Wall - string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") # /Wall + # + # https://github.com/microsoft/STL/wiki/Changelog#vs-2022-179-preview-1 + # > *Note*: `/Wall` is not intended for regular production use, as it contains a large number of + # > extremely noisy and low-value warnings. In general, the STL does not attempt to be `/Wall` clean. + string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") # add_compile_options(/W4) elseif (UNIX) # https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html diff --git a/externals/coda-oss/modules/c++/coda-oss.vcxproj b/externals/coda-oss/modules/c++/coda-oss.vcxproj index e2b2a306dc..77af044c55 100644 --- a/externals/coda-oss/modules/c++/coda-oss.vcxproj +++ b/externals/coda-oss/modules/c++/coda-oss.vcxproj @@ -564,7 +564,7 @@ - EnableAllWarnings + Level4 true _DEBUG;_LIB;%(PreprocessorDefinitions);CODA_OSS_EXPORTS;CODA_OSS_DLL;MT_DEFAULT_PINNING=0;RE_ENABLE_STD_REGEX=1 pch.h @@ -593,7 +593,6 @@ - Level3 true true true @@ -609,6 +608,7 @@ true /Zc:__cplusplus %(AdditionalOptions) AdvancedVectorExtensions2 + Level3 diff --git a/externals/coda-oss/modules/c++/str/include/str/Convert.h b/externals/coda-oss/modules/c++/str/include/str/Convert.h index cbcbcf0e15..ca154a6a16 100644 --- a/externals/coda-oss/modules/c++/str/include/str/Convert.h +++ b/externals/coda-oss/modules/c++/str/include/str/Convert.h @@ -105,6 +105,7 @@ inline auto toString(long double value) { return toString_(value); } + inline std::string toString(uint8_t value) { return toString(gsl::narrow(value)); diff --git a/externals/coda-oss/modules/c++/str/source/Convert.cpp b/externals/coda-oss/modules/c++/str/source/Convert.cpp index f2ae3d9f95..b8a2bc7415 100644 --- a/externals/coda-oss/modules/c++/str/source/Convert.cpp +++ b/externals/coda-oss/modules/c++/str/source/Convert.cpp @@ -42,32 +42,25 @@ template<> std::string str::toType(const std::string& s) template<> bool str::toType(const std::string& s) { - std::string ss = s; - str::lower(ss); - - if (ss == "true") + if (eq(s, "true")) // case-insensitive compare { return true; } - else if (ss == "false") + if (eq(s, "false")) // case-insensitive compare { return false; } - else if (str::isNumeric(ss)) + + // no need for lower(), digits don't have case + if (str::isNumeric(s)) { int value(0); - std::stringstream buf(ss); + std::stringstream buf(s); buf >> value; return (value != 0); } - else - { - throw except::BadCastException(except::Context(__FILE__, __LINE__, - std::string(""), std::string(""), - std::string("Invalid bool: '") + s + std::string("'"))); - } - return false; + throw except::BadCastException(except::Context(__FILE__, __LINE__, "", "", "Invalid bool: '" + s + "'")); } long long str::strtoll(const char *str, char **endptr, int base) diff --git a/externals/nitro/UnitTest/UnitTest.cpp b/externals/nitro/UnitTest/UnitTest.cpp index bd3176e4ae..96add941b2 100644 --- a/externals/nitro/UnitTest/UnitTest.cpp +++ b/externals/nitro/UnitTest/UnitTest.cpp @@ -1,11 +1,13 @@ #include "pch.h" #include "CppUnitTest.h" +#include #include // https://learn.microsoft.com/en-us/visualstudio/test/microsoft-visualstudio-testtools-cppunittestframework-api-reference?view=vs-2022 TEST_MODULE_INITIALIZE(methodName) { // module initialization code - nitf::Test::setNitfPluginPath(); + nitf_PluginRegistry_PreloadedTREHandlersEnable(NRT_TRUE); + nitf::Test::j2kSetNitfPluginPath(); } \ No newline at end of file diff --git a/externals/nitro/UnitTest/UnitTest.vcxproj b/externals/nitro/UnitTest/UnitTest.vcxproj index 582a6e41c8..bae72b864d 100644 --- a/externals/nitro/UnitTest/UnitTest.vcxproj +++ b/externals/nitro/UnitTest/UnitTest.vcxproj @@ -55,7 +55,7 @@ Use - Level3 + Level4 true $(ProjectDir);$(SolutionDir)modules\c\nrt\include;$(SolutionDir)modules\c\nitf\include;$(SolutionDir)modules\c++\nitf\include;$(SolutionDir)modules\c\j2k\include;$(SolutionDir)modules\c;$(SolutionDir)modules\c++;$(SolutionDir)externals\coda-oss\modules\c++;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include;$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories) _DEBUG;%(PreprocessorDefinitions) @@ -258,9 +258,6 @@ {f06550ad-cfc7-40b8-8727-6c82c69a8982} - - {53f9f908-c678-4dee-9309-e71c1e03a45f} - {78849481-d356-4cc7-b182-31c21f857ed1} diff --git a/externals/nitro/UnitTest/nitf-c++.cpp b/externals/nitro/UnitTest/nitf-c++.cpp index 700258d514..92ba3fad2b 100644 --- a/externals/nitro/UnitTest/nitf-c++.cpp +++ b/externals/nitro/UnitTest/nitf-c++.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include #include diff --git a/externals/nitro/modules/c++/CMakeLists.txt b/externals/nitro/modules/c++/CMakeLists.txt index 6b60cd28f5..320ab27053 100644 --- a/externals/nitro/modules/c++/CMakeLists.txt +++ b/externals/nitro/modules/c++/CMakeLists.txt @@ -3,9 +3,12 @@ set(TARGET_LANGUAGE c++) # turn on warnings as errors if (MSVC) # By default, there is a /W3 on the command-line from somewhere (?); adding - # /W4 results in a compiler warning. - #add_compile_options(/W4) # /Wall - string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") # /Wall + # /Wn results in a compiler warning. + # + # https://github.com/microsoft/STL/wiki/Changelog#vs-2022-179-preview-1 + # > *Note*: `/Wall` is not intended for regular production use, as it contains a large number of + # > extremely noisy and low-value warnings. In general, the STL does not attempt to be `/Wall` clean. + string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") # add_compile_options(/W4) elseif (UNIX) #add_compile_options(-Wall -pedantic -Wextra) diff --git a/externals/nitro/modules/c++/nitf-c++.vcxproj b/externals/nitro/modules/c++/nitf-c++.vcxproj index 7d08f71073..6d12f0550b 100644 --- a/externals/nitro/modules/c++/nitf-c++.vcxproj +++ b/externals/nitro/modules/c++/nitf-c++.vcxproj @@ -161,6 +161,7 @@ + @@ -213,7 +214,7 @@ - EnableAllWarnings + Level4 true _DEBUG;%(PreprocessorDefinitions) true @@ -232,6 +233,7 @@ AdvancedVectorExtensions2 MultiThreadedDebugDLL true + true diff --git a/externals/nitro/modules/c++/nitf-c++.vcxproj.filters b/externals/nitro/modules/c++/nitf-c++.vcxproj.filters index 7f786dc0b8..e936e94cbe 100644 --- a/externals/nitro/modules/c++/nitf-c++.vcxproj.filters +++ b/externals/nitro/modules/c++/nitf-c++.vcxproj.filters @@ -463,5 +463,8 @@ Header Files + + Header Files + \ No newline at end of file diff --git a/externals/nitro/modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj b/externals/nitro/modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj index 66dcf81bab..944eafbc50 100644 --- a/externals/nitro/modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj +++ b/externals/nitro/modules/c++/nitf/apps/show_nitf++/show_nitf++.vcxproj @@ -47,7 +47,7 @@ - EnableAllWarnings + Level4 true _DEBUG;_CONSOLE;%(PreprocessorDefinitions) true @@ -65,6 +65,7 @@ true AdvancedVectorExtensions2 true + true Console diff --git a/externals/nitro/modules/c++/nitf/include/nitf/TRE.hpp b/externals/nitro/modules/c++/nitf/include/nitf/TRE.hpp index 09fdfab2ab..e40c562839 100644 --- a/externals/nitro/modules/c++/nitf/include/nitf/TRE.hpp +++ b/externals/nitro/modules/c++/nitf/include/nitf/TRE.hpp @@ -366,9 +366,6 @@ DECLARE_CLASS(TRE) */ std::string getID() const; - private: - std::string truncate(const std::string& value, size_t maxDigits) const; - mutable nitf_Error error{}; }; } diff --git a/externals/nitro/modules/c++/nitf/include/nitf/TREsTyped.hpp b/externals/nitro/modules/c++/nitf/include/nitf/TREsTyped.hpp new file mode 100644 index 0000000000..10b796a128 --- /dev/null +++ b/externals/nitro/modules/c++/nitf/include/nitf/TREsTyped.hpp @@ -0,0 +1,120 @@ +/* ========================================================================= + * This file is part of NITRO + * ========================================================================= + * + * (C) Copyright 2004 - 2014, MDA Information Systems LLC + * Copyright 2023, Maxar Technologies, Inc. + * + * NITRO 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, If not, + * see . + * + */ + +#pragma once + +#include "TREField.hpp" + + // A sample (and simple) "strongly-typed" TRE; see ENGRDA in the +// unittests for something a bit more elaborate (not included because it's incomplete). +namespace nitf +{ +namespace TREs +{ + class TEST_DES final + { + nitf::TRE tre_; + static constexpr const char* tag = "TEST_DES"; + + public: + // from TRE::getID() + /** + * Get the TRE identifier. This is NOT the tag, however it may be the + * same value as the tag. The ID is used to identify a specific + * version/incarnation of the TRE, if multiple are possible. For most TREs, + * this value will be the same as the tag. + */ + TEST_DES(const std::string& id = "") noexcept(false) + : tre_(tag, id.empty() ? tag : id.c_str()), + TEST_DES_COUNT(tre_, "TEST_DES_COUNT"), + TEST_DES_START(tre_, "TEST_DES_START"), + TEST_DES_INCREMENT(tre_, "TEST_DES_INCREMENT") + { + } + ~TEST_DES() = default; + TEST_DES(const TEST_DES&) = delete; + TEST_DES& operator=(const TEST_DES&) = delete; + TEST_DES(TEST_DES&&) = default; + TEST_DES& operator=(TEST_DES&&) = delete; + + // From TEST_DES.c + /* + static nitf_TREDescription TEST_DES_description[] = { + {NITF_BCS_N, 2, "Number of data values", "TEST_DES_COUNT" }, + {NITF_BCS_N, 3, "Start value in ramp", "TEST_DES_START" }, + {NITF_BCS_N, 2, "Increment between values in ramp", "TEST_DES_INCREMENT" }, + {NITF_END, 0, NULL, NULL} + }; + */ + nitf::TREField_BCS_N<2> TEST_DES_COUNT; + nitf::TREField_BCS_N<3> TEST_DES_START; + nitf::TREField_BCS_N<2> TEST_DES_INCREMENT; + + void updateFields() + { + tre_.updateFields(); + } + }; + + class TEST_PRELOADED_DES final + { + nitf::TRE tre_; + static constexpr const char* tag = "TEST_PRELOADED_DES"; + + public: + // from TRE::getID() + /** + * Get the TRE identifier. This is NOT the tag, however it may be the + * same value as the tag. The ID is used to identify a specific + * version/incarnation of the TRE, if multiple are possible. For most TREs, + * this value will be the same as the tag. + */ + TEST_PRELOADED_DES(const std::string& id = "") noexcept(false) : tre_(tag, id.empty() ? tag : id.c_str()), + COUNT(tre_, "COUNT"), START(tre_, "START"), INCREMENT(tre_, "INCREMENT") { } + ~TEST_PRELOADED_DES() = default; + TEST_PRELOADED_DES(const TEST_PRELOADED_DES&) = delete; + TEST_PRELOADED_DES& operator=(const TEST_PRELOADED_DES&) = delete; + TEST_PRELOADED_DES(TEST_PRELOADED_DES&&) = default; + TEST_PRELOADED_DES& operator=(TEST_PRELOADED_DES&&) = delete; + + // From TREs.c + /* + static nitf_TREDescription TEST_PRELOADED_DES_description[] = { + {NITF_BCS_N, 2, "Number of data values", "COUNT" }, + {NITF_BCS_N, 3, "Start value in ramp", "START" }, + {NITF_BCS_N, 2, "Increment between values in ramp", "INCREMENT" }, + {NITF_END, 0, NULL, NULL} + }; + */ + nitf::TREField_BCS_N<2> COUNT; + nitf::TREField_BCS_N<3> START; + nitf::TREField_BCS_N<2> INCREMENT; + + void updateFields() + { + tre_.updateFields(); + } + }; + +} // namespace TREs +} // namespace nitf \ No newline at end of file diff --git a/externals/nitro/modules/c++/nitf/source/TRE.cpp b/externals/nitro/modules/c++/nitf/source/TRE.cpp index dd109d407d..f0ae63b54b 100644 --- a/externals/nitro/modules/c++/nitf/source/TRE.cpp +++ b/externals/nitro/modules/c++/nitf/source/TRE.cpp @@ -165,7 +165,7 @@ static bool endsWith(const std::string& s, const std::string& match) noexcept return sLen >= mLen; } -std::string TRE::truncate(const std::string& value, size_t maxDigits) const +static std::string truncate(const std::string& value, size_t maxDigits) { const size_t decimalIndex = value.find('.'); if (decimalIndex == std::string::npos) @@ -184,6 +184,40 @@ std::string TRE::truncate(const std::string& value, size_t maxDigits) const } return value; } +static std::string truncate(const nitf_Field& field, const std::string& value) +{ + auto retval = truncate(value, field.length); + + // From Field.h + if (field.type == NITF_BCS_A) + { + // is BCS-A data, it is space-filled, right-aligned. + while (retval.length() < field.length) + { + // copyAndFillSpaces() in Field.c "Spaces are added to the right" + retval += " "; + } + } + else if (field.type == NITF_BCS_N) + { + const auto decimalIndex = retval.find('.'); + + // If it is BCS-N, we expect zero-filled, left-aligned. + while (retval.length() < field.length) + { + if (decimalIndex == std::string::npos) + { + retval = "0" + retval; + } + else + { + retval += "0"; + } + } + } + + return retval; +} void TRE::setFieldValue(const std::string& key, const void* data, size_t dataLength, bool forceUpdate) { @@ -207,7 +241,7 @@ void TRE::setFieldValue(const nitf_Field& field, const std::string& key, const s else { // call truncate() first - const auto s = truncate(data, field.length); + const auto s = truncate(field, data); setFieldValue(key, s.c_str(), s.size(), forceUpdate); } } diff --git a/externals/nitro/modules/c++/nitf/source/UnitTests.cpp b/externals/nitro/modules/c++/nitf/source/UnitTests.cpp index 4b7be9066c..31c6511336 100644 --- a/externals/nitro/modules/c++/nitf/source/UnitTests.cpp +++ b/externals/nitro/modules/c++/nitf/source/UnitTests.cpp @@ -271,7 +271,7 @@ static std::string buildPluginName(const std::string& base) void nitf::Test::setNitfPluginPath() { // The name of the plugin we know exists and will always be built, see test_load_plugins - static const auto p = getNitfPluginPath(buildPluginName("ENGRDA")); + static const auto p = getNitfPluginPath(buildPluginName("TEST_DES")); sys::OS().setEnv("NITF_PLUGIN_PATH", p.string(), true /*overwrite*/); } diff --git a/externals/nitro/modules/c++/nitf/unittests/test_create_nitf++.cpp b/externals/nitro/modules/c++/nitf/unittests/test_create_nitf++.cpp index 10bf65413d..e36b44f018 100644 --- a/externals/nitro/modules/c++/nitf/unittests/test_create_nitf++.cpp +++ b/externals/nitro/modules/c++/nitf/unittests/test_create_nitf++.cpp @@ -235,8 +235,6 @@ static bool test_create_nitf_with_byte_provider__testRead(const std::string& pat TEST_CASE(test_create_nitf_with_byte_provider_test) { - nitf::Test::setNitfPluginPath(); - // We can't actually compress. This is just for illustration. const bool shouldCompress = false; const std::string outname("test_create.nitf"); @@ -397,8 +395,6 @@ static bool test_create_nitf__testRead(const std::string& pathname, bool isMono TEST_CASE(test_create_nitf_test) { - nitf::Test::setNitfPluginPath(); - const std::string outname("test_create.nitf"); @@ -474,8 +470,6 @@ static void RecordThread_run() TEST_CASE(test_mt_record) { - nitf::Test::setNitfPluginPath(); - constexpr int NTHR = 2; std::array thrs; @@ -500,10 +494,9 @@ TEST_CASE(test_mt_record) TEST_ASSERT_TRUE(true); } - - - TEST_MAIN( + nitf::Test::setNitfPluginPath(); + TEST_CHECK(test_create_nitf_with_byte_provider_test); TEST_CHECK(test_create_nitf_test); TEST_CHECK(test_mt_record); diff --git a/externals/nitro/modules/c++/nitf/unittests/test_j2k_compress_tile.cpp b/externals/nitro/modules/c++/nitf/unittests/test_j2k_compress_tile.cpp index dedefd5ce4..4548f1e25f 100644 --- a/externals/nitro/modules/c++/nitf/unittests/test_j2k_compress_tile.cpp +++ b/externals/nitro/modules/c++/nitf/unittests/test_j2k_compress_tile.cpp @@ -181,8 +181,6 @@ static bool equals(const std::vector& lhs, const std::vector make_Tester(bool setBlocking, std::optional maxRo TEST_CASE(j2k_compressed_byte_provider_maxRowsPerSegment0) { - nitf::Test::setNitfPluginPath(); { auto tester = make_Tester(true /*setBlocking*/); tester.testMultipleWritesBlocked(); @@ -605,8 +604,6 @@ TEST_CASE(j2k_compressed_byte_provider_maxRowsPerSegment0) TEST_CASE(j2k_compressed_byte_provider) { - nitf::Test::setNitfPluginPath(); - // Run tests forcing various numbers of segments // Blocking is set at 40 rows / block so can't go less than this // Actual limit is a bit higher, since j2k needs a minimum size @@ -636,6 +633,8 @@ TEST_CASE(j2k_do_nothing) } TEST_MAIN( + nitf::Test::j2kSetNitfPluginPath(); + TEST_CHECK(j2k_do_nothing); //TEST_CHECK(j2k_compressed_byte_provider_maxRowsPerSegment0); // TODO: get working with CMake //TEST_CHECK(j2k_compressed_byte_provider); // TODO: get working with CMake diff --git a/externals/nitro/modules/c++/nitf/unittests/test_load_plugins.cpp b/externals/nitro/modules/c++/nitf/unittests/test_load_plugins.cpp index 4f84931dcd..9e59a2405d 100644 --- a/externals/nitro/modules/c++/nitf/unittests/test_load_plugins.cpp +++ b/externals/nitro/modules/c++/nitf/unittests/test_load_plugins.cpp @@ -78,16 +78,18 @@ TEST_CASE(test_retrieveTREHandler) TEST_CASE(test_load_PTPRAA) { + TEST_ASSERT_TRUE(nitf_PluginRegistry_PreloadedTREHandlerEnable("PTPRAA", NRT_TRUE)); retrieveTREHandler(testName, "PTPRAA"); } TEST_CASE(test_load_ENGRDA) { + TEST_ASSERT_TRUE(nitf_PluginRegistry_PreloadedTREHandlerEnable("ENGRDA", NRT_TRUE)); retrieveTREHandler(testName, "ENGRDA"); } TEST_CASE(test_load_all_TREs) { - const nitf::TRE tre("ACCPOB"); + const nitf::TRE ACCPOB("ACCPOB"); for (const auto& tre : all_TREs()) { diff --git a/externals/nitro/modules/c++/nitf/unittests/test_tre_create++.cpp b/externals/nitro/modules/c++/nitf/unittests/test_tre_create++.cpp index bc3f884fc7..883c0fd8fd 100644 --- a/externals/nitro/modules/c++/nitf/unittests/test_tre_create++.cpp +++ b/externals/nitro/modules/c++/nitf/unittests/test_tre_create++.cpp @@ -9,6 +9,7 @@ TEST_CASE(test_tre_create_329) { // https://github.com/mdaus/nitro/issues/329 + TEST_ASSERT_TRUE(nitf_PluginRegistry_PreloadedTREHandlerEnable("HISTOA", NRT_TRUE)); nitf::TRE tre("HISTOA", "HISTOA"); // allocates fields SYSTEM .. NEVENTS tre.setField("SYSTYPE", "M1"); TEST_ASSERT_TRUE(true); @@ -39,8 +40,6 @@ TEST_CASE(test_tre_clone_329) } TEST_MAIN( - nitf::Test::setNitfPluginPath(); - TEST_CHECK(test_tre_create_329); TEST_CHECK(test_tre_clone_329); ) diff --git a/externals/nitro/modules/c++/nitf/unittests/test_tre_mods++.cpp b/externals/nitro/modules/c++/nitf/unittests/test_tre_mods++.cpp index 1c2b4a8705..bb9963e039 100644 --- a/externals/nitro/modules/c++/nitf/unittests/test_tre_mods++.cpp +++ b/externals/nitro/modules/c++/nitf/unittests/test_tre_mods++.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include @@ -58,7 +59,7 @@ #include "nitf/TRE.hpp" #include "nitf/exports.hpp" -#include "nitf/TREField.hpp" +#include "nitf/TREsTyped.hpp" // A sample "strongly-typed" TRE. There are too many TREs (and too much unwillingness to change) to // actually hook this up. But it's kind of neat code that I don't want to lose. @@ -159,7 +160,7 @@ struct /*namespace*/ TREs TEST_CASE(setFields) { - // create an ACFTA TRE + TEST_ASSERT_TRUE( nitf_PluginRegistry_PreloadedTREHandlerEnable("ACFTA", NRT_TRUE) ); nitf::TRE tre("ACFTA"); // set a field @@ -178,6 +179,7 @@ TEST_CASE(setFields) TEST_CASE(setBinaryFields) { + TEST_ASSERT_TRUE( nitf_PluginRegistry_PreloadedTREHandlerEnable("RPFHDR", NRT_TRUE) ); nitf::TRE tre("RPFHDR"); const int value = 123; tre.setField("LOCSEC", value); @@ -189,6 +191,7 @@ TEST_CASE(setBinaryFields) TEST_CASE(cloneTRE) { + TEST_ASSERT_TRUE( nitf_PluginRegistry_PreloadedTREHandlerEnable("JITCID", NRT_TRUE) ); nitf::TRE tre("JITCID"); tre.setField("FILCMT", "fyi"); @@ -202,6 +205,7 @@ TEST_CASE(cloneTRE) TEST_CASE(basicIteration) { + TEST_ASSERT_TRUE( nitf_PluginRegistry_PreloadedTREHandlerEnable("ACCPOB", NRT_TRUE) ); nitf::TRE tre("ACCPOB"); // The entire TRE is one loop, and we haven't told it @@ -227,8 +231,47 @@ TEST_CASE(basicIteration) TEST_ASSERT_EQ(numFields, static_cast(29)); } +static void test_des_(const std::string& testName, nitf::TRE& des, const std::string& prefix) +{ + des.setField(prefix + "COUNT", 12); + des.setField(prefix + "START", 345); + des.setField(prefix + "INCREMENT", 67); + + TEST_ASSERT_EQ(des.getFieldValue(prefix + "COUNT"), 12); + TEST_ASSERT_EQ(des.getFieldValue(prefix + "START"), 345); + TEST_ASSERT_EQ(des.getFieldValue(prefix + "INCREMENT"), 67); +} +TEST_CASE(use_TEST_DES) +{ + TEST_ASSERT_TRUE( nitf_PluginRegistry_PreloadedTREHandlerEnable("TEST_PRELOADED_DES", NRT_TRUE) ); + nitf::TRE preloaded("TEST_PRELOADED_DES", "TEST_PRELOADED_DES"); + test_des_(testName, preloaded, ""); + + nitf::TREs::TEST_PRELOADED_DES test_preloaded_des; + test_preloaded_des.COUNT = 12; + test_preloaded_des.START = 345; + test_preloaded_des.INCREMENT = 67; + TEST_ASSERT_EQ(test_preloaded_des.COUNT, 12); + TEST_ASSERT_EQ(test_preloaded_des.START, 345); + TEST_ASSERT_EQ(test_preloaded_des.INCREMENT, 67); + + /***********************************************************/ + + nitf::TRE des("TEST_DES", "TEST_DES"); + test_des_(testName, des, "TEST_DES_"); + + nitf::TREs::TEST_DES test_des; + test_des.TEST_DES_COUNT = 12; + test_des.TEST_DES_START = 345; + test_des.TEST_DES_INCREMENT = 67; + TEST_ASSERT_EQ(test_des.TEST_DES_COUNT, 12); + TEST_ASSERT_EQ(test_des.TEST_DES_START, 345); + TEST_ASSERT_EQ(test_des.TEST_DES_INCREMENT, 67); +} + TEST_CASE(use_ENGRDA) { + TEST_ASSERT_TRUE( nitf_PluginRegistry_PreloadedTREHandlerEnable("ENGRDA", NRT_TRUE) ); nitf::TRE engrda("ENGRDA", "ENGRDA"); engrda.setField("RESRC", "HSS"); @@ -253,6 +296,7 @@ TEST_CASE(use_ENGRDA) TEST_CASE(use_ENGRDA_typed_fields) { + TEST_ASSERT_TRUE( nitf_PluginRegistry_PreloadedTREHandlerEnable("ENGRDA", NRT_TRUE) ); nitf::TRE engrda("ENGRDA", "ENGRDA"); nitf::TREField_BCS_A<20> RESRC(engrda, "RESRC"); @@ -285,6 +329,7 @@ TEST_CASE(use_ENGRDA_typed_fields) TEST_CASE(use_typed_ENGRDA) { + TEST_ASSERT_TRUE( nitf_PluginRegistry_PreloadedTREHandlerEnable("ENGRDA", NRT_TRUE) ); TREs::ENGRDA engrda; // nitf::TRE engrda("ENGRDA", "ENGRDA"); engrda.RESRC = "HSS"; // engrda.setField("RESRC", "HSS"); @@ -333,6 +378,7 @@ TEST_CASE(use_typed_ENGRDA) TEST_CASE(use_CSEXRB_typed_fields) { + TEST_ASSERT_TRUE( nitf_PluginRegistry_PreloadedTREHandlerEnable("CSEXRB", NRT_TRUE) ); nitf::TRE tre("CSEXRB", "CSEXRB"); constexpr auto length = 12; @@ -346,6 +392,7 @@ TEST_CASE(use_CSEXRB_typed_fields) TEST_CASE(populateWhileIterating) { + TEST_ASSERT_TRUE( nitf_PluginRegistry_PreloadedTREHandlerEnable("ACCPOB", NRT_TRUE) ); nitf::TRE tre("ACCPOB"); size_t numFields = 0; for (auto it = tre.begin(); it != tre.end(); ++it) @@ -370,6 +417,7 @@ TEST_CASE(populateWhileIterating) TEST_CASE(overflowingNumericFields) { + TEST_ASSERT_TRUE( nitf_PluginRegistry_PreloadedTREHandlerEnable("CSCRNA", NRT_TRUE) ); nitf::TRE tre("CSCRNA"); // This field has a length of 9, so check that it's properly @@ -398,12 +446,14 @@ TEST_CASE(overflowingNumericFields) } TEST_MAIN( + // must be set before making any NITRO calls nitf::Test::setNitfPluginPath(); TEST_CHECK(setFields); TEST_CHECK(setBinaryFields); TEST_CHECK(cloneTRE); TEST_CHECK(basicIteration); + TEST_CHECK(use_TEST_DES); TEST_CHECK(use_ENGRDA); TEST_CHECK(use_ENGRDA_typed_fields); TEST_CHECK(use_typed_ENGRDA); diff --git a/externals/nitro/modules/c++/nitf/unittests/test_tre_mods.cpp b/externals/nitro/modules/c++/nitf/unittests/test_tre_mods.cpp index 5bee638c71..e7246b1e11 100644 --- a/externals/nitro/modules/c++/nitf/unittests/test_tre_mods.cpp +++ b/externals/nitro/modules/c++/nitf/unittests/test_tre_mods.cpp @@ -26,6 +26,8 @@ TEST_CASE(testNestedMod) { + TEST_ASSERT_TRUE( nitf_PluginRegistry_PreloadedTREHandlerEnable("ACCHZB", NRT_TRUE) ); + nitf_Error error; NITF_BOOL exists; nitf_TRE* tre = nitf_TRE_construct("ACCHZB", NULL, &error); @@ -59,6 +61,8 @@ TEST_CASE(testNestedMod) TEST_CASE(testIncompleteCondMod) { + TEST_ASSERT_TRUE( nitf_PluginRegistry_PreloadedTREHandlerEnable("ACCPOB", NRT_TRUE) ); + nitf_Error error; NITF_BOOL exists; nitf_TRE* tre = nitf_TRE_construct("ACCPOB", NULL, &error); @@ -90,6 +94,7 @@ TEST_CASE(testClone) nitf_Field* clonedField = NULL; nitf_Error error; + TEST_ASSERT_TRUE( nitf_PluginRegistry_PreloadedTREHandlerEnable("JITCID", NRT_TRUE) ); nitf_TRE* tre = nitf_TRE_construct("JITCID", NULL, &error); TEST_ASSERT(tre != NULL); @@ -110,13 +115,14 @@ TEST_CASE(testClone) TEST_CASE(testBasicMod) { + TEST_ASSERT_TRUE( nitf_PluginRegistry_PreloadedTREHandlerEnable("ACFTA", NRT_TRUE) ); + /* construct a tre */ NITF_BOOL exists; nitf_Error error; - nitf_Field* field; nitf_TRE *tre = nitf_TRE_construct("ACFTA", "ACFTA_132", &error); TEST_ASSERT(tre != NULL); - field = (nitf_TRE_getField(tre, "AC_MSN_ID")); + nitf_Field* field = (nitf_TRE_getField(tre, "AC_MSN_ID")); TEST_ASSERT_EQ_STR(field->raw, " "); exists = nitf_TRE_setField(tre, "AC_MSN_ID", "fly-by", 6, &error); @@ -139,6 +145,7 @@ TEST_CASE(testBasicMod) TEST_CASE(testSize) { + TEST_ASSERT_TRUE( nitf_PluginRegistry_PreloadedTREHandlerEnable("AIMIDB", NRT_TRUE) ); nitf_Error error; int treLength; nitf_TRE* tre = nitf_TRE_construct("AIMIDB", NULL, &error); @@ -174,18 +181,17 @@ TEST_CASE(iterateUnfilled) TEST_CASE(populateThenIterate) { + TEST_ASSERT_TRUE( nitf_PluginRegistry_PreloadedTREHandlerEnable("ACCPOB", NRT_TRUE) ); nitf_Error error; - nitf_TRECursor cursor; nitf_TRE* tre = nitf_TRE_construct("ACCPOB", NULL, &error); - uint32_t numFields = 0; - TEST_ASSERT(tre != NULL); + TEST_ASSERT_NOT_NULL(tre); + uint32_t numFields = 0; nitf_TRE_setField(tre, "NUMACPO", "2", 1, &error); nitf_TRE_setField(tre, "NUMPTS[0]", "3", 1, &error); nitf_TRE_setField(tre, "NUMPTS[1]", "2", 1, &error); - cursor = nitf_TRECursor_begin(tre); - + nitf_TRECursor cursor = nitf_TRECursor_begin(tre); while (!nitf_TRECursor_isDone(&cursor)) { TEST_ASSERT(nitf_TRECursor_iterate(&cursor, &error) != 0); @@ -200,13 +206,13 @@ TEST_CASE(populateThenIterate) TEST_CASE(populateWhileIterating) { + TEST_ASSERT_TRUE( nitf_PluginRegistry_PreloadedTREHandlerEnable("ACCPOB", NRT_TRUE) ); nitf_Error error; - nitf_TRECursor cursor; nitf_TRE* tre = nitf_TRE_construct("ACCPOB", NULL, &error); - uint32_t numFields = 0; - TEST_ASSERT(tre != NULL); + TEST_ASSERT_NOT_NULL(tre); - cursor = nitf_TRECursor_begin(tre); + uint32_t numFields = 0; + nitf_TRECursor cursor = nitf_TRECursor_begin(tre); while (!nitf_TRECursor_isDone(&cursor)) { TEST_ASSERT(nitf_TRECursor_iterate(&cursor, &error) != 0); @@ -231,8 +237,6 @@ TEST_CASE(populateWhileIterating) } TEST_MAIN( - nitf::Test::setNitfPluginPath(); - TEST_CHECK(testClone); TEST_CHECK(testSize); TEST_CHECK(testBasicMod); diff --git a/externals/nitro/modules/c/CMakeLists.txt b/externals/nitro/modules/c/CMakeLists.txt index 6e6b185dcf..3d2a216343 100644 --- a/externals/nitro/modules/c/CMakeLists.txt +++ b/externals/nitro/modules/c/CMakeLists.txt @@ -4,9 +4,12 @@ set(TARGET_LANGUAGE c) # turn on warnings as errors if (MSVC) # By default, there is a /W3 on the command-line from somewhere (?); adding - # /W4 results in a compiler warning. - #add_compile_options(/W4) # /Wall - string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") # /Wall + # /Wn results in a compiler warning. + # + # https://github.com/microsoft/STL/wiki/Changelog#vs-2022-179-preview-1 + # > *Note*: `/Wall` is not intended for regular production use, as it contains a large number of + # > extremely noisy and low-value warnings. In general, the STL does not attempt to be `/Wall` clean. + string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") # add_compile_options(/W4) add_compile_options(/wd4996) # '...': This function or variable may be unsafe. elseif (UNIX) diff --git a/externals/nitro/modules/c/j2k/J2KCompress.vcxproj b/externals/nitro/modules/c/j2k/J2KCompress.vcxproj index 60e9ab7d18..021fcb706d 100644 --- a/externals/nitro/modules/c/j2k/J2KCompress.vcxproj +++ b/externals/nitro/modules/c/j2k/J2KCompress.vcxproj @@ -62,7 +62,7 @@ - EnableAllWarnings + Level4 true _DEBUG;_LIB;%(PreprocessorDefinitions);NRT_MODULE_EXPORTS;NITRO_PCH;HAVE_J2K_H true diff --git a/externals/nitro/modules/c/j2k/J2KDecompress.vcxproj b/externals/nitro/modules/c/j2k/J2KDecompress.vcxproj index 6c31591a47..366e0b421b 100644 --- a/externals/nitro/modules/c/j2k/J2KDecompress.vcxproj +++ b/externals/nitro/modules/c/j2k/J2KDecompress.vcxproj @@ -62,7 +62,7 @@ - EnableAllWarnings + Level4 true _DEBUG;_LIB;%(PreprocessorDefinitions);NRT_MODULE_EXPORTS;NITRO_PCH;HAVE_J2K_H true diff --git a/externals/nitro/modules/c/nitf-c.vcxproj b/externals/nitro/modules/c/nitf-c.vcxproj index 370fb800b3..be058c828d 100644 --- a/externals/nitro/modules/c/nitf-c.vcxproj +++ b/externals/nitro/modules/c/nitf-c.vcxproj @@ -48,7 +48,7 @@ - EnableAllWarnings + Level4 true _DEBUG;%(PreprocessorDefinitions);HAVE_OPENJPEG_H true @@ -68,6 +68,7 @@ false MultiThreadedDebugDLL true + true diff --git a/externals/nitro/modules/c/nitf/TEST_DES.vcxproj b/externals/nitro/modules/c/nitf/TEST_DES.vcxproj new file mode 100644 index 0000000000..58478f2025 --- /dev/null +++ b/externals/nitro/modules/c/nitf/TEST_DES.vcxproj @@ -0,0 +1,113 @@ + + + + + Debug + x64 + + + Release + x64 + + + + + + + + {f06550ad-cfc7-40b8-8727-6c82c69a8982} + + + + 16.0 + Win32Proj + {53F9F908-C678-4DEE-9309-E71C1D03A45F} + nitro + 10.0 + TEST_DES + + + + DynamicLibrary + true + v143 + + + DynamicLibrary + false + v143 + true + + + + + + + + + + + + + + + true + $(SolutionDir)$(Platform)\$(Configuration)\share\nitf\plugins\ + $(Platform)\$(Configuration)\$(ProjectName)\ + + + false + $(SolutionDir)$(Platform)\$(Configuration)\share\nitf\plugins\ + $(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level4 + true + _DEBUG;_LIB;%(PreprocessorDefinitions);NRT_MODULE_EXPORTS;NITRO_PCH + true + $(ProjectDir)include;$(ProjectDir)..\nrt\include;%(AdditionalIncludeDirectories) + /FS %(AdditionalOptions) + true + CompileAsCpp + Guard + MultiThreadedDebugDLL + true + ProgramDatabase + AdvancedVectorExtensions2 + true + + + + + true + + + + + Level3 + true + true + true + NDEBUG;_LIB;%(PreprocessorDefinitions);NRT_MODULE_EXPORTS;NITRO_PCH + true + $(ProjectDir)include;$(ProjectDir)..\nrt\include;%(AdditionalIncludeDirectories) + /FS %(AdditionalOptions) + true + CompileAsCpp + Guard + true + AdvancedVectorExtensions2 + + + + + true + true + true + + + + + + \ No newline at end of file diff --git a/externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj b/externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj index 09c43df9f9..2760bc1aac 100644 --- a/externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj +++ b/externals/nitro/modules/c/nitf/XML_DATA_CONTENT.vcxproj @@ -62,7 +62,7 @@ - EnableAllWarnings + Level4 true _DEBUG;_LIB;%(PreprocessorDefinitions);NRT_MODULE_EXPORTS;NITRO_PCH true diff --git a/externals/nitro/modules/c/nitf/include/nitf/PluginIdentifier.h b/externals/nitro/modules/c/nitf/include/nitf/PluginIdentifier.h index da1203f2ce..125ccd9029 100644 --- a/externals/nitro/modules/c/nitf/include/nitf/PluginIdentifier.h +++ b/externals/nitro/modules/c/nitf/include/nitf/PluginIdentifier.h @@ -70,6 +70,7 @@ typedef struct _nitf_TREPreloaded const char* name; NITF_PLUGIN_INIT_FUNCTION init; NITF_PLUGIN_TRE_HANDLER_FUNCTION handler; + NITF_BOOL enabled; // most preloaded TREs are disabled by default } nitf_TREPreloaded; /* diff --git a/externals/nitro/modules/c/nitf/include/nitf/PluginRegistry.h b/externals/nitro/modules/c/nitf/include/nitf/PluginRegistry.h index 858d486fe1..54feddb3fd 100644 --- a/externals/nitro/modules/c/nitf/include/nitf/PluginRegistry.h +++ b/externals/nitro/modules/c/nitf/include/nitf/PluginRegistry.h @@ -165,8 +165,6 @@ NITFAPI(NITF_BOOL) nitf_PluginRegistry_loadDir(const char* dirName, nitf_Error * error); -NITFAPI(NITF_BOOL) - nitf_PluginRegistry_insertPlugin_(const char* msg, nitf_PluginRegistry* reg, const char** ident, nitf_DLL* dll, nitf_Error* error); NITFAPI(NITF_BOOL) nitf_PluginRegistry_loadPlugin(const char* fullPathName, nitf_Error* error); @@ -182,6 +180,19 @@ nitf_PluginRegistry_TREHandlerExists(const char* ident); NITFAPI(NITF_BOOL) nitf_PluginRegistry_TREHandlerExistsLog(const char* ident, FILE* log); +/*! + * Enable (or disable) a pre-loaded TRE. + * + * \param ident ID of the TRE + * + * \return true if a pre-loaded TRE handler exists, false otherwise + */ + +NITFAPI(NITF_BOOL) +nitf_PluginRegistry_PreloadedTREHandlerEnable(const char* ident, NITF_BOOL enable); +NITFAPI(void) +nitf_PluginRegistry_PreloadedTREHandlersEnable(NITF_BOOL enable); // "Handlers", not "Handler" + /*! * Checks if a compression handler exists for 'ident' * diff --git a/externals/nitro/modules/c/nitf/source/PluginRegistry.c b/externals/nitro/modules/c/nitf/source/PluginRegistry.c index e05bc2a84f..e675d53609 100644 --- a/externals/nitro/modules/c/nitf/source/PluginRegistry.c +++ b/externals/nitro/modules/c/nitf/source/PluginRegistry.c @@ -20,6 +20,8 @@ * */ +#include + #include "nitf/PluginRegistry.h" NITFPRIV(nitf_PluginRegistry*) implicitConstruct(nitf_Error* error, FILE* log); @@ -967,15 +969,21 @@ insertCreator(nitf_DLL* dso, return nitf_HashTable_insert(hash, ident, (NITF_DATA*)dsoMain, error); } -/* - * Function is now greatly simplified. We only retrieve TREs from - * the hash table. If they are there, we are good, if not fail - * - * No more talking to the DSOs directly - */ -static const nitf_TREPreloaded* findPreloadedTRE(const char* keyName) +// Somebody might want to use a different set of preloadedTREs, or we might even want multiple +// sets of preloaded TREs. There's nothing to support either of those right now, but it's easy enough +// to put the infrastructure in place to make it easy to hook-up. +extern nitf_TREPreloaded defaultPreloadedTREs[]; +static nitf_TREPreloaded* findPreloadedTRE_(nitf_TREPreloaded preloadedTREs[], const char* keyName) { - extern const nitf_TREPreloaded preloadedTREs[]; + if (preloadedTREs == NULL) + { + return NULL; + } + if (keyName == NULL) + { + return NULL; + } + for (size_t i = 0;; i++) { const char* pKeyName = preloadedTREs[i].name; @@ -989,6 +997,56 @@ static const nitf_TREPreloaded* findPreloadedTRE(const char* keyName) } } } +static const nitf_TREPreloaded* findPreloadedTRE(nitf_TREPreloaded preloadedTREs[], const char* keyName) +{ + const nitf_TREPreloaded* retval = findPreloadedTRE_(preloadedTREs, keyName); + if ((retval != NULL) && (retval->enabled)) + { + return retval; + } + return NULL; +} + +static NITF_BOOL PreloadedTREHandlerEnable(nitf_TREPreloaded preloadedTREs[], + const char* keyName, NITF_BOOL enable) +{ + nitf_TREPreloaded* result = findPreloadedTRE_(preloadedTREs, keyName); + if (result != NULL) + { + result->enabled = enable; + return NRT_TRUE; + } + return NRT_FALSE; +} +NITFAPI(NITF_BOOL) +nitf_PluginRegistry_PreloadedTREHandlerEnable(const char* keyName, NITF_BOOL enable) +{ + return PreloadedTREHandlerEnable(defaultPreloadedTREs, keyName, enable); +} + +static void preloadedTREHandlersEnable(nitf_TREPreloaded preloadedTREs[], NITF_BOOL enable) +{ + if (preloadedTREs == NULL) + { + return; + } + + for (size_t i = 0;; i++) + { + const char* pKeyName = preloadedTREs[i].name; + if (pKeyName == NULL) // end of list + { + return; + } + + preloadedTREs[i].enabled = enable; + } +} +NITFAPI(void) +nitf_PluginRegistry_PreloadedTREHandlersEnable(NITF_BOOL enable) +{ + preloadedTREHandlersEnable(defaultPreloadedTREs, enable); +} /* * Initialize a DSO. The init hook is retrieved and called once @@ -1006,7 +1064,8 @@ static const char** preload_doInit(NITF_PLUGIN_INIT_FUNCTION init, const char* p return ident; } -static NRT_BOOL preloadTRE(const char* keyName, nitf_Error* error) +static NRT_BOOL preloadTRE(nitf_TREPreloaded preloadedTREs[], + const char* keyName, nitf_Error* error) { const char** ident; nitf_PluginRegistry* reg = nitf_PluginRegistry_getInstance(error); @@ -1020,7 +1079,7 @@ static NRT_BOOL preloadTRE(const char* keyName, nitf_Error* error) dll->lib = NULL; // not a real DLL dll->dsoMain = NULL; // filled in after successful findPreloadedTRE() - const nitf_TREPreloaded* plugin = findPreloadedTRE(keyName); + const nitf_TREPreloaded* plugin = findPreloadedTRE(preloadedTREs, keyName); if (plugin == NULL) { return NITF_FAILURE; @@ -1069,10 +1128,10 @@ nitf_PluginRegistry_retrieveTREHandler_(nitf_PluginRegistry* reg, return theHandler; } -static nitf_TREHandler* retrievePreloadedTREHandler(nitf_PluginRegistry* reg, const char* treIdent, - int* hadError, nitf_Error* error) +static nitf_TREHandler* retrievePreloadedTREHandler(nitf_TREPreloaded preloadedTREs[], + nitf_PluginRegistry* reg, const char* treIdent, int* hadError, nitf_Error* error) { - if (!preloadTRE(treIdent, error)) + if (!preloadTRE(preloadedTREs, treIdent, error)) { *hadError = 1; return NULL; @@ -1082,31 +1141,40 @@ static nitf_TREHandler* retrievePreloadedTREHandler(nitf_PluginRegistry* reg, co return nitf_PluginRegistry_retrieveTREHandler_(reg, treIdent, hadError, error); } -NITFPROT(nitf_TREHandler*) -nitf_PluginRegistry_retrieveTREHandler(nitf_PluginRegistry* reg, - const char* treIdent, - int* hadError, - nitf_Error* error) +static nitf_TREHandler* retrieveTREHandler(nitf_TREPreloaded preloadedTREs[], + nitf_PluginRegistry* reg, const char* treIdent, int* hadError, nitf_Error* error) { nitf_TREHandler* handler = nitf_PluginRegistry_retrieveTREHandler_(reg, treIdent, hadError, error); - if (*hadError) { + // Got an error; try a preloaded TRE. *hadError = 0; - return retrievePreloadedTREHandler(reg, treIdent, hadError, error); + return retrievePreloadedTREHandler(preloadedTREs, reg, treIdent, hadError, error); } - // Normally, a NULL handler is **not** an error. + // Normally, a NULL handler is **not** an error ... if (handler == NULL) { - int bad = 0; - nitf_TREHandler* preloadedHandler = retrievePreloadedTREHandler(reg, treIdent, &bad, error); + // ... but, if we can use a pre-loaded TRE, go with that. + int bad = 0; // retrievePreloadedTREHandler() might cause an error + nitf_TREHandler* preloadedHandler = retrievePreloadedTREHandler(preloadedTREs, reg, treIdent, &bad, error); if (!bad) - return preloadedHandler; + { + // no error, go with the pre-loaded handler + assert(preloadedHandler != NULL); // I supposed this *could* be NULL, but why? It makes no sense to preload a default handler. + return preloadedHandler; + } } - return handler; } +NITFPROT(nitf_TREHandler*) +nitf_PluginRegistry_retrieveTREHandler(nitf_PluginRegistry* reg, + const char* treIdent, + int* hadError, + nitf_Error* error) +{ + return retrieveTREHandler(defaultPreloadedTREs, reg, treIdent, hadError, error); +} NITFPROT(nitf_CompressionInterface*) nitf_PluginRegistry_retrieveCompInterface(const char* comp, nitf_Error* error) diff --git a/externals/nitro/modules/c/nitf/source/TREs.c b/externals/nitro/modules/c/nitf/source/TREs.c index 8cedb44e5b..c8cbf18251 100644 --- a/externals/nitro/modules/c/nitf/source/TREs.c +++ b/externals/nitro/modules/c/nitf/source/TREs.c @@ -3,6 +3,7 @@ * ========================================================================= * * (C) Copyright 2004 - 2014, MDA Information Systems LLC + * Copyright 2023, Maxar Technologies, Inc. * * NITRO is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -43,25 +44,86 @@ #include "../shared/RPFHDR.c" #include "../shared/TEST_DES.c" +#include "../shared/XML_DATA_CONTENT.c" -#define NITF_preload_TRE(Tre_) { #Tre_, Tre_##_init, Tre_##_handler } - -extern const nitf_TREPreloaded preloadedTREs[]; -const nitf_TREPreloaded preloadedTREs[] = { -/* - NITF_preload_TRE(ACCHZB), - NITF_preload_TRE(ACCPOB), - NITF_preload_TRE(ACFTA), - NITF_preload_TRE(AIMIDB), - NITF_preload_TRE(CSCRNA), - NITF_preload_TRE(CSEXRB), - //NITF_preload_TRE(ENGRDA), - NITF_preload_TRE(HISTOA), - NITF_preload_TRE(JITCID), - NITF_preload_TRE(PTPRAA), - NITF_preload_TRE(RPFHDR), - - NITF_preload_TRE(TEST_DES), -*/ - { NULL, NULL, NULL } + /******************************************************************************/ + /* + * Simple example DES for testing. + + This file defines a very simple Data Extension Segment. This example is + used for test of the UserSegment object and can be used aa an example + and starting point for the development of DES. + + This example defines a "standard" DE segment which means the user + header can be implemented via a TRE object and there are no out of + segment dependencies + + The DES ID will be TEST_PRELOADED_DES + + The user header will have three fields + + COUNT - Number of data values + START - Start value in ramp + INCREMENT - Increment between values in ramp + + The data is an 8-bit ramp defined by the three values. in testing, the + ramp will be setup to contain printable values. + */ + + /* TRE description for user header */ +static nitf_TREDescription TEST_PRELOADED_DES_description[] = { + {NITF_BCS_N, 2, "Number of data values", "COUNT" }, + {NITF_BCS_N, 3, "Start value in ramp", "START" }, + {NITF_BCS_N, 2, "Increment between values in ramp", "INCREMENT" }, + {NITF_END, 0, NULL, NULL} +}; +static nitf_TREDescriptionInfo TEST_PRELOADED_DES_descriptions[] = { + { "Preloaded DES (for testing)", TEST_PRELOADED_DES_description, NITF_TRE_DESC_NO_LENGTH }, + { "TEST_PRELOADED_DES", TEST_PRELOADED_DES_description, NITF_TRE_DESC_NO_LENGTH }, + { NULL, NULL, NITF_TRE_DESC_NO_LENGTH } +}; +static nitf_TREDescriptionSet TEST_PRELOADED_DES_descriptionSet = { 0, TEST_PRELOADED_DES_descriptions }; + +static const char* TEST_PRELOADED_DES_ident[] = +{ + NITF_PLUGIN_TRE_KEY, "TEST_PRELOADED_DES", "Preloaded DES (for testing)", NULL +}; + +static nitf_TREHandler TEST_PRELOADED_DESHandler; +static const char** TEST_PRELOADED_DES_init(nitf_Error* error) +{ + if (!nitf_TREUtils_createBasicHandler(&TEST_PRELOADED_DES_descriptionSet, + &TEST_PRELOADED_DESHandler, error)) + return NULL; + return TEST_PRELOADED_DES_ident; +} +static nitf_TREHandler* TEST_PRELOADED_DES_handler(nitf_Error* error) { + (void)error; + return &TEST_PRELOADED_DESHandler; +} + +/******************************************************************************/ + +#define NITF_preload_TRE_(Tre_, enabled_) { #Tre_, Tre_##_init, Tre_##_handler, enabled_ } +#define NITF_preload_TRE(Tre_) NITF_preload_TRE_(Tre_, NRT_FALSE /*enabled*/) + +nitf_TREPreloaded defaultPreloadedTREs[] = { + // Not preloading any TREs right now: with the existing system, + // a TRE can be removed by deleting the DLL/SO. If that same TRE + // were preloaded, there would be no way to get rid of it. + NITF_preload_TRE(ACCHZB), + NITF_preload_TRE(ACCPOB), + NITF_preload_TRE(ACFTA), + NITF_preload_TRE(AIMIDB), + NITF_preload_TRE(CSCRNA), + NITF_preload_TRE(CSEXRB), + NITF_preload_TRE(ENGRDA), + NITF_preload_TRE(HISTOA), + NITF_preload_TRE(JITCID), + NITF_preload_TRE(PTPRAA), + NITF_preload_TRE(RPFHDR), + + NITF_preload_TRE_(TEST_PRELOADED_DES, NRT_TRUE /*enabled*/), + + { NULL, NULL, NULL, NRT_FALSE } // end of list }; diff --git a/externals/nitro/modules/c/nrt/source/DLLUnix.c b/externals/nitro/modules/c/nrt/source/DLLUnix.c index fb68470ccf..d1887e1af6 100644 --- a/externals/nitro/modules/c/nrt/source/DLLUnix.c +++ b/externals/nitro/modules/c/nrt/source/DLLUnix.c @@ -127,7 +127,7 @@ NRTAPI(NRT_DLL_FUNCTION_PTR) nrt_DLL_retrieve(nrt_DLL * dll, // This might be a "preloaded" TRE if (dll->dsoMain) { - const char* underscore = strchr(function, '_'); + const char* underscore = strrchr(function, '_'); if ((underscore != NULL) && strcmp(underscore, "_handler") == 0) { return dll->dsoMain; diff --git a/externals/nitro/modules/c/nrt/source/DLLWin32.c b/externals/nitro/modules/c/nrt/source/DLLWin32.c index d5a59e621c..6cf64fb974 100644 --- a/externals/nitro/modules/c/nrt/source/DLLWin32.c +++ b/externals/nitro/modules/c/nrt/source/DLLWin32.c @@ -137,7 +137,7 @@ NRTAPI(NRT_DLL_FUNCTION_PTR) nrt_DLL_retrieve(nrt_DLL * dll, // This might be a "preloaded" TRE if (dll->dsoMain) { - const char* underscore = strchr(function, '_'); + const char* underscore = strrchr(function, '_'); if ((underscore != NULL) && strcmp(underscore, "_handler") == 0) { return dll->dsoMain; diff --git a/externals/nitro/nitro.sln b/externals/nitro/nitro.sln index 56cfb2e041..0f6fc7c9d7 100644 --- a/externals/nitro/nitro.sln +++ b/externals/nitro/nitro.sln @@ -20,26 +20,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nitf-c++", "modules\c++\nit {A676EDF3-F231-47C8-A6E6-0FE50B50B71B} = {A676EDF3-F231-47C8-A6E6-0FE50B50B71B} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ACCPOB", "modules\c\nitf\ACCPOB.vcxproj", "{730B1E6E-2469-4F9E-B093-D0C6262453C9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ACFTA", "modules\c\nitf\ACFTA.vcxproj", "{51D7B426-899E-428D-9F69-5DDAC9E403FB}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AIMIDB", "modules\c\nitf\AIMIDB.vcxproj", "{12AA0752-4EE3-4E0A-85AF-0E5DEADBF343}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JITCID", "modules\c\nitf\JITCID.vcxproj", "{D1D7FCD3-6130-4504-9DA0-9D80506BE55E}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "c-nitf-shared", "c-nitf-shared", "{27A2685A-E869-42A2-956D-92994F60C536}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CSCRNA", "modules\c\nitf\CSCRNA.vcxproj", "{023DE06D-3967-4406-B1B8-032118BB2552}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RPFHDR", "modules\c\nitf\RPFHDR.vcxproj", "{CF5B4F02-364D-4117-9FB9-6C9C7938E412}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "show_nitf++", "modules\c++\nitf\apps\show_nitf++\show_nitf++.vcxproj", "{839FF52C-57D1-45B6-81FD-5C7D72523EE5}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PTPRAA", "modules\c\nitf\PTPRAA.vcxproj", "{2BAAACA9-A5A4-412C-AE52-B16C2D107F55}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ENGRDA", "modules\c\nitf\ENGRDA.vcxproj", "{53F9F908-C678-4DEE-9309-E71C1E03A45F}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "J2KCompress", "modules\c\j2k\J2KCompress.vcxproj", "{A676EDF3-F231-47C8-A6E6-0FE50B50B71B}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "J2KDecompress", "modules\c\j2k\J2KDecompress.vcxproj", "{C787537A-0CAC-4D6D-A6D6-A66765A06753}" @@ -51,20 +35,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github-workflows", ".githu .github\workflows\main.yml = .github\workflows\main.yml EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CSEXRB", "modules\c\nitf\CSEXRB.vcxproj", "{0A9BDA26-092F-4A2C-BBEF-00C64BF0C65E}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "externals", "externals", "{7D26D571-0014-4C50-BF86-612E743E64B6}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "coda-oss", "externals\coda-oss\modules\c++\coda-oss.vcxproj", "{9997E895-5161-4DDF-8F3F-099894CB2F21}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTest", "UnitTest\UnitTest.vcxproj", "{8ACE478C-8F6F-4D42-9B43-7D75882D4BE1}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ACCHZB", "modules\c\nitf\ACCHZB.vcxproj", "{53F9F908-C678-4DEE-9309-E71C1D03A45F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HISTOA", "modules\c\nitf\HISTOA.vcxproj", "{D749AA73-4C9A-473D-96BB-070A6D9CAA54}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XML_DATA_CONTENT", "modules\c\nitf\XML_DATA_CONTENT.vcxproj", "{78849481-D356-4CC7-B182-31C21F857ED1}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TEST_DES", "modules\c\nitf\TEST_DES.vcxproj", "{53F9F908-C678-4DEE-9309-E71C1D03A45F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -79,42 +59,10 @@ Global {8F357A19-799E-4971-850E-3F28485C130B}.Debug|x64.Build.0 = Debug|x64 {8F357A19-799E-4971-850E-3F28485C130B}.Release|x64.ActiveCfg = Release|x64 {8F357A19-799E-4971-850E-3F28485C130B}.Release|x64.Build.0 = Release|x64 - {730B1E6E-2469-4F9E-B093-D0C6262453C9}.Debug|x64.ActiveCfg = Debug|x64 - {730B1E6E-2469-4F9E-B093-D0C6262453C9}.Debug|x64.Build.0 = Debug|x64 - {730B1E6E-2469-4F9E-B093-D0C6262453C9}.Release|x64.ActiveCfg = Release|x64 - {730B1E6E-2469-4F9E-B093-D0C6262453C9}.Release|x64.Build.0 = Release|x64 - {51D7B426-899E-428D-9F69-5DDAC9E403FB}.Debug|x64.ActiveCfg = Debug|x64 - {51D7B426-899E-428D-9F69-5DDAC9E403FB}.Debug|x64.Build.0 = Debug|x64 - {51D7B426-899E-428D-9F69-5DDAC9E403FB}.Release|x64.ActiveCfg = Release|x64 - {51D7B426-899E-428D-9F69-5DDAC9E403FB}.Release|x64.Build.0 = Release|x64 - {12AA0752-4EE3-4E0A-85AF-0E5DEADBF343}.Debug|x64.ActiveCfg = Debug|x64 - {12AA0752-4EE3-4E0A-85AF-0E5DEADBF343}.Debug|x64.Build.0 = Debug|x64 - {12AA0752-4EE3-4E0A-85AF-0E5DEADBF343}.Release|x64.ActiveCfg = Release|x64 - {12AA0752-4EE3-4E0A-85AF-0E5DEADBF343}.Release|x64.Build.0 = Release|x64 - {D1D7FCD3-6130-4504-9DA0-9D80506BE55E}.Debug|x64.ActiveCfg = Debug|x64 - {D1D7FCD3-6130-4504-9DA0-9D80506BE55E}.Debug|x64.Build.0 = Debug|x64 - {D1D7FCD3-6130-4504-9DA0-9D80506BE55E}.Release|x64.ActiveCfg = Release|x64 - {D1D7FCD3-6130-4504-9DA0-9D80506BE55E}.Release|x64.Build.0 = Release|x64 - {023DE06D-3967-4406-B1B8-032118BB2552}.Debug|x64.ActiveCfg = Debug|x64 - {023DE06D-3967-4406-B1B8-032118BB2552}.Debug|x64.Build.0 = Debug|x64 - {023DE06D-3967-4406-B1B8-032118BB2552}.Release|x64.ActiveCfg = Release|x64 - {023DE06D-3967-4406-B1B8-032118BB2552}.Release|x64.Build.0 = Release|x64 - {CF5B4F02-364D-4117-9FB9-6C9C7938E412}.Debug|x64.ActiveCfg = Debug|x64 - {CF5B4F02-364D-4117-9FB9-6C9C7938E412}.Debug|x64.Build.0 = Debug|x64 - {CF5B4F02-364D-4117-9FB9-6C9C7938E412}.Release|x64.ActiveCfg = Release|x64 - {CF5B4F02-364D-4117-9FB9-6C9C7938E412}.Release|x64.Build.0 = Release|x64 {839FF52C-57D1-45B6-81FD-5C7D72523EE5}.Debug|x64.ActiveCfg = Debug|x64 {839FF52C-57D1-45B6-81FD-5C7D72523EE5}.Debug|x64.Build.0 = Debug|x64 {839FF52C-57D1-45B6-81FD-5C7D72523EE5}.Release|x64.ActiveCfg = Release|x64 {839FF52C-57D1-45B6-81FD-5C7D72523EE5}.Release|x64.Build.0 = Release|x64 - {2BAAACA9-A5A4-412C-AE52-B16C2D107F55}.Debug|x64.ActiveCfg = Debug|x64 - {2BAAACA9-A5A4-412C-AE52-B16C2D107F55}.Debug|x64.Build.0 = Debug|x64 - {2BAAACA9-A5A4-412C-AE52-B16C2D107F55}.Release|x64.ActiveCfg = Release|x64 - {2BAAACA9-A5A4-412C-AE52-B16C2D107F55}.Release|x64.Build.0 = Release|x64 - {53F9F908-C678-4DEE-9309-E71C1E03A45F}.Debug|x64.ActiveCfg = Debug|x64 - {53F9F908-C678-4DEE-9309-E71C1E03A45F}.Debug|x64.Build.0 = Debug|x64 - {53F9F908-C678-4DEE-9309-E71C1E03A45F}.Release|x64.ActiveCfg = Release|x64 - {53F9F908-C678-4DEE-9309-E71C1E03A45F}.Release|x64.Build.0 = Release|x64 {A676EDF3-F231-47C8-A6E6-0FE50B50B71B}.Debug|x64.ActiveCfg = Debug|x64 {A676EDF3-F231-47C8-A6E6-0FE50B50B71B}.Debug|x64.Build.0 = Debug|x64 {A676EDF3-F231-47C8-A6E6-0FE50B50B71B}.Release|x64.ActiveCfg = Release|x64 @@ -123,10 +71,6 @@ Global {C787537A-0CAC-4D6D-A6D6-A66765A06753}.Debug|x64.Build.0 = Debug|x64 {C787537A-0CAC-4D6D-A6D6-A66765A06753}.Release|x64.ActiveCfg = Release|x64 {C787537A-0CAC-4D6D-A6D6-A66765A06753}.Release|x64.Build.0 = Release|x64 - {0A9BDA26-092F-4A2C-BBEF-00C64BF0C65E}.Debug|x64.ActiveCfg = Debug|x64 - {0A9BDA26-092F-4A2C-BBEF-00C64BF0C65E}.Debug|x64.Build.0 = Debug|x64 - {0A9BDA26-092F-4A2C-BBEF-00C64BF0C65E}.Release|x64.ActiveCfg = Release|x64 - {0A9BDA26-092F-4A2C-BBEF-00C64BF0C65E}.Release|x64.Build.0 = Release|x64 {9997E895-5161-4DDF-8F3F-099894CB2F21}.Debug|x64.ActiveCfg = Debug|x64 {9997E895-5161-4DDF-8F3F-099894CB2F21}.Debug|x64.Build.0 = Debug|x64 {9997E895-5161-4DDF-8F3F-099894CB2F21}.Release|x64.ActiveCfg = Release|x64 @@ -135,39 +79,25 @@ Global {8ACE478C-8F6F-4D42-9B43-7D75882D4BE1}.Debug|x64.Build.0 = Debug|x64 {8ACE478C-8F6F-4D42-9B43-7D75882D4BE1}.Release|x64.ActiveCfg = Release|x64 {8ACE478C-8F6F-4D42-9B43-7D75882D4BE1}.Release|x64.Build.0 = Release|x64 - {53F9F908-C678-4DEE-9309-E71C1D03A45F}.Debug|x64.ActiveCfg = Debug|x64 - {53F9F908-C678-4DEE-9309-E71C1D03A45F}.Debug|x64.Build.0 = Debug|x64 - {53F9F908-C678-4DEE-9309-E71C1D03A45F}.Release|x64.ActiveCfg = Release|x64 - {53F9F908-C678-4DEE-9309-E71C1D03A45F}.Release|x64.Build.0 = Release|x64 - {D749AA73-4C9A-473D-96BB-070A6D9CAA54}.Debug|x64.ActiveCfg = Debug|x64 - {D749AA73-4C9A-473D-96BB-070A6D9CAA54}.Debug|x64.Build.0 = Debug|x64 - {D749AA73-4C9A-473D-96BB-070A6D9CAA54}.Release|x64.ActiveCfg = Release|x64 - {D749AA73-4C9A-473D-96BB-070A6D9CAA54}.Release|x64.Build.0 = Release|x64 {78849481-D356-4CC7-B182-31C21F857ED1}.Debug|x64.ActiveCfg = Debug|x64 {78849481-D356-4CC7-B182-31C21F857ED1}.Debug|x64.Build.0 = Debug|x64 {78849481-D356-4CC7-B182-31C21F857ED1}.Release|x64.ActiveCfg = Release|x64 {78849481-D356-4CC7-B182-31C21F857ED1}.Release|x64.Build.0 = Release|x64 + {53F9F908-C678-4DEE-9309-E71C1D03A45F}.Debug|x64.ActiveCfg = Debug|x64 + {53F9F908-C678-4DEE-9309-E71C1D03A45F}.Debug|x64.Build.0 = Debug|x64 + {53F9F908-C678-4DEE-9309-E71C1D03A45F}.Release|x64.ActiveCfg = Release|x64 + {53F9F908-C678-4DEE-9309-E71C1D03A45F}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {730B1E6E-2469-4F9E-B093-D0C6262453C9} = {27A2685A-E869-42A2-956D-92994F60C536} - {51D7B426-899E-428D-9F69-5DDAC9E403FB} = {27A2685A-E869-42A2-956D-92994F60C536} - {12AA0752-4EE3-4E0A-85AF-0E5DEADBF343} = {27A2685A-E869-42A2-956D-92994F60C536} - {D1D7FCD3-6130-4504-9DA0-9D80506BE55E} = {27A2685A-E869-42A2-956D-92994F60C536} - {023DE06D-3967-4406-B1B8-032118BB2552} = {27A2685A-E869-42A2-956D-92994F60C536} - {CF5B4F02-364D-4117-9FB9-6C9C7938E412} = {27A2685A-E869-42A2-956D-92994F60C536} - {2BAAACA9-A5A4-412C-AE52-B16C2D107F55} = {27A2685A-E869-42A2-956D-92994F60C536} - {53F9F908-C678-4DEE-9309-E71C1E03A45F} = {27A2685A-E869-42A2-956D-92994F60C536} {A676EDF3-F231-47C8-A6E6-0FE50B50B71B} = {27A2685A-E869-42A2-956D-92994F60C536} {C787537A-0CAC-4D6D-A6D6-A66765A06753} = {27A2685A-E869-42A2-956D-92994F60C536} {A45CB073-25A7-411D-A7E7-589BCC8AF547} = {5C5727E7-0CFF-42B4-8F5A-D31B3BC81F21} - {0A9BDA26-092F-4A2C-BBEF-00C64BF0C65E} = {27A2685A-E869-42A2-956D-92994F60C536} {9997E895-5161-4DDF-8F3F-099894CB2F21} = {7D26D571-0014-4C50-BF86-612E743E64B6} - {53F9F908-C678-4DEE-9309-E71C1D03A45F} = {27A2685A-E869-42A2-956D-92994F60C536} - {D749AA73-4C9A-473D-96BB-070A6D9CAA54} = {27A2685A-E869-42A2-956D-92994F60C536} {78849481-D356-4CC7-B182-31C21F857ED1} = {27A2685A-E869-42A2-956D-92994F60C536} + {53F9F908-C678-4DEE-9309-E71C1D03A45F} = {27A2685A-E869-42A2-956D-92994F60C536} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2D7AC542-BBB6-4BAC-8BF1-7E76C714BBA4} diff --git a/six/modules/c++/CMakeLists.txt b/six/modules/c++/CMakeLists.txt index 44914c1706..6ec59c7bb3 100644 --- a/six/modules/c++/CMakeLists.txt +++ b/six/modules/c++/CMakeLists.txt @@ -2,8 +2,11 @@ if (MSVC) # By default, there is a /W3 on the command-line from somewhere (?); adding # /Wn results in a compiler warning. - #add_compile_options(/W4) # /Wall - string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") # /Wall + # + # https://github.com/microsoft/STL/wiki/Changelog#vs-2022-179-preview-1 + # > *Note*: `/Wall` is not intended for regular production use, as it contains a large number of + # > extremely noisy and low-value warnings. In general, the STL does not attempt to be `/Wall` clean. + string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") # add_compile_options(/W4) add_compile_options(/wd4996) # '...': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. add_compile_options(/wd4127) # conditional expression is constant diff --git a/six/modules/c++/cphd/cphd.vcxproj b/six/modules/c++/cphd/cphd.vcxproj index 45aaa5e6a5..1da9449eff 100644 --- a/six/modules/c++/cphd/cphd.vcxproj +++ b/six/modules/c++/cphd/cphd.vcxproj @@ -62,7 +62,7 @@ AdvancedVectorExtensions2 ProgramDatabase Guard - EnableAllWarnings + Level4 true MultiThreadedDebugDLL true diff --git a/six/modules/c++/cphd03/cphd03.vcxproj b/six/modules/c++/cphd03/cphd03.vcxproj index 129e159151..baffbf33a5 100644 --- a/six/modules/c++/cphd03/cphd03.vcxproj +++ b/six/modules/c++/cphd03/cphd03.vcxproj @@ -62,7 +62,7 @@ AdvancedVectorExtensions2 ProgramDatabase Guard - EnableAllWarnings + Level4 true MultiThreadedDebugDLL true diff --git a/six/modules/c++/samples/check_valid_six.dir/check_valid_six.vcxproj b/six/modules/c++/samples/check_valid_six.dir/check_valid_six.vcxproj index eb0e48d067..dedfd0d89d 100644 --- a/six/modules/c++/samples/check_valid_six.dir/check_valid_six.vcxproj +++ b/six/modules/c++/samples/check_valid_six.dir/check_valid_six.vcxproj @@ -61,7 +61,7 @@ AdvancedVectorExtensions2 ProgramDatabase Guard - EnableAllWarnings + Level4 true MultiThreadedDebugDLL true diff --git a/six/modules/c++/samples/crop_sicd.dir/crop_sicd.vcxproj b/six/modules/c++/samples/crop_sicd.dir/crop_sicd.vcxproj index 5b8ed9267e..baae7870bc 100644 --- a/six/modules/c++/samples/crop_sicd.dir/crop_sicd.vcxproj +++ b/six/modules/c++/samples/crop_sicd.dir/crop_sicd.vcxproj @@ -61,7 +61,7 @@ AdvancedVectorExtensions2 ProgramDatabase Guard - EnableAllWarnings + Level4 true MultiThreadedDebugDLL true diff --git a/six/modules/c++/scene/scene.vcxproj b/six/modules/c++/scene/scene.vcxproj index 62eb7adb3c..cf3a27e0a5 100644 --- a/six/modules/c++/scene/scene.vcxproj +++ b/six/modules/c++/scene/scene.vcxproj @@ -63,7 +63,7 @@ AdvancedVectorExtensions2 ProgramDatabase Guard - EnableAllWarnings + Level4 true true MultiThreadedDebugDLL diff --git a/six/modules/c++/six.convert/six.convert.vcxproj b/six/modules/c++/six.convert/six.convert.vcxproj index f67abbbe44..fa7aa68e4d 100644 --- a/six/modules/c++/six.convert/six.convert.vcxproj +++ b/six/modules/c++/six.convert/six.convert.vcxproj @@ -62,7 +62,7 @@ AdvancedVectorExtensions2 ProgramDatabase Guard - EnableAllWarnings + Level4 true MultiThreadedDebugDLL true diff --git a/six/modules/c++/six.sicd/six.sicd.vcxproj b/six/modules/c++/six.sicd/six.sicd.vcxproj index d96c1fae45..d95b9eda8a 100644 --- a/six/modules/c++/six.sicd/six.sicd.vcxproj +++ b/six/modules/c++/six.sicd/six.sicd.vcxproj @@ -63,9 +63,10 @@ AdvancedVectorExtensions2 ProgramDatabase Guard - EnableAllWarnings + Level4 MultiThreadedDebugDLL true + true diff --git a/six/modules/c++/six.sicd/source/ComplexToAMP8IPHS8I.cpp b/six/modules/c++/six.sicd/source/ComplexToAMP8IPHS8I.cpp index d799b3c5f7..e34bb91172 100644 --- a/six/modules/c++/six.sicd/source/ComplexToAMP8IPHS8I.cpp +++ b/six/modules/c++/six.sicd/source/ComplexToAMP8IPHS8I.cpp @@ -143,7 +143,7 @@ six::sicd::details::ComplexToAMP8IPHS8I::ComplexToAMP8IPHS8I(const six::Amplitud const auto p1 = GetPhase(Utilities::toComplex(1, 1, pAmplitudeTable)); assert(p0 == 0.0); assert(p1 > p0); - phase_delta = p1 - p0; + phase_delta = gsl::narrow_cast(p1 - p0); size_t i = 0; for(const auto value : six::sicd::Utilities::iota_0_256()) { diff --git a/six/modules/c++/six.sicd/source/Utilities.cpp b/six/modules/c++/six.sicd/source/Utilities.cpp index 99377c227e..42dccbee26 100644 --- a/six/modules/c++/six.sicd/source/Utilities.cpp +++ b/six/modules/c++/six.sicd/source/Utilities.cpp @@ -97,7 +97,7 @@ static auto toComplex_(double A, uint8_t phase) const auto angle = units::Radians{ 2 * std::numbers::pi * P }; double sin_angle, cos_angle; SinCos(angle, sin_angle, cos_angle); - six::zfloat S(A * cos_angle, A * sin_angle); + six::zfloat S(gsl::narrow_cast(A * cos_angle), gsl::narrow_cast(A * sin_angle)); return S; } six::zfloat six::sicd::Utilities::toComplex(uint8_t amplitude, uint8_t phase) diff --git a/six/modules/c++/six.sidd/six.sidd.vcxproj b/six/modules/c++/six.sidd/six.sidd.vcxproj index 4b4e5856b2..8ad2eb70ae 100644 --- a/six/modules/c++/six.sidd/six.sidd.vcxproj +++ b/six/modules/c++/six.sidd/six.sidd.vcxproj @@ -63,7 +63,7 @@ AdvancedVectorExtensions2 ProgramDatabase Guard - EnableAllWarnings + Level4 true MultiThreadedDebugDLL true diff --git a/six/modules/c++/six/six.vcxproj b/six/modules/c++/six/six.vcxproj index 5523252eb4..6c40967ea8 100644 --- a/six/modules/c++/six/six.vcxproj +++ b/six/modules/c++/six/six.vcxproj @@ -62,7 +62,7 @@ AdvancedVectorExtensions2 ProgramDatabase Guard - EnableAllWarnings + Level4 true true true