libosmscout  0.1
osmscout::PostalCodeFeature Class Reference

#include <PostalCodeFeature.h>

+ Inheritance diagram for osmscout::PostalCodeFeature:

Public Member Functions

FeatureValueAllocateValue (void *buffer) override
 
std::string GetName () const override
 Returns the name of the feature. More...
 
size_t GetValueAlignment () const override
 If feature have value object, this method returns alignment requirements of the value type (alignof( type-id )). More...
 
size_t GetValueSize () const override
 A feature, if set for an object, can hold a value. More...
 
void Initialize (TagRegistry &tagRegistry) override
 Does further initialization based on the current TagRegistry. More...
 
void Parse (TagErrorReporter &reporter, const TagRegistry &tagRegistry, const FeatureInstance &feature, const ObjectOSMRef &object, const TagMap &tags, FeatureValueBuffer &buffer) const override
 
 PostalCodeFeature ()
 
- Public Member Functions inherited from osmscout::Feature
void AddDescription (const std::string &languageCode, const std::string &description)
 Add a description of the feature for the given language code. More...
 
 Feature ()=default
 
std::string GetDescription (const std::string &languageCode) const
 Returns the description for the given language code. More...
 
const std::unordered_map< std::string, std::string > & GetDescriptions () const
 
virtual size_t GetFeatureBitCount () const
 This method returns the number of additional feature bits reserved. More...
 
bool GetFlagIndex (const std::string &flagName, size_t &index) const
 Returns the index of the feature flag with the given name. More...
 
bool GetLabelIndex (const std::string &labelName, size_t &index) const
 Returns the index of the label with the given name. More...
 
virtual bool HasFlags () const
 Returns 'true' if the feature provides flags. More...
 
virtual bool HasLabel () const
 Returns 'true' if the feature provides labels. More...
 
virtual bool HasValue () const
 Returns 'true' if the feature has an value object. More...
 
virtual ~Feature ()=default
 

Static Public Attributes

static const char *const NAME = "PostalCode"
 Name of this feature. More...
 
static const char *const NAME_LABEL = "name"
 Name of the "name" label. More...
 
static const size_t NAME_LABEL_INDEX = 0
 Index of the 'name' label. More...
 

Additional Inherited Members

- Protected Member Functions inherited from osmscout::Feature
void RegisterFlag (size_t index, const std::string &flagName)
 
void RegisterLabel (size_t index, const std::string &labelName)
 

Constructor & Destructor Documentation

◆ PostalCodeFeature()

osmscout::PostalCodeFeature::PostalCodeFeature ( )

Member Function Documentation

◆ AllocateValue()

FeatureValue * osmscout::PostalCodeFeature::AllocateValue ( void *  buffer)
overridevirtual

Reimplemented from osmscout::Feature.

◆ GetName()

std::string osmscout::PostalCodeFeature::GetName ( ) const
overridevirtual

Returns the name of the feature.

Implements osmscout::Feature.

References NAME.

◆ GetValueAlignment()

size_t osmscout::PostalCodeFeature::GetValueAlignment ( ) const
overridevirtual

If feature have value object, this method returns alignment requirements of the value type (alignof( type-id )).

Reimplemented from osmscout::Feature.

◆ GetValueSize()

size_t osmscout::PostalCodeFeature::GetValueSize ( ) const
overridevirtual

A feature, if set for an object, can hold a value.

If there is no value object, this method returns 0, else it returns the C++ size of the value object.

Reimplemented from osmscout::Feature.

◆ Initialize()

void osmscout::PostalCodeFeature::Initialize ( TagRegistry tagRegistry)
overridevirtual

Does further initialization based on the current TagRegistry.

For example it registers Tags (and stores their TagId) for further processing.

Implements osmscout::Feature.

References osmscout::TagRegistry::RegisterTag().

◆ Parse()

void osmscout::PostalCodeFeature::Parse ( TagErrorReporter reporter,
const TagRegistry tagRegistry,
const FeatureInstance feature,
const ObjectOSMRef object,
const TagMap tags,
FeatureValueBuffer buffer 
) const
overridevirtual

Member Data Documentation

◆ NAME

const char *const osmscout::PostalCodeFeature::NAME = "PostalCode"
static

Name of this feature.

Referenced by GetName(), and osmscout::TypeConfig::RegisterType().

◆ NAME_LABEL

const char *const osmscout::PostalCodeFeature::NAME_LABEL = "name"
static

Name of the "name" label.

Referenced by PostalCodeFeature().

◆ NAME_LABEL_INDEX

const size_t osmscout::PostalCodeFeature::NAME_LABEL_INDEX = 0
static

Index of the 'name' label.

Referenced by PostalCodeFeature().


The documentation for this class was generated from the following files: