KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcb_io_sprint_layout.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, you may find one here:
18 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19 * or you may search the http://www.gnu.org website for the version 2 license,
20 * or you may write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 *
23 * This file contains file format knowledge derived from the xlay project:
24 * https://github.com/sergey-raevskiy/xlay
25 * and the OpenBoardView project:
26 * https://github.com/OpenBoardView/OpenBoardView
27 */
28
29#ifndef PCB_IO_SPRINT_LAYOUT_H_
30#define PCB_IO_SPRINT_LAYOUT_H_
31
32#include <map>
33#include <memory>
34#include <string>
35#include <vector>
36
38#include <pcb_io/pcb_io.h>
39#include <pcb_io/pcb_io_mgr.h>
40
41class BOARD;
42class FOOTPRINT;
43
45{
46public:
48 {
49 return IO_BASE::IO_FILE_DESC( _HKI( "Sprint Layout board file" ), { "lay6", "lay" } );
50 }
51
53 {
54 return IO_BASE::IO_FILE_DESC( wxEmptyString, {} );
55 }
56
57 bool CanReadBoard( const wxString& aFileName ) const override;
58
59 BOARD* LoadBoard( const wxString& aFileName, BOARD* aAppendToMe,
60 const std::map<std::string, UTF8>* aProperties = nullptr,
61 PROJECT* aProject = nullptr ) override;
62
63 std::vector<FOOTPRINT*> GetImportedCachedLibraryFootprints() override;
64
65 long long GetLibraryTimestamp( const wxString& aLibraryPath ) const override
66 {
67 return 0;
68 }
69
72
73private:
74 std::map<wxString, std::unique_ptr<FOOTPRINT>> m_loadedFootprints;
75};
76
77#endif // PCB_IO_SPRINT_LAYOUT_H_
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:323
std::vector< FOOTPRINT * > GetImportedCachedLibraryFootprints() override
Return a container with the cached library footprints generated in the last call to Load.
bool CanReadBoard(const wxString &aFileName) const override
Checks if this PCB_IO can read the specified board file.
const IO_BASE::IO_FILE_DESC GetLibraryDesc() const override
Get the descriptor for the library container that this IO plugin operates on.
long long GetLibraryTimestamp(const wxString &aLibraryPath) const override
Generate a timestamp representing all the files in the library (including the library directory).
~PCB_IO_SPRINT_LAYOUT() override
const IO_BASE::IO_FILE_DESC GetBoardFileDesc() const override
Returns board file description for the PCB_IO.
std::map< wxString, std::unique_ptr< FOOTPRINT > > m_loadedFootprints
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 ...
PCB_IO(const wxString &aName)
Definition pcb_io.h:337
Plugin class for import plugins that support choosing a project.
Container for project specific data.
Definition project.h:66
#define _HKI(x)
Definition page_info.cpp:44
Container that describes file type info.
Definition io_base.h:43