libosmscout  0.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules
osmscout::TileData< O > Class Template Reference

#include <DataTileCache.h>

Public Member Functions

void AddData (const TypeInfoSet &types, const std::vector< O > &data)
 Add data to the tile and mark the tile as completed. More...
 
void AddPrefillData (const TypeInfoSet &types, const std::vector< O > &data)
 Assign data to the tile that was derived from existing tiles. More...
 
void AddPrefillData (const TypeInfoSet &types, std::vector< O > &&data)
 Assign data to the tile that was derived from existing tiles. More...
 
void CopyData (std::function< void(const O &)> function) const
 
size_t GetDataSize () const
 
TypeInfoSet GetTypes () const
 Return the list of types of the data stored in the tile. More...
 
void Invalidate ()
 Marks the tile as incomplete again, without actually clearing data and types. More...
 
bool IsComplete () const
 Return 'true' if there was data already assigned to the tile. More...
 
bool IsEmpty () const
 
void SetComplete ()
 Mark the tile as completed (useful if prefill data is already complete and no more actual data has to be loaded) More...
 
void SetData (const TypeInfoSet &types, const std::vector< O > &data)
 Assign data to the tile and mark the tile as completed. More...
 
void SetData (const TypeInfoSet &types, std::vector< O > &&data)
 Assign data to the tile and mark the tile as completed. More...
 
 TileData ()=default
 Create an empty and unassigned TileData. More...
 

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.

Referenced by osmscout::Tile::IsComplete().

◆ IsEmpty()

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

Referenced by osmscout::Tile::IsEmpty().

◆ 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: