libosmscout  0.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules
osmscout::DescriptionService Class Referencefinal

Service,to get a structured description of an object on the map (Area, Way or Node). More...

#include <DescriptionService.h>

Public Member Functions

 DescriptionService ()
 
ObjectDescription GetDescription (const Area &area) const
 
ObjectDescription GetDescription (const FeatureValueBuffer &buffer) const
 
ObjectDescription GetDescription (const Node &node) const
 
ObjectDescription GetDescription (const Way &way) const
 

Static Public Attributes

static const std::string LABEL_KEY_ID_ID = "Id"
 
static const std::string LABEL_KEY_ID_KIND = "Kind"
 
static const std::string SECTION_NAME_ID = "Id"
 

Detailed Description

Service,to get a structured description of an object on the map (Area, Way or Node).

Explicitly designed, to offer information within map popup dialogs or similar.

Information is return as an ObjectDescription object.

The ObjectDescription is more or less a list of DescriptionEntry instances.

Each DescriptionEntry holds the following information:

  • A Section name
  • An optional subsection name
  • An optional index, in case where a subsection has multiple instances
  • a name of a key
  • a value (always a string)

Section, subsection and key names should be defined, that they represent english names and could be directly used in the UI. However, they could also be used as key into a localisation service.

Information is gathered by a list of processors, inheriting the FeatureToDescriptionProcessor interface.

The processors extract information mainly from the FeatureValueBuffer instance of the object.

Constructor & Destructor Documentation

◆ DescriptionService()

osmscout::DescriptionService::DescriptionService ( )

Member Function Documentation

◆ GetDescription() [1/4]

◆ GetDescription() [2/4]

ObjectDescription osmscout::DescriptionService::GetDescription ( const FeatureValueBuffer buffer) const

◆ GetDescription() [3/4]

◆ GetDescription() [4/4]

Member Data Documentation

◆ LABEL_KEY_ID_ID

const std::string osmscout::DescriptionService::LABEL_KEY_ID_ID = "Id"
static

Referenced by GetDescription().

◆ LABEL_KEY_ID_KIND

const std::string osmscout::DescriptionService::LABEL_KEY_ID_KIND = "Kind"
static

Referenced by GetDescription().

◆ SECTION_NAME_ID

const std::string osmscout::DescriptionService::SECTION_NAME_ID = "Id"
static

Referenced by GetDescription().


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