LibreOffice Module cppuhelper (master) 1
|
A helper class to store interface references of different types. More...
#include <interfacecontainer.h>
Public Types | |
typedef key | keyType |
Public Member Functions | |
OMultiTypeInterfaceContainerHelperVar (::osl::Mutex &rMutex) | |
Create a container of interface containers. More... | |
~OMultiTypeInterfaceContainerHelperVar () | |
Deletes all containers. More... | |
css::uno::Sequence< key > SAL_CALL | getContainedTypes () const |
Return all id's under which at least one interface is added. More... | |
OInterfaceContainerHelper *SAL_CALL | getContainer (const key &) const |
Return the container created under this key. More... | |
sal_Int32 SAL_CALL | addInterface (const key &rKey, const css::uno::Reference< css::uno::XInterface > &r) |
Inserts an element into the container with the specified key. More... | |
sal_Int32 SAL_CALL | removeInterface (const key &rKey, const css::uno::Reference< css::uno::XInterface > &rxIFace) |
Removes an element from the container with the specified key. More... | |
void SAL_CALL | disposeAndClear (const css::lang::EventObject &rEvt) |
Call disposing on all references in the container, that support XEventListener. More... | |
void SAL_CALL | clear () |
Remove all elements of all containers. More... | |
Static Public Member Functions | |
static void *SAL_CALL | operator new (size_t nSize) |
static void SAL_CALL | operator delete (void *pMem) |
static void *SAL_CALL | operator new (size_t, void *pMem) |
static void SAL_CALL | operator delete (void *, void *) |
Private Types | |
typedef ::std::vector< std::pair< key, void * > > | InterfaceMap |
Private Member Functions | |
InterfaceMap::iterator | find (const key &rKey) const |
OMultiTypeInterfaceContainerHelperVar (const OMultiTypeInterfaceContainerHelperVar &) SAL_DELETED_FUNCTION | |
OMultiTypeInterfaceContainerHelperVar & | operator= (const OMultiTypeInterfaceContainerHelperVar &) SAL_DELETED_FUNCTION |
Private Attributes | |
InterfaceMap * | m_pMap |
::osl::Mutex & | rMutex |
A helper class to store interface references of different types.
Definition at line 315 of file interfacecontainer.h.
|
private |
Definition at line 403 of file interfacecontainer.h.
typedef key cppu::OMultiTypeInterfaceContainerHelperVar< key, hashImpl, equalImpl >::keyType |
Definition at line 401 of file interfacecontainer.h.
|
inline |
Create a container of interface containers.
rMutex | the mutex to protect multi thread access. The lifetime must be longer than the lifetime of this object. |
Definition at line 37 of file interfacecontainer.hxx.
References cppu::OMultiTypeInterfaceContainerHelperVar< key, hashImpl, equalImpl >::m_pMap.
|
inline |
Deletes all containers.
Definition at line 45 of file interfacecontainer.hxx.
|
private |
|
inline |
Inserts an element into the container with the specified key.
The position is not specified, thus it is not specified in which order events are fired.
rKey | the id of the container |
r | interface to be added; it is allowed, to insert null or the same interface more than once |
Definition at line 106 of file interfacecontainer.hxx.
References cppu::OInterfaceContainerHelper::addInterface(), and find().
|
inline |
Remove all elements of all containers.
Does not delete the container.
Definition at line 179 of file interfacecontainer.hxx.
References end.
|
inline |
Call disposing on all references in the container, that support XEventListener.
Then clears the container.
rEvt | the event object which is passed during disposing() call |
Definition at line 142 of file interfacecontainer.hxx.
References cppu::OInterfaceContainerHelper::disposeAndClear(), end, i, and NULL.
|
inlineprivate |
Definition at line 407 of file interfacecontainer.h.
References end, equal(), and cppu::OMultiTypeInterfaceContainerHelperVar< key, hashImpl, equalImpl >::m_pMap.
|
inline |
Return all id's under which at least one interface is added.
Definition at line 61 of file interfacecontainer.hxx.
References end, cppu::OInterfaceContainerHelper::getLength(), and i.
|
inline |
Return the container created under this key.
The InterfaceContainerHelper exists until the whole MultiTypeContainer is destroyed.
Definition at line 93 of file interfacecontainer.hxx.
|
inlinestatic |
Definition at line 325 of file interfacecontainer.h.
|
inlinestatic |
Definition at line 321 of file interfacecontainer.h.
|
inlinestatic |
Definition at line 319 of file interfacecontainer.h.
|
inlinestatic |
Definition at line 323 of file interfacecontainer.h.
|
private |
|
inline |
Removes an element from the container with the specified key.
It uses interface equality to remove the interface.
rKey | the id of the container |
rxIFace | interface to be removed |
Definition at line 124 of file interfacecontainer.hxx.
References find().
|
private |
|
private |
Definition at line 405 of file interfacecontainer.h.