KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ltspice_sch_plugin.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) 2022 Chetan Subhash Shinde<[email protected]>
5 * Copyright (C) 2023 CERN
6 * Copyright (C) 2022-2023 KiCad Developers, see AUTHORS.txt for contributors.
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation, either version 3 of the License, or (at your
11 * option) any later version
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#ifndef SCH_LTSPICE_PLUGIN_H_
23#define SCH_LTSPICE_PLUGIN_H_
24
25#include <sch_io_mgr.h>
26#include <reporter.h>
27#include <wx/log.h>
28
29
30class SCH_SHEET;
31class SCH_SCREEN;
32
33
35{
36public:
38 {
40 m_progressReporter = nullptr;
41 }
42
44 {
45 }
46
47 const wxString GetName() const override;
48
49 void SetReporter( REPORTER* aReporter ) override { m_reporter = aReporter; }
50
51 void SetProgressReporter( PROGRESS_REPORTER* aReporter ) override
52 {
53 m_progressReporter = aReporter;
54 }
55
57 {
58 return PLUGIN_FILE_DESC( _HKI( "LTspice schematic files" ), { "asc" } );
59 }
60
61 /*const PLUGIN_FILE_DESC GetLibraryFileDesc() const override
62 {
63 return PLUGIN_FILE_DESC( _HKI( "LTspice library files" ), { "lib" } );
64 }*/
65
66 int GetModifyHash() const override;
67
68 SCH_SHEET* LoadSchematicFile( const wxString& aFileName, SCHEMATIC* aSchematic,
69 SCH_SHEET* aAppendToMe = nullptr,
70 const STRING_UTF8_MAP* aProperties = nullptr ) override;
71
72private:
73 REPORTER* m_reporter; // current reporter for warnings/errors
74 PROGRESS_REPORTER* m_progressReporter; // optional; may be nullptr
75};
76#endif // SCH_LTSPICE_PLUGIN_H_
A progress reporter interface for use in multi-threaded environments.
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:71
Holds all the data relating to one schematic.
Definition: schematic.h:75
int GetModifyHash() const override
Return the modification hash from the library cache.
PROGRESS_REPORTER * m_progressReporter
const PLUGIN_FILE_DESC GetSchematicFileDesc() const override
Returns schematic file description for the SCH_PLUGIN.
void SetReporter(REPORTER *aReporter) override
Set an optional reporter for warnings/errors.
void SetProgressReporter(PROGRESS_REPORTER *aReporter) override
Set an optional progress reporter.
const wxString GetName() const override
schematic PLUGIN for LTspice (*.asc) and (.asy) format.
SCH_SHEET * LoadSchematicFile(const wxString &aFileName, SCHEMATIC *aSchematic, SCH_SHEET *aAppendToMe=nullptr, const STRING_UTF8_MAP *aProperties=nullptr) override
Load information from some input file format that this SCH_PLUGIN implementation knows about,...
Base class that schematic file and library loading and saving plugins should derive from.
Definition: sch_io_mgr.h:145
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition: sch_sheet.h:57
A name/value tuple with unique names and optional values.
static REPORTER & GetInstance()
Definition: reporter.cpp:203
#define _HKI(x)
Container that describes file type info.