KiCad PCB EDA Suite
BOARD::cmp_items Struct Reference

#include <board.h>

Public Member Functions

bool operator() (const BOARD_ITEM *aFirst, const BOARD_ITEM *aSecond) const
 

Detailed Description

Definition at line 1127 of file board.h.

Member Function Documentation

◆ operator()()

bool BOARD::cmp_items::operator() ( const BOARD_ITEM aFirst,
const BOARD_ITEM aSecond 
) const

Definition at line 2199 of file board.cpp.

2200{
2201 if( a->Type() != b->Type() )
2202 return a->Type() < b->Type();
2203
2204 if( a->GetLayer() != b->GetLayer() )
2205 return a->GetLayer() < b->GetLayer();
2206
2207 if( a->GetPosition().x != b->GetPosition().x )
2208 return a->GetPosition().x < b->GetPosition().x;
2209
2210 if( a->GetPosition().y != b->GetPosition().y )
2211 return a->GetPosition().y < b->GetPosition().y;
2212
2213 if( a->m_Uuid != b->m_Uuid ) // shopuld be always the case foer valid boards
2214 return a->m_Uuid < b->m_Uuid;
2215
2216 return a < b;
2217}

References BOARD_ITEM::GetLayer(), EDA_ITEM::GetPosition(), EDA_ITEM::m_Uuid, EDA_ITEM::Type(), VECTOR2< T >::x, and VECTOR2< T >::y.


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