21#ifndef CADSTAR_ARCHIVE_PLUGIN_H_
22#define CADSTAR_ARCHIVE_PLUGIN_H_
42 bool CanReadBoard(
const wxString& aFileName )
const override;
47 const std::map<std::string, UTF8>* aProperties =
nullptr,
PROJECT* aProject =
nullptr )
override;
58 const std::vector<INPUT_LAYER_DESC>& aInputLayerDescriptionVector );
68 bool aBestEfforts,
const std::map<std::string, UTF8>* aProperties =
nullptr )
override;
72 bool FootprintExists(
const wxString& aLibraryPath,
const wxString& aFootprintName,
73 const std::map<std::string, UTF8>* aProperties =
nullptr )
override;
76 bool aKeepUUID =
false,
77 const std::map<std::string, UTF8>* aProperties =
nullptr )
override;
96 std::map<wxString, NAME_TO_FOOTPRINT_MAP>
m_cache;
Information pertinent to a Pcbnew printed circuit board.
Plugin class for import plugins that support remappable layers.
BOARD * LoadBoard(const wxString &aFileName, BOARD *aAppendToMe, const std::map< std::string, UTF8 > *aProperties=nullptr, PROJECT *aProject=nullptr) override
Load information from some input file format that this PCB_IO implementation knows about into either ...
void ensureLoadedLibrary(const wxString &aLibraryPath)
std::map< const wxString, std::unique_ptr< FOOTPRINT > > NAME_TO_FOOTPRINT_MAP
const IO_BASE::IO_FILE_DESC GetBoardFileDesc() const override
Returns board file description for the PCB_IO.
bool CanReadBoard(const wxString &aFileName) const override
Checks if this PCB_IO can read the specified board file.
static std::map< wxString, PCB_LAYER_ID > DefaultLayerMappingCallback(const std::vector< INPUT_LAYER_DESC > &aInputLayerDescriptionVector)
Return the automapped layers.
bool m_show_layer_mapping_warnings
void clearLoadedFootprints()
bool CanReadLibrary(const wxString &aFileName) const override
Checks if this IO object can read the specified library file/directory.
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 IsLibraryWritable(const wxString &aLibraryPath) override
CADSTAR Plugin is read-only.
void RegisterCallback(LAYER_MAPPING_HANDLER aLayerMappingHandler) override
Register a different handler to be called when mapping of Cadstar to KiCad layers occurs.
std::map< wxString, NAME_TO_FOOTPRINT_MAP > m_cache
bool CanReadFootprint(const wxString &aFileName) const override
Checks if this PCB_IO can read a footprint from specified file or directory.
const IO_BASE::IO_FILE_DESC GetLibraryDesc() const override
Get the descriptor for the library container that this IO plugin operates on.
bool checkBoardHeader(const wxString &aFileName) const
std::map< wxString, long long > m_timestamps
std::vector< FOOTPRINT * > GetImportedCachedLibraryFootprints() override
Return a container with the cached library footprints generated in the last call to Load.
std::vector< FOOTPRINT * > m_loaded_footprints
bool FootprintExists(const wxString &aLibraryPath, const wxString &aFootprintName, const std::map< std::string, UTF8 > *aProperties=nullptr) override
Check for the existence of a footprint.
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 PC...
long long GetLibraryTimestamp(const wxString &aLibraryPath) const override
Generate a timestamp representing all the files in the library (including the library directory).
~PCB_IO_CADSTAR_ARCHIVE()
A base class that BOARD loading and saving plugins should derive from.
Container for project specific data.
std::function< std::map< wxString, PCB_LAYER_ID >(const std::vector< INPUT_LAYER_DESC > &)> LAYER_MAPPING_HANDLER
Pointer to a function that takes a map of source and KiCad layers and returns a re-mapped version.
Container that describes file type info.