KiCad PCB EDA Suite
spice_settings.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) 2021 CERN
5  * Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * @author Wayne Stambaugh <[email protected]>
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; either version 3
12  * of the License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, you may find one here:
21  * https://www.gnu.org/licenses/gpl-3.0.html
22  * or you may search the http://www.gnu.org website for the version 3 license,
23  * or you may write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
25  */
26 
27 #ifndef __SPICE_SETTINGS_H__
28 #define __SPICE_SETTINGS_H__
29 
31 
32 
37 {
38 public:
39  SPICE_SIMULATOR_SETTINGS( JSON_SETTINGS* aParent, const std::string& aPath );
40 
42 
43  virtual bool operator==( const SPICE_SIMULATOR_SETTINGS& aRhs ) const = 0;
44 
45  bool operator!=( const SPICE_SIMULATOR_SETTINGS& aRhs ) const { return !( *this == aRhs ); }
46 
47  wxString GetWorkbookFilename() const { return m_workbookFilename; }
48  void SetWorkbookFilename( const wxString& aFilename ) { m_workbookFilename = aFilename; }
49 
50  bool GetFixPassiveVals() const { return m_fixPassiveVals; }
51  void SetFixPassiveVals( bool aFixPassiveVals )
52  {
53  m_fixPassiveVals = aFixPassiveVals;
54  }
55 
56  bool GetFixIncludePaths() const { return m_fixIncludePaths; }
57  void SetFixIncludePaths( bool aFixIncludePaths )
58  {
59  m_fixIncludePaths = aFixIncludePaths;
60  }
61 
62 private:
66 };
67 
73 enum class NGSPICE_MODEL_MODE {
75  NGSPICE,
76  PSPICE,
77  LTSPICE,
78  LT_PSPICE,
79  HSPICE
80 };
81 
82 
87 {
88 public:
89  NGSPICE_SIMULATOR_SETTINGS( JSON_SETTINGS* aParent, const std::string& aPath );
91 
92  bool operator==( const SPICE_SIMULATOR_SETTINGS& aRhs ) const override;
93 
95  void SetModelMode( NGSPICE_MODEL_MODE aMode ) { m_modelMode = aMode; }
96 
97 private:
99 };
100 
101 
102 #endif // __SPICE_SETTINGS_H__
SPICE_SIMULATOR_SETTINGS(JSON_SETTINGS *aParent, const std::string &aPath)
void SetWorkbookFilename(const wxString &aFilename)
NGSPICE_MODEL_MODE
Ngspice simulator model compatibility modes.
void SetFixPassiveVals(bool aFixPassiveVals)
virtual ~SPICE_SIMULATOR_SETTINGS()
NESTED_SETTINGS is a JSON_SETTINGS that lives inside a JSON_SETTINGS.
virtual bool operator==(const SPICE_SIMULATOR_SETTINGS &aRhs) const =0
void SetFixIncludePaths(bool aFixIncludePaths)
wxString GetWorkbookFilename() const
bool operator!=(const SPICE_SIMULATOR_SETTINGS &aRhs) const
NGSPICE_MODEL_MODE m_modelMode
bool GetFixIncludePaths() const
bool GetFixPassiveVals() const
bool operator==(const SPICE_SIMULATOR_SETTINGS &aRhs) const override
NGSPICE_MODEL_MODE GetModelMode() const
Container for Ngspice simulator settings.
NGSPICE_SIMULATOR_SETTINGS(JSON_SETTINGS *aParent, const std::string &aPath)
void SetModelMode(NGSPICE_MODEL_MODE aMode)
Storage for simulator specific settings.