diff options
Diffstat (limited to 'configmgr/source/nodemap.hxx')
-rw-r--r-- | configmgr/source/nodemap.hxx | 31 |
1 files changed, 27 insertions, 4 deletions
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); |