apcountryman/microlibrary

Add binary integer output format specifier

Closed this issue · 0 comments

Add binary integer output format specifier.

  • libraries/microlibrary/ANY/ANY/include/microlibrary/format.h/libraries/microlibrary/ANY/ANY/source/microlibrary/format.cc (update)
    • Add ::microlibrary::Format::Bin template class
    • Add ::microlibrary::Output_Formatter<Format::Bin<Integer>> partial template class specialization
  • docs/io.md (update)
  • tests/automated/microlibrary/format/CMakeLusts.txt (update)
  • tests/automated/microlibrary/format/bin/CMakeLists.txt (add)
  • tests/automated/microlibrary/format/bin/main.cc (add)
  • The ::microlibrary::Format::Bin class should have the following template parameters:
    • typename Integer: The type of integer to format
  • The ::microlibrary::Output_Formatter<Format::Bin<Integer>> partial template class specialization should have the following template parameters:
    • typename Integer: The type of integer to print
  • The ::microlibrary::Format::Bin class should support the following operations:
    • constexpr Bin( Integer value ) noexcept;
    • constexpr Bin( Bin && source ) noexcept;
    • constexpr Bin( Bin const & original ) noexcept;
    • ~Bin() noexcept;
    • constexpr auto operator=( Bin && expression ) noexcept -> Bin &;
    • constexpr auto operator=( Bin const & expression ) noexcept -> Bin &;
    • constexpr operator Integer() cons noexcept;: Get the integer to be formatted
  • The ::microlibrary::Output_Formatter<Format::Bin<Integer>> partial template class specialization should support the following operations:
    • constexpr Output_Formatter( Integer value ) 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, Integer integer ) const noexcept -> std::size_t;: Write a formatted integer to a stream
    • auto print( Fault_Reporting_Output_Stream & stream, Integer integer ) const noexcept -> std::size_t;: Write a formatted integer to a stream