GL Studio C++ Runtime API
DNCMapChartDataSource Class Reference

#include <gls_map_dnc.h>

Inheritance diagram for DNCMapChartDataSource:
GlsMapChartDataSource

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::QueryResultsQueryFeatures (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 GlsMapChartDataSource
virtual ~GlsMapChartDataSource ()
 Destructor for abstract base class.
 
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 GlsMapChartDataSource
 GlsMapChartDataSource ()
 Constructor for subclasses.
 

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
 
GLXExtensions * _glEx
 

Detailed Description

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

Member Typedef Documentation

typedef DynamicArray<DNCMapChartCell*, true> CellPointerArray
protected

array of DNC map cell pointers

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

config library callback for a user supplied library configuration routine

Parameters
userDatauser supplied data for callback (supplied with SetConfigLibCB())
dncSourceDNC data source containing library to configure
libNumzero based library number of library to configure else -1 for all libraries in source
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)

Feature Iterator callback for a user supplied feature configuration routine.

Parameters
userDatauser supplied data for callback (supplied with IterateFeatures())
dncSourceDNC source containing feature
libNumzero based library number of library containing feature
covNamename (as defined by MIL-PRF-89023) of coverage containing feature ( see DNCUtil COVERAGE_NAME constants )
featClassNamename (as defined by MIL-PRF-89023) of feature class containing feature ( see DNCUtil FEATURE_NAME constants )
featTypetype of feature
featIndexzero based index into feature class for feature
featTableHeadertable header for feature table containing feature
featRowrow in feature table corresponding to the feature data for the feature
Returns
true if a configuration change was made to a feature else false
typedef GLubyte GLPolyStipplePattern[128u]

GL polygon stipple pattern

typedef DynamicArray<LibrarySlot, false> LibraryArray
protected

array of library slots

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)

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
userDatauser supplied data for callback (supplied with SetPointFeatureRenderCB())
dncSourceDNC source containing point feature
libNumzero based library number of library containing point
covNamename (as defined by MIL-PRF-89023) of coverage containing point ( see DNCUtil COVERAGE_NAME constants )
featClassNamename (as defined by MIL-PRF-89023) of feature class containing point ( see DNCUtil FEATURE_NAME constants )
featIndexzero based index into feature class for point
featTableHeadertable header for point feature table containing point
featRowrow in feature table corresponding to the point feature data for point
pointCoordlocation of point feature
colorcolor assigned to point feature
regionregion of the chart that is rendering
logicalHeightheight in logical units corresponding to height of render region

Constructor & Destructor Documentation

Member Function Documentation

DNCMapChartCell* 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
libNumzero based library number
tileRectrect for cell
tileLogicalHeightThe height of the view in logical space
layerlayer number
Returns
matching cell in list else NULL
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.

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 int GetCompletedCellCount ( const unsigned int  libNum)

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

Parameters
libNumzero based libray number
Returns
number of map chart cells that are currently completed (rendered) for the given library
unsigned int GetLibraryCount ( void  ) const

Get the number of libraries in the database

Returns
number of libraries in the database else 0
bool GetLibraryCoverageArea ( const unsigned int  libNum,
double &  area 
) const

Get the actual coverage area for a library

Parameters
libNumzero based library number
area[out] receives area in degrees (lonxlat) on success
Returns
true on success else false
bool 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
libNumzero 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
const char* GetLibraryName ( const unsigned int  libNum) const

Get the name of the given library

Parameters
libNumzero based library number
Returns
name of library else NULL
bool GetLibraryScale ( const unsigned int  libNum,
unsigned int &  scale 
)

Get the scale of the chart in a given library

Parameters
libNumzero 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
VPFUtil::SecurityClass GetLibrarySecurityClass ( const unsigned int  libNum)

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

Parameters
libNumzero based library number
Returns
security class for library else VPFUtil::SECURITY_CLASS_UNCLASSIFIED if library is not loaded or is invalid
DNCMapChartCell* 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
static DNCMapChartCell* getNextCellToRender ( void *const  pArguments)
staticprotected

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

Parameters
pArgumentspointer to DNCMapChartDataSource
Returns
next cell to render else NULL
void 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
libNumzero based library number in question
bool IsLibraryLoaded ( const unsigned int  libNum)

Determine if a given library is loaded

Parameters
libNumzero based library number for lib in question
Returns
true if loading else false
bool IsLibraryLoading ( const unsigned int  libNum) const

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

Parameters
libNumzero based library number for lib in question
Returns
true if loading else false
bool IsLibraryVisible ( const unsigned int  libNum)

Determine if a library is visible (available for tiles)

Parameters
libNumzero based libray number
Returns
true if visible else false
bool IsValid ( void  ) const
inline

Determine if the data source is valid

Precondition
LoadPath has been called
Returns
true if valid else false
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 
)

Iterate over features

Parameters
featureIteratorCBuser supplied callback to be called when iterating
userDatauser supplied data to be handed to callback
libNumzero based library number else -1 for all loaded libraries
covNamename (as defined by MIL-PRF-89023) of coverage else NULL for all coverages. ( see DNCUtil COVERAGE_NAME constants )
featClassNamename (as defined by MIL-PRF-89023) of feature class else NULL for all features. ( see DNCUtil FEATURE_NAME constants )
faccCodeFeature and Attribute Coding Catalog feature code else NULL for all feature codes ( see MIL-PRF-89023 )
intAttribColNameadditional integer attribute column else NULL to ignore
intAttribValinteger attribute value to compare against if intAttribColName != NULL
charAttribColNameadditional character attribute column else NULL to ignore additional attribute
charAttribValcharacter attribute value to compare against if charAttribColName != NULL
desFeatIndexzero based feature index for specific feature else -1 for all
Returns
true if at least one feature configuration was changed
bool LibraryCoveragePointTest ( const unsigned int  libNum,
const double  longitude,
const double  latitude 
) const

Test a point against the actual coverage of a given library

Parameters
libNumzero based library number
longitudelongitude of point
latitudelatitude of point
Returns
true if in actual library coverage else false
bool LoadDNCLibrary ( const unsigned int  libNum,
const bool  async,
const bool  preTessellate 
)

Load a library in the database

Parameters
libNumzero based library number ( < GetLibraryCount() )
asynctrue to load asynchronously (check IsLibraryLoaded() to see when library is finally loaded)
preTessellatetrue to pre-tessellate area features during loading else false to tessellate on demand when rendering
Returns
true if success else false
void 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
dncRootPathpath to dnc root database directory
bool 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
libNumzero 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)
bool LowerAsyncCellRenderPriority ( const bool  belowNormal)

Lower/Restore the priority of the async cell render thread

Parameters
belowNormaltrue to set thread priority to below normal else false to set priority to normal
Returns
true if success else false
bool LowerAsyncLoadPriority ( const bool  belowNormal)

Lower/Restore the priority of the async load threads

Parameters
belowNormaltrue to set thread priority to below normal else false to set priority to normal
Returns
true if success else false
bool LowerAsyncUnloadPriority ( const bool  belowNormal)

Lower/Restore the priority of the async unload thread

Parameters
belowNormaltrue to set thread priority to below normal else false to set priority to normal
Returns
true if success else false
bool 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
void 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
libNumzero based lib number
libExtentsextents of library
viewview coverage
layerlayer number
viewLogicalHeightThe height of the view in logical space
viewGeoHeightThe height of the view in geographic space
cellListcellList to populate
void 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
viewThe GlsMapView used to draw the chart
chartThe GlsMapChart that is being drawn

Reimplemented from GlsMapChartDataSource.

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

Query a library in the database about its features

Parameters
libNumzero based library number ( < GetLibraryCount() )
regiongeographic region to query
onlyVisibleFeaturestrue to only return currently visible features else false for all features
Returns
query results else NULL
void RefreshCellList ( void  )
protected

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

bool 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
libNumzero based library number of lib in question
Returns
true if lib pointer changed
void RefreshLibList ( void  )
protected

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

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 
)

Set area feature(s) boundary color in a library

Parameters
libNumzero based library number else -1 for all loaded libraries
covNamename (as defined by MIL-PRF-89023) of coverage else NULL for all coverages. ( see DNCUtil COVERAGE_NAME constants )
featClassNamename (as defined by MIL-PRF-89023) of feature class else NULL for all features. ( see DNCUtil FEATURE_NAME constants )
faccCodeFeature and Attribute Coding Catalog feature code else NULL for all feature codes ( see MIL-PRF-89023 )
intAttribColNameadditional integer attribute column else NULL to ignore
intAttribValinteger attribute value to compare against if intAttribColName != NULL
charAttribColNameadditional character attribute column else NULL to ignore additional attribute
charAttribValcharacter attribute value to compare against if charAttribColName != NULL
desFeatIndexzero based feature index for specific feature else -1 for all
colorcolor
Returns
true if at least one area feature boundary color was changed
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 
)

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

Parameters
libNumzero based library number else -1 for all loaded libraries
covNamename (as defined by MIL-PRF-89023) of coverage else NULL for all coverages. ( see DNCUtil COVERAGE_NAME constants )
featClassNamename (as defined by MIL-PRF-89023) of feature class else NULL for all features. ( see DNCUtil FEATURE_NAME constants )
faccCodeFeature and Attribute Coding Catalog feature code else NULL for all feature codes ( see MIL-PRF-89023 )
intAttribColNameadditional integer attribute column else NULL to ignore
intAttribValinteger attribute value to compare against if intAttribColName != NULL
charAttribColNameadditional character attribute column else NULL to ignore additional attribute
charAttribValcharacter attribute value to compare against if charAttribColName != NULL
desFeatIndexzero based feature index for specific feature else -1 for all
visibletrue to show boundary else false to hide
Returns
true if at least one area boundary visibility was changed
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 
)

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

Parameters
libNumzero based library number else -1 for all loaded libraries
covNamename (as defined by MIL-PRF-89023) of coverage else NULL for all coverages. ( see DNCUtil COVERAGE_NAME constants )
featClassNamename (as defined by MIL-PRF-89023) of feature class else NULL for all features. ( see DNCUtil FEATURE_NAME constants )
faccCodeFeature and Attribute Coding Catalog feature code else NULL for all feature codes ( see MIL-PRF-89023 )
intAttribColNameadditional integer attribute column else NULL to ignore
intAttribValinteger attribute value to compare against if intAttribColName != NULL
charAttribColNameadditional character attribute column else NULL to ignore additional attribute
charAttribValcharacter attribute value to compare against if charAttribColName != NULL
desFeatIndexzero based feature index for specific feature else -1 for all
polyStipplePatternpolygon stipple pattern else NULL to disable polygon stipple
Returns
true if at least one feature polygon stipple was changed
void SetConfigLibCB ( ConfigLibraryCB const  configLibCB,
void *const  userData,
const bool  reconfigAll 
)

Set the callback for automatically configuring libraries when loaded

Parameters
configLibCBcallback else NULL to clear callback
userDatauser supplied data to be handed to callback
reconfigAlltrue to reconfig all loaded libraries with new callback (if NULL != configLibCB) else false
bool SetCoverageVisible ( const int  libNum,
const char *const  covName,
const bool  visible 
)

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

Parameters
libNumzero based library number else -1 for all loaded libraries
covNamename (as defined by MIL-PRF-89023) of coverage to show/hide else NULL for all coverages. ( see DNCUtil COVERAGE_NAME constants )
visibletrue to show else false to hide
Returns
true if at least one coverage show/hide status was set else false
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 
)

Set feature(s) color in a library

Parameters
libNumzero based library number else -1 for all loaded libraries
covNamename (as defined by MIL-PRF-89023) of coverage else NULL for all coverages. ( see DNCUtil COVERAGE_NAME constants )
featClassNamename (as defined by MIL-PRF-89023) of feature class else NULL for all features. ( see DNCUtil FEATURE_NAME constants )
faccCodeFeature and Attribute Coding Catalog feature code else NULL for all feature codes ( see MIL-PRF-89023 )
intAttribColNameadditional integer attribute column else NULL to ignore
intAttribValinteger attribute value to compare against if intAttribColName != NULL
charAttribColNameadditional character attribute column else NULL to ignore additional attribute
charAttribValcharacter attribute value to compare against if charAttribColName != NULL
desFeatIndexzero based feature index for specific feature else -1 for all
colorcolor
Returns
true if at least one feature color was changed
bool 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
libNumzero based library number else -1 for all loaded libraries
covNamename (as defined by MIL-PRF-89023) of coverage ( see DNCUtil COVERAGE_NAME constants )
featClassNamename (as defined by MIL-PRF-89023) of feature class ( see DNCUtil FEATURE_NAME constants )
faccCodeFeature and Attribute Coding Catalog feature code else NULL for feature classes that do use FACC codes ( see MIL-PRF-89023 )
drawOrderzero based desired draw order ( draw Order 0 is the last to draw )
Returns
true if success else false
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 
)

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

Parameters
libNumzero based library number else -1 for all loaded libraries
covNamename (as defined by MIL-PRF-89023) of coverage else NULL for all coverages. ( see DNCUtil COVERAGE_NAME constants )
featClassNamename (as defined by MIL-PRF-89023) of feature class else NULL for all features. ( see DNCUtil FEATURE_NAME constants )
faccCodeFeature and Attribute Coding Catalog feature code else NULL for all feature codes ( see MIL-PRF-89023 )
intAttribColNameadditional integer attribute column else NULL to ignore
intAttribValinteger attribute value to compare against if intAttribColName != NULL
charAttribColNameadditional character attribute column else NULL to ignore additional attribute
charAttribValcharacter attribute value to compare against if charAttribColName != NULL
desFeatIndexzero 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() )
stipplePatternstipple pattern if line is stippled (see glLineStipple() )
Returns
true if at least one feature line stipple was changed
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 
)

