KiCad PCB EDA Suite
SCH_DATABASE_PLUGIN Class Reference

A KiCad database library provides both symbol and footprint metadata, so there are "shim" plugins on both the symbol and footprint side of things that expose the database contents to the schematic and board editors. More...

#include <sch_database_plugin.h>

Inheritance diagram for SCH_DATABASE_PLUGIN:
SCH_PLUGIN

Public Member Functions

 SCH_DATABASE_PLUGIN ()
 
virtual ~SCH_DATABASE_PLUGIN ()
 
const wxString GetName () const override
 Return a brief hard coded name for this SCH_PLUGIN. More...
 
const wxString GetLibraryFileExtension () const override
 Return the library file extension for the SCH_PLUGIN object. More...
 
const wxString GetFileExtension () const override
 Return the file extension for the SCH_PLUGIN. More...
 
int GetModifyHash () const override
 Return the modification hash from the library cache. More...
 
void EnumerateSymbolLib (wxArrayString &aSymbolNameList, const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties=nullptr) override
 Populate a list of LIB_SYMBOL alias names contained within the library aLibraryPath. More...
 
void EnumerateSymbolLib (std::vector< LIB_SYMBOL * > &aSymbolList, const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties=nullptr) override
 Populate a list of LIB_SYMBOL aliases contained within the library aLibraryPath. More...
 
LIB_SYMBOLLoadSymbol (const wxString &aLibraryPath, const wxString &aAliasName, const STRING_UTF8_MAP *aProperties=nullptr) override
 Load a LIB_SYMBOL object having aPartName from the aLibraryPath containing a library format that this SCH_PLUGIN knows about. More...
 
bool SupportsSubLibraries () const override
 
void GetSubLibraryNames (std::vector< wxString > &aNames) override
 Retrieves a list of sub-libraries in this library. More...
 
void GetAvailableSymbolFields (std::vector< wxString > &aNames) override
 Retrieves a list of (custom) field names that are present on symbols in this library. More...
 
void GetDefaultSymbolFields (std::vector< wxString > &aNames) override
 Retrieves a list of (custom) field names that should be shown by default for this library in the symbol chooser. More...
 
bool CheckHeader (const wxString &aFileName) override
 Return true if the first line in aFileName begins with the expected header. More...
 
bool IsSymbolLibWritable (const wxString &aLibraryPath) override
 Return true if the library at aLibraryPath is writable. More...
 
void SetLibTable (SYMBOL_LIB_TABLE *aTable) override
 Some library plugins need to have access to their parent library table. More...
 
virtual void SetReporter (REPORTER *aReporter)
 Set an optional reporter for warnings/errors. More...
 
virtual void SetProgressReporter (PROGRESS_REPORTER *aReporter)
 Set an optional progress reporter. More...
 
virtual void SaveLibrary (const wxString &aFileName, const STRING_UTF8_MAP *aProperties=nullptr)
 
virtual SCH_SHEETLoad (const wxString &aFileName, SCHEMATIC *aSchematic, SCH_SHEET *aAppendToMe=nullptr, const STRING_UTF8_MAP *aProperties=nullptr)
 Load information from some input file format that this SCH_PLUGIN implementation knows about, into either a new SCH_SHEET or an existing one. More...
 
virtual void Save (const wxString &aFileName, SCH_SHEET *aSheet, SCHEMATIC *aSchematic, const STRING_UTF8_MAP *aProperties=nullptr)
 Write aSchematic to a storage file in a format that this SCH_PLUGIN implementation knows about, or it can be used to write a portion of aSchematic to a special kind of export file. More...
 
virtual void SaveSymbol (const wxString &aLibraryPath, const LIB_SYMBOL *aSymbol, const STRING_UTF8_MAP *aProperties=nullptr)
 Write aSymbol to an existing library located at aLibraryPath. More...
 
virtual void DeleteSymbol (const wxString &aLibraryPath, const wxString &aSymbolName, const STRING_UTF8_MAP *aProperties=nullptr)
 Delete the entire LIB_SYMBOL associated with aAliasName from the library aLibraryPath. More...
 
virtual void CreateSymbolLib (const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties=nullptr)
 Create a new empty symbol library at aLibraryPath. More...
 
virtual bool DeleteSymbolLib (const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties=nullptr)
 Delete an existing symbol library and returns true if successful, or if library does not exist returns false, or throws an exception if library exists but is read only or cannot be deleted for some other reason. More...
 
virtual void SymbolLibOptions (STRING_UTF8_MAP *aListToAppendTo) const
 Append supported SCH_PLUGIN options to aListToAppenTo along with internationalized descriptions. More...
 
virtual const wxString & GetError () const
 Return an error string to the caller. More...
 

Private Member Functions

void ensureSettings (const wxString &aSettingsPath)
 
void ensureConnection ()
 
LIB_SYMBOLloadSymbolFromRow (const wxString &aSymbolName, const DATABASE_LIB_TABLE &aTable, const DATABASE_CONNECTION::ROW &aRow)
 

Private Attributes

SYMBOL_LIB_TABLEm_libTable
 
std::unique_ptr< DATABASE_LIB_SETTINGSm_settings
 
std::unique_ptr< DATABASE_CONNECTIONm_conn
 
std::set< wxString > m_customFields
 
std::set< wxString > m_defaultShownFields
 

Detailed Description

A KiCad database library provides both symbol and footprint metadata, so there are "shim" plugins on both the symbol and footprint side of things that expose the database contents to the schematic and board editors.

The architecture of these is slightly different from the other plugins because the backing file is just a configuration file rather than something that contains symbol or footprint data.

Definition at line 40 of file sch_database_plugin.h.

Constructor & Destructor Documentation

◆ SCH_DATABASE_PLUGIN()

SCH_DATABASE_PLUGIN::SCH_DATABASE_PLUGIN ( )

Definition at line 35 of file sch_database_plugin.cpp.

35 :
36 m_libTable( nullptr ),
37 m_settings(),
38 m_conn()
39{
40}
std::unique_ptr< DATABASE_CONNECTION > m_conn
std::unique_ptr< DATABASE_LIB_SETTINGS > m_settings
SYMBOL_LIB_TABLE * m_libTable

