KiCad PCB EDA Suite
autosel.cpp File Reference
#include <fctsys.h>
#include <common.h>
#include <kiface_i.h>
#include <project.h>
#include <gestfich.h>
#include <pgm_base.h>
#include <kicad_string.h>
#include <macros.h>
#include <cvpcb.h>
#include <cvpcb_mainframe.h>
#include <listview_classes.h>
#include <autosel.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

#define QUOTE   '\''

Definition at line 48 of file autosel.cpp.

Referenced by GetQuotedText().

Function Documentation

wxString GetQuotedText ( wxString &  text)

Definition at line 56 of file autosel.cpp.

References QUOTE.

Referenced by CVPCB_MAINFRAME::buildEquivalenceList().

57 {
58  int i = text.Find( QUOTE );
59 
60  if( wxNOT_FOUND == i )
61  return wxT( "" );
62 
63  wxString shrt = text.Mid( i + 1 );
64  i = shrt.Find( QUOTE );
65 
66  if( wxNOT_FOUND == i )
67  return wxT( "" );
68 
69  text = shrt.Mid( i + 1 );
70  return shrt.Mid( 0, i );
71 }
#define QUOTE
Definition: autosel.cpp:48
bool sortListbyCmpValue ( const FOOTPRINT_EQUIVALENCE ref,
const FOOTPRINT_EQUIVALENCE test 
)

Definition at line 76 of file autosel.cpp.

References FOOTPRINT_EQUIVALENCE::m_ComponentValue.

Referenced by CVPCB_MAINFRAME::AutomaticFootprintMatching().

77 {
78  return ref.m_ComponentValue.Cmp( test.m_ComponentValue ) >= 0;
79 }
wxString m_ComponentValue
Definition: autosel.h:37