KiCad PCB EDA Suite
footprint_info.h File Reference
#include <boost/ptr_container/ptr_vector.hpp>
#include <import_export.h>
#include <ki_exception.h>
#include <kicad_string.h>
#include <sync_queue.h>
#include <lib_tree_item.h>
#include <atomic>
#include <functional>
#include <memory>

Go to the source code of this file.

Classes

class  FOOTPRINT_INFO
 
class  FOOTPRINT_LIST
 Holds a list of FOOTPRINT_INFO objects, along with a list of IO_ERRORs or PARSE_ERRORs that were thrown acquiring the FOOTPRINT_INFOs. More...
 
class  FOOTPRINT_ASYNC_LOADER
 This class can be used to populate a FOOTPRINT_LIST asynchronously. More...
 

Functions

bool operator< (const FOOTPRINT_INFO &item1, const FOOTPRINT_INFO &item2)
 FOOTPRINT object list sort function. More...
 

Function Documentation

◆ operator<()

bool operator< ( const FOOTPRINT_INFO item1,
const FOOTPRINT_INFO item2 
)
inline

FOOTPRINT object list sort function.

Definition at line 168 of file footprint_info.h.

169 {
170  int retv = StrNumCmp( item1.m_nickname, item2.m_nickname, false );
171 
172  if( retv != 0 )
173  return retv < 0;
174 
175  // Technically footprint names are not case sensitive because the file name is used
176  // as the footprint name. On windows this would be problematic because windows does
177  // not support case sensitive file names by default. This should not cause any issues
178  // and allow for a future change to use the name defined in the footprint file.
179  return StrNumCmp( item1.m_fpname, item2.m_fpname, false ) < 0;
180 }
int StrNumCmp(const wxString &aString1, const wxString &aString2, bool aIgnoreCase)
Compare two strings with alphanumerical content.
Definition: string.cpp:354
wxString m_fpname
Module name.
wxString m_nickname
library as known in FP_LIB_TABLE

References FOOTPRINT_INFO::m_fpname, FOOTPRINT_INFO::m_nickname, and StrNumCmp().