2021-03-19 13:04:28 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2021 CERN
|
2023-08-26 21:42:54 +00:00
|
|
|
* Copyright (C) 2021-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
2021-03-19 13:04:28 +00:00
|
|
|
*
|
|
|
|
* @author Wayne Stambaugh <stambaughw@gmail.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 3
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* https://www.gnu.org/licenses/gpl-3.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 3 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __SPICE_SETTINGS_H__
|
|
|
|
#define __SPICE_SETTINGS_H__
|
|
|
|
|
|
|
|
#include <settings/nested_settings.h>
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Storage for simulator specific settings.
|
|
|
|
*/
|
2023-07-14 09:21:58 +00:00
|
|
|
class SPICE_SETTINGS : public NESTED_SETTINGS
|
2021-03-19 13:04:28 +00:00
|
|
|
{
|
|
|
|
public:
|
2023-07-14 09:21:58 +00:00
|
|
|
SPICE_SETTINGS( JSON_SETTINGS* aParent, const std::string& aPath );
|
2021-03-19 13:04:28 +00:00
|
|
|
|
2023-07-14 09:21:58 +00:00
|
|
|
virtual ~SPICE_SETTINGS() {}
|
2021-03-19 13:04:28 +00:00
|
|
|
|
2023-07-14 09:21:58 +00:00
|
|
|
virtual bool operator==( const SPICE_SETTINGS& aRhs ) const = 0;
|
2021-03-19 13:04:28 +00:00
|
|
|
|
2023-07-14 09:21:58 +00:00
|
|
|
bool operator!=( const SPICE_SETTINGS& aRhs ) const { return !( *this == aRhs ); }
|
2021-05-04 22:35:04 +00:00
|
|
|
|
2021-05-09 23:32:49 +00:00
|
|
|
wxString GetWorkbookFilename() const { return m_workbookFilename; }
|
2021-07-27 12:22:27 +00:00
|
|
|
void SetWorkbookFilename( const wxString& aFilename ) { m_workbookFilename = aFilename; }
|
2021-05-04 22:35:04 +00:00
|
|
|
|
2021-07-05 22:17:11 +00:00
|
|
|
bool GetFixIncludePaths() const { return m_fixIncludePaths; }
|
2023-08-26 21:42:54 +00:00
|
|
|
void SetFixIncludePaths( bool aFixIncludePaths ) { m_fixIncludePaths = aFixIncludePaths; }
|
2021-07-05 22:17:11 +00:00
|
|
|
|
2021-05-04 22:35:04 +00:00
|
|
|
private:
|
2021-05-09 23:32:49 +00:00
|
|
|
wxString m_workbookFilename;
|
2023-08-26 21:42:54 +00:00
|
|
|
bool m_fixIncludePaths;
|
2021-03-19 13:04:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2023-07-14 09:21:58 +00:00
|
|
|
* Ngspice simulator compatibility modes.
|
2021-03-19 13:04:28 +00:00
|
|
|
*
|
|
|
|
* @note The ngspice model modes are mutually exclusive.
|
|
|
|
*/
|
2023-07-14 09:21:58 +00:00
|
|
|
enum class NGSPICE_COMPATIBILITY_MODE
|
|
|
|
{
|
2021-03-19 13:04:28 +00:00
|
|
|
USER_CONFIG,
|
|
|
|
NGSPICE,
|
|
|
|
PSPICE,
|
|
|
|
LTSPICE,
|
|
|
|
LT_PSPICE,
|
|
|
|
HSPICE
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Container for Ngspice simulator settings.
|
|
|
|
*/
|
2023-07-14 09:21:58 +00:00
|
|
|
class NGSPICE_SETTINGS : public SPICE_SETTINGS
|
2021-03-19 13:04:28 +00:00
|
|
|
{
|
|
|
|
public:
|
2023-07-14 09:21:58 +00:00
|
|
|
NGSPICE_SETTINGS( JSON_SETTINGS* aParent, const std::string& aPath );
|
|
|
|
virtual ~NGSPICE_SETTINGS() {}
|
2021-03-19 13:04:28 +00:00
|
|
|
|
2023-07-14 09:21:58 +00:00
|
|
|
bool operator==( const SPICE_SETTINGS& aRhs ) const override;
|
2021-03-19 13:04:28 +00:00
|
|
|
|
2023-07-14 09:21:58 +00:00
|
|
|
NGSPICE_COMPATIBILITY_MODE GetCompatibilityMode() const { return m_compatibilityMode; }
|
|
|
|
void SetCompatibilityMode( NGSPICE_COMPATIBILITY_MODE aMode ) { m_compatibilityMode = aMode; }
|
2021-03-19 13:04:28 +00:00
|
|
|
|
|
|
|
private:
|
2023-07-14 09:21:58 +00:00
|
|
|
NGSPICE_COMPATIBILITY_MODE m_compatibilityMode;
|
2021-03-19 13:04:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // __SPICE_SETTINGS_H__
|