KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_io_easyeda.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) 2023 Alex Shvartzkop <[email protected]>
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
21#ifndef SCH_IO_EASYEDA_H_
22#define SCH_IO_EASYEDA_H_
23
24#include <sch_io/sch_io.h>
25#include <sch_io/sch_io_mgr.h>
26#include <reporter.h>
27#include <wx/arrstr.h>
28
29
30class SCH_SHEET;
31class SCH_SCREEN;
32
33
34class SCH_IO_EASYEDA : public SCH_IO
35{
36public:
37 SCH_IO_EASYEDA() : SCH_IO( wxS( "EasyEDA (JLCEDA) Schematic" ) )
38 {
40 }
41
43
45 {
46 return IO_BASE::IO_FILE_DESC( _HKI( "EasyEDA (JLCEDA) Std files" ), { "json" } );
47 }
48
49 const IO_BASE::IO_FILE_DESC GetLibraryDesc() const override { return GetSchematicFileDesc(); }
50
51 bool CanReadSchematicFile( const wxString& aFileName ) const override;
52
53 bool CanReadLibrary( const wxString& aFileName ) const override;
54
55 int GetModifyHash() const override;
56
57 SCH_SHEET* LoadSchematicFile( const wxString& aFileName, SCHEMATIC* aSchematic,
58 SCH_SHEET* aAppendToMe = nullptr,
59 const std::map<std::string, UTF8>* aProperties = nullptr ) override;
60
61 void EnumerateSymbolLib( wxArrayString& aSymbolNameList, const wxString& aLibraryPath,
62 const std::map<std::string, UTF8>* aProperties = nullptr ) override;
63
64 void EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList, const wxString& aLibraryPath,
65 const std::map<std::string, UTF8>* aProperties = nullptr ) override;
66
67 LIB_SYMBOL* LoadSymbol( const wxString& aLibraryPath, const wxString& aAliasName,
68 const std::map<std::string, UTF8>* aProperties = nullptr ) override;
69
70 bool IsLibraryWritable( const wxString& aLibraryPath ) override { return false; }
71};
72
73
74#endif // SCH_IO_EASYEDA_H_
REPORTER * m_reporter
Reporter to log errors/warnings to, may be nullptr.
Definition io_base.h:237
Define a library symbol object.
Definition lib_symbol.h:79
Holds all the data relating to one schematic.
Definition schematic.h:90
const IO_BASE::IO_FILE_DESC GetSchematicFileDesc() const override
Returns schematic file description for the SCH_IO.
bool CanReadLibrary(const wxString &aFileName) const override
Checks if this IO object can read the specified library file/directory.
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.
void EnumerateSymbolLib(wxArrayString &aSymbolNameList, const wxString &aLibraryPath, const std::map< std::string, UTF8 > *aProperties=nullptr) override
Populate a list of LIB_SYMBOL alias names contained within the library aLibraryPath.
const IO_BASE::IO_FILE_DESC GetLibraryDesc() const override
Get the descriptor for the library container that this IO plugin operates on.
bool CanReadSchematicFile(const wxString &aFileName) const override
Checks if this SCH_IO can read the specified schematic file.
bool IsLibraryWritable(const wxString &aLibraryPath) override
Return true if the library at aLibraryPath is writable.
LIB_SYMBOL * LoadSymbol(const wxString &aLibraryPath, const wxString &aAliasName, const std::map< std::string, UTF8 > *aProperties=nullptr) override
Load a LIB_SYMBOL object having aPartName from the aLibraryPath containing a library format that this...
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