apcountryman/microlibrary

Add null-terminated ROM string output formatter

Closed this issue · 0 comments

Add null-terminated ROM string output formatter.

  • libraries/microlibrary/ANY/ANY/include/microlibrary/stream.h/libraries/microlibrary/ANY/ANY/source/microlibrary/stream.cc (update)
    • Add ::microlibrary::Output_Formatter<ROM::String> class template specialization
      • This class template specialization should only be defined if MICROLIBRARY_ROM_STRING_IS_HIL_DEFINED is true
  • The ::microlibrary::Output_Formatter<ROM::String> class should support the following operations:
    • constexpr Output_Formatter() noexcept;
    • constexpr Output_Formatter( Output_Formatter && source ) noexcept;
    • constexpr Output_Formatter( Output_Formatter const & original ) noexcept;
    • ~Output_Formatter() noexcept;
    • constexpr auto operator=( Output_Formatter && expression ) noexcept -> Output_Formatter &;
    • constexpr auto operator=( Output_Formatter const & expression ) noexcept -> Output_Formatter &;
    • auto print( Output_Stream & stream, ROM::String string ) const noexcept -> std::size_t;: Write the formatted ROM string to a stream
    • auto print( Fault_Reporting_Output_Stream & stream, ROM::String string ) const noexcept -> Result<std::size_t>;: Write the formatted ROM string to a stream