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

Stands in for LIB_SYMBOL, reproducing LIB_SYMBOL::cacheSearchTerms() term-for-term so the test exercises the same search-term shape (name, LIB_ID, individual keyword tokens, keyword blob, description) that a real symbol library produces. More...

Inheritance diagram for TEST_LIB_TREE_ITEM:
LIB_TREE_ITEM

Public Member Functions

 TEST_LIB_TREE_ITEM (const wxString &aLibNickname, const wxString &aName, const wxString &aKeywords, const wxString &aDesc)
 
LIB_ID GetLIB_ID () const override
 
wxString GetName () const override
 
wxString GetLibNickname () const override
 
wxString GetDesc () override
 
std::vector< SEARCH_TERM > & GetSearchTerms () override
 
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 GetPinCount ()
 The pin count for symbols or the unique pad count for footprints.
 
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.
 

Private Attributes

wxString m_libNickname
 
wxString m_name
 
wxString m_keywords
 
wxString m_desc
 
std::vector< SEARCH_TERMm_searchTerms
 

Detailed Description

Stands in for LIB_SYMBOL, reproducing LIB_SYMBOL::cacheSearchTerms() term-for-term so the test exercises the same search-term shape (name, LIB_ID, individual keyword tokens, keyword blob, description) that a real symbol library produces.

Definition at line 60 of file test_lib_tree_model_adapter.cpp.

Constructor & Destructor Documentation

◆ TEST_LIB_TREE_ITEM()

TEST_LIB_TREE_ITEM::TEST_LIB_TREE_ITEM ( const wxString & aLibNickname,
const wxString & aName,
const wxString & aKeywords,
const wxString & aDesc )
inline

Definition at line 63 of file test_lib_tree_model_adapter.cpp.

References m_desc, m_keywords, m_libNickname, and m_name.

Member Function Documentation

◆ 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 TEST_LIB_TREE_ITEM::GetDesc ( )
inlineoverridevirtual

Implements LIB_TREE_ITEM.

Definition at line 74 of file test_lib_tree_model_adapter.cpp.

References m_desc.

◆ GetFootprint()

virtual wxString LIB_TREE_ITEM::GetFootprint ( )
inlinevirtualinherited

For items with footprint fields.

Reimplemented in LIB_SYMBOL.

Definition at line 68 of file lib_tree_item.h.

Referenced by LIB_TREE_NODE_ITEM::LIB_TREE_NODE_ITEM().

◆ GetLIB_ID()

LIB_ID TEST_LIB_TREE_ITEM::GetLIB_ID ( ) const
inlineoverridevirtual

Implements LIB_TREE_ITEM.

Definition at line 71 of file test_lib_tree_model_adapter.cpp.

References m_libNickname, and m_name.

Referenced by GetSearchTerms().

◆ GetLibNickname()

wxString TEST_LIB_TREE_ITEM::GetLibNickname ( ) const
inlineoverridevirtual

Implements LIB_TREE_ITEM.

Definition at line 73 of file test_lib_tree_model_adapter.cpp.

References m_libNickname.

◆ GetName()

wxString TEST_LIB_TREE_ITEM::GetName ( ) const
inlineoverridevirtual

Implements LIB_TREE_ITEM.

Definition at line 72 of file test_lib_tree_model_adapter.cpp.

References m_name.

◆ GetPinCount()

virtual int LIB_TREE_ITEM::GetPinCount ( )
inlinevirtualinherited

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

Reimplemented in FOOTPRINT, FOOTPRINT_INFO, and LIB_SYMBOL.

Definition at line 73 of file lib_tree_item.h.

Referenced by LIB_TREE_NODE_ITEM::LIB_TREE_NODE_ITEM().

◆ GetSearchTerms()

std::vector< SEARCH_TERM > & TEST_LIB_TREE_ITEM::GetSearchTerms ( )
inlineoverridevirtual

◆ 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().

◆ 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().

Member Data Documentation

◆ m_desc

wxString TEST_LIB_TREE_ITEM::m_desc
private

Definition at line 98 of file test_lib_tree_model_adapter.cpp.

Referenced by GetDesc(), GetSearchTerms(), and TEST_LIB_TREE_ITEM().

◆ m_keywords

wxString TEST_LIB_TREE_ITEM::m_keywords
private

Definition at line 97 of file test_lib_tree_model_adapter.cpp.

Referenced by GetSearchTerms(), and TEST_LIB_TREE_ITEM().

◆ m_libNickname

wxString TEST_LIB_TREE_ITEM::m_libNickname
private

◆ m_name

wxString TEST_LIB_TREE_ITEM::m_name
private

◆ m_searchTerms

std::vector<SEARCH_TERM> TEST_LIB_TREE_ITEM::m_searchTerms
private

Definition at line 99 of file test_lib_tree_model_adapter.cpp.

Referenced by GetSearchTerms().


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