All Downloads are FREE. Search and download functionalities are using the official Maven repository.

z3-z3-4.13.0.src.util.stream_buffer.h Maven / Gradle / Ivy

The newest version!
/*++
Copyright (c) 2006 Microsoft Corporation

Module Name:

    stream_buffer.h

Abstract:

    Simple stream buffer interface.
    In the future we should be able to read different kinds of stream (e.g., compressed files used
    in the SAT competitions).

Author:

    Leonardo de Moura (leonardo) 2006-10-02.

Revision History:

--*/
#pragma once

#include

class stream_buffer {
    std::istream & m_stream;
    int            m_val;
public:
    
    stream_buffer(std::istream & s):
        m_stream(s) {
        m_val = m_stream.get();
    }

    int  operator *() const { 
        return m_val;
    }

    void operator ++() { 
        m_val = m_stream.get();
    }
};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy