GeoDesk for C++
Fast and storage-efficient spatial database engine for OpenStreetMap features
Loading...
Searching...
No Matches
geodesk::Tag Class Reference

A key/value pair that describes an attribute of a Feature. More...

#include <Tag.h>

Public Member Functions

 Tag (StringValue k, TagValue v)
 
bool operator== (const Tag &other) const
 Checks if both Tag objects have the same key and value.
 
bool operator!= (const Tag &other) const
 
StringValue key () const noexcept
 The Tag's key.
 
TagValue value () const noexcept
 The Tag's value.
 

Detailed Description

A key/value pair that describes an attribute of a Feature.

Converts implicitly to std::pair<K,V>.

Warning: A Tag object is a lightweight wrapper around a pointer to a Feature's tag data, contained in a FeatureStore. It becomes invalid once that FeatureStore is closed. To use a Feature's keys and values beyond the lifetime of the FeatureStore, convert them to std::string, which allocates copies.

See also
Tags, TagValue

Constructor & Destructor Documentation

◆ Tag()

geodesk::Tag::Tag ( StringValue k,
TagValue v )
inline

Member Function Documentation

◆ key()

StringValue geodesk::Tag::key ( ) const
inlinenoexcept

The Tag's key.

◆ operator!=()

bool geodesk::Tag::operator!= ( const Tag & other) const
inline

◆ operator==()

bool geodesk::Tag::operator== ( const Tag & other) const
inline

Checks if both Tag objects have the same key and value.

◆ value()

TagValue geodesk::Tag::value ( ) const
inlinenoexcept

The Tag's value.


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