src/AttributeMetadataPrivate.h
author František Kučera <franta-hg@frantovo.cz>
Sat, 15 Sep 2018 22:52:15 +0200
branchv_0
changeset 24 6f7acc3b274c
child 26 019edca46769
permissions -rw-r--r--
AttributeMetadata: pImpl / d-pointer version but with memory-leak and unwanted empty constructor

#pragma once

#include "../include/relpipe/reader/typedefs.h"
#include "../include/relpipe/reader/TypeId.h"
#include "../include/relpipe/reader/handlers/AttributeMetadata.h"

namespace relpipe {
namespace reader {
namespace handlers {

class AttributeMetadataPrivate {
public:
	string_t attributeName;
	relpipe::reader::TypeId typeId;
	string_t typeName;
};

AttributeMetadata::~AttributeMetadata() {
	// delete impl;
	std::cout << "FIXME: delete impl in ~AttributeMetadata() but no double-delete / smart pointer" << std::endl;
}

string_t AttributeMetadata::getAttributeName() const {
	return impl->attributeName;
}

relpipe::reader::TypeId AttributeMetadata::getTypeId() const {
	return impl->typeId;
}

string_t AttributeMetadata::getTypeName() const {
	return impl->typeName;
}

}
}
}