KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_io_pads.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 (C) 2025 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 3
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 along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef SCH_IO_PADS_H_
21#define SCH_IO_PADS_H_
22
23#include <sch_io/sch_io.h>
24#include <sch_io/sch_io_mgr.h>
25
26#include <unordered_map>
27
28class SCH_SCREEN;
29class SCH_SHEET;
30class SCHEMATIC;
31class LIB_SYMBOL;
32
39class SCH_IO_PADS : public SCH_IO
40{
41public:
44
46 {
47 return IO_BASE::IO_FILE_DESC( _HKI( "PADS Logic schematic files" ), { "asc", "txt" } );
48 }
49
51 {
52 return IO_BASE::IO_FILE_DESC( _HKI( "PADS Logic library files" ), { "asc", "txt" } );
53 }
54
55 bool CanReadSchematicFile( const wxString& aFileName ) const override;
56 bool CanReadLibrary( const wxString& aFileName ) const override;
57
58 int GetModifyHash() const override { return 0; }
59
60 SCH_SHEET* LoadSchematicFile( const wxString& aFileName, SCHEMATIC* aSchematic,
61 SCH_SHEET* aAppendToMe = nullptr,
62 const std::map<std::string, UTF8>* aProperties = nullptr ) override;
63
64private:
71 bool checkFileHeader( const wxString& aFileName ) const;
72
73 std::unordered_map<wxString, SEVERITY> m_errorMessages;
74};
75
76#endif // SCH_IO_PADS_H_
Define a library symbol object.
Definition lib_symbol.h:83
Holds all the data relating to one schematic.
Definition schematic.h:88
const IO_BASE::IO_FILE_DESC GetLibraryDesc() const override
Get the descriptor for the library container that this IO plugin operates on.
Definition sch_io_pads.h:50
int GetModifyHash() const override
Return the modification hash from the library cache.
Definition sch_io_pads.h:58
bool CanReadLibrary(const wxString &aFileName) const override
Checks if this IO object can read the specified library file/directory.
bool checkFileHeader(const wxString &aFileName) const
Check if the file header indicates a PADS Logic schematic file.
bool CanReadSchematicFile(const wxString &aFileName) const override
Checks if this SCH_IO can read the specified schematic file.
const IO_BASE::IO_FILE_DESC GetSchematicFileDesc() const override
Returns schematic file description for the SCH_IO.
Definition sch_io_pads.h:45
std::unordered_map< wxString, SEVERITY > m_errorMessages
Definition sch_io_pads.h:73
SCH_SHEET * LoadSchematicFile(const wxString &aFileName, SCHEMATIC *aSchematic, SCH_SHEET *aAppendToMe=nullptr, const std::map< std::string, UTF8 > *aProperties=nullptr) override
Load information from some input file format that this SCH_IO implementation knows about,...
SCH_IO(const wxString &aName)
Definition sch_io.h:375
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition sch_sheet.h:48
#define _HKI(x)
Definition page_info.cpp:44
Container that describes file type info.
Definition io_base.h:43