![]() |
MapLink Pro 11.2
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
A class to encapsulate a collection of MapLink features as defined in the class TSLFeature.
Some methods will allow hierarchical names such as 'roads.motorways'. This example shows that the parent feature called 'roads' has a child feature called 'motorways'.
Public Member Functions | |
| TSLFeatureList (bool caseSensitive=false) | |
| TSLFeatureList (const TSLFeatureList &other) | |
| Copy constructor. | |
| TSLFeatureList & | operator= (const TSLFeatureList &other) |
| Assignment operator. | |
| ~TSLFeatureList () | |
| Destructor. | |
| void | clear () |
| Remove any existing entries from the feature list. | |
| unsigned int | append (const TSLFeatureList &other) |
| bool | addFeature (TSLFeature *feature) |
| unsigned int | size () const |
| TSLFeature * | queryFeature (unsigned int index) const |
| TSLFeature * | operator[] (unsigned int index) const |
| TSLFeature * | queryFeature (const char *featureName, const char *product=NULL) const |
| bool | removeFeature (unsigned int index) |
| bool | removeFeature (const char *featureName, const char *product=NULL) |
| bool | renameFeature (const char *featureName, const char *newFeatureName, const char *product=NULL) |
| bool | caseSensitive () const |
| void | caseSensitive (bool sensitive) |
| TSLFeatureList::TSLFeatureList | ( | bool | caseSensitive = false | ) |
Constructor.
| caseSensitive | true to use case sensitive section and feature names in the list. |
| TSLFeatureList::TSLFeatureList | ( | const TSLFeatureList & | other | ) |
Copy constructor.
| TSLFeatureList::~TSLFeatureList | ( | ) |
Destructor.
| bool TSLFeatureList::addFeature | ( | TSLFeature * | feature | ) |
Add a feature.
The provided feature will be added at the top level of the feature hierarchy. The provided feature will not be added if it has a parent.
| feature | The feature to add. Ownership of this feature will be transferred to the TSLFeatureList if the feature is added. |
true if the feature was added, false otherwise. | unsigned int TSLFeatureList::append | ( | const TSLFeatureList & | other | ) |
Append another feature list.
All top level features will be copied into this feature list. Any features which already exist in this list will not be copied.
| other | The feature list to append. |
| bool TSLFeatureList::caseSensitive | ( | ) | const |
Query whether the feature list is case sensitive.
true if the list is case sensitive, false otherwise | void TSLFeatureList::caseSensitive | ( | bool | sensitive | ) |
Set whether the feature list is case sensitive.
| sensitive | true to make the list case sensitive, false otherwise. |
| void TSLFeatureList::clear | ( | ) |
Remove any existing entries from the feature list.
| TSLFeatureList & TSLFeatureList::operator= | ( | const TSLFeatureList & | other | ) |
Assignment operator.
| TSLFeature * TSLFeatureList::operator[] | ( | unsigned int | index | ) | const |
Array operator.
| TSLFeature * TSLFeatureList::queryFeature | ( | const char * | featureName, |
| const char * | product = NULL ) const |
Query a feature from the list.
This method may be used to query top-level features, or a child feature within the hierarchy. The returned TSLFeature may be modified, however must not be deleted by the application.
| featureName | The name of the feature. |
| product | The product specification of the feature. |
| TSLFeature * TSLFeatureList::queryFeature | ( | unsigned int | index | ) | const |
Query a feature from the list.
This method may be used to query top-level features, or a child feature within the hierarchy. The returned feature may be modified, however must not be deleted by the application.
| index | The index of the feature. |
| bool TSLFeatureList::removeFeature | ( | const char * | featureName, |
| const char * | product = NULL ) |
Remove a feature from the list.
This method may be used to query top-level features, or a child feature within the hierarchy. The specified feature and all of its children will be deleted.
| featureName | The name of the feature to remove. |
| product | The product specification of the feature. |
true if the feature was removed, false otherwise. | bool TSLFeatureList::removeFeature | ( | unsigned int | index | ) |
Remove a feature from the list.
This method may be used to query top-level features, or a child feature within the hierarchy. The specified feature and all of its children will be deleted.
| index | The index of the feature. |
true if the feature was removed, false otherwise. | bool TSLFeatureList::renameFeature | ( | const char * | featureName, |
| const char * | newFeatureName, | ||
| const char * | product = NULL ) |
Rename a feature.
This function may only be used to rename top-level features. Child features may be renamed using TSLFeature::renameChild.
| featureName | The current feature name. |
| product | The product specification of the feature. |
| newFeatureName | The new feature name. |
true if the feature was renamed, false otherwise. | unsigned int TSLFeatureList::size | ( | ) | const |
Query the size of the feature list.
This size will only include the top-level features in the list. It will not contain any child features.