◆ ~SCH_DATABASE_PLUGIN()

SCH_DATABASE_PLUGIN::~SCH_DATABASE_PLUGIN ( )
virtual

Definition at line 43 of file sch_database_plugin.cpp.

44{
45}

Member Function Documentation

◆ CheckHeader()

bool SCH_DATABASE_PLUGIN::CheckHeader ( const wxString &  aFileName)
overridevirtual

Return true if the first line in aFileName begins with the expected header.

Parameters
aFileNameis the name of the file to use as input

Reimplemented from SCH_PLUGIN.

Definition at line 170 of file sch_database_plugin.cpp.

171{
172 // TODO: Implement this sometime; but CheckHeader isn't even called...
173 return true;
174}

◆ CreateSymbolLib()

void SCH_PLUGIN::CreateSymbolLib ( const wxString &  aLibraryPath,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

Create a new empty symbol library at aLibraryPath.

It is an error to attempt to create an existing library or to attempt to create on a "read only" location.

Parameters
aLibraryPathis a locator for the "library", usually a directory, file, or URL containing several footprints.
aPropertiesis an associative array that can be used to tell the library create function anything special, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL.
Exceptions
IO_ERRORif there is a problem finding the library, or creating it.

Reimplemented in SCH_SEXPR_PLUGIN, and SCH_LEGACY_PLUGIN.

Definition at line 110 of file sch_plugin.cpp.

111{
112 // not pure virtual so that plugins only have to implement subset of the SCH_PLUGIN interface.
113 not_implemented( this, __FUNCTION__ );
114}
static void not_implemented(const SCH_PLUGIN *aPlugin, const char *aCaller)
Function not_implemented throws an IO_ERROR and complains of an API function not being implemented.
Definition: sch_plugin.cpp:37

References not_implemented().

Referenced by SYMBOL_LIB_TABLE::CreateSymbolLib(), SYMBOL_EDIT_FRAME::ExportSymbol(), SCH_ALTIUM_PLUGIN::Load(), CADSTAR_SCH_ARCHIVE_PLUGIN::Load(), and SCH_EAGLE_PLUGIN::Load().

◆ DeleteSymbol()

void SCH_PLUGIN::DeleteSymbol ( const wxString &  aLibraryPath,
const wxString &  aSymbolName,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

Delete the entire LIB_SYMBOL associated with aAliasName from the library aLibraryPath.

Parameters
aLibraryPathis a locator for the "library", usually a directory, file, or URL containing several symbols.
aSymbolNameis the name of a LIB_SYMBOL associated with it's root LIB_SYMBOL object to delete from the specified library.
aPropertiesis an associative array that can be used to tell the library delete function anything special, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL.
Exceptions
IO_ERRORif there is a problem finding the alias or the library or deleting it.

Reimplemented in SCH_SEXPR_PLUGIN, and SCH_LEGACY_PLUGIN.

Definition at line 102 of file sch_plugin.cpp.

104{
105 // not pure virtual so that plugins only have to implement subset of the SCH_PLUGIN interface.
106 not_implemented( this, __FUNCTION__ );
107}

References not_implemented().

Referenced by SYMBOL_LIB_TABLE::DeleteSymbol(), and SYMBOL_LIBRARY_MANAGER::LIB_BUFFER::SaveBuffer().

◆ DeleteSymbolLib()

bool SCH_PLUGIN::DeleteSymbolLib ( const wxString &  aLibraryPath,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

Delete an existing symbol library and returns true if successful, or if library does not exist returns false, or throws an exception if library exists but is read only or cannot be deleted for some other reason.

Parameters
aLibraryPathis a locator for the "library", usually a directory or file which will contain symbols.
aPropertiesis an associative array that can be used to tell the library delete implementation function anything special, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL.
Returns
true if library deleted or false if library did not exist.
Exceptions
IO_ERRORif there is a problem deleting an existing library.

Reimplemented in SCH_SEXPR_PLUGIN, and SCH_LEGACY_PLUGIN.

Definition at line 117 of file sch_plugin.cpp.

118{
119 // not pure virtual so that plugins only have to implement subset of the SCH_PLUGIN interface.
120 not_implemented( this, __FUNCTION__ );
121 return false;
122}

References not_implemented().

Referenced by SYMBOL_LIB_TABLE::DeleteSymbolLib().

◆ ensureConnection()

void SCH_DATABASE_PLUGIN::ensureConnection ( )
private

Definition at line 217 of file sch_database_plugin.cpp.

218{
219 wxCHECK_RET( m_settings, "Call ensureSettings before ensureConnection!" );
220
221 if( !m_conn )
222 {
223 if( m_settings->m_Source.connection_string.empty() )
224 {
225 m_conn = std::make_unique<DATABASE_CONNECTION>( m_settings->m_Source.dsn,
226 m_settings->m_Source.username,
227 m_settings->m_Source.password,
228 m_settings->m_Source.timeout );
229 }
230 else
231 {
232 std::string cs = m_settings->m_Source.connection_string;
233 std::string basePath( wxFileName( m_settings->GetFilename() ).GetPath().ToUTF8() );
234
235 // Database drivers that use files operate on absolute paths, so provide a mechanism
236 // for specifing on-disk databases that live next to the kicad_dbl file
237 boost::replace_all( cs, "${CWD}", basePath );
238
239 m_conn = std::make_unique<DATABASE_CONNECTION>( cs, m_settings->m_Source.timeout );
240 }
241
242 if( !m_conn->IsConnected() )
243 {
244 wxString msg = wxString::Format(
245 _( "Could not load database library: could not connect to database %s (%s)" ),
246 m_settings->m_Source.dsn,
247 m_conn->GetLastError() );
248
249 m_conn.reset();
250
251 THROW_IO_ERROR( msg );
252 }
253
254 m_conn->SetCacheParams( m_settings->m_Cache.max_size, m_settings->m_Cache.max_age );
255 }
256}
#define _(s)
#define THROW_IO_ERROR(msg)
Definition: ki_exception.h:38
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200

References _, Format(), m_conn, m_settings, and THROW_IO_ERROR.

Referenced by EnumerateSymbolLib(), and LoadSymbol().

◆ ensureSettings()

void SCH_DATABASE_PLUGIN::ensureSettings ( const wxString &  aSettingsPath)
private

Definition at line 177 of file sch_database_plugin.cpp.

178{
179 auto tryLoad =
180 [&]()
181 {
182 if( !m_settings->LoadFromFile() )
183 {
184 wxString msg = wxString::Format(
185 _( "Could not load database library: settings file %s missing or invalid" ),
186 aSettingsPath );
187
188 THROW_IO_ERROR( msg );
189 }
190 };
191
192 if( !m_settings && !aSettingsPath.IsEmpty() )
193 {
194 std::string path( aSettingsPath.ToUTF8() );
195 m_settings = std::make_unique<DATABASE_LIB_SETTINGS>( path );
196 m_settings->SetReadOnly( true );
197
198 tryLoad();
199 }
200 else if( !m_conn && m_settings )
201 {
202 // If we have valid settings but no connection yet; reload settings in case user is editing
203 tryLoad();
204 }
205 else if( m_conn && m_settings && !aSettingsPath.IsEmpty() )
206 {
207 wxASSERT_MSG( aSettingsPath == m_settings->GetFilename(),
208 "Path changed for database library without re-initializing plugin!" );
209 }
210 else if( !m_settings )
211 {
212 wxLogTrace( traceDatabase, wxT( "ensureSettings: no settings but no valid path!" ) );
213 }
214}
const char *const traceDatabase

References _, Format(), m_conn, m_settings, path, THROW_IO_ERROR, and traceDatabase.

Referenced by EnumerateSymbolLib(), GetSubLibraryNames(), and LoadSymbol().

◆ EnumerateSymbolLib() [1/2]

void SCH_DATABASE_PLUGIN::EnumerateSymbolLib ( std::vector< LIB_SYMBOL * > &  aSymbolList,
const wxString &  aLibraryPath,
const STRING_UTF8_MAP aProperties = nullptr 
)
overridevirtual

Populate a list of LIB_SYMBOL aliases contained within the library aLibraryPath.

Note
It is the responsibility of the caller to delete the returned object from the heap. Failure to do this will result in memory leaks.
Parameters
aSymbolListis an array to populate with the LIB_SYMBOL pointers associated with the library.
aLibraryPathis a locator for the "library", usually a directory, file, or URL containing one or more LIB_SYMBOL objects.
aPropertiesis an associative array that can be used to tell the plugin anything needed about how to perform with respect to aLibraryPath. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL.
Exceptions
IO_ERRORif the library cannot be found, the part library cannot be loaded.

Reimplemented from SCH_PLUGIN.

Definition at line 60 of file sch_database_plugin.cpp.

63{
64 wxCHECK_RET( m_libTable, "Database plugin missing library table handle!" );
65 ensureSettings( aLibraryPath );
67
68 bool powerSymbolsOnly = ( aProperties &&
69 aProperties->find( SYMBOL_LIB_TABLE::PropPowerSymsOnly ) !=
70 aProperties->end() );
71
72 for( const DATABASE_LIB_TABLE& table : m_settings->m_Tables )
73 {
74 std::vector<DATABASE_CONNECTION::ROW> results;
75
76 if( !m_conn->SelectAll( table.table, results ) )
77 {
78 if( !m_conn->GetLastError().empty() )
79 {
80 wxString msg = wxString::Format( _( "Error reading database table %s: %s" ),
81 table.table, m_conn->GetLastError() );
82 THROW_IO_ERROR( msg );
83 }
84
85 continue;
86 }
87
88 for( DATABASE_CONNECTION::ROW& result : results )
89 {
90 if( !result.count( table.key_col ) )
91 continue;
92
93 wxString name( fmt::format( "{}/{}", table.name,
94 std::any_cast<std::string>( result[table.key_col] ) ) );
95
96 LIB_SYMBOL* symbol = loadSymbolFromRow( name, table, result );
97
98 if( symbol && ( !powerSymbolsOnly || symbol->IsPower() ) )
99 aSymbolList.emplace_back( symbol );
100 }
101 }
102}
const char * name
Definition: DXF_plotter.cpp:56
std::map< std::string, std::any > ROW
Define a library symbol object.
Definition: lib_symbol.h:98
bool IsPower() const
Definition: lib_symbol.cpp:552
void ensureSettings(const wxString &aSettingsPath)
LIB_SYMBOL * loadSymbolFromRow(const wxString &aSymbolName, const DATABASE_LIB_TABLE &aTable, const DATABASE_CONNECTION::ROW &aRow)
static const char * PropPowerSymsOnly
A database library table will be mapped to a sub-library provided by the database library entry in th...
std::string key_col
Unique key column name (will form part of the LIB_ID)
std::string name
KiCad library nickname (will form part of the LIB_ID)
std::string table
Database table to pull content from.

References _, ensureConnection(), ensureSettings(), Format(), LIB_SYMBOL::IsPower(), DATABASE_LIB_TABLE::key_col, loadSymbolFromRow(), m_conn, m_libTable, m_settings, name, DATABASE_LIB_TABLE::name, SYMBOL_LIB_TABLE::PropPowerSymsOnly, DATABASE_LIB_TABLE::table, and THROW_IO_ERROR.

◆ EnumerateSymbolLib() [2/2]

void SCH_DATABASE_PLUGIN::EnumerateSymbolLib ( wxArrayString &  aSymbolNameList,
const wxString &  aLibraryPath,
const STRING_UTF8_MAP aProperties = nullptr 
)
overridevirtual

Populate a list of LIB_SYMBOL alias names contained within the library aLibraryPath.

Parameters
aSymbolNameListis an array to populate with the LIB_SYMBOL names associated with the library.
aLibraryPathis a locator for the "library", usually a directory, file, or URL containing one or more LIB_SYMBOL objects.
aPropertiesis an associative array that can be used to tell the plugin anything needed about how to perform with respect to aLibraryPath. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL.
Exceptions
IO_ERRORif the library cannot be found, the part library cannot be loaded.

Reimplemented from SCH_PLUGIN.

Definition at line 48 of file sch_database_plugin.cpp.

51{
52 std::vector<LIB_SYMBOL*> symbols;
53 EnumerateSymbolLib( symbols, aLibraryPath, aProperties );
54
55 for( LIB_SYMBOL* symbol : symbols )
56 aSymbolNameList.Add( symbol->GetName() );
57}
void EnumerateSymbolLib(wxArrayString &aSymbolNameList, const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties=nullptr) override
Populate a list of LIB_SYMBOL alias names contained within the library aLibraryPath.

References EnumerateSymbolLib().

Referenced by EnumerateSymbolLib().

◆ GetAvailableSymbolFields()

void SCH_DATABASE_PLUGIN::GetAvailableSymbolFields ( std::vector< wxString > &  aNames)
overridevirtual

Retrieves a list of (custom) field names that are present on symbols in this library.

The plugin is responsible for guaranteeing that this list contains the set of unique custom field names present on any symbols contained in the library.

The required KiCad fields are not included in this list.

Parameters
aNameswill be filled with any custom fields present in this library.

Reimplemented from SCH_PLUGIN.

Definition at line 157 of file sch_database_plugin.cpp.

158{
159 std::copy( m_customFields.begin(), m_customFields.end(), std::back_inserter( aNames ) );
160}
std::set< wxString > m_customFields

References m_customFields.

◆ GetDefaultSymbolFields()

void SCH_DATABASE_PLUGIN::GetDefaultSymbolFields ( std::vector< wxString > &  aNames)
overridevirtual

Retrieves a list of (custom) field names that should be shown by default for this library in the symbol chooser.

This list should be a subset of the result returned by GetAvailableSymbolFields().

The preference for which fields to hide and show for a given library is stored on a per-library basis in a user's preferences (or in the project local settings for a project- local library). The set of fields returned by GetDefaultSymbolFields() will be used if this preference is missing.

Parameters
aNameswill be filled with the custom field names that should be shown by default

Reimplemented from SCH_PLUGIN.

Definition at line 163 of file sch_database_plugin.cpp.

164{
165 std::copy( m_defaultShownFields.begin(), m_defaultShownFields.end(),
166 std::back_inserter( aNames ) );
167}
std::set< wxString > m_defaultShownFields

References m_defaultShownFields.

◆ GetError()

const wxString & SCH_PLUGIN::GetError ( ) const
virtualinherited

Return an error string to the caller.

This is useful for schematic loaders that can load partial schematics where throwing an exception would be problematic such as the KiCad legacy plugin.

Returns
an unformatted string containing errors if any.

Reimplemented in SCH_SEXPR_PLUGIN, and SCH_LEGACY_PLUGIN.

Definition at line 177 of file sch_plugin.cpp.

178{
179 // not pure virtual so that plugins only have to implement subset of the SCH_PLUGIN interface.
180 not_implemented( this, __FUNCTION__ );
181 static wxString error;
182 return error;
183}

References not_implemented().

Referenced by KI_TEST::SCHEMATIC_TEST_FIXTURE::LoadSchematic(), SCH_EDIT_FRAME::LoadSheetFromFile(), and SCH_EDIT_FRAME::OpenProjectFiles().

◆ GetFileExtension()

const wxString SCH_DATABASE_PLUGIN::GetFileExtension ( ) const
inlineoverridevirtual

Return the file extension for the SCH_PLUGIN.

Implements SCH_PLUGIN.

Definition at line 57 of file sch_database_plugin.h.

58 {
59 wxFAIL_MSG( "Database libraries are not schematic files! Fix call site." );
61 }
const std::string DatabaseLibraryFileExtension

References DatabaseLibraryFileExtension.

◆ GetLibraryFileExtension()

const wxString SCH_DATABASE_PLUGIN::GetLibraryFileExtension ( ) const
inlineoverridevirtual

Return the library file extension for the SCH_PLUGIN object.

Implements SCH_PLUGIN.

Definition at line 52 of file sch_database_plugin.h.

53 {
55 }

References DatabaseLibraryFileExtension.

◆ GetModifyHash()

int SCH_DATABASE_PLUGIN::GetModifyHash ( ) const
inlineoverridevirtual

Return the modification hash from the library cache.

Note
This is temporary until the new s-expr file format is implement. The new file format will embed symbols instead of referencing them from the library. This function can be removed when the new file format is implemented.
Returns
the modification hash of the library cache.

Implements SCH_PLUGIN.

Definition at line 63 of file sch_database_plugin.h.

63{ return 0; }

◆ GetName()

const wxString SCH_DATABASE_PLUGIN::GetName ( ) const
inlineoverridevirtual

Return a brief hard coded name for this SCH_PLUGIN.

Implements SCH_PLUGIN.

Definition at line 47 of file sch_database_plugin.h.

48 {
49 return wxT( "Database library" );
50 }

◆ GetSubLibraryNames()

void SCH_DATABASE_PLUGIN::GetSubLibraryNames ( std::vector< wxString > &  aNames)
overridevirtual

Retrieves a list of sub-libraries in this library.

Some types of symbol library support sub-libraries, which are a single-level organizational hierarchy that is implementation-defined per plugin. Most of KiCad ignores sub-libraries and treats the hierarchy between library and symbol as flat, but the sub-libraries are used for sorting and grouping symbols in the symbol chooser.

Has no effect if SupportsSubLibraries() returns false.

Parameters
aNameswill be filled with a list of sub-libraries within this symbol library

Reimplemented from SCH_PLUGIN.

Definition at line 146 of file sch_database_plugin.cpp.

147{
148 ensureSettings( wxEmptyString );
149
150 aNames.clear();
151
152 for( const DATABASE_LIB_TABLE& tableIter : m_settings->m_Tables )
153 aNames.emplace_back( tableIter.name );
154}

References ensureSettings(), m_settings, and DATABASE_LIB_TABLE::name.

◆ IsSymbolLibWritable()

bool SCH_DATABASE_PLUGIN::IsSymbolLibWritable ( const wxString &  aLibraryPath)
inlineoverridevirtual

Return true if the library at aLibraryPath is writable.

(Often system libraries are read only because of where they are installed.)

Parameters
aLibraryPathis a locator for the "library", usually a directory, file, or URL containing several symbols.
Exceptions
IO_ERRORif no library at aLibraryPath exists.

Reimplemented from SCH_PLUGIN.

Definition at line 87 of file sch_database_plugin.h.

88 {
89 return false;
90 }

◆ Load()

SCH_SHEET * SCH_PLUGIN::Load ( const wxString &  aFileName,
SCHEMATIC aSchematic,
SCH_SHEET aAppendToMe = nullptr,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

Load information from some input file format that this SCH_PLUGIN implementation knows about, into either a new SCH_SHEET or an existing one.

This may be used to load an entire new SCH_SHEET, or to augment an existing one if aAppendToMe is not NULL.

Parameters
aFileNameis the name of the file to use as input and may be foreign in nature or native in nature.
aKiwayis the KIWAY object used to access the symbol libraries loaded by the project.
aAppendToMeis an existing SCH_SHEET to append to, but if NULL then this means "do not append, rather load anew".
aPropertiesis an associative array that can be used to tell the loader how to load the file, because it can take any number of additional named arguments that the plugin is known to support. These are tuning parameters for the import or load. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL.
Returns
the successfully loaded schematic, or the same one as aAppendToMe if aAppendToMe was not NULL, and the caller owns it.
Exceptions
IO_ERRORif there is a problem loading, and its contents should say what went wrong, using line number and character offsets of the input file if possible.

Reimplemented in SCH_ALTIUM_PLUGIN, CADSTAR_SCH_ARCHIVE_PLUGIN, SCH_EAGLE_PLUGIN, SCH_SEXPR_PLUGIN, and SCH_LEGACY_PLUGIN.

Definition at line 51 of file sch_plugin.cpp.

53{
54 not_implemented( this, __FUNCTION__ );
55 return nullptr;
56}

References not_implemented().

Referenced by SCH_EDIT_FRAME::importFile(), KI_TEST::SCHEMATIC_TEST_FIXTURE::LoadSchematic(), EESCHEMA_HELPERS::LoadSchematic(), SCH_EDIT_FRAME::LoadSheetFromFile(), and SCH_EDIT_FRAME::OpenProjectFiles().

◆ LoadSymbol()

LIB_SYMBOL * SCH_DATABASE_PLUGIN::LoadSymbol ( const wxString &  aLibraryPath,
const wxString &  aPartName,
const STRING_UTF8_MAP aProperties = nullptr 
)
overridevirtual

Load a LIB_SYMBOL object having aPartName from the aLibraryPath containing a library format that this SCH_PLUGIN knows about.

Parameters
aLibraryPathis a locator for the "library", usually a directory, file, or URL containing several symbols.
aPartNameis the name of the LIB_SYMBOL to load.
aPropertiesis an associative array that can be used to tell the loader implementation to do something special, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL.
Returns
the part created on the heap if found caller shares it or NULL if not found.
Exceptions
IO_ERRORif the library cannot be found or read. No exception is thrown in the case where aAliasName cannot be found.

Reimplemented from SCH_PLUGIN.

Definition at line 105 of file sch_database_plugin.cpp.

108{
109 wxCHECK( m_libTable, nullptr );
110 ensureSettings( aLibraryPath );
112
113 const DATABASE_LIB_TABLE* table = nullptr;
114
115 std::string tableName( aAliasName.BeforeFirst( '/' ).ToUTF8() );
116 std::string symbolName( aAliasName.AfterFirst( '/' ).ToUTF8() );
117
118 for( const DATABASE_LIB_TABLE& tableIter : m_settings->m_Tables )
119 {
120 if( tableIter.name == tableName )
121 {
122 table = &tableIter;
123 break;
124 }
125 }
126
127 if( !table )
128 {
129 wxLogTrace( traceDatabase, wxT( "LoadSymbol: table %s not found in config" ), tableName );
130 return nullptr;
131 }
132
134
135 if( !m_conn->SelectOne( table->table, std::make_pair( table->key_col, symbolName ), result ) )
136 {
137 wxLogTrace( traceDatabase, wxT( "LoadSymbol: SelectOne (%s, %s) failed" ), table->key_col,
138 symbolName );
139 return nullptr;
140 }
141
142 return loadSymbolFromRow( aAliasName, *table, result );
143}

References ensureConnection(), ensureSettings(), DATABASE_LIB_TABLE::key_col, loadSymbolFromRow(), m_conn, m_libTable, m_settings, DATABASE_LIB_TABLE::name, DATABASE_LIB_TABLE::table, and traceDatabase.

◆ loadSymbolFromRow()

LIB_SYMBOL * SCH_DATABASE_PLUGIN::loadSymbolFromRow ( const wxString &  aSymbolName,
const DATABASE_LIB_TABLE aTable,
const DATABASE_CONNECTION::ROW aRow 
)
private

Definition at line 259 of file sch_database_plugin.cpp.

262{
263 LIB_SYMBOL* symbol = nullptr;
264
265 if( aRow.count( aTable.symbols_col ) )
266 {
267 // TODO: Support multiple options for symbol
268 std::string symbolIdStr = std::any_cast<std::string>( aRow.at( aTable.symbols_col ) );
269 LIB_ID symbolId;
270 symbolId.Parse( std::any_cast<std::string>( aRow.at( aTable.symbols_col ) ) );
271
272 LIB_SYMBOL* originalSymbol = m_libTable->LoadSymbol( symbolId );
273
274 if( originalSymbol )
275 {
276 wxLogTrace( traceDatabase, wxT( "loadSymbolFromRow: found original symbol '%s'" ),
277 symbolIdStr );
278 symbol = originalSymbol->Duplicate();
279 }
280 else
281 {
282 wxLogTrace( traceDatabase, wxT( "loadSymboFromRow: source symbol '%s' not found, "
283 "will create empty symbol" ), symbolIdStr );
284 }
285 }
286
287 if( !symbol )
288 {
289 // Actual symbol not found: return metadata only; error will be indicated in the
290 // symbol chooser
291 symbol = new LIB_SYMBOL( aSymbolName );
292 }
293 else
294 {
295 symbol->SetName( aSymbolName );
296 }
297
298 symbol->LibId().SetSubLibraryName( aTable.name );
299
300 if( aRow.count( aTable.footprints_col ) )
301 {
302 // TODO: Support multiple footprint choices
303 std::string footprints = std::any_cast<std::string>( aRow.at( aTable.footprints_col ) );
304 wxString footprint = wxString( footprints.c_str(), wxConvUTF8 ).BeforeFirst( ';' );
305 symbol->GetFootprintField().SetText( footprint );
306 }
307 else
308 {
309 wxLogTrace( traceDatabase, wxT( "loadSymboFromRow: footprint field %s not found." ),
310 aTable.footprints_col );
311 }
312
313 if( !aTable.properties.description.empty() && aRow.count( aTable.properties.description ) )
314 {
315 wxString value(
316 std::any_cast<std::string>( aRow.at( aTable.properties.description ) ).c_str(),
317 wxConvUTF8 );
318 symbol->SetDescription( value );
319 }
320
321 if( !aTable.properties.keywords.empty() && aRow.count( aTable.properties.keywords ) )
322 {
323 wxString value( std::any_cast<std::string>( aRow.at( aTable.properties.keywords ) ).c_str(),
324 wxConvUTF8 );
325 symbol->SetKeyWords( value );
326 }
327
328 if( !aTable.properties.footprint_filters.empty()
329 && aRow.count( aTable.properties.footprint_filters ) )
330 {
331 wxString value( std::any_cast<std::string>( aRow.at( aTable.properties.footprint_filters ) )
332 .c_str(),
333 wxConvUTF8 );
334 wxArrayString filters;
335 filters.push_back( value );
336 symbol->SetFPFilters( filters );
337 }
338
339 if( !aTable.properties.exclude_from_board.empty()
340 && aRow.count( aTable.properties.exclude_from_board ) )
341 {
342 bool exclude = std::any_cast<bool>( aRow.at( aTable.properties.exclude_from_board ) );
343 symbol->SetIncludeOnBoard( !exclude );
344 }
345
346 if( !aTable.properties.exclude_from_bom.empty()
347 && aRow.count( aTable.properties.exclude_from_bom ) )
348 {
349 bool exclude = std::any_cast<bool>( aRow.at( aTable.properties.exclude_from_bom ) );
350 symbol->SetIncludeInBom( !exclude );
351 }
352
353 std::vector<LIB_FIELD*> fields;
354 symbol->GetFields( fields );
355
356 std::unordered_map<wxString, LIB_FIELD*> fieldsMap;
357
358 for( LIB_FIELD* field : fields )
359 fieldsMap[field->GetName()] = field;
360
361 for( const DATABASE_FIELD_MAPPING& mapping : aTable.fields )
362 {
363 if( !aRow.count( mapping.column ) )
364 {
365 wxLogTrace( traceDatabase, wxT( "loadSymboFromRow: field %s not found in result" ),
366 mapping.column );
367 continue;
368 }
369
370 wxString value( std::any_cast<std::string>( aRow.at( mapping.column ) ).c_str(),
371 wxConvUTF8 );
372
373 if( mapping.name == wxT( "Value" ) )
374 {
375 LIB_FIELD& field = symbol->GetValueField();
376 field.SetText( value );
377
378 if( !mapping.inherit_properties )
379 {
380 field.SetVisible( mapping.visible_on_add );
381 field.SetNameShown( mapping.show_name );
382 }
383 continue;
384 }
385 else if( mapping.name == wxT( "Datasheet" ) )
386 {
387 LIB_FIELD& field = symbol->GetDatasheetField();
388 field.SetText( value );
389
390 if( !mapping.inherit_properties )
391 {
392 field.SetVisible( mapping.visible_on_add );
393 field.SetNameShown( mapping.show_name );
394
395 if( mapping.visible_on_add )
396 field.SetAutoAdded( true );
397 }
398
399 continue;
400 }
401
402 LIB_FIELD* field;
403 bool isNew = false;
404
405 if( fieldsMap.count( mapping.name ) )
406 {
407 field = fieldsMap[mapping.name];
408 }
409 else
410 {
411 field = new LIB_FIELD( symbol->GetNextAvailableFieldId() );
412 field->SetName( mapping.name );
413 isNew = true;
414 fieldsMap[mapping.name] = field;
415 }
416
417 if( !mapping.inherit_properties || isNew )
418 {
419 field->SetVisible( mapping.visible_on_add );
420 field->SetAutoAdded( true );
421 field->SetNameShown( mapping.show_name );
422 }
423
424 field->SetText( value );
425
426 if( isNew )
427 symbol->AddField( field );
428
429 m_customFields.insert( mapping.name );
430
431 if( mapping.visible_in_chooser )
432 m_defaultShownFields.insert( mapping.name );
433 }
434
435 return symbol;
436}
virtual void SetVisible(bool aVisible)
Definition: eda_text.cpp:217
virtual void SetText(const wxString &aText)
Definition: eda_text.cpp:163
Field object used in symbol libraries.
Definition: lib_field.h:60
void SetAutoAdded(bool aAutoAdded)
Definition: lib_field.h:179
void SetName(const wxString &aName)
Set a user definable field name to aName.
Definition: lib_field.cpp:494
void SetNameShown(bool aShown=true)
Definition: lib_field.h:182
A logical library item identifier and consists of various portions much like a URI.
Definition: lib_id.h:49
int Parse(const UTF8 &aId, bool aFix=false)
Parse LIB_ID with the information from aId.
Definition: lib_id.cpp:50
void SetSubLibraryName(const UTF8 &aName)
Definition: lib_id.h:130
void SetIncludeOnBoard(bool aIncludeOnBoard)
Set or clear include in board netlist flag.
Definition: lib_symbol.h:659
int GetNextAvailableFieldId() const
virtual LIB_SYMBOL * Duplicate() const
Create a copy of a LIB_SYMBOL and assigns unique KIIDs to the copy and its children.
Definition: lib_symbol.h:113
LIB_FIELD & GetFootprintField()
Return reference to the footprint field.
void SetDescription(const wxString &aDescription)
Definition: lib_symbol.h:144
void SetKeyWords(const wxString &aKeyWords)
Definition: lib_symbol.h:157
void GetFields(std::vector< LIB_FIELD * > &aList)
Return a list of fields within this symbol.
LIB_FIELD & GetValueField()
Return reference to the value field.
void SetFPFilters(const wxArrayString &aFilters)
Definition: lib_symbol.h:192
void AddField(LIB_FIELD *aField)
Add a field.
LIB_ID & LibId()
Definition: lib_symbol.h:138
LIB_FIELD & GetDatasheetField()
Return reference to the datasheet field.
void SetIncludeInBom(bool aIncludeInBom)
Set or clear the include in schematic bill of materials flag.
Definition: lib_symbol.h:651
virtual void SetName(const wxString &aName)
Definition: lib_symbol.cpp:441
LIB_SYMBOL * LoadSymbol(const wxString &aNickname, const wxString &aName)
Load a LIB_SYMBOL having aName from the library given by aNickname.
bool visible_in_chooser
Whether the column is shown by default in the chooser.
std::string column
Database column name.
std::string name
KiCad field name.
bool inherit_properties
Whether or not to inherit properties from symbol field.
bool visible_on_add
Whether to show the field when placing the symbol.
bool show_name
Whether or not to show the field name as well as its value.
std::string symbols_col
Column name containing KiCad symbol refs.
std::string footprints_col
Column name containing KiCad footprint refs.
std::vector< DATABASE_FIELD_MAPPING > fields
MAPPABLE_SYMBOL_PROPERTIES properties

References LIB_SYMBOL::AddField(), DATABASE_FIELD_MAPPING::column, MAPPABLE_SYMBOL_PROPERTIES::description, LIB_SYMBOL::Duplicate(), MAPPABLE_SYMBOL_PROPERTIES::exclude_from_board, MAPPABLE_SYMBOL_PROPERTIES::exclude_from_bom, DATABASE_LIB_TABLE::fields, MAPPABLE_SYMBOL_PROPERTIES::footprint_filters, DATABASE_LIB_TABLE::footprints_col, LIB_SYMBOL::GetDatasheetField(), LIB_SYMBOL::GetFields(), LIB_SYMBOL::GetFootprintField(), LIB_SYMBOL::GetNextAvailableFieldId(), LIB_SYMBOL::GetValueField(), DATABASE_FIELD_MAPPING::inherit_properties, MAPPABLE_SYMBOL_PROPERTIES::keywords, LIB_SYMBOL::LibId(), SYMBOL_LIB_TABLE::LoadSymbol(), m_customFields, m_defaultShownFields, m_libTable, DATABASE_FIELD_MAPPING::name, DATABASE_LIB_TABLE::name, LIB_ID::Parse(), DATABASE_LIB_TABLE::properties, LIB_FIELD::SetAutoAdded(), LIB_SYMBOL::SetDescription(), LIB_SYMBOL::SetFPFilters(), LIB_SYMBOL::SetIncludeInBom(), LIB_SYMBOL::SetIncludeOnBoard(), LIB_SYMBOL::SetKeyWords(), LIB_FIELD::SetName(), LIB_SYMBOL::SetName(), LIB_FIELD::SetNameShown(), LIB_ID::SetSubLibraryName(), EDA_TEXT::SetText(), EDA_TEXT::SetVisible(), DATABASE_FIELD_MAPPING::show_name, DATABASE_LIB_TABLE::symbols_col, traceDatabase, DATABASE_FIELD_MAPPING::visible_in_chooser, and DATABASE_FIELD_MAPPING::visible_on_add.

Referenced by EnumerateSymbolLib(), and LoadSymbol().

◆ Save()

void SCH_PLUGIN::Save ( const wxString &  aFileName,
SCH_SHEET aSheet,
SCHEMATIC aSchematic,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

Write aSchematic to a storage file in a format that this SCH_PLUGIN implementation knows about, or it can be used to write a portion of aSchematic to a special kind of export file.

Parameters
aFileNameis the name of a file to save to on disk.
aSheetis the class SCH_SHEET in memory document tree from which to extract information when writing to aFileName. The caller continues to own the SCHEMATIC, and the plugin should refrain from modifying the SCHEMATIC if possible.
aSchematicis the SCHEMATIC object used to access any schematic-wide or project information needed to save the document.
aPropertiesis an associative array that can be used to tell the saver how to save the file, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL. Set the #PropSaveCurrentSheetOnly property to only save the current sheet. Otherwise, all hierarchical sheets are saved.
Exceptions
IO_ERRORif there is a problem saving or exporting.

Reimplemented in SCH_LEGACY_PLUGIN, and SCH_SEXPR_PLUGIN.

Definition at line 59 of file sch_plugin.cpp.

61{
62 // not pure virtual so that plugins only have to implement subset of the SCH_PLUGIN interface.
63 not_implemented( this, __FUNCTION__ );
64}

References not_implemented().

Referenced by DIALOG_SHEET_PROPERTIES::onSheetFilenameChanged(), and SCH_EDIT_FRAME::saveSchematicFile().

◆ SaveLibrary()

void SCH_PLUGIN::SaveLibrary ( const wxString &  aFileName,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

◆ SaveSymbol()

void SCH_PLUGIN::SaveSymbol ( const wxString &  aLibraryPath,
const LIB_SYMBOL aSymbol,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

Write aSymbol to an existing library located at aLibraryPath.

If a LIB_SYMBOL by the same name already exists or there are any conflicting alias names, the new LIB_SYMBOL will silently overwrite any existing aliases and/or part because libraries cannot have duplicate alias names. It is the responsibility of the caller to check the library for conflicts before saving.

Parameters
aLibraryPathis a locator for the "library", usually a directory, file, or URL containing several symbols.
aSymbolis what to store in the library. The library is refreshed and the caller must update any LIB_SYMBOL pointers that may have changed.
aPropertiesis an associative array that can be used to tell the saver how to save the symbol, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL.
Exceptions
IO_ERRORif there is a problem saving.

Reimplemented in SCH_SEXPR_PLUGIN, and SCH_LEGACY_PLUGIN.

Definition at line 94 of file sch_plugin.cpp.

96{
97 // not pure virtual so that plugins only have to implement subset of the SCH_PLUGIN interface.
98 not_implemented( this, __FUNCTION__ );
99}

References not_implemented().

Referenced by PANEL_SYM_LIB_TABLE::convertLibrary(), SYMBOL_EDIT_FRAME::ExportSymbol(), SCH_EDITOR_CONTROL::ExportSymbolsToLibrary(), SCH_EAGLE_PLUGIN::loadLibrary(), SCH_ALTIUM_PLUGIN::ParseFileHeader(), SCH_ALTIUM_PLUGIN::ParsePowerPort(), SYMBOL_LIBRARY_MANAGER::LIB_BUFFER::SaveBuffer(), SYMBOL_LIBRARY_MANAGER::SaveLibrary(), SYMBOL_LIB_TABLE::SaveSymbol(), and SYMBOL_LIB_TABLE_RESCUER::WriteRescueLibrary().

◆ SetLibTable()

void SCH_DATABASE_PLUGIN::SetLibTable ( SYMBOL_LIB_TABLE aTable)
inlineoverridevirtual

Some library plugins need to have access to their parent library table.

Parameters
aTableis the table this plugin is registered within.

Reimplemented from SCH_PLUGIN.

Definition at line 92 of file sch_database_plugin.h.

93 {
94 m_libTable = aTable;
95 }

References m_libTable.

◆ SetProgressReporter()

virtual void SCH_PLUGIN::SetProgressReporter ( PROGRESS_REPORTER aReporter)
inlinevirtualinherited

Set an optional progress reporter.

Reimplemented in CADSTAR_SCH_ARCHIVE_PLUGIN, SCH_EAGLE_PLUGIN, SCH_SEXPR_PLUGIN, and SCH_LEGACY_PLUGIN.

Definition at line 173 of file sch_io_mgr.h.

173{}

Referenced by SCH_EDIT_FRAME::importFile(), and SCH_EDIT_FRAME::OpenProjectFiles().

◆ SetReporter()

virtual void SCH_PLUGIN::SetReporter ( REPORTER aReporter)
inlinevirtualinherited

Set an optional reporter for warnings/errors.

Reimplemented in SCH_ALTIUM_PLUGIN, CADSTAR_SCH_ARCHIVE_PLUGIN, and SCH_EAGLE_PLUGIN.

Definition at line 168 of file sch_io_mgr.h.

168{}

Referenced by SCH_EDIT_FRAME::importFile().

◆ SupportsSubLibraries()

bool SCH_DATABASE_PLUGIN::SupportsSubLibraries ( ) const
inlineoverridevirtual
Returns
true if this plugin supports libraries that contain sub-libraries.

Reimplemented from SCH_PLUGIN.

Definition at line 76 of file sch_database_plugin.h.

76{ return true; }

◆ SymbolLibOptions()

void SCH_PLUGIN::SymbolLibOptions ( STRING_UTF8_MAP aListToAppendTo) const
virtualinherited

Append supported SCH_PLUGIN options to aListToAppenTo along with internationalized descriptions.

Options are typically appended so that a derived SCH_PLUGIN can call its base class function by the same name first, thus inheriting options declared there. (Some base class options could pertain to all Symbol*() functions in all derived SCH_PLUGINs.) Note that since aListToAppendTo is a PROPERTIES object, all options will be unique and last guy wins.

Parameters
aListToAppendToholds a tuple of
option
This eventually is what shows up into the fp-lib-table "options" field, possibly combined with others.
internationalized description
The internationalized description is displayed in DIALOG_FP_SCH_PLUGIN_OPTIONS. It may be multi-line and be quite explanatory of the option.

In the future perhaps aListToAppendTo evolves to something capable of also holding a wxValidator for the cells in said dialog: http://forums.wxwidgets.org/viewtopic.php?t=23277&p=104180. This would require a 3 column list, and introducing wx GUI knowledge to SCH_PLUGIN, which has been avoided to date.

Definition at line 133 of file sch_plugin.cpp.

134{
135 // disable all these in another couple of months, after everyone has seen them:
136#if 1
137 (*aListToAppendTo)["debug_level"] = UTF8( _(
138 "Enable <b>debug</b> logging for Symbol*() functions in this SCH_PLUGIN."
139 ) );
140
141 (*aListToAppendTo)["read_filter_regex"] = UTF8( _(
142 "Regular expression <b>symbol name</b> filter."
143 ) );
144
145 (*aListToAppendTo)["enable_transaction_logging"] = UTF8( _(
146 "Enable transaction logging. The mere presence of this option turns on the "
147 "logging, no need to set a Value."
148 ) );
149
150 (*aListToAppendTo)["username"] = UTF8( _(
151 "User name for <b>login</b> to some special library server."
152 ) );
153
154 (*aListToAppendTo)["password"] = UTF8( _(
155 "Password for <b>login</b> to some special library server."
156 ) );
157#endif
158
159#if 1
160 // Suitable for a C++ to python SCH_PLUGIN::Footprint*() adapter, move it to the adapter
161 // if and when implemented.
162 (*aListToAppendTo)["python_symbol_plugin"] = UTF8( _(
163 "Enter the python symbol which implements the SCH_PLUGIN::Symbol*() functions."
164 ) );
165#endif
166}
An 8 bit string that is assuredly encoded in UTF8, and supplies special conversion support to and fro...
Definition: utf8.h:71

References _.

Member Data Documentation

◆ m_conn

std::unique_ptr<DATABASE_CONNECTION> SCH_DATABASE_PLUGIN::m_conn
private

◆ m_customFields

std::set<wxString> SCH_DATABASE_PLUGIN::m_customFields
private

Definition at line 112 of file sch_database_plugin.h.

Referenced by GetAvailableSymbolFields(), and loadSymbolFromRow().

◆ m_defaultShownFields

std::set<wxString> SCH_DATABASE_PLUGIN::m_defaultShownFields
private

Definition at line 114 of file sch_database_plugin.h.

Referenced by GetDefaultSymbolFields(), and loadSymbolFromRow().

◆ m_libTable

SYMBOL_LIB_TABLE* SCH_DATABASE_PLUGIN::m_libTable
private

◆ m_settings

std::unique_ptr<DATABASE_LIB_SETTINGS> SCH_DATABASE_PLUGIN::m_settings
private

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