KiCad PCB EDA Suite
Loading...
Searching...
No Matches
spice_settings.cpp
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 The 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, see <https://www.gnu.org/licenses/>.
21 */
22
23#include "spice_settings.h"
24#include <settings/parameters.h>
25
26
28
29
30SPICE_SETTINGS::SPICE_SETTINGS( JSON_SETTINGS* aParent, const std::string& aPath ) :
31 NESTED_SETTINGS( "simulator", spiceSettingsSchemaVersion, aParent, aPath ),
32 m_fixIncludePaths( true )
33{
34 m_params.emplace_back( new PARAM<wxString>( "workbook_filename", &m_workbookFilename, "" ) );
35 m_params.emplace_back( new PARAM<bool>( "fix_include_paths", &m_fixIncludePaths, true ) );
36}
37
38
44
45
54
55
57{
58 const NGSPICE_SETTINGS* settings = dynamic_cast<const NGSPICE_SETTINGS*>( &aRhs );
59
60 wxCHECK( settings, false );
61
62 return SPICE_SETTINGS::operator==( aRhs )
64}
std::vector< PARAM_BASE * > m_params
The list of parameters (owned by this object)
JSON_SETTINGS(const wxString &aFilename, SETTINGS_LOC aLocation, int aSchemaVersion)
NESTED_SETTINGS(const std::string &aName, int aSchemaVersion, JSON_SETTINGS *aParent, const std::string &aPath, bool aLoadFromFile=true)
NGSPICE_SETTINGS(JSON_SETTINGS *aParent, const std::string &aPath)
bool operator==(const SPICE_SETTINGS &aRhs) const override
NGSPICE_COMPATIBILITY_MODE m_compatibilityMode
Stores an enum as an integer.
Definition parameters.h:230
wxString m_workbookFilename
SPICE_SETTINGS(JSON_SETTINGS *aParent, const std::string &aPath)
virtual bool operator==(const SPICE_SETTINGS &aRhs) const =0
const int spiceSettingsSchemaVersion
NGSPICE_COMPATIBILITY_MODE
Ngspice simulator compatibility modes.