LibreOffice Module cppuhelper (master)  1
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
cppu::OMultiTypeInterfaceContainerHelper Class Reference

Specialized class for key type css::uno::Type, without explicit usage of STL symbols. More...

#include <interfacecontainer.h>

Public Types

typedef css::uno::Type keyType
 

Public Member Functions

 OMultiTypeInterfaceContainerHelper (::osl::Mutex &rMutex)
 Create a container of interface containers. More...
 
 ~OMultiTypeInterfaceContainerHelper ()
 Delete all containers. More...
 
css::uno::Sequence< css::uno::Type > SAL_CALL getContainedTypes () const
 Return all id's under which at least one interface is added. More...
 
OInterfaceContainerHelper *SAL_CALL getContainer (const css::uno::Type &rKey) const
 Return the container created under this key. More...
 
sal_Int32 SAL_CALL addInterface (const css::uno::Type &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 css::uno::Type &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 object 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 Member Functions

 OMultiTypeInterfaceContainerHelper (const OMultiTypeInterfaceContainerHelper &) SAL_DELETED_FUNCTION
 
OMultiTypeInterfaceContainerHelperoperator= (const OMultiTypeInterfaceContainerHelper &) SAL_DELETED_FUNCTION
 

Private Attributes

voidm_pMap
 
::osl::Mutex & rMutex
 

Detailed Description

Specialized class for key type css::uno::Type, without explicit usage of STL symbols.

Definition at line 515 of file interfacecontainer.h.

Member Typedef Documentation

Definition at line 599 of file interfacecontainer.h.

Constructor & Destructor Documentation

cppu::OMultiTypeInterfaceContainerHelper::OMultiTypeInterfaceContainerHelper ( ::osl::Mutex &  rMutex)

Create a container of interface containers.

Parameters
rMutexthe mutex to protect multi thread access. The lifetime must be longer than the lifetime of this object.
cppu::OMultiTypeInterfaceContainerHelper::~OMultiTypeInterfaceContainerHelper ( )

Delete all containers.

Definition at line 308 of file interfacecontainer.cxx.

cppu::OMultiTypeInterfaceContainerHelper::OMultiTypeInterfaceContainerHelper ( const OMultiTypeInterfaceContainerHelper )
private

Member Function Documentation

sal_Int32 cppu::OMultiTypeInterfaceContainerHelper::addInterface ( const css::uno::Type &  rKey,
const css::uno::Reference< css::uno::XInterface > &  r 
)

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.

Attention:

If you add the same interface more than once, then it will be added to the elements list more than once and thus if you want to remove that interface from the list, you have to call removeInterface() the same number of times. In the latter case, you will also get events fired more than once (if the interface is a listener interface).

Parameters
rKeythe id of the container
rinterface to be added; it is allowed, to insert null or the same interface more than once
Returns
the new count of elements in the container

Definition at line 366 of file interfacecontainer.cxx.

References cppu::OInterfaceContainerHelper::addInterface(), and cppu::findType().

void cppu::OMultiTypeInterfaceContainerHelper::clear ( )

Remove all elements of all containers.

Does not delete the container.

Definition at line 428 of file interfacecontainer.cxx.

void cppu::OMultiTypeInterfaceContainerHelper::disposeAndClear ( const css::lang::EventObject &  rEvt)

Call disposing on all object in the container that support XEventListener.

Then clear the container.

Definition at line 397 of file interfacecontainer.cxx.

References cppu::OInterfaceContainerHelper::disposeAndClear(), and i.

Sequence< Type > cppu::OMultiTypeInterfaceContainerHelper::getContainedTypes ( ) const

Return all id's under which at least one interface is added.

Definition at line 320 of file interfacecontainer.cxx.

References i.

OInterfaceContainerHelper * cppu::OMultiTypeInterfaceContainerHelper::getContainer ( const css::uno::Type &  rKey) const

Return the container created under this key.

Returns
the container created under this key. If the container was not created, null was returned.

Definition at line 355 of file interfacecontainer.cxx.

References cppu::findType().

static void SAL_CALL cppu::OMultiTypeInterfaceContainerHelper::operator delete ( void pMem)
inlinestatic

Definition at line 521 of file interfacecontainer.h.

static void SAL_CALL cppu::OMultiTypeInterfaceContainerHelper::operator delete ( void ,
void  
)
inlinestatic

Definition at line 525 of file interfacecontainer.h.

static void* SAL_CALL cppu::OMultiTypeInterfaceContainerHelper::operator new ( size_t  nSize)
inlinestatic

Definition at line 519 of file interfacecontainer.h.

static void* SAL_CALL cppu::OMultiTypeInterfaceContainerHelper::operator new ( size_t  ,
void pMem 
)
inlinestatic

Definition at line 523 of file interfacecontainer.h.

OMultiTypeInterfaceContainerHelper& cppu::OMultiTypeInterfaceContainerHelper::operator= ( const OMultiTypeInterfaceContainerHelper )
private
sal_Int32 cppu::OMultiTypeInterfaceContainerHelper::removeInterface ( const css::uno::Type &  rKey,
const css::uno::Reference< css::uno::XInterface > &  rxIFace 
)

Removes an element from the container with the specified key.

It uses interface equality to remove the interface.

Parameters
rKeythe id of the container
rxIFaceinterface to be removed
Returns
the new count of elements in the container

Definition at line 381 of file interfacecontainer.cxx.

References cppu::findType().

Member Data Documentation

void* cppu::OMultiTypeInterfaceContainerHelper::m_pMap
private

Definition at line 601 of file interfacecontainer.h.

::osl::Mutex& cppu::OMultiTypeInterfaceContainerHelper::rMutex
private

Definition at line 602 of file interfacecontainer.h.


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