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

Hold a record identifying a symbol library accessed by the appropriate symbol library SCH_IO object in the SYMBOL_LIB_TABLE. More...

#include <symbol_lib_table.h>

Inheritance diagram for SYMBOL_LIB_TABLE_ROW:
LIB_TABLE_ROW

Public Types

typedef SCH_IO_MGR::SCH_FILE_T LIB_T
 

Public Member Functions

 SYMBOL_LIB_TABLE_ROW (const wxString &aNick, const wxString &aURI, const wxString &aType, const wxString &aOptions=wxEmptyString, const wxString &aDescr=wxEmptyString)
 
 SYMBOL_LIB_TABLE_ROW ()
 
bool operator== (const SYMBOL_LIB_TABLE_ROW &aRow) const
 
bool operator!= (const SYMBOL_LIB_TABLE_ROW &aRow) const
 
LIB_T SchLibType () const
 
const wxString GetType () const override
 Return the type of symbol library table represented by this row.
 
void SetType (const wxString &aType) override
 Change the schematic plugin type represented by this row.
 
bool Refresh () override
 Attempt to reload the library.
 
bool SupportsSubLibraries () const
 
bool SupportsSettingsDialog () const override
 
void ShowSettingsDialog (wxWindow *aWindow) const override
 
void GetSubLibraryNames (std::vector< wxString > &aNames) const
 
wxString GetSubLibraryDescription (const wxString &aName) const
 
void GetAvailableSymbolFields (std::vector< wxString > &aNames) const
 
void GetDefaultSymbolFields (std::vector< wxString > &aNames) const
 
SCH_IO_MGR::SCH_FILE_T GetFileType ()
 
bool operator== (const LIB_TABLE_ROW &r) const
 
bool operator!= (const LIB_TABLE_ROW &r) const
 
const wxString & GetNickName () const
 
void SetNickName (const wxString &aNickName)
 Change the logical name of this library, useful for an editor.
 
bool GetIsLoaded () const
 
void SetLoaded (bool aLoaded)
 Mark the row as being a loaded library.
 
bool GetIsEnabled () const
 
void SetEnabled (bool aEnabled=true)
 Change the enabled status of this library.
 
bool GetIsVisible () const
 
void SetVisible (bool aVisible=true)
 
const wxString GetFullURI (bool aSubstituted=false) const
 Return the full location specifying URI for the LIB, either in original UI form or in environment variable expanded form.
 
void SetFullURI (const wxString &aFullURI)
 Change the full URI for the library.
 
const wxString & GetOptions () const
 Return the options string, which may hold a password or anything else needed to instantiate the underlying library plugin.
 
void SetOptions (const wxString &aOptions)
 Change the library options strings.
 
const wxString & GetDescr () const
 Return the description of the library referenced by this row.
 
void SetDescr (const wxString &aDescr)
 Change the description of the library referenced by this row.
 
LIB_TABLEGetParent () const
 
void SetParent (LIB_TABLE *aParent)
 
std::mutex & GetMutex ()
 
const std::map< std::string, UTF8 > * GetProperties () const
 Return the constant #PROPERTIES for this library (LIB_TABLE_ROW).
 
void Format (OUTPUTFORMATTER *out, int nestLevel) const
 Serialize this object as utf8 text to an OUTPUTFORMATTER, and tries to make it look good using multiple lines and indentation.
 
LIB_TABLE_ROWclone () const
 

Protected Member Functions

 SYMBOL_LIB_TABLE_ROW (const SYMBOL_LIB_TABLE_ROW &aRow)
 

Private Member Functions

virtual LIB_TABLE_ROWdo_clone () const override
 
void setPlugin (SCH_IO *aPlugin)
 
void setProperties (std::map< std::string, UTF8 > *aProperties)
 

Private Attributes

IO_RELEASER< SCH_IOplugin
 
LIB_T type
 
wxString nickName
 
wxString uri_user
 what user entered from UI or loaded from disk
 
