28#include <unordered_set>
80 template<
class Visitor>
81 int Query(
const ITEM* aItem,
int aMinDistance, Visitor& aVisitor )
const;
94 template<
class Visitor>
95 int Query(
const SHAPE* aShape,
int aMinDistance, Visitor& aVisitor )
const;
121 template <
class Visitor>
122 int querySingle( std::size_t aIndex,
const SHAPE* aShape,
int aMinDistance, Visitor& aVisitor )
const;
131template<
class Visitor>
137 return m_subIndices[aIndex].Query( aShape, aMinDistance, aVisitor);
140template<
class Visitor>
149 for(
int i = layers.
Start(); i <= layers.
End(); ++i )
155template<
class Visitor>
161 total +=
querySingle( i, aShape, aMinDistance, aVisitor );
void Replace(ITEM *aOldItem, ITEM *aNewItem)
Replaces one item with another.
int querySingle(std::size_t aIndex, const SHAPE *aShape, int aMinDistance, Visitor &aVisitor) const
std::unordered_set< ITEM * > ITEM_SET
void Remove(ITEM *aItem)
Removes an item from the spatial index.
bool Contains(ITEM *aItem) const
Function Contains()
std::list< ITEM * > NET_ITEMS_LIST
SHAPE_INDEX< ITEM * > ITEM_SHAPE_INDEX
int Size() const
Returns number of items stored in the index.
ITEM_SET::iterator begin()
void Add(ITEM *aItem)
Adds item to the spatial index.
int Query(const ITEM *aItem, int aMinDistance, Visitor &aVisitor) const
Searches items in the index that are in proximity of aItem.
NET_ITEMS_LIST * GetItemsForNet(NET_HANDLE aNet)
Returns list of all items in a given net.
std::map< NET_HANDLE, NET_ITEMS_LIST > m_netMap
std::deque< ITEM_SHAPE_INDEX > m_subIndices
Base class for PNS router board items.
const PNS_LAYER_RANGE & Layers() const
PnsKind Kind() const
Return the type (kind) of the item.
virtual const SHAPE * Shape() const
Return the geometrical shape of the item.
Represent a contiguous set of PCB layers.
An abstract shape on 2D plane.
Push and Shove diff pair dimensions (gap) settings dialog.