1#ifndef OSMSCOUT_FEATURE_CONSTRUCTION_YEAR_FEATURE_H
2#define OSMSCOUT_FEATURE_CONSTRUCTION_YEAR_FEATURE_H
40 : startYear(startYear),
66 std::string
GetLabel(
const Locale &,
size_t )
const override
68 if (startYear==endYear) {
69 return std::to_string(startYear);
72 return std::to_string(startYear)+
"-"+std::to_string(endYear);
75 void Read(FileScanner& scanner)
override;
76 void Write(FileWriter& writer)
override;
85 TagId tagConstructionYear;
90 static const char*
const NAME;
109 const TagRegistry& tagRegistry,
110 const FeatureInstance& feature,
111 const ObjectOSMRef&
object,
113 FeatureValueBuffer& buffer)
const override;
#define OSMSCOUT_API
Definition CoreImportExport.h:45
size_t GetValueSize() const override
ConstructionYearFeature()
void Initialize(TagRegistry &tagRegistry) override
FeatureValue * AllocateValue(void *buffer) override
static const size_t YEAR_LABEL_INDEX
Definition ConstructionYearFeature.h:96
std::string GetName() const override
size_t GetValueAlignment() const override
static const char *const NAME
Definition ConstructionYearFeature.h:90
void Parse(TagErrorReporter &reporter, const TagRegistry &tagRegistry, const FeatureInstance &feature, const ObjectOSMRef &object, const TagMap &tags, FeatureValueBuffer &buffer) const override
static const char *const YEAR_LABEL
Definition ConstructionYearFeature.h:93
void Write(FileWriter &writer) override
int GetEndYear() const
Definition ConstructionYearFeature.h:61
ConstructionYearFeatureValue & operator=(const FeatureValue &other) override
void SetEndYear(int year)
Definition ConstructionYearFeature.h:56
void SetStartYear(int year)
Definition ConstructionYearFeature.h:46
void Read(FileScanner &scanner) override
ConstructionYearFeatureValue()=default
bool operator==(const FeatureValue &other) const override
ConstructionYearFeatureValue(int startYear, int endYear)
Definition ConstructionYearFeature.h:39
int GetStartYear() const
Definition ConstructionYearFeature.h:51
std::string GetLabel(const Locale &, size_t) const override
Definition ConstructionYearFeature.h:66
Definition TypeFeature.h:41
Definition FeatureReader.h:143
Definition TagErrorReporter.h:33
FeatureValueReader< ConstructionYearFeature, ConstructionYearFeatureValue > ConstructionYearFeatureValueReader
Definition ConstructionYearFeature.h:116
std::unordered_map< TagId, std::string > TagMap
Definition Tag.h:41
uint16_t TagId
Definition Tag.h:39