mirror of
https://github.com/libimobiledevice/libplist.git
synced 2026-05-17 20:30:34 +00:00
Add PList::Array iterator member functions
... returning both iterators and const_iterators: * PList::Array::Begin() * PList::Array::End()
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user