ObserverScopeGuard Class Reference

#include <observerscopeguard.h>

Public Member Functions

 ObserverScopeGuard ()
 
MAXON_IMPLICIT ObserverScopeGuard (ObserverScopeGuard &&src)
 
template<typename LAMBDA , typename OBSERVABLE >
MAXON_IMPLICIT ObserverScopeGuard (LAMBDA &&lambda, OBSERVABLE &observable)
 
 ~ObserverScopeGuard ()
 
template<typename LAMBDA , typename OBSERVABLE >
Result< void > Init (LAMBDA &&lambda, OBSERVABLE &&observable)
 
void operator= (ObserverScopeGuard &&other)
 
void Disable ()
 
void Enable ()
 
Result< void > operator() ()
 
void Reset ()
 
Result< void > RemoveObserver ()
 

Private Member Functions

 MAXON_DISALLOW_COPY_AND_ASSIGN (ObserverScopeGuard)
 

Private Attributes

Delegate< Result< void >)> _deregisterCallable
 
Bool _isEnabled
 

Constructor & Destructor Documentation

◆ ObserverScopeGuard() [1/3]

◆ ObserverScopeGuard() [2/3]

◆ ObserverScopeGuard() [3/3]

MAXON_IMPLICIT ObserverScopeGuard ( LAMBDA &&  lambda,
OBSERVABLE &  observable 
)

◆ ~ObserverScopeGuard()

Member Function Documentation

◆ MAXON_DISALLOW_COPY_AND_ASSIGN()

MAXON_DISALLOW_COPY_AND_ASSIGN ( ObserverScopeGuard  )
private

◆ Init()

Result<void> Init ( LAMBDA &&  lambda,
OBSERVABLE &&  observable 
)

◆ operator=()

void operator= ( ObserverScopeGuard &&  other)

◆ Disable()

void Disable ( )

◆ Enable()

void Enable ( )

◆ operator()()

Result<void> operator() ( )

◆ Reset()

void Reset ( )

◆ RemoveObserver()

Result<void> RemoveObserver ( )

Member Data Documentation

◆ _deregisterCallable

Delegate<Result<void>)> _deregisterCallable
private

◆ _isEnabled

Bool _isEnabled
private