mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 03:12:43 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
32 lines
619 B
C++
32 lines
619 B
C++
#pragma once
|
|
|
|
#include <iostream>
|
|
|
|
#include <IO/WriteBuffer.h>
|
|
#include <IO/BufferWithOwnMemory.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class WriteBufferFromOStream : public BufferWithOwnMemory<WriteBuffer>
|
|
{
|
|
protected:
|
|
std::ostream * ostr{};
|
|
|
|
void nextImpl() override;
|
|
|
|
WriteBufferFromOStream(size_t size = DBMS_DEFAULT_BUFFER_SIZE, char * existing_memory = nullptr, size_t alignment = 0);
|
|
|
|
public:
|
|
WriteBufferFromOStream(
|
|
std::ostream & ostr_,
|
|
size_t size = DBMS_DEFAULT_BUFFER_SIZE,
|
|
char * existing_memory = nullptr,
|
|
size_t alignment = 0);
|
|
|
|
~WriteBufferFromOStream() override;
|
|
};
|
|
|
|
}
|