KiCad PCB EDA Suite
BOARD_ITEM::ptr_cmp Struct Reference

#include <board_item.h>

Public Member Functions

bool operator() (const BOARD_ITEM *a, const BOARD_ITEM *b) const
 

Detailed Description

Definition at line 327 of file board_item.h.

Member Function Documentation

◆ operator()()

bool BOARD_ITEM::ptr_cmp::operator() ( const BOARD_ITEM a,
const BOARD_ITEM b 
) const

Definition at line 204 of file board_item.cpp.

205{
206 if( a->Type() != b->Type() )
207 return a->Type() < b->Type();
208
209 if( a->GetLayerSet() != b->GetLayerSet() )
210 return a->GetLayerSet().Seq() < b->GetLayerSet().Seq();
211
212 if( a->m_Uuid != b->m_Uuid ) // UUIDs *should* always be unique (for valid boards anyway)
213 return a->m_Uuid < b->m_Uuid;
214
215 return a < b; // But just in case; ptrs are guaranteed to be different
216}
virtual LSET GetLayerSet() const
Return a std::bitset of all layers on which the item physically resides.
Definition: board_item.h:197
const KIID m_Uuid
Definition: eda_item.h:492
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:97
LSEQ Seq(const PCB_LAYER_ID *aWishListSequence, unsigned aCount) const
Return an LSEQ from the union of this LSET and a desired sequence.
Definition: lset.cpp:411

References BOARD_ITEM::GetLayerSet(), EDA_ITEM::m_Uuid, LSET::Seq(), and EDA_ITEM::Type().


The documentation for this struct was generated from the following files: