Open Search
    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 (Bool create)
     

    Private Types

    using ObservableType = ObservableImplRef< ObservableClass_PrivateHelper, T >
     

    Private Attributes

    ObserverObjectRef _notificationObject
     
    ObservableType _observable
     
    const char * _observableId
     

    Member Typedef Documentation

    ◆ ObservableType

    using ObservableType = ObservableImplRef<ObservableClass_PrivateHelper, T>
    private

    Member Function Documentation

    ◆ Init()

    Result<void> Init ( const Char observableId)

    ◆ Free()

    void Free ( )

    ◆ Get()

    ObservableRef<T> Get ( Bool  create)

    Member Data Documentation

    ◆ _notificationObject

    ObserverObjectRef _notificationObject
    private

    ◆ _observable

    ObservableType _observable
    private

    ◆ _observableId

    const char* _observableId
    private