libosmscout  0.1
osmscout::ObjectOSMRef Class Referencefinal

Reference to an OSM object by its type (Node, Way, Relation) and its OSM object id. More...

#include <ObjectRef.h>

Public Member Functions

const OSMIdGetId () const
 
std::string GetName () const
 
const OSMRefTypeGetType () const
 
const char * GetTypeName () const
 
bool Invalid () const
 
void Invalidate ()
 
bool IsNode () const
 
bool IsRelation () const
 
bool IsWay () const
 
 ObjectOSMRef ()=default
 
 ObjectOSMRef (const ObjectOSMRef &ref)=default
 
 ObjectOSMRef (ObjectOSMRef &&ref)=default
 
 ObjectOSMRef (OSMId id, OSMRefType type)
 
bool operator!= (const ObjectOSMRef &reference) const
 
bool operator< (const ObjectOSMRef &reference) const
 
ObjectOSMRefoperator= (const ObjectOSMRef &other)=default
 
ObjectOSMRefoperator= (ObjectOSMRef &&other)=default
 
bool operator== (const ObjectOSMRef &reference) const
 
void Set (const OSMId &id, const OSMRefType &type)
 
bool Valid () const
 
 ~ObjectOSMRef ()=default
 

Public Attributes

OSMId id =0
 
OSMRefType type =osmRefNone
 

Detailed Description

Reference to an OSM object by its type (Node, Way, Relation) and its OSM object id.

Constructor & Destructor Documentation

◆ ObjectOSMRef() [1/4]

osmscout::ObjectOSMRef::ObjectOSMRef ( )
default

◆ ObjectOSMRef() [2/4]

osmscout::ObjectOSMRef::ObjectOSMRef ( const ObjectOSMRef ref)
default

◆ ObjectOSMRef() [3/4]

osmscout::ObjectOSMRef::ObjectOSMRef ( ObjectOSMRef &&  ref)
default

◆ ObjectOSMRef() [4/4]

osmscout::ObjectOSMRef::ObjectOSMRef ( OSMId  id,
OSMRefType  type 
)
inline

◆ ~ObjectOSMRef()

osmscout::ObjectOSMRef::~ObjectOSMRef ( )
default

Member Function Documentation

◆ GetId()

const OSMId& osmscout::ObjectOSMRef::GetId ( ) const
inline

◆ GetName()

std::string osmscout::ObjectOSMRef::GetName ( ) const

References GetTypeName().

◆ GetType()

const OSMRefType& osmscout::ObjectOSMRef::GetType ( ) const
inline

◆ GetTypeName()

const char * osmscout::ObjectOSMRef::GetTypeName ( ) const

◆ Invalid()

bool osmscout::ObjectOSMRef::Invalid ( ) const
inline

References osmscout::osmRefNone.

◆ Invalidate()

void osmscout::ObjectOSMRef::Invalidate ( )
inline

References osmscout::osmRefNone.

◆ IsNode()

bool osmscout::ObjectOSMRef::IsNode ( ) const
inline

References osmscout::osmRefNode.

◆ IsRelation()

bool osmscout::ObjectOSMRef::IsRelation ( ) const
inline

◆ IsWay()

bool osmscout::ObjectOSMRef::IsWay ( ) const
inline

References osmscout::osmRefWay.

◆ operator!=()

bool osmscout::ObjectOSMRef::operator!= ( const ObjectOSMRef reference) const
inline

References id, and type.

◆ operator<()

bool osmscout::ObjectOSMRef::operator< ( const ObjectOSMRef reference) const
inline

References id, and type.

◆ operator=() [1/2]

ObjectOSMRef& osmscout::ObjectOSMRef::operator= ( const ObjectOSMRef other)
default

◆ operator=() [2/2]

ObjectOSMRef& osmscout::ObjectOSMRef::operator= ( ObjectOSMRef &&  other)
default

◆ operator==()

bool osmscout::ObjectOSMRef::operator== ( const ObjectOSMRef reference) const
inline

References id, and type.

◆ Set()

void osmscout::ObjectOSMRef::Set ( const OSMId id,
const OSMRefType type 
)
inline

◆ Valid()

bool osmscout::ObjectOSMRef::Valid ( ) const
inline

References osmscout::osmRefNone.

Member Data Documentation

◆ id

OSMId osmscout::ObjectOSMRef::id =0

Referenced by operator!=(), operator<(), and operator==().

◆ type

OSMRefType osmscout::ObjectOSMRef::type =osmRefNone

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