Kanzi 3.9.10
kanzi::BindingLookupNotificationBase Class Referenceabstract

Base class for notifications on binding lookup. More...

#include <kanzi/core.ui/binding/binding_lookup_notification_base.hpp>

Inheritance diagram for kanzi::BindingLookupNotificationBase:
[legend]

Public Member Functions

void clearLocalNotificationFlag ()
 Clears local notification flag.
 
bool isGlobalNotificationInstalled () const
 Tells if this a global notification has been registered.
 
bool isLocalNotificationInstalled () const
 Tells if this a local notification has been registered.
 
virtual void onGlobalLookupNotification ()=0
 Called when global notification is triggered.
 
virtual void onLocalLookupNotification ()=0
 Called when local notification is triggered.
 
void registerGlobalNotification (BindingLookupContext &lookupContext, string_view path)
 Installs a global notification listener.
 
void registerLocalNotification (BindingLookupContext &lookupContext, PropertyObject &object, string_view path)
 Installs a local notification listener.
 
void registerLocalNotification (BindingLookupContext &lookupContext, PropertyObject *object, string_view path)
 Installs a local notification listener.
 
void unregisterGlobalNotification (BindingLookupContext &lookupContext, string_view path)
 Uninstalls a global notification listener.
 
void unregisterLocalNotification (BindingLookupContext &lookupContext, PropertyObject &object, string_view path)
 Removes a local notification listener.
 
void unregisterLocalNotification (BindingLookupContext &lookupContext, PropertyObject *object, string_view path)
 Removes a local notification listener.
 
 ~BindingLookupNotificationBase ()
 Destructor.
 

Protected Member Functions

 BindingLookupNotificationBase ()
 Constructor.
 

Protected Attributes

bool m_globalNotificationInstalled
 Is the global notification listener installed?
 
bool m_localNotificationInstalled
 Is the local notification listener installed?
 

Detailed Description

Base class for notifications on binding lookup.

Implementing classes have virtual functions to react to either object globally becoming available, or locally potentially changing availability.

Since
Kanzi 3.7.0

Constructor & Destructor Documentation

◆ BindingLookupNotificationBase()

kanzi::BindingLookupNotificationBase::BindingLookupNotificationBase ( )
inlineexplicitprotected

Constructor.

◆ ~BindingLookupNotificationBase()

kanzi::BindingLookupNotificationBase::~BindingLookupNotificationBase ( )
inline

Destructor.

Member Function Documentation

◆ isGlobalNotificationInstalled()

bool kanzi::BindingLookupNotificationBase::isGlobalNotificationInstalled ( ) const
inline

Tells if this a global notification has been registered.

Returns
True if global notification registered, false otherwise.

◆ isLocalNotificationInstalled()

bool kanzi::BindingLookupNotificationBase::isLocalNotificationInstalled ( ) const
inline

Tells if this a local notification has been registered.

Returns
True if local notification registered, false otherwise.

◆ clearLocalNotificationFlag()

void kanzi::BindingLookupNotificationBase::clearLocalNotificationFlag ( )
inline

Clears local notification flag.

Should be done if the object local notification was installed for is lost.

◆ registerGlobalNotification()

void kanzi::BindingLookupNotificationBase::registerGlobalNotification ( BindingLookupContext & lookupContext,
string_view path )

Installs a global notification listener.

Parameters
lookupContextLookup context to use.
pathPath associated with lookup.

◆ unregisterGlobalNotification()

void kanzi::BindingLookupNotificationBase::unregisterGlobalNotification ( BindingLookupContext & lookupContext,
string_view path )

Uninstalls a global notification listener.

Parameters
lookupContextLookup context to use.
pathPath associated with lookup.

◆ registerLocalNotification() [1/2]

void kanzi::BindingLookupNotificationBase::registerLocalNotification ( BindingLookupContext & lookupContext,
PropertyObject * object,
string_view path )

Installs a local notification listener.

Object parameter may only be nullptr if path points to a local resource.

Parameters
lookupContextLookup context to use.
objectObject to listen on.
pathPath associated with lookup.

◆ registerLocalNotification() [2/2]

void kanzi::BindingLookupNotificationBase::registerLocalNotification ( BindingLookupContext & lookupContext,
PropertyObject & object,
string_view path )
inline

Installs a local notification listener.

Parameters
lookupContextLookup context to use.
objectObject to listen on.
pathPath associated with lookup.

◆ unregisterLocalNotification() [1/2]

void kanzi::BindingLookupNotificationBase::unregisterLocalNotification ( BindingLookupContext & lookupContext,
PropertyObject * object,
string_view path )

Removes a local notification listener.

Object parameter may only be nullptr if path points to a local resource.

Parameters
lookupContextLookup context to use.
objectObject to listen on.
pathPath associated with lookup.

◆ unregisterLocalNotification() [2/2]

void kanzi::BindingLookupNotificationBase::unregisterLocalNotification ( BindingLookupContext & lookupContext,
PropertyObject & object,
string_view path )
inline

Removes a local notification listener.

Parameters
lookupContextLookup context to use.
objectObject to listen on.
pathPath associated with lookup.

◆ onGlobalLookupNotification()

virtual void kanzi::BindingLookupNotificationBase::onGlobalLookupNotification ( )
pure virtual

Called when global notification is triggered.

This usually means a target object may have become available.

Implemented in kanzi::TypedObjectPropertyBindingSourceRuntime< T >, and kanzi::TypedObjectPropertyExpressionValueSourceRuntime< T >.

◆ onLocalLookupNotification()

virtual void kanzi::BindingLookupNotificationBase::onLocalLookupNotification ( )
pure virtual

Called when local notification is triggered.

This usually means a target object may have become unavailable.

Implemented in kanzi::TypedObjectPropertyBindingSourceRuntime< T >, and kanzi::TypedObjectPropertyExpressionValueSourceRuntime< T >.

Member Data Documentation

◆ m_globalNotificationInstalled

bool kanzi::BindingLookupNotificationBase::m_globalNotificationInstalled
protected

Is the global notification listener installed?

◆ m_localNotificationInstalled

bool kanzi::BindingLookupNotificationBase::m_localNotificationInstalled
protected

Is the local notification listener installed?


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