LuciadCPillar 2026.1.02
Loading...
Searching...
No Matches
luciad::IMapObserver Class Referenceabstract

Interface for observing the Map. More...

#include <luciad/maps/Map.h>

Public Member Functions

virtual ~IMapObserver ()=default
virtual void onMapChanged (const MapEvent &mapEvent)=0
 This method is called whenever a property of the map has changed.

Static Public Member Functions

static std::shared_ptr< IMapObserver > create (std::function< void(const MapEvent &)> function)
 Creates a default IMapObserver instance that delegates the IMapObserver::onMapChanged to the given function.

Detailed Description

Interface for observing the Map.

Since
2023.1

Constructor & Destructor Documentation

◆ ~IMapObserver()

virtual luciad::IMapObserver::~IMapObserver ( )
virtualdefault

Member Function Documentation

◆ create()

std::shared_ptr< IMapObserver > luciad::IMapObserver::create ( std::function< void(const MapEvent &)> function)
static

Creates a default IMapObserver instance that delegates the IMapObserver::onMapChanged 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 IMapObserver::onMapChanged
Returns
an IMapObserver instance based on the given function.

◆ onMapChanged()

virtual void luciad::IMapObserver::onMapChanged ( const MapEvent & mapEvent)
pure virtual

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

Parameters
mapEventthe event describing the change.