MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLAttributeValues Class Reference

Detailed Description

This class defines a set of possible values for an attribute, for use with the TSLFeatureClassConfig and TSLFeatureClassifier objects.

See also
TSLFeatureClassifier
TSLFeatureClassConfig

Public Member Functions

 TSLAttributeValues (const char *name)
 
 ~TSLAttributeValues ()
 Destructor.
 
 TSLAttributeValues (const TSLAttributeValues &)
 Copy constructor.
 
TSLAttributeValuesoperator= (const TSLAttributeValues &)
 Copy assignment.
 
const char * name () const
 
unsigned int numValues () const
 
const char * getValue (unsigned int index) const
 
unsigned int numOccurrences (const char *value) const
 
void addOccurrence (const char *value)
 
void setOccurrences (const char *value, unsigned int occurrences)
 

Constructor & Destructor Documentation

◆ TSLAttributeValues() [1/2]

TSLAttributeValues::TSLAttributeValues ( const char * name)

Constructor.

Parameters
nameThe name of this attribute.

◆ ~TSLAttributeValues()

TSLAttributeValues::~TSLAttributeValues ( )

Destructor.

◆ TSLAttributeValues() [2/2]

TSLAttributeValues::TSLAttributeValues ( const TSLAttributeValues & )

Copy constructor.

Member Function Documentation

◆ addOccurrence()

void TSLAttributeValues::addOccurrence ( const char * value)

Add an occurrence of a value.

Parameters
valueThe text of the value to be added.

◆ getValue()

const char * TSLAttributeValues::getValue ( unsigned int index) const

Query a value of this attribute.

Parameters
indexThe index of the value to query.
Returns
A string containing the attribute value, null on error.

◆ name()

const char * TSLAttributeValues::name ( ) const

Query the name of this attribute.

Returns
The name of this attribute.

◆ numOccurrences()

unsigned int TSLAttributeValues::numOccurrences ( const char * value) const

Query the number of times a given value has occurred for this attribute.

Parameters
valueThe name of the value to be queried.
Returns
The number of occurrences, zero if the value is not found.

◆ numValues()

unsigned int TSLAttributeValues::numValues ( ) const

Query the number of distinct values this attribute has.

Returns
The number of values.

◆ operator=()

TSLAttributeValues & TSLAttributeValues::operator= ( const TSLAttributeValues & )

Copy assignment.

◆ setOccurrences()

void TSLAttributeValues::setOccurrences ( const char * value,
unsigned int occurrences )

Set the number of times a given value has occurred for this attribute.

Parameters
valueThe text of the value to be added.
occurrencesThe number of occurrences of the value.