27#include <unordered_set>
51struct COLLISION_SEARCH_CONTEXT;
154 int aLayer = -1 )
const
172 return ( aKindMask &
m_kind ) != 0;
268 virtual bool HasHole()
const {
return false; }
272 virtual const std::string
Format()
const;
294template<
typename T,
typename S>
295std::unique_ptr<T>
ItemCast( std::unique_ptr<S> aPtr )
297 static_assert( std::is_base_of<ITEM, S>::value,
"Need to be handed a ITEM!" );
298 static_assert( std::is_base_of<ITEM, T>::value,
"Need to cast to an ITEM!" );
299 return std::unique_ptr<T>(
static_cast<T*
>( aPtr.release() ) );
303std::unique_ptr< typename std::remove_const<T>::type >
Clone(
const T& aItem )
305 static_assert( std::is_base_of<ITEM, T>::value,
"Need to be handed an ITEM!" );
306 return std::unique_ptr<typename std::remove_const<T>::type>( aItem.Clone() );
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Represent a contiguous set of PCB layers.
bool Overlaps(const LAYER_RANGE &aOther) const
Base class for PNS router board items.
BOARD_ITEM * Parent() const
void SetLayers(const LAYER_RANGE &aLayers)
void SetIsFreePad(bool aIsFreePad=true)
virtual const std::string Format() const
virtual void Unmark(int aMarker=-1) const
virtual ITEM * ParentPadVia() const
virtual bool HasSameParentPadVia(const ITEM *aOther) const
virtual void SetHole(HOLE *aHole)
PnsKind Kind() const
Return the type (kind) of the item.
virtual ITEM * Clone() const =0
Return a deep copy of the item.
virtual void SetRank(int aRank)
virtual int Layer() const
bool collideSimple(const ITEM *aHead, const NODE *aNode, COLLISION_SEARCH_CONTEXT *aCtx) const
virtual const SHAPE * Shape() const
Return the geometrical shape of the item.
void SetLayer(int aLayer)
void SetIsCompoundShapePrimitive()
void SetParent(BOARD_ITEM *aParent)
const LAYER_RANGE & Layers() const
static const int UnusedNet
Supported item types.
bool IsCompoundShapePrimitive() const
bool OfKind(int aKindMask) const
virtual VECTOR2I Anchor(int n) const
std::string KindStr() const
bool LayersOverlap(const ITEM *aOther) const
Return true if the set of layers spanned by aOther overlaps our layers.
bool m_isCompoundShapePrimitive
virtual HOLE * Hole() const
bool Collide(const ITEM *aHead, const NODE *aNode, COLLISION_SEARCH_CONTEXT *aCtx=nullptr) const
Check for a collision (clearance violation) with between us and item aOther.
virtual const SHAPE_LINE_CHAIN Hull(int aClearance=0, int aWalkaroundThickness=0, int aLayer=-1) const
virtual void Mark(int aMarker) const
virtual int AnchorCount() const
virtual bool HasHole() const
virtual BOARD_ITEM * BoardItem() const
void SetRoutable(bool aRoutable)
virtual int Marker() const
Keep the router "world" - i.e.
void SetOwner(const ITEM_OWNER *aOwner)
Set the node that owns this item.
const ITEM_OWNER * m_owner
bool BelongsTo(const ITEM_OWNER *aNode) const
const ITEM_OWNER * Owner() const
Return the owner of this item, or NULL if there's none.
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
An abstract shape on 2D plane.
Push and Shove diff pair dimensions (gap) settings dialog.
std::unique_ptr< T > ItemCast(std::unique_ptr< S > aPtr)
std::unique_ptr< typename std::remove_const< T >::type > Clone(const T &aItem)