KiCad PCB EDA Suite
FOOTPRINT_INFO Class Referenceabstract

#include <footprint_info.h>

Inheritance diagram for FOOTPRINT_INFO:
FOOTPRINT_INFO_IMPL

Public Member Functions

virtual ~FOOTPRINT_INFO ()
 
const wxString & GetFootprintName () const
 
const wxString & GetNickname () const
 
const wxString & GetDoc ()
 
const wxString & GetKeywords ()
 
unsigned GetPadCount ()
 
unsigned GetUniquePadCount ()
 
int GetOrderNum ()
 
bool InLibrary (const wxString &aLibrary) const
 Test if the FOOTPRINT_INFO object was loaded from aLibrary. More...
 

Protected Member Functions

void ensure_loaded ()
 
virtual void load ()=0
 lazily load stuff not filled in by constructor. This may throw IO_ERRORS. More...
 

Protected Attributes

FOOTPRINT_LISTm_owner
 provides access to FP_LIB_TABLE More...
 
bool m_loaded
 
wxString m_nickname
 library as known in FP_LIB_TABLE More...
 
wxString m_fpname
 Module name. More...
 
int m_num
 Order number in the display list. More...
 
int m_pad_count
 Number of pads. More...
 
int m_unique_pad_count
 Number of unique pads. More...
 
wxString m_doc
 Footprint description. More...
 
wxString m_keywords
 Footprint keywords. More...
 

Friends

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

Detailed Description

Definition at line 65 of file footprint_info.h.

Constructor & Destructor Documentation

virtual FOOTPRINT_INFO::~FOOTPRINT_INFO ( )
inlinevirtual

Definition at line 70 of file footprint_info.h.

71  {
72  }

Member Function Documentation

void FOOTPRINT_INFO::ensure_loaded ( )
inlineprotected

Definition at line 128 of file footprint_info.h.

129  {
130  if( !m_loaded )
131  load();
132  }
virtual void load()=0
lazily load stuff not filled in by constructor. This may throw IO_ERRORS.
const wxString& FOOTPRINT_INFO::GetDoc ( )
inline

Definition at line 87 of file footprint_info.h.

Referenced by DisplayCmpDoc(), and CVPCB_MAINFRAME::DisplayStatus().

88  {
89  ensure_loaded();
90  return m_doc;
91  }
wxString m_doc
Footprint description.
const wxString& FOOTPRINT_INFO::GetFootprintName ( ) const
inline
const wxString& FOOTPRINT_INFO::GetKeywords ( )
inline

Definition at line 93 of file footprint_info.h.

Referenced by DisplayCmpDoc(), CVPCB_MAINFRAME::DisplayStatus(), and PCB_BASE_FRAME::SelectFootprint().

94  {
95  ensure_loaded();
96  return m_keywords;
97  }
wxString m_keywords
Footprint keywords.
const wxString& FOOTPRINT_INFO::GetNickname ( ) const
inline

Definition at line 82 of file footprint_info.h.

Referenced by FOOTPRINT_FILTER::ITERATOR::FootprintFilterMatch(), DISPLAY_FOOTPRINTS_FRAME::InitDisplay(), and PCB_BASE_FRAME::SelectFootprint().

83  {
84  return m_nickname;
85  }
wxString m_nickname
library as known in FP_LIB_TABLE
int FOOTPRINT_INFO::GetOrderNum ( )
inline

Definition at line 111 of file footprint_info.h.

112  {
113  ensure_loaded();
114  return m_num;
115  }
int m_num
Order number in the display list.
unsigned FOOTPRINT_INFO::GetPadCount ( )
inline

Definition at line 99 of file footprint_info.h.

100  {
101  ensure_loaded();
102  return m_pad_count;
103  }
int m_pad_count
Number of pads.
unsigned FOOTPRINT_INFO::GetUniquePadCount ( )
inline

Definition at line 105 of file footprint_info.h.

