libosmscout  1.1.1
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
osmscout::AreaIndex Class Referenceabstract

#include <libosmscout/include/osmscout/AreaIndex.h>

Inheritance diagram for osmscout::AreaIndex:
Inheritance graph
[legend]
Collaboration diagram for osmscout::AreaIndex:
Collaboration graph
[legend]

Classes

struct  TypeData
 

Public Member Functions

 AreaIndex ()=default
 
 AreaIndex (const AreaIndex &)=delete
 
 AreaIndex (AreaIndex &&)=delete
 
AreaIndexoperator= (const AreaIndex &)=delete
 
AreaIndexoperator= (AreaIndex &&)=delete
 
virtual ~AreaIndex ()
 
void Close ()
 
bool Open (const TypeConfigRef &typeConfig, const std::string &path, bool memoryMappedData)
 
bool IsOpen () const
 
std::string GetFilename () const
 
bool GetOffsets (const GeoBox &boundingBox, const TypeInfoSet &types, std::vector< FileOffset > &offsets, TypeInfoSet &loadedTypes) const
 

Protected Member Functions

void GetOffsets (const TypeData &typeData, const GeoBox &boundingBox, std::unordered_set< FileOffset > &offsets) const
 
 AreaIndex (const std::string &indexFileName)
 
virtual void ReadTypeData (const TypeConfigRef &typeConfig, TypeData &data)=0
 

Protected Attributes

std::string indexFileName
 
std::string fullIndexFileName
 Full path and name of the data file. More...
 
FileScanner scanner
 Scanner instance for reading this file. More...
 
std::vector< TypeDatatypeData
 
std::mutex lookupMutex
 

Detailed Description

Generic area index for lookup objects by area

Constructor & Destructor Documentation

◆ AreaIndex() [1/4]

osmscout::AreaIndex::AreaIndex ( const std::string &  indexFileName)
protected

◆ AreaIndex() [2/4]

osmscout::AreaIndex::AreaIndex ( )
default

◆ AreaIndex() [3/4]

osmscout::AreaIndex::AreaIndex ( const AreaIndex )
delete

◆ AreaIndex() [4/4]

osmscout::AreaIndex::AreaIndex ( AreaIndex &&  )
delete

◆ ~AreaIndex()

virtual osmscout::AreaIndex::~AreaIndex ( )
virtual

Member Function Documentation

◆ Close()

void osmscout::AreaIndex::Close ( )

◆ GetFilename()

std::string osmscout::AreaIndex::GetFilename ( ) const
inline

◆ GetOffsets() [1/2]

void osmscout::AreaIndex::GetOffsets ( const TypeData typeData,
const GeoBox &  boundingBox,
std::unordered_set< FileOffset > &  offsets 
) const
protected

◆ GetOffsets() [2/2]

bool osmscout::AreaIndex::GetOffsets ( const GeoBox &  boundingBox,
const TypeInfoSet &  types,
std::vector< FileOffset > &  offsets,
TypeInfoSet &  loadedTypes 
) const

◆ IsOpen()

bool osmscout::AreaIndex::IsOpen ( ) const
inline

◆ Open()

bool osmscout::AreaIndex::Open ( const TypeConfigRef typeConfig,
const std::string &  path,
bool  memoryMappedData 
)

◆ operator=() [1/2]

AreaIndex& osmscout::AreaIndex::operator= ( const AreaIndex )
delete

◆ operator=() [2/2]

AreaIndex& osmscout::AreaIndex::operator= ( AreaIndex &&  )
delete

◆ ReadTypeData()

virtual void osmscout::AreaIndex::ReadTypeData ( const TypeConfigRef typeConfig,
TypeData data 
)
protectedpure virtual

Member Data Documentation

◆ fullIndexFileName

std::string osmscout::AreaIndex::fullIndexFileName
protected

Full path and name of the data file.

◆ indexFileName

std::string osmscout::AreaIndex::indexFileName
protected

◆ lookupMutex

std::mutex osmscout::AreaIndex::lookupMutex
mutableprotected

◆ scanner

FileScanner osmscout::AreaIndex::scanner
mutableprotected

Scanner instance for reading this file.

◆ typeData

std::vector<TypeData> osmscout::AreaIndex::typeData
protected

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