Class null_stream

Synopsis

#include "breeze/stream/null_stream.hpp"

class null_stream
    :   private stream_buffer_wrapper< null_stream_buffer >,
        public  std::istream,
        public  std::ostream

Description

A stream that discards any output and provides no input.

On output, the stream never signals failbit. On input, it always signals EOF. The behavior is similar to a file stream opened on /dev/null under Unix, but this is portable and doesn't make system calls.

Inheritance

Ancestors: std::istream, stream_buffer_wrapper, std::ostream

Methods

null_stream overloadDeleted copy constructor.
~null_stream
operator=Deleted copy assignment operator.
rdbuf

Source

Lines 68-93 in breeze/stream/null_stream.hpp.

class null_stream
    :   private stream_buffer_wrapper< null_stream_buffer >,
        public  std::istream,
        public  std::ostream
{
private:
    typedef null_stream_buffer
                        buffer_type ;
    typedef stream_buffer_wrapper< buffer_type >
                        buffer_wrapper_type ;

public:
    //!     Deleted copy constructor.
    // -----------------------------------------------------------------------
                        null_stream( null_stream const & ) = delete ;

    //!     Deleted copy assignment operator.
    // -----------------------------------------------------------------------
    null_stream &       operator =(  null_stream const & ) = delete ;

                        null_stream() ;
    virtual             ~null_stream() noexcept override = default ;

    null_stream_buffer *
                        rdbuf() const ;
} ;