diff options
| author | 2023-02-02 13:52:59 +0100 | |
|---|---|---|
| committer | 2023-02-03 00:26:19 +0100 | |
| commit | c2f396a53745a74dd58de3b55092a77e0e9f639d (patch) | |
| tree | 414cdd055f6375d0bfb7dcabedb6dbd9121ad5e7 | |
| parent | cbb43d790d7ba0575369cebdf6f8cb451bd210fd (diff) | |
| download | libplist-c2f396a53745a74dd58de3b55092a77e0e9f639d.tar.gz libplist-c2f396a53745a74dd58de3b55092a77e0e9f639d.tar.bz2 | |
Add lowercase begin/end iterator functions
... for Dictionary and Array
| -rw-r--r-- | include/plist/Array.h | 4 | ||||
| -rw-r--r-- | include/plist/Dictionary.h | 4 | ||||
| -rw-r--r-- | src/Array.cpp | 20 | ||||
| -rw-r--r-- | src/Dictionary.cpp | 20 |
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 : | |||
| 44 | 44 | ||
| 45 | Node* operator[](unsigned int index); | 45 | Node* operator[](unsigned int index); |
| 46 | iterator Begin(); | 46 | iterator Begin(); |
| 47 | iterator begin(); | ||
| 47 | iterator End(); | 48 | iterator End(); |
| 49 | iterator end(); | ||
| 48 | const_iterator Begin() const; | 50 | const_iterator Begin() const; |
| 51 | const_iterator begin() const; | ||
| 49 | const_iterator End() const; | 52 | const_iterator End() const; |
| 53 | const_iterator end() const; | ||
| 50 | void Append(Node* node); | 54 | void Append(Node* node); |
| 51 | void Insert(Node* node, unsigned int pos); | 55 | void Insert(Node* node, unsigned int pos); |
| 52 | void Remove(Node* node); | 56 | 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 : | |||
| 45 | 45 | ||
| 46 | Node* operator[](const std::string& key); | 46 | Node* operator[](const std::string& key); |
| 47 | iterator Begin(); | 47 | iterator Begin(); |
| 48 | iterator begin(); | ||
| 48 | iterator End(); | 49 | iterator End(); |
| 50 | iterator end(); | ||
| 49 | iterator Find(const std::string& key); | 51 | iterator Find(const std::string& key); |
| 50 | const_iterator Begin() const; | 52 | const_iterator Begin() const; |
| 53 | const_iterator begin() const; | ||
| 51 | const_iterator End() const; | 54 | const_iterator End() const; |
| 55 | const_iterator end() const; | ||
| 52 | const_iterator Find(const std::string& key) const; | 56 | const_iterator Find(const std::string& key) const; |
| 53 | iterator Set(const std::string& key, const Node* node); | 57 | iterator Set(const std::string& key, const Node* node); |
| 54 | iterator Set(const std::string& key, const Node& node); | 58 | 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() | |||
| 93 | return _array.begin(); | 93 | return _array.begin(); |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | Array::iterator Array::begin() | ||
| 97 | { | ||
| 98 | return _array.begin(); | ||
| 99 | } | ||
| 100 | |||
| 96 | Array::iterator Array::End() | 101 | Array::iterator Array::End() |
| 97 | { | 102 | { |
| 98 | return _array.end(); | 103 | return _array.end(); |
| 99 | } | 104 | } |
| 100 | 105 | ||
| 106 | Array::iterator Array::end() | ||
| 107 | { | ||
| 108 | return _array.end(); | ||
| 109 | } | ||
| 110 | |||
| 101 | Array::const_iterator Array::Begin() const | 111 | Array::const_iterator Array::Begin() const |
| 102 | { | 112 | { |
| 103 | return _array.begin(); | 113 | return _array.begin(); |
| 104 | } | 114 | } |
| 105 | 115 | ||
| 116 | Array::const_iterator Array::begin() const | ||
| 117 | { | ||
| 118 | return _array.begin(); | ||
| 119 | } | ||
| 120 | |||
| 106 | Array::const_iterator Array::End() const | 121 | Array::const_iterator Array::End() const |
| 107 | { | 122 | { |
| 108 | return _array.end(); | 123 | return _array.end(); |
| 109 | } | 124 | } |
| 110 | 125 | ||
| 126 | Array::const_iterator Array::end() const | ||
| 127 | { | ||
| 128 | return _array.end(); | ||
| 129 | } | ||
| 130 | |||
| 111 | void Array::Append(Node* node) | 131 | void Array::Append(Node* node) |
| 112 | { | 132 | { |
| 113 | if (node) | 133 | 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() | |||
| 99 | return _map.begin(); | 99 | return _map.begin(); |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | Dictionary::iterator Dictionary::begin() | ||
| 103 | { | ||
| 104 | return _map.begin(); | ||
| 105 | } | ||
| 106 | |||
| 102 | Dictionary::iterator Dictionary::End() | 107 | Dictionary::iterator Dictionary::End() |
| 103 | { | 108 | { |
| 104 | return _map.end(); | 109 | return _map.end(); |
| 105 | } | 110 | } |
| 106 | 111 | ||
| 112 | Dictionary::iterator Dictionary::end() | ||
| 113 | { | ||
| 114 | return _map.end(); | ||
| 115 | } | ||
| 116 | |||
| 107 | Dictionary::const_iterator Dictionary::Begin() const | 117 | Dictionary::const_iterator Dictionary::Begin() const |
| 108 | { | 118 | { |
| 109 | return _map.begin(); | 119 | return _map.begin(); |
| 110 | } | 120 | } |
| 111 | 121 | ||
| 122 | Dictionary::const_iterator Dictionary::begin() const | ||
| 123 | { | ||
| 124 | return _map.begin(); | ||
| 125 | } | ||
| 126 | |||
| 112 | Dictionary::const_iterator Dictionary::End() const | 127 | Dictionary::const_iterator Dictionary::End() const |
| 113 | { | 128 | { |
| 114 | return _map.end(); | 129 | return _map.end(); |
| 115 | } | 130 | } |
| 116 | 131 | ||
| 132 | Dictionary::const_iterator Dictionary::end() const | ||
| 133 | { | ||
| 134 | return _map.end(); | ||
| 135 | } | ||
| 136 | |||
| 117 | Dictionary::iterator Dictionary::Find(const std::string& key) | 137 | Dictionary::iterator Dictionary::Find(const std::string& key) |
| 118 | { | 138 | { |
| 119 | return _map.find(key); | 139 | return _map.find(key); |
