KiCad PCB EDA Suite
Loading...
Searching...
No Matches
FOOTPRINT_INFO Class Reference

#include <footprint_info.h>

Inheritance diagram for FOOTPRINT_INFO:
LIB_TREE_ITEM BASIC_FOOTPRINT_INFO FOOTPRINT_INFO_IMPL

Public Member Functions

virtual ~FOOTPRINT_INFO ()=default
 
const wxString & GetFootprintName () const
 
wxString GetLibNickname () const override
 
wxString GetName () const override
 
int GetPinCount () override
 The pin count for symbols or the unique pad count for footprints.
 
LIB_ID GetLIB_ID () const override
 
wxString GetDesc () override
 
wxString GetKeywords ()
 
std::vector< SEARCH_TERM > & GetSearchTerms () override
 Returns the cache itself, not a copy.
 
unsigned GetNumberedPadCount ()
 
int GetOrderNum ()
 
bool InLibrary (const wxString &aLibrary) const
 Test if the FOOTPRINT_INFO object was loaded from aLibrary.
 
virtual void GetChooserFields (std::map< wxString, wxString > &aColumnMap)
 Retrieves a key/value map of the fields on this item that should be exposed to the library browser/chooser for displaying in columns, searching, etc.
 
virtual bool IsRoot () const
 For items having aliases, IsRoot() indicates the principal item.
 
virtual bool IsPowerSymbol () const
 For symbols that could be a power symbol.
 
virtual wxString GetFootprint ()
 For items with footprint fields.
 
virtual int GetSubUnitCount () const
 For items with units, return the number of units.
 
virtual wxString GetUnitName (int aUnit) const
 For items with units, return an identifier for unit x.
 

Protected Member Functions

void ensure_loaded ()
 
virtual void load ()
 lazily load stuff not filled in by constructor. This may throw IO_ERRORS.
 
void cacheSearchTerms ()
 Safe to build once and keep.
 

Protected Attributes

FOOTPRINT_LISTm_owner
 provides access to FP_LIB_TABLE
 
bool m_loaded
 
wxString m_nickname
 library as known in FP_LIB_TABLE
 
wxString m_fpname
 Module name.
 
int m_num
 Order number in the display list.
 
unsigned m_numbered_pad_count
 Number of unique electrical pads (numeric or BGA-style numbers)
 
wxString m_doc
 Footprint description.
 
wxString m_keywords
 Footprint keywords.
 
std::vector< SEARCH_TERMm_searchTerms
 

Friends

bool operator< (const FOOTPRINT_INFO &lhs, const FOOTPRINT_INFO &rhs)
 Less than comparison operator, intended for sorting FOOTPRINT_INFO objects.
 

Detailed Description

Definition at line 49 of file footprint_info.h.

Constructor & Destructor Documentation

◆ ~FOOTPRINT_INFO()

virtual FOOTPRINT_INFO::~FOOTPRINT_INFO ( )
virtualdefault

Member Function Documentation

◆ cacheSearchTerms()

void FOOTPRINT_INFO::cacheSearchTerms ( )
protected

Safe to build once and keep.

Name fields come from the constructor. Keyword and description fields come from load(), one-shot behind m_loaded. All source fields are final by the time this runs.

Definition at line 63 of file footprint_info.cpp.

References Format(), GetDesc(), GetKeywords(), GetLIB_ID(), GetLibNickname(), GetName(), and m_searchTerms.

Referenced by GetSearchTerms().

◆ ensure_loaded()

void FOOTPRINT_INFO::ensure_loaded ( )
inlineprotected

Definition at line 116 of file footprint_info.h.

References load(), and m_loaded.

Referenced by GetDesc(), GetKeywords(), GetNumberedPadCount(), and GetOrderNum().

◆ GetChooserFields()

virtual void LIB_TREE_ITEM::GetChooserFields ( std::map< wxString, wxString > & aColumnMap)
inlinevirtualinherited

Retrieves a key/value map of the fields on this item that should be exposed to the library browser/chooser for displaying in columns, searching, etc.

Reimplemented in LIB_SYMBOL.

Definition at line 53 of file lib_tree_item.h.

Referenced by LIB_TREE_NODE_ITEM::LIB_TREE_NODE_ITEM(), and LIB_TREE_NODE_ITEM::Update().

◆ GetDesc()

wxString FOOTPRINT_INFO::GetDesc ( )
inlineoverridevirtual

Implements LIB_TREE_ITEM.

Definition at line 70 of file footprint_info.h.

References ensure_loaded(), and m_doc.

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

◆ GetFootprint()

virtual wxString LIB_TREE_ITEM::GetFootprint ( )
inlinevirtualinherited

◆ GetFootprintName()

const wxString & FOOTPRINT_INFO::GetFootprintName ( ) const
inline

◆ GetKeywords()

wxString FOOTPRINT_INFO::GetKeywords ( )
inline

Definition at line 76 of file footprint_info.h.

References ensure_loaded(), and m_keywords.

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

◆ GetLIB_ID()

LIB_ID FOOTPRINT_INFO::GetLIB_ID ( ) const
inlineoverridevirtual

Implements LIB_TREE_ITEM.

