include/relpipe/reader/handlers/AttributeMetadata.h
author František Kučera <franta-hg@frantovo.cz>
Sun, 16 Sep 2018 00:42:42 +0200
branchv_0
changeset 26 019edca46769
parent 25 fc0d05b72214
child 29 755978b0935c
permissions -rw-r--r--
AttributeMetadata: use smart pointer and avoid memory-leak
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
22
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     1
#pragma once
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     2
26
019edca46769 AttributeMetadata: use smart pointer and avoid memory-leak
František Kučera <franta-hg@frantovo.cz>
parents: 25
diff changeset
     3
#include <memory>
019edca46769 AttributeMetadata: use smart pointer and avoid memory-leak
František Kučera <franta-hg@frantovo.cz>
parents: 25
diff changeset
     4
22
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     5
#include "../TypeId.h"
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     6
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     7
namespace relpipe {
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     8
namespace reader {
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
namespace handlers {
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    10
24
6f7acc3b274c AttributeMetadata: pImpl / d-pointer version but with memory-leak and unwanted empty constructor
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
    11
class AttributeMetadataPrivate;
6f7acc3b274c AttributeMetadata: pImpl / d-pointer version but with memory-leak and unwanted empty constructor
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
    12
22
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    13
class AttributeMetadata {
24
6f7acc3b274c AttributeMetadata: pImpl / d-pointer version but with memory-leak and unwanted empty constructor
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
    14
private:
26
019edca46769 AttributeMetadata: use smart pointer and avoid memory-leak
František Kučera <franta-hg@frantovo.cz>
parents: 25
diff changeset
    15
	std::shared_ptr<AttributeMetadataPrivate> impl;
22
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    16
public:
24
6f7acc3b274c AttributeMetadata: pImpl / d-pointer version but with memory-leak and unwanted empty constructor
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
    17
26
019edca46769 AttributeMetadata: use smart pointer and avoid memory-leak
František Kučera <franta-hg@frantovo.cz>
parents: 25
diff changeset
    18
	AttributeMetadata(std::shared_ptr<AttributeMetadataPrivate> impl) :
24
6f7acc3b274c AttributeMetadata: pImpl / d-pointer version but with memory-leak and unwanted empty constructor
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
    19
	impl(impl) {
6f7acc3b274c AttributeMetadata: pImpl / d-pointer version but with memory-leak and unwanted empty constructor
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
    20
	}
6f7acc3b274c AttributeMetadata: pImpl / d-pointer version but with memory-leak and unwanted empty constructor
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
    21
6f7acc3b274c AttributeMetadata: pImpl / d-pointer version but with memory-leak and unwanted empty constructor
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
    22
	AttributeMetadata(const AttributeMetadata& other) :
6f7acc3b274c AttributeMetadata: pImpl / d-pointer version but with memory-leak and unwanted empty constructor
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
    23
	impl(other.impl) {
6f7acc3b274c AttributeMetadata: pImpl / d-pointer version but with memory-leak and unwanted empty constructor
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
    24
	}
6f7acc3b274c AttributeMetadata: pImpl / d-pointer version but with memory-leak and unwanted empty constructor
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
    25
6f7acc3b274c AttributeMetadata: pImpl / d-pointer version but with memory-leak and unwanted empty constructor
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
    26
	string_t getAttributeName() const;
6f7acc3b274c AttributeMetadata: pImpl / d-pointer version but with memory-leak and unwanted empty constructor
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
    27
	relpipe::reader::TypeId getTypeId() const;
6f7acc3b274c AttributeMetadata: pImpl / d-pointer version but with memory-leak and unwanted empty constructor
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
    28
	string_t getTypeName() const;
6f7acc3b274c AttributeMetadata: pImpl / d-pointer version but with memory-leak and unwanted empty constructor
František Kučera <franta-hg@frantovo.cz>
parents: 22
diff changeset
    29
22
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    30
};
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    31
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    32
}
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    33
}
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    34
}