KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcb_io_allegro.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 Quilter
5 * Copyright (C) 2019 Thomas Pointhuber <[email protected]>
6 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 */
21
22#pragma once
23
24#include <pcb_io/pcb_io.h>
25#include <pcb_io/pcb_io_mgr.h>
27
28
30{
31public:
32 // -----<PUBLIC PCB_IO API>--------------------------------------------------
34 {
35 return IO_BASE::IO_FILE_DESC( _HKI( "Allegro PCB files" ), { "brd" } );
36 }
37
38 const IO_BASE::IO_FILE_DESC GetLibraryDesc() const override { return IO_BASE::IO_FILE_DESC( wxEmptyString, {} ); }
39
40 bool CanReadBoard( const wxString& aFileName ) const override;
41 bool CanReadLibrary( const wxString& aFileName ) const override;
42
43 BOARD* LoadBoard( const wxString& aFileName, BOARD* aAppendToMe, const std::map<std::string, UTF8>* aProperties,
44 PROJECT* aProject ) override;
45
46 long long GetLibraryTimestamp( const wxString& aLibraryPath ) const override { return 0; }
47
48 // void FootprintEnumerate( wxArrayString& aFootprintNames, const wxString& aLibraryPath,
49 // bool aBestEfforts, const std::map<std::string, UTF8>* aProperties = nullptr ) override;
50
51 // This parser should work for .dra, but we'll get there later
52 // FOOTPRINT* FootprintLoad( const wxString& aLibraryPath, const wxString& aFootprintName,
53 // bool aKeepUUID = false,
54 // const std::map<std::string, UTF8>* aProperties = nullptr ) override;
55
56 //bool FootprintExists( const wxString& aLibraryPath, const wxString& aFootprintName, const PROPERTIES* aProperties = nullptr );
57
58 bool IsLibraryWritable( const wxString& aLibraryPath ) override { return false; }
59
60 // -----</PUBLIC PCB_IO API>-------------------------------------------------
61
62 bool LoadBoardFromData( const uint8_t* aData, size_t aSize, BOARD& aBoard );
63
65};
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:372
Plugin class for import plugins that support remappable layers.
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 IsLibraryWritable(const wxString &aLibraryPath) override
Return true if the library at aLibraryPath is writable.
long long GetLibraryTimestamp(const wxString &aLibraryPath) const override
Generate a timestamp representing all the files in the library (including the library directory).
const IO_BASE::IO_FILE_DESC GetLibraryDesc() const override
Get the descriptor for the library container that this IO plugin operates on.
BOARD * LoadBoard(const wxString &aFileName, BOARD *aAppendToMe, const std::map< std::string, UTF8 > *aProperties, PROJECT *aProject) override
Load information from some input file format that this PCB_IO implementation knows about into either ...
const IO_BASE::IO_FILE_DESC GetBoardFileDesc() const override
Returns board file description for the PCB_IO.
bool LoadBoardFromData(const uint8_t *aData, size_t aSize, BOARD &aBoard)
PCB_IO(const wxString &aName)
Definition pcb_io.h:342
Container for project specific data.
Definition project.h:62
#define _HKI(x)
Definition page_info.cpp:40
Container that describes file type info.
Definition io_base.h:43