wxString options
 
wxString description
 
bool enabled = true
 Whether the LIB_TABLE_ROW is enabled.
 
bool visible = true
 Whether the LIB_TABLE_ROW is visible in choosers.
 
bool m_loaded = false
 Whether the LIB_TABLE_ROW is loaded.
 
LIB_TABLEm_parent
 Pointer to the table this row lives in (maybe null)
 
std::unique_ptr< std::map< std::string, UTF8 > > properties
 
std::mutex m_loadMutex
 

Friends

class SYMBOL_LIB_TABLE
 

Detailed Description

Hold a record identifying a symbol library accessed by the appropriate symbol library SCH_IO object in the SYMBOL_LIB_TABLE.

Definition at line 42 of file symbol_lib_table.h.

Member Typedef Documentation

◆ LIB_T

typedef SCH_IO_MGR::SCH_FILE_T SYMBOL_LIB_TABLE_ROW::LIB_T

Definition at line 45 of file symbol_lib_table.h.

Constructor & Destructor Documentation

◆ SYMBOL_LIB_TABLE_ROW() [1/3]

SYMBOL_LIB_TABLE_ROW::SYMBOL_LIB_TABLE_ROW ( const wxString &  aNick,
const wxString &  aURI,
const wxString &  aType,
const wxString &  aOptions = wxEmptyString,
const wxString &  aDescr = wxEmptyString 
)
inline

Definition at line 47 of file symbol_lib_table.h.

References LIB_TABLE_ROW::SetEnabled(), and SetType().

◆ SYMBOL_LIB_TABLE_ROW() [2/3]

SYMBOL_LIB_TABLE_ROW::SYMBOL_LIB_TABLE_ROW ( )
inline

Definition at line 56 of file symbol_lib_table.h.

References LIB_TABLE_ROW::SetEnabled().

Referenced by do_clone().

◆ SYMBOL_LIB_TABLE_ROW() [3/3]

SYMBOL_LIB_TABLE_ROW::SYMBOL_LIB_TABLE_ROW ( const SYMBOL_LIB_TABLE_ROW aRow)
inlineprotected

Member Function Documentation

◆ clone()

LIB_TABLE_ROW * LIB_TABLE_ROW::clone ( ) const
inlineinherited

◆ do_clone()

virtual LIB_TABLE_ROW * SYMBOL_LIB_TABLE_ROW::do_clone ( ) const
inlineoverrideprivatevirtual

Implements LIB_TABLE_ROW.

Definition at line 131 of file symbol_lib_table.h.

References SYMBOL_LIB_TABLE_ROW().

◆ Format()

void LIB_TABLE_ROW::Format ( OUTPUTFORMATTER out,
int  nestLevel 
) const
inherited

Serialize this object as utf8 text to an OUTPUTFORMATTER, and tries to make it look good using multiple lines and indentation.

Parameters
outis an OUTPUTFORMATTER
nestLevelis the indentation level to base all lines of the output. Actual indentation will be 2 spaces for each nestLevel.

Definition at line 121 of file lib_table_base.cpp.

References LIB_TABLE_ROW::GetDescr(), LIB_TABLE_ROW::GetFullURI(), LIB_TABLE_ROW::GetIsEnabled(), LIB_TABLE_ROW::GetIsVisible(), LIB_TABLE_ROW::GetNickName(), LIB_TABLE_ROW::GetOptions(), LIB_TABLE_ROW::GetType(), OUTPUTFORMATTER::Print(), and OUTPUTFORMATTER::Quotew().

◆ GetAvailableSymbolFields()

void SYMBOL_LIB_TABLE_ROW::GetAvailableSymbolFields ( std::vector< wxString > &  aNames) const
inline
See also
SCH_IO::GetAvailableSymbolFields

Definition at line 103 of file symbol_lib_table.h.

References plugin.

Referenced by SYMBOL_TREE_MODEL_ADAPTER::AddLibraries().