Show/Hide feature(s) in a library

Parameters
libNumzero based library number else -1 for all loaded libraries
covNamename (as defined by MIL-PRF-89023) of coverage else NULL for all coverages. ( see DNCUtil COVERAGE_NAME constants )
featClassNamename (as defined by MIL-PRF-89023) of feature class else NULL for all features. ( see DNCUtil FEATURE_NAME constants )
faccCodeFeature and Attribute Coding Catalog feature code else NULL for all feature codes ( see MIL-PRF-89023 )
intAttribColNameadditional integer attribute column else NULL to ignore
intAttribValinteger attribute value to compare against if intAttribColName != NULL
charAttribColNameadditional character attribute column else NULL to ignore additional attribute
charAttribValcharacter attribute value to compare against if charAttribColName != NULL
desFeatIndexzero based feature index for specific feature else -1 for all
visibletrue to show else false to hide
Returns
true if at least one feature show/hide status was set else false
bool 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
libNumzero based libray number
visibletrue to show else false to hide
Returns
true on success else false
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 
)

Set point feature(s) render callback in a library

Parameters
libNumzero based library number else -1 for all loaded libraries
covNamename (as defined by MIL-PRF-89023) of coverage else NULL for all coverages. ( see DNCUtil COVERAGE_NAME constants )
featClassNamename (as defined by MIL-PRF-89023) of feature class else NULL for all features. ( see DNCUtil FEATURE_NAME constants )
faccCodeFeature and Attribute Coding Catalog feature code else NULL for all feature codes ( see MIL-PRF-89023 )
intAttribColNameadditional integer attribute column else NULL to ignore
intAttribValinteger attribute value to compare against if intAttribColName != NULL
charAttribColNameadditional character attribute column else NULL to ignore additional attribute
charAttribValcharacter attribute value to compare against if charAttribColName != NULL
desFeatIndexzero based feature index for specific feature else -1 for all
renderCBrender callback else NULL for no callback
userDatauser supplied data to be handed to callback
useMapScaletrue 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
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 
)

Set text feature(s) font in a library

Parameters
libNumzero based library number else -1 for all loaded libraries
covNamename (as defined by MIL-PRF-89023) of coverage else NULL for all coverages. ( see DNCUtil COVERAGE_NAME constants )
featClassNamename (as defined by MIL-PRF-89023) of feature class else NULL for all features. ( see DNCUtil FEATURE_NAME constants )
faccCodeFeature and Attribute Coding Catalog feature code else NULL for all feature codes ( see MIL-PRF-89023 )
intAttribColNameadditional integer attribute column else NULL to ignore
intAttribValinteger attribute value to compare against if intAttribColName != NULL
charAttribColNameadditional character attribute column else NULL to ignore additional attribute
charAttribValcharacter attribute value to compare against if charAttribColName != NULL
desFeatIndexzero based feature index for specific feature else -1 for all
fontfont for text feature
Returns
true if at least one text feature font was changed
bool ShowAll ( const int  libNum,
const bool  show 
)

Show/Hide all coverages and features in a library

Parameters
libNumzero based library number else -1 for all loaded libraries
showtrue to show else false to hide
Returns
true if success else false
void 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.

bool UnloadDNCLibrary ( const unsigned int  libNum,
const bool  async 
)

Unload a library in the database

Parameters
libNumzero based library number ( < GetLibraryCount() )
asynctrue to unload asynchronously ( IsLibraryLoaded() will still return false immediately )
Returns
true if success else false
bool UnlockLibrary ( const unsigned int  libNum)

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

Parameters
libNumzero based library number ( < GetLibraryCount() )
Returns
true if success else false

Member Data Documentation

CellPointerArray _cellPointers
protected

array of pointers to map cells

Mutex* _cellPointersMutex
protected

lock for _cellPointers

ConfigLibraryCB _configLibCB
protected

user supplied library configuration callback else false

void* _configUserData
protected

user supplied data for library config callback else NULL

DNCDatabase* _dncDb
protected

DNC database else NULL

GLXExtensions* _glEx
protected

GLX extensions else NULL

VPFUtil::WarningBool _isValid
protected

true if source is valid else false

LibraryArray _libraries
protected

LibrarySlots 's for each lib in the database

DNCAsyncCellRenderThread* _renderThread
protected

async cell rendering thread else NULL


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