summaryrefslogtreecommitdiffstats
path: root/include/plist/Dictionary.h
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2009-10-16 22:26:13 +0200
committerGravatar Jonathan Beck2009-10-16 22:26:13 +0200
commit32be8ec384bfd78e189d3de6609e50cf4dd072a2 (patch)
treeac7edad0f19be2a31efaaaaa3acd477dd2f3c233 /include/plist/Dictionary.h
parent8aeef4dd2331445fea8a7a40466b19973e9d09c4 (diff)
downloadlibplist-32be8ec384bfd78e189d3de6609e50cf4dd072a2.tar.gz
libplist-32be8ec384bfd78e189d3de6609e50cf4dd072a2.tar.bz2
Fix Node lifecycle and change argument as reference to const reference.
Diffstat (limited to 'include/plist/Dictionary.h')
-rw-r--r--include/plist/Dictionary.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/plist/Dictionary.h b/include/plist/Dictionary.h
index 8468ab5..6169774 100644
--- a/include/plist/Dictionary.h
+++ b/include/plist/Dictionary.h
@@ -35,17 +35,19 @@ class Dictionary : public Structure
Dictionary();
Dictionary(plist_t node);
Dictionary(Dictionary& d);
- Dictionary& operator=(const Dictionary& d);
+ Dictionary& operator=(Dictionary& d);
virtual ~Dictionary();
-
+
+ Node* Clone();
+
typedef std::map<std::string,Node*>::iterator iterator;
- Node* operator[](std::string& key);
+ Node* operator[](const std::string& key);
iterator Begin();
iterator End();
- void Insert(std::string& key, Node* node);
+ void Insert(const std::string& key, Node* node);
void Remove(Node* node);
- void Remove(std::string& key);
+ void Remove(const std::string& key);
private :
std::map<std::string,Node*> _map;