ClickHouse/dbms/include/DB/DataStreams/FormatFactory.h

26 lines
677 B
C
Raw Normal View History

2011-10-24 12:10:59 +00:00
#pragma once
2011-10-31 06:37:12 +00:00
#include <DB/DataTypes/DataTypeFactory.h>
2011-10-24 12:10:59 +00:00
#include <DB/DataStreams/IBlockInputStream.h>
#include <DB/DataStreams/IBlockOutputStream.h>
namespace DB
{
/** Позволяет создать IBlockInputStream или IBlockOutputStream по названию формата.
2011-10-30 05:19:41 +00:00
* Замечание: формат и сжатие - независимые вещи.
2011-10-24 12:10:59 +00:00
*/
class FormatFactory
{
public:
BlockInputStreamPtr getInput(const String & name, ReadBuffer & buf,
2012-08-02 17:33:31 +00:00
Block & sample, size_t max_block_size, const DataTypeFactory & data_type_factory) const;
2011-10-24 12:10:59 +00:00
BlockOutputStreamPtr getOutput(const String & name, WriteBuffer & buf,
2013-05-22 14:57:43 +00:00
Block & sample) const;
2011-10-24 12:10:59 +00:00
};
}