|
KiCad PCB EDA Suite
|
#include <pcb_io_cadstar_archive.h>
Public Member Functions | |
| const IO_BASE::IO_FILE_DESC | GetBoardFileDesc () const override |
| Returns board file description for the PCB_IO. | |
| const IO_BASE::IO_FILE_DESC | GetLibraryDesc () const override |
| Get the descriptor for the library container that this IO plugin operates on. | |
| bool | CanReadBoard (const wxString &aFileName) const override |
| Checks if this PCB_IO can read the specified board file. | |
| bool | CanReadLibrary (const wxString &aFileName) const override |
| Checks if this IO object can read the specified library file/directory. | |
| bool | CanReadFootprint (const wxString &aFileName) const override |
| Checks if this PCB_IO can read a footprint from specified file or directory. | |
| std::vector< FOOTPRINT * > | GetImportedCachedLibraryFootprints () override |
| Return a container with the cached library footprints generated in the last call to Load. | |
| void | RegisterCallback (LAYER_MAPPING_HANDLER aLayerMappingHandler) override |
| Register a different handler to be called when mapping of Cadstar to KiCad layers occurs. | |
| void | FootprintEnumerate (wxArrayString &aFootprintNames, const wxString &aLibraryPath, bool aBestEfforts, const std::map< std::string, UTF8 > *aProperties=nullptr) override |
| Return a list of footprint names contained within the library at aLibraryPath. | |
| bool | FootprintExists (const wxString &aLibraryPath, const wxString &aFootprintName, const std::map< std::string, UTF8 > *aProperties=nullptr) override |
| Check for the existence of a footprint. | |
| std::unique_ptr< FOOTPRINT > | FootprintLoad (const wxString &aLibraryPath, const wxString &aFootprintName, bool aKeepUUID=false, const std::map< std::string, UTF8 > *aProperties=nullptr) override |
| Load a footprint having aFootprintName from the aLibraryPath containing a library format that this PCB_IO knows about. | |
| long long | GetLibraryTimestamp (const wxString &aLibraryPath) const override |
| Generate a timestamp representing all the files in the library (including the library directory). | |
| bool | IsLibraryWritable (const wxString &aLibraryPath) override |
| CADSTAR Plugin is read-only. | |
| PCB_IO_CADSTAR_ARCHIVE () | |
| ~PCB_IO_CADSTAR_ARCHIVE () | |
| bool | IsPCB_IO () const override |
| Work-around for lack of dynamic_cast across compile units on Mac. | |
| virtual void | SetQueryUserCallback (std::function< bool(wxString aTitle, int aIcon, wxString aMessage, wxString aAction)> aCallback) |
| Registers a KIDIALOG callback for collecting info from the user. | |
| std::unique_ptr< BOARD > | LoadBoard (const wxString &aFileName, const std::map< std::string, UTF8 > *aProperties=nullptr, PROJECT *aProject=nullptr) |
| Load information from some input file format that this PCB_IO implementation knows about into new BOARD. | |
| void | LoadAndAppendBoard (const wxString &aFileName, BOARD &aAppendToMe, const std::map< std::string, UTF8 > *aProperties=nullptr, PROJECT *aProject=nullptr) |
| Same as LoadBoard(), but appends the loaded board to an existing board, which must already exist. | |
| virtual void | SaveBoard (const wxString &aFileName, BOARD &aBoard, const std::map< std::string, UTF8 > *aProperties=nullptr) |
| Write aBoard to a storage file in a format that this PCB_IO implementation knows about or it can be used to write a portion of aBoard to a special kind of export file. | |
| virtual std::unique_ptr< FOOTPRINT > | ImportFootprint (const wxString &aFootprintPath, wxString &aFootprintNameOut, const std::map< std::string, UTF8 > *aProperties=nullptr) |
| Load a single footprint from aFootprintPath and put its name in aFootprintNameOut. | |
| virtual const FOOTPRINT * | GetEnumeratedFootprint (const wxString &aLibraryPath, const wxString &aFootprintName, const std::map< std::string, UTF8 > *aProperties=nullptr) |
| A version of FootprintLoad() for use after FootprintEnumerate() for more efficient cache management in plugins that support it. | |
| virtual bool | CachesEnumeratedFootprints () const |
| Return true if GetEnumeratedFootprint() returns a borrowed pointer from an internal cache. | |
| virtual void | FootprintSave (const wxString &aLibraryPath, const FOOTPRINT *aFootprint, const std::map< std::string, UTF8 > *aProperties=nullptr) |
| Write aFootprint to an existing library located at aLibraryPath. | |
| virtual void | FootprintDelete (const wxString &aLibraryPath, const wxString &aFootprintName, const std::map< std::string, UTF8 > *aProperties=nullptr) |
| Delete aFootprintName from the library at aLibraryPath. | |
| virtual void | ClearCachedFootprints (const wxString &aLibraryPath) |
| Clear any cached footprint data for the given library path. | |
| virtual void | GetLibraryOptions (std::map< std::string, UTF8 > *aListToAppendTo) const override |
| Append supported PLUGIN 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 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 bool | SupportsConfigurationDialog () const |
| virtual DIALOG_SHIM * | CreateConfigurationDialog (wxWindow *aParent) |
| virtual void | Report (const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) const |
| virtual void | AdvanceProgressPhase () |
Static Public Member Functions | |
| static std::map< wxString, PCB_LAYER_ID > | DefaultLayerMappingCallback (const std::vector< INPUT_LAYER_DESC > &aInputLayerDescriptionVector) |
| Return the automapped layers. | |
Protected Member Functions | |
| void | loadBoard (const wxString &aFileName, BOARD &aBoard, bool aIsNewLoad, const std::map< std::string, UTF8 > *aProperties=nullptr, PROJECT *aProject=nullptr) override |
| Parse aFileName into aBoard. | |
Protected Attributes | |
| BOARD * | m_board |
| The board BOARD being worked on, no ownership here. | |
| const std::map< std::string, UTF8 > * | m_props |
| Properties passed via Save() or Load(), no ownership, may be NULL. | |
| 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. | |
| LAYER_MAPPING_HANDLER | m_layer_mapping_handler |
| Callback to get layer mapping. | |
Private Types | |
| typedef std::map< const wxString, std::unique_ptr< FOOTPRINT > > | NAME_TO_FOOTPRINT_MAP |
Private Member Functions | |
| void | clearLoadedFootprints () |
| void | ensureLoadedLibrary (const wxString &aLibraryPath) |
| bool | checkBoardHeader (const wxString &aFileName) const |
Private Attributes | |
| std::map< wxString, NAME_TO_FOOTPRINT_MAP > | m_cache |
| std::map< wxString, long long > | m_timestamps |
| std::vector< FOOTPRINT * > | m_loaded_footprints |
| bool | m_show_layer_mapping_warnings |
Definition at line 32 of file pcb_io_cadstar_archive.h.
|
private |
Definition at line 95 of file pcb_io_cadstar_archive.h.
| PCB_IO_CADSTAR_ARCHIVE::PCB_IO_CADSTAR_ARCHIVE | ( | ) |
Definition at line 58 of file pcb_io_cadstar_archive.cpp.
References DefaultLayerMappingCallback(), m_show_layer_mapping_warnings, PCB_IO::PCB_IO(), and LAYER_MAPPABLE_PLUGIN::RegisterCallback().
| PCB_IO_CADSTAR_ARCHIVE::~PCB_IO_CADSTAR_ARCHIVE | ( | ) |
Definition at line 65 of file pcb_io_cadstar_archive.cpp.
References clearLoadedFootprints().
|
virtualinherited |
Definition at line 133 of file io_base.cpp.
References m_progressReporter, and THROW_IO_CANCELLED.
|
inlinevirtualinherited |
Return true if GetEnumeratedFootprint() returns a borrowed pointer from an internal cache.
When true, the caller must NOT delete the returned pointer. When false (the default), GetEnumeratedFootprint() allocates a new FOOTPRINT and the caller owns the memory.
Reimplemented in PCB_IO_KICAD_SEXPR.
|
overridevirtual |
Checks if this PCB_IO can read the specified board file.
If not overriden, extension check is used.
Reimplemented from PCB_IO.
Definition at line 153 of file pcb_io_cadstar_archive.cpp.
References PCB_IO::CanReadBoard(), and checkBoardHeader().
|
overridevirtual |
Checks if this PCB_IO can read a footprint from specified file or directory.
If not overriden, extension check is used.
Reimplemented from PCB_IO.
Definition at line 171 of file pcb_io_cadstar_archive.cpp.
References PCB_IO::CanReadFootprint(), and checkBoardHeader().
|
overridevirtual |
Checks if this IO object can read the specified library file/directory.
If not overridden, extension check is used.
Reimplemented from IO_BASE.
Definition at line 162 of file pcb_io_cadstar_archive.cpp.
References IO_BASE::CanReadLibrary(), and checkBoardHeader().
|
private |
Definition at line 147 of file pcb_io_cadstar_archive.cpp.
References IO_UTILS::fileStartsWithPrefix().
Referenced by CanReadBoard(), CanReadFootprint(), and CanReadLibrary().
|
inlinevirtualinherited |
Clear any cached footprint data for the given library path.
This is used to free memory after footprints have been loaded into another cache. The default implementation does nothing; plugins with caches should override.
| aLibraryPath | is the path of the library whose cache should be cleared. |
Reimplemented in PCB_IO_KICAD_SEXPR.
|
private |
Definition at line 71 of file pcb_io_cadstar_archive.cpp.
References m_loaded_footprints.
Referenced by loadBoard(), and ~PCB_IO_CADSTAR_ARCHIVE().
|
inlinevirtualinherited |
Reimplemented in SCH_IO_DATABASE.
|
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, PCB_IO_KICAD_SEXPR, SCH_IO_KICAD_LEGACY, and SCH_IO_KICAD_SEXPR.
Definition at line 46 of file io_base.cpp.
References NOT_IMPLEMENTED.
Referenced by LIBRARY_MANAGER_ADAPTER::CreateLibrary().
|
static |
Return the automapped layers.
Pcbnew PLUGIN for CADSTAR PCB Archive (*.cpa) format: an ASCII format based on S-expressions.
| aInputLayerDescriptionVector |
Definition at line 36 of file pcb_io_cadstar_archive.cpp.
Referenced by PCB_IO_CADSTAR_ARCHIVE().
|
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, PCB_IO_GEDA, PCB_IO_KICAD_LEGACY, PCB_IO_KICAD_SEXPR, SCH_IO_KICAD_LEGACY, and SCH_IO_KICAD_SEXPR.
Definition at line 53 of file io_base.cpp.
References NOT_IMPLEMENTED.
Referenced by LIBRARY_MANAGER_ADAPTER::DeleteLibrary().
|
private |
Definition at line 242 of file pcb_io_cadstar_archive.cpp.
References GetLibraryTimestamp(), CADSTAR_PCB_ARCHIVE_LOADER::LoadFpLibrary(), m_cache, LAYER_MAPPABLE_PLUGIN::m_layer_mapping_handler, IO_BASE::m_reporter, and m_timestamps.
Referenced by FootprintEnumerate(), FootprintExists(), and FootprintLoad().
|
virtualinherited |
Delete aFootprintName from the library at aLibraryPath.
| aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing several footprints. |
| aFootprintName | is the name of a footprint 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 footprint or the library, or deleting it. |
Reimplemented in PCB_IO_GEDA, and PCB_IO_KICAD_SEXPR.
Definition at line 177 of file pcb_io.cpp.
References NOT_IMPLEMENTED.
Referenced by FOOTPRINT_LIBRARY_ADAPTER::DeleteFootprint().
|
overridevirtual |
Return a list of footprint names contained within the library at aLibraryPath.
| aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing several footprints. |
| 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. |
| aFootprintNames | is the array of available footprint names inside a library. |
| aBestEfforts | if true, don't throw on errors, just return an empty list. |
| IO_ERROR | if the library cannot be found, or footprint cannot be loaded. |
Reimplemented from PCB_IO.
Definition at line 180 of file pcb_io_cadstar_archive.cpp.
References ensureLoadedLibrary(), m_cache, and name.
|
overridevirtual |
Check for the existence of a footprint.
Reimplemented from PCB_IO.
Definition at line 195 of file pcb_io_cadstar_archive.cpp.
References ensureLoadedLibrary(), and m_cache.
|
overridevirtual |
Load a footprint having aFootprintName from the aLibraryPath containing a library format that this PCB_IO knows about.
| aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing several footprints. |
| aFootprintName | is the name of the footprint 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. |
| aKeepUUID | = true to keep initial items UUID, false to set new UUID normally true if loaded in the footprint editor, false if loaded in the board editor. Make sense only in kicad_plugin |
| IO_ERROR | if the library cannot be found or read. No exception is thrown in the case where aFootprintName cannot be found. |
Reimplemented from PCB_IO.
Definition at line 211 of file pcb_io_cadstar_archive.cpp.
References ensureLoadedLibrary(), IGNORE_PARENT_GROUP, and m_cache.
|
virtualinherited |
Write aFootprint to an existing library located at aLibraryPath.
If a footprint by the same name already exists, it is replaced.
| aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing several footprints. |
| aFootprint | is what to store in the library. The caller continues to own the footprint after this call. |
| aProperties | is an associative array that can be used to tell the saver how to save the footprint, 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 in PCB_IO_KICAD_SEXPR.
Definition at line 169 of file pcb_io.cpp.
References NOT_IMPLEMENTED.
Referenced by FOOTPRINT_LIBRARY_ADAPTER::SaveFootprint().
|
inlineoverridevirtual |
Returns board file description for the PCB_IO.
Reimplemented from PCB_IO.
Definition at line 35 of file pcb_io_cadstar_archive.h.
References _HKI.
Referenced by GetLibraryDesc().
|
virtualinherited |
A version of FootprintLoad() for use after FootprintEnumerate() for more efficient cache management in plugins that support it.
Whether the returned pointer is borrowed or owned by the caller depends on the plugin. Use CachesEnumeratedFootprints() to determine.
Reimplemented in PCB_IO_KICAD_SEXPR.
Definition at line 144 of file pcb_io.cpp.
References FootprintLoad().
|
overridevirtual |
Return a container with the cached library footprints generated in the last call to Load.
This function is intended to be used ONLY by the non-KiCad board importers for the purpose of obtaining the footprint library of the design and creating a project-specific library.
Reimplemented from PCB_IO.
Definition at line 82 of file pcb_io_cadstar_archive.cpp.
References m_loaded_footprints.
|
inlineoverridevirtual |
Get the descriptor for the library container that this IO plugin operates on.
Implements IO_BASE.
Definition at line 40 of file pcb_io_cadstar_archive.h.
References GetBoardFileDesc().
|
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, PCB_IO_KICAD_SEXPR, and PCB_IO_SPRINT_LAYOUT.
Definition at line 117 of file io_base.h.
References GetLibraryDesc().
Referenced by PCB_IO::CanReadFootprint().
|
overridevirtualinherited |
Append supported PLUGIN options to aListToAppenTo along with internationalized descriptions.
Options are typically appended so that a derived #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 Footprint*() functions in all derived PLUGINs.
| 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 PLUGIN, which has been avoided to date. |
Reimplemented from IO_BASE.
Definition at line 185 of file pcb_io.cpp.
References _, and IO_BASE::GetLibraryOptions().
|
overridevirtual |
Generate a timestamp representing all the files in the library (including the library directory).
Timestamps should not be considered ordered, they either match or they don't.
Implements PCB_IO.
Definition at line 231 of file pcb_io_cadstar_archive.cpp.
Referenced by ensureLoadedLibrary().
|
inlineinherited |
Return a brief hard coded name for this IO interface.
Definition at line 79 of file io_base.h.
References m_name.
Referenced by SCH_IO_EASYEDAPRO_V3::EnumerateSymbolLib(), SCH_IO_EASYEDAPRO_V3::LoadSymbol(), SCH_IO_ALTIUM::ParseAltiumSch(), and SCH_IO_ALTIUM::ParseLibFile().
|
virtualinherited |
Load a single footprint from aFootprintPath and put its name in aFootprintNameOut.
If this is a footprint library, the first footprint should be loaded. The default implementation uses FootprintEnumerate and FootprintLoad to load first footprint.
| aLibraryPath | is a path of the footprint file. |
| aFootprintNameOut | is the name output of the loaded footprint. |
| 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 footprint cannot be found or read. |
Reimplemented in PCB_IO_GEDA, and PCB_IO_KICAD_SEXPR.
Definition at line 120 of file pcb_io.cpp.
References _, FootprintEnumerate(), FootprintLoad(), IO_BASE::Report(), and RPT_SEVERITY_WARNING.
|
inlineoverridevirtual |
CADSTAR Plugin is read-only.
Reimplemented from IO_BASE.
Definition at line 82 of file pcb_io_cadstar_archive.h.
|
inlineoverridevirtualinherited |
|
inherited |
Same as LoadBoard(), but appends the loaded board to an existing board, which must already exist.
| aAppendToMe | is the existing board to append to. The caller always owns it. |
Definition at line 85 of file pcb_io.cpp.
References loadBoard().
Referenced by PCB_CONTROL::AppendBoard(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inherited |
Load information from some input file format that this PCB_IO implementation knows about into new BOARD.
| aFileName | is the name of the file to use as input and may be foreign in nature or native in nature. |
| 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. |
| aProject | is the optional PROJECT object primarily used by third party importers. |
| 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. |
| IO_CANCELLED | if the user cancelled the load. |
Definition at line 72 of file pcb_io.cpp.
References loadBoard().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), CachedLoad(), checkAllCopperFillZonesHaveClearance(), checkImportedOriginOffset(), PNS_LOG_FILE::Load(), LoadAndVerify(), EAGLE_BINARY_IMPORT_FIXTURE::loadBoard(), and KI_TEST::LoadBoardWithCapture().
|
overrideprotectedvirtual |
Parse aFileName into aBoard.
The caller owns aBoard in both cases.
| aIsNewLoad | is true for a fresh load (adopt the file's setup, keep the file's UUIDs) and false when merging into an existing board (preserve its setup, regenerate UUIDs that would clash). |
Reimplemented from PCB_IO.
Definition at line 95 of file pcb_io_cadstar_archive.cpp.
References UTF8::c_str(), clearLoadedFootprints(), UTF8::empty(), BOX2< Vec >::GetHeight(), LOAD_INFO_REPORTER::GetInstance(), CADSTAR_PCB_ARCHIVE_LOADER::GetLoadedLibraryFootpints(), BOX2< Vec >::GetWidth(), BOX2< Vec >::GetX(), BOX2< Vec >::GetY(), CADSTAR_PCB_ARCHIVE_LOADER::Load(), PCB_IO::m_board, LAYER_MAPPABLE_PLUGIN::m_layer_mapping_handler, m_loaded_footprints, IO_BASE::m_progressReporter, PCB_IO::m_props, IO_BASE::m_reporter, and m_show_layer_mapping_warnings.
|
overridevirtual |
Register a different handler to be called when mapping of Cadstar to KiCad layers occurs.
| aLayerMappingHandler |
Reimplemented from LAYER_MAPPABLE_PLUGIN.
Definition at line 51 of file pcb_io_cadstar_archive.cpp.
References m_show_layer_mapping_warnings, and LAYER_MAPPABLE_PLUGIN::RegisterCallback().
|
virtualinherited |
Definition at line 124 of file io_base.cpp.
References m_reporter.
Referenced by PCB_IO_IPC2581::addShape(), SCH_IO_EASYEDAPRO_V3::EnumerateSymbolLib(), PCB_IO_ODBPP::ExportODB(), PCB_IO_IPC2581::generateBOMSection(), PCB_IO_IPC2581::generateComponents(), PCB_IO_IPC2581::generateLayerSetDrill(), PCB_IO_IPC2581::generateLayerSetNet(), PCB_IO_IPC2581::generateProfile(), PCB_IO::ImportFootprint(), PCB_IO_DIPTRACE::loadBoard(), PCB_IO_EASYEDAPRO_V3::loadBoard(), SCH_IO_EAGLE::loadInstance(), SCH_IO_EAGLE::loadLibrary(), PCB_IO_KICAD_LEGACY::loadPAD(), PCB_IO_EAGLE::loadPolygon(), SCH_IO_EASYEDAPRO_V3::LoadSchematicFile(), SCH_IO_DATABASE::loadSymbolFromRow(), PCB_IO_KICAD_LEGACY::loadZONE_CONTAINER(), PCB_IO_EAGLE::packageCircle(), PCB_IO_EAGLE::packagePad(), PCB_IO_EAGLE::packagePolygon(), PCB_IO_EAGLE::packageRectangle(), PCB_IO_EAGLE::packageText(), and PCB_IO_EAGLE::packageWire().
|
virtualinherited |
Write aBoard to a storage file in a format that this PCB_IO implementation knows about or it can be used to write a portion of aBoard to a special kind of export file.
| aFileName | is the name of a file to save to on disk. |
| aBoard | is the class BOARD in memory document tree from which to extract information when writing to aFileName. The caller continues to own the BOARD, and the plugin should refrain from modifying the BOARD if possible. |
| 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. |
| IO_ERROR | if there is a problem saving or exporting. |
Reimplemented in CLIPBOARD_IO, PCB_IO_IPC2581, PCB_IO_KICAD_SEXPR, and PCB_IO_ODBPP.
Definition at line 105 of file pcb_io.cpp.
References NOT_IMPLEMENTED.
|
inlinevirtualinherited |
Set an optional progress reporter.
Reimplemented in SCH_IO_CADSTAR_ARCHIVE.
Definition at line 94 of file io_base.h.
References m_progressReporter.
Referenced by PCB_CONTROL::AppendBoard().
|
inlinevirtualinherited |
Registers a KIDIALOG callback for collecting info from the user.
Definition at line 106 of file pcb_io.h.
Referenced by PCB_CONTROL::AppendBoard().
|
inlinevirtualinherited |
Set an optional reporter for warnings/errors.
Reimplemented in SCH_IO_CADSTAR_ARCHIVE.
Definition at line 89 of file io_base.h.
References m_reporter.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), KI_TEST::LoadBoardWithCapture(), SCH_IO_GEDA::loadDeferredSheets(), and SCH_IO_GEDA::LoadSchematicFile().
|
inlinevirtualinherited |
Reimplemented in SCH_IO_DATABASE.
|
protectedinherited |
The board BOARD being worked on, no ownership here.
Definition at line 368 of file pcb_io.h.
Referenced by PCB_IO_AUTOTRAX::addItem(), PCB_IO_AUTOTRAX::buildBoard(), PCB_IO_AUTOTRAX::buildComponent(), PCB_IO_EAGLE::centerBoard(), PCB_IO_AUTOTRAX::emitFill(), PCB_IO_AUTOTRAX::emitPad(), PCB_IO_AUTOTRAX::emitTrack(), PCB_IO_AUTOTRAX::emitVia(), PCB_IO_ALTIUM_DESIGNER::FootprintLoad(), PCB_IO_KICAD_SEXPR::format(), PCB_IO_KICAD_SEXPR::formatBoardLayers(), PCB_IO_KICAD_SEXPR::FormatBoardToFormatter(), PCB_IO_KICAD_SEXPR::formatLayers(), PCB_IO_ALTIUM_DESIGNER::GetImportedCachedLibraryFootprints(), PCB_IO_AUTOTRAX::getNet(), PCB_IO_EAGLE::init(), PCB_IO_KICAD_LEGACY::init(), PCB_IO_KICAD_SEXPR::init(), PCB_IO_KICAD_LEGACY::loadAllSections(), PCB_IO_ALLEGRO::loadBoard(), PCB_IO_ALTIUM_CIRCUIT_MAKER::loadBoard(), PCB_IO_ALTIUM_CIRCUIT_STUDIO::loadBoard(), PCB_IO_ALTIUM_DESIGNER::loadBoard(), PCB_IO_AUTOTRAX::loadBoard(), PCB_IO_CADSTAR_ARCHIVE::loadBoard(), PCB_IO_DIPTRACE::loadBoard(), PCB_IO_EAGLE::loadBoard(), PCB_IO_EASYEDA::loadBoard(), PCB_IO_EASYEDAPRO::loadBoard(), PCB_IO_EASYEDAPRO_V3::loadBoard(), PCB_IO_FABMASTER::loadBoard(), PCB_IO_GEDA::loadBoard(), PCB_IO_KICAD_LEGACY::loadBoard(), PCB_IO_PCAD::loadBoard(), PCB_IO_SOLIDWORKS::loadBoard(), PCB_IO_EAGLE::loadClasses(), PCB_IO_KICAD_LEGACY::loadDIMENSION(), PCB_IO_EAGLE::loadElements(), PCB_IO_KICAD_LEGACY::loadGENERAL(), PCB_IO_EAGLE::loadLayerDefs(), PCB_IO_KICAD_LEGACY::loadNETCLASS(), PCB_IO_KICAD_LEGACY::loadNETINFO_ITEM(), PCB_IO_KICAD_LEGACY::loadPAD(), PCB_IO_KICAD_LEGACY::loadPCB_LINE(), PCB_IO_KICAD_LEGACY::loadPCB_TARGET(), PCB_IO_KICAD_LEGACY::loadPCB_TEXT(), PCB_IO_EAGLE::loadPlain(), PCB_IO_EAGLE::loadPolygon(), PCB_IO_KICAD_LEGACY::loadSETUP(), PCB_IO_KICAD_LEGACY::loadSHEET(), PCB_IO_EAGLE::loadSignals(), PCB_IO_KICAD_LEGACY::loadTrackList(), PCB_IO_KICAD_LEGACY::loadZONE_CONTAINER(), PCB_IO_EAGLE::makeFootprint(), PCB_IO_EAGLE::packagePad(), PCB_IO_AUTOTRAX::parentOf(), PCB_IO_GEDA::parseElement(), PCB_IO_GEDA::parseLayer(), PCB_IO_GEDA::parseNetList(), PCB_IO_GEDA::parseVia(), PCB_IO(), CLIPBOARD_IO::SaveBoard(), CLIPBOARD_IO::SaveSelection(), and CLIPBOARD_IO::SetBoard().
|
private |
Definition at line 97 of file pcb_io_cadstar_archive.h.
Referenced by ensureLoadedLibrary(), FootprintEnumerate(), FootprintExists(), and FootprintLoad().
|
protectedinherited |
Callback to get layer mapping.
Definition at line 81 of file plugin_common_layer_mapping.h.
Referenced by PCB_IO_KICAD_SEXPR::DoLoad(), PCB_IO_CADSTAR_ARCHIVE::ensureLoadedLibrary(), PCB_IO_ALTIUM_DESIGNER::FootprintLoad(), PCB_IO_ALTIUM_CIRCUIT_MAKER::loadBoard(), PCB_IO_ALTIUM_CIRCUIT_STUDIO::loadBoard(), PCB_IO_ALTIUM_DESIGNER::loadBoard(), PCB_IO_CADSTAR_ARCHIVE::loadBoard(), PCB_IO_SOLIDWORKS::loadBoard(), PCB_IO_ALLEGRO::LoadBoardFromData(), PCB_IO_PADS::loadBoardSetup(), PCB_IO_PADS_BINARY::loadBoardSetup(), PCB_IO_EAGLE::mapEagleLayersToKicad(), and RegisterCallback().
|
private |
Definition at line 100 of file pcb_io_cadstar_archive.h.
Referenced by clearLoadedFootprints(), GetImportedCachedLibraryFootprints(), and loadBoard().
|
protectedinherited |
Name of the IO loader.
Definition at line 235 of file io_base.h.
Referenced by PCB_IO_IPC2581::generateBOMSection(), GetName(), and IO_BASE().
|
protectedinherited |
Progress reporter to track the progress of the operation, may be nullptr.
Definition at line 241 of file io_base.h.
Referenced by AdvanceProgressPhase(), SCH_IO_KICAD_LEGACY::checkpoint(), SCH_IO_CADSTAR_ARCHIVE::ensureLoadedLibrary(), SCH_IO_EAGLE::ensureLoadedLibrary(), PCB_IO_ODBPP::ExportODB(), PCB_IO_IPC2581::generateComponents(), PCB_IO_IPC2581::generatePhyNetGroup(), IO_BASE(), PCB_IO_ALTIUM_CIRCUIT_MAKER::loadBoard(), PCB_IO_ALTIUM_CIRCUIT_STUDIO::loadBoard(), PCB_IO_ALTIUM_DESIGNER::loadBoard(), PCB_IO_CADSTAR_ARCHIVE::loadBoard(), PCB_IO_DIPTRACE::loadBoard(), PCB_IO_EASYEDA::loadBoard(), PCB_IO_EASYEDAPRO::loadBoard(), PCB_IO_EASYEDAPRO_V3::loadBoard(), PCB_IO_FABMASTER::loadBoard(), PCB_IO_KICAD_SEXPR::loadBoard(), PCB_IO_PADS::loadBoard(), PCB_IO_PADS_BINARY::loadBoard(), PCB_IO_SOLIDWORKS::loadBoard(), PCB_IO_ALLEGRO::LoadBoardFromData(), SCH_IO_KICAD_LEGACY::loadFile(), SCH_IO_KICAD_SEXPR::loadFile(), SCH_IO_ORCAD::loadOlbSymbols(), SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile(), SCH_IO_DIPTRACE::LoadSchematicFile(), SCH_IO_EAGLE::LoadSchematicFile(), SCH_IO_LTSPICE::LoadSchematicFile(), SCH_IO_ORCAD::LoadSchematicFile(), SCH_IO_PADS::LoadSchematicFile(), SCH_IO_ALTIUM::ParseAltiumSch(), PCB_IO_IPC2581::reportPhase(), PCB_IO_IPC2581::SaveBoard(), SetProgressReporter(), SCH_IO_CADSTAR_ARCHIVE::SetProgressReporter(), and PCB_IO_IPC2581::tickProgress().
|
protectedinherited |
Properties passed via Save() or Load(), no ownership, may be NULL.
Definition at line 371 of file pcb_io.h.
Referenced by PCB_IO_EAGLE::centerBoard(), PCB_IO_EAGLE::init(), PCB_IO_GEDA::init(), PCB_IO_KICAD_LEGACY::init(), PCB_IO_KICAD_SEXPR::init(), PCB_IO_ALLEGRO::loadBoard(), PCB_IO_ALTIUM_CIRCUIT_MAKER::loadBoard(), PCB_IO_ALTIUM_CIRCUIT_STUDIO::loadBoard(), PCB_IO_ALTIUM_DESIGNER::loadBoard(), PCB_IO_AUTOTRAX::loadBoard(), PCB_IO_CADSTAR_ARCHIVE::loadBoard(), PCB_IO_DIPTRACE::loadBoard(), PCB_IO_EASYEDA::loadBoard(), PCB_IO_EASYEDAPRO::loadBoard(), PCB_IO_EASYEDAPRO_V3::loadBoard(), PCB_IO_FABMASTER::loadBoard(), PCB_IO_PCAD::loadBoard(), PCB_IO_SOLIDWORKS::loadBoard(), PCB_IO_SPRINT_LAYOUT::loadBoard(), and PCB_IO().
|
protectedinherited |
Reporter to log errors/warnings to, may be nullptr.
Definition at line 238 of file io_base.h.
Referenced by PCB_IO_CADSTAR_ARCHIVE::ensureLoadedLibrary(), SCH_IO_CADSTAR_ARCHIVE::ensureLoadedLibrary(), SCH_IO_GEDA::flushPendingComponent(), PCB_IO_ALTIUM_DESIGNER::FootprintLoad(), SCH_IO_GEDA::getOrLoadSymbol(), SCH_IO_GEDA::importHierarchicalSheet(), IO_BASE(), SCH_IO_PADS::loadBinarySchematicFile(), PCB_IO_ALTIUM_CIRCUIT_MAKER::loadBoard(), PCB_IO_ALTIUM_CIRCUIT_STUDIO::loadBoard(), PCB_IO_ALTIUM_DESIGNER::loadBoard(), PCB_IO_AUTOTRAX::loadBoard(), PCB_IO_CADSTAR_ARCHIVE::loadBoard(), PCB_IO_FABMASTER::loadBoard(), PCB_IO_PADS::loadBoard(), PCB_IO_PADS_BINARY::loadBoard(), PCB_IO_PCAD::loadBoard(), PCB_IO_SOLIDWORKS::loadBoard(), PCB_IO_ALLEGRO::LoadBoardFromData(), PCB_IO_PADS::loadCopperShapes(), PCB_IO_PADS_BINARY::loadCopperShapes(), SCH_IO_GEDA::loadDeferredSheets(), PCB_IO_PADS::loadFootprints(), PCB_IO_PADS_BINARY::loadFootprints(), SCH_IO_ORCAD::loadOlbSymbols(), SCH_IO_ALTIUM::LoadSchematicFile(), SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile(), SCH_IO_DIPTRACE::LoadSchematicFile(), SCH_IO_GEDA::LoadSchematicFile(), SCH_IO_LTSPICE::LoadSchematicFile(), SCH_IO_ORCAD::LoadSchematicFile(), SCH_IO_PADS::LoadSchematicFile(), PCB_IO_PADS::loadTracksAndVias(), PCB_IO_PADS_BINARY::loadTracksAndVias(), PCB_IO_PADS::loadZones(), PCB_IO_PADS_BINARY::loadZones(), SCH_IO_ALTIUM::ParseLibFile(), SCH_IO_ALTIUM::ParsePowerPort(), SCH_IO_PCAD::populateScreen(), Report(), SCH_IO_ALTIUM::SCH_IO_ALTIUM(), SCH_IO_CADSTAR_ARCHIVE::SCH_IO_CADSTAR_ARCHIVE(), SCH_IO_DIPTRACE::SCH_IO_DIPTRACE(), SCH_IO_EASYEDA::SCH_IO_EASYEDA(), SCH_IO_LTSPICE::SCH_IO_LTSPICE(), SCH_IO_ORCAD::SCH_IO_ORCAD(), SetReporter(), and SCH_IO_CADSTAR_ARCHIVE::SetReporter().
|
private |
Definition at line 101 of file pcb_io_cadstar_archive.h.
Referenced by loadBoard(), PCB_IO_CADSTAR_ARCHIVE(), and RegisterCallback().
|
private |
Definition at line 98 of file pcb_io_cadstar_archive.h.
Referenced by ensureLoadedLibrary().