22#ifndef __PNS_ITEMSET_H
23#define __PNS_ITEMSET_H
95 ITEM_SET(
ITEM* aInitialItem =
nullptr,
bool aBecomeOwner =
false )
98 m_items.emplace_back(
ENTRY( aInitialItem, aBecomeOwner ) );
114 int Count(
int aKindMask = -1 )
const
119 return static_cast<int>(
m_items.size() );
123 if( item->Kind() & aKindMask )
162 return static_cast<int>(
m_items.size() );
178 void Add(
ITEM* aItem,
bool aBecomeOwner =
false )
195 const ENTRY ent( aItem );
202 ENTRIES::iterator f = std::find(
m_items.begin(),
m_items.end(), ent );
215 if( item->OfKind( kind ) )
218 return static_cast<T*
>( item );
ITEM_SET & FilterNet(int aNet, bool aInvert=false)
ENTRIES::const_iterator cend() const
void Prepend(ITEM *aItem, bool aBecomeOwner=false)
ITEM_SET & operator=(const ITEM_SET &aOther)
int Count(int aKindMask=-1) const
void Add(const LINE &aLine)
ITEM_SET & ExcludeItem(const ITEM *aItem)
ENTRIES::const_iterator cbegin() const
ITEM_SET & FilterMarker(int aMarker, bool aInvert=false)
bool Contains(ITEM *aItem) const
ITEM_SET(const ITEM_SET &aOther)
ITEM_SET & FilterKinds(int aKindMask, bool aInvert=false)
ITEM_SET & FilterLayers(int aStart, int aEnd=-1, bool aInvert=false)
ITEM_SET & ExcludeLayers(int aStart, int aEnd=-1)
ITEM_SET & ExcludeNet(int aNet)
ITEM_SET(ITEM *aInitialItem=nullptr, bool aBecomeOwner=false)
std::vector< ENTRY > ENTRIES
const ENTRIES & CItems() const
ITEM_SET & ExcludeKinds(int aKindMask)
ENTRIES::iterator begin()
void Prepend(const LINE &aLine)
ITEM * operator[](size_t aIndex) const
T * FindByKind(ITEM::PnsKind kind, int index=0)
void Add(ITEM *aItem, bool aBecomeOwner=false)
Base class for PNS router board items.
virtual ITEM * Clone() const =0
Return a deep copy of the item.
Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads,...
Push and Shove diff pair dimensions (gap) settings dialog.
bool contains(const _Container &__container, _Value __value)
Returns true if the container contains the given value.
ENTRY(ITEM *aItem, bool aOwned=false)
bool operator<(const ENTRY &b) const
bool operator==(const ENTRY &b) const
ENTRY(const ENTRY &aOther)
ENTRY & operator=(const ENTRY &aOther)