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

28 lines
723 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,
Block & sample, size_t max_block_size, DataTypeFactory & data_type_factory) const;
BlockOutputStreamPtr getOutput(const String & name, WriteBuffer & buf,
Block & sample) const;
};
2012-03-11 08:52:56 +00:00
typedef SharedPtr<FormatFactory> FormatFactoryPtr;
2011-10-24 12:10:59 +00:00
}