41 BOOST_TEST_MESSAGE( fn.GetFullPath() );
62 screen->UpdateLocalLibSymbolLinks();
76 screen->MigrateSimModels();
86 sheet.UpdateAllScreenReferences();
98 fn.AppendDir(
"netlists" );
99 fn.AppendDir( aBaseName );
100 fn.SetName( aBaseName );
107template <
typename Exporter>
110 wxFileName netFile = m_schematic.Prj().GetProjectFullName();
113 netFile.SetName( netFile.GetName() +
"_test" );
117 return netFile.GetFullPath();
121template <
typename Exporter>
125 if( wxFileExists( GetNetlistPath(
true ) ) )
126 wxRemoveFile( GetNetlistPath(
true ) );
130 std::unique_ptr<Exporter> exporter = std::make_unique<Exporter>( &m_schematic );
132 bool success = exporter->WriteNetlist( GetNetlistPath(
true ), GetNetlistOptions(), reporter );
134 BOOST_REQUIRE( success && errors.IsEmpty() );
138template <
typename Exporter>
141 wxRemoveFile( GetNetlistPath(
true ) );
146template <
typename Exporter>
void Recalculate(const SCH_SHEET_LIST &aSheetList, bool aUnconditional=false, std::function< void(SCH_ITEM *)> *aChangedItemHandler=nullptr)
Updates the connection graph for the given list of sheets.
SETTINGS_MANAGER m_manager
virtual void LoadSchematic(const wxString &aRelativePath)
virtual wxFileName GetSchematicPath(const wxString &aBaseName)
virtual void SetElem(ELEM_T aIndex, _ELEM *aElem)
void Reset()
Initialize this schematic to a blank one, unloading anything existing.
SCH_SHEET_PATH & CurrentSheet() const override
CONNECTION_GRAPH * ConnectionGraph() const override
SCH_SHEET_LIST GetSheets() const override
Builds and returns an updated schematic hierarchy TODO: can this be cached?
void SetRoot(SCH_SHEET *aRootSheet)
Initialize the schematic with a new root sheet.
void SetProject(PROJECT *aPrj)
SCH_SCREEN * RootScreen() const
Helper to retrieve the screen of the root sheet.
virtual const wxString & GetError() const
Return an error string to the caller.
virtual SCH_SHEET * LoadSchematicFile(const wxString &aFileName, SCHEMATIC *aSchematic, SCH_SHEET *aAppendToMe=nullptr, const STRING_UTF8_MAP *aProperties=nullptr)
Load information from some input file format that this SCH_PLUGIN implementation knows about,...
Container class that holds multiple SCH_SCREEN objects in a hierarchy.
void FixLegacyPowerSymbolMismatches()
Fix legacy power symbols that have mismatched value text fields and invisible power pin names.
const std::vector< SCH_SYMBOL_INSTANCE > & GetSymbolInstances() const
int GetFileFormatVersionAtLoad() const
const std::vector< SCH_SHEET_INSTANCE > & GetSheetInstances() const
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
void UpdateSheetInstanceData(const std::vector< SCH_SHEET_INSTANCE > &aSheetInstances)
Update all of the sheet instance information using aSheetInstances.
void AnnotatePowerSymbols()
Silently annotate the not yet annotated power symbols of the entire hierarchy of the sheet path list.
void UpdateSymbolInstanceData(const std::vector< SCH_SYMBOL_INSTANCE > &aSymbolInstances)
Update all of the symbol instance information using aSymbolInstances.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
void push_back(SCH_SHEET *aSheet)
Forwarded method from std::vector.
bool LoadProject(const wxString &aFullPath, bool aSetActive=true)
Loads a project or sets up a new project with a specified path.
PROJECT & Prj() const
A helper while we are not MDI-capable – return the one and only project.
void TestNetlist(const wxString &aBaseName)
virtual wxString GetNetlistPath(bool aTest=false)
A wrapper for reporting to a wxString object.
const std::string ProjectFileExtension
const std::string NetlistFileExtension
const std::string KiCadSchematicFileExtension
void LoadSchematic(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< SCHEMATIC > &aSchematic)
std::string GetEeschemaTestDataDir()
Get the configured location of Eeschema test data.
Definition of file extensions used in Kicad.