mirror of
https://github.com/serge1/ELFIO.git
synced 2024-12-28 06:15:21 +00:00
Added iterator for segments and sections
segments and sections were already stored as std::vector<T>. This change simply exposes the std::vector<T>::iterator functions.
This commit is contained in:
parent
b227bf1482
commit
6d713f4d0a
@ -686,6 +686,15 @@ class elfio
|
||||
|
||||
return new_section;
|
||||
}
|
||||
|
||||
std::vector<section*>::iterator begin() {
|
||||
return parent->sections_.begin();
|
||||
}
|
||||
|
||||
std::vector<section*>::iterator end() {
|
||||
return parent->sections_.end();
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
private:
|
||||
@ -722,6 +731,14 @@ class elfio
|
||||
return parent->create_segment();
|
||||
}
|
||||
|
||||
std::vector<segment*>::iterator begin() {
|
||||
return parent->segments_.begin();
|
||||
}
|
||||
|
||||
std::vector<segment*>::iterator end() {
|
||||
return parent->segments_.end();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
private:
|
||||
elfio* parent;
|
||||
|
Loading…
Reference in New Issue
Block a user