KiCad PCB EDA Suite
auto_associate.cpp File Reference
#include <kiface_base.h>
#include <string_utils.h>
#include <macros.h>
#include <auto_associate.h>
#include <cvpcb_association.h>
#include <cvpcb_mainframe.h>
#include <listboxes.h>
#include <project/project_file.h>
#include <wx/msgdlg.h>

Go to the source code of this file.

Macros

#define QUOTE   '\''
 

Functions

wxString GetQuotedText (wxString &text)
 Read the string between quotes. More...
 
bool sortListbyCmpValue (const FOOTPRINT_EQUIVALENCE &ref, const FOOTPRINT_EQUIVALENCE &test)
 

Macro Definition Documentation

◆ QUOTE

#define QUOTE   '\''

Definition at line 45 of file auto_associate.cpp.

Function Documentation

◆ GetQuotedText()

wxString GetQuotedText ( wxString &  text)

Read the string between quotes.

Returns
a the quoted string.

Definition at line 53 of file auto_associate.cpp.

54 {
55  int i = text.Find( QUOTE );
56 
57  if( wxNOT_FOUND == i )
58  return wxT( "" );
59 
60  wxString shrt = text.Mid( i + 1 );
61  i = shrt.Find( QUOTE );
62 
63  if( wxNOT_FOUND == i )
64  return wxT( "" );
65 
66  text = shrt.Mid( i + 1 );
67  return shrt.Mid( 0, i );
68 }
#define QUOTE

References QUOTE, and text.

Referenced by CVPCB_MAINFRAME::buildEquivalenceList().

◆ sortListbyCmpValue()

bool sortListbyCmpValue ( const FOOTPRINT_EQUIVALENCE ref,
const FOOTPRINT_EQUIVALENCE test 
)

Definition at line 73 of file auto_associate.cpp.

74 {
75  return ref.m_ComponentValue.Cmp( test.m_ComponentValue ) >= 0;
76 }

References FOOTPRINT_EQUIVALENCE::m_ComponentValue.

Referenced by CVPCB_MAINFRAME::AutomaticFootprintMatching().