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 304 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 152 of file board_item.cpp.

153 {
154  if( a->Type() != b->Type() )
155  return a->Type() < b->Type();
157  if( a->GetLayer() != b->GetLayer() )
158  return a->GetLayer() < b->GetLayer();
160  if( a->m_Uuid != b->m_Uuid ) // should be always the case for valid boards
161  return a->m_Uuid < b->m_Uuid;
163  return a < b;
164 }
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:140
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: