include/relpipe/reader/RelationalReader.h
author František Kučera <franta-hg@frantovo.cz>
Sun, 16 Sep 2018 00:42:42 +0200
branchv_0
changeset 26 019edca46769
parent 17 ec750c536705
child 29 755978b0935c
permissions -rw-r--r--
AttributeMetadata: use smart pointer and avoid memory-leak

#pragma once

#include <iostream>

#include "typedefs.h"
#include "TypeId.h"
#include "handlers/RelationalReaderBaseHandler.h"
#include "handlers/RelationalReaderStringHandler.h"
#include "handlers/RelationalReaderValueHandler.h"

namespace relpipe {
namespace reader {

class RelationalReader {
public:

	virtual ~RelationalReader() = default;

	/**
	 * @param typeId numeric type id as defined in Specification
	 * @return string code of given type
	 * @throws RelpipeReaderException on unsupported typeId
	 */
	virtual string_t toTypeCode(const TypeId typeId) = 0;

	virtual void addHandler(handlers::RelationalReaderStringHadler* handler) = 0;

	virtual void addHandler(handlers::RelationalReaderValueHadler* handler) = 0;
	
	virtual void process() = 0;

};

}
}