31using namespace std::placeholders;
52 if( boardItem && boardItem->
IsLocked() )
66 if( boardItem && !boardItem->
IsLocked() )
76 if( aSelection.
Empty() )
81 for(
const EDA_ITEM* aitem : aSelection )
83 int current_netcode = -1;
93 if( !aAllowUnconnected )
100 assert( current_netcode >= 0 );
104 netcode = current_netcode;
109 else if( netcode != current_netcode )
121 if( aSelection.
Empty() )
127 for(
const EDA_ITEM* i : aSelection )
132 if( !layerSet.any() )
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 forces initialization of a netinfo item to the NETINFO_ITEM ORPHANED (typically -1) whe...
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.