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 343 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 142 of file board_item.cpp.

143 {
144  if( a->Type() != b->Type() )
145  return a->Type() < b->Type();
146 
147  if( a->GetLayer() != b->GetLayer() )
148  return a->GetLayer() < b->GetLayer();
149 
150  if( a->m_Uuid != b->m_Uuid ) // shopuld be always the case foer valid boards
151  return a->m_Uuid < b->m_Uuid;
152 
153  return a < b;
154 }
const KIID m_Uuid
Definition: eda_item.h:475
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
Definition: board_item.h:171
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:113

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


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