diff options
| author | 2009-10-16 22:26:13 +0200 | |
|---|---|---|
| committer | 2009-10-16 22:26:13 +0200 | |
| commit | 32be8ec384bfd78e189d3de6609e50cf4dd072a2 (patch) | |
| tree | ac7edad0f19be2a31efaaaaa3acd477dd2f3c233 /include/plist/Dictionary.h | |
| parent | 8aeef4dd2331445fea8a7a40466b19973e9d09c4 (diff) | |
| download | libplist-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.h | 12 |
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 | |||
| 35 | Dictionary(); | 35 | Dictionary(); |
| 36 | Dictionary(plist_t node); | 36 | Dictionary(plist_t node); |
| 37 | Dictionary(Dictionary& d); | 37 | Dictionary(Dictionary& d); |
| 38 | Dictionary& operator=(const Dictionary& d); | 38 | Dictionary& operator=(Dictionary& d); |
| 39 | virtual ~Dictionary(); | 39 | virtual ~Dictionary(); |
| 40 | 40 | ||
| 41 | Node* Clone(); | ||
| 42 | |||
| 41 | typedef std::map<std::string,Node*>::iterator iterator; | 43 | typedef std::map<std::string,Node*>::iterator iterator; |
| 42 | 44 | ||
| 43 | Node* operator[](std::string& key); | 45 | Node* operator[](const std::string& key); |
| 44 | iterator Begin(); | 46 | iterator Begin(); |
| 45 | iterator End(); | 47 | iterator End(); |
| 46 | void Insert(std::string& key, Node* node); | 48 | void Insert(const std::string& key, Node* node); |
| 47 | void Remove(Node* node); | 49 | void Remove(Node* node); |
| 48 | void Remove(std::string& key); | 50 | void Remove(const std::string& key); |
| 49 | 51 | ||
| 50 | private : | 52 | private : |
| 51 | std::map<std::string,Node*> _map; | 53 | std::map<std::string,Node*> _map; |
