GL Studio C++ Runtime API
CADRGMapChartDataSource Class Reference

#include <gls_map_cadrg.h>

Inheritance diagram for CADRGMapChartDataSource:
GlsMapChartDataSource

Public Member Functions

void ParseDirectory (const char *directoryPath, ParseDirectoryRules=FIND_TOC)
 Use CADRG data from the specified directory.
 
void AddCustomMapLayer (const char *currentScaleString, const char *customScaleString, const char *customExtension)
 
unsigned int GetLayerCount () const
 Gets the size of the layer container. This gives an upper bound to SetCADRGLayer when using custom layers.
 
JustInTimeFileLoading IsJustInTimeFileLoadingEnabled (void) const
 Get whether source will delay loading metdata for all files until they are shown.
 
void SetTargetCellLoadRate (const double targetCellLoadRate)
 
double GetTargetCellLoadRate (void) const
 
bool GetAvailableCoverage (GeoRect *dest) DISTI_METHOD_OVERRIDE
 
unsigned long GetBestLayer (GlsMapView *view, GlsMapChart *chart) const DISTI_METHOD_OVERRIDE
 
void GetCellList (const GeoRect &coverage, unsigned long layerID, double viewLogicalHeight, double viewGeoHeight, MapChartCellList &viewList) DISTI_METHOD_OVERRIDE
 
void SetCADRGLayer (const unsigned long &layer)
 
void SetCADRGLayer (const std::string &str)
 
unsigned long GetCADRGLayer (void)
 
void SetCIBLayer (const unsigned long &layer)
 
void SetCIBLayer (const std::string &str)
 
unsigned long GetCIBLayer (void)
 
void SetUseCADRGLayerFlag (bool layerFlag)
 Set the use CADRG layer flag, which turns on and off the use of the user specified layer for CADRG data.
 
bool GetUseCADRGLayerFlag (void)
 Get the current setting of the use CADRG layer flag.
 
void SetUseCIBLayerFlag (bool layerFlag)
 Set the use CIB layer flag, which turns on and off the use of the user specified layer for CIB data.
 
bool GetUseCIBLayerFlag (void)
 Get the current setting of the use CIB layer flag.
 
void SetLayerCacheCount (const unsigned int cacheCount)
 
unsigned int GetLayerCacheCount (void) const
 
void CalcAvailableCoverage ()
 
ImageLoadCellImage (MapChartCell *cell)
 Not normally called by user.
 
- Public Member Functions inherited from GlsMapChartDataSource
virtual ~GlsMapChartDataSource ()
 Destructor for abstract base class.
 
virtual void PostDraw (GlsMapView *view, GlsMapChart *chart)
 
virtual bool AreAllCellsLoaded (GlsMapView *view, GlsMapChart *chart)
 

Protected Attributes

CADRGMapChartLayerCache * _layerCache
 Container for "old" data that is loaded but not currently shown.
 
CADRGMap * _cadrgMapStore
 Storage for map data.
 

Additional Inherited Members

- Protected Member Functions inherited from GlsMapChartDataSource
 GlsMapChartDataSource ()
 Constructor for subclasses.
 

Detailed Description

Runtime implementation of an CADRGMapChartDataSource

Member Function Documentation

void AddCustomMapLayer ( const char *  currentScaleString,
const char *  customScaleString,
const char *  customExtension 
)

Uses the currentScaleString value to derive a new map layer from the existing layer identified by currentScaleString.

Parameters
currentScaleStringshould be the string of an existing layer e.g. "1:5M". The valid of currentScaleString values are: string - layer name "1:5M" - GNC "1:2M" - JNC "1:1M" - ONC "1:500K" - TPC "1:250K" - JOG "1:100K" - TLM "1:50K" - TLM
customScaleStringthe string to be added to the above list of strings e.g."Custom1:5M".
customExtensionthe two character non-numeric file extension that can be used to find files for this layer.
void CalcAvailableCoverage ( )

Updates the coverage area that is returned by GetAvailableCoverage. This is called automatically when something causes the coverage area to change. This method is slow, users of the class should not need to call it directly.

