UDK 3.2.7 C/C++ API Reference
Public Member Functions | Public Attributes
cppu::OBroadcastHelperVar< container, keyType > Struct Template Reference

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

#include <interfacecontainer.h>

List of all members.

Public Member Functions

 OBroadcastHelperVar (::osl::Mutex &rMutex_) throw ()
 Initialize the structur.
void addListener (const keyType &key, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > &r) throw ()
 adds a listener threadsafe.
void removeListener (const keyType &key, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > &r) throw ()
 removes a listener threadsafe
OInterfaceContainerHelpergetContainer (const keyType &key) const throw ()
 Return the container created under this key.

Public Attributes

::osl::MutexrMutex
 The shared mutex.
container aLC
 ListenerContainer class is thread save.
sal_Bool bDisposed
 Dispose call ready.
sal_Bool bInDispose
 In dispose call.

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 ).


Constructor & Destructor Documentation

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

Initialize the structur.

bDispose and bInDispose are set to false.

Parameters:
rMutex_the mutex reference.

Member Function Documentation

template<class container , class keyType >
void cppu::OBroadcastHelperVar< container, keyType >::addListener ( const keyType &  key,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > &  r 
) throw () [inline]

adds a listener threadsafe.

template<class container , class keyType >
OInterfaceContainerHelper* cppu::OBroadcastHelperVar< container, keyType >::getContainer ( const keyType &  key) const throw () [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 ).
template<class container , class keyType >
void cppu::OBroadcastHelperVar< container, keyType >::removeListener ( const keyType &  key,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > &  r 
) throw () [inline]

removes a listener threadsafe


Member Data Documentation

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

ListenerContainer class is thread save.

template<class container , class keyType >
sal_Bool cppu::OBroadcastHelperVar< container, keyType >::bDisposed

Dispose call ready.

template<class container , class keyType >
sal_Bool cppu::OBroadcastHelperVar< container, keyType >::bInDispose

In dispose call.

template<class container , class keyType >
::osl::Mutex& cppu::OBroadcastHelperVar< container, keyType >::rMutex

The shared mutex.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines