mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 21:42:39 +00:00
28 lines
529 B
C++
28 lines
529 B
C++
#pragma once
|
|
|
|
#include <IO/ReadBufferFromFileBase.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
/// Delegates all reads to underlying buffer. Doesn't have own memory.
|
|
class ReadBufferFromFileDecorator : public ReadBufferFromFileBase
|
|
{
|
|
public:
|
|
explicit ReadBufferFromFileDecorator(std::unique_ptr<SeekableReadBuffer> impl_);
|
|
|
|
std::string getFileName() const override;
|
|
|
|
off_t getPosition() override;
|
|
|
|
off_t seek(off_t off, int whence) override;
|
|
|
|
bool nextImpl() override;
|
|
|
|
protected:
|
|
std::unique_ptr<SeekableReadBuffer> impl;
|
|
};
|
|
|
|
}
|