![]() |
LuciadCPillar C# 2024.1.06
|
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 () |
override bool | Equals (object obj) |
System.Collections.Generic.IList< ulong > | GetFeaturesWithStateEnabled (ulong layerId, Luciad.Layers.Features.FeatureState featureState) |
Returns the collection of feature IDs of the given layer for which the given feature state is enabled. More... | |
override int | GetHashCode () |
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.
|
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 |
System.ArgumentException | if the observer is already added. |
System.ArgumentNullException | if observer is null . |
|
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 |
|
inline |
Returns the collection of feature IDs of the given layer for which the given feature state is enabled.
Note: this method should only be called on the UI thread
layerId | a layer |
featureState | a feature state |
|
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 |
|
inline |
Removes the given observer.
Note: this method should only be called on the UI thread
observer | an observer |
System.ArgumentException | if the observer was not added. |
System.ArgumentNullException | if observer is null . |