diff options
| -rw-r--r-- | include/plist/Array.h | 1 | ||||
| -rw-r--r-- | include/plist/Dictionary.h | 1 | ||||
| -rw-r--r-- | src/Array.cpp | 4 | ||||
| -rw-r--r-- | src/Dictionary.cpp | 4 |
4 files changed, 10 insertions, 0 deletions
diff --git a/include/plist/Array.h b/include/plist/Array.h index 2b25e94..5a685e1 100644 --- a/include/plist/Array.h +++ b/include/plist/Array.h | |||
| @@ -51,6 +51,7 @@ public : | |||
| 51 | const_iterator begin() const; | 51 | const_iterator begin() const; |
| 52 | const_iterator End() const; | 52 | const_iterator End() const; |
| 53 | const_iterator end() const; | 53 | const_iterator end() const; |
| 54 | const size_t size() const; | ||
| 54 | void Append(Node* node); | 55 | void Append(Node* node); |
| 55 | void Insert(Node* node, unsigned int pos); | 56 | void Insert(Node* node, unsigned int pos); |
| 56 | void Remove(Node* node); | 57 | void Remove(Node* node); |
diff --git a/include/plist/Dictionary.h b/include/plist/Dictionary.h index f3385e3..b61921b 100644 --- a/include/plist/Dictionary.h +++ b/include/plist/Dictionary.h | |||
| @@ -53,6 +53,7 @@ public : | |||
| 53 | const_iterator begin() const; | 53 | const_iterator begin() const; |
| 54 | const_iterator End() const; | 54 | const_iterator End() const; |
| 55 | const_iterator end() const; | 55 | const_iterator end() const; |
| 56 | const size_t size() const; | ||
| 56 | const_iterator Find(const std::string& key) const; | 57 | const_iterator Find(const std::string& key) const; |
| 57 | iterator Set(const std::string& key, const Node* node); | 58 | iterator Set(const std::string& key, const Node* node); |
| 58 | iterator Set(const std::string& key, const Node& node); | 59 | iterator Set(const std::string& key, const Node& node); |
diff --git a/src/Array.cpp b/src/Array.cpp index 2722d14..7826494 100644 --- a/src/Array.cpp +++ b/src/Array.cpp | |||
| @@ -128,6 +128,10 @@ Array::const_iterator Array::end() const | |||
| 128 | return _array.end(); | 128 | return _array.end(); |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | const size_t Array::size() const { | ||
| 132 | return _array.size(); | ||
| 133 | } | ||
| 134 | |||
| 131 | void Array::Append(Node* node) | 135 | void Array::Append(Node* node) |
| 132 | { | 136 | { |
| 133 | if (node) | 137 | if (node) |
diff --git a/src/Dictionary.cpp b/src/Dictionary.cpp index 4094d2c..5e76cb6 100644 --- a/src/Dictionary.cpp +++ b/src/Dictionary.cpp | |||
| @@ -134,6 +134,10 @@ Dictionary::const_iterator Dictionary::end() const | |||
| 134 | return _map.end(); | 134 | return _map.end(); |
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | const size_t Dictionary::size() const { | ||
| 138 | return _map.size(); | ||
| 139 | } | ||
| 140 | |||
| 137 | Dictionary::iterator Dictionary::Find(const std::string& key) | 141 | Dictionary::iterator Dictionary::Find(const std::string& key) |
| 138 | { | 142 | { |
| 139 | return _map.find(key); | 143 | return _map.find(key); |
