KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_io_diptrace.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 SCH_IO_DIPTRACE_H_
21#define SCH_IO_DIPTRACE_H_
22
23#include <sch_io/sch_io.h>
24#include <sch_io/sch_io_mgr.h>
25#include <reporter.h>
26
27
28class SCH_SHEET;
29class SCH_SCREEN;
30class SCHEMATIC;
31
32
42class SCH_IO_DIPTRACE : public SCH_IO
43{
44public:
45 SCH_IO_DIPTRACE() : SCH_IO( wxS( "DipTrace Schematic" ) )
46 {
48 }
49
51
53 {
54 return IO_BASE::IO_FILE_DESC( _HKI( "DipTrace schematic files" ), { "dch" } );
55 }
56
58 {
59 return IO_BASE::IO_FILE_DESC( wxEmptyString, {} );
60 }
61
62 bool CanReadSchematicFile( const wxString& aFileName ) const override;
63
64 int GetModifyHash() const override { return 0; }
65
66 SCH_SHEET* LoadSchematicFile( const wxString& aFileName, SCHEMATIC* aSchematic,
67 SCH_SHEET* aAppendToMe = nullptr,
68 const std::map<std::string, UTF8>* aProperties = nullptr ) override;
69
70 bool IsLibraryWritable( const wxString& aLibraryPath ) override { return false; }
71};
72
73#endif // SCH_IO_DIPTRACE_H_
REPORTER * m_reporter
Reporter to log errors/warnings to, may be nullptr.
Definition io_base.h:237
Holds all the data relating to one schematic.
Definition schematic.h:90
const IO_BASE::IO_FILE_DESC GetLibraryDesc() const override
Get the descriptor for the library container that this IO plugin operates on.
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,...
int GetModifyHash() const override
Return the modification hash from the library cache.
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.
bool IsLibraryWritable(const wxString &aLibraryPath) override
Return true if the library at aLibraryPath is writable.
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:44
static REPORTER & GetInstance()
Definition reporter.cpp:220
#define _HKI(x)
Definition page_info.cpp:40
Container that describes file type info.
Definition io_base.h:43