KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_io_ltspice.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_IO_LTSPICE_H_
23#define SCH_IO_LTSPICE_H_
24
25#include <sch_io/sch_io.h>
26#include <sch_io/sch_io_mgr.h>
27#include <reporter.h>
28#include <wx/log.h>
29
30
31class SCH_SHEET;
32class SCH_SCREEN;
33
34
35class SCH_IO_LTSPICE : public SCH_IO
36{
37public:
38 SCH_IO_LTSPICE() : SCH_IO( wxS( "LTspice Schematic" ) )
39 {
41 }
42
44 {
45 }
46
48 {
49 return IO_BASE::IO_FILE_DESC( _HKI( "LTspice schematic files" ), { "asc" } );
50 }
51
53 {
54 // This was originally commented out, so keep it commented and just return an empty library description
55 //return IO_BASE::IO_FILE_DESC( _HKI( "LTspice library files" ), { "lib" } );
56 return IO_BASE::IO_FILE_DESC( wxEmptyString, { } );
57 }
58
59 int GetModifyHash() const override;
60
61 SCH_SHEET* LoadSchematicFile( const wxString& aFileName, SCHEMATIC* aSchematic,
62 SCH_SHEET* aAppendToMe = nullptr,
63 const std::map<std::string, UTF8>* aProperties = nullptr ) override;
64
65};
66#endif // SCH_IO_LTSPICE_H_
REPORTER * m_reporter
Reporter to log errors/warnings to, may be nullptr.
Definition: io_base.h:218
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.
const IO_BASE::IO_FILE_DESC GetLibraryDesc() const override
Get the descriptor for the library container that this IO plugin operates on.
int GetModifyHash() const override
schematic PLUGIN for LTspice (*.asc) and (.asy) format.
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
static REPORTER & GetInstance()
Definition: reporter.cpp:199
#define _HKI(x)
Container that describes file type info.
Definition: io_base.h:43