Revert "fdo#75757: remove inheritance to std::map"

This reverts commit a2deca9d75: config_map had
been introduced on purpose with bfb978334c
"configmgr: faster / simpler compare for keys."

Change-Id: I3ae0edc4d23977c6537bd2f462f90a702266de6d
This commit is contained in:
Stephan Bergmann
2014-10-20 13:38:12 +02:00
parent 3bb30a68e0
commit 9df18fd92c
5 changed files with 12 additions and 9 deletions

View File

@@ -487,7 +487,7 @@ private:
bool theDirectlyModified); bool theDirectlyModified);
}; };
typedef std::map< OUString, ModifiedChild, LengthContentsCompare > ModifiedChildren; typedef config_map< ModifiedChild > ModifiedChildren;
rtl::Reference< ChildAccess > getModifiedChild( rtl::Reference< ChildAccess > getModifiedChild(
ModifiedChildren::iterator const & childIterator); ModifiedChildren::iterator const & childIterator);
@@ -516,7 +516,7 @@ private:
rtl::Reference< Access > getNotificationRoot(); rtl::Reference< Access > getNotificationRoot();
typedef std::map< OUString, ChildAccess *, LengthContentsCompare > WeakChildMap; typedef config_map< ChildAccess * > WeakChildMap;
typedef typedef
std::multiset< std::multiset<
@@ -536,7 +536,7 @@ private:
com::sun::star::beans::XPropertyChangeListener > > com::sun::star::beans::XPropertyChangeListener > >
PropertyChangeListenersElement; PropertyChangeListenersElement;
typedef std::map< OUString, PropertyChangeListenersElement, LengthContentsCompare > typedef config_map< PropertyChangeListenersElement >
PropertyChangeListeners; PropertyChangeListeners;
typedef typedef
@@ -545,7 +545,7 @@ private:
com::sun::star::beans::XVetoableChangeListener > > com::sun::star::beans::XVetoableChangeListener > >
VetoableChangeListenersElement; VetoableChangeListenersElement;
typedef std::map< OUString, VetoableChangeListenersElement, LengthContentsCompare > typedef config_map< VetoableChangeListenersElement >
VetoableChangeListeners; VetoableChangeListeners;
typedef typedef

View File

@@ -148,8 +148,9 @@ private:
typedef std::set< RootAccess * > WeakRootSet; typedef std::set< RootAccess * > WeakRootSet;
typedef typedef
std::map< OUString, com::sun::star::uno::Reference< config_map<
com::sun::star::beans::XPropertySet >, LengthContentsCompare > com::sun::star::uno::Reference<
com::sun::star::beans::XPropertySet > >
ExternalServices; ExternalServices;
class WriteThread; class WriteThread;

View File

@@ -9,6 +9,7 @@
#ifndef CONFIG_MAP_HXX #ifndef CONFIG_MAP_HXX
#define CONFIG_MAP_HXX #define CONFIG_MAP_HXX
#include <map>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
// The realisation here is that while a map is a reasonably compact // The realisation here is that while a map is a reasonably compact
@@ -27,6 +28,8 @@ struct LengthContentsCompare
} }
}; };
template< class T > struct config_map : public std::map< OUString, T, LengthContentsCompare > { };
#endif // CONFIG_MAP_HXX #endif // CONFIG_MAP_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -86,7 +86,7 @@ struct Data: private boost::noncopyable {
OUString const & url); OUString const & url);
private: private:
typedef std::map< OUString, rtl::Reference< ExtensionXcu >, LengthContentsCompare > typedef config_map< rtl::Reference< ExtensionXcu > >
ExtensionXcuAdditions; ExtensionXcuAdditions;
rtl::Reference< Node > root_; rtl::Reference< Node > root_;

View File

@@ -21,14 +21,13 @@
#define INCLUDED_CONFIGMGR_SOURCE_NODEMAP_HXX #define INCLUDED_CONFIGMGR_SOURCE_NODEMAP_HXX
#include <sal/config.h> #include <sal/config.h>
#include <map>
#include "config_map.hxx" #include "config_map.hxx"
#include <rtl/ref.hxx> #include <rtl/ref.hxx>
#include <node.hxx> #include <node.hxx>
namespace configmgr { namespace configmgr {
typedef std::map< OUString, rtl::Reference< Node >, LengthContentsCompare > NodeMapImpl; typedef config_map< rtl::Reference< Node > > NodeMapImpl;
class NodeMap class NodeMap
{ {
NodeMapImpl maImpl; NodeMapImpl maImpl;