KiCad PCB EDA Suite
FOOTPRINT::cmp_drawings Struct Reference

#include <footprint.h>

Public Member Functions

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

Detailed Description

Definition at line 663 of file footprint.h.

Member Function Documentation

◆ operator()()

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

Definition at line 1950 of file footprint.cpp.

1952 {
1953  if( aFirst->Type() != aSecond->Type() )
1954  return aFirst->Type() < aSecond->Type();
1955 
1956  if( aFirst->GetLayer() != aSecond->GetLayer() )
1957  return aFirst->GetLayer() < aSecond->GetLayer();
1958 
1959  if( aFirst->Type() == PCB_FP_SHAPE_T )
1960  {
1961  const FP_SHAPE* dwgA = static_cast<const FP_SHAPE*>( aFirst );
1962  const FP_SHAPE* dwgB = static_cast<const FP_SHAPE*>( aSecond );
1963 
1964  if( dwgA->GetShape() != dwgB->GetShape() )
1965  return dwgA->GetShape() < dwgB->GetShape();
1966  }
1967 
1968  if( aFirst->m_Uuid != aSecond->m_Uuid ) // shopuld be always the case foer valid boards
1969  return aFirst->m_Uuid < aSecond->m_Uuid;
1970 
1971  return aFirst < aSecond;
1972 }
class FP_SHAPE, a footprint edge
Definition: typeinfo.h:93
const KIID m_Uuid
Definition: eda_item.h:524
PCB_SHAPE_TYPE_T GetShape() const
Definition: pcb_shape.h:130
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:162

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


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