LuciadCPillar C# 2024.1.06
Luciad.Layers.Features.FeatureStateManager Class Reference

Manages feature states. More...

Inheritance diagram for Luciad.Layers.Features.FeatureStateManager:

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...
 

Detailed Description

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

Member Function Documentation

◆ AddObserver()

void Luciad.Layers.Features.FeatureStateManager.AddObserver ( IFeatureStateObserver  observer,
bool  seedObserver = false 
)
inline

Adds an observer that allows to inspect feature state changes.

Note: this method should only be called on the UI thread

Parameters
observeran observer
seedObserverwhether to inform the observer about the features for which a FeatureState is currently enabled
Exceptions
System.ArgumentExceptionif the observer is already added.
System.ArgumentNullExceptionif observer is null.

◆ ApplyStateChange()

void Luciad.Layers.Features.FeatureStateManager.ApplyStateChange ( Luciad.Layers.Features.FeatureStateManager.Change  featureStateChange)
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

Parameters
featureStateChangea feature state change

◆ ClearEnabledStates()

void Luciad.Layers.Features.FeatureStateManager.ClearEnabledStates ( Luciad.Layers.Features.LayerFeatureId  layerFeatureId)
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

Parameters
layerFeatureIdthe feature for which to clear all enabled states.

◆ Dispose()

void Luciad.Layers.Features.FeatureStateManager.Dispose ( )
inline

◆ Equals()

override bool Luciad.Layers.Features.FeatureStateManager.Equals ( object  obj)
inline

◆ GetFeaturesWithStateEnabled()

System.Collections.Generic.IList< ulong > Luciad.Layers.Features.FeatureStateManager.GetFeaturesWithStateEnabled ( ulong  layerId,
Luciad.Layers.Features.FeatureState  featureState 
)
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

Parameters
layerIda layer
featureStatea feature state
Returns
the collection of feature IDs of the given layer for which the given feature state is enabled.
Since
2024.1.01

◆ GetHashCode()

override int Luciad.Layers.Features.FeatureStateManager.GetHashCode ( )
inline

◆ IsStateEnabled()

bool Luciad.Layers.Features.FeatureStateManager.IsStateEnabled ( Luciad.Layers.Features.LayerFeatureId  layerFeatureId,
Luciad.Layers.Features.FeatureState  featureState 
)
inline

Checks if the given feature state is enabled for the given feature identifier.

Note: this method can be called on any thread.

Parameters
layerFeatureIda feature identifier
featureStatea feature state
Returns
if the given feature state is enabled for the given feature identifier.

◆ RemoveObserver()

void Luciad.Layers.Features.FeatureStateManager.RemoveObserver ( Luciad.Layers.Features.IFeatureStateObserver  observer)
inline

Removes the given observer.

Note: this method should only be called on the UI thread

Parameters
observeran observer
Exceptions
System.ArgumentExceptionif the observer was not added.
System.ArgumentNullExceptionif observer is null.