libosmscout 0.1
Loading...
Searching...
No Matches
osmscout::LabelPriority Struct Reference

#include <LabelLayouter.h>

Public Member Functions

 LabelPriority ()=default
 
 LabelPriority (size_t priority, bool basemap, const ObjectFileRef &ref)
 
bool operator!= (const LabelPriority &other) const
 
bool operator< (const LabelPriority &other) const
 
bool operator<= (const LabelPriority &other) const
 

Public Attributes

bool basemap {false}
 true when label is for object from basemap database
 
size_t priority {std::numeric_limits<size_t>::max()}
 LabelPriority is used to determine the order of labels and to decide which label to show when there is a collision.
 
ObjectFileRef ref
 

Friends

std::ostream & operator<< (std::ostream &stream, const LabelPriority &prio)
 

Constructor & Destructor Documentation

◆ LabelPriority() [1/2]

osmscout::LabelPriority::LabelPriority ( )
default

◆ LabelPriority() [2/2]

osmscout::LabelPriority::LabelPriority ( size_t  priority,
bool  basemap,
const ObjectFileRef ref 
)
inline

Member Function Documentation

◆ operator!=()

bool osmscout::LabelPriority::operator!= ( const LabelPriority other) const
inline

References basemap, priority, and ref.

◆ operator<()

bool osmscout::LabelPriority::operator< ( const LabelPriority other) const
inline

References basemap, priority, and ref.

◆ operator<=()

bool osmscout::LabelPriority::operator<= ( const LabelPriority other) const
inline

References basemap, priority, and ref.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  stream,
const LabelPriority prio 
)
friend

Member Data Documentation

◆ basemap

bool osmscout::LabelPriority::basemap {false}

true when label is for object from basemap database

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

◆ priority

size_t osmscout::LabelPriority::priority {std::numeric_limits<size_t>::max()}

LabelPriority is used to determine the order of labels and to decide which label to show when there is a collision.

  • priority is defined by the stylesheet
  • basemap flag is here to give precedence to labels from ordinary map databases before world overview (basemap)
  • ref is used for providing stable output for two labels with the same priority (and basemap flag) Priority from the stylesheet

Referenced by operator!=(), operator<(), operator<=(), and osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::ProcessLabel().

◆ ref

ObjectFileRef osmscout::LabelPriority::ref

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


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