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 1079 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 2127 of file board.cpp.

2128 {
2129  if( a->Type() != b->Type() )
2130  return a->Type() < b->Type();
2131 
2132  if( a->GetLayer() != b->GetLayer() )
2133  return a->GetLayer() < b->GetLayer();
2134 
2135  if( a->GetPosition().x != b->GetPosition().x )
2136  return a->GetPosition().x < b->GetPosition().x;
2137 
2138  if( a->GetPosition().y != b->GetPosition().y )
2139  return a->GetPosition().y < b->GetPosition().y;
2140 
2141  if( a->m_Uuid != b->m_Uuid ) // shopuld be always the case foer valid boards
2142  return a->m_Uuid < b->m_Uuid;
2143 
2144  return a < b;
2145 }

References BOARD_ITEM::GetLayer(), EDA_ITEM::GetPosition(), EDA_ITEM::m_Uuid, and EDA_ITEM::Type().


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