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 64 of file footprint_info.h.

Constructor & Destructor Documentation

virtual FOOTPRINT_INFO::~FOOTPRINT_INFO ( )
inlinevirtual

Definition at line 69 of file footprint_info.h.

70  {
71  }

Member Function Documentation

void FOOTPRINT_INFO::ensure_loaded ( )
inlineprotected

Definition at line 127 of file footprint_info.h.

128  {
129  if( !m_loaded )
130  load();
131  }
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 86 of file footprint_info.h.

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

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

Definition at line 92 of file footprint_info.h.

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

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

Definition at line 81 of file footprint_info.h.

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

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

Definition at line 110 of file footprint_info.h.

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

Definition at line 98 of file footprint_info.h.

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

Definition at line 104 of file footprint_info.h.

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

105  {
106  ensure_loaded();
107  return m_unique_pad_count;
108  }
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 77 of file footprint_info.cpp.

References m_nickname.

78 {
79  return aLibrary == m_nickname;
80 }
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 151 of file footprint_info.h.

152 {
153  int retv = StrNumCmp( item1.m_nickname, item2.m_nickname, INT_MAX, true );
154 
155  if( retv != 0 )
156  return retv < 0;
157 
158  return StrNumCmp( item1.m_fpname, item2.m_fpname, INT_MAX, true ) < 0;
159 }
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 145 of file footprint_info.h.

Referenced by FOOTPRINT_INFO_IMPL::load().

wxString FOOTPRINT_INFO::m_fpname
protected

Module name.

Definition at line 141 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 146 of file footprint_info.h.

Referenced by FOOTPRINT_INFO_IMPL::load().

bool FOOTPRINT_INFO::m_loaded
protected
wxString FOOTPRINT_INFO::m_nickname
protected
int FOOTPRINT_INFO::m_num
protected

Order number in the display list.

Definition at line 142 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 136 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 143 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 144 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: