KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcb_io_target3001.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#ifndef PCB_IO_TARGET3001_H_
21#define PCB_IO_TARGET3001_H_
22
23#include <map>
24#include <memory>
25
26#include <pcb_io/pcb_io.h>
27#include <pcb_io/pcb_io_mgr.h>
28
29
35{
36public:
38
40 {
41 return IO_BASE::IO_FILE_DESC( _HKI( "TARGET 3001! project files" ), { "T3001" } );
42 }
43
45 {
46 return IO_BASE::IO_FILE_DESC( wxEmptyString, {} );
47 }
48
49 bool CanReadBoard( const wxString& aFileName ) const override;
50
51 long long GetLibraryTimestamp( const wxString& aLibraryPath ) const override { return 0; }
52
53 wxString GetImportedDesignRules() const override { return m_importedDesignRules; }
54
55 std::vector<FOOTPRINT*> GetImportedCachedLibraryFootprints() override;
56
57protected:
58 void loadBoard( const wxString& aFileName, BOARD& aBoard, bool aIsNewLoad,
59 const std::map<std::string, UTF8>* aProperties = nullptr, PROJECT* aProject = nullptr ) override;
60
61private:
63 std::map<wxString, std::unique_ptr<FOOTPRINT>> m_libraryFootprints;
64};
65
66#endif // PCB_IO_TARGET3001_H_
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:411
long long GetLibraryTimestamp(const wxString &aLibraryPath) const override
Generate a timestamp representing all the files in the library (including the library directory).
bool CanReadBoard(const wxString &aFileName) const override
const IO_BASE::IO_FILE_DESC GetLibraryDesc() const override
Get the descriptor for the library container that this IO plugin operates on.
const IO_BASE::IO_FILE_DESC GetBoardFileDesc() const override
Return board file description for the PCB_IO.
std::vector< FOOTPRINT * > GetImportedCachedLibraryFootprints() override
Return a container with the cached library footprints generated in the last call to Load.
std::map< wxString, std::unique_ptr< FOOTPRINT > > m_libraryFootprints
by package name
wxString GetImportedDesignRules() const override
Return custom DRC rules generated while importing the most recent board.
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.
PCB_IO(const wxString &aName)
Definition pcb_io.h:383
Container for project specific data.
Definition project.h:63
#define _HKI(x)
Definition page_info.cpp:40
Container that describes file type info.
Definition io_base.h:43