bool GetAvailableCoverage ( GeoRect dest)
virtual

Sets a GeoRect to describe the area containing all areas covered by this MapDataSource. This area may change as different databases are loaded. Calling this method may be slow. Pointer to a GeoRect to recieve the coverage.

Returns
true on success (dest contains the coverage description) or false if there was an error (dest is undefined)

Implements GlsMapChartDataSource.

unsigned long GetBestLayer ( GlsMapView view,
GlsMapChart chart 
) const
virtual

Returns the cell layer ('zoom level') that best matches the given area

Parameters
viewThe GlsMapView used to draw the chart
chartThe GlsMapChart that is being drawn
Returns
The recommended layer to use
Note
Data sources that do not support layers should always return 0.

Reimplemented from GlsMapChartDataSource.

unsigned long GetCADRGLayer ( void  )
inline

Get the currently set layer for CADRG data.

Returns
The currently set layer for CADRG data.
void GetCellList ( const GeoRect coverage,
unsigned long  layerID,
double  viewLogicalHeight,
double  viewGeoHeight,
MapChartCellList viewList 
)
virtual

Get the list of the available cells in a given coverage area The caller will AddRef() any of the cells that it will be holding a reference to

Parameters
coverageGeoRect describing the requested area
layerIDWhich layer to return MapCells from
viewLogicalHeightThe height of the view in logical units
viewGeoHeightThe height of the view in geographic units
viewListPointer MapChartCellList to recieve the list of available cells

Implements GlsMapChartDataSource.

unsigned long GetCIBLayer ( void  )
inline

Get the currently set layer for CIB data.

Returns
The currently set layer for CIB data.
unsigned int GetLayerCacheCount ( void  ) const

Get the count of the layer cache

Returns
max number of layers to cache ( 0u if layer caching is disabled )
double GetTargetCellLoadRate ( void  ) const

Get the target rate in hz at which cells will be loaded

Returns
target rate in hz else 0.0 for no target rate ( i.e. load as quickly as possible )
void SetCADRGLayer ( const unsigned long &  layer)

Set the user-specificed layer to display for CADRG data. Note: This value will NOT be used unless the SetUseCADRGLayerFlag is true. The valid values are: 0 - OVERVIEW1 1 - GNC - 1:5M 2 - JNC - 1:2M 3 - ONC - 1:1M 4 - TPC - 1:500K 5 - JOG - 1:250K 6 - TLM - 1:100K 7 - TLM - 1:50K

Parameters
layerThe layer to display. Should be in the range [0, LayerCount() - 1].
void SetCADRGLayer ( const std::string &  str)

Set the layer to display for CADRG data by scale string. Note: This value will NOT be used unless the SetUseCADRGLayerFlag is true. The valid values are: string - layer name "1:5M" - GNC "1:2M" - JNC "1:1M" - ONC "1:500K" - TPC "1:250K" - JOG "1:100K" - TLM "1:50K" - TLM

Parameters
strThe scale string of the layer to display. The strings are defined in the CADRG standard, i.e. "1:1M".
void SetCIBLayer ( const unsigned long &  layer)

Set the layer to display for CIB data. Note: This value will NOT be used unless the SetUseCADRGLayerFlag is true. The valid values are: 8 - 10M 9 - 5M

Parameters
layerThe layer to display. Should be in the range [8, 10].
void SetCIBLayer ( const std::string &  str)

Set the layer to display for CIB data by scale string. Note: This value will NOT be used unless the SetUseCADRGLayerFlag is true. The valid values are: "10M" "5M"

Parameters
strThe scale string of the layer to display. The strings are defined int the CADRG standard, i.e. "1M".
void SetLayerCacheCount ( const unsigned int  cacheCount)

Set the count of the layer cache

Parameters
cacheCountmax number of layers to cache else 0u to disable layer caching
void SetTargetCellLoadRate ( const double  targetCellLoadRate)

Set the target rate in hz at which cells will be loaded

Parameters
targetCellLoadRatetarget rate in hz else 0.0 for no target rate ( i.e. load as quickly as possible )

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