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_PART BASIC_FOOTPRINT_INFO FOOTPRINT_INFO_IMPL

Public Member Functions

virtual LIB_ID GetLibId () const =0
 
virtual wxString GetName () const =0
 
virtual wxString GetLibNickname () const =0
 
virtual wxString GetDescription ()=0
 
virtual wxString GetSearchText ()
 
virtual bool IsRoot () const
 For items having aliases, IsRoot() indicates the principal item. 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...
 

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.

Member Function Documentation

◆ GetDescription()

virtual wxString LIB_TREE_ITEM::GetDescription ( )
pure virtual

◆ GetLibId()

virtual LIB_ID LIB_TREE_ITEM::GetLibId ( ) const
pure virtual

Implemented in LIB_PART, 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_PART, and FOOTPRINT_INFO.

Definition at line 49 of file lib_tree_item.h.

49 { 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_PART.

Definition at line 59 of file lib_tree_item.h.

59 { return 0; }

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

◆ GetUnitReference()

virtual wxString LIB_TREE_ITEM::GetUnitReference ( int  aUnit)
inlinevirtual

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

Reimplemented in LIB_PART.

Definition at line 64 of file lib_tree_item.h.

64 { return wxEmptyString; }

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_PART.

Definition at line 54 of file lib_tree_item.h.

54 { 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: