libosmscout  0.1
osmscout::TypeInfoSet Class Referencefinal

Custom data structure to efficiently handle a set of TypeInfoRef. More...

#include <TypeInfoSet.h>

Public Member Functions

void Adapt (const TypeConfig &typeConfig)
 
void Add (const TypeInfoSet &types)
 
TypeInfoSetConstIterator begin () const
 
void Clear ()
 
bool Empty () const
 
TypeInfoSetConstIterator end () const
 
void Intersection (const TypeInfoSet &otherTypes)
 
bool Intersects (const TypeInfoSet &otherTypes) const
 Returns 'true' if at least one type is set in both Sets. More...
 
bool IsSet (const TypeInfoRef &type) const
 
bool operator!= (const TypeInfoSet &other) const
 
TypeInfoSetoperator= (const TypeInfoSet &other)
 
bool operator== (const TypeInfoSet &other) const
 
void Remove (const TypeInfoRef &type)
 
void Remove (const TypeInfoSet &otherTypes)
 
void Set (const std::vector< TypeInfoRef > &types)
 
void Set (const TypeInfoRef &type)
 
void Set (const TypeInfoSet &other)
 
size_t Size () const
 
 TypeInfoSet ()=default
 
 TypeInfoSet (const std::vector< TypeInfoRef > &types)
 
 TypeInfoSet (const TypeConfig &typeConfig)
 
 TypeInfoSet (const TypeInfoSet &other)=default
 
 TypeInfoSet (TypeInfoSet &&other) noexcept
 
 ~TypeInfoSet ()=default
 

Detailed Description

Custom data structure to efficiently handle a set of TypeInfoRef.

All operations on the set are O(1) using the fact, that TypeInfo internally have a continuously running index variable (Set may be slower if the internal array was not preinitialized to it maximum size by passing a TypeConfig or another TypeInfoSet in the constructor.

Constructor & Destructor Documentation

◆ TypeInfoSet() [1/5]

osmscout::TypeInfoSet::TypeInfoSet ( )
default

◆ ~TypeInfoSet()

osmscout::TypeInfoSet::~TypeInfoSet ( )
default

◆ TypeInfoSet() [2/5]

osmscout::TypeInfoSet::TypeInfoSet ( const TypeConfig typeConfig)
explicit

◆ TypeInfoSet() [3/5]

osmscout::TypeInfoSet::TypeInfoSet ( const std::vector< TypeInfoRef > &  types)
explicit

References Set().

◆ TypeInfoSet() [4/5]

osmscout::TypeInfoSet::TypeInfoSet ( const TypeInfoSet other)
default

◆ TypeInfoSet() [5/5]

osmscout::TypeInfoSet::TypeInfoSet ( TypeInfoSet &&  other)
noexcept

Member Function Documentation

◆ Adapt()

void osmscout::TypeInfoSet::Adapt ( const TypeConfig typeConfig)

◆ Add()

void osmscout::TypeInfoSet::Add ( const TypeInfoSet types)

◆ begin()

TypeInfoSetConstIterator osmscout::TypeInfoSet::begin ( ) const
inline

◆ Clear()

◆ Empty()

◆ end()

TypeInfoSetConstIterator osmscout::TypeInfoSet::end ( ) const
inline

◆ Intersection()

void osmscout::TypeInfoSet::Intersection ( const TypeInfoSet otherTypes)

◆ Intersects()

bool osmscout::TypeInfoSet::Intersects ( const TypeInfoSet otherTypes) const

Returns 'true' if at least one type is set in both Sets.

Else 'false' is returned.

◆ IsSet()

◆ operator!=()

bool osmscout::TypeInfoSet::operator!= ( const TypeInfoSet other) const

◆ operator=()

TypeInfoSet& osmscout::TypeInfoSet::operator= ( const TypeInfoSet other)
inline

◆ operator==()

bool osmscout::TypeInfoSet::operator== ( const TypeInfoSet other) const

◆ Remove() [1/2]

void osmscout::TypeInfoSet::Remove ( const TypeInfoRef type)

◆ Remove() [2/2]

void osmscout::TypeInfoSet::Remove ( const TypeInfoSet otherTypes)

◆ Set() [1/3]

void osmscout::TypeInfoSet::Set ( const std::vector< TypeInfoRef > &  types)

References Clear(), and Set().

◆ Set() [2/3]

◆ Set() [3/3]

void osmscout::TypeInfoSet::Set ( const TypeInfoSet other)

◆ Size()

size_t osmscout::TypeInfoSet::Size ( ) const
inline

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