Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::Observer Class Reference

#include <observer.h>

+ Inheritance diagram for inviwo::Observer:

Public Member Functions

 Observer (const Observer &other)
 
 Observer (Observer &&other)
 
Observeroperator= (Observer &&other)
 
Observeroperator= (const Observer &other)
 
virtual ~Observer ()
 
void removeObservation (ObservableInterface *observable)
 
void removeObservations ()
 

Protected Member Functions

void addObservation (ObservableInterface *observable)
 

Protected Attributes

std::unordered_set< ObservableInterface * > observables_
 

Friends

class ObservableInterface
 

Detailed Description

Class to support observer pattern. An example of usage is given in the Observable class.

See also
Observable

Constructor & Destructor Documentation

◆ ~Observer()

virtual inviwo::Observer::~Observer ( )
virtual

Removes the observer from all observable objects. Makes sure that it cannot be called when destroyed.

Member Function Documentation

◆ addObservation()

void inviwo::Observer::addObservation ( ObservableInterface * observable)
protected

Add an object to observe.

Parameters
observableThe observable to add.

◆ removeObservation()

void inviwo::Observer::removeObservation ( ObservableInterface * observable)

Stop observing object by removing it from observation list.

Parameters
observable(ObservableInterface *) The observable to stop observing.

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