mirror of
https://github.com/Z3Prover/z3
synced 2025-05-09 00:35:47 +00:00
Z3 sources
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
3f9edad676
commit
e9eab22e5c
1186 changed files with 381859 additions and 0 deletions
46
lib/stream_buffer.h
Normal file
46
lib/stream_buffer.h
Normal file
|
@ -0,0 +1,46 @@
|
|||
/*++
|
||||
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:
|
||||
|
||||
--*/
|
||||
#ifndef _STREAM_BUFFER_H_
|
||||
#define _STREAM_BUFFER_H_
|
||||
|
||||
#include<iostream>
|
||||
|
||||
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();
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _STREAM_BUFFER_H_ */
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue