KiCad PCB EDA Suite
PCB_SHAPE::cmp_drawings Struct Reference

#include <pcb_shape.h>

Public Member Functions

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

Detailed Description

Definition at line 354 of file pcb_shape.h.

Member Function Documentation

◆ operator()()

bool PCB_SHAPE::cmp_drawings::operator() ( const BOARD_ITEM aFirst,
const BOARD_ITEM aSecond 
) const

Definition at line 1261 of file pcb_shape.cpp.

1262 {
1263  if( aFirst->Type() != aSecond->Type() )
1264  return aFirst->Type() < aSecond->Type();
1265 
1266  if( aFirst->GetLayer() != aSecond->GetLayer() )
1267  return aFirst->GetLayer() < aSecond->GetLayer();
1268 
1269  if( aFirst->Type() == PCB_SHAPE_T )
1270  {
1271  const PCB_SHAPE* dwgA = static_cast<const PCB_SHAPE*>( aFirst );
1272  const PCB_SHAPE* dwgB = static_cast<const PCB_SHAPE*>( aSecond );
1273 
1274  if( dwgA->GetShape() != dwgB->GetShape() )
1275  return dwgA->GetShape() < dwgB->GetShape();
1276  }
1277 
1278  return aFirst->m_Uuid < aSecond->m_Uuid;
1279 }
const KIID m_Uuid
Definition: eda_item.h:525
PCB_SHAPE_TYPE_T GetShape() const
Definition: pcb_shape.h:130
class PCB_SHAPE, a segment not on copper layers
Definition: typeinfo.h:90
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
Definition: board_item.h:173
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:163

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


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