Skip to content

AFieldObservable#

Stores a value and observes it's changes, notifying observers.

Header:#include <AUI/Util/AFieldObservable.h>
CMake:aui_link(my_target PUBLIC aui::core)

Public Methods#

addObserver#


template<typename Observer_t >
ObserverHandle AFieldObservable::addObserver(Observer_t&& observer)

Adds an observer, immediately feeding the observer with the current value.

Arguments
observer
observer. Optionally can accept the AFieldObservable's stored type as the first argument.

removeObserver#


void AFieldObservable::removeObserver(ObserverHandle h)

Removes an observer.