summaryrefslogtreecommitdiff
path: root/configmgr/source
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2014-06-26 14:24:20 +0100
committerMichael Meeks <michael.meeks@collabora.com>2014-06-28 14:37:22 +0100
commitff1d2ba5010821bb4f526dc7a51a99b9e6c4dd25 (patch)
treed83b6fb65f6a4e424de5111bd1927576208351e4 /configmgr/source
parentf692c61ab26b425cd8e6a36b8e229bbf7caff335 (diff)
configmgr: hide NodeMap implementation.
Change-Id: I57c81b5ec7a6541a825e42f9b68e7c5fa98f316f
Diffstat (limited to 'configmgr/source')
-rw-r--r--configmgr/source/node.hxx5
-rw-r--r--configmgr/source/nodemap.hxx31
-rw-r--r--configmgr/source/valueparser.cxx2
3 files changed, 30 insertions, 8 deletions
diff --git a/configmgr/source/node.hxx b/configmgr/source/node.hxx
index 6537973f7841..8bd000c7e207 100644
--- a/configmgr/source/node.hxx
+++ b/configmgr/source/node.hxx
@@ -25,11 +25,10 @@
#include <rtl/ref.hxx>
#include <salhelper/simplereferenceobject.hxx>
-#include "nodemap.hxx"
-
-
namespace configmgr {
+class NodeMap;
+
class Node: public salhelper::SimpleReferenceObject {
public:
enum Kind {
diff --git a/configmgr/source/nodemap.hxx b/configmgr/source/nodemap.hxx
index a304cc214f14..7b8d126e63f1 100644
--- a/configmgr/source/nodemap.hxx
+++ b/configmgr/source/nodemap.hxx
@@ -23,13 +23,36 @@
#include <sal/config.h>
#include <map>
#include <rtl/ref.hxx>
-
+#include <node.hxx>
namespace configmgr {
-class Node;
-
-typedef std::map< OUString, rtl::Reference< Node > > NodeMap;
+typedef std::map< OUString, rtl::Reference< Node > > NodeMapImpl;
+class NodeMap
+{
+ NodeMapImpl aImpl;
+ public:
+ typedef NodeMapImpl::iterator iterator;
+ typedef NodeMapImpl::const_iterator const_iterator;
+ typedef NodeMapImpl::value_type value_type;
+
+ NodeMap() {}
+ ~NodeMap() {}
+ void clear() { aImpl.clear(); }
+ bool empty() { return aImpl.empty(); }
+ void erase(const iterator &it) { aImpl.erase(it); }
+ void erase(const OUString &aStr) { aImpl.erase(aStr); }
+ iterator find(const OUString &aStr) { return aImpl.find( aStr ); }
+
+ const_iterator find(const OUString &aStr) const { return aImpl.find( aStr ); }
+ rtl::Reference<Node> &operator[](const OUString &aStr) { return aImpl[aStr]; }
+ iterator begin() { return aImpl.begin(); }
+ const_iterator begin() const { return aImpl.begin(); }
+
+ iterator end() { return aImpl.end(); }
+ const_iterator end() const { return aImpl.end(); }
+ std::pair<iterator,bool> insert(const value_type &vt) { return aImpl.insert(vt); }
+};
void cloneNodeMap(NodeMap const & source, NodeMap * target);
diff --git a/configmgr/source/valueparser.cxx b/configmgr/source/valueparser.cxx
index a12d0729f79a..183b51009dd3 100644
--- a/configmgr/source/valueparser.cxx
+++ b/configmgr/source/valueparser.cxx
@@ -359,7 +359,7 @@ bool ValueParser::endElement() {
if (i == members.end()) {
pLVNode = new LocalizedValueNode(layer_);
members.insert(
- NodeMap::value_type(localizedName_, pLVNode));
+ NodeMap::value_type(localizedName_, pLVNode ));
} else {
pLVNode = static_cast< LocalizedValueNode * >(i->second.get());
}