Definition at line 65 of file footprint_info.h.

References m_fpname, and m_nickname.

Referenced by cacheSearchTerms().

◆ GetLibNickname()

wxString FOOTPRINT_INFO::GetLibNickname ( ) const
inlineoverridevirtual

◆ GetName()

wxString FOOTPRINT_INFO::GetName ( ) const
inlineoverridevirtual

Implements LIB_TREE_ITEM.

Definition at line 61 of file footprint_info.h.

References m_fpname.

Referenced by cacheSearchTerms().

◆ GetNumberedPadCount()

unsigned FOOTPRINT_INFO::GetNumberedPadCount ( )
inline

◆ GetOrderNum()

int FOOTPRINT_INFO::GetOrderNum ( )
inline

Definition at line 94 of file footprint_info.h.

References ensure_loaded(), and m_num.

◆ GetPinCount()

int FOOTPRINT_INFO::GetPinCount ( )
inlineoverridevirtual

The pin count for symbols or the unique pad count for footprints.

Reimplemented from LIB_TREE_ITEM.

Definition at line 63 of file footprint_info.h.

References GetNumberedPadCount().

◆ GetSearchTerms()

std::vector< SEARCH_TERM > & FOOTPRINT_INFO::GetSearchTerms ( )
overridevirtual

Returns the cache itself, not a copy.

Lets ScoreTerms() cache normalization across calls.

Implements LIB_TREE_ITEM.

Definition at line 85 of file footprint_info.cpp.

References cacheSearchTerms(), and m_searchTerms.

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

◆ GetSubUnitCount()

virtual int LIB_TREE_ITEM::GetSubUnitCount ( ) const
inlinevirtualinherited

For items with units, return the number of units.

Reimplemented in LIB_SYMBOL.

Definition at line 78 of file lib_tree_item.h.

Referenced by LIB_TREE_NODE_ITEM::LIB_TREE_NODE_ITEM(), and LIB_TREE_NODE_ITEM::Update().

◆ GetUnitName()

virtual wxString LIB_TREE_ITEM::GetUnitName ( int aUnit) const
inlinevirtualinherited

For items with units, return an identifier for unit x.

Reimplemented in LIB_SYMBOL.

Definition at line 83 of file lib_tree_item.h.

Referenced by LIB_TREE_NODE_UNIT::LIB_TREE_NODE_UNIT().

◆ InLibrary()

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 95 of file footprint_info.cpp.

References m_nickname.

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

◆ IsPowerSymbol()

virtual bool LIB_TREE_ITEM::IsPowerSymbol ( ) const
inlinevirtualinherited

For symbols that could be a power symbol.

Reimplemented in LIB_SYMBOL.

Definition at line 63 of file lib_tree_item.h.

Referenced by LIB_TREE_NODE_ITEM::LIB_TREE_NODE_ITEM(), and LIB_TREE_NODE_ITEM::Update().

◆ IsRoot()

virtual bool LIB_TREE_ITEM::IsRoot ( ) const
inlinevirtualinherited

For items having aliases, IsRoot() indicates the principal item.

Reimplemented in LIB_SYMBOL.

Definition at line 60 of file lib_tree_item.h.

Referenced by LIB_TREE_NODE_ITEM::LIB_TREE_NODE_ITEM(), and LIB_TREE_NODE_ITEM::Update().

◆ load()

virtual void FOOTPRINT_INFO::load ( )
inlineprotectedvirtual

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

Reimplemented in FOOTPRINT_INFO_IMPL.

Definition at line 123 of file footprint_info.h.

Referenced by ensure_loaded().

Friends And Related Symbol Documentation

◆ operator<

bool operator< ( const FOOTPRINT_INFO & lhs,
const FOOTPRINT_INFO & rhs )
friend

Less than comparison operator, intended for sorting FOOTPRINT_INFO objects.

Definition at line 101 of file footprint_info.cpp.

References m_fpname, m_nickname, and StrNumCmp().

Member Data Documentation

◆ m_doc

wxString FOOTPRINT_INFO::m_doc
protected

Footprint description.

Definition at line 139 of file footprint_info.h.

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

◆ m_fpname

◆ m_keywords

wxString FOOTPRINT_INFO::m_keywords
protected

Footprint keywords.

Definition at line 140 of file footprint_info.h.

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

◆ m_loaded

◆ m_nickname

◆ m_num

int FOOTPRINT_INFO::m_num
protected

Order number in the display list.

Definition at line 137 of file footprint_info.h.

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

◆ m_numbered_pad_count

unsigned FOOTPRINT_INFO::m_numbered_pad_count
protected

Number of unique electrical pads (numeric or BGA-style numbers)

Definition at line 138 of file footprint_info.h.

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

◆ m_owner

FOOTPRINT_LIST* FOOTPRINT_INFO::m_owner
protected

provides access to FP_LIB_TABLE

Definition at line 131 of file footprint_info.h.

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

◆ m_searchTerms

std::vector<SEARCH_TERM> FOOTPRINT_INFO::m_searchTerms
protected

Definition at line 142 of file footprint_info.h.

Referenced by cacheSearchTerms(), and GetSearchTerms().


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