LibreOffice Module cppuhelper (master)  1
Public Member Functions | Public Attributes | List of all members
cppu::OBroadcastHelperVar< container, keyType > Struct Template Reference

This struct contains the standard variables of a broadcaster. More...

#include <interfacecontainer.h>

Public Member Functions

 OBroadcastHelperVar (::osl::Mutex &rMutex_)
 Initialize the structure. More...
 
void addListener (const keyType &key, const css::uno::Reference< css::uno::XInterface > &r)
 adds a listener threadsafe. More...
 
void removeListener (const keyType &key, const css::uno::Reference< css::uno::XInterface > &r)
 removes a listener threadsafe More...
 
OInterfaceContainerHelper *SAL_CALL getContainer (const keyType &key) const
 Return the container created under this key. More...
 

Public Attributes

::osl::Mutex & rMutex
 The shared mutex. More...
 
container aLC
 ListenerContainer class is thread safe. More...
 
sal_Bool bDisposed
 Dispose call ready. More...
 
sal_Bool bInDispose
 In dispose call. More...
 

Detailed Description

template<class container, class keyType>
struct cppu::OBroadcastHelperVar< container, keyType >

This struct contains the standard variables of a broadcaster.

Helper classes only know a reference to this struct instead of references to the four members. The access to the members must be guarded with rMutex.

The additional template parameter keyType has been added, because gcc can't compile addListener( const container::keyType &key ).

Definition at line 436 of file interfacecontainer.h.

Constructor & Destructor Documentation

template<class container , class keyType >
cppu::OBroadcastHelperVar< container, keyType >::OBroadcastHelperVar ( ::osl::Mutex &  rMutex_)
inline

Initialize the structure.

bDispose and bInDispose are set to false.

Parameters
rMutex_the mutex reference.

Definition at line 451 of file interfacecontainer.h.

Member Function Documentation

template<class container , class keyType >
void cppu::OBroadcastHelperVar< container, keyType >::addListener ( const keyType &  key,
const css::uno::Reference< css::uno::XInterface > &  r 
)
inline

adds a listener threadsafe.

Definition at line 461 of file interfacecontainer.h.

Referenced by cppu::OPropertySetHelper::addPropertiesChangeListener().

template<class container , class keyType >
OInterfaceContainerHelper* SAL_CALL cppu::OBroadcastHelperVar< container, keyType >::getContainer ( const keyType &  key) const
inline

Return the container created under this key.

Returns
the container created under this key. If the container was not created, null was returned. This can be used to optimize performance ( construction of an event object can be avoided ).

Definition at line 490 of file interfacecontainer.h.

template<class container , class keyType >
void cppu::OBroadcastHelperVar< container, keyType >::removeListener ( const keyType &  key,
const css::uno::Reference< css::uno::XInterface > &  r 
)
inline

removes a listener threadsafe

Definition at line 475 of file interfacecontainer.h.

Referenced by cppu::OPropertySetHelper::removePropertiesChangeListener().

Member Data Documentation

template<class container , class keyType >
container cppu::OBroadcastHelperVar< container, keyType >::aLC
template<class container , class keyType >
sal_Bool cppu::OBroadcastHelperVar< container, keyType >::bDisposed
template<class container , class keyType >
sal_Bool cppu::OBroadcastHelperVar< container, keyType >::bInDispose
template<class container , class keyType >
::osl::Mutex& cppu::OBroadcastHelperVar< container, keyType >::rMutex

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