Coding policy fixes.
This commit is contained in:
parent
c39bec4c08
commit
8975f26c26
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2020 Thomas Pointhuber <thomas.pointhuber@gmx.at>
|
||||
* Copyright (C) 2021-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2021-2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -181,7 +181,8 @@ static void SetLibShapeLine( const ASCH_BORDER_INTERFACE& elem, LIB_SHAPE* shape
|
|||
shape->SetStroke( STROKE_PARAMS( elem.LineWidth, LINE_STYLE::SOLID, color ) );
|
||||
}
|
||||
|
||||
static void SetLibShapeFillAndColor( const ASCH_FILL_INTERFACE& elem, LIB_SHAPE* shape, ALTIUM_SCH_RECORD aType, int aStrokeColor )
|
||||
static void SetLibShapeFillAndColor( const ASCH_FILL_INTERFACE& elem, LIB_SHAPE* shape,
|
||||
ALTIUM_SCH_RECORD aType, int aStrokeColor )
|
||||
{
|
||||
COLOR4D bgcolor = GetColorFromInt( elem.AreaColor );
|
||||
COLOR4D default_bgcolor;
|
||||
|
@ -214,7 +215,8 @@ static void SetLibShapeFillAndColor( const ASCH_FILL_INTERFACE& elem, LIB_SHAPE*
|
|||
|
||||
shape->SetFillColor( bgcolor );
|
||||
|
||||
if( elem.AreaColor == aStrokeColor && shape->GetStroke().GetWidth() == schIUScale.MilsToIU( 1 ) )
|
||||
if( elem.AreaColor == aStrokeColor
|
||||
&& shape->GetStroke().GetWidth() == schIUScale.MilsToIU( 1 ) )
|
||||
{
|
||||
STROKE_PARAMS stroke = shape->GetStroke();
|
||||
stroke.SetWidth( -1 );
|
||||
|
@ -312,8 +314,8 @@ wxFileName SCH_IO_ALTIUM::getLibFileName()
|
|||
|
||||
|
||||
SCH_SHEET* SCH_IO_ALTIUM::LoadSchematicFile( const wxString& aFileName, SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* aAppendToMe,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
SCH_SHEET* aAppendToMe,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxCHECK( !aFileName.IsEmpty() && aSchematic, nullptr );
|
||||
|
||||
|
@ -902,7 +904,7 @@ const ASCH_STORAGE_FILE* SCH_IO_ALTIUM::GetFileFromStorage( const wxString& aFil
|
|||
|
||||
|
||||
void SCH_IO_ALTIUM::ParseComponent( int aIndex,
|
||||
const std::map<wxString, wxString>& aProperties )
|
||||
const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
SCH_SHEET* currentSheet = m_sheetPath.Last();
|
||||
wxCHECK( currentSheet, /* void */ );
|
||||
|
@ -965,7 +967,8 @@ void SCH_IO_ALTIUM::ParseComponent( int aIndex,
|
|||
|
||||
|
||||
|
||||
void SCH_IO_ALTIUM::ParsePin( const std::map<wxString, wxString>& aProperties, std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
void SCH_IO_ALTIUM::ParsePin( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
{
|
||||
ASCH_PIN elem( aProperties );
|
||||
|
||||
|
@ -1227,7 +1230,8 @@ void SetTextPositioning( EDA_TEXT* text, ASCH_LABEL_JUSTIFICATION justification,
|
|||
}
|
||||
|
||||
|
||||
void SCH_IO_ALTIUM::ParseLabel( const std::map<wxString, wxString>& aProperties, std::vector<LIB_SYMBOL*>& aSymbol, std::vector<int>& aFontSizes )
|
||||
void SCH_IO_ALTIUM::ParseLabel( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol, std::vector<int>& aFontSizes )
|
||||
{
|
||||
ASCH_LABEL elem( aProperties );
|
||||
|
||||
|
@ -1285,7 +1289,7 @@ void SCH_IO_ALTIUM::ParseLabel( const std::map<wxString, wxString>& aProperties,
|
|||
{
|
||||
// TODO: e.g. can depend on Template (RECORD=39
|
||||
m_reporter->Report( wxString::Format( wxT( "Label's owner (%d) not found." ),
|
||||
elem.ownerindex ),
|
||||
elem.ownerindex ),
|
||||
RPT_SEVERITY_DEBUG );
|
||||
return;
|
||||
}
|
||||
|
@ -1325,7 +1329,9 @@ void SCH_IO_ALTIUM::ParseLabel( const std::map<wxString, wxString>& aProperties,
|
|||
}
|
||||
|
||||
|
||||
void SCH_IO_ALTIUM::ParseTextFrame( const std::map<wxString, wxString>& aProperties, std::vector<LIB_SYMBOL*>& aSymbol, std::vector<int>& aFontSizes )
|
||||
void SCH_IO_ALTIUM::ParseTextFrame( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol,
|
||||
std::vector<int>& aFontSizes )
|
||||
{
|
||||
ASCH_TEXT_FRAME elem( aProperties );
|
||||
|
||||
|
@ -1337,7 +1343,7 @@ void SCH_IO_ALTIUM::ParseTextFrame( const std::map<wxString, wxString>& aPropert
|
|||
|
||||
|
||||
void SCH_IO_ALTIUM::ParseNote( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
{
|
||||
ASCH_NOTE elem( aProperties );
|
||||
AddTextBox( static_cast<ASCH_TEXT_FRAME*>( &elem ) );
|
||||
|
||||
|
@ -1345,7 +1351,7 @@ void SCH_IO_ALTIUM::ParseNote( const std::map<wxString, wxString>& aProperties )
|
|||
}
|
||||
|
||||
|
||||
void SCH_IO_ALTIUM::AddTextBox(const ASCH_TEXT_FRAME *aElem )
|
||||
void SCH_IO_ALTIUM::AddTextBox( const ASCH_TEXT_FRAME *aElem )
|
||||
{
|
||||
SCH_TEXTBOX* textBox = new SCH_TEXTBOX();
|
||||
|
||||
|
@ -1408,7 +1414,8 @@ void SCH_IO_ALTIUM::AddTextBox(const ASCH_TEXT_FRAME *aElem )
|
|||
}
|
||||
|
||||
|
||||
void SCH_IO_ALTIUM::AddLibTextBox(const ASCH_TEXT_FRAME *aElem, std::vector<LIB_SYMBOL*>& aSymbol, std::vector<int>& aFontSizes )
|
||||
void SCH_IO_ALTIUM::AddLibTextBox( const ASCH_TEXT_FRAME *aElem, std::vector<LIB_SYMBOL*>& aSymbol,
|
||||
std::vector<int>& aFontSizes )
|
||||
{
|
||||
LIB_SYMBOL* symbol = static_cast<int>( aSymbol.size() ) <= aElem->ownerpartdisplaymode
|
||||
? nullptr
|
||||
|
@ -1488,7 +1495,7 @@ void SCH_IO_ALTIUM::AddLibTextBox(const ASCH_TEXT_FRAME *aElem, std::vector<LIB_
|
|||
|
||||
|
||||
void SCH_IO_ALTIUM::ParseBezier( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
{
|
||||
ASCH_BEZIER elem( aProperties );
|
||||
|
||||
|
@ -1562,8 +1569,8 @@ void SCH_IO_ALTIUM::ParseBezier( const std::map<wxString, wxString>& aProperties
|
|||
{
|
||||
// TODO: e.g. can depend on Template (RECORD=39
|
||||
m_reporter->Report( wxString::Format( wxT( "Bezier's owner (%d) not found." ),
|
||||
elem.ownerindex ),
|
||||
RPT_SEVERITY_DEBUG );
|
||||
elem.ownerindex ),
|
||||
RPT_SEVERITY_DEBUG );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1652,7 +1659,7 @@ void SCH_IO_ALTIUM::ParseBezier( const std::map<wxString, wxString>& aProperties
|
|||
|
||||
|
||||
void SCH_IO_ALTIUM::ParsePolyline( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
{
|
||||
ASCH_POLYLINE elem( aProperties );
|
||||
|
||||
|
@ -1687,7 +1694,7 @@ void SCH_IO_ALTIUM::ParsePolyline( const std::map<wxString, wxString>& aProperti
|
|||
{
|
||||
// TODO: e.g. can depend on Template (RECORD=39
|
||||
m_reporter->Report( wxString::Format( wxT( "Polyline's owner (%d) not found." ),
|
||||
elem.ownerindex ),
|
||||
elem.ownerindex ),
|
||||
RPT_SEVERITY_DEBUG );
|
||||
return;
|
||||
}
|
||||
|
@ -1722,7 +1729,7 @@ void SCH_IO_ALTIUM::ParsePolyline( const std::map<wxString, wxString>& aProperti
|
|||
|
||||
|
||||
void SCH_IO_ALTIUM::ParsePolygon( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
{
|
||||
ASCH_POLYGON elem( aProperties );
|
||||
|
||||
|
@ -1791,7 +1798,8 @@ void SCH_IO_ALTIUM::ParsePolygon( const std::map<wxString, wxString>& aPropertie
|
|||
SetLibShapeLine( elem, line, ALTIUM_SCH_RECORD::POLYGON );
|
||||
SetLibShapeFillAndColor( elem, line, ALTIUM_SCH_RECORD::POLYGON, elem.Color );
|
||||
|
||||
if( line->GetFillColor() == line->GetStroke().GetColor() && line->GetFillMode() != FILL_T::NO_FILL )
|
||||
if( line->GetFillColor() == line->GetStroke().GetColor()
|
||||
&& line->GetFillMode() != FILL_T::NO_FILL )
|
||||
{
|
||||
STROKE_PARAMS stroke = line->GetStroke();
|
||||
stroke.SetWidth( -1 );
|
||||
|
@ -1802,7 +1810,7 @@ void SCH_IO_ALTIUM::ParsePolygon( const std::map<wxString, wxString>& aPropertie
|
|||
|
||||
|
||||
void SCH_IO_ALTIUM::ParseRoundRectangle( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
{
|
||||
ASCH_ROUND_RECTANGLE elem( aProperties );
|
||||
|
||||
|
@ -1840,8 +1848,8 @@ void SCH_IO_ALTIUM::ParseRoundRectangle( const std::map<wxString, wxString>& aPr
|
|||
{
|
||||
// TODO: e.g. can depend on Template (RECORD=39
|
||||
m_reporter->Report( wxString::Format( wxT( "Rounded rectangle's owner (%d) not "
|
||||
"found." ),
|
||||
elem.ownerindex ),
|
||||
"found." ),
|
||||
elem.ownerindex ),
|
||||
RPT_SEVERITY_DEBUG );
|
||||
return;
|
||||
}
|
||||
|
@ -1894,7 +1902,8 @@ void SCH_IO_ALTIUM::ParseRoundRectangle( const std::map<wxString, wxString>& aPr
|
|||
}
|
||||
|
||||
|
||||
void SCH_IO_ALTIUM::ParseArc( const std::map<wxString, wxString>& aProperties, std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
void SCH_IO_ALTIUM::ParseArc( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
{
|
||||
ASCH_ARC elem( aProperties );
|
||||
|
||||
|
@ -2007,7 +2016,8 @@ void SCH_IO_ALTIUM::ParseArc( const std::map<wxString, wxString>& aProperties, s
|
|||
}
|
||||
|
||||
|
||||
void SCH_IO_ALTIUM::ParseEllipticalArc( const std::map<wxString, wxString>& aProperties, std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
void SCH_IO_ALTIUM::ParseEllipticalArc( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
{
|
||||
ASCH_ARC elem( aProperties );
|
||||
|
||||
|
@ -2101,7 +2111,8 @@ void SCH_IO_ALTIUM::ParseEllipticalArc( const std::map<wxString, wxString>& aPro
|
|||
}
|
||||
|
||||
|
||||
void SCH_IO_ALTIUM::ParseEllipse( const std::map<wxString, wxString>& aProperties, std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
void SCH_IO_ALTIUM::ParseEllipse( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
{
|
||||
ASCH_ELLIPSE elem( aProperties );
|
||||
|
||||
|
@ -2116,7 +2127,8 @@ void SCH_IO_ALTIUM::ParseEllipse( const std::map<wxString, wxString>& aPropertie
|
|||
SCH_SCREEN* screen = getCurrentScreen();
|
||||
wxCHECK( screen, /* void */ );
|
||||
|
||||
ELLIPSE<int> ellipse( elem.Center + m_sheetOffset, elem.Radius, KiROUND(elem.SecondaryRadius ), EDA_ANGLE::m_Angle0 );
|
||||
ELLIPSE<int> ellipse( elem.Center + m_sheetOffset, elem.Radius,
|
||||
KiROUND(elem.SecondaryRadius ), EDA_ANGLE::m_Angle0 );
|
||||
std::vector<BEZIER<int>> beziers;
|
||||
|
||||
TransformEllipseToBeziers( ellipse, beziers );
|
||||
|
@ -2164,7 +2176,8 @@ void SCH_IO_ALTIUM::ParseEllipse( const std::map<wxString, wxString>& aPropertie
|
|||
schsym = m_symbols.at( libSymbolIt->first );
|
||||
}
|
||||
|
||||
ELLIPSE<int> ellipse( elem.Center, elem.Radius, KiROUND(elem.SecondaryRadius ), EDA_ANGLE::m_Angle0 );
|
||||
ELLIPSE<int> ellipse( elem.Center, elem.Radius, KiROUND(elem.SecondaryRadius ),
|
||||
EDA_ANGLE::m_Angle0 );
|
||||
std::vector<BEZIER<int>> beziers;
|
||||
|
||||
TransformEllipseToBeziers( ellipse, beziers );
|
||||
|
@ -2229,7 +2242,8 @@ void SCH_IO_ALTIUM::ParseEllipse( const std::map<wxString, wxString>& aPropertie
|
|||
}
|
||||
|
||||
|
||||
void SCH_IO_ALTIUM::ParseCircle( const std::map<wxString, wxString>& aProperties, std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
void SCH_IO_ALTIUM::ParseCircle( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
{
|
||||
ASCH_ELLIPSE elem( aProperties );
|
||||
|
||||
|
@ -2295,7 +2309,8 @@ void SCH_IO_ALTIUM::ParseCircle( const std::map<wxString, wxString>& aProperties
|
|||
}
|
||||
|
||||
|
||||
void SCH_IO_ALTIUM::ParseLine( const std::map<wxString, wxString>& aProperties, std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
void SCH_IO_ALTIUM::ParseLine( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
{
|
||||
ASCH_LINE elem( aProperties );
|
||||
|
||||
|
@ -2393,7 +2408,7 @@ void SCH_IO_ALTIUM::ParseSignalHarness( const std::map<wxString, wxString>& aPro
|
|||
|
||||
|
||||
void SCH_IO_ALTIUM::ParseHarnessConnector( int aIndex, const std::map<wxString,
|
||||
wxString>& aProperties )
|
||||
wxString>& aProperties )
|
||||
{
|
||||
ASCH_HARNESS_CONNECTOR elem( aProperties );
|
||||
|
||||
|
@ -2527,7 +2542,7 @@ void SCH_IO_ALTIUM::ParseHarnessType( const std::map<wxString, wxString>& aPrope
|
|||
|
||||
|
||||
void SCH_IO_ALTIUM::ParseRectangle( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
{
|
||||
ASCH_RECTANGLE elem( aProperties );
|
||||
|
||||
|
@ -2599,7 +2614,7 @@ void SCH_IO_ALTIUM::ParseRectangle( const std::map<wxString, wxString>& aPropert
|
|||
|
||||
|
||||
void SCH_IO_ALTIUM::ParseSheetSymbol( int aIndex,
|
||||
const std::map<wxString, wxString>& aProperties )
|
||||
const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
ASCH_SHEET_SYMBOL elem( aProperties );
|
||||
|
||||
|
@ -3520,8 +3535,8 @@ void SCH_IO_ALTIUM::ParseDesignator( const std::map<wxString, wxString>& aProper
|
|||
|
||||
|
||||
void SCH_IO_ALTIUM::ParseLibDesignator( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol,
|
||||
std::vector<int>& aFontSizes )
|
||||
std::vector<LIB_SYMBOL*>& aSymbol,
|
||||
std::vector<int>& aFontSizes )
|
||||
{
|
||||
ASCH_DESIGNATOR elem( aProperties );
|
||||
|
||||
|
@ -3663,8 +3678,8 @@ void SCH_IO_ALTIUM::ParseParameter( const std::map<wxString, wxString>& aPropert
|
|||
|
||||
|
||||
void SCH_IO_ALTIUM::ParseLibParameter( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol,
|
||||
std::vector<int>& aFontSizes )
|
||||
std::vector<LIB_SYMBOL*>& aSymbol,
|
||||
std::vector<int>& aFontSizes )
|
||||
{
|
||||
ASCH_PARAMETER elem( aProperties );
|
||||
|
||||
|
@ -3737,7 +3752,7 @@ void SCH_IO_ALTIUM::ParseLibParameter( const std::map<wxString, wxString>& aProp
|
|||
|
||||
|
||||
void SCH_IO_ALTIUM::ParseImplementationList( int aIndex,
|
||||
const std::map<wxString, wxString>& aProperties )
|
||||
const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
ASCH_IMPLEMENTATION_LIST elem( aProperties );
|
||||
|
||||
|
@ -3746,7 +3761,7 @@ void SCH_IO_ALTIUM::ParseImplementationList( int aIndex,
|
|||
|
||||
|
||||
void SCH_IO_ALTIUM::ParseImplementation( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
{
|
||||
ASCH_IMPLEMENTATION elem( aProperties );
|
||||
|
||||
|
@ -3809,7 +3824,8 @@ void SCH_IO_ALTIUM::ParseImplementation( const std::map<wxString, wxString>& aPr
|
|||
|
||||
|
||||
|
||||
std::vector<LIB_SYMBOL*> SCH_IO_ALTIUM::ParseLibComponent( const std::map<wxString, wxString>& aProperties )
|
||||
std::vector<LIB_SYMBOL*> SCH_IO_ALTIUM::ParseLibComponent( const std::map<wxString,
|
||||
wxString>& aProperties )
|
||||
{
|
||||
ASCH_SYMBOL elem( aProperties );
|
||||
|
||||
|
@ -3822,7 +3838,8 @@ std::vector<LIB_SYMBOL*> SCH_IO_ALTIUM::ParseLibComponent( const std::map<wxStri
|
|||
LIB_SYMBOL* symbol = new LIB_SYMBOL( wxEmptyString );
|
||||
|
||||
if( elem.displaymodecount > 1 )
|
||||
symbol->SetName( wxString::Format( "%s (Altium Display %d)", elem.libreference, i + 1 ) );
|
||||
symbol->SetName( wxString::Format( "%s (Altium Display %d)", elem.libreference,
|
||||
i + 1 ) );
|
||||
else
|
||||
symbol->SetName( elem.libreference );
|
||||
|
||||
|
@ -4020,7 +4037,7 @@ long long SCH_IO_ALTIUM::getLibraryTimestamp( const wxString& aLibraryPath ) con
|
|||
|
||||
|
||||
void SCH_IO_ALTIUM::ensureLoadedLibrary( const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
if( m_libCache.count( aLibraryPath ) )
|
||||
{
|
||||
|
@ -4080,7 +4097,8 @@ void SCH_IO_ALTIUM::ensureLoadedLibrary( const wxString& aLibraryPath,
|
|||
}
|
||||
|
||||
|
||||
void SCH_IO_ALTIUM::ParseLibHeader( const ALTIUM_COMPOUND_FILE& aAltiumSchFile, std::vector<int>& aFontSizes )
|
||||
void SCH_IO_ALTIUM::ParseLibHeader( const ALTIUM_COMPOUND_FILE& aAltiumSchFile,
|
||||
std::vector<int>& aFontSizes )
|
||||
{
|
||||
const CFB::COMPOUND_FILE_ENTRY* file = aAltiumSchFile.FindStream( { "FileHeader" } );
|
||||
|
||||
|
@ -4126,8 +4144,8 @@ void SCH_IO_ALTIUM::ParseLibHeader( const ALTIUM_COMPOUND_FILE& aAltiumSchFile,
|
|||
|
||||
|
||||
void SCH_IO_ALTIUM::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
ensureLoadedLibrary( aLibraryPath, aProperties );
|
||||
|
||||
|
@ -4143,8 +4161,8 @@ void SCH_IO_ALTIUM::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
|||
|
||||
|
||||
void SCH_IO_ALTIUM::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
ensureLoadedLibrary( aLibraryPath, aProperties );
|
||||
|
||||
|
@ -4158,8 +4176,8 @@ void SCH_IO_ALTIUM::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
|||
}
|
||||
|
||||
LIB_SYMBOL* SCH_IO_ALTIUM::LoadSymbol( const wxString& aLibraryPath,
|
||||
const wxString& aAliasName,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const wxString& aAliasName,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
ensureLoadedLibrary( aLibraryPath, aProperties );
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2020 Roberto Fernandez Bautista <roberto.fer.bau@gmail.com>
|
||||
* Copyright (C) 2020-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2020-2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* 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
|
||||
|
@ -62,9 +62,9 @@ int SCH_IO_CADSTAR_ARCHIVE::GetModifyHash() const
|
|||
|
||||
|
||||
SCH_SHEET* SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile( const wxString& aFileName,
|
||||
SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* aAppendToMe,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* aAppendToMe,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxCHECK( !aFileName.IsEmpty() && aSchematic, nullptr );
|
||||
|
||||
|
@ -175,8 +175,8 @@ SCH_SHEET* SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile( const wxString& aFi
|
|||
|
||||
|
||||
void SCH_IO_CADSTAR_ARCHIVE::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
ensureLoadedLibrary( aLibraryPath, aProperties );
|
||||
|
||||
|
@ -186,8 +186,8 @@ void SCH_IO_CADSTAR_ARCHIVE::EnumerateSymbolLib( wxArrayString& aSymbolN
|
|||
|
||||
|
||||
void SCH_IO_CADSTAR_ARCHIVE::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
ensureLoadedLibrary( aLibraryPath, aProperties );
|
||||
|
||||
|
@ -197,8 +197,8 @@ void SCH_IO_CADSTAR_ARCHIVE::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymb
|
|||
|
||||
|
||||
LIB_SYMBOL* SCH_IO_CADSTAR_ARCHIVE::LoadSymbol( const wxString& aLibraryPath,
|
||||
const wxString& aAliasName,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const wxString& aAliasName,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
ensureLoadedLibrary( aLibraryPath, aProperties );
|
||||
|
||||
|
@ -246,7 +246,7 @@ void SCH_IO_CADSTAR_ARCHIVE::GetLibraryOptions( STRING_UTF8_MAP* aListToAppendTo
|
|||
|
||||
|
||||
void SCH_IO_CADSTAR_ARCHIVE::ensureLoadedLibrary( const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxFileName csafn;
|
||||
wxString fplibname = "cadstarpcblib";
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2022 Jon Evans <jon@craftyjon.com>
|
||||
* Copyright (C) 2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2022-2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* 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
|
||||
|
@ -47,8 +47,8 @@ SCH_IO_DATABASE::~SCH_IO_DATABASE()
|
|||
|
||||
|
||||
void SCH_IO_DATABASE::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
std::vector<LIB_SYMBOL*> symbols;
|
||||
EnumerateSymbolLib( symbols, aLibraryPath, aProperties );
|
||||
|
@ -59,8 +59,8 @@ void SCH_IO_DATABASE::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
|||
|
||||
|
||||
void SCH_IO_DATABASE::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxCHECK_RET( m_libTable, "Database plugin missing library table handle!" );
|
||||
ensureSettings( aLibraryPath );
|
||||
|
@ -108,8 +108,8 @@ void SCH_IO_DATABASE::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
|||
|
||||
|
||||
LIB_SYMBOL* SCH_IO_DATABASE::LoadSymbol( const wxString& aLibraryPath,
|
||||
const wxString& aAliasName,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const wxString& aAliasName,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxCHECK( m_libTable, nullptr );
|
||||
ensureSettings( aLibraryPath );
|
||||
|
@ -389,8 +389,8 @@ std::optional<bool> SCH_IO_DATABASE::boolFromAny( const std::any& aVal )
|
|||
|
||||
|
||||
LIB_SYMBOL* SCH_IO_DATABASE::loadSymbolFromRow( const wxString& aSymbolName,
|
||||
const DATABASE_LIB_TABLE& aTable,
|
||||
const DATABASE_CONNECTION::ROW& aRow )
|
||||
const DATABASE_LIB_TABLE& aTable,
|
||||
const DATABASE_CONNECTION::ROW& aRow )
|
||||
{
|
||||
LIB_SYMBOL* symbol = nullptr;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2023 Alex Shvartzkop <dudesuchamazing@gmail.com>
|
||||
* Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2023-2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -278,8 +278,8 @@ LIB_SYMBOL* loadSymbol( const wxString& aLibraryPath, nlohmann::json aFileData,
|
|||
|
||||
|
||||
void SCH_IO_EASYEDA::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
std::map<wxString, int> namesCounter;
|
||||
|
||||
|
@ -401,8 +401,8 @@ void SCH_IO_EASYEDA::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
|||
|
||||
|
||||
void SCH_IO_EASYEDA::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxFFileInputStream in( aLibraryPath );
|
||||
nlohmann::json js;
|
||||
|
@ -443,8 +443,8 @@ void SCH_IO_EASYEDA::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
|||
|
||||
|
||||
LIB_SYMBOL* SCH_IO_EASYEDA::LoadSymbol( const wxString& aLibraryPath,
|
||||
const wxString& aAliasName,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const wxString& aAliasName,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -538,8 +538,8 @@ static void LoadSchematic( SCHEMATIC* aSchematic, SCH_SHEET* aRootSheet, const w
|
|||
|
||||
|
||||
SCH_SHEET* SCH_IO_EASYEDA::LoadSchematicFile( const wxString& aFileName, SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* aAppendToMe,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
SCH_SHEET* aAppendToMe,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxCHECK( !aFileName.IsEmpty() && aSchematic, nullptr );
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2023 Alex Shvartzkop <dudesuchamazing@gmail.com>
|
||||
* Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2023-2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -214,8 +214,8 @@ static LIB_SYMBOL* loadSymbol( nlohmann::json project, const wxString& aLibraryP
|
|||
|
||||
|
||||
void SCH_IO_EASYEDAPRO::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxFileName fname( aLibraryPath );
|
||||
|
||||
|
@ -260,8 +260,8 @@ void SCH_IO_EASYEDAPRO::EnumerateSymbolLib( wxArrayString& aSymbolNameLi
|
|||
|
||||
|
||||
void SCH_IO_EASYEDAPRO::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxFileName libFname( aLibraryPath );
|
||||
wxArrayString symbolNameList;
|
||||
|
@ -381,8 +381,8 @@ LIB_SYMBOL* SCH_IO_EASYEDAPRO::LoadSymbol( const wxString& aLibraryPath, const w
|
|||
|
||||
|
||||
SCH_SHEET* SCH_IO_EASYEDAPRO::LoadSchematicFile( const wxString& aFileName,
|
||||
SCHEMATIC* aSchematic, SCH_SHEET* aAppendToMe,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
SCHEMATIC* aSchematic, SCH_SHEET* aAppendToMe,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxCHECK( !aFileName.IsEmpty() && aSchematic, nullptr );
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2023 Andre F. K. Iwers <iwers11@gmail.com>
|
||||
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* 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
|
||||
|
@ -40,8 +41,8 @@ SCH_IO_HTTP_LIB::~SCH_IO_HTTP_LIB()
|
|||
|
||||
|
||||
void SCH_IO_HTTP_LIB::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
std::vector<LIB_SYMBOL*> symbols;
|
||||
EnumerateSymbolLib( symbols, aLibraryPath, aProperties );
|
||||
|
@ -52,8 +53,8 @@ void SCH_IO_HTTP_LIB::EnumerateSymbolLib( wxArrayString& aSymbolNameList
|
|||
|
||||
|
||||
void SCH_IO_HTTP_LIB::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxCHECK_RET( m_libTable, _("httplib plugin missing library table handle!") );
|
||||
ensureSettings( aLibraryPath );
|
||||
|
@ -125,8 +126,8 @@ void SCH_IO_HTTP_LIB::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
|||
|
||||
|
||||
LIB_SYMBOL* SCH_IO_HTTP_LIB::LoadSymbol( const wxString& aLibraryPath,
|
||||
const wxString& aAliasName,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const wxString& aAliasName,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxCHECK( m_libTable, nullptr );
|
||||
ensureSettings( aLibraryPath );
|
||||
|
@ -348,8 +349,8 @@ void SCH_IO_HTTP_LIB::connect()
|
|||
|
||||
|
||||
LIB_SYMBOL* SCH_IO_HTTP_LIB::loadSymbolFromPart( const wxString& aSymbolName,
|
||||
const HTTP_LIB_CATEGORY& aCategory,
|
||||
const HTTP_LIB_PART& aPart )
|
||||
const HTTP_LIB_CATEGORY& aCategory,
|
||||
const HTTP_LIB_PART& aPart )
|
||||
{
|
||||
LIB_SYMBOL* symbol = nullptr;
|
||||
LIB_SYMBOL* originalSymbol = nullptr;
|
||||
|
@ -464,7 +465,7 @@ LIB_SYMBOL* SCH_IO_HTTP_LIB::loadSymbolFromPart( const wxString& aSymbo
|
|||
}
|
||||
|
||||
void SCH_IO_HTTP_LIB::SaveSymbol( const wxString& aLibraryPath, const LIB_SYMBOL* aSymbol,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// TODO: Implement this sometime;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2022-2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -290,7 +290,7 @@ void SCH_IO_KICAD_LEGACY_LIB_CACHE::loadHeader( FILE_LINE_READER& aReader )
|
|||
|
||||
|
||||
LIB_SYMBOL* SCH_IO_KICAD_LEGACY_LIB_CACHE::LoadPart( LINE_READER& aReader, int aMajorVersion,
|
||||
int aMinorVersion, LIB_SYMBOL_MAP* aMap )
|
||||
int aMinorVersion, LIB_SYMBOL_MAP* aMap )
|
||||
{
|
||||
const char* line = aReader.Line();
|
||||
|
||||
|
@ -475,8 +475,8 @@ LIB_SYMBOL* SCH_IO_KICAD_LEGACY_LIB_CACHE::LoadPart( LINE_READER& aReader, int a
|
|||
|
||||
|
||||
void SCH_IO_KICAD_LEGACY_LIB_CACHE::loadAliases( std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
||||
LINE_READER& aReader,
|
||||
LIB_SYMBOL_MAP* aMap )
|
||||
LINE_READER& aReader,
|
||||
LIB_SYMBOL_MAP* aMap )
|
||||
{
|
||||
wxString newAliasName;
|
||||
const char* line = aReader.Line();
|
||||
|
@ -525,7 +525,7 @@ void SCH_IO_KICAD_LEGACY_LIB_CACHE::loadAliases( std::unique_ptr<LIB_SYMBOL>& aS
|
|||
|
||||
|
||||
void SCH_IO_KICAD_LEGACY_LIB_CACHE::loadField( std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
||||
LINE_READER& aReader )
|
||||
LINE_READER& aReader )
|
||||
{
|
||||
const char* line = aReader.Line();
|
||||
|
||||
|
@ -676,9 +676,9 @@ void SCH_IO_KICAD_LEGACY_LIB_CACHE::loadField( std::unique_ptr<LIB_SYMBOL>& aSym
|
|||
|
||||
|
||||
void SCH_IO_KICAD_LEGACY_LIB_CACHE::loadDrawEntries( std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
||||
LINE_READER& aReader,
|
||||
int aMajorVersion,
|
||||
int aMinorVersion )
|
||||
LINE_READER& aReader,
|
||||
int aMajorVersion,
|
||||
int aMinorVersion )
|
||||
{
|
||||
const char* line = aReader.Line();
|
||||
|
||||
|
@ -743,7 +743,7 @@ void SCH_IO_KICAD_LEGACY_LIB_CACHE::loadDrawEntries( std::unique_ptr<LIB_SYMBOL>
|
|||
|
||||
|
||||
FILL_T SCH_IO_KICAD_LEGACY_LIB_CACHE::parseFillMode( LINE_READER& aReader, const char* aLine,
|
||||
const char** aOutput )
|
||||
const char** aOutput )
|
||||
{
|
||||
switch ( parseChar( aReader, aLine, aOutput ) )
|
||||
{
|
||||
|
@ -820,7 +820,7 @@ static bool MapAnglesV6( int* aAngle1, int* aAngle2 )
|
|||
|
||||
|
||||
LIB_SHAPE* SCH_IO_KICAD_LEGACY_LIB_CACHE::loadArc( std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
||||
LINE_READER& aReader )
|
||||
LINE_READER& aReader )
|
||||
{
|
||||
const char* line = aReader.Line();
|
||||
|
||||
|
@ -902,7 +902,7 @@ LIB_SHAPE* SCH_IO_KICAD_LEGACY_LIB_CACHE::loadArc( std::unique_ptr<LIB_SYMBOL>&
|
|||
|
||||
|
||||
LIB_SHAPE* SCH_IO_KICAD_LEGACY_LIB_CACHE::loadCircle( std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
||||
LINE_READER& aReader )
|
||||
LINE_READER& aReader )
|
||||
{
|
||||
const char* line = aReader.Line();
|
||||
|
||||
|
@ -935,9 +935,9 @@ LIB_SHAPE* SCH_IO_KICAD_LEGACY_LIB_CACHE::loadCircle( std::unique_ptr<LIB_SYMBOL
|
|||
|
||||
|
||||
LIB_TEXT* SCH_IO_KICAD_LEGACY_LIB_CACHE::loadText( std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
||||
LINE_READER& aReader,
|
||||
int aMajorVersion,
|
||||
int aMinorVersion )
|
||||
LINE_READER& aReader,
|
||||
int aMajorVersion,
|
||||
int aMinorVersion )
|
||||
{
|
||||
const char* line = aReader.Line();
|
||||
|
||||
|
@ -1034,7 +1034,7 @@ LIB_TEXT* SCH_IO_KICAD_LEGACY_LIB_CACHE::loadText( std::unique_ptr<LIB_SYMBOL>&
|
|||
|
||||
|
||||
LIB_SHAPE* SCH_IO_KICAD_LEGACY_LIB_CACHE::loadRect( std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
||||
LINE_READER& aReader )
|
||||
LINE_READER& aReader )
|
||||
{
|
||||
const char* line = aReader.Line();
|
||||
|
||||
|
@ -1071,7 +1071,7 @@ LIB_SHAPE* SCH_IO_KICAD_LEGACY_LIB_CACHE::loadRect( std::unique_ptr<LIB_SYMBOL>&
|
|||
|
||||
|
||||
LIB_PIN* SCH_IO_KICAD_LEGACY_LIB_CACHE::loadPin( std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
||||
LINE_READER& aReader )
|
||||
LINE_READER& aReader )
|
||||
{
|
||||
const char* line = aReader.Line();
|
||||
|
||||
|
@ -1293,7 +1293,7 @@ LIB_PIN* SCH_IO_KICAD_LEGACY_LIB_CACHE::loadPin( std::unique_ptr<LIB_SYMBOL>& aS
|
|||
|
||||
|
||||
LIB_SHAPE* SCH_IO_KICAD_LEGACY_LIB_CACHE::loadPolyLine( std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
||||
LINE_READER& aReader )
|
||||
LINE_READER& aReader )
|
||||
{
|
||||
const char* line = aReader.Line();
|
||||
|
||||
|
@ -1327,7 +1327,7 @@ LIB_SHAPE* SCH_IO_KICAD_LEGACY_LIB_CACHE::loadPolyLine( std::unique_ptr<LIB_SYMB
|
|||
|
||||
|
||||
LIB_SHAPE* SCH_IO_KICAD_LEGACY_LIB_CACHE::loadBezier( std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
||||
LINE_READER& aReader )
|
||||
LINE_READER& aReader )
|
||||
{
|
||||
const char* line = aReader.Line();
|
||||
|
||||
|
@ -1375,7 +1375,7 @@ LIB_SHAPE* SCH_IO_KICAD_LEGACY_LIB_CACHE::loadBezier( std::unique_ptr<LIB_SYMBOL
|
|||
|
||||
|
||||
void SCH_IO_KICAD_LEGACY_LIB_CACHE::loadFootprintFilters( std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
||||
LINE_READER& aReader )
|
||||
LINE_READER& aReader )
|
||||
{
|
||||
const char* line = aReader.Line();
|
||||
|
||||
|
@ -1440,7 +1440,7 @@ void SCH_IO_KICAD_LEGACY_LIB_CACHE::Save( const std::optional<bool>& aOpt )
|
|||
|
||||
|
||||
void SCH_IO_KICAD_LEGACY_LIB_CACHE::SaveSymbol( LIB_SYMBOL* aSymbol, OUTPUTFORMATTER& aFormatter,
|
||||
LIB_SYMBOL_MAP* aMap )
|
||||
LIB_SYMBOL_MAP* aMap )
|
||||
{
|
||||
/*
|
||||
* NB:
|
||||
|
@ -1657,7 +1657,8 @@ void SCH_IO_KICAD_LEGACY_LIB_CACHE::saveCircle( LIB_SHAPE* aCircle, OUTPUTFORMAT
|
|||
}
|
||||
|
||||
|
||||
void SCH_IO_KICAD_LEGACY_LIB_CACHE::saveField( const LIB_FIELD* aField, OUTPUTFORMATTER& aFormatter )
|
||||
void SCH_IO_KICAD_LEGACY_LIB_CACHE::saveField( const LIB_FIELD* aField,
|
||||
OUTPUTFORMATTER& aFormatter )
|
||||
{
|
||||
wxCHECK_RET( aField && aField->Type() == LIB_FIELD_T, "Invalid LIB_FIELD object." );
|
||||
|
||||
|
@ -1770,7 +1771,8 @@ void SCH_IO_KICAD_LEGACY_LIB_CACHE::savePin( const LIB_PIN* aPin, OUTPUTFORMATTE
|
|||
}
|
||||
|
||||
|
||||
void SCH_IO_KICAD_LEGACY_LIB_CACHE::savePolyLine( LIB_SHAPE* aPolyLine, OUTPUTFORMATTER& aFormatter )
|
||||
void SCH_IO_KICAD_LEGACY_LIB_CACHE::savePolyLine( LIB_SHAPE* aPolyLine,
|
||||
OUTPUTFORMATTER& aFormatter )
|
||||
{
|
||||
wxCHECK_RET( aPolyLine && aPolyLine->GetShape() == SHAPE_T::POLY, "Invalid POLY object." );
|
||||
|
||||
|
@ -1787,9 +1789,11 @@ void SCH_IO_KICAD_LEGACY_LIB_CACHE::savePolyLine( LIB_SHAPE* aPolyLine, OUTPUTFO
|
|||
}
|
||||
|
||||
|
||||
void SCH_IO_KICAD_LEGACY_LIB_CACHE::saveRectangle( LIB_SHAPE* aRectangle, OUTPUTFORMATTER& aFormatter )
|
||||
void SCH_IO_KICAD_LEGACY_LIB_CACHE::saveRectangle( LIB_SHAPE* aRectangle,
|
||||
OUTPUTFORMATTER& aFormatter )
|
||||
{
|
||||
wxCHECK_RET( aRectangle && aRectangle->GetShape() == SHAPE_T::RECTANGLE, "Invalid RECT object." );
|
||||
wxCHECK_RET( aRectangle && aRectangle->GetShape() == SHAPE_T::RECTANGLE,
|
||||
"Invalid RECT object." );
|
||||
|
||||
aFormatter.Print( 0, "S %d %d %d %d %d %d %d %c\n",
|
||||
schIUScale.IUToMils( aRectangle->GetPosition().x ),
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2020 CERN
|
||||
* Copyright (C) 2021-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2021-2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Wayne Stambaugh <stambaughw@gmail.com>
|
||||
*
|
||||
|
@ -99,8 +99,8 @@ void SCH_IO_KICAD_SEXPR::init( SCHEMATIC* aSchematic, const STRING_UTF8_MAP* aPr
|
|||
|
||||
|
||||
SCH_SHEET* SCH_IO_KICAD_SEXPR::LoadSchematicFile( const wxString& aFileName, SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* aAppendToMe,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
SCH_SHEET* aAppendToMe,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxASSERT( !aFileName || aSchematic != nullptr );
|
||||
|
||||
|
@ -332,8 +332,8 @@ void SCH_IO_KICAD_SEXPR::LoadContent( LINE_READER& aReader, SCH_SHEET* aSheet, i
|
|||
|
||||
|
||||
void SCH_IO_KICAD_SEXPR::SaveSchematicFile( const wxString& aFileName, SCH_SHEET* aSheet,
|
||||
SCHEMATIC* aSchematic,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
SCHEMATIC* aSchematic,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxCHECK_RET( aSheet != nullptr, "NULL SCH_SHEET object." );
|
||||
wxCHECK_RET( !aFileName.IsEmpty(), "No schematic file name defined." );
|
||||
|
@ -1655,7 +1655,8 @@ std::vector<LIB_SYMBOL*> SCH_IO_KICAD_SEXPR::ParseLibSymbols( std::string& aSymb
|
|||
LIB_SYMBOL_MAP map;
|
||||
|
||||
std::vector<LIB_SYMBOL*> newSymbols;
|
||||
std::unique_ptr<STRING_LINE_READER> reader = std::make_unique<STRING_LINE_READER>( aSymbolText, aSource );
|
||||
std::unique_ptr<STRING_LINE_READER> reader = std::make_unique<STRING_LINE_READER>( aSymbolText,
|
||||
aSource );
|
||||
|
||||
do
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2022-2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Wayne Stambaugh <stambaughw@gmail.com>
|
||||
*
|
||||
|
@ -93,7 +93,8 @@ void SCH_IO_KICAD_SEXPR_LIB_CACHE::Save( const std::optional<bool>& aOpt )
|
|||
|
||||
auto formatter = std::make_unique<PRETTIFIED_FILE_OUTPUTFORMATTER>( fn.GetFullPath() );
|
||||
|
||||
formatter->Print( 0, "(kicad_symbol_lib (version %d) (generator \"kicad_symbol_editor\") (generator_version \"%s\")\n",
|
||||
formatter->Print( 0, "(kicad_symbol_lib (version %d) (generator \"kicad_symbol_editor\") "
|
||||
"(generator_version \"%s\")\n",
|
||||
SEXPR_SYMBOL_LIB_FILE_VERSION, GetMajorMinorVersion().c_str().AsChar() );
|
||||
|
||||
std::vector<LIB_SYMBOL*> orderedSymbols;
|
||||
|
@ -130,7 +131,7 @@ void SCH_IO_KICAD_SEXPR_LIB_CACHE::Save( const std::optional<bool>& aOpt )
|
|||
|
||||
|
||||
void SCH_IO_KICAD_SEXPR_LIB_CACHE::SaveSymbol( LIB_SYMBOL* aSymbol, OUTPUTFORMATTER& aFormatter,
|
||||
int aNestLevel, const wxString& aLibName )
|
||||
int aNestLevel, const wxString& aLibName )
|
||||
{
|
||||
wxCHECK_RET( aSymbol, "Invalid LIB_SYMBOL pointer." );
|
||||
|
||||
|
@ -175,7 +176,8 @@ void SCH_IO_KICAD_SEXPR_LIB_CACHE::SaveSymbol( LIB_SYMBOL* aSymbol, OUTPUTFORMAT
|
|||
|
||||
if( aSymbol->GetPinNameOffset() != schIUScale.MilsToIU( DEFAULT_PIN_NAME_OFFSET ) )
|
||||
aFormatter.Print( 0, " (offset %s)",
|
||||
EDA_UNIT_UTILS::FormatInternalUnits( schIUScale, aSymbol->GetPinNameOffset() ).c_str() );
|
||||
EDA_UNIT_UTILS::FormatInternalUnits( schIUScale,
|
||||
aSymbol->GetPinNameOffset() ).c_str() );
|
||||
|
||||
if( !aSymbol->ShowPinNames() )
|
||||
aFormatter.Print( 0, " hide" );
|
||||
|
@ -282,8 +284,9 @@ void SCH_IO_KICAD_SEXPR_LIB_CACHE::SaveSymbol( LIB_SYMBOL* aSymbol, OUTPUTFORMAT
|
|||
}
|
||||
|
||||
|
||||
void SCH_IO_KICAD_SEXPR_LIB_CACHE::saveDcmInfoAsFields( LIB_SYMBOL* aSymbol, OUTPUTFORMATTER& aFormatter,
|
||||
int& aNextFreeFieldId, int aNestLevel )
|
||||
void SCH_IO_KICAD_SEXPR_LIB_CACHE::saveDcmInfoAsFields( LIB_SYMBOL* aSymbol,
|
||||
OUTPUTFORMATTER& aFormatter,
|
||||
int& aNextFreeFieldId, int aNestLevel )
|
||||
{
|
||||
wxCHECK_RET( aSymbol, "Invalid LIB_SYMBOL pointer." );
|
||||
|
||||
|
@ -323,7 +326,7 @@ void SCH_IO_KICAD_SEXPR_LIB_CACHE::saveDcmInfoAsFields( LIB_SYMBOL* aSymbol, OUT
|
|||
|
||||
|
||||
void SCH_IO_KICAD_SEXPR_LIB_CACHE::saveSymbolDrawItem( LIB_ITEM* aItem, OUTPUTFORMATTER& aFormatter,
|
||||
int aNestLevel )
|
||||
int aNestLevel )
|
||||
{
|
||||
wxCHECK_RET( aItem, "Invalid LIB_ITEM pointer." );
|
||||
|
||||
|
@ -385,7 +388,7 @@ void SCH_IO_KICAD_SEXPR_LIB_CACHE::saveSymbolDrawItem( LIB_ITEM* aItem, OUTPUTFO
|
|||
|
||||
|
||||
void SCH_IO_KICAD_SEXPR_LIB_CACHE::saveField( LIB_FIELD* aField, OUTPUTFORMATTER& aFormatter,
|
||||
int aNestLevel )
|
||||
int aNestLevel )
|
||||
{
|
||||
wxCHECK_RET( aField && aField->Type() == LIB_FIELD_T, "Invalid LIB_FIELD object." );
|
||||
|
||||
|
@ -397,8 +400,10 @@ void SCH_IO_KICAD_SEXPR_LIB_CACHE::saveField( LIB_FIELD* aField, OUTPUTFORMATTER
|
|||
aFormatter.Print( aNestLevel, "(property %s %s (at %s %s %g)",
|
||||
aFormatter.Quotew( fieldName ).c_str(),
|
||||
aFormatter.Quotew( aField->GetText() ).c_str(),
|
||||
EDA_UNIT_UTILS::FormatInternalUnits( schIUScale, aField->GetPosition().x ).c_str(),
|
||||
EDA_UNIT_UTILS::FormatInternalUnits( schIUScale, aField->GetPosition().y ).c_str(),
|
||||
EDA_UNIT_UTILS::FormatInternalUnits( schIUScale,
|
||||
aField->GetPosition().x ).c_str(),
|
||||
EDA_UNIT_UTILS::FormatInternalUnits( schIUScale,
|
||||
aField->GetPosition().y ).c_str(),
|
||||
aField->GetTextAngle().AsDegrees() );
|
||||
|
||||
if( aField->IsNameShown() )
|
||||
|
@ -413,7 +418,8 @@ void SCH_IO_KICAD_SEXPR_LIB_CACHE::saveField( LIB_FIELD* aField, OUTPUTFORMATTER
|
|||
}
|
||||
|
||||
|
||||
void SCH_IO_KICAD_SEXPR_LIB_CACHE::savePin( LIB_PIN* aPin, OUTPUTFORMATTER& aFormatter, int aNestLevel )
|
||||
void SCH_IO_KICAD_SEXPR_LIB_CACHE::savePin( LIB_PIN* aPin, OUTPUTFORMATTER& aFormatter,
|
||||
int aNestLevel )
|
||||
{
|
||||
wxCHECK_RET( aPin && aPin->Type() == LIB_PIN_T, "Invalid LIB_PIN object." );
|
||||
|
||||
|
@ -422,10 +428,13 @@ void SCH_IO_KICAD_SEXPR_LIB_CACHE::savePin( LIB_PIN* aPin, OUTPUTFORMATTER& aFor
|
|||
aFormatter.Print( aNestLevel, "(pin %s %s (at %s %s %s) (length %s)",
|
||||
getPinElectricalTypeToken( aPin->GetType() ),
|
||||
getPinShapeToken( aPin->GetShape() ),
|
||||
EDA_UNIT_UTILS::FormatInternalUnits( schIUScale, aPin->GetPosition().x ).c_str(),
|
||||
EDA_UNIT_UTILS::FormatInternalUnits( schIUScale, aPin->GetPosition().y ).c_str(),
|
||||
EDA_UNIT_UTILS::FormatInternalUnits( schIUScale,
|
||||
aPin->GetPosition().x ).c_str(),
|
||||
EDA_UNIT_UTILS::FormatInternalUnits( schIUScale,
|
||||
aPin->GetPosition().y ).c_str(),
|
||||
EDA_UNIT_UTILS::FormatAngle( getPinAngle( aPin->GetOrientation() ) ).c_str(),
|
||||
EDA_UNIT_UTILS::FormatInternalUnits( schIUScale, aPin->GetLength() ).c_str() );
|
||||
EDA_UNIT_UTILS::FormatInternalUnits( schIUScale,
|
||||
aPin->GetLength() ).c_str() );
|
||||
|
||||
if( !aPin->IsVisible() )
|
||||
aFormatter.Print( 0, " hide\n" );
|
||||
|
@ -435,13 +444,17 @@ void SCH_IO_KICAD_SEXPR_LIB_CACHE::savePin( LIB_PIN* aPin, OUTPUTFORMATTER& aFor
|
|||
// This follows the EDA_TEXT effects formatting for future expansion.
|
||||
aFormatter.Print( aNestLevel + 1, "(name %s (effects (font (size %s %s))))\n",
|
||||
aFormatter.Quotew( aPin->GetName() ).c_str(),
|
||||
EDA_UNIT_UTILS::FormatInternalUnits( schIUScale, aPin->GetNameTextSize() ).c_str(),
|
||||
EDA_UNIT_UTILS::FormatInternalUnits( schIUScale, aPin->GetNameTextSize() ).c_str() );
|
||||
EDA_UNIT_UTILS::FormatInternalUnits( schIUScale,
|
||||
aPin->GetNameTextSize() ).c_str(),
|
||||
EDA_UNIT_UTILS::FormatInternalUnits( schIUScale,
|
||||
aPin->GetNameTextSize() ).c_str() );
|
||||
|
||||
aFormatter.Print( aNestLevel + 1, "(number %s (effects (font (size %s %s))))\n",
|
||||
aFormatter.Quotew( aPin->GetNumber() ).c_str(),
|
||||
EDA_UNIT_UTILS::FormatInternalUnits( schIUScale, aPin->GetNumberTextSize() ).c_str(),
|
||||
EDA_UNIT_UTILS::FormatInternalUnits( schIUScale, aPin->GetNumberTextSize() ).c_str() );
|
||||
EDA_UNIT_UTILS::FormatInternalUnits( schIUScale,
|
||||
aPin->GetNumberTextSize() ).c_str(),
|
||||
EDA_UNIT_UTILS::FormatInternalUnits( schIUScale,
|
||||
aPin->GetNumberTextSize() ).c_str() );
|
||||
|
||||
|
||||
for( const std::pair<const wxString, LIB_PIN::ALT>& alt : aPin->GetAlternates() )
|
||||
|
@ -457,15 +470,17 @@ void SCH_IO_KICAD_SEXPR_LIB_CACHE::savePin( LIB_PIN* aPin, OUTPUTFORMATTER& aFor
|
|||
|
||||
|
||||
void SCH_IO_KICAD_SEXPR_LIB_CACHE::saveText( LIB_TEXT* aText, OUTPUTFORMATTER& aFormatter,
|
||||
int aNestLevel )
|
||||
int aNestLevel )
|
||||
{
|
||||
wxCHECK_RET( aText && aText->Type() == LIB_TEXT_T, "Invalid LIB_TEXT object." );
|
||||
|
||||
aFormatter.Print( aNestLevel, "(text%s %s (at %s %s %g)\n",
|
||||
aText->IsPrivate() ? " private" : "",
|
||||
aFormatter.Quotew( aText->GetText() ).c_str(),
|
||||
EDA_UNIT_UTILS::FormatInternalUnits( schIUScale, aText->GetPosition().x ).c_str(),
|
||||
EDA_UNIT_UTILS::FormatInternalUnits( schIUScale, aText->GetPosition().y ).c_str(),
|
||||
EDA_UNIT_UTILS::FormatInternalUnits( schIUScale,
|
||||
aText->GetPosition().x ).c_str(),
|
||||
EDA_UNIT_UTILS::FormatInternalUnits( schIUScale,
|
||||
aText->GetPosition().y ).c_str(),
|
||||
(double) aText->GetTextAngle().AsTenthsOfADegree() );
|
||||
|
||||
aText->EDA_TEXT::Format( &aFormatter, aNestLevel, 0 );
|
||||
|
@ -474,7 +489,7 @@ void SCH_IO_KICAD_SEXPR_LIB_CACHE::saveText( LIB_TEXT* aText, OUTPUTFORMATTER& a
|
|||
|
||||
|
||||
void SCH_IO_KICAD_SEXPR_LIB_CACHE::saveTextBox( LIB_TEXTBOX* aTextBox, OUTPUTFORMATTER& aFormatter,
|
||||
int aNestLevel )
|
||||
int aNestLevel )
|
||||
{
|
||||
wxCHECK_RET( aTextBox && aTextBox->Type() == LIB_TEXTBOX_T, "Invalid LIB_TEXTBOX object." );
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2020 CERN
|
||||
* Copyright (C) 2022-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2022-2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Wayne Stambaugh <stambaughw@gmail.com>
|
||||
*
|
||||
|
@ -66,9 +66,10 @@
|
|||
using namespace TSCHEMATIC_T;
|
||||
|
||||
|
||||
SCH_IO_KICAD_SEXPR_PARSER::SCH_IO_KICAD_SEXPR_PARSER( LINE_READER* aLineReader, PROGRESS_REPORTER* aProgressReporter,
|
||||
unsigned aLineCount, SCH_SHEET* aRootSheet,
|
||||
bool aIsAppending ) :
|
||||
SCH_IO_KICAD_SEXPR_PARSER::SCH_IO_KICAD_SEXPR_PARSER( LINE_READER* aLineReader,
|
||||
PROGRESS_REPORTER* aProgressReporter,
|
||||
unsigned aLineCount, SCH_SHEET* aRootSheet,
|
||||
bool aIsAppending ) :
|
||||
SCHEMATIC_LEXER( aLineReader ),
|
||||
m_requiredVersion( 0 ),
|
||||
m_unit( 1 ),
|
||||
|
@ -248,7 +249,8 @@ void SCH_IO_KICAD_SEXPR_PARSER::ParseLib( LIB_SYMBOL_MAP& aSymbolLibMap )
|
|||
}
|
||||
|
||||
|
||||
LIB_SYMBOL* SCH_IO_KICAD_SEXPR_PARSER::ParseSymbol( LIB_SYMBOL_MAP& aSymbolLibMap, int aFileVersion )
|
||||
LIB_SYMBOL* SCH_IO_KICAD_SEXPR_PARSER::ParseSymbol( LIB_SYMBOL_MAP& aSymbolLibMap,
|
||||
int aFileVersion )
|
||||
{
|
||||
LIB_SYMBOL* newSymbol = nullptr;
|
||||
|
||||
|
@ -2449,7 +2451,8 @@ void SCH_IO_KICAD_SEXPR_PARSER::parseSchSymbolInstances( SCH_SCREEN* aScreen )
|
|||
}
|
||||
|
||||
|
||||
void SCH_IO_KICAD_SEXPR_PARSER::ParseSchematic( SCH_SHEET* aSheet, bool aIsCopyableOnly, int aFileVersion )
|
||||
void SCH_IO_KICAD_SEXPR_PARSER::ParseSchematic( SCH_SHEET* aSheet, bool aIsCopyableOnly,
|
||||
int aFileVersion )
|
||||
{
|
||||
wxCHECK( aSheet != nullptr, /* void */ );
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright (C) 2022 Chetan Subhash Shinde<chetanshinde2001@gmail.com>
|
||||
* Copyright (C) 2023 CERN
|
||||
* Copyright (C) 2022-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2022-2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* 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
|
||||
|
@ -40,8 +40,8 @@ int SCH_IO_LTSPICE::GetModifyHash() const
|
|||
|
||||
|
||||
SCH_SHEET* SCH_IO_LTSPICE::LoadSchematicFile( const wxString& aFileName, SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* aAppendToMe,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
SCH_SHEET* aAppendToMe,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxASSERT( !aFileName || aSchematic );
|
||||
|
||||
|
@ -87,8 +87,10 @@ SCH_SHEET* SCH_IO_LTSPICE::LoadSchematicFile( const wxString& aFileName, SCHEMAT
|
|||
|
||||
if( !ltspiceDataDir.DirExists() )
|
||||
{
|
||||
// See if user has older version of LTspice installed (e.g. C:\Users\USERNAME\Documents\LTspiceXVII\lib
|
||||
wxString foundFile = wxFindFirstFile( KIPLATFORM::ENV::GetDocumentsPath() + wxFileName::GetPathSeparator() + "LTspice*", wxDIR );
|
||||
// See if user has older version of LTspice installed
|
||||
// (e.g. C:\Users\USERNAME\Documents\LTspiceXVII\lib
|
||||
wxString foundFile = wxFindFirstFile( KIPLATFORM::ENV::GetDocumentsPath() +
|
||||
wxFileName::GetPathSeparator() + "LTspice*", wxDIR );
|
||||
|
||||
while( !foundFile.empty() )
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright (C) 2022 Chetan Subhash Shinde<chetanshinde2001@gmail.com>
|
||||
* Copyright (C) 2023 CERN
|
||||
* Copyright (C) 2022-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2022-2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* 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
|
||||
|
@ -39,8 +39,8 @@
|
|||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::Parse( SCH_SHEET_PATH* aSheet,
|
||||
std::vector<LTSPICE_SCHEMATIC::LT_ASC>& outLT_ASCs,
|
||||
const std::vector<wxString>& aAsyFileNames )
|
||||
std::vector<LTSPICE_SCHEMATIC::LT_ASC>& outLT_ASCs,
|
||||
const std::vector<wxString>& aAsyFileNames )
|
||||
{
|
||||
// Center created objects in Kicad page
|
||||
BOX2I bbox;
|
||||
|
@ -107,8 +107,9 @@ void SCH_IO_LTSPICE_PARSER::readIncludes( std::vector<LTSPICE_SCHEMATIC::LT_ASC>
|
|||
}
|
||||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::CreateLines( LIB_SYMBOL* aSymbol, LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbol,
|
||||
int aIndex, LIB_SHAPE* shape )
|
||||
void SCH_IO_LTSPICE_PARSER::CreateLines( LIB_SYMBOL* aSymbol,
|
||||
LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbol,
|
||||
int aIndex, LIB_SHAPE* shape )
|
||||
{
|
||||
LTSPICE_SCHEMATIC::LINE& lt_line = aLTSymbol.Lines[aIndex];
|
||||
|
||||
|
@ -119,7 +120,7 @@ void SCH_IO_LTSPICE_PARSER::CreateLines( LIB_SYMBOL* aSymbol, LTSPICE_SCHEMATIC:
|
|||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::CreateLines( LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbol, int aIndex,
|
||||
SCH_SHEET_PATH* aSheet )
|
||||
SCH_SHEET_PATH* aSheet )
|
||||
{
|
||||
LTSPICE_SCHEMATIC::LINE& lt_line = aLTSymbol.Lines[aIndex];
|
||||
SCH_SHAPE* shape = new SCH_SHAPE( SHAPE_T::POLY );
|
||||
|
@ -136,8 +137,8 @@ void SCH_IO_LTSPICE_PARSER::CreateLines( LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbol
|
|||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::CreateKicadSYMBOLs( SCH_SHEET_PATH* aSheet,
|
||||
std::vector<LTSPICE_SCHEMATIC::LT_ASC>& outLT_ASCs,
|
||||
const std::vector<wxString>& aAsyFiles )
|
||||
std::vector<LTSPICE_SCHEMATIC::LT_ASC>& outLT_ASCs,
|
||||
const std::vector<wxString>& aAsyFiles )
|
||||
{
|
||||
for( LTSPICE_SCHEMATIC::LT_ASC& lt_asc : outLT_ASCs )
|
||||
{
|
||||
|
@ -275,7 +276,7 @@ void SCH_IO_LTSPICE_PARSER::CreateKicadSYMBOLs( SCH_SHEET_PATH* aSheet,
|
|||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::CreateSymbol( LTSPICE_SCHEMATIC::LT_SYMBOL& aLtSymbol,
|
||||
LIB_SYMBOL* aLibSymbol )
|
||||
LIB_SYMBOL* aLibSymbol )
|
||||
{
|
||||
for( int j = 0; j < (int) aLtSymbol.Lines.size(); j++ )
|
||||
{
|
||||
|
@ -365,7 +366,7 @@ int SCH_IO_LTSPICE_PARSER::ToLtSpiceCoords( int aCoordinate )
|
|||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::RotateMirrorShape( LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbol,
|
||||
SCH_SHAPE* aShape )
|
||||
SCH_SHAPE* aShape )
|
||||
{
|
||||
if( aLTSymbol.SymbolOrientation == LTSPICE_SCHEMATIC::ORIENTATION::R90 )
|
||||
{
|
||||
|
@ -406,7 +407,7 @@ void SCH_IO_LTSPICE_PARSER::RotateMirrorShape( LTSPICE_SCHEMATIC::LT_SYMBOL& aLT
|
|||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::RotateMirror( LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbol,
|
||||
SCH_SYMBOL* aSchSymbol )
|
||||
SCH_SYMBOL* aSchSymbol )
|
||||
{
|
||||
if( aLTSymbol.SymbolOrientation == LTSPICE_SCHEMATIC::ORIENTATION::R0 )
|
||||
{
|
||||
|
@ -447,7 +448,7 @@ void SCH_IO_LTSPICE_PARSER::RotateMirror( LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbo
|
|||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::CreateWires( LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbol, int aIndex,
|
||||
SCH_SHEET_PATH* aSheet )
|
||||
SCH_SHEET_PATH* aSheet )
|
||||
{
|
||||
SCH_LINE* segment = new SCH_LINE();
|
||||
|
||||
|
@ -462,7 +463,7 @@ void SCH_IO_LTSPICE_PARSER::CreateWires( LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbol
|
|||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::CreateKicadSCH_ITEMs( SCH_SHEET_PATH* aSheet,
|
||||
std::vector<LTSPICE_SCHEMATIC::LT_ASC>& outLT_ASCs )
|
||||
std::vector<LTSPICE_SCHEMATIC::LT_ASC>& outLT_ASCs )
|
||||
{
|
||||
SCH_SCREEN* screen = aSheet->LastScreen();
|
||||
|
||||
|
@ -547,7 +548,7 @@ void SCH_IO_LTSPICE_PARSER::CreateKicadSCH_ITEMs( SCH_SHEET_PATH* aSheet,
|
|||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::CreateBusEntry( LTSPICE_SCHEMATIC::LT_ASC& aAscfile, int aIndex,
|
||||
SCH_SHEET_PATH* aSheet )
|
||||
SCH_SHEET_PATH* aSheet )
|
||||
{
|
||||
LTSPICE_SCHEMATIC::BUSTAP& bustap = aAscfile.Bustap[aIndex];
|
||||
|
||||
|
@ -582,7 +583,7 @@ LABEL_FLAG_SHAPE getLabelShape( LTSPICE_SCHEMATIC::POLARITY aPolarity )
|
|||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::CreatePin( LTSPICE_SCHEMATIC::LT_ASC& aAscfile, int aIndex,
|
||||
SCH_SHEET_PATH* aSheet )
|
||||
SCH_SHEET_PATH* aSheet )
|
||||
{
|
||||
LTSPICE_SCHEMATIC::IOPIN& iopin = aAscfile.Iopins[aIndex];
|
||||
wxString ioPinName;
|
||||
|
@ -608,7 +609,7 @@ void SCH_IO_LTSPICE_PARSER::CreatePin( LTSPICE_SCHEMATIC::LT_ASC& aAscfile, int
|
|||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::CreateLine( LTSPICE_SCHEMATIC::LT_ASC& aAscfile, int aIndex,
|
||||
SCH_SHEET_PATH* aSheet )
|
||||
SCH_SHEET_PATH* aSheet )
|
||||
{
|
||||
LTSPICE_SCHEMATIC::LINE& lt_line = aAscfile.Lines[aIndex];
|
||||
SCH_LINE* line = new SCH_LINE( ToKicadCoords( lt_line.Start ), SCH_LAYER_ID::LAYER_NOTES );
|
||||
|
@ -622,7 +623,7 @@ void SCH_IO_LTSPICE_PARSER::CreateLine( LTSPICE_SCHEMATIC::LT_ASC& aAscfile, int
|
|||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::CreateCircle( LTSPICE_SCHEMATIC::LT_ASC& aAscfile, int aIndex,
|
||||
SCH_SHEET_PATH* aSheet )
|
||||
SCH_SHEET_PATH* aSheet )
|
||||
{
|
||||
LTSPICE_SCHEMATIC::CIRCLE& lt_circle = aAscfile.Circles[aIndex];
|
||||
SCH_SHAPE* circle = new SCH_SHAPE( SHAPE_T::CIRCLE );
|
||||
|
@ -640,7 +641,7 @@ void SCH_IO_LTSPICE_PARSER::CreateCircle( LTSPICE_SCHEMATIC::LT_ASC& aAscfile, i
|
|||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::CreateArc( LTSPICE_SCHEMATIC::LT_ASC& aAscfile, int aIndex,
|
||||
SCH_SHEET_PATH* aSheet )
|
||||
SCH_SHEET_PATH* aSheet )
|
||||
{
|
||||
LTSPICE_SCHEMATIC::ARC& lt_arc = aAscfile.Arcs[aIndex];
|
||||
SCH_SHAPE* arc = new SCH_SHAPE( SHAPE_T::ARC );
|
||||
|
@ -656,7 +657,7 @@ void SCH_IO_LTSPICE_PARSER::CreateArc( LTSPICE_SCHEMATIC::LT_ASC& aAscfile, int
|
|||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::CreateRect( LTSPICE_SCHEMATIC::LT_ASC& aAscfile, int aIndex,
|
||||
SCH_SHEET_PATH* aSheet )
|
||||
SCH_SHEET_PATH* aSheet )
|
||||
{
|
||||
LTSPICE_SCHEMATIC::RECTANGLE& lt_rect = aAscfile.Rectangles[aIndex];
|
||||
SCH_SHAPE* rectangle = new SCH_SHAPE( SHAPE_T::RECTANGLE );
|
||||
|
@ -696,14 +697,14 @@ LINE_STYLE SCH_IO_LTSPICE_PARSER::getLineStyle( const LTSPICE_SCHEMATIC::LINESTY
|
|||
|
||||
|
||||
STROKE_PARAMS SCH_IO_LTSPICE_PARSER::getStroke( const LTSPICE_SCHEMATIC::LINEWIDTH& aLineWidth,
|
||||
const LTSPICE_SCHEMATIC::LINESTYLE& aLineStyle )
|
||||
const LTSPICE_SCHEMATIC::LINESTYLE& aLineStyle )
|
||||
{
|
||||
return STROKE_PARAMS( getLineWidth( aLineWidth ), getLineStyle( aLineStyle ) );
|
||||
}
|
||||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::setTextJustification( EDA_TEXT* aText,
|
||||
LTSPICE_SCHEMATIC::JUSTIFICATION aJustification )
|
||||
LTSPICE_SCHEMATIC::JUSTIFICATION aJustification )
|
||||
{
|
||||
switch( aJustification )
|
||||
{
|
||||
|
@ -787,8 +788,8 @@ void SCH_IO_LTSPICE_PARSER::setTextJustification( EDA_TEXT*
|
|||
|
||||
|
||||
SCH_TEXT* SCH_IO_LTSPICE_PARSER::CreateSCH_TEXT( VECTOR2I aOffset, const wxString& aText,
|
||||
int aFontSize,
|
||||
LTSPICE_SCHEMATIC::JUSTIFICATION aJustification )
|
||||
int aFontSize,
|
||||
LTSPICE_SCHEMATIC::JUSTIFICATION aJustification )
|
||||
{
|
||||
VECTOR2I pos = ToKicadCoords( aOffset ) + m_originOffset;
|
||||
SCH_TEXT* textItem = new SCH_TEXT( pos, aText, SCH_TEXT_T );
|
||||
|
@ -804,7 +805,7 @@ SCH_TEXT* SCH_IO_LTSPICE_PARSER::CreateSCH_TEXT( VECTOR2I aOffset, const wxStrin
|
|||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::CreateWire( LTSPICE_SCHEMATIC::LT_ASC& aAscfile, int aIndex,
|
||||
SCH_SHEET_PATH* aSheet, SCH_LAYER_ID aLayer )
|
||||
SCH_SHEET_PATH* aSheet, SCH_LAYER_ID aLayer )
|
||||
{
|
||||
SCH_LINE* segment = new SCH_LINE();
|
||||
|
||||
|
@ -819,9 +820,10 @@ void SCH_IO_LTSPICE_PARSER::CreateWire( LTSPICE_SCHEMATIC::LT_ASC& aAscfile, int
|
|||
}
|
||||
|
||||
|
||||
SCH_SYMBOL* SCH_IO_LTSPICE_PARSER::CreatePowerSymbol( const VECTOR2I& aOffset, const wxString& aValue,
|
||||
int aFontSize, SCH_SHEET_PATH* aSheet,
|
||||
std::vector<LTSPICE_SCHEMATIC::WIRE>& aWires )
|
||||
SCH_SYMBOL* SCH_IO_LTSPICE_PARSER::CreatePowerSymbol( const VECTOR2I& aOffset,
|
||||
const wxString& aValue,
|
||||
int aFontSize, SCH_SHEET_PATH* aSheet,
|
||||
std::vector<LTSPICE_SCHEMATIC::WIRE>& aWires )
|
||||
{
|
||||
LIB_SYMBOL* lib_symbol = new LIB_SYMBOL( wxS( "GND" ) );
|
||||
LIB_SHAPE* shape = new LIB_SHAPE( lib_symbol, SHAPE_T::POLY );
|
||||
|
@ -903,7 +905,7 @@ SCH_SYMBOL* SCH_IO_LTSPICE_PARSER::CreatePowerSymbol( const VECTOR2I& aOffset, c
|
|||
|
||||
|
||||
SCH_LABEL_BASE* SCH_IO_LTSPICE_PARSER::CreateSCH_LABEL( KICAD_T aType, const VECTOR2I& aOffset,
|
||||
const wxString& aValue, int aFontSize )
|
||||
const wxString& aValue, int aFontSize )
|
||||
{
|
||||
SCH_LABEL_BASE* label = nullptr;
|
||||
|
||||
|
@ -945,7 +947,7 @@ SCH_LABEL_BASE* SCH_IO_LTSPICE_PARSER::CreateSCH_LABEL( KICAD_T aType, const VEC
|
|||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::CreateFields( LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbol,
|
||||
SCH_SYMBOL* aSymbol, SCH_SHEET_PATH* aSheet )
|
||||
SCH_SYMBOL* aSymbol, SCH_SHEET_PATH* aSheet )
|
||||
{
|
||||
wxString libPath = m_lt_schematic->GetLTspiceDataDir().GetFullPath();
|
||||
wxString symbolName = aLTSymbol.Name.Upper();
|
||||
|
@ -1247,7 +1249,7 @@ void SCH_IO_LTSPICE_PARSER::CreateFields( LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbo
|
|||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::CreateRect( LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbol, int aIndex,
|
||||
LIB_SHAPE* aRectangle )
|
||||
LIB_SHAPE* aRectangle )
|
||||
{
|
||||
LTSPICE_SCHEMATIC::RECTANGLE& lt_rect = aLTSymbol.Rectangles[aIndex];
|
||||
|
||||
|
@ -1261,7 +1263,7 @@ void SCH_IO_LTSPICE_PARSER::CreateRect( LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbol,
|
|||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::CreateRect( LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbol, int aIndex,
|
||||
SCH_SHEET_PATH* aSheet )
|
||||
SCH_SHEET_PATH* aSheet )
|
||||
{
|
||||
LTSPICE_SCHEMATIC::RECTANGLE& lt_rect = aLTSymbol.Rectangles[aIndex];
|
||||
SCH_SHAPE* rectangle = new SCH_SHAPE( SHAPE_T::RECTANGLE );
|
||||
|
@ -1278,7 +1280,7 @@ void SCH_IO_LTSPICE_PARSER::CreateRect( LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbol,
|
|||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::CreatePin( LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbol, int aIndex,
|
||||
LIB_PIN* aPin )
|
||||
LIB_PIN* aPin )
|
||||
{
|
||||
LTSPICE_SCHEMATIC::LT_PIN& lt_pin = aLTSymbol.Pins[aIndex];
|
||||
wxString device = aLTSymbol.Name.Lower();
|
||||
|
@ -1332,7 +1334,7 @@ void SCH_IO_LTSPICE_PARSER::CreatePin( LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbol,
|
|||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::CreateArc( LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbol, int aIndex,
|
||||
LIB_SHAPE* aArc )
|
||||
LIB_SHAPE* aArc )
|
||||
{
|
||||
LTSPICE_SCHEMATIC::ARC& lt_arc = aLTSymbol.Arcs[aIndex];
|
||||
|
||||
|
@ -1344,7 +1346,7 @@ void SCH_IO_LTSPICE_PARSER::CreateArc( LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbol,
|
|||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::CreateArc( LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbol, int aIndex,
|
||||
SCH_SHEET_PATH* aSheet )
|
||||
SCH_SHEET_PATH* aSheet )
|
||||
{
|
||||
LTSPICE_SCHEMATIC::ARC& lt_arc = aLTSymbol.Arcs[aIndex];
|
||||
SCH_SHAPE* arc = new SCH_SHAPE( SHAPE_T::ARC );
|
||||
|
@ -1362,7 +1364,7 @@ void SCH_IO_LTSPICE_PARSER::CreateArc( LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbol,
|
|||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::CreateCircle( LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbol, int aIndex,
|
||||
SCH_SHEET_PATH* aSheet )
|
||||
SCH_SHEET_PATH* aSheet )
|
||||
{
|
||||
LTSPICE_SCHEMATIC::CIRCLE& lt_circle = aLTSymbol.Circles[aIndex];
|
||||
SCH_SHAPE* circle = new SCH_SHAPE( SHAPE_T::CIRCLE );
|
||||
|
@ -1382,7 +1384,7 @@ void SCH_IO_LTSPICE_PARSER::CreateCircle( LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbo
|
|||
|
||||
|
||||
void SCH_IO_LTSPICE_PARSER::CreateCircle( LTSPICE_SCHEMATIC::LT_SYMBOL& aLTSymbol, int aIndex,
|
||||
LIB_SHAPE* aCircle )
|
||||
LIB_SHAPE* aCircle )
|
||||
{
|
||||
LTSPICE_SCHEMATIC::CIRCLE& lt_circle = aLTSymbol.Circles[aIndex];
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2016 CERN
|
||||
* Copyright (C) 2016-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2016-2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Wayne Stambaugh <stambaughw@gmail.com>
|
||||
*
|
||||
|
@ -73,7 +73,7 @@ SCH_SHEET* SCH_IO::LoadSchematicFile( const wxString& aFileName, SCHEMATIC* aSch
|
|||
|
||||
|
||||
void SCH_IO::SaveSchematicFile( const wxString& aFileName, SCH_SHEET* aSheet, SCHEMATIC* aSchematic,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// not pure virtual so that plugins only have to implement subset of the SCH_IO interface.
|
||||
NOT_IMPLEMENTED( __FUNCTION__ );
|
||||
|
@ -81,8 +81,8 @@ void SCH_IO::SaveSchematicFile( const wxString& aFileName, SCH_SHEET* aSheet, SC
|
|||
|
||||
|
||||
void SCH_IO::EnumerateSymbolLib( wxArrayString& aAliasNameList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// not pure virtual so that plugins only have to implement subset of the SCH_IO interface.
|
||||
NOT_IMPLEMENTED( __FUNCTION__ );
|
||||
|
@ -90,8 +90,8 @@ void SCH_IO::EnumerateSymbolLib( wxArrayString& aAliasNameList,
|
|||
|
||||
|
||||
void SCH_IO::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// not pure virtual so that plugins only have to implement subset of the SCH_IO interface.
|
||||
NOT_IMPLEMENTED( __FUNCTION__ );
|
||||
|
@ -99,7 +99,7 @@ void SCH_IO::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
|||
|
||||
|
||||
LIB_SYMBOL* SCH_IO::LoadSymbol( const wxString& aLibraryPath, const wxString& aSymbolName,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// not pure virtual so that plugins only have to implement subset of the SCH_IO interface.
|
||||
NOT_IMPLEMENTED( __FUNCTION__ );
|
||||
|
@ -107,7 +107,7 @@ LIB_SYMBOL* SCH_IO::LoadSymbol( const wxString& aLibraryPath, const wxString& aS
|
|||
|
||||
|
||||
void SCH_IO::SaveSymbol( const wxString& aLibraryPath, const LIB_SYMBOL* aSymbol,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// not pure virtual so that plugins only have to implement subset of the SCH_IO interface.
|
||||
NOT_IMPLEMENTED( __FUNCTION__ );
|
||||
|
@ -115,7 +115,7 @@ void SCH_IO::SaveSymbol( const wxString& aLibraryPath, const LIB_SYMBOL* aSymbol
|
|||
|
||||
|
||||
void SCH_IO::DeleteSymbol( const wxString& aLibraryPath, const wxString& aSymbolName,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// not pure virtual so that plugins only have to implement subset of the SCH_IO interface.
|
||||
NOT_IMPLEMENTED( __FUNCTION__ );
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2016 CERN
|
||||
* Copyright (C) 2016-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2016-2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* @author Wayne Stambaugh <stambaughw@gmail.com>
|
||||
*
|
||||
|
@ -81,7 +81,8 @@ public:
|
|||
*/
|
||||
virtual int GetModifyHash() const = 0;
|
||||
|
||||
virtual void SaveLibrary( const wxString& aFileName, const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
virtual void SaveLibrary( const wxString& aFileName,
|
||||
const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
|
||||
/**
|
||||
* Load information from some input file format that this #SCH_IO implementation
|
||||
|
@ -363,4 +364,4 @@ protected:
|
|||
};
|
||||
|
||||
|
||||
#endif // SCH_IO_H_
|
||||
#endif // SCH_IO_H_
|
||||
|
|
Loading…
Reference in New Issue