KiCad PCB EDA Suite
LIB_TREE_ITEM Class Referenceabstract

A mix-in to provide polymorphism between items stored in libraries (symbols, aliases and footprints). More...

#include <lib_tree_item.h>

Inheritance diagram for LIB_TREE_ITEM:
FOOTPRINT_INFO LIB_SYMBOL BASIC_FOOTPRINT_INFO FOOTPRINT_INFO_IMPL

Public Member Functions

virtual ~LIB_TREE_ITEM ()
 
virtual LIB_ID GetLibId () const =0
 
virtual wxString GetName () const =0
 
virtual wxString GetLibNickname () const =0
 
virtual wxString GetDescription ()=0
 
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. More...
 
virtual wxString GetSearchText ()
 
virtual bool IsRoot () const
 For items having aliases, IsRoot() indicates the principal item. More...
 
virtual wxString GetFootprint ()
 For items with footprint fields. More...
 
virtual int GetUnitCount () const
 For items with units, return the number of units. More...
 
virtual wxString GetUnitReference (int aUnit)
 For items with units, return an identifier for unit x. More...
 
virtual wxString GetUnitDisplayName (int aUnit)
 For items with units, return a display name for unit x. More...
 
virtual bool HasUnitDisplayName (int aUnit)
 For items with units, return true if a display name is set for x. More...
 

Detailed Description

A mix-in to provide polymorphism between items stored in libraries (symbols, aliases and footprints).

It is used primarily to drive the component tree for library browsing and editing.

Definition at line 39 of file lib_tree_item.h.

Constructor & Destructor Documentation

◆ ~LIB_TREE_ITEM()

virtual LIB_TREE_ITEM::~LIB_TREE_ITEM ( )
inlinevirtual

Definition at line 42 of file lib_tree_item.h.

43 {
44 }

Member Function Documentation

◆ GetChooserFields()

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

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 56 of file lib_tree_item.h.

56{}

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

◆ GetDescription()

virtual wxString LIB_TREE_ITEM::GetDescription ( )
pure virtual

◆ GetFootprint()

virtual wxString LIB_TREE_ITEM::GetFootprint ( )
inlinevirtual

For items with footprint fields.

Reimplemented in LIB_SYMBOL.

Definition at line 68 of file lib_tree_item.h.

68{ return wxEmptyString; }

Referenced by LIB_TREE_NODE_LIB_ID::LIB_TREE_NODE_LIB_ID().

◆ GetLibId()

virtual LIB_ID LIB_TREE_ITEM::GetLibId ( ) const
pure virtual

Implemented in LIB_SYMBOL, and FOOTPRINT_INFO.

Referenced by LIB_TREE_NODE_LIB_ID::Update().

◆ GetLibNickname()

virtual wxString LIB_TREE_ITEM::GetLibNickname ( ) const
pure virtual

◆ GetName()

virtual wxString LIB_TREE_ITEM::GetName ( ) const
pure virtual

◆ GetSearchText()

virtual wxString LIB_TREE_ITEM::GetSearchText ( )
inlinevirtual

Reimplemented in LIB_SYMBOL, and FOOTPRINT_INFO.

Definition at line 58 of file lib_tree_item.h.

58{ return wxEmptyString; }

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

◆ GetUnitCount()

virtual int LIB_TREE_ITEM::GetUnitCount ( void  ) const
inlinevirtual

For items with units, return the number of units.

Reimplemented in LIB_SYMBOL.

Definition at line 73 of file lib_tree_item.h.

73{ return 0; }

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

◆ GetUnitDisplayName()

virtual wxString LIB_TREE_ITEM::GetUnitDisplayName ( int  aUnit)
inlinevirtual

For items with units, return a display name for unit x.

Reimplemented in LIB_SYMBOL.

Definition at line 83 of file lib_tree_item.h.

83{ return wxEmptyString; }

Referenced by LIB_TREE_NODE_UNIT::LIB_TREE_NODE_UNIT().

◆ GetUnitReference()

virtual wxString LIB_TREE_ITEM::GetUnitReference ( int  aUnit)
inlinevirtual

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

Reimplemented in LIB_SYMBOL.

Definition at line 78 of file lib_tree_item.h.

78{ return wxEmptyString; }

Referenced by LIB_TREE_NODE_UNIT::LIB_TREE_NODE_UNIT().

◆ HasUnitDisplayName()

virtual bool LIB_TREE_ITEM::HasUnitDisplayName ( int  aUnit)
inlinevirtual

For items with units, return true if a display name is set for x.

Reimplemented in LIB_SYMBOL.

Definition at line 88 of file lib_tree_item.h.

88{ return false; }

Referenced by LIB_TREE_NODE_UNIT::LIB_TREE_NODE_UNIT().

◆ IsRoot()

virtual bool LIB_TREE_ITEM::IsRoot ( ) const
inlinevirtual

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

Reimplemented in LIB_SYMBOL.

Definition at line 63 of file lib_tree_item.h.

63{ return true; }

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


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