LuciadCPillar C# 2023.1.04
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 ()
 
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

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::FeatureStateManager.

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

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.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::FeatureStateManager::addObserver.

◆ 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

featureStateChange

a feature state change

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::FeatureStateManager::applyStateChange.

◆ 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

layerFeatureId

the feature for which to clear all enabled states.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::FeatureStateManager::clearEnabledStates.

◆ Dispose()

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

layerFeatureId

a feature identifier

featureState

a feature state

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

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::FeatureStateManager::isStateEnabled.

◆ 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

observer

an observer

InvalidArgumentException

if the observer was not added.

NullArgumentException

if observer is nullptr.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::FeatureStateManager::removeObserver.