Molybden API
Loading...
Searching...
No Matches
molybden::Observable< T > Class Template Referenceabstract

A common class that all classes providing an observer must inherit. More...

#include <observable.hpp>

Public Member Functions

virtual void addObserver (T *observer)=0
 Adds the given observer instance.
 
virtual void removeObserver (T *observer)=0
 Unregisters the given observer.
 

Detailed Description

template<typename T>
class molybden::Observable< T >

A common class that all classes providing an observer must inherit.

Template Parameters
Tthe observer type
Deprecated:
this class will be deleted after migration to functional observers.

Member Function Documentation

◆ addObserver()

template<typename T >
virtual void molybden::Observable< T >::addObserver ( T *  observer)
pure virtual

Adds the given observer instance.

Does nothing if the given observer is nullptr or already registered.

Parameters
observeran observer instance to add

◆ removeObserver()

template<typename T >
virtual void molybden::Observable< T >::removeObserver ( T *  observer)
pure virtual

Unregisters the given observer.

Does nothing if the given observer is nullptr or already unregistered.

Parameters
observeran observer instance to remove

The documentation for this class was generated from the following file: