summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Daniel2023-02-02 13:52:59 +0100
committerGravatar Nikias Bassen2023-02-03 00:26:19 +0100
commitc2f396a53745a74dd58de3b55092a77e0e9f639d (patch)
tree414cdd055f6375d0bfb7dcabedb6dbd9121ad5e7
parentcbb43d790d7ba0575369cebdf6f8cb451bd210fd (diff)
downloadlibplist-c2f396a53745a74dd58de3b55092a77e0e9f639d.tar.gz
libplist-c2f396a53745a74dd58de3b55092a77e0e9f639d.tar.bz2
Add lowercase begin/end iterator functions
... for Dictionary and Array
-rw-r--r--include/plist/Array.h4
-rw-r--r--include/plist/Dictionary.h4
-rw-r--r--src/Array.cpp20
-rw-r--r--src/Dictionary.cpp20
4 files changed, 48 insertions, 0 deletions
diff --git a/include/plist/Array.h b/include/plist/Array.h
index 5f82e83..2b25e94 100644
--- a/include/plist/Array.h
+++ b/include/plist/Array.h
@@ -44,9 +44,13 @@ public :
Node* operator[](unsigned int index);
iterator Begin();
+ iterator begin();
iterator End();
+ iterator end();
const_iterator Begin() const;
+ const_iterator begin() const;
const_iterator End() const;
+ const_iterator end() 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 a3ac3a7..f3385e3 100644
--- a/include/plist/Dictionary.h
+++ b/include/plist/Dictionary.h
@@ -45,10 +45,14 @@ public :
Node* operator[](const std::string& key);
iterator Begin();
+ iterator begin();
iterator End();
+ iterator end();
iterator Find(const std::string& key);
const_iterator Begin() const;
+ const_iterator begin() const;
const_iterator End() const;
+ const_iterator end() 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 5a4fd68..2722d14 100644
--- a/src/Array.cpp
+++ b/src/Array.cpp
@@ -93,21 +93,41 @@ Array::iterator Array::Begin()
return _array.begin();
}
+Array::iterator Array::begin()
+{
+ return _array.begin();
+}
+
Array::iterator Array::End()
{
return _array.end();
}
+Array::iterator Array::end()
+{
+ return _array.end();
+}
+
Array::const_iterator Array::Begin() const
{
return _array.begin();
}
+Array::const_iterator Array::begin() const
+{
+ return _array.begin();
+}
+
Array::const_iterator Array::End() const
{
return _array.end();
}
+Array::const_iterator Array::end() const
+{
+ return _array.end();
+}
+
void Array::Append(Node* node)
{
if (node)
diff --git a/src/Dictionary.cpp b/src/Dictionary.cpp
index ea04e81..4094d2c 100644
--- a/src/Dictionary.cpp
+++ b/src/Dictionary.cpp
@@ -99,21 +99,41 @@ Dictionary::iterator Dictionary::Begin()
return _map.begin();
}
+Dictionary::iterator Dictionary::begin()
+{
+ return _map.begin();
+}
+
Dictionary::iterator Dictionary::End()
{
return _map.end();
}
+Dictionary::iterator Dictionary::end()
+{
+ return _map.end();
+}
+
Dictionary::const_iterator Dictionary::Begin() const
{
return _map.begin();
}
+Dictionary::const_iterator Dictionary::begin() const
+{
+ return _map.begin();
+}
+
Dictionary::const_iterator Dictionary::End() const
{
return _map.end();
}
+Dictionary::const_iterator Dictionary::end() const
+{
+ return _map.end();
+}
+
Dictionary::iterator Dictionary::Find(const std::string& key)
{
return _map.find(key);