KiCad PCB EDA Suite
netlist_exporter_generic.cpp File Reference
#include "netlist_exporter_generic.h"
#include <build_version.h>
#include <refdes_utils.h>
#include <class_library.h>
#include <sch_base_frame.h>
#include <symbol_lib_table.h>

Go to the source code of this file.

Classes

struct  COMP_FIELDS
 Holder for multi-unit component fields. More...
 

Functions

static bool sortPinsByNumber (LIB_PIN *aPin1, LIB_PIN *aPin2)
 

Function Documentation

◆ sortPinsByNumber()

static bool sortPinsByNumber ( LIB_PIN aPin1,
LIB_PIN aPin2 
)
static

Definition at line 557 of file netlist_exporter_generic.cpp.

558 {
559  // return "lhs < rhs"
560  return UTIL::RefDesStringCompare( aPin1->GetNumber(), aPin2->GetNumber() ) < 0;
561 }
int RefDesStringCompare(const wxString &aFirst, const wxString &aSecond)
Acts just like the strcmp function but treats numbers within the string text correctly for sorting.
const wxString & GetNumber() const
Definition: lib_pin.h:194

References LIB_PIN::GetNumber(), and UTIL::RefDesStringCompare().

Referenced by NETLIST_EXPORTER_GENERIC::makeLibParts().