libosmscout 1.1.1
Loading...
Searching...
No Matches
osmscout::TileData< O > Class Template Reference

#include <libosmscout-map/include/osmscoutmap/DataTileCache.h>

Public Member Functions

 TileData ()=default
bool IsEmpty () const
void Invalidate ()
void AddPrefillData (const TypeInfoSet &types, const std::vector< O > &data)
void AddPrefillData (const TypeInfoSet &types, std::vector< O > &&data)
void AddData (const TypeInfoSet &types, const std::vector< O > &data)
void SetData (const TypeInfoSet &types, const std::vector< O > &data)
void SetData (const TypeInfoSet &types, std::vector< O > &&data)
void SetComplete ()
bool IsComplete () const
TypeInfoSet GetTypes () const
size_t GetDataSize () const
void CopyData (std::function< void(const O &)> function) const

Detailed Description

template<typename O>
class osmscout::TileData< O >

Template for storing sets of data of the same type in a tile. Normally data will either be NodeRef, WayRef or AreaRef.

Constructor & Destructor Documentation

◆ TileData()

template<typename O>
osmscout::TileData< O >::TileData ( )
default

Create an empty and unassigned TileData

Member Function Documentation

◆ AddData()

template<typename O>
void osmscout::TileData< O >::AddData ( const TypeInfoSet & types,
const std::vector< O > & data )
inline

Add data to the tile and mark the tile as completed.

◆ AddPrefillData() [1/2]

template<typename O>
void osmscout::TileData< O >::AddPrefillData ( const TypeInfoSet & types,
const std::vector< O > & data )
inline

Assign data to the tile that was derived from existing tiles. Resets the list of loaded types to the list given.

◆ AddPrefillData() [2/2]

template<typename O>
void osmscout::TileData< O >::AddPrefillData ( const TypeInfoSet & types,
std::vector< O > && data )
inline

Assign data to the tile that was derived from existing tiles. Resets the list of loaded types to the list given. This version has move semantics for the data.

◆ CopyData()

template<typename O>
void osmscout::TileData< O >::CopyData ( std::function< void(const O &)> function) const
inline

◆ GetDataSize()

template<typename O>
size_t osmscout::TileData< O >::GetDataSize ( ) const
inline

◆ GetTypes()

template<typename O>
TypeInfoSet osmscout::TileData< O >::GetTypes ( ) const
inline

Return the list of types of the data stored in the tile.

Note that it is stll possibly that there is no acutal data for this type in the TileData stored.

◆ Invalidate()

template<typename O>
void osmscout::TileData< O >::Invalidate ( )
inline

Marks the tile as incomplete again, without actually clearing data and types.

◆ IsComplete()

template<typename O>
bool osmscout::TileData< O >::IsComplete ( ) const
inline

Return 'true' if there was data already assigned to the tile

◆ IsEmpty()

template<typename O>
bool osmscout::TileData< O >::IsEmpty ( ) const
inline

◆ SetComplete()

template<typename O>
void osmscout::TileData< O >::SetComplete ( )
inline

Mark the tile as completed (useful if prefill data is already complete and no more actual data has to be loaded)

◆ SetData() [1/2]

template<typename O>
void osmscout::TileData< O >::SetData ( const TypeInfoSet & types,
const std::vector< O > & data )
inline

Assign data to the tile and mark the tile as completed.

◆ SetData() [2/2]

template<typename O>
void osmscout::TileData< O >::SetData ( const TypeInfoSet & types,
std::vector< O > && data )
inline

Assign data to the tile and mark the tile as completed. This version has move semantics for the data.


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