LuciadCPillar 2023.1.04
luciad::ILayerObserver Class Referenceabstract

Interface for observing layers. More...

#include <luciad/layers/Layer.h>

Public Member Functions

virtual ~ILayerObserver ()=default
 
virtual void onLayerChanged (const LayerEvent &layerEvent)=0
 This method is called whenever a property of the layer has changed. More...
 

Static Public Member Functions

static std::shared_ptr< ILayerObservercreate (std::function< void(const LayerEvent &)> function)
 Creates a default ILayerObserver instance that delegates the ILayerObserver::onLayerChanged to the given function. More...
 

Detailed Description

Interface for observing layers.

Constructor & Destructor Documentation

◆ ~ILayerObserver()

virtual luciad::ILayerObserver::~ILayerObserver ( )
virtualdefault

Member Function Documentation

◆ create()

static std::shared_ptr< ILayerObserver > luciad::ILayerObserver::create ( std::function< void(const LayerEvent &)>  function)
static

Creates a default ILayerObserver instance that delegates the ILayerObserver::onLayerChanged to the given function.

This is a convenience method that allows to reduce boiler plate code using lambdas.

Parameters
functionthe function that is called by ILayerObserver::onLayerChanged
Returns
an ILayerObserver instance based on the given function.

◆ onLayerChanged()

virtual void luciad::ILayerObserver::onLayerChanged ( const LayerEvent layerEvent)
pure virtual

This method is called whenever a property of the layer has changed.

Parameters
layerEventthe event describing the change.