This class defines a set of possible values for an attribute, for use with the TSLFeatureClassConfig and TSLFeatureClassifier objects.
- See also
- TSLFeatureClassifier
-
TSLFeatureClassConfig
◆ TSLAttributeValues() [1/2]
TSLAttributeValues::TSLAttributeValues |
( |
const char * | name | ) |
|
Constructor.
- Parameters
-
name | The name of this attribute. |
◆ ~TSLAttributeValues()
TSLAttributeValues::~TSLAttributeValues |
( |
| ) |
|
◆ TSLAttributeValues() [2/2]
◆ addOccurrence()
void TSLAttributeValues::addOccurrence |
( |
const char * | value | ) |
|
Add an occurrence of a value.
- Parameters
-
value | The text of the value to be added. |
◆ getValue()
const char * TSLAttributeValues::getValue |
( |
unsigned int | index | ) |
const |
Query a value of this attribute.
- Parameters
-
index | The 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
-
value | The 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=()
◆ setOccurrences()
void TSLAttributeValues::setOccurrences |
( |
const char * | value, |
|
|
unsigned int | occurrences ) |
Set the number of times a given value has occurred for this attribute.
- Parameters
-
value | The text of the value to be added. |
occurrences | The number of occurrences of the value. |