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

Temlate for storing sets of data of the same type in a tile. More...

#include <DataTileCache.h>

Public Member Functions

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
 
const TypeInfoSet GetTypes () const
 Return the list of types of the data stored in the tile. More...
 
void Invalidate ()
 Marks the tile as inpcomplete 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 ()
 Create an empty and unassigned TileData. More...
 

Detailed Description

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

Temlate for storing sets of data of the same type in a tile.

Normally data will either be NodeRef, WayRef or AreaRef.

Constructor & Destructor Documentation

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

Create an empty and unassigned TileData.

Member Function Documentation

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.

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.

template<typename O>
void osmscout::TileData< O >::CopyData ( std::function< void(const O &)>  function) const
inline
template<typename O>
size_t osmscout::TileData< O >::GetDataSize ( ) const
inline
template<typename O>
const 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.

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

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

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

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

template<typename O>
bool osmscout::TileData< O >::IsEmpty ( ) const
inline
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)

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.

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: