MapLink Pro 11.1.2.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Loading...
Searching...
No Matches
TSLS63DataLayerScaleBands Class Reference

Detailed Description

This class is used to configure the visibility of S57 scale bands for the TSLS63DataLayer.

An S57 scale band can have two threshold values associated with it; the lower threshold to define the lowest Map Unit per Pixel value that the band will be visible and the upper threshold to define the highest Map Unit per Pixel value that the band will be visible.

The thresholds can overlap between scale bands, as it may be desirable to have multiple scale bands visible at the same time. Therefore the order in which a scale band is added to this class is significate. When two or more scale bands are defined to be visible at a particular zoom level, then the scale band added first will be drawn first while the band added last will be drawn last. It would usually be the case therefore that the user would add the lowest resolution band to this class first and the highest resolution band last.

NOTE: A scale band may only be added once; re-adding the scale band will cause the existing entry to be removed.

Public Member Functions

 TSLS63DataLayerScaleBands ()
 
void addBand (TSLS63ScaleBandEnum scaleBand, double lowerThreshold, double upperThreshold)
 
int count () const
 
void destroy ()
 
void insertBandAt (int index, TSLS63ScaleBandEnum scaleBand, double lowerThreshold, double upperThreshold)
 
bool getBand (TSLS63ScaleBandEnum scaleBand, double &lowerThreshold, double &upperThreshold) const
 
bool getBandAt (int index, TSLS63ScaleBandEnum &scaleBand, double &lowerThreshold, double &upperThreshold) const
 
bool removeBand (TSLS63ScaleBandEnum scaleBand)
 
bool removeBandAt (int index)
 
void * operator new (size_t size) TSL_NO_THROW
 
void * operator new (size_t size, char *filename, int line)
 

Constructor & Destructor Documentation

◆ TSLS63DataLayerScaleBands()

TSLS63DataLayerScaleBands::TSLS63DataLayerScaleBands ( )

Member Function Documentation

◆ addBand()

void TSLS63DataLayerScaleBands::addBand ( TSLS63ScaleBandEnum scaleBand,
double lowerThreshold,
double upperThreshold )

Adds a scale band to the TSLS63DataLayerScaleBands class. If that scale band has already been added, then it will be removed first

Parameters
scaleBandThe S57 scale band to add
lowerThresholdThe lower threshold value in Map Units per Pixel.
upperThresholdThe upper threshold value in Map Units per Pixel.

◆ count()

int TSLS63DataLayerScaleBands::count ( ) const

Returns the number of scale band that this class contains

◆ destroy()

void TSLS63DataLayerScaleBands::destroy ( )

Used to destroy instances of this class.

◆ getBand()

bool TSLS63DataLayerScaleBands::getBand ( TSLS63ScaleBandEnum scaleBand,
double & lowerThreshold,
double & upperThreshold ) const

Queries the threshold values for the specified scale band.

Parameters
scaleBandThe S57 scale band to query
lowerThresholdStorage for the lower threshold value in Map Units per Pixel.
upperThresholdStorage for the upper threshold value in Map Units per Pixel.
Returns
true if successful, false otherwise. If the scale band has not been added to this class then false will be returned.

◆ getBandAt()

bool TSLS63DataLayerScaleBands::getBandAt ( int index,
TSLS63ScaleBandEnum & scaleBand,
double & lowerThreshold,
double & upperThreshold ) const

Queries the scale band and threshold values at the specified index

Parameters
indexThe index to query at
scaleBandStorage for theS57 scale band
lowerThresholdStorage for the lower threshold value in Map Units per Pixel.
upperThresholdStorage for the upper threshold value in Map Units per Pixel.
Returns
true if successful, false otherwise. If the index passed is invalid then false will be returned.

◆ insertBandAt()

void TSLS63DataLayerScaleBands::insertBandAt ( int index,
TSLS63ScaleBandEnum scaleBand,
double lowerThreshold,
double upperThreshold )

Inserts a scale band at a particular index to the TSLS63DataLayerScaleBands class. If that scale band has already been added, then it will be removed first

Parameters
indexThe index to insert the scale band at.
scaleBandThe S57 scale band to add
lowerThresholdThe lower threshold value in Map Units per Pixel.
upperThresholdThe upper threshold value in Map Units per Pixel.

Should the index passed be invalid, then the scale band will be added to the back.

◆ operator new() [1/2]

void * TSLS63DataLayerScaleBands::operator new ( size_t size)

Allocation override for API redirection.

◆ operator new() [2/2]

void * TSLS63DataLayerScaleBands::operator new ( size_t size,
char * filename,
int line )

When included in an MFC application in debug mode, the debug new expects this to be here. Override it and return the same as the normal one. The library must include it when compiled in release mode, since the user's application may be in debug mode.

◆ removeBand()

bool TSLS63DataLayerScaleBands::removeBand ( TSLS63ScaleBandEnum scaleBand)

Removes the scale band specified from this class.

Parameters
scaleBandThe scale band to remove
Returns
true on success, false otherwise. If the scale band is not contained then false will be returned.

◆ removeBandAt()

bool TSLS63DataLayerScaleBands::removeBandAt ( int index)

Removes the scale band at specified index from this class.

Parameters
indexThe index of the scale band to remove
Returns
true on success, false otherwise. If the index specified is not valid then false will be returned.