Skip to content

Commit

Permalink
update "coda-oss" and "nitro" (#434)
Browse files Browse the repository at this point in the history
* add contact details

* update .gitignore

* not sure what to do with CMakeSettings.json

* Create CMakeSettings.json

* new/updated "docs" directory

* update externals/nitro with latest from nitro repo

* use in32_t, etc. instead of nitf::Int32_t

* Revert "Merge branch 'feature/update_nitro' into develop/jdsmith"

This reverts commit 52001ee, reversing
changes made to aac9d2c.

* Revert "Merge branch 'feature/use_standard_C_types' into develop/jdsmith"

This reverts commit aac9d2c, reversing
changes made to 89b7807.

* use in32_t, etc. instead of nitf::Int32_t

* update externals/nitro with latest from nitro repo

* Revert "update externals/nitro with latest from nitro repo"

This reverts commit 7eb2813.

* update nitro/nrt

* update "nitro"

* nitf::Int8 -> int8_t

* updates from coda-oss and nitro

* update externals/nitro with latest from "main"

* update externals/coda-oss with latest from "main"

* don't want "docs" directory in externals/nitro

* fix bad merge

* ignore CMake-generated files

* std::auto_ptr -> std::unique_ptr

* need std::auto_ptr<> overloads for pre-generated Python wrapper code

* provide std::auto_ptr "overloads" so that existing Python wrapper code continues to work w/o changes

* impelement std::auto_ptr "overrides"

* latest from nitro:main

* update externals/nitro

* update coda-oss

* Create codeql-analysis.yml

* update coda-oss with latest from "main"

* update nitro with latest from "main"

* Revert "Create codeql-analysis.yml"

This reverts commit b261bbd.

* fix nitf::Field to get rid of compiler errors

* build externals/coda-oss by itself

* build with Visual Studio 2019 (#358)

* Revert "Create codeql-analysis.yml"

This reverts commit 4388277.

* build nitro projects in SIX solution

* build "six" as a Visual Studio project

* build "scene" with Visual Studio

* build cphd with Visual Studio

* build cphd03 with Visual Studio

* build six.sicd with Visual Studio

* build six.sidd with Visual Studio

* buid six.convert with Visual Studio

* add a GTest project

* trying to get a unittest working

* build XML_DATA_CONTENT

* get a NITF unit-test working :-)

* run all "six" unittests

* fix dummy DEFAULT_SCHEMA_PATH

* allow unit-tests to run in Visual Studio

* run SIDD unit-tests from Visual Studio

* set SIX_SCHEMA_PATH so unittest works

* run SICD unittests in Visual Studio

* build and run six.sicd unittests in Visual Studio

* set NITF_PLUGIN_PATH for sicd_test_area_plane

* build cphd03 unittests in Visual Studio

* run remaining cphd03 unittests

* fix build error introduced with VS2019 changes

* build cphd unittests in Visual Studio

* build & run remaining cphd unittests in Visual Studio

* use c++11 (#359)

* getting rid of std::auto_ptr<> because it's gone in C++17

* build all projects with C++17

* get rid of hard-coded paths with <filesystem> (#360)

* put common #includes for PCH in a single file

* build check_valid_six

* use EXIT_* rather than 0/1

* getting rid of std::auto_ptr<> because it's gone in C++17

* build all projects with C++17

* use <filesystem> to remove hard-coded paths

* in Visual Studio, run check_valid_six with a pre-defined path

* tweak plugin dir

* can't have "check_valid_six" as a directory for *ix build

* build crop_sicd

* build crop_sicd in Visual Studio (#361)

* put common #includes for PCH in a single file

* build check_valid_six

* use EXIT_* rather than 0/1

* getting rid of std::auto_ptr<> because it's gone in C++17

* build all projects with C++17

* use <filesystem> to remove hard-coded paths

* in Visual Studio, run check_valid_six with a pre-defined path

* tweak plugin dir

* can't have "check_valid_six" as a directory for *ix build

* build crop_sicd

* build crop_sicd

* update coda-oss with latest from "main"

* update coda-oss with latest from "main" (#362)

* coda-oss updates to make TextEncoding part of the OutputStream

* updates from coda-oss to make TextEncoding part of the OutputStream

* fix StringStream() .ctor()

* one more coda-oss update

* latest from coda-oss "main" (#364)

* update coda-oss with latest from "main"

* coda-oss updates to make TextEncoding part of the OutputStream

* updates from coda-oss to make TextEncoding part of the OutputStream

* fix StringStream() .ctor()

* one more coda-oss update

* latest from "main" on coda-oss: xml.lite updates for UTF-8

* restore changes lost in merge

* update coda-oss (#365)

* update coda-oss with latest from "main"

* coda-oss updates to make TextEncoding part of the OutputStream

* updates from coda-oss to make TextEncoding part of the OutputStream

* fix StringStream() .ctor()

* one more coda-oss update

* latest from "main" on coda-oss: xml.lite updates for UTF-8

* restore changes lost in merge

* latest from coda-oss

* another update to coda-oss (#366)

* update coda-oss with latest from "main"

* coda-oss updates to make TextEncoding part of the OutputStream

* updates from coda-oss to make TextEncoding part of the OutputStream

* fix StringStream() .ctor()

* one more coda-oss update

* latest from "main" on coda-oss: xml.lite updates for UTF-8

* restore changes lost in merge

* latest from coda-oss

* latest from coda-oss

* Develop/update externals (#367)

* update coda-oss with latest from "main"

* coda-oss updates to make TextEncoding part of the OutputStream

* updates from coda-oss to make TextEncoding part of the OutputStream

* fix StringStream() .ctor()

* one more coda-oss update

* latest from "main" on coda-oss: xml.lite updates for UTF-8

* restore changes lost in merge

* latest from coda-oss

* latest from coda-oss

* latest from coda-oss

* latest from coda-oss (#368)

* update coda-oss with latest from "main"

* coda-oss updates to make TextEncoding part of the OutputStream

* updates from coda-oss to make TextEncoding part of the OutputStream

* fix StringStream() .ctor()

* one more coda-oss update

* latest from "main" on coda-oss: xml.lite updates for UTF-8

* restore changes lost in merge

* latest from coda-oss

* latest from coda-oss

* latest from coda-oss

* latest from "main" on coda-oss

* latest from coda-oss (#369)

* update coda-oss with latest from "main"

* coda-oss updates to make TextEncoding part of the OutputStream

* updates from coda-oss to make TextEncoding part of the OutputStream

* fix StringStream() .ctor()

* one more coda-oss update

* latest from "main" on coda-oss: xml.lite updates for UTF-8

* restore changes lost in merge

* latest from coda-oss

* latest from coda-oss

* latest from coda-oss

* latest from "main" on coda-oss

* use Filesystem.h from coda-oss instead of <filesystem>

* use sys::Filesystem

* update "nitro" and "coda-oss" (#370)

* update "nitro" and "coda-oss"

* Delete CMakeSettings.json

* changeFileHeader() doesn't (yet) work in "externals"

* preserve utf8 in XML text (#363)

* pass io::Encoding::Utf8 to print() and prettyPrint() to preserve UTF-8 in output

* store the value of xml::lite::MinidomParser::preserveCharacterData() so we can figure out the encoding

* Don't want to set a dummy schema path to a directory that exists

* add a unit-test for UTF-8 characters in "Classification"

* fix isUnclassified() so it works for "NON CLASSIFIÉ / UNCLASSIFIED"

* Revert "Merge branch 'main' into bugfix/preserve_UTF8_in_classified_field"

This reverts commit 12534c9, reversing
changes made to 02ce755.

* account for coda-oss changes where TextEncoding is part of the OutputStream

* get the right verson of Element.h

* use new xml::lite to read/write XML in UTF-8

* be sure we can read-in and process UTF-8 from a NITF

* assume UTF-8 on *ix and Windows-1252 on Windows

* reduce "gratuatous" diffs for simpler merge request

* one more unneeded diff

* French -> Canada

* latest from coda-oss

* trying to get the test_valid_six unittest working on Linux

* use .tar, not .tar.gz

* add another unit-test (#371)

* put common #includes for PCH in a single file

* build check_valid_six

* use EXIT_* rather than 0/1

* getting rid of std::auto_ptr<> because it's gone in C++17

* build all projects with C++17

* use <filesystem> to remove hard-coded paths

* in Visual Studio, run check_valid_six with a pre-defined path

* tweak plugin dir

* can't have "check_valid_six" as a directory for *ix build

* build crop_sicd

* turn on /Wall, fix some warnings

* C++17 generates more warnings that I don't want to fix right now

* removed some compiler warnings from third-party code

* comment-out use of C++17's <filesystem>

* tweak project settings for consistency

* unit-test for createFakeComplexData()

* remove some compiler warnings (#372)

* getting rid of std::auto_ptr<> because it's gone in C++17

* build all projects with C++17

* turn on compiler warnings

* crank-up warning level

* enable "Warnings as errors"

* turn on all warnings (many #pragma'd away)

* get rid of more warnings

* adjust more #pragma's

* update externals (#373)

* update "nitro"

* update coda-oss and fix compiler errors

* update coda-oss and nitro with less use of sys::

* unit-test paths are wrong for "externals"

* use c++11 features (#374)

* update "nitro"

* update coda-oss and fix compiler errors

* use int64_t, etc. instead of sys::Int64_T

* mem::SharedPtr -> std::shared_ptr

* update coda-oss and nitro with less use of sys::

* unit-test paths are wrong for "externals"

* update "nitro" to get SegmentMemorySource overloads

* latest "nitro" (#375)

* update "nitro"

* update coda-oss and fix compiler errors

* update coda-oss and nitro with less use of sys::

* unit-test paths are wrong for "externals"

* update "nitro" to get SegmentMemorySource overloads

* latest from "nitro"

* match nitro -> nitf change

* make_span()

* latest from "coda-oss" (#376)

* update "nitro"

* update coda-oss and fix compiler errors

* update coda-oss and nitro with less use of sys::

* unit-test paths are wrong for "externals"

* update "nitro" to get SegmentMemorySource overloads

* latest from "nitro"

* match nitro -> nitf change

* make_span()

* latest from "coda-oss"

* more use of C++11 (#377)

* update "nitro"

* update coda-oss and fix compiler errors

* use int64_t, etc. instead of sys::Int64_T

* mem::SharedPtr -> std::shared_ptr

* update coda-oss and nitro with less use of sys::

* unit-test paths are wrong for "externals"

* update "nitro" to get SegmentMemorySource overloads

* use std::unique_ptr<[]> instead of mem::ScopedArray

* use int32_t et. al. instead of sys::Int32_T

* use std::byte (not quite working yet, but need to move code to a faster machine)

* build with std::byte

* use std::thread::hardware_concurrency() instead of sys::OS().getNumCPUs()

* sys::Off_T -> ptrdiff_t

* Revert "sys::Off_T -> ptrdiff_t"

This reverts commit aa22a37.

* sys::Off_T -> int64_t; sys::SSize_T -> ptrdiff_t

* fix build errors from recent changes (#378)

* put common #includes for PCH in a single file

* build check_valid_six

* use EXIT_* rather than 0/1

* getting rid of std::auto_ptr<> because it's gone in C++17

* build all projects with C++17

* use <filesystem> to remove hard-coded paths

* in Visual Studio, run check_valid_six with a pre-defined path

* tweak plugin dir

* can't have "check_valid_six" as a directory for *ix build

* build crop_sicd

* turn on /Wall, fix some warnings

* C++17 generates more warnings that I don't want to fix right now

* removed some compiler warnings from third-party code

* comment-out use of C++17's <filesystem>

* tweak project settings for consistency

* unit-test for createFakeComplexData()

* turn on compiler warnings

* crank-up warning level

* enable "Warnings as errors"

* turn on all warnings (many #pragma'd away)

* get rid of more warnings

* adjust more #pragma's

* update "nitro"

* update coda-oss and fix compiler errors

* update "nitro"

* update coda-oss and fix compiler errors

* use "externals" from top-level "install"

* use int64_t, etc. instead of sys::Int64_T

* mem::SharedPtr -> std::shared_ptr

* update coda-oss and nitro with less use of sys::

* unit-test paths are wrong for "externals"

* update "nitro" to get SegmentMemorySource overloads

* use std::unique_ptr<[]> instead of mem::ScopedArray

* use int32_t et. al. instead of sys::Int32_T

* use std::byte (not quite working yet, but need to move code to a faster machine)

* build with std::byte

* build with simplified "externals" scheme

* latest from "nitro"

* match nitro -> nitf change

* make_span()

* use std::thread::hardware_concurrency() instead of sys::OS().getNumCPUs()

* sys::Off_T -> ptrdiff_t

* fix compiler errors from previous merge; mostly #include <thread>

* Revert "sys::Off_T -> ptrdiff_t"

This reverts commit aa22a37.

* sys::Off_T -> int64_t; sys::SSize_T -> ptrdiff_t

* latest from "coda-oss"

* NULL -> nullptr (#379)

* update "nitro"

* update coda-oss and fix compiler errors

* use int64_t, etc. instead of sys::Int64_T

* mem::SharedPtr -> std::shared_ptr

* update coda-oss and nitro with less use of sys::

* unit-test paths are wrong for "externals"

* update "nitro" to get SegmentMemorySource overloads

* use std::unique_ptr<[]> instead of mem::ScopedArray

* use int32_t et. al. instead of sys::Int32_T

* use std::byte (not quite working yet, but need to move code to a faster machine)

* build with std::byte

* use std::thread::hardware_concurrency() instead of sys::OS().getNumCPUs()

* sys::Off_T -> ptrdiff_t

* Revert "sys::Off_T -> ptrdiff_t"

This reverts commit aa22a37.

* sys::Off_T -> int64_t; sys::SSize_T -> ptrdiff_t

* use filesystem::path and std::endian

* less use of sys::

* NULL -> nullptr

* latest from coda-oss (#381)

* update "nitro"

* update coda-oss and fix compiler errors

* update coda-oss and nitro with less use of sys::

* unit-test paths are wrong for "externals"

* update "nitro" to get SegmentMemorySource overloads

* latest from "nitro"

* match nitro -> nitf change

* make_span()

* latest from "coda-oss"

* more filesystem from coda-oss

* latest from develop/jdsmith (#382)

* put common #includes for PCH in a single file

* build check_valid_six

* use EXIT_* rather than 0/1

* getting rid of std::auto_ptr<> because it's gone in C++17

* build all projects with C++17

* use <filesystem> to remove hard-coded paths

* in Visual Studio, run check_valid_six with a pre-defined path

* tweak plugin dir

* can't have "check_valid_six" as a directory for *ix build

* build crop_sicd

* turn on /Wall, fix some warnings

* C++17 generates more warnings that I don't want to fix right now

* removed some compiler warnings from third-party code

* comment-out use of C++17's <filesystem>

* tweak project settings for consistency

* unit-test for createFakeComplexData()

* turn on compiler warnings

* crank-up warning level

* enable "Warnings as errors"

* turn on all warnings (many #pragma'd away)

* get rid of more warnings

* adjust more #pragma's

* update "nitro"

* update coda-oss and fix compiler errors

* update "nitro"

* update coda-oss and fix compiler errors

* use "externals" from top-level "install"

* use int64_t, etc. instead of sys::Int64_T

* mem::SharedPtr -> std::shared_ptr

* update coda-oss and nitro with less use of sys::

* unit-test paths are wrong for "externals"

* update "nitro" to get SegmentMemorySource overloads

* use std::unique_ptr<[]> instead of mem::ScopedArray

* use int32_t et. al. instead of sys::Int32_T

* use std::byte (not quite working yet, but need to move code to a faster machine)

* build with std::byte

* build with simplified "externals" scheme

* latest from "nitro"

* match nitro -> nitf change

* make_span()

* use std::thread::hardware_concurrency() instead of sys::OS().getNumCPUs()

* sys::Off_T -> ptrdiff_t

* fix compiler errors from previous merge; mostly #include <thread>

* Revert "sys::Off_T -> ptrdiff_t"

This reverts commit aa22a37.

* sys::Off_T -> int64_t; sys::SSize_T -> ptrdiff_t

* latest from "coda-oss"

* use filesystem::path and std::endian

* more filesystem from coda-oss

* less use of sys::

* NULL -> nullptr

* use .data() rather than &d[0]

* mem::BufferView -> std::span

* const std::span<>& doesn't make much sense

* need make_span() overload for pointer+size

* latest from "nitro" (#383)

* update "nitro"

* update coda-oss and fix compiler errors

* update coda-oss and nitro with less use of sys::

* unit-test paths are wrong for "externals"

* update "nitro" to get SegmentMemorySource overloads

* latest from "nitro"

* match nitro -> nitf change

* make_span()

* latest from "coda-oss"

* more filesystem from coda-oss

* latest from "nitro"

* latest from develop/jdsmith (#385)

* put common #includes for PCH in a single file

* build check_valid_six

* use EXIT_* rather than 0/1

* getting rid of std::auto_ptr<> because it's gone in C++17

* build all projects with C++17

* use <filesystem> to remove hard-coded paths

* in Visual Studio, run check_valid_six with a pre-defined path

* tweak plugin dir

* can't have "check_valid_six" as a directory for *ix build

* build crop_sicd

* turn on /Wall, fix some warnings

* C++17 generates more warnings that I don't want to fix right now

* removed some compiler warnings from third-party code

* comment-out use of C++17's <filesystem>

* tweak project settings for consistency

* unit-test for createFakeComplexData()

* turn on compiler warnings

* crank-up warning level

* enable "Warnings as errors"

* turn on all warnings (many #pragma'd away)

* get rid of more warnings

* adjust more #pragma's

* update "nitro"

* update coda-oss and fix compiler errors

* update "nitro"

* update coda-oss and fix compiler errors

* use "externals" from top-level "install"

* use int64_t, etc. instead of sys::Int64_T

* mem::SharedPtr -> std::shared_ptr

* update coda-oss and nitro with less use of sys::

* unit-test paths are wrong for "externals"

* update "nitro" to get SegmentMemorySource overloads

* use std::unique_ptr<[]> instead of mem::ScopedArray

* use int32_t et. al. instead of sys::Int32_T

* use std::byte (not quite working yet, but need to move code to a faster machine)

* build with std::byte

* build with simplified "externals" scheme

* latest from "nitro"

* match nitro -> nitf change

* make_span()

* use std::thread::hardware_concurrency() instead of sys::OS().getNumCPUs()

* sys::Off_T -> ptrdiff_t

* fix compiler errors from previous merge; mostly #include <thread>

* Revert "sys::Off_T -> ptrdiff_t"

This reverts commit aa22a37.

* sys::Off_T -> int64_t; sys::SSize_T -> ptrdiff_t

* latest from "coda-oss"

* use filesystem::path and std::endian

* more filesystem from coda-oss

* less use of sys::

* NULL -> nullptr

* use .data() rather than &d[0]

* mem::BufferView -> std::span

* const std::span<>& doesn't make much sense

* need make_span() overload for pointer+size

* latest from "nitro"

* std::endian

* coda-oss now gives us std::endian

* sys::Filesystem -> std::filesystem

* don't need to explicitly call fs::path::string() in most cases

* sys::Filesystem -> std::filesystem

* fix build errors when using C++17

* latest from "nitro" (#387)

* update "nitro"

* update coda-oss and fix compiler errors

* update coda-oss and nitro with less use of sys::

* unit-test paths are wrong for "externals"

* update "nitro" to get SegmentMemorySource overloads

* latest from "nitro"

* match nitro -> nitf change

* make_span()

* latest from "coda-oss"

* more filesystem from coda-oss

* latest from "nitro"

* std::endian

* latest from "nitro"

* latest changes from develop/jdsmith (#386)

* put common #includes for PCH in a single file

* build check_valid_six

* use EXIT_* rather than 0/1

* getting rid of std::auto_ptr<> because it's gone in C++17

* build all projects with C++17

* use <filesystem> to remove hard-coded paths

* in Visual Studio, run check_valid_six with a pre-defined path

* tweak plugin dir

* can't have "check_valid_six" as a directory for *ix build

* build crop_sicd

* turn on /Wall, fix some warnings

* C++17 generates more warnings that I don't want to fix right now

* removed some compiler warnings from third-party code

* comment-out use of C++17's <filesystem>

* tweak project settings for consistency

* unit-test for createFakeComplexData()

* turn on compiler warnings

* crank-up warning level

* enable "Warnings as errors"

* turn on all warnings (many #pragma'd away)

* get rid of more warnings

* adjust more #pragma's

* update "nitro"

* update coda-oss and fix compiler errors

* update "nitro"

* update coda-oss and fix compiler errors

* use "externals" from top-level "install"

* use int64_t, etc. instead of sys::Int64_T

* mem::SharedPtr -> std::shared_ptr

* update coda-oss and nitro with less use of sys::

* unit-test paths are wrong for "externals"

* update "nitro" to get SegmentMemorySource overloads

* use std::unique_ptr<[]> instead of mem::ScopedArray

* use int32_t et. al. instead of sys::Int32_T

* use std::byte (not quite working yet, but need to move code to a faster machine)

* build with std::byte

* build with simplified "externals" scheme

* latest from "nitro"

* match nitro -> nitf change

* make_span()

* use std::thread::hardware_concurrency() instead of sys::OS().getNumCPUs()

* sys::Off_T -> ptrdiff_t

* fix compiler errors from previous merge; mostly #include <thread>

* Revert "sys::Off_T -> ptrdiff_t"

This reverts commit aa22a37.

* sys::Off_T -> int64_t; sys::SSize_T -> ptrdiff_t

* latest from "coda-oss"

* use filesystem::path and std::endian

* more filesystem from coda-oss

* less use of sys::

* NULL -> nullptr

* use .data() rather than &d[0]

* mem::BufferView -> std::span

* const std::span<>& doesn't make much sense

* need make_span() overload for pointer+size

* latest from "nitro"

* std::endian

* coda-oss now gives us std::endian

* sys::Filesystem -> std::filesystem

* don't need to explicitly call fs::path::string() in most cases

* sys::Filesystem -> std::filesystem

* fix build errors when using C++17

* simplify access to some ImageSubheader values

* newReadControl() returns a std::unique_ptr<> rather than a raw pointer

* a singleton is much easier in C++11

* don't need to do manual locking in C++11

* use a template and some macros to dramatically simplify Enums

* adjust macros for GCC, provide operators for SWIG

* got the map entries wrong

* make getIndices() a bit more robust

* store a std::unique_ptr<> instead of a raw poniter

* throw exceptions in getIndices() rather than assuming

* use Enum<T>.toString() where possible rather than duplicating code

* remove duplicate code converting from a string to Enum<T>

* don't explicilty check for "SIDD" as that's already part of getDataType()

* use std::string instead of char[]

* reduce use of "delete[]"

* less use of "SICD" and "SIDD", use six::DataType instead

* simplify Region buffer management

* reduce some explicit use of std::shared_ptr<> with std::make_shared and/or auto

* more reduction in explicit use of std::shared_ptr

* latest from "nitro"

* simplify use of six::Region

* reduce use of explicit .toString()

* further reduction in explicit use of toString()

* template specialiaton can't be inline with G++

* simplify cphd enum creation

* reduce use of toString() with setAttribute()

* update externals (#388)

* update "nitro"

* update coda-oss and fix compiler errors

* update coda-oss and nitro with less use of sys::

* unit-test paths are wrong for "externals"

* update "nitro" to get SegmentMemorySource overloads

* latest from "nitro"

* match nitro -> nitf change

* make_span()

* latest from "coda-oss"

* more filesystem from coda-oss

* latest from "nitro"

* std::endian

* latest from "nitro"

* latest from "nitro" and "coda-oss"

* reduce use of toString() (#389)

* put common #includes for PCH in a single file

* build check_valid_six

* use EXIT_* rather than 0/1

* getting rid of std::auto_ptr<> because it's gone in C++17

* build all projects with C++17

* use <filesystem> to remove hard-coded paths

* in Visual Studio, run check_valid_six with a pre-defined path

* tweak plugin dir

* can't have "check_valid_six" as a directory for *ix build

* build crop_sicd

* turn on /Wall, fix some warnings

* C++17 generates more warnings that I don't want to fix right now

* removed some compiler warnings from third-party code

* comment-out use of C++17's <filesystem>

* tweak project settings for consistency

* unit-test for createFakeComplexData()

* turn on compiler warnings

* crank-up warning level

* enable "Warnings as errors"

* turn on all warnings (many #pragma'd away)

* get rid of more warnings

* adjust more #pragma's

* update "nitro"

* update coda-oss and fix compiler errors

* update "nitro"

* update coda-oss and fix compiler errors

* use "externals" from top-level "install"

* use int64_t, etc. instead of sys::Int64_T

* mem::SharedPtr -> std::shared_ptr

* update coda-oss and nitro with less use of sys::

* unit-test paths are wrong for "externals"

* update "nitro" to get SegmentMemorySource overloads

* use std::unique_ptr<[]> instead of mem::ScopedArray

* use int32_t et. al. instead of sys::Int32_T

* use std::byte (not quite working yet, but need to move code to a faster machine)

* build with std::byte

* build with simplified "externals" scheme

* latest from "nitro"

* match nitro -> nitf change

* make_span()

* use std::thread::hardware_concurrency() instead of sys::OS().getNumCPUs()

* sys::Off_T -> ptrdiff_t

* fix compiler errors from previous merge; mostly #include <thread>

* Revert "sys::Off_T -> ptrdiff_t"

This reverts commit aa22a37.

* sys::Off_T -> int64_t; sys::SSize_T -> ptrdiff_t

* latest from "coda-oss"

* use filesystem::path and std::endian

* more filesystem from coda-oss

* less use of sys::

* NULL -> nullptr

* use .data() rather than &d[0]

* mem::BufferView -> std::span

* const std::span<>& doesn't make much sense

* need make_span() overload for pointer+size

* latest from "nitro"

* std::endian

* coda-oss now gives us std::endian

* sys::Filesystem -> std::filesystem

* don't need to explicitly call fs::path::string() in most cases

* sys::Filesystem -> std::filesystem

* fix build errors when using C++17

* simplify access to some ImageSubheader values

* newReadControl() returns a std::unique_ptr<> rather than a raw pointer

* a singleton is much easier in C++11

* don't need to do manual locking in C++11

* use a template and some macros to dramatically simplify Enums

* adjust macros for GCC, provide operators for SWIG

* got the map entries wrong

* make getIndices() a bit more robust

* store a std::unique_ptr<> instead of a raw poniter

* throw exceptions in getIndices() rather than assuming

* use Enum<T>.toString() where possible rather than duplicating code

* remove duplicate code converting from a string to Enum<T>

* don't explicilty check for "SIDD" as that's already part of getDataType()

* use std::string instead of char[]

* reduce use of "delete[]"

* less use of "SICD" and "SIDD", use six::DataType instead

* simplify Region buffer management

* reduce some explicit use of std::shared_ptr<> with std::make_shared and/or auto

* more reduction in explicit use of std::shared_ptr

* latest from "nitro"

* simplify use of six::Region

* reduce use of explicit .toString()

* further reduction in explicit use of toString()

* template specialiaton can't be inline with G++

* simplify cphd enum creation

* reduce use of toString() with setAttribute()

* latest from "nitro" and "coda-oss"

* don't need catch(excep::Exception) ex.toString() as std::exception::what() now does the same thing

* really only have two calls to setAttribute(): std::string and size_t

* use macros to generate SIDD Enums

* add operator<< for Enum<T> to avoid some explicit .toString() calls

* add operator==(std::string) overload to redue need for .toString()

* add operator<<() to redue need for .toString()

* don't implmeent a bunch of six::toString() routines; they sholdn't be called anymore

* further reduction in use of toString()

* eliminate six::toString() template; just provide a few overloads instead

* createSixString() which calls six::toString(t) instead of t.toString()

* createSixString() overload with URI parameter

* allow different strings (e.g., "1" and "+1") to map to the same value

* put "Enum" support code in a separate file

* there is now just one NOT_SET_VALUE

* latest from coda-oss (#390)

* update "nitro"

* update coda-oss and fix compiler errors

* update coda-oss and nitro with less use of sys::

* unit-test paths are wrong for "externals"

* update "nitro" to get SegmentMemorySource overloads

* latest from "nitro"

* match nitro -> nitf change

* make_span()

* latest from "coda-oss"

* more filesystem from coda-oss

* latest from "nitro"

* std::endian

* latest from "nitro"

* latest from "nitro" and "coda-oss"

* latest from coda-oss

* lost toString<nullptr>()

* latest from coda-oss/main

* want "std" augmented in this repo

* latest from coda-oss and nitro (#391)

* update "nitro"

* update coda-oss and fix compiler errors

* update coda-oss and nitro with less use of sys::

* unit-test paths are wrong for "externals"

* update "nitro" to get SegmentMemorySource overloads

* latest from "nitro"

* match nitro -> nitf change

* make_span()

* latest from "coda-oss"

* more filesystem from coda-oss

* latest from "nitro"

* std::endian

* latest from "nitro"

* latest from "nitro" and "coda-oss"

* latest from coda-oss

* lost toString<nullptr>()

* latest from coda-oss/main

* want "std" augmented in this repo

* partial update from coda-oss/main

* latest from coda-oss/main

* update coda-oss with latest from https://github.com/mdaus/coda-oss

* update externals/nitro/docs

* latest from "nitro"

* Revert "latest from "nitro""

This reverts commit 0b99300.

* latest from nitro/master

* ignore build/ directory

* Revert "latest from nitro/master"

This reverts commit e89da71.

* update externals/nitro/docs

* update "c", "java", "mex", and "python" directories -- but not "c++"

* update other nitro top-level files ... everything except modules/c++

* VCXPROJ files from nitro

* several changes from nitro/c++ ... hoping this builds.

* fix build error on Linux

* more changes from nitro/modules/c++

* fix IOStreamWriter ctor

* more changes from nitro/modules/c++

* paths are wrong when in "externals"

* remove externals/nitro/docs

* slam in "main"

* latest from coda-oss/main

* adjust coda-oss for our usage

* latest from nitro/main

* std::span removed from "nitro"

* need to redo C++17

* fix missing #include file

* remove "nitro" files not needed in externals/nitro

* paths are wrong in "externals"

* Revert "remove "nitro" files not needed in externals/nitro"

This reverts commit da30b96.

* Revert "Revert "remove "nitro" files not needed in externals/nitro""

This reverts commit e69391b.

* slam in externals as merging creates too many conflicts

* merge brought back a deleted #include

* add back "java" and "mex"

* lates from coda-oss/main

* latest from "nitro"

* paths are wrong in "externals"

* need to redo C++17 support

* std::span -> gsl::span

* Revert "std::span -> gsl::span"

This reverts commit c10f233.

* latest from coda-oss and nitro

* these are the correct files from "master"

* gsl::span -> std::span

* get #includes right for PCH

* didn't want this change

* trigger build on GitHub

* remove files that shouldn't have been committed

* latest from coda-oss:master

* latest from nitro::master

* adjust to API changes in coda-oss/xml.lite

* latest from coda-oss

* latest from coda-oss

* std::filesystem::path doesn't implicitly convert to std::string

* more place where an explicit std::filesystem::path::string() call is needed

* latest from "coda-oss" and "nitro"

* latest from coda-oss

* one more change from coda-oss

* "nitro" changes to build with C90 instead of C99

* old C++11 compilers don't like template<template>

* new TREs from "nitro"

* std::shared_ptr<> doesn't have [] versions, only std::unique_ptr

* build with older compilers

* latest coda-oss changes

* Update .gitignore from "nitro"

* SWIG doesn't like "final"

* SWIG doesn't like "final"

* latest from coda_oss

* latest from "nitro"

Co-authored-by: Dan Smith <[email protected]>
  • Loading branch information
J. Daniel Smith and Dan Smith authored Mar 2, 2021
1 parent 6b82651 commit cf6f419
Show file tree
Hide file tree
Showing 61 changed files with 1,289 additions and 540 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#ifndef _CODA_OSS_CONFIG_H_
#define _CODA_OSS_CONFIG_H_

/* these should no longer be needed */
#cmakedefine HAVE_PTHREAD_H @HAVE_PTHREAD_H@
#cmakedefine HAVE_EXECINFO_H @HAVE_EXECINFO_H@
#cmakedefine HAVE_CLOCK_GETTIME @HAVE_CLOCK_GETTIME@
Expand All @@ -11,12 +12,14 @@
#cmakedefine HAVE_LOCALTIME_R @HAVE_LOCALTIME_R@
#cmakedefine HAVE_GMTIME_R @HAVE_GMTIME_R@
#cmakedefine HAVE_SETENV @HAVE_SETENV@
#cmakedefine HAVE_POSIX_MEMALIGN @HAVE_POSIX_MEMALIGN@
#cmakedefine HAVE_MEMALIGN @HAVE_MEMALIGN@
#cmakedefine01 BIGENDIAN
#cmakedefine SIZEOF_SIZE_T @SIZEOF_SIZE_T@
#cmakedefine HAVE_ATTRIBUTE_NOINLINE @HAVE_ATTRIBUTE_NOINLINE@
#cmakedefine HAVE_POSIX_MEMALIGN @HAVE_POSIX_MEMALIGN@
#cmakedefine HAVE_MEMALIGN @HAVE_MEMALIGN@
#cmakedefine HAVE_ATTRIBUTE_ALIGNED @HAVE_ATTRIBUTE_ALIGNED@
#cmakedefine HAVE_ATTRIBUTE_NOINLINE @HAVE_ATTRIBUTE_NOINLINE@

/* still might need these ... for now */
#cmakedefine CODA_EXPORT @CODA_EXPORT@

#endif /* _CODA_OSS_CONFIG_H_ */
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,34 @@
* see <http://www.gnu.org/licenses/>.
*
*/
#ifndef CONFIG_COMPILER_EXTENSIONS
#define CONFIG_COMPILER_EXTENSIONS
#ifndef CODA_OSS_config_compiler_extentions_h_INCLUDED_
#define CODA_OSS_config_compiler_extentions_h_INCLUDED_
#pragma once

#include <config/coda_oss_config.h>

#ifdef HAVE_ATTRIBUTE_NOINLINE
#define ATTRIBUTE_NOINLINE __attribute__((noinline))
#else
#define ATTRIBUTE_NOINLINE
#endif
#ifndef CODA_OSS_attribute_noinline_DEFINED_
#define CODA_OSS_attribute_noinline_DEFINED_ 1

#ifdef HAVE_ATTRIBUTE_ALIGNED
#define ATTRIBUTE_ALIGNED(x) __attribute__((aligned (x)))
#else
#define ATTRIBUTE_ALIGNED(X)
#endif
// https://stackoverflow.com/a/49468469/8877
#if defined(__GNUC__)
#define ATTRIBUTE_NOINLINE __attribute__((noinline))
#elif defined(_MSC_VER)
#define ATTRIBUTE_NOINLINE __declspec(noinline)
#else
#define ATTRIBUTE_NOINLINE
#endif
#endif // CODA_OSS_attribute_noinline_DEFINED_

#endif
#ifndef CODA_OSS_attribute_aligned_DEFINED_
#define CODA_OSS_attribute_aligned_DEFINED_ 1

#if defined(__GNUC__)
// https://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Variable-Attributes.html
#define ATTRIBUTE_ALIGNED(x) __attribute__((aligned(x)))
#else
#define ATTRIBUTE_ALIGNED(X)
#endif
#endif // CODA_OSS_attribute_aligned_DEFINED_

#endif // CODA_OSS_config_compiler_extentions_h_INCLUDED_
16 changes: 5 additions & 11 deletions externals/coda-oss/modules/c++/io/include/io/PipeStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,8 @@ namespace io
* \brief captures the standard output from a pipe
* and streams it to the specified location
*/
class PipeStream : InputStream
struct PipeStream : InputStream
{

public:

/*!
* Constructor --
* Streams data from a pipe when available
Expand Down Expand Up @@ -95,6 +92,9 @@ class PipeStream : InputStream
virtual sys::SSize_T streamTo(OutputStream& soi,
sys::SSize_T numBytes = IS_END);

PipeStream(const PipeStream&) = delete;
PipeStream& operator=(const PipeStream&) = delete;

protected:
/*!
* \brief returns the requested size in bytes from the stream
Expand All @@ -104,13 +104,7 @@ class PipeStream : InputStream

sys::ExecPipe mExecPipe;
mem::ScopedArray<char> mCharString;
size_t mBufferSize;

private:

//! Noncopyable
PipeStream(const PipeStream& );
const PipeStream& operator=(const PipeStream& );
size_t mBufferSize = DEFAULT_CHUNK_SIZE;
};

}
Expand Down
10 changes: 5 additions & 5 deletions externals/coda-oss/modules/c++/io/include/io/TempFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ namespace io
* RAII object for a temporary file that gets deleted
* upon object destruction
*/
class TempFile
struct TempFile
{
public:
/*!
* Constructor for TempFile object. Provided a directory,
* this will find a random, unused filename, and create a file
Expand All @@ -53,10 +52,11 @@ class TempFile
{
return mPathname;
}

TempFile(const TempFile&) = delete;
TempFile& operator=(const TempFile&) = delete;

private:
// Noncopyable
TempFile(const TempFile& );
const TempFile& operator=(const TempFile& );
const sys::OS mOS;
const std::string mPathname;
};
Expand Down
10 changes: 3 additions & 7 deletions externals/coda-oss/modules/c++/logging/include/logging/Logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,8 @@ namespace logging
* Instances of the Logger class represent a single logging channel.
* A Logger instance can log to several Handlers.
*/
class Logger : public Filterer
struct Logger : public Filterer
{

public:
/*!
* Constructs a Logger with an optional name
* \param name (optional) Name of the logger
Expand Down Expand Up @@ -130,15 +128,13 @@ class Logger : public Filterer
//! Removes all handlers
void reset();

private:
// Noncopyable
// NOTE: It isn't currently safe to copy a logger because mHandlers isn't
// a deep copy and you end up with a double delete (it's not using
// smart pointers :o( ). If we really wanted to support a copy,
// would need to decide if mHandlers should be deeply or shallowly
// copied.
Logger(const Logger& );
Logger& operator=(const Logger& );
Logger(const Logger&) = delete;
Logger& operator=(const Logger&) = delete;

protected:
void handle(const LogRecord* record);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ namespace mem
* \brief This class provides RAII for alignedAlloc() and alignedFree()
*/
template <class T>
class ScopedAlignedArray
struct ScopedAlignedArray
{
public:
typedef T ElementType;

explicit ScopedAlignedArray(
Expand Down Expand Up @@ -91,11 +90,10 @@ namespace mem
return array;
}

private:
// Noncopyable
ScopedAlignedArray(const ScopedAlignedArray& );
const ScopedAlignedArray& operator=(const ScopedAlignedArray& );
ScopedAlignedArray(const ScopedAlignedArray&) = delete;
ScopedAlignedArray& operator=(const ScopedAlignedArray&) = delete;

private:
static
T* allocate(size_t numElements, size_t alignment)
{
Expand Down
11 changes: 4 additions & 7 deletions externals/coda-oss/modules/c++/mem/include/mem/ScopedArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ namespace mem
* It is based on boost::scoped_array.
*/
template <class T>
class ScopedArray
{
public:
struct ScopedArray
{
typedef T ElementType;

explicit ScopedArray(T* array = NULL) :
Expand Down Expand Up @@ -71,10 +70,8 @@ namespace mem
return array;
}

private:
// Noncopyable
ScopedArray(const ScopedArray& );
const ScopedArray& operator=(const ScopedArray& );
ScopedArray(const ScopedArray&) = delete;
ScopedArray& operator=(const ScopedArray&) = delete;

private:
T* mArray;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ class ScratchMemory
return mNumBytesNeeded;
}

private:
ScratchMemory(const ScratchMemory&);
ScratchMemory& operator=(const ScratchMemory&);
ScratchMemory(const ScratchMemory&) = delete;
ScratchMemory& operator=(const ScratchMemory&) = delete;

private:
struct Segment
{
Segment(size_t numBytes, size_t numBuffers, size_t alignment, size_t offset);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ namespace mem
* \brief This class provides safe cleanup for vectors of pointers
*/
template <typename T>
class VectorOfPointers
struct VectorOfPointers
{
public:
VectorOfPointers()
{
}
Expand Down Expand Up @@ -149,19 +148,16 @@ class VectorOfPointers
return mValues.erase(first, last);
}

private:
// Noncopyable
VectorOfPointers(const VectorOfPointers& );
const VectorOfPointers& operator=(const VectorOfPointers& );
VectorOfPointers(const VectorOfPointers&) = delete;
VectorOfPointers& operator=(const VectorOfPointers&) = delete;

private:
std::vector<T*> mValues;
};

template <typename T>
class VectorOfSharedPointers
struct VectorOfSharedPointers
{
public:
VectorOfSharedPointers()
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,38 +20,34 @@
*
*/

#include <memory>

#include <mem/ScopedCopyablePtr.h>

#include "TestCase.h"

namespace
{
struct Foo
struct Foo final
{
Foo()
: val1(0),
val2(0)
{
}

size_t val1;
size_t val2;
size_t val1 = 0;
size_t val2 = 0;
};

struct Bar
struct Bar final
{
Bar()
: val3(0)
{
}

mem::ScopedCopyablePtr<Foo> foo;
size_t val3;
size_t val3 = 0;
};

struct Baz final
{
std::shared_ptr<Foo> pFoo;
size_t val3 = 0;
};

class AssignOnDestruct
struct AssignOnDestruct final
{
public:
AssignOnDestruct(size_t &ref, size_t finalVal) :
mRef(ref),
mFinalVal(finalVal)
Expand Down Expand Up @@ -92,6 +88,25 @@ TEST_CASE(testCopyConstructor)
TEST_ASSERT_EQ(bar1.val3, 30);
}

TEST_CASE(testSharedCopyConstructor)
{
// Initialize the values
Baz b1;
b1.pFoo.reset(new Foo());
b1.pFoo->val1 = 10;
b1.pFoo->val2 = 20;
b1.val3 = 30;

// Show that memory is shared, not copied as with mem::ScopedCopyablePtr
auto b2 = b1;
b2.pFoo->val1 = 40;
b2.pFoo->val2 = 50;
b2.val3 = 60;
TEST_ASSERT_EQ(b1.pFoo->val1, 40);
TEST_ASSERT_EQ(b1.pFoo->val2, 50);
TEST_ASSERT_EQ(b1.val3, 30);
}

TEST_CASE(testAssignmentOperator)
{
// Initialize the values
Expand All @@ -117,6 +132,27 @@ TEST_CASE(testAssignmentOperator)
TEST_ASSERT_EQ(bar1.val3, 30);
}

TEST_CASE(testSharedAssignmentOperator)
{
// Initialize the values
Baz b1;
b1.pFoo.reset(new Foo());
b1.pFoo->val1 = 10;
b1.pFoo->val2 = 20;
b1.val3 = 30;

Baz b2;
b2 = b1;

// Show that memory is shared, not copied as with mem::ScopedCopyablePtr
b2.pFoo->val1 = 40;
b2.pFoo->val2 = 50;
b2.val3 = 60;
TEST_ASSERT_EQ(b1.pFoo->val1, 40);
TEST_ASSERT_EQ(b1.pFoo->val2, 50);
TEST_ASSERT_EQ(b1.val3, 30);
}

TEST_CASE(testDestructor)
{
// When the ScopedCopyablePtr goes out of scope, it should delete the
Expand Down Expand Up @@ -167,7 +203,9 @@ TEST_CASE(testEqualityOperator)
int main(int, char**)
{
TEST_CHECK(testCopyConstructor);
TEST_CHECK(testSharedCopyConstructor);
TEST_CHECK(testAssignmentOperator);
TEST_CHECK(testSharedAssignmentOperator);
TEST_CHECK(testDestructor);
TEST_CHECK(testSyntax);
TEST_CHECK(testEqualityOperator);
Expand Down
Loading

0 comments on commit cf6f419

Please sign in to comment.