Add fault reporting I/O stream core
Closed this issue · 0 comments
apcountryman commented
Add fault reporting I/O stream core.
-
libraries/microlibrary/ANY/ANY/include/microlibrary/stream.h
/libraries/microlibrary/ANY/ANY/source/microlibrary/stream.cc
(update)- Add
::microlibrary::Fault_Reporting_Stream
class
- Add
-
tests/automated/microlibrary/fault_reporting_stream/main.cc
(add) -
tests/automated/microlibrary/fault_reporting_stream/CMakeLists.txt
(add) -
tests/automated/microlibrary/CMakeLists.txt
(update) - The
::microlibrary::Fault_Reporting_Stream
class should support the following operations:-
constexpr Fault_Reporting_Stream() noexcept;
(protected) -
constexpr Fault_Reporting_Stream( Fault_Reporting_Stream && source ) noexcept;
(protected) -
constexpr Fault_Reporting_Stream( Fault_Reporting_Stream const & original ) noexcept;
(protected) -
~Fault_Reporting_Stream() noexcept;
(protected) -
constexpr auto operator=( Fault_Reporting_Stream && expression ) noexcept -> Fault_Reporting_Stream &;
(protected) -
constexpr auto operator=( Fault_Reporting_Stream const & expression ) noexcept -> Fault_Reporting_Stream &;
(protected) -
constexpr auto is_nominal() const noexcept -> bool;
: Check if the stream is nominal (no errors present and end-of-file has not been reached) -
constexpr auto error_present() const noexcept -> bool;
: Check if errors are present (I/O error and/or fatal error (fault) present) -
constexpr auto end_of_file_reached() const noexcept -> bool;
: Check if end-of-file has been reached -
constexpr void report_end_of_file_reached() noexcept;
(protected): Report that end-of-file has been reached -
constexpr void clear_end_of_file_reached_report() noexcept;
(protected): Clear end-of-file reached report -
constexpr auto io_error_present() const noexcept -> bool;
: Check if an I/O error is present -
constexpr void report_io_error() noexcept;
: Report an I/O error -
constexpr void clear_io_error() noexcept;
: Clear an I/O error report -
constexpr auto fatal_error_present() const noexcept -> bool;
: Check if a fatal error (fault) is present -
constexpr void report_fatal_error() noexcept;
(protected): Report a fatal error (fault) -
constexpr void clear_fatal_error() noexcept;
(protected): Clear a fatal error (fault) report -
constexpr auto driver_is_set() const noexcept -> bool;
: Check if the stream is associated with a stream I/O driver -
constexpr auto driver() noexcept -> Fault_Reporting_Stream_IO_Driver *;
(protected): Get the stream I/O driver associated with the stream -
constexpr void set_driver( Fault_Reporting_Stream_IO_Driver * driver ) noexcept;
(protected): Associate the stream with a stream I/O driver
-