Search for usage in LXR

#include <datatypes.h>

Public Member Functions

 DataSet (const DataSet &)=delete
 DataSet (DataSet &&other)
void addNode (Node &&node)
void addRelation (Relation &&rel)
void addWay (Way &&way)
Role makeRole (const char *roleName, StringMemory memOpt=StringMemory::Transient)
TagKey makeTagKey (const char *keyName, StringMemory keyMemOpt=StringMemory::Transient)
Id nextInternalId () const
const Nodenode (Id id) const
DataSetoperator= (const DataSet &)=delete
DataSetoperator= (DataSet &&)
const Relationrelation (Id id) const
Role role (const char *roleName) const
TagKey tagKey (const char *keyName) const
const Wayway (Id id) const
Wayway (Id id)

Public Attributes

std::vector< Nodenodes
std::vector< Relationrelations
std::vector< Wayways

Detailed Description

A set of nodes, ways and relations.

Definition at line 283 of file datatypes.h.

Member Function Documentation

Role DataSet::makeRole ( const char *  roleName,
OSM::StringMemory  memOpt = StringMemory::Transient 

Creates a role name key.

See also

Definition at line 22 of file datatypes.cpp.

TagKey DataSet::makeTagKey ( const char *  keyName,
OSM::StringMemory  keyMemOpt = StringMemory::Transient 

Create a tag key for the given tag name.

If none exist yet a new one is created. Use this for creating tags, not for lookup, prefer tagKey() for that.

keyMemOptspecifies whether keyName is persisent for the lifetime of this instance and thus can be used without requiring a copy. If the memory is transient the string is copied if needed, and released in the DataSet destructor.

Definition at line 17 of file datatypes.cpp.

OSM::Id DataSet::nextInternalId ( ) const

Create a unique id for internal use (ie.

one that will not clash with official OSM ids).

Definition at line 103 of file datatypes.cpp.

const Node * DataSet::node ( Id  id) const

Find a node by its id.

nullptr if the node doesn't exist.

Definition at line 37 of file datatypes.cpp.

const Relation * DataSet::relation ( Id  id) const

Find a relation by its id.

nullptr if the relation doesn't exist.

Definition at line 64 of file datatypes.cpp.

Role DataSet::role ( const char *  roleName) const

Looks up a role name key.

See also

Definition at line 32 of file datatypes.cpp.

TagKey DataSet::tagKey ( const char *  keyName) const

Look up a tag key for the given tag name, if it exists.

If no key exists, an empty/invalid/null key is returned. Use this for tag lookup, not for creating/adding tags.

Definition at line 27 of file datatypes.cpp.

const Way * DataSet::way ( Id  id) const

Find a way by its id.

nullptr if the way doesn't exist.

Definition at line 46 of file datatypes.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Oct 23 2021 23:03:46 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.