include/relpipe/reader/handlers/AttributeMetadata.h
author František Kučera <franta-hg@frantovo.cz>
Sat, 01 Dec 2018 15:35:05 +0100
branchv_0
changeset 30 ef99f5a6c9f6
parent 29 755978b0935c
child 42 3442e0d6caec
permissions -rw-r--r--
license of protocol, reader and writer: GNU LGPLv3+ or GNU GPLv2+
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
29
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 26
diff changeset
     1
/**
30
ef99f5a6c9f6 license of protocol, reader and writer: GNU LGPLv3+ or GNU GPLv2+
František Kučera <franta-hg@frantovo.cz>
parents: 29
diff changeset
     2
 * Relational pipes (library)
29
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 26
diff changeset
     3
 * Copyright © 2018 František Kučera (Frantovo.cz, GlobalCode.info)
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 26
diff changeset
     4
 *
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 26
diff changeset
     5
 * This program is free software: you can redistribute it and/or modify
30
ef99f5a6c9f6 license of protocol, reader and writer: GNU LGPLv3+ or GNU GPLv2+
František Kučera <franta-hg@frantovo.cz>
parents: 29
diff changeset
     6
 * it under the terms of the:
ef99f5a6c9f6 license of protocol, reader and writer: GNU LGPLv3+ or GNU GPLv2+
František Kučera <franta-hg@frantovo.cz>
parents: 29
diff changeset
     7
 *  - GNU Lesser General Public License as published by the Free Software Foundation;
ef99f5a6c9f6 license of protocol, reader and writer: GNU LGPLv3+ or GNU GPLv2+
František Kučera <franta-hg@frantovo.cz>
parents: 29
diff changeset
     8
 *    either version 3 of the License, or (at your option) any later version;
ef99f5a6c9f6 license of protocol, reader and writer: GNU LGPLv3+ or GNU GPLv2+
František Kučera <franta-hg@frantovo.cz>
parents: 29
diff changeset
     9
 *    or (at your option)
ef99f5a6c9f6 license of protocol, reader and writer: GNU LGPLv3+ or GNU GPLv2+
František Kučera <franta-hg@frantovo.cz>
parents: 29
diff changeset
    10
 *  - GNU General Public License as published by the Free Software Foundation;
ef99f5a6c9f6 license of protocol, reader and writer: GNU LGPLv3+ or GNU GPLv2+
František Kučera <franta-hg@frantovo.cz>
parents: 29
diff changeset
    11
 *    either version 2 of the License, or (at your option) any later version.
29
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 26
diff changeset
    12
 *
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 26
diff changeset
    13
 * This program is distributed in the hope that it will be useful,
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 26
diff changeset
    14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 26
diff changeset
    15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 26
diff changeset
    16
 * GNU General Public License for more details.
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 26
diff changeset
    17
 *
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 26
diff changeset
    18
 * You should have received a copy of the GNU General Public License
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 26
diff changeset
    19
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
755978b0935c license: GNU GPLv3+
František Kučera <franta-hg@frantovo.cz>
parents: 26
diff changeset
    20
 */
22
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    21
#pragma once
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    22
26
019edca46769 AttributeMetadata: use smart pointer and avoid memory-leak
František Kučera <franta-hg@frantovo.cz>
parents: 25
diff changeset
    23
#include <memory>
019edca46769 AttributeMetadata: use smart pointer and avoid memory-leak
František Kučera <franta-hg@frantovo.cz>
parents: 25
diff changeset
    24
22
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    25
#include "../TypeId.h"
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    26
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    27
namespace relpipe {
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    28
namespace reader {
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    29
namespace handlers {
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    30
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
    31
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
    32
22
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    33
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
    34
private:
26
019edca46769 AttributeMetadata: use smart pointer and avoid memory-leak
František Kučera <franta-hg@frantovo.cz>
parents: 25
diff changeset
    35
	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
    36
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
    37
26
019edca46769 AttributeMetadata: use smart pointer and avoid memory-leak
František Kučera <franta-hg@frantovo.cz>
parents: 25
diff changeset
    38
	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
    39
	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
    40
	}
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
    41
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
    42
	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
    43
	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
    44
	}
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
    45
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
    46
	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
    47
	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
    48
	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
    49
22
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    50
};
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    51
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    52
}
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    53
}
e81019af67dc use AttributeMetadata instead of std::pair for relation header
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    54
}