KiCad PCB EDA Suite
netlist_exporter.cpp File Reference
#include <netlist_exporter.h>
#include <confirm.h>
#include <fctsys.h>
#include <gestfich.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 117 of file netlist_exporter.cpp.

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

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

Referenced by NETLIST_EXPORTER::CreatePinList().