KiCad PCB EDA Suite
netlist_exporter_base.cpp File Reference
#include <netlist_exporter_base.h>
#include <pgm_base.h>
#include <refdes_utils.h>
#include <class_library.h>
#include <connection_graph.h>
#include <sch_reference_list.h>
#include <sch_screen.h>
#include <schematic.h>

Go to the source code of this file.

Functions

static bool sortPinsByNum (PIN_INFO &aPin1, PIN_INFO &aPin2)
 Comparison routine for sorting by pin numbers. More...
 

Function Documentation

◆ sortPinsByNum()

static bool sortPinsByNum ( PIN_INFO aPin1,
PIN_INFO aPin2 
)
static

Comparison routine for sorting by pin numbers.

Definition at line 115 of file netlist_exporter_base.cpp.

116 {
117  // return "lhs < rhs"
118  return UTIL::RefDesStringCompare( aPin1.num, aPin2.num ) < 0;
119 }
int RefDesStringCompare(const wxString &aFirst, const wxString &aSecond)
Acts just like the strcmp function but treats numbers within the string text correctly for sorting.

References PIN_INFO::num, and UTIL::RefDesStringCompare().

Referenced by NETLIST_EXPORTER_BASE::CreatePinList().