C4 Engine
C4 Engine API Documentation

ExclusiveObservable::SetObserver

Defined in:  TSObservable.h
Installs an observer on an observable object.
Prototype

void SetObserver(ObserverType *observer);

Parameters
observer The observer to install.
Description
The SetObserver function installs the observer specified by the observer parameter on an observable object. The observer should have the type ExclusiveObserver<observerType, observableType>, where observerType is the type of the object that is notified when an event occurs, and observableType is the type of the object being observed. If an observer is already installed on the object at the time the SetObserver function is called, then it is replaced by the new observer.

Even though each exclusive observable object can only be observed by one observer at a time, an exclusive observer can observe any number of objects simultaneously.
See Also

ExclusiveObservable::HasObserver