StaticObservableStorage< T > Class Template Reference

#include <observerobject.h>

Detailed Description

template<typename T>
class maxon::StaticObservableStorage< T >

This helper template reduces the effort of creating static observables.

static StaticObservableStorage<LicenseInterface::ObservableLicenseUpdatedDelegate> g_observableLicenseUpdated;

required code in global Init: g_observableLicenseUpdated.Init("ObservableLicenseUpdated") iferr_return;

required code in global Free: g_observableLicenseUpdated.Free();

Public Member Functions

Result< void > Init (const Char *observableId)
 
void Free ()
 
ObservableRef< T > Get ()
 

Private Types

using ObservableType = ObservableImplRef< ObservableClassPrivateHelper, T >
 

Private Attributes

ObserverObjectRef * _notificationObject
 
ObservableType_observable
 

Member Typedef Documentation

◆ ObservableType

using ObservableType = ObservableImplRef<ObservableClassPrivateHelper, T>
private

Member Function Documentation

◆ Init()

Result<void> Init ( const Char observableId)

◆ Free()

void Free ( void  )

◆ Get()

ObservableRef<T> Get ( void  )

Member Data Documentation

◆ _notificationObject

ObserverObjectRef* _notificationObject
private

◆ _observable

ObservableType* _observable
private