KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_io_easyedapro.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 (C) 2023 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, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
25#ifndef SCH_IO_EASYEDAPRO_H_
26#define SCH_IO_EASYEDAPRO_H_
27
28#include <sch_io/sch_io.h>
29#include <sch_io/sch_io_mgr.h>
30#include <reporter.h>
32
33
34class SCH_SHEET;
35class SCH_SCREEN;
36
37
39{
40public:
43
45 {
46 return IO_BASE::IO_FILE_DESC( _HKI( "EasyEDA (JLCEDA) Pro files" ), { "epro", "zip" } );
47 }
48
50 {
51 return IO_BASE::IO_FILE_DESC( _HKI( "EasyEDA (JLCEDA) Pro files" ), { "elibz", "epro", "zip" } );
52 }
53
54 bool CanReadSchematicFile( const wxString& aFileName ) const override;
55
56 int GetModifyHash() const override;
57
58 SCH_SHEET* LoadSchematicFile( const wxString& aFileName, SCHEMATIC* aSchematic,
59 SCH_SHEET* aAppendToMe = nullptr,
60 const std::map<std::string, UTF8>* aProperties = nullptr ) override;
61
62 void EnumerateSymbolLib( wxArrayString& aSymbolNameList, const wxString& aLibraryPath,
63 const std::map<std::string, UTF8>* aProperties = nullptr ) override;
64
65 void EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList, const wxString& aLibraryPath,
66 const std::map<std::string, UTF8>* aProperties = nullptr ) override;
67
68 void LoadAllDataFromProject( const wxString& aLibraryPath );
69
70 LIB_SYMBOL* LoadSymbol( const wxString& aLibraryPath, const wxString& aAliasName,
71 const std::map<std::string, UTF8>* aProperties = nullptr ) override;
72
73 bool IsLibraryWritable( const wxString& aLibraryPath ) override { return false; }
74
75private:
76 struct PRJ_DATA; // Opaque data structure
78};
79
80
81#endif // SCH_IO_EASYEDAPRO_H_
Define a library symbol object.
Definition: lib_symbol.h:78
Plugin class for import plugins that support choosing a project.
Holds all the data relating to one schematic.
Definition: schematic.h:77
const IO_BASE::IO_FILE_DESC GetSchematicFileDesc() const override
Returns schematic file description for the SCH_IO.
PRJ_DATA * m_projectData
void LoadAllDataFromProject(const wxString &aLibraryPath)
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...
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.
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.
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,...
Base class that schematic file and library loading and saving plugins should derive from.
Definition: sch_io.h:57
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition: sch_sheet.h:57
#define _HKI(x)
Container that describes file type info.
Definition: io_base.h:43