Referenced by FOOTPRINT_FILTER::ITERATOR::PinCountMatch().

106  {
107  ensure_loaded();
108  return m_unique_pad_count;
109  }
int m_unique_pad_count
Number of unique pads.
bool FOOTPRINT_INFO::InLibrary ( const wxString &  aLibrary) const

Test if the FOOTPRINT_INFO object was loaded from aLibrary.

Parameters
aLibraryis the nickname of the library to test.
Returns
true if the FOOTPRINT_INFO object was loaded from aLibrary. Otherwise false.

Definition at line 78 of file footprint_info.cpp.

79 {
80  return aLibrary == m_nickname;
81 }
wxString m_nickname
library as known in FP_LIB_TABLE
virtual void FOOTPRINT_INFO::load ( )
protectedpure virtual

lazily load stuff not filled in by constructor. This may throw IO_ERRORS.

Implemented in FOOTPRINT_INFO_IMPL.

Friends And Related Function Documentation

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

FOOTPRINT object list sort function.

Definition at line 152 of file footprint_info.h.

153 {
154  int retv = StrNumCmp( item1.m_nickname, item2.m_nickname, INT_MAX, true );
155 
156  if( retv != 0 )
157  return retv < 0;
158 
159  return StrNumCmp( item1.m_fpname, item2.m_fpname, INT_MAX, true ) < 0;
160 }
wxString m_fpname
Module name.
int StrNumCmp(const wxString &aString1, const wxString &aString2, int aLength, bool aIgnoreCase)
Function StrLenNumCmp is a routine compatible with qsort() to sort by alphabetical order...
Definition: string.cpp:238
wxString m_nickname
library as known in FP_LIB_TABLE

Member Data Documentation

wxString FOOTPRINT_INFO::m_doc
protected

Footprint description.

Definition at line 146 of file footprint_info.h.

Referenced by FOOTPRINT_INFO_IMPL::load().

wxString FOOTPRINT_INFO::m_fpname
protected

Module name.

Definition at line 142 of file footprint_info.h.

Referenced by FOOTPRINT_INFO_IMPL::FOOTPRINT_INFO_IMPL(), FOOTPRINT_INFO_IMPL::load(), and operator<().

wxString FOOTPRINT_INFO::m_keywords
protected

Footprint keywords.

Definition at line 147 of file footprint_info.h.

Referenced by FOOTPRINT_INFO_IMPL::load().

bool FOOTPRINT_INFO::m_loaded
protected
wxString FOOTPRINT_INFO::m_nickname
protected

library as known in FP_LIB_TABLE

Definition at line 141 of file footprint_info.h.

Referenced by FOOTPRINT_INFO_IMPL::FOOTPRINT_INFO_IMPL(), FOOTPRINT_INFO_IMPL::load(), and operator<().

int FOOTPRINT_INFO::m_num
protected

Order number in the display list.

Definition at line 143 of file footprint_info.h.

Referenced by FOOTPRINT_INFO_IMPL::FOOTPRINT_INFO_IMPL().

FOOTPRINT_LIST* FOOTPRINT_INFO::m_owner
protected

provides access to FP_LIB_TABLE

Definition at line 137 of file footprint_info.h.

Referenced by FOOTPRINT_INFO_IMPL::FOOTPRINT_INFO_IMPL(), and FOOTPRINT_INFO_IMPL::load().

int FOOTPRINT_INFO::m_pad_count
protected

Number of pads.

Definition at line 144 of file footprint_info.h.

Referenced by FOOTPRINT_INFO_IMPL::FOOTPRINT_INFO_IMPL(), and FOOTPRINT_INFO_IMPL::load().

int FOOTPRINT_INFO::m_unique_pad_count
protected

Number of unique pads.

Definition at line 145 of file footprint_info.h.

Referenced by FOOTPRINT_INFO_IMPL::FOOTPRINT_INFO_IMPL(), and FOOTPRINT_INFO_IMPL::load().


The documentation for this class was generated from the following files: