KiCad PCB EDA Suite
|
A KiCad HTTP 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_io_http_lib.h>
Public Member Functions | |
SCH_IO_HTTP_LIB () | |
virtual | ~SCH_IO_HTTP_LIB () |
const IO_BASE::IO_FILE_DESC | GetLibraryDesc () const override |
Get the descriptor for the library container that this IO plugin operates on. | |
int | GetModifyHash () const override |
Return the modification hash from the library cache. | |
void | EnumerateSymbolLib (wxArrayString &aSymbolNameList, const wxString &aLibraryPath, const std::map< std::string, UTF8 > *aProperties=nullptr) override |
Populate a list of LIB_SYMBOL alias names contained within the library aLibraryPath. | |
void | EnumerateSymbolLib (std::vector< LIB_SYMBOL * > &aSymbolList, const wxString &aLibraryPath, const std::map< std::string, UTF8 > *aProperties=nullptr) override |
Populate a list of LIB_SYMBOL aliases contained within the library aLibraryPath. | |
LIB_SYMBOL * | LoadSymbol (const wxString &aLibraryPath, const wxString &aAliasName, const std::map< std::string, UTF8 > *aProperties=nullptr) override |
Load a LIB_SYMBOL object having aPartName from the aLibraryPath containing a library format that this SCH_IO knows about. | |
bool | SupportsSubLibraries () const override |
void | GetSubLibraryNames (std::vector< wxString > &aNames) override |
Retrieves a list of sub-libraries in this library. | |
wxString | GetSubLibraryDescription (const wxString &aName) override |
Gets a description of a sublibrary. | |
void | GetAvailableSymbolFields (std::vector< wxString > &aNames) override |
Retrieves a list of (custom) field names that are present on symbols in this library. | |
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. | |
bool | IsLibraryWritable (const wxString &aLibraryPath) override |
Return true if the library at aLibraryPath is writable. | |
void | SetLibTable (SYMBOL_LIB_TABLE *aTable) override |
Some library plugins need to have access to their parent library table. | |
HTTP_LIB_SETTINGS * | Settings () const |
void | SaveSymbol (const wxString &aLibraryPath, const LIB_SYMBOL *aSymbol, const std::map< std::string, UTF8 > *aProperties=nullptr) override |
Write aSymbol to an existing library located at aLibraryPath. | |
const wxString & | GetError () const override |
Return an error string to the caller. | |
virtual const IO_BASE::IO_FILE_DESC | GetSchematicFileDesc () const |
Returns schematic file description for the SCH_IO. | |
virtual bool | CanReadSchematicFile (const wxString &aFileName) const |
Checks if this SCH_IO can read the specified schematic file. | |
virtual void | SaveLibrary (const wxString &aFileName, const std::map< std::string, UTF8 > *aProperties=nullptr) |
virtual SCH_SHEET * | LoadSchematicFile (const wxString &aFileName, SCHEMATIC *aSchematic, SCH_SHEET *aAppendToMe=nullptr, const std::map< std::string, UTF8 > *aProperties=nullptr) |
Load information from some input file format that this SCH_IO implementation knows about, into either a new SCH_SHEET or an existing one. | |
virtual void | SaveSchematicFile (const wxString &aFileName, SCH_SHEET *aSheet, SCHEMATIC *aSchematic, const std::map< std::string, UTF8 > *aProperties=nullptr) |
Write aSchematic to a storage file in a format that this SCH_IO implementation knows about, or it can be used to write a portion of aSchematic to a special kind of export file. | |
virtual void | DeleteSymbol (const wxString &aLibraryPath, const wxString &aSymbolName, const std::map< std::string, UTF8 > *aProperties=nullptr) |
Delete the entire LIB_SYMBOL associated with aAliasName from the library aLibraryPath. | |
virtual void | GetLibraryOptions (std::map< std::string, UTF8 > *aListToAppendTo) const override |
Append supported SCH_IO options to aListToAppenTo along with internationalized descriptions. | |
const wxString & | GetName () const |
Return a brief hard coded name for this IO interface. | |
virtual void | SetReporter (REPORTER *aReporter) |
Set an optional reporter for warnings/errors. | |
virtual void | SetProgressReporter (PROGRESS_REPORTER *aReporter) |
Set an optional progress reporter. | |
virtual const IO_FILE_DESC | GetLibraryFileDesc () const |
Get the descriptor for the individual library elements that this IO plugin operates on. | |
virtual bool | CanReadLibrary (const wxString &aFileName) const |
Checks if this IO object can read the specified library file/directory. | |
virtual void | CreateLibrary (const wxString &aLibraryPath, const std::map< std::string, UTF8 > *aProperties=nullptr) |
Create a new empty library at aLibraryPath empty. | |
virtual bool | DeleteLibrary (const wxString &aLibraryPath, const std::map< std::string, UTF8 > *aProperties=nullptr) |
Delete an existing library and returns true, 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. | |
virtual void | Report (const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) |
virtual void | AdvanceProgressPhase () |
Protected Attributes | |
wxString | m_name |
Name of the IO loader. | |
REPORTER * | m_reporter |
Reporter to log errors/warnings to, may be nullptr. | |
PROGRESS_REPORTER * | m_progressReporter |
Progress reporter to track the progress of the operation, may be nullptr. | |
Private Member Functions | |
void | ensureSettings (const wxString &aSettingsPath) |
void | ensureConnection () |
void | connect () |
void | syncCache () |
void | syncCache (const HTTP_LIB_CATEGORY &category) |
LIB_SYMBOL * | loadSymbolFromPart (const wxString &aSymbolName, const HTTP_LIB_CATEGORY &aCategory, const HTTP_LIB_PART &aPart) |
Private Attributes | |
SYMBOL_LIB_TABLE * | m_libTable |
std::unique_ptr< HTTP_LIB_CONNECTION > | m_conn |
Generally will be null if no valid connection is established. | |
std::unique_ptr< HTTP_LIB_SETTINGS > | m_settings |
std::set< wxString > | m_customFields |
std::set< wxString > | m_defaultShownFields |
wxString | m_lastError |
wxString | symbol_field = "symbol" |
wxString | footprint_field = "footprint" |
wxString | description_field = "description" |
wxString | keywords_field = "keywords" |
wxString | value_field = "value" |
wxString | datasheet_field = "datasheet" |
wxString | reference_field = "reference" |
std::map< std::string, HTTP_LIB_CATEGORY > | m_cachedCategories |
A KiCad HTTP 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 38 of file sch_io_http_lib.h.
SCH_IO_HTTP_LIB::SCH_IO_HTTP_LIB | ( | ) |
Definition at line 32 of file sch_io_http_lib.cpp.
|
virtual |
Definition at line 37 of file sch_io_http_lib.cpp.
|
virtualinherited |
Definition at line 131 of file io_base.cpp.
References _, PROGRESS_REPORTER::AdvancePhase(), PROGRESS_REPORTER::KeepRefreshing(), IO_BASE::m_progressReporter, and THROW_IO_ERROR.
Referenced by EAGLE_BASE::AdvanceProgressPhase().
|
virtualinherited |
Checks if this IO object can read the specified library file/directory.
If not overriden, extension check is used.
Reimplemented in SCH_IO_ALTIUM, SCH_IO_CADSTAR_ARCHIVE, SCH_IO_EAGLE, SCH_IO_EASYEDA, SCH_IO_KICAD_LEGACY, PCB_IO_ALTIUM_DESIGNER, PCB_IO_CADSTAR_ARCHIVE, PCB_IO_EAGLE, PCB_IO_EASYEDA, PCB_IO_IPC2581, and PCB_IO_ODBPP.
Definition at line 69 of file io_base.cpp.
References IO_BASE::GetLibraryDesc(), IO_BASE::IO_FILE_DESC::m_ExtensionsInDir, IO_BASE::IO_FILE_DESC::m_FileExtensions, and IO_BASE::IO_FILE_DESC::m_IsFile.
Referenced by SCH_IO_ALTIUM::CanReadLibrary(), SCH_IO_CADSTAR_ARCHIVE::CanReadLibrary(), SCH_IO_EAGLE::CanReadLibrary(), SCH_IO_KICAD_LEGACY::CanReadLibrary(), PCB_IO_ALTIUM_DESIGNER::CanReadLibrary(), PCB_IO_CADSTAR_ARCHIVE::CanReadLibrary(), and PCB_IO_EAGLE::CanReadLibrary().
|
virtualinherited |
Checks if this SCH_IO can read the specified schematic file.
If not overriden, extension check is used.
Reimplemented in SCH_IO_ALTIUM, SCH_IO_EAGLE, SCH_IO_EASYEDA, SCH_IO_EASYEDAPRO, and SCH_IO_KICAD_LEGACY.
Definition at line 45 of file sch_io.cpp.
References SCH_IO::GetSchematicFileDesc(), and IO_BASE::IO_FILE_DESC::m_FileExtensions.
Referenced by SCH_IO_ALTIUM::CanReadSchematicFile(), SCH_IO_EAGLE::CanReadSchematicFile(), SCH_IO_EASYEDA::CanReadSchematicFile(), and SCH_IO_KICAD_LEGACY::CanReadSchematicFile().
|
private |
Definition at line 313 of file sch_io_http_lib.cpp.
References m_conn, m_lastError, and m_settings.
Referenced by ensureConnection().
|
virtualinherited |
Create a new empty library at aLibraryPath empty.
It is an error to attempt to create an existing library or to attempt to create on a "read only" location.
aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing several elements. |
aProperties | is 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 IO is known to support. The caller continues to own this object (IO may not delete it), and IOs should expect it to be optionally NULL. |
IO_ERROR | if there is a problem finding the library, or creating it. |
Reimplemented in DESIGN_BLOCK_IO, SCH_IO_KICAD_LEGACY, SCH_IO_KICAD_SEXPR, and PCB_IO_KICAD_SEXPR.
Definition at line 46 of file io_base.cpp.
References NOT_IMPLEMENTED.
|
virtualinherited |
Delete an existing library and returns true, 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.
aLibraryPath | is a locator for the "library", usually a directory or file which will contain several elements. |
aProperties | is 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. |
IO_ERROR | if there is a problem deleting an existing library. |
Reimplemented in DESIGN_BLOCK_IO, SCH_IO_KICAD_LEGACY, SCH_IO_KICAD_SEXPR, PCB_IO_GEDA, PCB_IO_KICAD_LEGACY, and PCB_IO_KICAD_SEXPR.
Definition at line 52 of file io_base.cpp.
References NOT_IMPLEMENTED.
|
virtualinherited |
Delete the entire LIB_SYMBOL associated with aAliasName from the library aLibraryPath.
aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing several symbols. |
aSymbolName | is the name of a LIB_SYMBOL associated with it's root LIB_SYMBOL object to delete from the specified library. |
aProperties | is 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. |
IO_ERROR | if there is a problem finding the alias or the library or deleting it. |
Reimplemented in SCH_IO_KICAD_LEGACY, and SCH_IO_KICAD_SEXPR.
Definition at line 116 of file sch_io.cpp.
References NOT_IMPLEMENTED.
Referenced by LIB_BUFFER::SaveBuffer().
|
private |
Definition at line 297 of file sch_io_http_lib.cpp.
References _, connect(), m_conn, m_lastError, m_settings, and THROW_IO_ERROR.
Referenced by EnumerateSymbolLib(), and LoadSymbol().
|
private |
Definition at line 215 of file sch_io_http_lib.cpp.
References _, m_settings, path, THROW_IO_ERROR, and traceHTTPLib.
Referenced by EnumerateSymbolLib(), GetSubLibraryNames(), and LoadSymbol().
|
overridevirtual |
Populate a list of LIB_SYMBOL aliases contained within the library aLibraryPath.
aSymbolList | is an array to populate with the LIB_SYMBOL pointers associated with the library. |
aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing one or more LIB_SYMBOL objects. |
aProperties | is 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. |
IO_ERROR | if the library cannot be found, the part library cannot be loaded. |
Reimplemented from SCH_IO.
Definition at line 54 of file sch_io_http_lib.cpp.
References _, ensureConnection(), ensureSettings(), LIB_SYMBOL::IsPower(), loadSymbolFromPart(), m_cachedCategories, m_conn, m_lastError, m_libTable, m_settings, SYMBOL_LIB_TABLE::PropPowerSymsOnly, syncCache(), and THROW_IO_ERROR.
|
overridevirtual |
Populate a list of LIB_SYMBOL alias names contained within the library aLibraryPath.
aSymbolNameList | is an array to populate with the LIB_SYMBOL names associated with the library. |
aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing one or more LIB_SYMBOL objects. |
aProperties | is 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. |
IO_ERROR | if the library cannot be found, the part library cannot be loaded. |
Reimplemented from SCH_IO.
Definition at line 42 of file sch_io_http_lib.cpp.
References EnumerateSymbolLib().
Referenced by EnumerateSymbolLib().
|
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.
aNames | will be filled with any custom fields present in this library. |
Reimplemented from SCH_IO.
Definition at line 201 of file sch_io_http_lib.cpp.
References m_customFields.
|
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.
aNames | will be filled with the custom field names that should be shown by default |
Reimplemented from SCH_IO.
Definition at line 208 of file sch_io_http_lib.cpp.
References m_defaultShownFields.
|
inlineoverridevirtual |
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.
Reimplemented from SCH_IO.
Definition at line 80 of file sch_io_http_lib.h.
References m_lastError.
|
inlineoverridevirtual |
Get the descriptor for the library container that this IO plugin operates on.
Implements IO_BASE.
Definition at line 44 of file sch_io_http_lib.h.
References _HKI, and FILEEXT::HTTPLibraryFileExtension.
|
inlinevirtualinherited |
Get the descriptor for the individual library elements that this IO plugin operates on.
For libraries where all the elements are in a single container (e.g. all elements in a single file), then this will return the descriptor from IO_BASE::GetLibraryDesc().
Reimplemented in PCB_IO_EASYEDA, PCB_IO_EASYEDAPRO, PCB_IO_GEDA, and PCB_IO_KICAD_SEXPR.
Definition at line 106 of file io_base.h.
Referenced by PCB_IO::CanReadFootprint().
|
overridevirtualinherited |
Append supported SCH_IO options to aListToAppenTo along with internationalized descriptions.
Options are typically appended so that a derived SCH_IO 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_IOs.) Note that since aListToAppendTo is a PROPERTIES object, all options will be unique and last guy wins.
aListToAppendTo | holds a tuple of
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_IO, which has been avoided to date. |
Reimplemented from IO_BASE.
Reimplemented in SCH_IO_CADSTAR_ARCHIVE.
Definition at line 124 of file sch_io.cpp.
References IO_BASE::GetLibraryOptions().
|
inlineoverridevirtual |
Return the modification hash from the library cache.
Implements SCH_IO.
Definition at line 50 of file sch_io_http_lib.h.
|
inlineinherited |
Return a brief hard coded name for this IO interface.
Definition at line 75 of file io_base.h.
Referenced by SCH_IO_ALTIUM::ParseLibFile().
|
virtualinherited |
Returns schematic file description for the SCH_IO.
Reimplemented in SCH_IO_ALTIUM, SCH_IO_CADSTAR_ARCHIVE, SCH_IO_EAGLE, SCH_IO_EASYEDA, SCH_IO_EASYEDAPRO, SCH_IO_KICAD_LEGACY, SCH_IO_KICAD_SEXPR, and SCH_IO_LTSPICE.
Definition at line 39 of file sch_io.cpp.
Referenced by SCH_IO::CanReadSchematicFile().
|
overridevirtual |
Gets a description of a sublibrary.
Has no effect if SupportsSubLibraries() returns false.
aName | contains the name of the sublibrary for which the description is retrieved |
Reimplemented from SCH_IO.
Definition at line 196 of file sch_io_http_lib.cpp.
References m_conn.
|
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.
aNames | will be filled with a list of sub-libraries within this symbol library |
Reimplemented from SCH_IO.
Definition at line 178 of file sch_io_http_lib.cpp.
References ensureSettings(), and m_conn.
|
inlineoverridevirtual |
Return true if the library at aLibraryPath is writable.
The system libraries are typically read only because of where they are installed..
aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing several footprints. |
IO_ERROR | if no library at aLibraryPath exists. |
Reimplemented from IO_BASE.
Definition at line 71 of file sch_io_http_lib.h.
|
virtualinherited |
Load information from some input file format that this SCH_IO 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.
aFileName | is the name of the file to use as input and may be foreign in nature or native in nature. |
aKiway | is the KIWAY object used to access the symbol libraries loaded by the project. |
aAppendToMe | is an existing SCH_SHEET to append to, but if NULL then this means "do not append, rather load anew". |
aProperties | is 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. |
IO_ERROR | if 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_IO_ALTIUM, SCH_IO_CADSTAR_ARCHIVE, SCH_IO_EAGLE, SCH_IO_EASYEDA, SCH_IO_EASYEDAPRO, SCH_IO_KICAD_LEGACY, SCH_IO_KICAD_SEXPR, and SCH_IO_LTSPICE.
Definition at line 67 of file sch_io.cpp.
References NOT_IMPLEMENTED.
|
overridevirtual |
Load a LIB_SYMBOL object having aPartName from the aLibraryPath containing a library format that this SCH_IO knows about.
aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing several symbols. |
aPartName | is the name of the LIB_SYMBOL to load. |
aProperties | is 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. |
IO_ERROR | if the library cannot be found or read. No exception is thrown in the case where aAliasName cannot be found. |
Reimplemented from SCH_IO.
Definition at line 105 of file sch_io_http_lib.cpp.
References ensureConnection(), ensureSettings(), HTTP_LIB_CATEGORY::id, loadSymbolFromPart(), m_cachedCategories, m_conn, m_lastError, m_libTable, HTTP_LIB_CATEGORY::name, syncCache(), THROW_IO_ERROR, and traceHTTPLib.
|
private |
Definition at line 366 of file sch_io_http_lib.cpp.
References LIB_SYMBOL::AddField(), datasheet_field, description_field, LIB_SYMBOL::Duplicate(), HTTP_LIB_PART::exclude_from_board, HTTP_LIB_PART::exclude_from_bom, HTTP_LIB_PART::exclude_from_sim, HTTP_LIB_PART::fields, LIB_SYMBOL::FindField(), footprint_field, LIB_SYMBOL::GetDatasheetField(), LIB_SYMBOL::GetDescriptionField(), LIB_SYMBOL::GetFootprintField(), LIB_SYMBOL::GetLibId(), LIB_SYMBOL::GetNextAvailableFieldId(), LIB_SYMBOL::GetReferenceField(), LIB_SYMBOL::GetValueField(), LIB_ID::IsValid(), keywords_field, SYMBOL_LIB_TABLE::LoadSymbol(), m_customFields, m_libTable, HTTP_LIB_CATEGORY::name, LIB_ID::Parse(), reference_field, SYMBOL::SetExcludedFromBoard(), SYMBOL::SetExcludedFromBOM(), SYMBOL::SetExcludedFromSim(), LIB_SYMBOL::SetKeyWords(), LIB_SYMBOL::SetLibId(), SCH_FIELD::SetName(), LIB_SYMBOL::SetSourceLibId(), LIB_ID::SetSubLibraryName(), SCH_FIELD::SetText(), EDA_TEXT::SetVisible(), HTTP_LIB_PART::symbolIdStr, traceHTTPLib, and value_field.
Referenced by EnumerateSymbolLib(), and LoadSymbol().
|
virtualinherited |
Definition at line 122 of file io_base.cpp.
References IO_BASE::m_reporter, and REPORTER::Report().
Referenced by SCH_IO_EAGLE::loadInstance(), SCH_IO_EAGLE::loadLibrary(), and EAGLE_BASE::Report().
|
virtualinherited |
Reimplemented in SCH_IO_KICAD_LEGACY, and SCH_IO_KICAD_SEXPR.
Definition at line 61 of file sch_io.cpp.
References NOT_IMPLEMENTED.
|
virtualinherited |
Write aSchematic to a storage file in a format that this SCH_IO implementation knows about, or it can be used to write a portion of aSchematic to a special kind of export file.
aFileName | is the name of a file to save to on disk. |
aSheet | is 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. |
aSchematic | is the SCHEMATIC object used to access any schematic-wide or project information needed to save the document. |
aProperties | is 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. |
IO_ERROR | if there is a problem saving or exporting. |
Reimplemented in SCH_IO_KICAD_LEGACY, and SCH_IO_KICAD_SEXPR.
Definition at line 74 of file sch_io.cpp.
References NOT_IMPLEMENTED.
|
overridevirtual |
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.
aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing several symbols. |
aSymbol | is what to store in the library. The library is refreshed and the caller must update any LIB_SYMBOL pointers that may have changed. |
aProperties | is 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. |
IO_ERROR | if there is a problem saving. |
Reimplemented from SCH_IO.
Definition at line 503 of file sch_io_http_lib.cpp.
|
inlineoverridevirtual |
Some library plugins need to have access to their parent library table.
aTable | is the table this plugin is registered within. |
Reimplemented from SCH_IO.
Definition at line 73 of file sch_io_http_lib.h.
References m_libTable.
|
inlinevirtualinherited |
Set an optional progress reporter.
Reimplemented in SCH_IO_CADSTAR_ARCHIVE.
Definition at line 85 of file io_base.h.
Referenced by PCB_CONTROL::AppendBoard().
|
inlinevirtualinherited |
Set an optional reporter for warnings/errors.
Reimplemented in SCH_IO_CADSTAR_ARCHIVE.
|
inline |
Definition at line 75 of file sch_io_http_lib.h.
References m_settings.
|
inlineoverridevirtual |
Reimplemented from SCH_IO.
Definition at line 61 of file sch_io_http_lib.h.
|
private |
Definition at line 333 of file sch_io_http_lib.cpp.
References m_conn, and syncCache().
Referenced by EnumerateSymbolLib(), LoadSymbol(), and syncCache().
|
private |
Definition at line 341 of file sch_io_http_lib.cpp.
References _, HTTP_LIB_CATEGORY::id, m_cachedCategories, m_conn, HTTP_LIB_CATEGORY::name, and THROW_IO_ERROR.
|
private |
Definition at line 114 of file sch_io_http_lib.h.
Referenced by loadSymbolFromPart().
|
private |
Definition at line 111 of file sch_io_http_lib.h.
Referenced by loadSymbolFromPart().
|
private |
Definition at line 110 of file sch_io_http_lib.h.
Referenced by loadSymbolFromPart().
|
private |
Definition at line 112 of file sch_io_http_lib.h.
Referenced by loadSymbolFromPart().
|
private |
Definition at line 118 of file sch_io_http_lib.h.
Referenced by EnumerateSymbolLib(), LoadSymbol(), and syncCache().
|
private |
Generally will be null if no valid connection is established.
Definition at line 99 of file sch_io_http_lib.h.
Referenced by connect(), ensureConnection(), EnumerateSymbolLib(), GetSubLibraryDescription(), GetSubLibraryNames(), LoadSymbol(), and syncCache().
|
private |
Definition at line 103 of file sch_io_http_lib.h.
Referenced by GetAvailableSymbolFields(), and loadSymbolFromPart().
|
private |
Definition at line 105 of file sch_io_http_lib.h.
Referenced by GetDefaultSymbolFields().
|
private |
Definition at line 107 of file sch_io_http_lib.h.
Referenced by connect(), ensureConnection(), EnumerateSymbolLib(), GetError(), and LoadSymbol().
|
private |
Definition at line 96 of file sch_io_http_lib.h.
Referenced by EnumerateSymbolLib(), LoadSymbol(), loadSymbolFromPart(), and SetLibTable().
|
protectedinherited |
|
protectedinherited |
Progress reporter to track the progress of the operation, may be nullptr.
Definition at line 221 of file io_base.h.
Referenced by IO_BASE::AdvanceProgressPhase(), SCH_IO_KICAD_LEGACY::checkpoint(), SCH_IO_EAGLE::ensureLoadedLibrary(), SCH_IO_CADSTAR_ARCHIVE::ensureLoadedLibrary(), PCB_IO_ODBPP::ExportODB(), PCB_IO_IPC2581::generateAvlSection(), PCB_IO_IPC2581::generateBOMSection(), PCB_IO_IPC2581::generateContentSection(), PCB_IO_IPC2581::generateEcadSection(), PCB_IO_IPC2581::generateHistorySection(), PCB_IO_ALTIUM_CIRCUIT_STUDIO::LoadBoard(), PCB_IO_ALTIUM_CIRCUIT_MAKER::LoadBoard(), PCB_IO_ALTIUM_DESIGNER::LoadBoard(), PCB_IO_SOLIDWORKS::LoadBoard(), PCB_IO_CADSTAR_ARCHIVE::LoadBoard(), PCB_IO_EASYEDA::LoadBoard(), PCB_IO_EASYEDAPRO::LoadBoard(), PCB_IO_FABMASTER::LoadBoard(), PCB_IO_KICAD_SEXPR::LoadBoard(), SCH_IO_KICAD_LEGACY::loadFile(), SCH_IO_KICAD_SEXPR::loadFile(), SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile(), SCH_IO_EAGLE::LoadSchematicFile(), SCH_IO_LTSPICE::LoadSchematicFile(), PCB_IO_IPC2581::SaveBoard(), and SCH_IO_CADSTAR_ARCHIVE::SetProgressReporter().
|
protectedinherited |
Reporter to log errors/warnings to, may be nullptr.
Definition at line 218 of file io_base.h.
Referenced by SCH_IO_ALTIUM::AddLibTextBox(), SCH_IO_CADSTAR_ARCHIVE::ensureLoadedLibrary(), PCB_IO_ALTIUM_DESIGNER::FootprintLoad(), PCB_IO_ALTIUM_CIRCUIT_STUDIO::LoadBoard(), PCB_IO_ALTIUM_CIRCUIT_MAKER::LoadBoard(), PCB_IO_ALTIUM_DESIGNER::LoadBoard(), PCB_IO_SOLIDWORKS::LoadBoard(), SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile(), SCH_IO_LTSPICE::LoadSchematicFile(), SCH_IO_ALTIUM::ParseAltiumSch(), SCH_IO_ALTIUM::ParseArc(), SCH_IO_ALTIUM::ParseBezier(), SCH_IO_ALTIUM::ParseCircle(), SCH_IO_ALTIUM::ParseComponent(), SCH_IO_ALTIUM::ParseDesignator(), SCH_IO_ALTIUM::ParseEllipse(), SCH_IO_ALTIUM::ParseEllipticalArc(), SCH_IO_ALTIUM::ParseFileName(), SCH_IO_ALTIUM::ParseHarnessConnector(), SCH_IO_ALTIUM::ParseHarnessEntry(), SCH_IO_ALTIUM::ParseHarnessPort(), SCH_IO_ALTIUM::ParseHarnessType(), SCH_IO_ALTIUM::ParseImage(), SCH_IO_ALTIUM::ParseImplementation(), SCH_IO_ALTIUM::ParseLabel(), SCH_IO_ALTIUM::ParseLibFile(), SCH_IO_ALTIUM::ParseLine(), SCH_IO_ALTIUM::ParsePieChart(), SCH_IO_ALTIUM::ParsePin(), SCH_IO_ALTIUM::ParsePolygon(), SCH_IO_ALTIUM::ParsePolyline(), SCH_IO_ALTIUM::ParsePort(), SCH_IO_ALTIUM::ParsePowerPort(), SCH_IO_ALTIUM::ParseRecord(), SCH_IO_ALTIUM::ParseRectangle(), SCH_IO_ALTIUM::ParseRoundRectangle(), SCH_IO_ALTIUM::ParseSheetEntry(), SCH_IO_ALTIUM::ParseSheetName(), SCH_IO_ALTIUM::ParseSignalHarness(), SCH_IO_ALTIUM::ParseStorage(), PCB_IO_ALTIUM_DESIGNER::PCB_IO_ALTIUM_DESIGNER(), PCB_IO_SOLIDWORKS::PCB_IO_SOLIDWORKS(), IO_BASE::Report(), SCH_IO_ALTIUM::SCH_IO_ALTIUM(), SCH_IO_CADSTAR_ARCHIVE::SCH_IO_CADSTAR_ARCHIVE(), SCH_IO_EAGLE::SCH_IO_EAGLE(), SCH_IO_EASYEDA::SCH_IO_EASYEDA(), SCH_IO_EASYEDAPRO::SCH_IO_EASYEDAPRO(), SCH_IO_LTSPICE::SCH_IO_LTSPICE(), and SCH_IO_CADSTAR_ARCHIVE::SetReporter().
|
private |
Definition at line 101 of file sch_io_http_lib.h.
Referenced by connect(), ensureConnection(), ensureSettings(), EnumerateSymbolLib(), and Settings().
|
private |
Definition at line 115 of file sch_io_http_lib.h.
Referenced by loadSymbolFromPart().
|
private |
Definition at line 109 of file sch_io_http_lib.h.
|
private |
Definition at line 113 of file sch_io_http_lib.h.
Referenced by loadSymbolFromPart().