Inherit to make your class observable. More...
#include <observer.h>
Public Types | |
using | Observer = ObserverBase< T > |
Public Member Functions | |
Observable (Observable &&)=default | |
Observable & | operator= (Observable &&)=default |
C10_DISABLE_COPY_AND_ASSIGN (Observable) | |
const Observer * | AttachObserver (std::unique_ptr< Observer > observer) |
std::unique_ptr< Observer > | DetachObserver (const Observer *observer_ptr) |
Returns a unique_ptr to the removed observer. More... | |
virtual size_t | NumObservers () |
void | StartAllObservers () |
void | StopAllObservers () |
Protected Attributes | |
std::vector< std::unique_ptr< Observer > > | observers_list_ |
Inherit to make your class observable.
Definition at line 45 of file observer.h.
|
inline |
Returns a unique_ptr to the removed observer.
If not found, return a nullptr
Definition at line 80 of file observer.h.