summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/plist/Array.h1
-rw-r--r--include/plist/Dictionary.h1
-rw-r--r--src/Array.cpp4
-rw-r--r--src/Dictionary.cpp4
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 :
const_iterator begin() const;
const_iterator End() const;
const_iterator end() const;
+ const size_t size() const;
void Append(Node* node);
void Insert(Node* node, unsigned int pos);
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 :
const_iterator begin() const;
const_iterator End() const;
const_iterator end() const;
+ const size_t size() const;
const_iterator Find(const std::string& key) const;
iterator Set(const std::string& key, const Node* node);
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
return _array.end();
}
+const size_t Array::size() const {
+ return _array.size();
+}
+
void Array::Append(Node* node)
{
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
return _map.end();
}
+const size_t Dictionary::size() const {
+ return _map.size();
+}
+
Dictionary::iterator Dictionary::Find(const std::string& key)
{
return _map.find(key);