|
LibreOffice Module svx (master) 1
|
helper class for notifying XPropertyChangeListeners More...
#include <shapepropertynotifier.hxx>
Public Member Functions | |
| PropertyChangeNotifier (::cppu::OWeakObject &_rOwner) | |
| constructs a notifier instance More... | |
| ~PropertyChangeNotifier () | |
| void | addPropertyChangeListener (std::unique_lock< std::mutex > &rGuard, const OUString &_rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &_rxListener) |
| void | removePropertyChangeListener (std::unique_lock< std::mutex > &rGuard, const OUString &_rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &_rxListener) |
| void | registerProvider (const ShapePropertyProviderId _eProperty, std::unique_ptr< PropertyValueProvider > _rProvider) |
| registers an PropertyValueProvider More... | |
| void | notifyPropertyChange (std::unique_lock< std::mutex > &rGuard, const ShapePropertyProviderId _eProperty) const |
| notifies changes in the given property to all registered listeners More... | |
| void | disposing (std::unique_lock< std::mutex > &rGuard) |
| is called to dispose the instance More... | |
Private Member Functions | |
| PropertyChangeNotifier (const PropertyChangeNotifier &)=delete | |
| PropertyChangeNotifier & | operator= (const PropertyChangeNotifier &)=delete |
Private Attributes | |
| ::cppu::OWeakObject & | m_rContext |
| o3tl::enumarray< ShapePropertyProviderId, std::unique_ptr< PropertyValueProvider > > | m_aProviders |
| comphelper::OMultiTypeInterfaceContainerHelperVar4< OUString, css::beans::XPropertyChangeListener > | m_aPropertyChangeListeners |
helper class for notifying XPropertyChangeListeners
The class is intended to be held as member of the class which does the property change broadcasting.
Definition at line 96 of file shapepropertynotifier.hxx.
| PropertyChangeNotifier::PropertyChangeNotifier | ( | ::cppu::OWeakObject & | _rOwner | ) |
constructs a notifier instance
| _rOwner | the owner instance of the notifier. Will be used as css.lang.EventObject.Source when notifying events. |
Definition at line 66 of file shapepropertynotifier.cxx.
References m_rContext.
| PropertyChangeNotifier::~PropertyChangeNotifier | ( | ) |
Definition at line 71 of file shapepropertynotifier.cxx.
|
privatedelete |
| void PropertyChangeNotifier::addPropertyChangeListener | ( | std::unique_lock< std::mutex > & | rGuard, |
| const OUString & | _rPropertyName, | ||
| const css::uno::Reference< css::beans::XPropertyChangeListener > & | _rxListener | ||
| ) |
Definition at line 119 of file shapepropertynotifier.cxx.
References comphelper::OMultiTypeInterfaceContainerHelperVar4< class key, class listener, class equalImpl >::addInterface(), and m_aPropertyChangeListeners.
| void PropertyChangeNotifier::disposing | ( | std::unique_lock< std::mutex > & | rGuard | ) |
is called to dispose the instance
Definition at line 131 of file shapepropertynotifier.cxx.
References aEvent, comphelper::OMultiTypeInterfaceContainerHelperVar4< class key, class listener, class equalImpl >::disposeAndClear(), m_aPropertyChangeListeners, and m_rContext.
| void PropertyChangeNotifier::notifyPropertyChange | ( | std::unique_lock< std::mutex > & | rGuard, |
| const ShapePropertyProviderId | _eProperty | ||
| ) | const |
notifies changes in the given property to all registered listeners
If no property value provider for the given property ID is registered, this is worth an assertion in a non-product build, and otherwise ignored.
Definition at line 85 of file shapepropertynotifier.cxx.
References aEvent, DBG_UNHANDLED_EXCEPTION, Exception, comphelper::OMultiTypeInterfaceContainerHelperVar4< class key, class listener, class equalImpl >::getContainer(), m_aPropertyChangeListeners, m_aProviders, m_rContext, and comphelper::OInterfaceContainerHelper4< class ListenerT >::notifyEach().
|
privatedelete |
| void PropertyChangeNotifier::registerProvider | ( | const ShapePropertyProviderId | _eProperty, |
| std::unique_ptr< PropertyValueProvider > | _rProvider | ||
| ) |
registers an PropertyValueProvider
Definition at line 75 of file shapepropertynotifier.cxx.
References m_aProviders.
| void PropertyChangeNotifier::removePropertyChangeListener | ( | std::unique_lock< std::mutex > & | rGuard, |
| const OUString & | _rPropertyName, | ||
| const css::uno::Reference< css::beans::XPropertyChangeListener > & | _rxListener | ||
| ) |
Definition at line 125 of file shapepropertynotifier.cxx.
References m_aPropertyChangeListeners, and comphelper::OMultiTypeInterfaceContainerHelperVar4< class key, class listener, class equalImpl >::removeInterface().
|
private |
Definition at line 133 of file shapepropertynotifier.hxx.
Referenced by addPropertyChangeListener(), disposing(), notifyPropertyChange(), and removePropertyChangeListener().
|
private |
Definition at line 132 of file shapepropertynotifier.hxx.
Referenced by notifyPropertyChange(), and registerProvider().
|
private |
Definition at line 131 of file shapepropertynotifier.hxx.
Referenced by disposing(), and notifyPropertyChange().