2011-11-28 04:32:29 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KICAD, a free EDA CAD application.
|
|
|
|
*
|
2012-04-17 14:54:48 +00:00
|
|
|
* Copyright (C) 2011-2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
2023-08-18 19:41:07 +00:00
|
|
|
* Copyright (C) 2016-2023 Kicad Developers, see AUTHORS.txt for contributors.
|
2011-11-28 04:32:29 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
2023-12-19 17:39:26 +00:00
|
|
|
#ifndef PCB_IO_H_
|
|
|
|
#define PCB_IO_H_
|
2023-08-26 19:28:53 +00:00
|
|
|
|
2023-12-24 04:31:22 +00:00
|
|
|
#include <io/io_base.h>
|
|
|
|
#include <pcb_io/pcb_io_mgr.h>
|
|
|
|
|
2023-08-18 19:37:44 +00:00
|
|
|
#include <cstdint>
|
2023-08-12 14:37:02 +00:00
|
|
|
#include <config.h>
|
2023-08-13 02:26:06 +00:00
|
|
|
#include <vector>
|
|
|
|
#include <wx/arrstr.h>
|
|
|
|
#include <i18n_utility.h>
|
2019-01-15 22:17:56 +00:00
|
|
|
|
2011-11-28 04:32:29 +00:00
|
|
|
class BOARD;
|
2020-11-13 15:15:52 +00:00
|
|
|
class FOOTPRINT;
|
2022-11-06 16:51:52 +00:00
|
|
|
class STRING_UTF8_MAP;
|
2020-12-18 15:40:13 +00:00
|
|
|
class PROJECT;
|
2021-06-23 22:53:08 +00:00
|
|
|
class PROGRESS_REPORTER;
|
2011-11-28 04:32:29 +00:00
|
|
|
|
|
|
|
/**
|
2020-12-18 15:40:13 +00:00
|
|
|
* A base class that #BOARD loading and saving plugins should derive from.
|
|
|
|
*
|
2023-12-19 17:39:26 +00:00
|
|
|
* Implementations can provide either Load() or Save() functions, or both. PCB_IOs throw
|
2020-12-18 15:40:13 +00:00
|
|
|
* exceptions, so it is best that you wrap your calls to these functions in a try catch block.
|
|
|
|
* Plugins throw exceptions because it is illegal for them to have any user interface calls in
|
|
|
|
* them whatsoever, i.e. no windowing or screen printing at all.
|
|
|
|
*
|
2023-12-19 17:39:26 +00:00
|
|
|
*The compiler writes the "zero argument" constructor for a PCB_IO automatically if you do
|
2020-12-18 15:40:13 +00:00
|
|
|
* not provide one. If you decide you need to provide a zero argument constructor of your
|
2023-12-19 17:39:26 +00:00
|
|
|
* own design, that is allowed. It must be public, and it is what the #PCB_IO_MGR uses. Parameters
|
|
|
|
* may be passed into a PCB_IO via the #PROPERTIES variable for any of the public API functions
|
2020-12-18 15:40:13 +00:00
|
|
|
* which take one.
|
|
|
|
*
|
2011-11-28 04:32:29 +00:00
|
|
|
*
|
|
|
|
* <pre>
|
|
|
|
* try
|
|
|
|
* {
|
2023-12-19 17:39:26 +00:00
|
|
|
* PCB_IO_MGR::Load(...);
|
2011-12-02 16:28:00 +00:00
|
|
|
* or
|
2023-12-19 17:39:26 +00:00
|
|
|
* PCB_IO_MGR::Save(...);
|
2011-11-28 04:32:29 +00:00
|
|
|
* }
|
2014-04-09 13:33:04 +00:00
|
|
|
* catch( const IO_ERROR& ioe )
|
2011-11-28 04:32:29 +00:00
|
|
|
* {
|
|
|
|
* // grab text from ioe, show in error window.
|
|
|
|
* }
|
|
|
|
* </pre>
|
|
|
|
*/
|
2023-12-24 04:31:22 +00:00
|
|
|
class PCB_IO : public IO_BASE
|
2011-11-28 04:32:29 +00:00
|
|
|
{
|
|
|
|
public:
|
2012-04-07 18:05:56 +00:00
|
|
|
/**
|
2023-12-19 17:39:26 +00:00
|
|
|
* Returns board file description for the PCB_IO.
|
2023-08-13 02:26:06 +00:00
|
|
|
*/
|
2023-12-27 16:34:59 +00:00
|
|
|
virtual const IO_BASE::IO_FILE_DESC GetBoardFileDesc() const
|
|
|
|
{
|
|
|
|
return IO_BASE::IO_FILE_DESC( wxEmptyString, {} );
|
|
|
|
}
|
2023-08-13 02:26:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2023-12-19 17:39:26 +00:00
|
|
|
* Checks if this PCB_IO can read the specified board file.
|
2023-08-13 02:26:06 +00:00
|
|
|
* If not overriden, extension check is used.
|
|
|
|
*/
|
|
|
|
virtual bool CanReadBoard( const wxString& aFileName ) const;
|
|
|
|
|
|
|
|
/**
|
2023-12-19 17:39:26 +00:00
|
|
|
* Checks if this PCB_IO can read a footprint from specified file or directory.
|
2023-08-13 02:26:06 +00:00
|
|
|
* If not overriden, extension check is used.
|
|
|
|
*/
|
|
|
|
virtual bool CanReadFootprint( const wxString& aFileName ) const;
|
|
|
|
|
2022-02-11 21:38:31 +00:00
|
|
|
/**
|
|
|
|
* Registers a KIDIALOG callback for collecting info from the user.
|
|
|
|
*/
|
|
|
|
virtual void SetQueryUserCallback( std::function<bool( wxString aTitle, int aIcon,
|
|
|
|
wxString aMessage,
|
|
|
|
wxString aAction )> aCallback )
|
|
|
|
{ }
|
|
|
|
|
2011-11-28 04:32:29 +00:00
|
|
|
/**
|
2023-12-19 17:39:26 +00:00
|
|
|
* Load information from some input file format that this PCB_IO implementation
|
2020-12-18 15:40:13 +00:00
|
|
|
* knows about into either a new #BOARD or an existing one.
|
2011-11-28 04:32:29 +00:00
|
|
|
*
|
2020-12-18 15:40:13 +00:00
|
|
|
* This may be used to load an entire new #BOARD, or to augment an existing one if
|
|
|
|
* @a aAppendToMe is not NULL.
|
2011-11-28 04:32:29 +00:00
|
|
|
*
|
2020-12-18 15:40:13 +00:00
|
|
|
* @param aFileName is the name of the file to use as input and may be foreign in
|
|
|
|
* nature or native in nature.
|
|
|
|
* @param aAppendToMe is an existing BOARD to append to, but if NULL then this means
|
|
|
|
* "do not append, rather load anew".
|
|
|
|
* @param 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.
|
|
|
|
* @param aProject is the optional #PROJECT object primarily used by third party
|
|
|
|
* importers.
|
|
|
|
* @return the successfully loaded board, or the same one as \a aAppendToMe if aAppendToMe
|
|
|
|
* was not NULL, and caller owns it.
|
|
|
|
*
|
|
|
|
* @throw 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.
|
2011-11-28 04:32:29 +00:00
|
|
|
*/
|
2023-08-13 02:11:58 +00:00
|
|
|
virtual BOARD* LoadBoard( const wxString& aFileName, BOARD* aAppendToMe,
|
2023-12-27 17:06:23 +00:00
|
|
|
const STRING_UTF8_MAP* aProperties = nullptr, PROJECT* aProject = nullptr );
|
2011-11-28 04:32:29 +00:00
|
|
|
|
2021-01-31 21:55:51 +00:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* @return Footprints (caller owns the objects)
|
|
|
|
*/
|
|
|
|
virtual std::vector<FOOTPRINT*> GetImportedCachedLibraryFootprints();
|
|
|
|
|
2011-11-28 04:32:29 +00:00
|
|
|
/**
|
2023-12-19 17:39:26 +00:00
|
|
|
* Write @a aBoard to a storage file in a format that this PCB_IO implementation knows
|
2020-12-18 15:40:13 +00:00
|
|
|
* about or it can be used to write a portion of \a aBoard to a special kind of export
|
|
|
|
* file.
|
2011-11-28 04:32:29 +00:00
|
|
|
*
|
|
|
|
* @param aFileName is the name of a file to save to on disk.
|
2020-12-18 15:40:13 +00:00
|
|
|
* @param aBoard is the class #BOARD in memory document tree from which to extract
|
|
|
|
* information when writing to \a aFileName. The caller continues to
|
|
|
|
* own the BOARD, and the plugin should refrain from modifying the BOARD
|
|
|
|
* if possible.
|
|
|
|
* @param 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.
|
2011-11-28 04:32:29 +00:00
|
|
|
*
|
2011-12-02 16:28:00 +00:00
|
|
|
* @throw IO_ERROR if there is a problem saving or exporting.
|
2011-11-28 04:32:29 +00:00
|
|
|
*/
|
2023-08-13 02:11:58 +00:00
|
|
|
virtual void SaveBoard( const wxString& aFileName, BOARD* aBoard,
|
2023-12-27 17:06:23 +00:00
|
|
|
const STRING_UTF8_MAP* aProperties = nullptr );
|
2012-11-19 16:19:38 +00:00
|
|
|
|
2012-04-16 03:18:41 +00:00
|
|
|
/**
|
2017-06-13 23:47:05 +00:00
|
|
|
* Return a list of footprint names contained within the library at @a aLibraryPath.
|
2012-04-16 03:18:41 +00:00
|
|
|
*
|
2013-11-28 15:41:10 +00:00
|
|
|
* @param aLibraryPath is a locator for the "library", usually a directory, file,
|
2020-12-18 15:40:13 +00:00
|
|
|
* or URL containing several footprints.
|
|
|
|
* @param aProperties is an associative array that can be used to tell the plugin
|
|
|
|
* anything needed about how to perform with respect to @a aLibraryPath.
|
|
|
|
* The caller continues to own this object (plugin may not delete it),
|
|
|
|
* and plugins should expect it to be optionally NULL.
|
2017-06-13 23:47:05 +00:00
|
|
|
* @param aFootprintNames is the array of available footprint names inside a library.
|
2019-08-31 14:18:27 +00:00
|
|
|
* @param aBestEfforts if true, don't throw on errors, just return an empty list.
|
|
|
|
*
|
2012-04-16 03:18:41 +00:00
|
|
|
* @throw IO_ERROR if the library cannot be found, or footprint cannot be loaded.
|
|
|
|
*/
|
2017-06-11 20:20:44 +00:00
|
|
|
virtual void FootprintEnumerate( wxArrayString& aFootprintNames, const wxString& aLibraryPath,
|
2022-11-06 16:51:52 +00:00
|
|
|
bool aBestEfforts, const STRING_UTF8_MAP* aProperties = nullptr );
|
2012-04-16 03:18:41 +00:00
|
|
|
|
2018-02-05 20:55:00 +00:00
|
|
|
/**
|
2018-02-23 12:21:06 +00:00
|
|
|
* Generate a timestamp representing all the files in the library (including the library
|
|
|
|
* directory).
|
2020-12-18 15:40:13 +00:00
|
|
|
*
|
|
|
|
* Timestamps should not be considered ordered, they either match or they don't.
|
2018-02-05 20:55:00 +00:00
|
|
|
*/
|
2018-03-04 01:13:09 +00:00
|
|
|
virtual long long GetLibraryTimestamp( const wxString& aLibraryPath ) const = 0;
|
2018-02-05 20:55:00 +00:00
|
|
|
|
2017-03-23 00:59:25 +00:00
|
|
|
/**
|
|
|
|
* If possible, prefetches the specified library (e.g. performing downloads). Does not parse.
|
|
|
|
* Threadsafe.
|
|
|
|
*
|
2020-12-18 15:40:13 +00:00
|
|
|
* This is a no-op for libraries that cannot be prefetched. Plugins that cannot prefetch
|
|
|
|
* need not override this; a default no-op is provided.
|
2017-03-23 00:59:25 +00:00
|
|
|
*
|
2020-12-18 15:40:13 +00:00
|
|
|
* @param aLibraryPath is a locator for the "library", usually a directory, file, or URL
|
|
|
|
* containing several footprints.
|
2017-03-23 00:59:25 +00:00
|
|
|
*
|
2020-12-18 15:40:13 +00:00
|
|
|
* @param aProperties is an associative array that can be used to tell the plugin anything
|
|
|
|
* needed about how to perform with respect to @a aLibraryPath. The
|
|
|
|
* caller continues to own this object (plugin may not delete it), and
|
|
|
|
* plugins should expect it to be optionally NULL.
|
2017-03-23 00:59:25 +00:00
|
|
|
*
|
|
|
|
* @throw IO_ERROR if there is an error prefetching the library.
|
|
|
|
*/
|
|
|
|
virtual void PrefetchLib( const wxString& aLibraryPath,
|
2022-11-06 16:51:52 +00:00
|
|
|
const STRING_UTF8_MAP* aProperties = nullptr );
|
2017-03-23 00:59:25 +00:00
|
|
|
|
2023-08-13 02:26:06 +00:00
|
|
|
/**
|
|
|
|
* Load a single footprint from @a aFootprintPath and put its name in @a aFootprintNameOut.
|
|
|
|
* If this is a footprint library, the first footprint should be loaded.
|
|
|
|
* The default implementation uses FootprintEnumerate and FootprintLoad to load first footprint.
|
|
|
|
*
|
|
|
|
* @param aLibraryPath is a path of the footprint file.
|
|
|
|
* @param aFootprintNameOut is the name output of the loaded footprint.
|
|
|
|
* @param 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.
|
|
|
|
* @return the #FOOTPRINT object if found, caller owns it, else NULL if not found.
|
|
|
|
*
|
|
|
|
* @throw IO_ERROR if the footprint cannot be found or read.
|
|
|
|
*/
|
|
|
|
virtual FOOTPRINT* ImportFootprint( const wxString& aFootprintPath, wxString& aFootprintNameOut,
|
|
|
|
const STRING_UTF8_MAP* aProperties = nullptr );
|
|
|
|
|
2012-04-16 03:18:41 +00:00
|
|
|
/**
|
2020-12-18 15:40:13 +00:00
|
|
|
* Load a footprint having @a aFootprintName from the @a aLibraryPath containing a library
|
2023-12-19 17:39:26 +00:00
|
|
|
* format that this PCB_IO knows about.
|
2012-04-16 03:18:41 +00:00
|
|
|
*
|
2020-12-18 15:40:13 +00:00
|
|
|
* @param aLibraryPath is a locator for the "library", usually a directory, file, or URL
|
|
|
|
* containing several footprints.
|
2012-04-16 03:18:41 +00:00
|
|
|
* @param aFootprintName is the name of the footprint to load.
|
2020-12-18 15:40:13 +00:00
|
|
|
* @param 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.
|
2021-03-30 09:38:03 +00:00
|
|
|
* @param 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
|
2023-08-13 02:26:06 +00:00
|
|
|
* @return the #FOOTPRINT object if found, caller owns it, else NULL if not found.
|
2020-12-18 15:40:13 +00:00
|
|
|
*
|
|
|
|
* @throw IO_ERROR if the library cannot be found or read. No exception is thrown in
|
|
|
|
* the case where \a aFootprintName cannot be found.
|
2012-04-16 03:18:41 +00:00
|
|
|
*/
|
2021-03-30 09:38:03 +00:00
|
|
|
virtual FOOTPRINT* FootprintLoad( const wxString& aLibraryPath,
|
|
|
|
const wxString& aFootprintName,
|
|
|
|
bool aKeepUUID = false,
|
2022-11-06 16:51:52 +00:00
|
|
|
const STRING_UTF8_MAP* aProperties = nullptr );
|
2012-04-16 03:18:41 +00:00
|
|
|
|
2018-02-23 12:21:06 +00:00
|
|
|
/**
|
2020-12-18 15:40:13 +00:00
|
|
|
* A version of FootprintLoad() for use after FootprintEnumerate() for more efficient
|
2018-07-30 13:18:37 +00:00
|
|
|
* cache management.
|
2018-02-23 12:21:06 +00:00
|
|
|
*/
|
2020-11-13 15:15:52 +00:00
|
|
|
virtual const FOOTPRINT* GetEnumeratedFootprint( const wxString& aLibraryPath,
|
|
|
|
const wxString& aFootprintName,
|
2022-11-06 16:51:52 +00:00
|
|
|
const STRING_UTF8_MAP* aProperties = nullptr );
|
2018-02-23 12:21:06 +00:00
|
|
|
|
2019-07-11 21:59:14 +00:00
|
|
|
/**
|
2020-12-18 15:40:13 +00:00
|
|
|
* Check for the existence of a footprint.
|
2019-07-11 21:59:14 +00:00
|
|
|
*/
|
|
|
|
virtual bool FootprintExists( const wxString& aLibraryPath, const wxString& aFootprintName,
|
2022-11-06 16:51:52 +00:00
|
|
|
const STRING_UTF8_MAP* aProperties = nullptr );
|
2019-07-11 21:59:14 +00:00
|
|
|
|
2012-04-16 03:18:41 +00:00
|
|
|
/**
|
2020-12-18 15:40:13 +00:00
|
|
|
* Write @a aFootprint to an existing library located at @a aLibraryPath.
|
2012-04-17 01:35:43 +00:00
|
|
|
* If a footprint by the same name already exists, it is replaced.
|
2012-04-16 03:18:41 +00:00
|
|
|
*
|
2020-12-18 15:40:13 +00:00
|
|
|
* @param aLibraryPath is a locator for the "library", usually a directory, file, or URL
|
|
|
|
* containing several footprints.
|
|
|
|
* @param aFootprint is what to store in the library. The caller continues to own the
|
|
|
|
* footprint after this call.
|
|
|
|
* @param 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.
|
2012-04-16 03:18:41 +00:00
|
|
|
*
|
|
|
|
* @throw IO_ERROR if there is a problem saving.
|
|
|
|
*/
|
2020-11-13 15:15:52 +00:00
|
|
|
virtual void FootprintSave( const wxString& aLibraryPath, const FOOTPRINT* aFootprint,
|
2022-11-06 16:51:52 +00:00
|
|
|
const STRING_UTF8_MAP* aProperties = nullptr );
|
2012-04-16 03:18:41 +00:00
|
|
|
|
|
|
|
/**
|
2020-12-18 15:40:13 +00:00
|
|
|
* Delete @a aFootprintName from the library at @a aLibraryPath.
|
2012-04-16 03:18:41 +00:00
|
|
|
*
|
2020-12-18 15:40:13 +00:00
|
|
|
* @param aLibraryPath is a locator for the "library", usually a directory, file, or URL
|
|
|
|
* containing several footprints.
|
2012-04-17 14:54:48 +00:00
|
|
|
* @param aFootprintName is the name of a footprint to delete from the specified library.
|
2020-12-18 15:40:13 +00:00
|
|
|
* @param 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.
|
2013-09-25 19:17:06 +00:00
|
|
|
*
|
2012-04-16 03:18:41 +00:00
|
|
|
* @throw IO_ERROR if there is a problem finding the footprint or the library, or deleting it.
|
|
|
|
*/
|
2020-12-18 15:40:13 +00:00
|
|
|
virtual void FootprintDelete( const wxString& aLibraryPath, const wxString& aFootprintName,
|
2022-11-06 16:51:52 +00:00
|
|
|
const STRING_UTF8_MAP* aProperties = nullptr );
|
2012-04-16 03:18:41 +00:00
|
|
|
|
2013-11-12 00:17:27 +00:00
|
|
|
/**
|
2020-12-18 15:40:13 +00:00
|
|
|
* Append supported PLUGIN options to @a 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.
|
|
|
|
*
|
|
|
|
* @note Since aListToAppendTo is a #PROPERTIES object, all options will be unique and
|
|
|
|
* last guy wins.
|
2013-11-12 00:17:27 +00:00
|
|
|
*
|
|
|
|
* @param aListToAppendTo holds a tuple of
|
|
|
|
* <dl>
|
2020-12-18 15:40:13 +00:00
|
|
|
* <dt>option</dt>
|
|
|
|
* <dd>This eventually is what shows up into the fp-lib-table "options"
|
|
|
|
* field, possibly combined with others.</dd>
|
|
|
|
* <dt>internationalized description</dt>
|
2023-05-28 19:10:07 +00:00
|
|
|
* <dd>The internationalized description is displayed in DIALOG_PLUGIN_OPTIONS.
|
2013-11-12 00:17:27 +00:00
|
|
|
* It may be multi-line and be quite explanatory of the option.</dd>
|
2020-12-18 15:40:13 +00:00
|
|
|
* </dl>
|
2013-11-12 00:17:27 +00:00
|
|
|
* <br>
|
|
|
|
* In the future perhaps @a 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.
|
2020-12-18 15:40:13 +00:00
|
|
|
* This would require a 3 column list, and introducing wx GUI knowledge to
|
|
|
|
* PLUGIN, which has been avoided to date.
|
2013-11-12 00:17:27 +00:00
|
|
|
*/
|
2023-12-27 00:25:41 +00:00
|
|
|
virtual void GetLibraryOptions( STRING_UTF8_MAP* aListToAppendTo ) const override;
|
2013-11-12 00:17:27 +00:00
|
|
|
|
2023-12-19 17:39:26 +00:00
|
|
|
virtual ~PCB_IO()
|
2023-04-20 22:19:04 +00:00
|
|
|
{};
|
2013-10-05 10:34:55 +00:00
|
|
|
|
2023-12-24 04:31:22 +00:00
|
|
|
protected:
|
|
|
|
PCB_IO( const wxString& aName ) : IO_BASE( aName ),
|
|
|
|
m_board( nullptr ),
|
|
|
|
m_props( nullptr )
|
|
|
|
{}
|
|
|
|
|
|
|
|
/// The board BOARD being worked on, no ownership here
|
|
|
|
BOARD* m_board;
|
|
|
|
|
|
|
|
/// Properties passed via Save() or Load(), no ownership, may be NULL.
|
|
|
|
const STRING_UTF8_MAP* m_props;
|
2011-12-02 16:28:00 +00:00
|
|
|
};
|
|
|
|
|
2023-12-19 17:39:26 +00:00
|
|
|
#endif // PCB_IO_H_
|