◆ GetDefaultSymbolFields()

void SYMBOL_LIB_TABLE_ROW::GetDefaultSymbolFields ( std::vector< wxString > &  aNames) const
inline
See also
SCH_IO::GetDefaultSymbolFields

Definition at line 112 of file symbol_lib_table.h.

References plugin.

◆ GetDescr()

const wxString & LIB_TABLE_ROW::GetDescr ( ) const
inlineinherited

◆ GetFileType()

SCH_IO_MGR::SCH_FILE_T SYMBOL_LIB_TABLE_ROW::GetFileType ( )
inline

Definition at line 118 of file symbol_lib_table.h.

References type.

◆ GetFullURI()

const wxString LIB_TABLE_ROW::GetFullURI ( bool  aSubstituted = false) const
inherited

Return the full location specifying URI for the LIB, either in original UI form or in environment variable expanded form.

Parameters
aSubstitutedTells if caller wanted the substituted form, else not.

Definition at line 110 of file lib_table_base.cpp.

References ExpandEnvVarSubstitutions(), and LIB_TABLE_ROW::uri_user.

Referenced by EXPORTER_STEP::buildFootprint3DShapes(), SYMBOL_LIB_TABLE::CreateSymbolLib(), FOOTPRINT_EDIT_FRAME::DeleteFootprintFromLibrary(), SYMBOL_LIB_TABLE::DeleteSymbol(), SYMBOL_LIB_TABLE::DeleteSymbolLib(), DESIGN_BLOCK_LIB_TABLE::DesignBlockDelete(), DESIGN_BLOCK_LIB_TABLE::DesignBlockEnumerate(), DESIGN_BLOCK_LIB_TABLE::DesignBlockExists(), DESIGN_BLOCK_LIB_TABLE::DesignBlockLibCreate(), DESIGN_BLOCK_LIB_TABLE::DesignBlockLibDelete(), DESIGN_BLOCK_LIB_TABLE::DesignBlockLoad(), DESIGN_BLOCK_LIB_TABLE::DesignBlockSave(), SYMBOL_VIEWER_FRAME::DisplayLibInfos(), FOOTPRINT_EDIT_FRAME::DuplicateFootprint(), SYMBOL_LIB_TABLE::EnumerateSymbolLib(), SCH_EDITOR_CONTROL::ExportSymbolsToLibrary(), EXPORTER_PCB_VRML::ExportVrmlFootprint(), FP_LIB_TABLE::FootprintDelete(), FP_LIB_TABLE::FootprintEnumerate(), FP_LIB_TABLE::FootprintExists(), FP_LIB_TABLE::FootprintLibCreate(), FP_LIB_TABLE::FootprintLibDelete(), FP_LIB_TABLE::FootprintLoad(), FP_LIB_TABLE::FootprintSave(), LIB_TABLE_ROW::Format(), DESIGN_BLOCK_LIB_TABLE::GenerateTimestamp(), FP_LIB_TABLE::GenerateTimestamp(), DESIGN_BLOCK_LIB_TABLE::GetEnumeratedDesignBlock(), FP_LIB_TABLE::GetEnumeratedFootprint(), LIB_TABLE::GetFullURI(), SYMBOL_LIBRARY_MANAGER::GetLibraryHash(), LIB_TABLE_GRID::GetValue(), idf_export_footprint(), DESIGN_BLOCK_LIB_TABLE::IsDesignBlockLibWritable(), FP_LIB_TABLE::IsFootprintLibWritable(), SYMBOL_LIB_TABLE::IsSymbolLibWritable(), SYMBOL_EDIT_FRAME::KiwayMailIn(), SYMBOL_VIEWER_FRAME::KiwayMailIn(), RENDER_3D_RAYTRACE_BASE::load3DModels(), RENDER_3D_OPENGL::load3dModels(), DESIGN_BLOCK_LIB_TABLE::LoadGlobalTable(), FP_LIB_TABLE::LoadGlobalTable(), SYMBOL_LIB_TABLE::LoadGlobalTable(), SCH_EDIT_FRAME::LoadSheetFromFile(), SYMBOL_LIB_TABLE::LoadSymbol(), SYMBOL_LIB_TABLE::LoadSymbolLib(), PANEL_FP_PROPERTIES_3D_MODEL::OnAdd3DModel(), SYMBOL_EDITOR_CONTROL::OpenDirectory(), SYMBOL_EDITOR_CONTROL::OpenWithTextEditor(), DESIGN_BLOCK_LIB_TABLE::PrefetchLib(), FP_LIB_TABLE::PrefetchLib(), Refresh(), PCB::IFACE::SaveFileAs(), FOOTPRINT_EDIT_FRAME::SaveFootprint(), SYMBOL_LIBRARY_MANAGER::SaveLibrary(), SYMBOL_LIB_TABLE::SaveSymbol(), PCB_BASE_FRAME::setFPWatcher(), SCH_BASE_FRAME::setSymWatcher(), DESIGN_BLOCK_LIB_TABLE_GRID::SetValue(), SYMBOL_LIB_TABLE_GRID::SetValue(), FP_LIB_TABLE_GRID::SetValue(), FOOTPRINT_VIEWER_FRAME::UpdateTitle(), and PANEL_FP_PROPERTIES_3D_MODEL::validateModelExists().

◆ GetIsEnabled()

bool LIB_TABLE_ROW::GetIsEnabled ( ) const
inlineinherited

◆ GetIsLoaded()

bool LIB_TABLE_ROW::GetIsLoaded ( ) const
inlineinherited
Returns
true if the library was loaded without error

Definition at line 170 of file lib_table_base.h.

Referenced by SYMBOL_LIB_TABLE::IsSymbolLibLoaded().

◆ GetIsVisible()

◆ GetMutex()

std::mutex & LIB_TABLE_ROW::GetMutex ( )
inlineinherited

◆ GetNickName()

◆ GetOptions()

const wxString & LIB_TABLE_ROW::GetOptions ( ) const
inlineinherited

Return the options string, which may hold a password or anything else needed to instantiate the underlying library plugin.

Definition at line 225 of file lib_table_base.h.

Referenced by SYMBOL_LIB_TABLE::EnumerateSymbolLib(), LIB_TABLE_ROW::Format(), LIB_TABLE_GRID::GetValue(), SCH_EDIT_FRAME::LoadSheetFromFile(), SYMBOL_LIB_TABLE::LoadSymbolLib(), DESIGN_BLOCK_GRID_TRICKS::optionsEditor(), SYMBOL_GRID_TRICKS::optionsEditor(), and FP_GRID_TRICKS::optionsEditor().

◆ GetParent()

LIB_TABLE * LIB_TABLE_ROW::GetParent ( ) const
inlineinherited

Definition at line 242 of file lib_table_base.h.

Referenced by Refresh().

◆ GetProperties()

◆ GetSubLibraryDescription()

wxString SYMBOL_LIB_TABLE_ROW::GetSubLibraryDescription ( const wxString &  aName) const

Definition at line 107 of file symbol_lib_table.cpp.

References plugin.

Referenced by SYMBOL_TREE_MODEL_ADAPTER::AddLibraries().

◆ GetSubLibraryNames()

void SYMBOL_LIB_TABLE_ROW::GetSubLibraryNames ( std::vector< wxString > &  aNames) const

◆ GetType()

const wxString SYMBOL_LIB_TABLE_ROW::GetType ( ) const
inlineoverridevirtual

◆ operator!=() [1/2]

bool LIB_TABLE_ROW::operator!= ( const LIB_TABLE_ROW r) const
inlineinherited

Definition at line 155 of file lib_table_base.h.

◆ operator!=() [2/2]

bool SYMBOL_LIB_TABLE_ROW::operator!= ( const SYMBOL_LIB_TABLE_ROW aRow) const
inline

