Add a new class Fw::ExternalString. This class is derived from Fw::StringBase. It uses an externally supplied character buffer to implement a string. I added tests for Fw::ExternalString to the Fw/Types unit tests.
Refactor the string implementations in the framework to reduce code duplication.
Rationale:
Fw::ExternalString is needed to improve the C++ code generation strategy for strings. See fprime-community/fpp#406.
The refactored implementation eliminates a significant amount of copy-paste code when creating a new concrete string type. The new version should be functionally identical to the old version.
Notes:
Review and merge #2677 first. A lot of changes in this PR are formatting changes that will go away once #2677 is merged.
Static analysis is telling us that single-argument constructors should be marked explicit. When I tried this, I saw compilation errors in the generated C++. I think this issue will have to be addressed separately.
This PR does the following:
Fw::ExternalString
. This class is derived fromFw::StringBase
. It uses an externally supplied character buffer to implement a string. I added tests forFw::ExternalString
to theFw/Types
unit tests.Rationale:
Fw::ExternalString
is needed to improve the C++ code generation strategy for strings. See fprime-community/fpp#406.Notes:
explicit
. When I tried this, I saw compilation errors in the generated C++. I think this issue will have to be addressed separately.