Class null_stream_buffer

Synopsis

#include "breeze/stream/null_stream.hpp"

class null_stream_buffer
    :   public std::streambuf

Description

The stream buffer used by null_stream.

Inheritance

Ancestors: std::streambuf

Methods

null_stream_buffer
overflowReturns: A value which doesn't compare equal to Traits::eof() (this signals that the output succeeded).
underflowReturns: Traits::eof() (this signals that the input reached end of file).

Source

Lines 31-56 in breeze/stream/null_stream.hpp.

class null_stream_buffer
    :   public std::streambuf
{
public:
                        null_stream_buffer() ;

protected:
    //!     \return
    //!         A value which doesn't compare equal to \c Traits::eof()
    //!         (this signals that the output succeeded).
    // -----------------------------------------------------------------------
    virtual int_type    overflow( int_type c ) override ;

    //!     \return
    //!         \c Traits::eof() (this signals that the input reached
    //!         end of file).
    // -----------------------------------------------------------------------
    virtual int_type    underflow() override ;

private:
    void                set_put_area_pointers() ;

    //      Having a buffer avoids some virtual function calls.
    // -----------------------------------------------------------------------
    char_type           m_dummy_buffer[ 64 ] ;
} ;