KiCad PCB EDA Suite
auto_associate.cpp File Reference
#include <kiface_i.h>
#include <kicad_string.h>
#include <macros.h>
#include <auto_associate.h>
#include <cvpcb_association.h>
#include <cvpcb_mainframe.h>
#include <listboxes.h>

Go to the source code of this file.

Macros

#define QUOTE   '\''
 

Functions

wxString GetQuotedText (wxString &text)
 
bool sortListbyCmpValue (const FOOTPRINT_EQUIVALENCE &ref, const FOOTPRINT_EQUIVALENCE &test)
 

Macro Definition Documentation

◆ QUOTE

#define QUOTE   '\''

Definition at line 43 of file auto_associate.cpp.

Function Documentation

◆ GetQuotedText()

wxString GetQuotedText ( wxString &  text)

Definition at line 51 of file auto_associate.cpp.

52 {
53  int i = text.Find( QUOTE );
54 
55  if( wxNOT_FOUND == i )
56  return wxT( "" );
57 
58  wxString shrt = text.Mid( i + 1 );
59  i = shrt.Find( QUOTE );
60 
61  if( wxNOT_FOUND == i )
62  return wxT( "" );
63 
64  text = shrt.Mid( i + 1 );
65  return shrt.Mid( 0, i );
66 }
#define QUOTE
size_t i
Definition: json11.cpp:597

References i, and QUOTE.

Referenced by CVPCB_MAINFRAME::buildEquivalenceList().

◆ sortListbyCmpValue()

bool sortListbyCmpValue ( const FOOTPRINT_EQUIVALENCE ref,
const FOOTPRINT_EQUIVALENCE test 
)

Definition at line 71 of file auto_associate.cpp.

72 {
73  return ref.m_ComponentValue.Cmp( test.m_ComponentValue ) >= 0;
74 }

References FOOTPRINT_EQUIVALENCE::m_ComponentValue.

Referenced by CVPCB_MAINFRAME::AutomaticFootprintMatching().