Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Types | Public Member Functions | Protected Attributes
caffe2::Observable< T > Class Template Reference

Inherit to make your class observable. More...

#include <observer.h>

Public Types

using Observer = ObserverBase< T >
 

Public Member Functions

const ObserverAttachObserver (std::unique_ptr< Observer > observer)
 
std::unique_ptr< ObserverDetachObserver (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_
 

Detailed Description

template<class T>
class caffe2::Observable< T >

Inherit to make your class observable.

Definition at line 60 of file observer.h.

Member Function Documentation

template<class T>
std::unique_ptr<Observer> caffe2::Observable< T >::DetachObserver ( const Observer observer_ptr)
inline

Returns a unique_ptr to the removed observer.

If not found, return a nullptr

Definition at line 86 of file observer.h.


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