INTEGRATION: CWS cppuhelpshrink (1.18.72); FILE MERGED

2006/12/22 14:37:19 mmeeks 1.18.72.1: #i72766#
save memory in cppuhelper, using a vector instead of a hash_map
This commit is contained in:
Rüdiger Timm
2007-01-29 14:43:52 +00:00
parent 97a46e612c
commit f059134fab

View File

@@ -4,9 +4,9 @@
*
* $RCSfile: interfacecontainer.h,v $
*
* $Revision: 1.18 $
* $Revision: 1.19 $
*
* last change: $Author: obo $ $Date: 2005-12-21 13:19:23 $
* last change: $Author: rt $ $Date: 2007-01-29 15:43:52 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -35,8 +35,7 @@
#ifndef _CPPUHELPER_INTERFACECONTAINER_H_
#define _CPPUHELPER_INTERFACECONTAINER_H_
#include <hash_map>
#include <functional>
#include <vector>
#ifndef _OSL_MUTEX_HXX_
#include <osl/mutex.hxx>
@@ -406,9 +405,25 @@ public:
typedef key keyType;
private:
::std::hash_map< key , void* , hashImpl , equalImpl > *m_pMap;
typedef ::std::vector< std::pair < key , void* > > InterfaceMap;
InterfaceMap *m_pMap;
::osl::Mutex & rMutex;
inline typename InterfaceMap::iterator find(const key &rKey) const
{
typename InterfaceMap::iterator iter = m_pMap->begin();
typename InterfaceMap::iterator end = m_pMap->end();
while( iter != end )
{
equalImpl equal;
if( equal( iter->first, rKey ) )
break;
iter++;
}
return iter;
}
inline OMultiTypeInterfaceContainerHelperVar( const OMultiTypeInterfaceContainerHelperVar & ) SAL_THROW( () );
inline OMultiTypeInterfaceContainerHelperVar & operator = ( const OMultiTypeInterfaceContainerHelperVar & ) SAL_THROW( () );
};