ad_map_access
Public Member Functions | List of all members
ad::map::config::MapConfigFileHandler Class Reference

Parse config file that specifies all known maps. More...

#include <ad/map/config/MapConfigFileHandler.hpp>

Public Member Functions

 MapConfigFileHandler (MapConfigFileHandler const &)=delete
 
 MapConfigFileHandler (MapConfigFileHandler &&)=delete
 
MapConfigFileHandleroperator= (MapConfigFileHandler &&)=delete
 
MapConfigFileHandleroperator= (MapConfigFileHandler const &)=delete
 
bool readConfig (std::string const &configFileName)
 read configuration from given configFileName More...
 
bool isInitialized () const
 
bool isInitializedWithFilename (std::string const &configFileName) const
 
const std::string & configFileName () const
 
const MapEntryadMapEntry () const
 
const std::vector< PointOfInterest > & pointsOfInterest () const
 
point::GeoPoint defaultEnuReference () const
 
bool defaultEnuReferenceAvailable () const
 
void reset ()
 

Detailed Description

Parse config file that specifies all known maps.

The config file specifies which maps to use by the AdMapAccess class. It has three sections:

ADMap specifies a map and optional parameters for loading. An entry is given with

The positions define the covered area of the file. Example: [ADMap] map=filename

POI specifies a [list of] point[s] of interest. An entry can provide one or more POI descriptions. Whereas a POI is given with:

Example: [POI] poi=One 49.0189305 8.4399515 0. poi=Two 49.0191653 8.4401407 0. poi=Three 49.0192038 8.4401582 0. poi=Four 49.0192092 8.4401439 0.

All values are given in decimal degrees, e.g. 48.405

In addition there is the possibility to provide a default ENUReference point to be set automatically when loading the map file. The default ENU Reference point is given by:

Example [ENUReference] default=49.0192671 8.4421163 0

When parsing the config file, the existance/correctness of the map file itself will not be checked.

Member Function Documentation

◆ adMapEntry()

const MapEntry& ad::map::config::MapConfigFileHandler::adMapEntry ( ) const
Returns
configured MapEntry

◆ configFileName()

const std::string& ad::map::config::MapConfigFileHandler::configFileName ( ) const
Returns
name of loaded config file

◆ defaultEnuReference()

point::GeoPoint ad::map::config::MapConfigFileHandler::defaultEnuReference ( ) const
Returns
the default Enu reference point

◆ defaultEnuReferenceAvailable()

bool ad::map::config::MapConfigFileHandler::defaultEnuReferenceAvailable ( ) const
Returns
'true' if the default Enu reference point is existing

◆ isInitialized()

bool ad::map::config::MapConfigFileHandler::isInitialized ( ) const
Returns
true if a valid configuration was read

◆ isInitializedWithFilename()

bool ad::map::config::MapConfigFileHandler::isInitializedWithFilename ( std::string const &  configFileName) const
Returns
true if configuration was done with given file name

◆ pointsOfInterest()

const std::vector<PointOfInterest>& ad::map::config::MapConfigFileHandler::pointsOfInterest ( ) const
Returns
list of POIs

◆ readConfig()

bool ad::map::config::MapConfigFileHandler::readConfig ( std::string const &  configFileName)

read configuration from given configFileName

Returns
true on successful completion
false if configFileName cannot be opened or has invalid syntax

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