ClickHouse/dbms/include/DB/DataStreams/FormatFactory.h
2011-10-24 12:10:59 +00:00

23 lines
540 B
C++

#pragma once
#include <DB/DataStreams/IBlockInputStream.h>
#include <DB/DataStreams/IBlockOutputStream.h>
namespace DB
{
/** Позволяет создать IBlockInputStream или IBlockOutputStream по названию формата.
*/
class FormatFactory
{
public:
BlockInputStreamPtr getInput(const String & name, ReadBuffer & buf,
Block & sample, size_t max_block_size, DataTypeFactory & data_type_factory) const;
BlockOutputStreamPtr getOutput(const String & name, WriteBuffer & buf,
Block & sample) const;
};
}