LuciadCPillar C# 2023.1.04
|
Manages feature states. More...
Classes | |
class | Change |
This class is used to build feature state changes. More... | |
Public Member Functions | |
void | AddObserver (IFeatureStateObserver observer, bool seedObserver=false) |
Adds an observer that allows to inspect feature state changes. More... | |
void | ApplyStateChange (Luciad.Layers.Features.FeatureStateManager.Change featureStateChange) |
Applies the given state change. More... | |
void | ClearEnabledStates (Luciad.Layers.Features.LayerFeatureId layerFeatureId) |
Clears (i.e. More... | |
void | Dispose () |
bool | IsStateEnabled (Luciad.Layers.Features.LayerFeatureId layerFeatureId, Luciad.Layers.Features.FeatureState featureState) |
Checks if the given feature state is enabled for the given feature identifier. More... | |
void | RemoveObserver (Luciad.Layers.Features.IFeatureStateObserver observer) |
Removes the given observer. More... | |
Manages feature states.
In essence, it keeps a mapping of enabled/disabled states for each feature for specific FeatureState instances. This class can for example manage which features are selected. Example
|
inline |
Adds an observer that allows to inspect feature state changes.
Note: this method should only be called on the UI thread
observer
an observer
seedObserver
whether to inform the observer about the features for which a FeatureState is currently enabled
InvalidArgumentException
if the observer is already added.
NullArgumentException
if observer is nullptr.
|
inline |
Applies the given state change.
After this call, the FeatureStateManager::isStateEnabled method will reflect the given changes, and the registered observers will have been notified of the concrete changes for each feature. Note: this method should only be called on the UI thread
featureStateChange
a feature state change
|
inline |
Clears (i.e.
sets to false) all enabled stated for the given feature. Note: this method should only be called on the UI thread
layerFeatureId
the feature for which to clear all enabled states.
|
inline |
|
inline |
Checks if the given feature state is enabled for the given feature identifier.
Note: this method can be called on any thread.
layerFeatureId
a feature identifier
featureState
a feature state
if the given feature state is enabled for the given feature identifier.
|
inline |
Removes the given observer.
Note: this method should only be called on the UI thread
observer
an observer
InvalidArgumentException
if the observer was not added.
NullArgumentException
if observer is nullptr.