LibreOffice LibreOffice 4.1 SDK C/C++ API Reference

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | List of all members
cppu::OMultiTypeInterfaceContainerHelper Class Reference

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

`#include <interfacecontainer.h>`

## Public Types
typedef ::com::sun::star::uno::Type | keyType

## Public Member Functions
| OMultiTypeInterfaceContainerHelper (::osl::Mutex &rMutex) throw ()
| Create a container of interface containers. More...
| ~OMultiTypeInterfaceContainerHelper () throw ()
| Delete all containers. More...
::com::sun::star::uno::Sequence < ::com::sun::star::uno::Type > | getContainedTypes () const throw ()
| Return all id's under which at least one interface is added. More...
OInterfaceContainerHelper * | getContainer (const ::com::sun::star::uno::Type &rKey) const throw ()
| Return the container created under this key. More...
sal_Int32 | addInterface (const ::com::sun::star::uno::Type &rKey, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > &r) throw ()
| Inserts an element into the container with the specified key. More...
sal_Int32 | removeInterface (const ::com::sun::star::uno::Type &rKey, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > &rxIFace) throw ()
| Removes an element from the container with the specified key. More...
void | disposeAndClear (const ::com::sun::star::lang::EventObject &rEvt) throw ()
| Call disposing on all object in the container that support XEventListener. More...
void | clear () throw ()
| Remove all elements of all containers. More...

## Static Public Member Functions
static void * | operator new (size_t nSize) throw ()
static void | operator delete (void *pMem) throw ()
static void * | operator new (size_t, void *pMem) throw ()
static void | operator delete (void *, void *) throw ()

## Detailed Description

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

## Member Typedef Documentation

typedef ::com::sun::star::uno::Type cppu::OMultiTypeInterfaceContainerHelper::keyType

## Constructor & Destructor Documentation

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

Create a container of interface containers.

Parameters

  rMutex | the mutex to protect multi thread access. The lifetime must be longer than the lifetime of this object.

cppu::OMultiTypeInterfaceContainerHelper::~OMultiTypeInterfaceContainerHelper | ( |  | ) |
throw | ( |
| ) |  |

Delete all containers.

## Member Function Documentation

sal_Int32 cppu::OMultiTypeInterfaceContainerHelper::addInterface | ( | const ::com::sun::star::uno::Type & | rKey,
|  | const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & | r
| ) |  |
throw | ( |
| ) |  |

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

  rKey | the id of the container
  r | interface 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

void cppu::OMultiTypeInterfaceContainerHelper::clear | ( |  | ) |
throw | ( |
| ) |  |

Remove all elements of all containers.

Does not delete the container.

void cppu::OMultiTypeInterfaceContainerHelper::disposeAndClear | ( | const ::com::sun::star::lang::EventObject & | rEvt | ) |
throw | ( |
| ) |  |

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

Than clear the container.

::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > cppu::OMultiTypeInterfaceContainerHelper::getContainedTypes | ( |  | ) | const
throw | ( |
| ) |  |

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

OInterfaceContainerHelper* cppu::OMultiTypeInterfaceContainerHelper::getContainer | ( | const ::com::sun::star::uno::Type & | rKey | ) | const
throw | ( |
| ) |  |

Return the container created under this key.

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

static void cppu::OMultiTypeInterfaceContainerHelper::operator delete | ( | void * | pMem | ) |
throw | ( |
| ) |  |
| inline static

static void cppu::OMultiTypeInterfaceContainerHelper::operator delete | ( | void * | ,
|  | void * |
| ) |  |
throw | ( |
| ) |  |
| inline static

static void* cppu::OMultiTypeInterfaceContainerHelper::operator new | ( | size_t | nSize | ) |
throw | ( |
| ) |  |
| inline static

static void* cppu::OMultiTypeInterfaceContainerHelper::operator new | ( | size_t | ,
|  | void * | pMem
| ) |  |
throw | ( |
| ) |  |
| inline static

sal_Int32 cppu::OMultiTypeInterfaceContainerHelper::removeInterface | ( | const ::com::sun::star::uno::Type & | rKey,
|  | const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & | rxIFace
| ) |  |
throw | ( |
| ) |  |

Removes an element from the container with the specified key.

It uses interface equality to remove the interface.

Parameters

  rKey | the id of the container
  rxIFace | interface to be removed

Returns
  the new count of elements in the container

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

- cppuhelper/interfacecontainer.h