LibreOffice Module svx (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
svx::OSingleFeatureDispatcher Class Referencefinal

#include <formfeaturedispatcher.hxx>

Inheritance diagram for svx::OSingleFeatureDispatcher:
[legend]
Collaboration diagram for svx::OSingleFeatureDispatcher:
[legend]

Public Member Functions

 OSingleFeatureDispatcher (const css::util::URL &_rFeatureURL, const sal_Int16 _nFormFeature, const css::uno::Reference< css::form::runtime::XFormOperations > &_rxFormOperations,::osl::Mutex &_rMutex)
 constructs the dispatcher More...
 
void updateAllListeners ()
 notifies all our listeners of the current state More...
 

Private Member Functions

virtual void SAL_CALL dispatch (const css::util::URL &_rURL, const css::uno::Sequence< css::beans::PropertyValue > &_rArguments) override
 
virtual void SAL_CALL addStatusListener (const css::uno::Reference< css::frame::XStatusListener > &_rxControl, const css::util::URL &_rURL) override
 
virtual void SAL_CALL removeStatusListener (const css::uno::Reference< css::frame::XStatusListener > &_rxControl, const css::util::URL &_rURL) override
 
void notifyStatus (const css::uno::Reference< css::frame::XStatusListener > &_rxListener,::osl::ClearableMutexGuard &_rFreeForNotification)
 notifies our current state to one or all listeners More...
 
void getUnoState (css::frame::FeatureStateEvent &_rState) const
 retrieves the current status of our feature, in a format which can be used for UNO notifications More...
 

Private Attributes

::osl::Mutex & m_rMutex
 
::comphelper::OInterfaceContainerHelper2 m_aStatusListeners
 
css::uno::Reference< css::form::runtime::XFormOperations > m_xFormOperations
 
const css::util::URL m_aFeatureURL
 
css::uno::Any m_aLastKnownState
 
const sal_Int16 m_nFormFeature
 
bool m_bLastKnownEnabled
 

Detailed Description

Definition at line 37 of file formfeaturedispatcher.hxx.

Constructor & Destructor Documentation

svx::OSingleFeatureDispatcher::OSingleFeatureDispatcher ( const css::util::URL &  _rFeatureURL,
const sal_Int16  _nFormFeature,
const css::uno::Reference< css::form::runtime::XFormOperations > &  _rxFormOperations,
::osl::Mutex &  _rMutex 
)

constructs the dispatcher

Parameters
_rFeatureURLthe URL of the feature which this instance is responsible for
_nFeatureIdthe feature which this instance is responsible for
_rControllerthe controller which is responsible for providing the state of feature of this instance, and for executing it. After disposing the dispatcher instance, the controller will not be accessed anymore
See also
dispose

Definition at line 38 of file formfeaturedispatcher.cxx.

Member Function Documentation

void SAL_CALL svx::OSingleFeatureDispatcher::addStatusListener ( const css::uno::Reference< css::frame::XStatusListener > &  _rxControl,
const css::util::URL &  _rURL 
)
overrideprivatevirtual
void SAL_CALL svx::OSingleFeatureDispatcher::dispatch ( const css::util::URL &  _rURL,
const css::uno::Sequence< css::beans::PropertyValue > &  _rArguments 
)
overrideprivatevirtual
void svx::OSingleFeatureDispatcher::getUnoState ( css::frame::FeatureStateEvent &  _rState) const
private

retrieves the current status of our feature, in a format which can be used for UNO notifications

our mutex is locked

Definition at line 50 of file formfeaturedispatcher.cxx.

References m_aFeatureURL, m_nFormFeature, and m_xFormOperations.

Referenced by notifyStatus(), and updateAllListeners().

void svx::OSingleFeatureDispatcher::notifyStatus ( const css::uno::Reference< css::frame::XStatusListener > &  _rxListener,
::osl::ClearableMutexGuard &  _rFreeForNotification 
)
private

notifies our current state to one or all listeners

Parameters
_rxListenerthe listener to notify. May be NULL, in this case all our listeners will be notified with the current state
_rFreeForNotificationa guard which currently locks our mutex, and which is to be cleared for actually doing the notification(s)

Definition at line 80 of file formfeaturedispatcher.cxx.

References Exception, getUnoState(), comphelper::OInterfaceIteratorHelper2::hasMoreElements(), m_aStatusListeners, comphelper::OInterfaceIteratorHelper2::next(), and comphelper::OInterfaceIteratorHelper2::remove().

Referenced by addStatusListener(), and updateAllListeners().

void SAL_CALL svx::OSingleFeatureDispatcher::removeStatusListener ( const css::uno::Reference< css::frame::XStatusListener > &  _rxControl,
const css::util::URL &  _rURL 
)
overrideprivatevirtual
void svx::OSingleFeatureDispatcher::updateAllListeners ( )

notifies all our listeners of the current state

Definition at line 63 of file formfeaturedispatcher.cxx.

References getUnoState(), m_aLastKnownState, m_bLastKnownEnabled, m_rMutex, and notifyStatus().

Member Data Documentation

const css::util::URL svx::OSingleFeatureDispatcher::m_aFeatureURL
private
css::uno::Any svx::OSingleFeatureDispatcher::m_aLastKnownState
private

Definition at line 100 of file formfeaturedispatcher.hxx.

Referenced by updateAllListeners().

::comphelper::OInterfaceContainerHelper2 svx::OSingleFeatureDispatcher::m_aStatusListeners
private

Definition at line 96 of file formfeaturedispatcher.hxx.

Referenced by addStatusListener(), notifyStatus(), and removeStatusListener().

bool svx::OSingleFeatureDispatcher::m_bLastKnownEnabled
private

Definition at line 102 of file formfeaturedispatcher.hxx.

Referenced by updateAllListeners().

const sal_Int16 svx::OSingleFeatureDispatcher::m_nFormFeature
private

Definition at line 101 of file formfeaturedispatcher.hxx.

Referenced by dispatch(), and getUnoState().

::osl::Mutex& svx::OSingleFeatureDispatcher::m_rMutex
private
css::uno::Reference< css::form::runtime::XFormOperations > svx::OSingleFeatureDispatcher::m_xFormOperations
private

Definition at line 98 of file formfeaturedispatcher.hxx.

Referenced by dispatch(), and getUnoState().


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