Definition at line 64 of file symbol_lib_table.h.

◆ operator==() [1/2]

◆ operator==() [2/2]

bool SYMBOL_LIB_TABLE_ROW::operator== ( const SYMBOL_LIB_TABLE_ROW aRow) const

Definition at line 63 of file symbol_lib_table.cpp.

References LIB_TABLE_ROW::operator==(), and type.

◆ Refresh()

bool SYMBOL_LIB_TABLE_ROW::Refresh ( )
overridevirtual

Attempt to reload the library.

Returns
true if a reload was required.
Exceptions
IO_ERRORif the reload was unsuccessful.

Reimplemented from LIB_TABLE_ROW.

Definition at line 80 of file symbol_lib_table.cpp.

References LIB_TABLE_ROW::GetFullURI(), LIB_TABLE_ROW::GetParent(), LIB_TABLE_ROW::GetProperties(), plugin, LIB_TABLE_ROW::SetLoaded(), and type.

Referenced by PANEL_SYM_LIB_TABLE::verifyTables().

◆ SchLibType()

LIB_T SYMBOL_LIB_TABLE_ROW::SchLibType ( ) const
inline

Definition at line 66 of file symbol_lib_table.h.

References type.

◆ SetDescr()

void LIB_TABLE_ROW::SetDescr ( const wxString &  aDescr)
inlineinherited

Change the description of the library referenced by this row.

Definition at line 240 of file lib_table_base.h.

Referenced by LIB_TABLE_GRID::SetValue().

◆ SetEnabled()

void LIB_TABLE_ROW::SetEnabled ( bool  aEnabled = true)
inlineinherited

Change the enabled status of this library.

Definition at line 185 of file lib_table_base.h.

Referenced by LIB_TABLE_GRID::SetValue(), LIB_TABLE_GRID::SetValueAsBool(), and SYMBOL_LIB_TABLE_ROW().

◆ SetFullURI()

void LIB_TABLE_ROW::SetFullURI ( const wxString &  aFullURI)
inherited

◆ SetLoaded()

void LIB_TABLE_ROW::SetLoaded ( bool  aLoaded)
inlineinherited

Mark the row as being a loaded library.

Definition at line 175 of file lib_table_base.h.

Referenced by SYMBOL_LIB_TABLE::EnumerateSymbolLib(), SYMBOL_LIB_TABLE::LoadSymbolLib(), and Refresh().

◆ SetNickName()

void LIB_TABLE_ROW::SetNickName ( const wxString &  aNickName)
inlineinherited

Change the logical name of this library, useful for an editor.

Definition at line 165 of file lib_table_base.h.

Referenced by SYMBOL_EDIT_FRAME::addLibTableEntry(), and LIB_TABLE_GRID::SetValue().

◆ SetOptions()

◆ SetParent()

void LIB_TABLE_ROW::SetParent ( LIB_TABLE aParent)
inlineinherited

Definition at line 244 of file lib_table_base.h.

Referenced by LIB_TABLE::doInsertRow(), and PANEL_SYM_LIB_TABLE::verifyTables().

◆ setPlugin()

void SYMBOL_LIB_TABLE_ROW::setPlugin ( SCH_IO aPlugin)
inlineprivate

Definition at line 136 of file symbol_lib_table.h.

References plugin.

Referenced by SYMBOL_LIB_TABLE::FindRow().

◆ setProperties()

void LIB_TABLE_ROW::setProperties ( std::map< std::string, UTF8 > *  aProperties)
privateinherited

Definition at line 98 of file lib_table_base.cpp.

References LIB_TABLE_ROW::properties.

Referenced by LIB_TABLE_ROW::SetOptions().

◆ SetType()

void SYMBOL_LIB_TABLE_ROW::SetType ( const wxString &  aType)
overridevirtual

Change the schematic plugin type represented by this row.

Implements LIB_TABLE_ROW.

