23#ifndef INCLUDED_CPPUHELPER_INTERFACECONTAINER_HXX 
   24#define INCLUDED_CPPUHELPER_INTERFACECONTAINER_HXX 
   36template< 
class key , 
class hashImpl , 
class equalImpl >
 
   40    m_pMap = 
new InterfaceMap;
 
 
   44template< 
class key , 
class hashImpl , 
class equalImpl >
 
   47    typename InterfaceMap::iterator iter = m_pMap->begin();
 
   48    typename InterfaceMap::iterator end = m_pMap->end();
 
   53        (*iter).second = NULL;
 
 
   60template< 
class key , 
class hashImpl , 
class equalImpl >
 
   64    typename InterfaceMap::size_type nSize = m_pMap->size();
 
   68        key * pArray = aInterfaceTypes.
getArray();
 
   70        typename InterfaceMap::iterator iter = m_pMap->begin();
 
   71        typename InterfaceMap::iterator end = m_pMap->end();
 
   79                pArray[i++] = (*iter).first;
 
   86        return aInterfaceTypes;
 
 
   92template< 
class key , 
class hashImpl , 
class equalImpl >
 
   94    const key & rKey )
 const 
   98    typename InterfaceMap::iterator iter = find( rKey );
 
   99    if( iter != m_pMap->end() )
 
 
  105template< 
class key , 
class hashImpl , 
class equalImpl >
 
  111    typename InterfaceMap::iterator iter = find( rKey );
 
  112    if( iter == m_pMap->end() )
 
  115        m_pMap->push_back(std::pair<key, void*>(rKey, pLC));
 
 
  123template< 
class key , 
class hashImpl , 
class equalImpl >
 
  131    typename InterfaceMap::iterator iter = find( rKey );
 
  133    if( iter != m_pMap->end() )
 
 
  141template< 
class key , 
class hashImpl , 
class equalImpl >
 
  143    const css::lang::EventObject & rEvt )
 
  145    typename InterfaceMap::size_type nSize = 0;
 
  149        nSize = m_pMap->size();
 
  153            ppListenerContainers = 
new ppp[nSize];
 
  155            typename InterfaceMap::iterator iter = m_pMap->begin();
 
  156            typename InterfaceMap::iterator end = m_pMap->end();
 
  158            typename InterfaceMap::size_type i = 0;
 
  168    for( 
typename InterfaceMap::size_type i = 0; i < nSize; i++ )
 
  170        if( ppListenerContainers[i] )
 
  174    delete [] ppListenerContainers;
 
 
  178template< 
class key , 
class hashImpl , 
class equalImpl >
 
  182    typename InterfaceMap::iterator iter = m_pMap->begin();
 
  183    typename InterfaceMap::iterator end = m_pMap->end();
 
 
Guard< Mutex > MutexGuard
Definition mutex.hxx:273
Definition Enterable.hxx:31
A mutual exclusion synchronization object.
Definition mutex.hxx:35
Template C++ class representing an IDL sequence.
Definition Sequence.h:61
E * getArray()
Gets a pointer to elements array for reading and writing.
Definition Sequence.hxx:166
A container of interfaces.
Definition interfacecontainer.h:132
sal_Int32 getLength() const
Return the number of Elements in the container.
void disposeAndClear(const css::lang::EventObject &rEvt)
Call disposing on all object in the container that support XEventListener.
sal_Int32 addInterface(const css::uno::Reference< css::uno::XInterface > &rxIFace)
Inserts an element into the container.
~OMultiTypeInterfaceContainerHelperVar()
Deletes all containers.
Definition interfacecontainer.hxx:45
sal_Int32 addInterface(const key &rKey, const css::uno::Reference< css::uno::XInterface > &r)
Inserts an element into the container with the specified key.
Definition interfacecontainer.hxx:106
OInterfaceContainerHelper * getContainer(const key &) const
Return the container created under this key.
Definition interfacecontainer.hxx:93
void clear()
Remove all elements of all containers.
Definition interfacecontainer.hxx:179
void disposeAndClear(const css::lang::EventObject &rEvt)
Call disposing on all references in the container, that support XEventListener.
Definition interfacecontainer.hxx:142
OMultiTypeInterfaceContainerHelperVar(::osl::Mutex &rMutex)
Create a container of interface containers.
Definition interfacecontainer.hxx:37
css::uno::Sequence< key > getContainedTypes() const
Return all id's under which at least one interface is added.
Definition interfacecontainer.hxx:61
sal_Int32 removeInterface(const key &rKey, const css::uno::Reference< css::uno::XInterface > &rxIFace)
Removes an element from the container with the specified key.
Definition interfacecontainer.hxx:124