1#ifndef OSMSCOUT_FEATURE_FROM_TO_FEATURE_H
2#define OSMSCOUT_FEATURE_FROM_TO_FEATURE_H
41 const std::string_view& to)
53 void SetFrom(
const std::string_view& from)
55 FromToFeatureValue::from=from;
58 const std::string&
GetTo()
const
63 void SetTo(
const std::string_view& to)
65 FromToFeatureValue::to=to;
68 std::string
GetLabel(
const Locale &,
size_t )
const override
70 if (!from.empty() && ! to.empty()) {
71 return from +
" => " + to;
85 void Read(FileScanner& scanner)
override;
86 void Write(FileWriter& writer)
override;
119 const TagRegistry& tagRegistry,
120 const FeatureInstance& feature,
121 const ObjectOSMRef&
object,
123 FeatureValueBuffer& buffer)
const override;
#define OSMSCOUT_API
Definition CoreImportExport.h:45
Definition TypeFeature.h:41
Definition FeatureReader.h:143
static const char *const NAME
Definition FromToFeature.h:100
static const char *const NUMBER_LABEL
Definition FromToFeature.h:103
size_t GetValueAlignment() const override
void Initialize(TagRegistry &tagRegistry) override
void Parse(TagErrorReporter &reporter, const TagRegistry &tagRegistry, const FeatureInstance &feature, const ObjectOSMRef &object, const TagMap &tags, FeatureValueBuffer &buffer) const override
static const size_t NUMBER_LABEL_INDEX
Definition FromToFeature.h:106
FeatureValue * AllocateValue(void *buffer) override
size_t GetValueSize() const override
std::string GetName() const override
bool operator==(const FeatureValue &other) const override
FromToFeatureValue()=default
FromToFeatureValue(const std::string_view &from, const std::string_view &to)
Definition FromToFeature.h:40
FromToFeatureValue & operator=(const FeatureValue &other) override
FromToFeatureValue(const FromToFeatureValue &featureValue)=default
const std::string & GetTo() const
Definition FromToFeature.h:58
void SetFrom(const std::string_view &from)
Definition FromToFeature.h:53
const std::string & GetFrom() const
Definition FromToFeature.h:48
std::string GetLabel(const Locale &, size_t) const override
Definition FromToFeature.h:68
void Write(FileWriter &writer) override
void SetTo(const std::string_view &to)
Definition FromToFeature.h:63
void Read(FileScanner &scanner) override
Definition TagErrorReporter.h:33
std::unordered_map< TagId, std::string > TagMap
Definition Tag.h:41
FeatureValueReader< FromToFeature, FromToFeatureValue > FromToFeatureValueReader
Definition FromToFeature.h:126
uint16_t TagId
Definition Tag.h:39