Definition at line 69 of file symbol_lib_table.cpp.

References SCH_IO_MGR::EnumFromStr(), plugin, and type.

Referenced by SYMBOL_EDIT_FRAME::replaceLibTableEntry(), and SYMBOL_LIB_TABLE_ROW().

◆ SetVisible()

void LIB_TABLE_ROW::SetVisible ( bool  aVisible = true)
inlineinherited

Definition at line 189 of file lib_table_base.h.

Referenced by LIB_TABLE_GRID::SetValue(), and LIB_TABLE_GRID::SetValueAsBool().

◆ ShowSettingsDialog()

void SYMBOL_LIB_TABLE_ROW::ShowSettingsDialog ( wxWindow *  aWindow) const
overridevirtual

Reimplemented from LIB_TABLE_ROW.

Definition at line 116 of file symbol_lib_table.cpp.

References plugin, DIALOG_SHIM::ShowModal(), and type.

◆ SupportsSettingsDialog()

bool SYMBOL_LIB_TABLE_ROW::SupportsSettingsDialog ( ) const
inlineoverridevirtual

Reimplemented from LIB_TABLE_ROW.

Definition at line 88 of file symbol_lib_table.h.

References type.

◆ SupportsSubLibraries()

bool SYMBOL_LIB_TABLE_ROW::SupportsSubLibraries ( ) const
inline

Friends And Related Function Documentation

◆ SYMBOL_LIB_TABLE

friend class SYMBOL_LIB_TABLE
friend

Definition at line 129 of file symbol_lib_table.h.

Member Data Documentation

◆ description

wxString LIB_TABLE_ROW::description
privateinherited

Definition at line 296 of file lib_table_base.h.

Referenced by LIB_TABLE_ROW::operator==().

◆ enabled

bool LIB_TABLE_ROW::enabled = true
privateinherited

Whether the LIB_TABLE_ROW is enabled.

Definition at line 298 of file lib_table_base.h.

Referenced by LIB_TABLE_ROW::operator==().

◆ m_loaded

bool LIB_TABLE_ROW::m_loaded = false
privateinherited

Whether the LIB_TABLE_ROW is loaded.

Definition at line 300 of file lib_table_base.h.

◆ m_loadMutex

std::mutex LIB_TABLE_ROW::m_loadMutex
privateinherited

Definition at line 305 of file lib_table_base.h.

◆ m_parent

LIB_TABLE* LIB_TABLE_ROW::m_parent
privateinherited

Pointer to the table this row lives in (maybe null)

Definition at line 301 of file lib_table_base.h.

◆ nickName

wxString LIB_TABLE_ROW::nickName
privateinherited

Definition at line 293 of file lib_table_base.h.

Referenced by LIB_TABLE_ROW::operator==().

◆ options

wxString LIB_TABLE_ROW::options
privateinherited

Definition at line 295 of file lib_table_base.h.

Referenced by LIB_TABLE_ROW::operator==(), and LIB_TABLE_ROW::SetOptions().

◆ plugin

◆ properties

std::unique_ptr<std::map<std::string, UTF8> > LIB_TABLE_ROW::properties
privateinherited

Definition at line 303 of file lib_table_base.h.

Referenced by LIB_TABLE_ROW::LIB_TABLE_ROW(), and LIB_TABLE_ROW::setProperties().

◆ type

◆ uri_user

wxString LIB_TABLE_ROW::uri_user
privateinherited

what user entered from UI or loaded from disk

Definition at line 294 of file lib_table_base.h.

Referenced by LIB_TABLE_ROW::GetFullURI(), LIB_TABLE_ROW::operator==(), and LIB_TABLE_ROW::SetFullURI().

◆ visible

bool LIB_TABLE_ROW::visible = true
privateinherited

Whether the LIB_TABLE_ROW is visible in choosers.

Definition at line 299 of file lib_table_base.h.

Referenced by LIB_TABLE_ROW::operator==().


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