31using namespace std::placeholders;
72 if( aSelection.
Empty() )
77 for(
const EDA_ITEM* aitem : aSelection )
79 int current_netcode = -1;
89 if( !aAllowUnconnected )
96 assert( current_netcode >= 0 );
100 netcode = current_netcode;
105 else if( netcode != current_netcode )
117 if( aSelection.
Empty() )
123 for(
const EDA_ITEM* i : aSelection )
128 if( !layerSet.any() )
BASE_SET & set(size_t pos)
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
virtual LSET GetLayerSet() const
Return a std::bitset of all layers on which the item physically resides.
virtual bool IsLocked() const
A base class for most all the KiCad significant classes used in schematics and boards.
LSET is a set of PCB_LAYER_IDs.
static const int UNCONNECTED
Constant that holds the "unconnected net" number (typically 0) all items "connected" to this net are ...
static SELECTION_CONDITION SameLayer()
Creates a functor that tests if selection contains items that belong exclusively to the same layer.
static bool sameLayerFunc(const SELECTION &aSelection)
static bool HasUnlockedItems(const SELECTION &aSelection)
Test if any selected items are unlocked.
static SELECTION_CONDITION SameNet(bool aAllowUnconnected=false)
Create a functor that tests if selection contains items belonging to the same net or are unconnected ...
static bool sameNetFunc(const SELECTION &aSelection, bool aAllowUnconnected)
< Helper function used by SameNet()
static bool HasLockedItems(const SELECTION &aSelection)
Test if any selected items are locked.
std::deque< EDA_ITEM * > & Items()
bool Empty() const
Checks if there is anything selected.
std::function< bool(const SELECTION &)> SELECTION_CONDITION
Functor type that checks a specific condition for selected items.