diff options
-rw-r--r-- | include/plist/Array.h | 7 | ||||
-rw-r--r-- | src/Array.cpp | 20 |
2 files changed, 27 insertions, 0 deletions
diff --git a/include/plist/Array.h b/include/plist/Array.h index 1b7728a..5f82e83 100644 --- a/include/plist/Array.h +++ b/include/plist/Array.h @@ -39,7 +39,14 @@ public : Node* Clone() const; + typedef std::vector<Node*>::iterator iterator; + typedef std::vector<Node*>::const_iterator const_iterator; + Node* operator[](unsigned int index); + iterator Begin(); + iterator End(); + const_iterator Begin() const; + const_iterator End() const; void Append(Node* node); void Insert(Node* node, unsigned int pos); void Remove(Node* node); diff --git a/src/Array.cpp b/src/Array.cpp index 23f9922..5a4fd68 100644 --- a/src/Array.cpp +++ b/src/Array.cpp @@ -88,6 +88,26 @@ Node* Array::operator[](unsigned int array_index) return _array.at(array_index); } +Array::iterator Array::Begin() +{ + return _array.begin(); +} + +Array::iterator Array::End() +{ + return _array.end(); +} + +Array::const_iterator Array::Begin() const +{ + return _array.begin(); +} + +Array::const_iterator Array::End() const +{ + return _array.end(); +} + void Array::Append(Node* node) { if (node) |