| GlsMap Toolkit 1.10.1

Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
disti::DNCMapChartDataSource Class Reference
DNC

`#include <gls_map_dnc.h>`

Inheritance diagram for disti::DNCMapChartDataSource:

## Classes
struct | LibrarySlot

## Public Types
typedef void(* | ConfigLibraryCB) (void *const userData, DNCMapChartDataSource &dncSource, const int libNum)
typedef void(* | RenderPointFeatureCB) (void *const userData, DNCMapChartDataSource &dncSource, const unsigned int libNum, const char *const covName, const char *const featClassName, const unsigned int featIndex, const VPFTableHeader &featTableHeader, const VPFTable::Row &featRow, const VPFUtil::Coord2DShort &pointCoord, const glsColor &color, const DNCUtil::GeoRegion &region, const double logicalHeight)
typedef bool(* | FeatureIteratorCB) (void *const userData, DNCMapChartDataSource &dncSource, const unsigned int libNum, const char *const covName, const char *const featClassName, const VPFUtil::FeatureType featType, const unsigned int featIndex, const VPFTableHeader &featTableHeader, const VPFTable::Row &featRow)
typedef GLubyte | GLPolyStipplePattern[128u]

## Public Member Functions
| DNCMapChartDataSource ()
| ~DNCMapChartDataSource ()
void | StopRendering ()
void | LoadPath (const char *const dncRootPath)
bool | IsValid (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 | PostDraw (GlsMapView *view, GlsMapChart *chart) DISTI_METHOD_OVERRIDE
unsigned int | GetLibraryCount (void) const
const char * | GetLibraryName (const unsigned int libNum) const
VPFUtil::SecurityClass | GetLibrarySecurityClass (const unsigned int libNum)
bool | LoadDNCLibrary (const unsigned int libNum, const bool async, const bool preTessellate)
bool | IsLibraryLoading (const unsigned int libNum) const
bool | IsLibraryLoaded (const unsigned int libNum)
bool | UnloadDNCLibrary (const unsigned int libNum, const bool async)
bool | LockLibrary (const unsigned int libNum, DNCLibrary **lib)
bool | UnlockLibrary (const unsigned int libNum)
bool | SetLibraryVisible (const unsigned int libNum, const bool visible)
bool | NotfiyLibraryConfigChanged (void)
bool | IsLibraryVisible (const unsigned int libNum)
unsigned int | GetCompletedCellCount (const unsigned int libNum)
bool | GetLibraryExtents (const unsigned int libNum, float &swCornerLon, float &swCornerLat, float &neCornerLon, float &neCornerLat) const
bool | LibraryCoveragePointTest (const unsigned int libNum, const double longitude, const double latitude) const
bool | GetLibraryCoverageArea (const unsigned int libNum, double &area) const
bool | GetLibraryScale (const unsigned int libNum, unsigned int &scale)
const DNCUtil::QueryResults * | QueryFeatures (const unsigned int libNum, const DNCUtil::GeoRegion &region, const bool onlyVisibleFeatures)
bool | ShowAll (const int libNum, const bool show)
bool | SetCoverageVisible (const int libNum, const char *const covName, const bool visible)
bool | SetFeatureVisible (const int libNum, const char *const covName, const char *const featClassName, const char *const faccCode, const char *const intAttribColName, const unsigned int intAttribVal, const char *const charAttribColName, const char *const charAttribVal, const int desFeatIndex, const bool visible)
bool | SetFeatureColor (const int libNum, const char *const covName, const char *const featClassName, const char *const faccCode, const char *const intAttribColName, const unsigned int intAttribVal, const char *const charAttribColName, const char *const charAttribVal, const int desFeatIndex, const glsColor &color)
bool | SetPointFeatureRenderCB (const int libNum, const char *const covName, const char *const featClassName, const char *const faccCode, const char *const intAttribColName, const unsigned int intAttribVal, const char *const charAttribColName, const char *const charAttribVal, const int desFeatIndex, RenderPointFeatureCB const renderCB, void *const userData, const bool useMapScale)
bool | SetFeatureLineStipple (const int libNum, const char *const covName, const char *const featClassName, const char *const faccCode, const char *const intAttribColName, const unsigned int intAttribVal, const char *const charAttribColName, const char *const charAttribVal, const int desFeatIndex, const GLint stippleFactor, const GLushort stipplePattern)
bool | SetTextFeatureFont (const int libNum, const char *const covName, const char *const featClassName, const char *const faccCode, const char *const intAttribColName, const unsigned int intAttribVal, const char *const charAttribColName, const char *const charAttribVal, const int desFeatIndex, GlsFontBase *const font)
bool | SetAreaFeaturePolygonStipple (const int libNum, const char *const covName, const char *const featClassName, const char *const faccCode, const char *const intAttribColName, const unsigned int intAttribVal, const char *const charAttribColName, const char *const charAttribVal, const int desFeatIndex, const GLPolyStipplePattern *const polyStipplePattern)
bool | SetAreaFeatureBoundaryVisible (const int libNum, const char *const covName, const char *const featClassName, const char *const faccCode, const char *const intAttribColName, const unsigned int intAttribVal, const char *const charAttribColName, const char *const charAttribVal, const int desFeatIndex, const bool visible)
bool | SetAreaFeatureBoundaryColor (const int libNum, const char *const covName, const char *const featClassName, const char *const faccCode, const char *const intAttribColName, const unsigned int intAttribVal, const char *const charAttribColName, const char *const charAttribVal, const int desFeatIndex, const glsColor &color)
bool | SetFeatureDrawOrder (const int libNum, const char *const covName, const char *const featClassName, const char *const faccCode, const unsigned int drawOrder)
bool | IterateFeatures (FeatureIteratorCB const featureIteratorCB, void *const userData, const int libNum, const char *const covName, const char *const featClassName, const char *const faccCode, const char *const intAttribColName, const unsigned int intAttribVal, const char *const charAttribColName, const char *const charAttribVal, const int desFeatIndex)
void | SetConfigLibCB (ConfigLibraryCB const configLibCB, void *const userData, const bool reconfigAll)
bool | LowerAsyncCellRenderPriority (const bool belowNormal)
bool | LowerAsyncLoadPriority (const bool belowNormal)
bool | LowerAsyncUnloadPriority (const bool belowNormal)
Public Member Functions inherited from disti::GlsMapChartDataSource
virtual | ~GlsMapChartDataSource ()
virtual bool | GetAvailableCoverage (GeoRect *dest)=0
virtual unsigned long | GetBestLayer (GlsMapView *view, GlsMapChart *chart) const
virtual void | GetCellList (const GeoRect &coverage, unsigned long layerID, double viewLogicalHeight, double viewGeoHeight, MapChartCellList &viewList)=0
virtual void | PostDraw (GlsMapView *view, GlsMapChart *chart)
virtual bool | AreAllCellsLoaded (GlsMapView *view, GlsMapChart *chart)

## Protected Types
typedef DynamicArray< LibrarySlot, false > | LibraryArray
typedef DynamicArray< DNCMapChartCell *, true > | CellPointerArray

## Protected Member Functions
bool | RefreshLib (const unsigned int libNum)
void | RefreshLibList (void)
void | RefreshCellList (void)
void | InvalidateCells (const unsigned int libNum)
void | PopulateCells (const unsigned int libNum, const GeoRect &libExtents, const GeoRect &view, const unsigned long layer, double viewLogicalHeight, double viewGeoHeight, MapChartCellList &cellList)
DNCMapChartCell * | FindCell (const unsigned int libNum, const double tileLogicalHeight, const GeoRect &tileRect, const unsigned long layer)
DNCMapChartCell * | GetNextCellToRender (void)
Protected Member Functions inherited from disti::GlsMapChartDataSource
| GlsMapChartDataSource ()

## Static Protected Member Functions
static DNCMapChartCell * | getNextCellToRender (void *const pArguments)

## Protected Attributes
VPFUtil::WarningBool | _isValid
DNCDatabase * | _dncDb
LibraryArray | _libraries
ConfigLibraryCB | _configLibCB
void * | _configUserData
Mutex * | _cellPointersMutex
CellPointerArray | _cellPointers
DNCAsyncCellRenderThread * | _renderThread
bool | _firstTimeLoaded

## Detailed Description

Map chart data source for loading Digital Nautical Chart (DNC, MIL-PRF-89023)

## Member Typedef Documentation

## ◆ CellPointerArray

typedef DynamicArray<DNCMapChartCell*, true> disti::DNCMapChartDataSource::CellPointerArray
| protected

array of DNC map cell pointers

## ◆ ConfigLibraryCB

typedef void(* disti::DNCMapChartDataSource::ConfigLibraryCB) (void *const userData, DNCMapChartDataSource &dncSource, const int libNum)

config library callback for a user supplied library configuration routine

Parameters

  userData | user supplied data for callback (supplied with SetConfigLibCB())
  dncSource | DNC data source containing library to configure
  libNum | zero based library number of library to configure else -1 for all libraries in source

## ◆ FeatureIteratorCB

typedef bool(* disti::DNCMapChartDataSource::FeatureIteratorCB) (void *const userData, DNCMapChartDataSource &dncSource, const unsigned int libNum, const char *const covName, const char *const featClassName, const VPFUtil::FeatureType featType, const unsigned int featIndex, const VPFTableHeader &featTableHeader, const VPFTable::Row &featRow)

Feature Iterator callback for a user supplied feature configuration routine.

Parameters

  userData | user supplied data for callback (supplied with IterateFeatures())
  dncSource | DNC source containing feature
  libNum | zero based library number of library containing feature
  covName | name (as defined by MIL-PRF-89023) of coverage containing feature ( see DNCUtil COVERAGE_NAME constants )
  featClassName | name (as defined by MIL-PRF-89023) of feature class containing feature ( see DNCUtil FEATURE_NAME constants )
  featType | type of feature
  featIndex | zero based index into feature class for feature
  featTableHeader | table header for feature table containing feature
  featRow | row in feature table corresponding to the feature data for the feature

Returns
  true if a configuration change was made to a feature else false

## ◆ GLPolyStipplePattern

typedef GLubyte disti::DNCMapChartDataSource::GLPolyStipplePattern[128u]

GL polygon stipple pattern

## ◆ LibraryArray

typedef DynamicArray<LibrarySlot, false> disti::DNCMapChartDataSource::LibraryArray
| protected

array of library slots

## ◆ RenderPointFeatureCB

typedef void(* disti::DNCMapChartDataSource::RenderPointFeatureCB) (void *const userData, DNCMapChartDataSource &dncSource, const unsigned int libNum, const char *const covName, const char *const featClassName, const unsigned int featIndex, const VPFTableHeader &featTableHeader, const VPFTable::Row &featRow, const VPFUtil::Coord2DShort &pointCoord, const glsColor &color, const DNCUtil::GeoRegion &region, const double logicalHeight)

Draw callback for a user supplied point feature render routine. This routine is called with the model matrix loaded appropriately as to draw at the correct location using the origin. (i.e. a vertex draw to (0,0) will map to the correct location as described by pointCoord. This routine does not need to save the model stack as the caller will push and pop (save) it accordingly. NOTE: if the point feature in question is configured to use display lists when rendering, then this callback will be called during the compilation of a display list. This means that any textures (and mipmaps) used when rendering the point feature must already be uploaded to GL.

Parameters

  userData | user supplied data for callback (supplied with SetPointFeatureRenderCB())
  dncSource | DNC source containing point feature
  libNum | zero based library number of library containing point
  covName | name (as defined by MIL-PRF-89023) of coverage containing point ( see DNCUtil COVERAGE_NAME constants )
  featClassName | name (as defined by MIL-PRF-89023) of feature class containing point ( see DNCUtil FEATURE_NAME constants )
  featIndex | zero based index into feature class for point
  featTableHeader | table header for point feature table containing point
  featRow | row in feature table corresponding to the point feature data for point
  pointCoord | location of point feature
  color | color assigned to point feature
  region | region of the chart that is rendering
  logicalHeight | height in logical units corresponding to height of render region

## Constructor & Destructor Documentation

## ◆ DNCMapChartDataSource()

DNCMapChartDataSource::DNCMapChartDataSource | ( |  | ) |

Ctor

## ◆ ~DNCMapChartDataSource()

DNCMapChartDataSource::~DNCMapChartDataSource | ( |  | ) |

Dtor

See also
  StopRendering

## Member Function Documentation

## ◆ FindCell()

DNCMapChartCell * DNCMapChartDataSource::FindCell | ( | const unsigned int | libNum,
|  | const double | tileLogicalHeight,
|  | const GeoRect & | tileRect,
|  | const unsigned long | layer
| ) |  |
| protected

Find a cell in the _cellPointers list that matches the given library number, rect and layer

Parameters

  libNum | zero based library number
  tileRect | rect for cell
  tileLogicalHeight | The height of the view in logical space
  layer | layer number

Returns
  matching cell in list else NULL

## ◆ GetAvailableCoverage()

bool DNCMapChartDataSource::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. \dest 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 disti::GlsMapChartDataSource.

## ◆ GetBestLayer()

unsigned long DNCMapChartDataSource::GetBestLayer | ( | GlsMapView * | view,
|  | GlsMapChart * | chart
| ) |  | const
| virtual

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

Parameters

  view | The GlsMapView used to draw the chart
  chart | The 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 disti::GlsMapChartDataSource.

## ◆ GetCellList()

void DNCMapChartDataSource::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

  coverage | GeoRect describing the requested area
  layerID | Which layer to return MapCells from
  viewLogicalHeight | The height of the view in logical units
  viewGeoHeight | The height of the view in geographic units
  viewList | Pointer MapChartCellList to recieve the list of available cells

Implements disti::GlsMapChartDataSource.

## ◆ GetCompletedCellCount()

unsigned int DNCMapChartDataSource::GetCompletedCellCount | ( | const unsigned int | libNum | ) |

Get the number of map chart cells that are currently completed (rendered) for the given library

Parameters

  libNum | zero based libray number

Returns
  number of map chart cells that are currently completed (rendered) for the given library

## ◆ GetLibraryCount()

unsigned int DNCMapChartDataSource::GetLibraryCount | ( | void |  | ) | const

Get the number of libraries in the database

Returns
  number of libraries in the database else 0

## ◆ GetLibraryCoverageArea()

bool DNCMapChartDataSource::GetLibraryCoverageArea | ( | const unsigned int | libNum,
|  | double & | area
| ) |  | const

Get the actual coverage area for a library

Parameters

  libNum | zero based library number
  area | [out] receives area in degrees (lonxlat) on success

Returns
  true on success else false

## ◆ GetLibraryExtents()

bool DNCMapChartDataSource::GetLibraryExtents | ( | const unsigned int | libNum,
|  | float & | swCornerLon,
|  | float & | swCornerLat,
|  | float & | neCornerLon,
|  | float & | neCornerLat
| ) |  | const

Get the geographic extents of a library in the database

Parameters

  libNum | zero based library number ( < GetLibraryCount() )
  swCornerLon | [out] receives longitude of southwest corner of library on success
  swCornerLat | [out] receives latitude of southwest corner of library on success
  neCornerLon | [out] receives longitude of northeast corner of library on success
  neCornerLat | [out] receives latitude of northeast corner of library on success

Returns
  true if success else false

## ◆ GetLibraryName()

const char * DNCMapChartDataSource::GetLibraryName | ( | const unsigned int | libNum | ) | const

Get the name of the given library

Parameters

  libNum | zero based library number

Returns
  name of library else NULL

## ◆ GetLibraryScale()

bool DNCMapChartDataSource::GetLibraryScale | ( | const unsigned int | libNum,
|  | unsigned int & | scale
| ) |  |

Get the scale of the chart in a given library

Parameters

  libNum | zero based library number ( < GetLibraryCount() )
  scale | [out] reveives the denominator of the chart scale expressed as a fraction (e.g. 80000 --> chart scale of 1/80000)

Returns
  true if success else false

## ◆ GetLibrarySecurityClass()

VPFUtil::SecurityClass DNCMapChartDataSource::GetLibrarySecurityClass | ( | const unsigned int | libNum | ) |

Get the security classification for the given library ( NOTE: library must be loaded to determine security class )

Parameters

  libNum | zero based library number

Returns
  security class for library else VPFUtil::SECURITY_CLASS_UNCLASSIFIED if library is not loaded or is invalid

## ◆ getNextCellToRender()

DNCMapChartCell * disti::DNCMapChartDataSource::getNextCellToRender | ( | void *const | pArguments | ) |
| static protected

static function for routing to GetNextCellToRender(). NOTE: returned cell will already have had its ref count increased by one

Parameters

  pArguments | pointer to DNCMapChartDataSource

Returns
  next cell to render else NULL

## ◆ GetNextCellToRender()

DNCMapChartCell * DNCMapChartDataSource::GetNextCellToRender | ( | void |  | ) |
| protected

Get next cell to be rendered. NOTE: returned cell will already have had its ref count increased by one

Returns
  next cell to be rendered else NULL if no cell to be rendered

## ◆ InvalidateCells()

void DNCMapChartDataSource::InvalidateCells | ( | const unsigned int | libNum | ) |
| protected

Invalidate the textures associated with any cells referencing the given library number. NOTE: It is assumed that the given library is locked with LockLibrary() before calling this routine.

Parameters

  libNum | zero based library number in question

## ◆ IsLibraryLoaded()

bool DNCMapChartDataSource::IsLibraryLoaded | ( | const unsigned int | libNum | ) |

Determine if a given library is loaded

Parameters

  libNum | zero based library number for lib in question

Returns
  true if loading else false

## ◆ IsLibraryLoading()

bool DNCMapChartDataSource::IsLibraryLoading | ( | const unsigned int | libNum | ) | const

Determine if a given library is loading asynchronously. NOTE: call IsLibraryLoaded() to see if loading is complete

Parameters

  libNum | zero based library number for lib in question

Returns
  true if loading else false

## ◆ IsLibraryVisible()

bool DNCMapChartDataSource::IsLibraryVisible | ( | const unsigned int | libNum | ) |

Determine if a library is visible (available for tiles)

Parameters

  libNum | zero based libray number

Returns
  true if visible else false

## ◆ IsValid()

bool disti::DNCMapChartDataSource::IsValid | ( | void |  | ) | const
| inline

Determine if the data source is valid

Precondition
  LoadPath has been called

Returns
  true if valid else false

## ◆ IterateFeatures()

bool DNCMapChartDataSource::IterateFeatures | ( | FeatureIteratorCB const | featureIteratorCB,
|  | void *const | userData,
|  | const int | libNum,
|  | const char *const | covName,
|  | const char *const | featClassName,
|  | const char *const | faccCode,
|  | const char *const | intAttribColName,
|  | const unsigned int | intAttribVal,
|  | const char *const | charAttribColName,
|  | const char *const | charAttribVal,
|  | const int | desFeatIndex
| ) |  |

Iterate over features

Parameters

  featureIteratorCB | user supplied callback to be called when iterating
  userData | user supplied data to be handed to callback
  libNum | zero based library number else -1 for all loaded libraries
  covName | name (as defined by MIL-PRF-89023) of coverage else NULL for all coverages. ( see DNCUtil COVERAGE_NAME constants )
  featClassName | name (as defined by MIL-PRF-89023) of feature class else NULL for all features. ( see DNCUtil FEATURE_NAME constants )
  faccCode | Feature and Attribute Coding Catalog feature code else NULL for all feature codes ( see MIL-PRF-89023 )
  intAttribColName | additional integer attribute column else NULL to ignore
  intAttribVal | integer attribute value to compare against if intAttribColName != NULL
  charAttribColName | additional character attribute column else NULL to ignore additional attribute
  charAttribVal | character attribute value to compare against if charAttribColName != NULL
  desFeatIndex | zero based feature index for specific feature else -1 for all

Returns
  true if at least one feature configuration was changed

## ◆ LibraryCoveragePointTest()

bool DNCMapChartDataSource::LibraryCoveragePointTest | ( | const unsigned int | libNum,
|  | const double | longitude,
|  | const double | latitude
| ) |  | const

Test a point against the actual coverage of a given library

Parameters

  libNum | zero based library number
  longitude | longitude of point
  latitude | latitude of point

Returns
  true if in actual library coverage else false

## ◆ LoadDNCLibrary()

bool DNCMapChartDataSource::LoadDNCLibrary | ( | const unsigned int | libNum,
|  | const bool | async,
|  | const bool | preTessellate
| ) |  |

Load a library in the database

Parameters

  libNum | zero based library number ( < GetLibraryCount() )
  async | true to load asynchronously (check IsLibraryLoaded() to see when library is finally loaded)
  preTessellate | true to pre-tessellate area features during loading else false to tessellate on demand when rendering

Returns
  true if success else false

## ◆ LoadPath()

void DNCMapChartDataSource::LoadPath | ( | const char *const | dncRootPath | ) |

Load a DNC database and initialize the data source. If the database load succeeded, IsValid() will return true. The method should only be called once per DNCMapChartDataSource instance, subsequent calls will have no effect.

Parameters

  dncRootPath | path to dnc root database directory

## ◆ LockLibrary()

bool DNCMapChartDataSource::LockLibrary | ( | const unsigned int | libNum,
|  | DNCLibrary ** | lib
| ) |  |

Lock and get the given library. NOTE: Must call UnlockLibrary when done if this routine returns true.

Parameters

  libNum | zero based library number ( < GetLibraryCount() )
  lib | [out] receives pointer to locked library (NULL if library is not loaded)

Returns
  true if library was locked (even if library is not loaded e.g. lib=NULL)

## ◆ LowerAsyncCellRenderPriority()

bool DNCMapChartDataSource::LowerAsyncCellRenderPriority | ( | const bool | belowNormal | ) |

Lower/Restore the priority of the async cell render thread

Parameters

  belowNormal | true to set thread priority to below normal else false to set priority to normal

Returns
  true if success else false

## ◆ LowerAsyncLoadPriority()

bool DNCMapChartDataSource::LowerAsyncLoadPriority | ( | const bool | belowNormal | ) |

Lower/Restore the priority of the async load threads

Parameters

  belowNormal | true to set thread priority to below normal else false to set priority to normal

Returns
  true if success else false

## ◆ LowerAsyncUnloadPriority()

bool DNCMapChartDataSource::LowerAsyncUnloadPriority | ( | const bool | belowNormal | ) |

Lower/Restore the priority of the async unload thread

Parameters

  belowNormal | true to set thread priority to below normal else false to set priority to normal

Returns
  true if success else false

## ◆ NotfiyLibraryConfigChanged()

bool DNCMapChartDataSource::NotfiyLibraryConfigChanged | ( | void |  | ) |

Notify that a library has had its configuration changed and those changes should be reflected in map cells. NOTE: This should be called any time a library config change is made in realtime ( i.e. not made from a config callback )

Returns
  true if success else false

## ◆ PopulateCells()

void DNCMapChartDataSource::PopulateCells | ( | const unsigned int | libNum,
|  | const GeoRect & | libExtents,
|  | const GeoRect & | view,
|  | const unsigned long | layer,
|  | double | viewLogicalHeight,
|  | double | viewGeoHeight,
|  | MapChartCellList & | cellList
| ) |  |
| protected

Populate the given cell list with cells for the given library number and layer that intersect the given view coverage. This routine will create cells as needed and popuplate the _cellPointers arrayfor tiles that need to be created.

Parameters

  libNum | zero based lib number
  libExtents | extents of library
  view | view coverage
  layer | layer number
  viewLogicalHeight | The height of the view in logical space
  viewGeoHeight | The height of the view in geographic space
  cellList | cellList to populate

## ◆ PostDraw()

void DNCMapChartDataSource::PostDraw | ( | GlsMapView * | view,
|  | GlsMapChart * | chart
| ) |  |
| virtual

Called after all the cells have been drawn to allow the data source to perform additional rendering if needed

Parameters

  view | The GlsMapView used to draw the chart
  chart | The GlsMapChart that is being drawn

Reimplemented from disti::GlsMapChartDataSource.

## ◆ QueryFeatures()

const DNCUtil::QueryResults * DNCMapChartDataSource::QueryFeatures | ( | const unsigned int | libNum,
|  | const DNCUtil::GeoRegion & | region,
|  | const bool | onlyVisibleFeatures
| ) |  |

Query a library in the database about its features

Parameters

  libNum | zero based library number ( < GetLibraryCount() )
  region | geographic region to query
  onlyVisibleFeatures | true to only return currently visible features else false for all features

Returns
  query results else NULL

## ◆ RefreshCellList()

void DNCMapChartDataSource::RefreshCellList | ( | void |  | ) |
| protected

Check for and delete unused cells in the _cellPointers array, pickup any tiles from the render thread.

## ◆ RefreshLib()

bool DNCMapChartDataSource::RefreshLib | ( | const unsigned int | libNum | ) |
| protected

Refresh the given library in the _libPointers array to check for new library load / unloads and autoconfigure libraries as needed

Parameters

  libNum | zero based library number of lib in question

Returns
  true if lib pointer changed

## ◆ RefreshLibList()

void DNCMapChartDataSource::RefreshLibList | ( | void |  | ) |
| protected

Refresh the _libPointers array to check for new library load / unloads and autoconfigure libraries as needed

## ◆ SetAreaFeatureBoundaryColor()

bool DNCMapChartDataSource::SetAreaFeatureBoundaryColor | ( | const int | libNum,
|  | const char *const | covName,
|  | const char *const | featClassName,
|  | const char *const | faccCode,
|  | const char *const | intAttribColName,
|  | const unsigned int | intAttribVal,
|  | const char *const | charAttribColName,
|  | const char *const | charAttribVal,
|  | const int | desFeatIndex,
|  | const glsColor & | color
| ) |  |

Set area feature(s) boundary color in a library

Parameters

  libNum | zero based library number else -1 for all loaded libraries
  covName | name (as defined by MIL-PRF-89023) of coverage else NULL for all coverages. ( see DNCUtil COVERAGE_NAME constants )
  featClassName | name (as defined by MIL-PRF-89023) of feature class else NULL for all features. ( see DNCUtil FEATURE_NAME constants )
  faccCode | Feature and Attribute Coding Catalog feature code else NULL for all feature codes ( see MIL-PRF-89023 )
  intAttribColName | additional integer attribute column else NULL to ignore
  intAttribVal | integer attribute value to compare against if intAttribColName != NULL
  charAttribColName | additional character attribute column else NULL to ignore additional attribute
  charAttribVal | character attribute value to compare against if charAttribColName != NULL
  desFeatIndex | zero based feature index for specific feature else -1 for all
  color | color

Returns
  true if at least one area feature boundary color was changed

## ◆ SetAreaFeatureBoundaryVisible()

bool DNCMapChartDataSource::SetAreaFeatureBoundaryVisible | ( | const int | libNum,
|  | const char *const | covName,
|  | const char *const | featClassName,
|  | const char *const | faccCode,
|  | const char *const | intAttribColName,
|  | const unsigned int | intAttribVal,
|  | const char *const | charAttribColName,
|  | const char *const | charAttribVal,
|  | const int | desFeatIndex,
|  | const bool | visible
| ) |  |

Show/Hide area feature(s) boundary in a library

Parameters

  libNum | zero based library number else -1 for all loaded libraries
  covName | name (as defined by MIL-PRF-89023) of coverage else NULL for all coverages. ( see DNCUtil COVERAGE_NAME constants )
  featClassName | name (as defined by MIL-PRF-89023) of feature class else NULL for all features. ( see DNCUtil FEATURE_NAME constants )
  faccCode | Feature and Attribute Coding Catalog feature code else NULL for all feature codes ( see MIL-PRF-89023 )
  intAttribColName | additional integer attribute column else NULL to ignore
  intAttribVal | integer attribute value to compare against if intAttribColName != NULL
  charAttribColName | additional character attribute column else NULL to ignore additional attribute
  charAttribVal | character attribute value to compare against if charAttribColName != NULL
  desFeatIndex | zero based feature index for specific feature else -1 for all
  visible | true to show boundary else false to hide

Returns
  true if at least one area boundary visibility was changed

## ◆ SetAreaFeaturePolygonStipple()

bool DNCMapChartDataSource::SetAreaFeaturePolygonStipple | ( | const int | libNum,
|  | const char *const | covName,
|  | const char *const | featClassName,
|  | const char *const | faccCode,
|  | const char *const | intAttribColName,
|  | const unsigned int | intAttribVal,
|  | const char *const | charAttribColName,
|  | const char *const | charAttribVal,
|  | const int | desFeatIndex,
|  | const GLPolyStipplePattern *const | polyStipplePattern
| ) |  |

Set area feature(s) polygon stipple pattern in a library

Parameters

  libNum | zero based library number else -1 for all loaded libraries
  covName | name (as defined by MIL-PRF-89023) of coverage else NULL for all coverages. ( see DNCUtil COVERAGE_NAME constants )
  featClassName | name (as defined by MIL-PRF-89023) of feature class else NULL for all features. ( see DNCUtil FEATURE_NAME constants )
  faccCode | Feature and Attribute Coding Catalog feature code else NULL for all feature codes ( see MIL-PRF-89023 )
  intAttribColName | additional integer attribute column else NULL to ignore
  intAttribVal | integer attribute value to compare against if intAttribColName != NULL
  charAttribColName | additional character attribute column else NULL to ignore additional attribute
  charAttribVal | character attribute value to compare against if charAttribColName != NULL
  desFeatIndex | zero based feature index for specific feature else -1 for all
  polyStipplePattern | polygon stipple pattern else NULL to disable polygon stipple

Returns
  true if at least one feature polygon stipple was changed

## ◆ SetConfigLibCB()

void DNCMapChartDataSource::SetConfigLibCB | ( | ConfigLibraryCB const | configLibCB,
|  | void *const | userData,
|  | const bool | reconfigAll
| ) |  |

Set the callback for automatically configuring libraries when loaded

Parameters

  configLibCB | callback else NULL to clear callback
  userData | user supplied data to be handed to callback
  reconfigAll | true to reconfig all loaded libraries with new callback (if NULL != configLibCB) else false

## ◆ SetCoverageVisible()

bool DNCMapChartDataSource::SetCoverageVisible | ( | const int | libNum,
|  | const char *const | covName,
|  | const bool | visible
| ) |  |

Show/Hide a particular (or all) coverage(s) in a library

Parameters

  libNum | zero based library number else -1 for all loaded libraries
  covName | name (as defined by MIL-PRF-89023) of coverage to show/hide else NULL for all coverages. ( see DNCUtil COVERAGE_NAME constants )
  visible | true to show else false to hide

Returns
  true if at least one coverage show/hide status was set else false

## ◆ SetFeatureColor()

bool DNCMapChartDataSource::SetFeatureColor | ( | const int | libNum,
|  | const char *const | covName,
|  | const char *const | featClassName,
|  | const char *const | faccCode,
|  | const char *const | intAttribColName,
|  | const unsigned int | intAttribVal,
|  | const char *const | charAttribColName,
|  | const char *const | charAttribVal,
|  | const int | desFeatIndex,
|  | const glsColor & | color
| ) |  |

Set feature(s) color in a library

Parameters

  libNum | zero based library number else -1 for all loaded libraries
  covName | name (as defined by MIL-PRF-89023) of coverage else NULL for all coverages. ( see DNCUtil COVERAGE_NAME constants )
  featClassName | name (as defined by MIL-PRF-89023) of feature class else NULL for all features. ( see DNCUtil FEATURE_NAME constants )
  faccCode | Feature and Attribute Coding Catalog feature code else NULL for all feature codes ( see MIL-PRF-89023 )
  intAttribColName | additional integer attribute column else NULL to ignore
  intAttribVal | integer attribute value to compare against if intAttribColName != NULL
  charAttribColName | additional character attribute column else NULL to ignore additional attribute
  charAttribVal | character attribute value to compare against if charAttribColName != NULL
  desFeatIndex | zero based feature index for specific feature else -1 for all
  color | color

Returns
  true if at least one feature color was changed

## ◆ SetFeatureDrawOrder()

bool DNCMapChartDataSource::SetFeatureDrawOrder | ( | const int | libNum,
|  | const char *const | covName,
|  | const char *const | featClassName,
|  | const char *const | faccCode,
|  | const unsigned int | drawOrder
| ) |  |

Set the draw order for a feature class in a coverage of a library. All features behid given draw order will be pushed down the draw order (further back in draw order).

Parameters

  libNum | zero based library number else -1 for all loaded libraries
  covName | name (as defined by MIL-PRF-89023) of coverage ( see DNCUtil COVERAGE_NAME constants )
  featClassName | name (as defined by MIL-PRF-89023) of feature class ( see DNCUtil FEATURE_NAME constants )
  faccCode | Feature and Attribute Coding Catalog feature code else NULL for feature classes that do use FACC codes ( see MIL-PRF-89023 )
  drawOrder | zero based desired draw order ( draw Order 0 is the last to draw )

Returns
  true if success else false

## ◆ SetFeatureLineStipple()

bool DNCMapChartDataSource::SetFeatureLineStipple | ( | const int | libNum,
|  | const char *const | covName,
|  | const char *const | featClassName,
|  | const char *const | faccCode,
|  | const char *const | intAttribColName,
|  | const unsigned int | intAttribVal,
|  | const char *const | charAttribColName,
|  | const char *const | charAttribVal,
|  | const int | desFeatIndex,
|  | const GLint | stippleFactor,
|  | const GLushort | stipplePattern
| ) |  |

Set feature(s) line stippling in a library ( sets area boundary stipple for area features )

Parameters

  libNum | zero based library number else -1 for all loaded libraries
  covName | name (as defined by MIL-PRF-89023) of coverage else NULL for all coverages. ( see DNCUtil COVERAGE_NAME constants )
  featClassName | name (as defined by MIL-PRF-89023) of feature class else NULL for all features. ( see DNCUtil FEATURE_NAME constants )
  faccCode | Feature and Attribute Coding Catalog feature code else NULL for all feature codes ( see MIL-PRF-89023 )
  intAttribColName | additional integer attribute column else NULL to ignore
  intAttribVal | integer attribute value to compare against if intAttribColName != NULL
  charAttribColName | additional character attribute column else NULL to ignore additional attribute
  charAttribVal | character attribute value to compare against if charAttribColName != NULL
  desFeatIndex | zero based feature index for specific feature else -1 for all
  stippleFactor | (0 if not stippled line) stipple factor (>=1) if line is stippled (see glLineStipple() )
  stipplePattern | stipple pattern if line is stippled (see glLineStipple() )

Returns
  true if at least one feature line stipple was changed

## ◆ SetFeatureVisible()

bool DNCMapChartDataSource::SetFeatureVisible | ( | const int | libNum,
|  | const char *const | covName,
|  | const char *const | featClassName,
|  | const char *const | faccCode,
|  | const char *const | intAttribColName,
|  | const unsigned int | intAttribVal,
|  | const char *const | charAttribColName,
|  | const char *const | charAttribVal,
|  | const int | desFeatIndex,
|  | const bool | visible
| ) |  |

Show/Hide feature(s) in a library

Parameters

  libNum | zero based library number else -1 for all loaded libraries
  covName | name (as defined by MIL-PRF-89023) of coverage else NULL for all coverages. ( see DNCUtil COVERAGE_NAME constants )
  featClassName | name (as defined by MIL-PRF-89023) of feature class else NULL for all features. ( see DNCUtil FEATURE_NAME constants )
  faccCode | Feature and Attribute Coding Catalog feature code else NULL for all feature codes ( see MIL-PRF-89023 )
  intAttribColName | additional integer attribute column else NULL to ignore
  intAttribVal | integer attribute value to compare against if intAttribColName != NULL
  charAttribColName | additional character attribute column else NULL to ignore additional attribute
  charAttribVal | character attribute value to compare against if charAttribColName != NULL
  desFeatIndex | zero based feature index for specific feature else -1 for all
  visible | true to show else false to hide

Returns
  true if at least one feature show/hide status was set else false

## ◆ SetLibraryVisible()

bool DNCMapChartDataSource::SetLibraryVisible | ( | const unsigned int | libNum,
|  | const bool | visible
| ) |  |

Show/Hide a library. A library will not be available for tiles if it is hidden

Parameters

  libNum | zero based libray number
  visible | true to show else false to hide

Returns
  true on success else false

## ◆ SetPointFeatureRenderCB()

bool DNCMapChartDataSource::SetPointFeatureRenderCB | ( | const int | libNum,
|  | const char *const | covName,
|  | const char *const | featClassName,
|  | const char *const | faccCode,
|  | const char *const | intAttribColName,
|  | const unsigned int | intAttribVal,
|  | const char *const | charAttribColName,
|  | const char *const | charAttribVal,
|  | const int | desFeatIndex,
|  | RenderPointFeatureCB const | renderCB,
|  | void *const | userData,
|  | const bool | useMapScale
| ) |  |

Set point feature(s) render callback in a library

Parameters

  libNum | zero based library number else -1 for all loaded libraries
  covName | name (as defined by MIL-PRF-89023) of coverage else NULL for all coverages. ( see DNCUtil COVERAGE_NAME constants )
  featClassName | name (as defined by MIL-PRF-89023) of feature class else NULL for all features. ( see DNCUtil FEATURE_NAME constants )
  faccCode | Feature and Attribute Coding Catalog feature code else NULL for all feature codes ( see MIL-PRF-89023 )
  intAttribColName | additional integer attribute column else NULL to ignore
  intAttribVal | integer attribute value to compare against if intAttribColName != NULL
  charAttribColName | additional character attribute column else NULL to ignore additional attribute
  charAttribVal | character attribute value to compare against if charAttribColName != NULL
  desFeatIndex | zero based feature index for specific feature else -1 for all
  renderCB | render callback else NULL for no callback
  userData | user supplied data to be handed to callback
  useMapScale | true if point feature should scale with the map (will become larger as the view zooms in), false is point feature should scale to attempt maintain the same size in logical space regardless of the map zoom

Returns
  true if at least one point feature callback was changed

## ◆ SetTextFeatureFont()

bool DNCMapChartDataSource::SetTextFeatureFont | ( | const int | libNum,
|  | const char *const | covName,
|  | const char *const | featClassName,
|  | const char *const | faccCode,
|  | const char *const | intAttribColName,
|  | const unsigned int | intAttribVal,
|  | const char *const | charAttribColName,
|  | const char *const | charAttribVal,
|  | const int | desFeatIndex,
|  | GlsFontBase *const | font
| ) |  |

Set text feature(s) font in a library

Parameters

  libNum | zero based library number else -1 for all loaded libraries
  covName | name (as defined by MIL-PRF-89023) of coverage else NULL for all coverages. ( see DNCUtil COVERAGE_NAME constants )
  featClassName | name (as defined by MIL-PRF-89023) of feature class else NULL for all features. ( see DNCUtil FEATURE_NAME constants )
  faccCode | Feature and Attribute Coding Catalog feature code else NULL for all feature codes ( see MIL-PRF-89023 )
  intAttribColName | additional integer attribute column else NULL to ignore
  intAttribVal | integer attribute value to compare against if intAttribColName != NULL
  charAttribColName | additional character attribute column else NULL to ignore additional attribute
  charAttribVal | character attribute value to compare against if charAttribColName != NULL
  desFeatIndex | zero based feature index for specific feature else -1 for all
  font | font for text feature

Returns
  true if at least one text feature font was changed

## ◆ ShowAll()

bool DNCMapChartDataSource::ShowAll | ( | const int | libNum,
|  | const bool | show
| ) |  |

Show/Hide all coverages and features in a library

Parameters

  libNum | zero based library number else -1 for all loaded libraries
  show | true to show else false to hide

Returns
  true if success else false

## ◆ StopRendering()

void DNCMapChartDataSource::StopRendering | ( |  | ) |

Stop the rendering thread. This method should be called before any data that may be accessed by the DNC render callbacks is deleted. This is typically called by the destructor of the component that owns this data source. StopRendering should only be called when you are about to delete the data source and it is no longer needed since the data source is not usable after the rendering thread has been killed.

## ◆ UnloadDNCLibrary()

bool DNCMapChartDataSource::UnloadDNCLibrary | ( | const unsigned int | libNum,
|  | const bool | async
| ) |  |

Unload a library in the database

Parameters

  libNum | zero based library number ( < GetLibraryCount() )
  async | true to unload asynchronously ( IsLibraryLoaded() will still return false immediately )

Returns
  true if success else false

## ◆ UnlockLibrary()

bool DNCMapChartDataSource::UnlockLibrary | ( | const unsigned int | libNum | ) |

Unlock the given library. Any pointer received from a previous LockLibrary call is now invalid.

Parameters

  libNum | zero based library number ( < GetLibraryCount() )

Returns
  true if success else false

## Member Data Documentation

## ◆ _cellPointers

CellPointerArray disti::DNCMapChartDataSource::_cellPointers
| protected

array of pointers to map cells

## ◆ _cellPointersMutex

Mutex* disti::DNCMapChartDataSource::_cellPointersMutex
| protected

lock for _cellPointers

## ◆ _configLibCB

ConfigLibraryCB disti::DNCMapChartDataSource::_configLibCB
| protected

user supplied library configuration callback else false

## ◆ _configUserData

void* disti::DNCMapChartDataSource::_configUserData
| protected

user supplied data for library config callback else NULL

## ◆ _dncDb

DNCDatabase* disti::DNCMapChartDataSource::_dncDb
| protected

DNC database else NULL

## ◆ _isValid

VPFUtil::WarningBool disti::DNCMapChartDataSource::_isValid
| protected

true if source is valid else false

## ◆ _libraries

LibraryArray disti::DNCMapChartDataSource::_libraries
| protected

LibrarySlots 's for each lib in the database

## ◆ _renderThread

DNCAsyncCellRenderThread* disti::DNCMapChartDataSource::_renderThread
| protected

async cell rendering thread else NULL

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

- gls_map_dnc.h
- gls_map_dnc.cpp