SCH_REFERENCE_LIST: add some iterator support

This commit is contained in:
Mike Williams 2023-08-09 13:36:32 -04:00
parent ab1dccd6b3
commit 20fe14c91f
1 changed files with 15 additions and 0 deletions

View File

@ -598,6 +598,21 @@ public:
friend class BACK_ANNOTATION;
typedef std::vector<SCH_REFERENCE>::iterator iterator;
typedef std::vector<SCH_REFERENCE>::const_iterator const_iterator;
iterator begin() { return m_flatList.begin(); }
iterator end() { return m_flatList.end(); }
const_iterator begin() const { return m_flatList.begin(); }
const_iterator end() const { return m_flatList.end(); }
iterator erase( iterator position ) { return m_flatList.erase( position ); }
iterator erase( iterator first, iterator last ) { return m_flatList.erase( first, last ); }
private:
static bool sortByRefAndValue( const SCH_REFERENCE& item1, const SCH_REFERENCE& item2 );