|
libosmscout 0.1
|
Generates a label based on a given feature name and label name. More...
#include <LabelProvider.h>
Inheritance diagram for osmscout::DynamicFeatureLabelReader:Public Member Functions | |
| DynamicFeatureLabelReader (const TypeConfig &typeConfig, const std::string &featureName, const std::string &labelName) | |
| Assigns a label to the reader. | |
| std::string | GetLabel (const MapParameter ¶meter, const FeatureValueBuffer &buffer) const override |
| Returns the label based on the given feature value buffer. | |
| std::string | GetName () const override |
| Returns the name of the label provider as it must get stated in the style sheet. | |
Public Member Functions inherited from osmscout::LabelProvider | |
| virtual | ~LabelProvider ()=default |
Generates a label based on a given feature name and label name.
Example: Give me the label "inMeter" of the Ele-Feature.
| osmscout::DynamicFeatureLabelReader::DynamicFeatureLabelReader | ( | const TypeConfig & | typeConfig, |
| const std::string & | featureName, | ||
| const std::string & | labelName | ||
| ) |
Assigns a label to the reader.
| typeConfig | Reference to the current type configuration |
| featureName | Name of the feature which must be valid and must support labels |
| labelName | The name of the label to use (a feature might support multiple labels) |
References osmscout::TypeConfig::GetFeature(), osmscout::TypeConfig::GetTypeCount(), and osmscout::TypeConfig::GetTypes().
|
overridevirtual |
Returns the label based on the given feature value buffer.
| buffer | The FeatureValueBuffer instance |
Implements osmscout::LabelProvider.
References osmscout::FeatureValue::GetLabel(), osmscout::MapParameter::GetLocale(), osmscout::FeatureValueBuffer::GetType(), osmscout::FeatureValueBuffer::GetValue(), and osmscout::FeatureValueBuffer::HasFeature().
|
inlineoverridevirtual |
Returns the name of the label provider as it must get stated in the style sheet.
Implements osmscout::LabelProvider.