59 return this->
Inspect( aItem, aTestData );
67 return INSPECT_RESULT::QUIT;
70 using ITER = std::vector<EDA_ITEM*>::iterator;
71 using CITER = std::vector<EDA_ITEM*>::const_iterator;
83 return (
int)
m_list.size();
123 return aCandidate == aItem;
164 for(
size_t i = 0; i <
m_list.size(); i++ )
183 if( (
unsigned)aIndex < (
unsigned)
GetCount() )
197 for(
size_t i = 0; i <
m_list.size(); i++ )
225 for(
size_t i = 0; i <
m_list.size(); i++ )
227 if(
m_list[i]->Type() == aType )
An abstract class that will find and hold all the objects according to an inspection done by the Insp...
std::vector< EDA_ITEM * > m_backupList
void Transfer(EDA_ITEM *aItem)
Move aItem (if exists in the collector) to the backup list.
std::vector< EDA_ITEM * >::const_iterator CITER
void Transfer(int aIndex)
Move the item at aIndex (first position is 0) to the backup list.
virtual INSPECT_RESULT Inspect(EDA_ITEM *aTestItem, void *aTestData)
INSPECTOR_FUNC m_inspector
void Empty()
Clear the list.
int GetCount() const
Return the number of objects in the list.
std::vector< EDA_ITEM * >::iterator ITER
bool HasItem(const EDA_ITEM *aItem) const
Tests if aItem has already been collected.
void SetScanTypes(const std::vector< KICAD_T > &aTypes)
Record the list of KICAD_T types to consider for collection by the Inspect() function.
void SetRefPos(const VECTOR2I &aRefPos)
int CountType(KICAD_T aType)
Count the number of items matching aType.
std::vector< KICAD_T > m_scanTypes
void Remove(int aIndex)
Remove the item at aIndex (first position is 0).
std::vector< EDA_ITEM * > m_list
virtual EDA_ITEM * operator[](int aIndex) const
Used for read only access and returns the object at aIndex.
void Remove(const EDA_ITEM *aItem)
Remove the item aItem (if exists in the collector).
bool HasAdditionalItems()
Test if the collector has heuristic backup items.
void Combine()
Re-combine the backup list into the main list of the collector.
void Append(EDA_ITEM *item)
Add an item to the end of the list.
A base class for most all the KiCad significant classes used in schematics and boards.
std::function< INSPECT_RESULT(EDA_ITEM *aItem, void *aTestData) > INSPECTOR_FUNC
Used to inspect and possibly collect the (search) results of iterating over a list or tree of KICAD_T...
void delete_if(_Container &__c, _Function &&__f)
Deletes all values from __c for which __f returns true.
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.