mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 00:21:25 +00:00
Rename all schematic IO plugins
This commit is contained in:
parent
d8b47d18d3
commit
85f62c1fde
eeschema
CMakeLists.txtsch_rtree.hsch_screen.hsch_sheet.hsheet.cpp
dialogs
eeschema_jobs_handler.cppfiles-io.cpplib_field.hproject_rescue.cppproject_rescue.hsch_io
altium
cadstar
database
eagle
easyeda
easyedapro
http_lib
kicad_legacy
sch_io_kicad_legacy.cppsch_io_kicad_legacy.hsch_io_kicad_legacy_helpers.cppsch_io_kicad_legacy_helpers.hsch_io_kicad_legacy_lib_cache.cppsch_io_kicad_legacy_lib_cache.h
kicad_sexpr
sch_io_kicad_sexpr.cppsch_io_kicad_sexpr.hsch_io_kicad_sexpr_common.cppsch_io_kicad_sexpr_common.hsch_io_kicad_sexpr_lib_cache.cppsch_io_kicad_sexpr_lib_cache.hsch_io_kicad_sexpr_parser.cppsch_io_kicad_sexpr_parser.h
ltspice
ltspice_schematic.cppsch_io_ltspice.cppsch_io_ltspice.hsch_io_ltspice_parser.cppsch_io_ltspice_parser.h
sch_io_lib_cache.cppsch_io_lib_cache.hsch_io_mgr.cppsymbol_editor
symbol_lib_table.cppsymbol_library.cppsymbol_library_manager.cppsymbol_library_manager.htools
qa/schematic_utils
@ -42,52 +42,52 @@ include_directories(
|
||||
)
|
||||
|
||||
set( EESCHEMA_SCH_IO
|
||||
sch_io/sch_lib_plugin_cache.cpp
|
||||
sch_io/sch_io_lib_cache.cpp
|
||||
|
||||
sch_io/sch_io.cpp
|
||||
sch_io/sch_io_mgr.cpp
|
||||
|
||||
# KiCad IO plugin
|
||||
sch_io/kicad/sch_sexpr_lib_plugin_cache.cpp
|
||||
sch_io/kicad/sch_sexpr_plugin_common.cpp
|
||||
sch_io/kicad/sch_sexpr_parser.cpp
|
||||
sch_io/kicad/sch_sexpr_plugin.cpp
|
||||
sch_io/kicad_sexpr/sch_io_kicad_sexpr.cpp
|
||||
sch_io/kicad_sexpr/sch_io_kicad_sexpr_lib_cache.cpp
|
||||
sch_io/kicad_sexpr/sch_io_kicad_sexpr_common.cpp
|
||||
sch_io/kicad_sexpr/sch_io_kicad_sexpr_parser.cpp
|
||||
|
||||
# Legacy IO plugin
|
||||
sch_io/legacy/sch_legacy_lib_plugin_cache.cpp
|
||||
sch_io/legacy/sch_legacy_plugin.cpp
|
||||
sch_io/legacy/sch_legacy_plugin_helpers.cpp
|
||||
sch_io/kicad_legacy/sch_io_kicad_legacy_lib_cache.cpp
|
||||
sch_io/kicad_legacy/sch_io_kicad_legacy.cpp
|
||||
sch_io/kicad_legacy/sch_io_kicad_legacy_helpers.cpp
|
||||
|
||||
# HTTP IO plugin
|
||||
sch_io/http_lib/sch_http_lib_plugin.cpp
|
||||
sch_io/http_lib/sch_io_http_lib.cpp
|
||||
|
||||
# Database IO plugin
|
||||
sch_io/database/sch_database_plugin.cpp
|
||||
sch_io/database/sch_io_database.cpp
|
||||
|
||||
# Eagle IO plugin
|
||||
sch_io/eagle/sch_eagle_plugin.cpp
|
||||
sch_io/eagle/sch_io_eagle.cpp
|
||||
|
||||
# Altium IO plugin
|
||||
sch_io/altium/altium_parser_sch.cpp
|
||||
sch_io/altium/sch_altium_plugin.cpp
|
||||
sch_io/altium/sch_io_altium.cpp
|
||||
|
||||
# Cadstar IO plugin
|
||||
sch_io/cadstar/cadstar_sch_archive_loader.cpp
|
||||
sch_io/cadstar/cadstar_sch_archive_parser.cpp
|
||||
sch_io/cadstar/cadstar_sch_archive_plugin.cpp
|
||||
sch_io/cadstar/sch_io_cadstar_archive.cpp
|
||||
|
||||
# LTSpice IO plugin
|
||||
sch_io/ltspice/ltspice_schematic.cpp
|
||||
sch_io/ltspice/ltspice_sch_parser.cpp
|
||||
sch_io/ltspice/ltspice_sch_plugin.cpp
|
||||
sch_io/ltspice/sch_io_ltspice.cpp
|
||||
sch_io/ltspice/sch_io_ltspice_parser.cpp
|
||||
|
||||
# EasyEDA IO plugin
|
||||
sch_io/easyeda/sch_easyeda_parser.cpp
|
||||
sch_io/easyeda/sch_easyeda_plugin.cpp
|
||||
sch_io/easyeda/sch_io_easyeda.cpp
|
||||
|
||||
# EasyEDA Pro IO plugin
|
||||
sch_io/easyedapro/sch_easyedapro_parser.cpp
|
||||
sch_io/easyedapro/sch_easyedapro_plugin.cpp
|
||||
sch_io/easyedapro/sch_io_easyedapro.cpp
|
||||
)
|
||||
|
||||
set( EESCHEMA_DLGS
|
||||
|
@ -19,12 +19,12 @@
|
||||
*/
|
||||
|
||||
#include <dialogs/dialog_database_lib_settings.h>
|
||||
#include <sch_io/database/sch_database_plugin.h>
|
||||
#include <sch_io/database/sch_io_database.h>
|
||||
#include <database/database_lib_settings.h>
|
||||
|
||||
|
||||
DIALOG_DATABASE_LIB_SETTINGS::DIALOG_DATABASE_LIB_SETTINGS( wxWindow* aParent,
|
||||
SCH_DATABASE_PLUGIN* aPlugin ) :
|
||||
SCH_IO_DATABASE* aPlugin ) :
|
||||
DIALOG_DATABASE_LIB_SETTINGS_BASE( aParent ),
|
||||
m_plugin( aPlugin )
|
||||
{
|
||||
|
@ -23,12 +23,12 @@
|
||||
|
||||
#include "dialog_database_lib_settings_base.h"
|
||||
|
||||
class SCH_DATABASE_PLUGIN;
|
||||
class SCH_IO_DATABASE;
|
||||
|
||||
class DIALOG_DATABASE_LIB_SETTINGS : public DIALOG_DATABASE_LIB_SETTINGS_BASE
|
||||
{
|
||||
public:
|
||||
DIALOG_DATABASE_LIB_SETTINGS( wxWindow* aParent, SCH_DATABASE_PLUGIN* aPlugin );
|
||||
DIALOG_DATABASE_LIB_SETTINGS( wxWindow* aParent, SCH_IO_DATABASE* aPlugin );
|
||||
|
||||
virtual ~DIALOG_DATABASE_LIB_SETTINGS() {}
|
||||
|
||||
@ -44,7 +44,7 @@ protected:
|
||||
private:
|
||||
bool hasPotentiallyValidConfig();
|
||||
|
||||
SCH_DATABASE_PLUGIN* m_plugin;
|
||||
SCH_IO_DATABASE* m_plugin;
|
||||
};
|
||||
|
||||
#endif //KICAD_DIALOG_DATABASE_LIB_SETTINGS_H
|
||||
|
@ -50,7 +50,7 @@
|
||||
#include <settings/settings_manager.h>
|
||||
|
||||
#include <sch_file_versions.h>
|
||||
#include <sch_io/kicad/sch_sexpr_lib_plugin_cache.h>
|
||||
#include <sch_io/kicad_sexpr/sch_io_kicad_sexpr_lib_cache.h>
|
||||
|
||||
#include <netlist.h>
|
||||
#include <netlist_exporter_base.h>
|
||||
@ -802,7 +802,7 @@ int EESCHEMA_JOBS_HANDLER::JobSymExportSvg( JOB* aJob )
|
||||
wxFileName fn( svgJob->m_libraryPath );
|
||||
fn.MakeAbsolute();
|
||||
|
||||
SCH_SEXPR_PLUGIN_CACHE schLibrary( fn.GetFullPath() );
|
||||
SCH_IO_KICAD_SEXPR_LIB_CACHE schLibrary( fn.GetFullPath() );
|
||||
|
||||
try
|
||||
{
|
||||
@ -872,7 +872,7 @@ int EESCHEMA_JOBS_HANDLER::JobSymUpgrade( JOB* aJob )
|
||||
wxFileName fn( upgradeJob->m_libraryPath );
|
||||
fn.MakeAbsolute();
|
||||
|
||||
SCH_SEXPR_PLUGIN_CACHE schLibrary( fn.GetFullPath() );
|
||||
SCH_IO_KICAD_SEXPR_LIB_CACHE schLibrary( fn.GetFullPath() );
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -48,7 +48,7 @@
|
||||
#include <sch_bus_entry.h>
|
||||
#include <sch_commit.h>
|
||||
#include <sch_edit_frame.h>
|
||||
#include <sch_io/legacy/sch_legacy_plugin.h>
|
||||
#include <sch_io/kicad_legacy/sch_io_kicad_legacy.h>
|
||||
#include <sch_file_versions.h>
|
||||
#include <sch_line.h>
|
||||
#include <sch_sheet.h>
|
||||
@ -535,7 +535,7 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
||||
// cache library or missing installed libraries, this can cause connectivity errors
|
||||
// unless junctions are added.
|
||||
//
|
||||
// TODO: (RFB) This really needs to be put inside the Load() function of the SCH_LEGACY_PLUGIN
|
||||
// TODO: (RFB) This really needs to be put inside the Load() function of the SCH_IO_KICAD_LEGACY
|
||||
// I can't put it right now because of the extra code that is above to convert legacy bus-bus
|
||||
// entries to bus wires
|
||||
if( schFileType == SCH_IO_MGR::SCH_LEGACY )
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include <lib_item.h>
|
||||
|
||||
|
||||
class SCH_LEGACY_PLUGIN_CACHE;
|
||||
class SCH_IO_KICAD_LEGACY_LIB_CACHE;
|
||||
|
||||
|
||||
/**
|
||||
@ -234,7 +234,7 @@ private:
|
||||
*/
|
||||
void CalcEdit( const VECTOR2I& aPosition ) override;
|
||||
|
||||
friend class SCH_LEGACY_PLUGIN_CACHE; // Required to access m_name.
|
||||
friend class SCH_IO_KICAD_LEGACY_LIB_CACHE; // Required to access m_name.
|
||||
|
||||
int m_id; ///< @see enum MANDATORY_FIELD_T
|
||||
wxString m_name; ///< Name (not the field text value itself, that is #EDA_TEXT::m_Text)
|
||||
|
@ -822,7 +822,7 @@ void SYMBOL_LIB_TABLE_RESCUER::InvokeDialog( wxWindow* aParent, bool aAskShowAga
|
||||
|
||||
void SYMBOL_LIB_TABLE_RESCUER::OpenRescueLibrary()
|
||||
{
|
||||
(*m_properties)[ SCH_LEGACY_PLUGIN::PropBuffering ] = "";
|
||||
(*m_properties)[ SCH_IO_KICAD_LEGACY::PropBuffering ] = "";
|
||||
|
||||
wxFileName fn = GetRescueLibraryFileName( m_schematic );
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include <string_utf8_map.h>
|
||||
#include <lib_symbol.h>
|
||||
#include <sch_io/legacy/sch_legacy_plugin.h>
|
||||
#include <sch_io/kicad_legacy/sch_io_kicad_legacy.h>
|
||||
#include <class_draw_panel_gal.h>
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@ class LIB_SYMBOL;
|
||||
class SCH_SYMBOL;
|
||||
class RESCUER;
|
||||
class SCH_EDIT_FRAME;
|
||||
class SCH_LEGACY_PLUGIN;
|
||||
class SCH_IO_KICAD_LEGACY;
|
||||
class SCH_SHEET_PATH;
|
||||
class SCHEMATIC;
|
||||
|
||||
|
@ -501,7 +501,7 @@ ASCH_HARNESS_ENTRY::ASCH_HARNESS_ENTRY( const std::map<wxString, wxString>& aPro
|
||||
{
|
||||
wxASSERT( ReadRecord( aProps ) == ALTIUM_SCH_RECORD::HARNESS_ENTRY );
|
||||
|
||||
// use SCH_ALTIUM_PLUGIN::m_harnessEntryParent instead, because this property sometimes
|
||||
// use SCH_IO_ALTIUM::m_harnessEntryParent instead, because this property sometimes
|
||||
// does not exist in altium file!
|
||||
// ownerindex = ReadOwnerIndex( aProps );
|
||||
|
||||
@ -527,7 +527,7 @@ ASCH_HARNESS_TYPE::ASCH_HARNESS_TYPE( const std::map<wxString, wxString>& aProps
|
||||
{
|
||||
wxASSERT( ReadRecord( aProps ) == ALTIUM_SCH_RECORD::HARNESS_TYPE );
|
||||
|
||||
//ownerindex = ReadOwnerIndex( aProps ); // use SCH_ALTIUM_PLUGIN::m_harnessEntryParent instead!
|
||||
//ownerindex = ReadOwnerIndex( aProps ); // use SCH_IO_ALTIUM::m_harnessEntryParent instead!
|
||||
|
||||
Text = ALTIUM_PARSER::ReadString( aProps, "TEXT", "" );
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <io/io_utils.h>
|
||||
#include <io/altium/altium_parser.h>
|
||||
#include <io/altium/altium_parser_utils.h>
|
||||
#include <sch_io/altium/sch_altium_plugin.h>
|
||||
#include <sch_io/altium/sch_io_altium.h>
|
||||
|
||||
#include <schematic.h>
|
||||
#include <project_sch.h>
|
||||
@ -223,7 +223,7 @@ static void SetLibShapeFillAndColor( const ASCH_FILL_INTERFACE& elem, LIB_SHAPE*
|
||||
}
|
||||
|
||||
|
||||
SCH_ALTIUM_PLUGIN::SCH_ALTIUM_PLUGIN()
|
||||
SCH_IO_ALTIUM::SCH_IO_ALTIUM()
|
||||
{
|
||||
m_isIntLib = false;
|
||||
m_rootSheet = nullptr;
|
||||
@ -235,7 +235,7 @@ SCH_ALTIUM_PLUGIN::SCH_ALTIUM_PLUGIN()
|
||||
}
|
||||
|
||||
|
||||
SCH_ALTIUM_PLUGIN::~SCH_ALTIUM_PLUGIN()
|
||||
SCH_IO_ALTIUM::~SCH_IO_ALTIUM()
|
||||
{
|
||||
for( auto& [libName, lib] : m_libCache )
|
||||
{
|
||||
@ -247,26 +247,26 @@ SCH_ALTIUM_PLUGIN::~SCH_ALTIUM_PLUGIN()
|
||||
}
|
||||
|
||||
|
||||
const wxString SCH_ALTIUM_PLUGIN::GetName() const
|
||||
const wxString SCH_IO_ALTIUM::GetName() const
|
||||
{
|
||||
return "Altium";
|
||||
}
|
||||
|
||||
|
||||
int SCH_ALTIUM_PLUGIN::GetModifyHash() const
|
||||
int SCH_IO_ALTIUM::GetModifyHash() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
bool SCH_ALTIUM_PLUGIN::checkFileHeader( const wxString& aFileName )
|
||||
bool SCH_IO_ALTIUM::checkFileHeader( const wxString& aFileName )
|
||||
{
|
||||
// Compound File Binary Format header
|
||||
return IO_UTILS::fileStartsWithBinaryHeader( aFileName, IO_UTILS::COMPOUND_FILE_HEADER );
|
||||
}
|
||||
|
||||
|
||||
bool SCH_ALTIUM_PLUGIN::CanReadSchematicFile( const wxString& aFileName ) const
|
||||
bool SCH_IO_ALTIUM::CanReadSchematicFile( const wxString& aFileName ) const
|
||||
{
|
||||
if( !SCH_IO::CanReadSchematicFile( aFileName ) )
|
||||
return false;
|
||||
@ -275,7 +275,7 @@ bool SCH_ALTIUM_PLUGIN::CanReadSchematicFile( const wxString& aFileName ) const
|
||||
}
|
||||
|
||||
|
||||
bool SCH_ALTIUM_PLUGIN::CanReadLibrary( const wxString& aFileName ) const
|
||||
bool SCH_IO_ALTIUM::CanReadLibrary( const wxString& aFileName ) const
|
||||
{
|
||||
if( !SCH_IO::CanReadLibrary( aFileName ) )
|
||||
return false;
|
||||
@ -284,7 +284,7 @@ bool SCH_ALTIUM_PLUGIN::CanReadLibrary( const wxString& aFileName ) const
|
||||
}
|
||||
|
||||
|
||||
wxString SCH_ALTIUM_PLUGIN::getLibName()
|
||||
wxString SCH_IO_ALTIUM::getLibName()
|
||||
{
|
||||
if( m_libName.IsEmpty() )
|
||||
{
|
||||
@ -308,7 +308,7 @@ wxString SCH_ALTIUM_PLUGIN::getLibName()
|
||||
}
|
||||
|
||||
|
||||
wxFileName SCH_ALTIUM_PLUGIN::getLibFileName()
|
||||
wxFileName SCH_IO_ALTIUM::getLibFileName()
|
||||
{
|
||||
wxFileName fn( m_schematic->Prj().GetProjectPath(), getLibName(), KiCadSymbolLibFileExtension );
|
||||
|
||||
@ -316,7 +316,7 @@ wxFileName SCH_ALTIUM_PLUGIN::getLibFileName()
|
||||
}
|
||||
|
||||
|
||||
SCH_SHEET* SCH_ALTIUM_PLUGIN::LoadSchematicFile( const wxString& aFileName, SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* SCH_IO_ALTIUM::LoadSchematicFile( const wxString& aFileName, SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* aAppendToMe,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -413,19 +413,19 @@ SCH_SHEET* SCH_ALTIUM_PLUGIN::LoadSchematicFile( const wxString& aFileName, SCHE
|
||||
}
|
||||
|
||||
|
||||
SCH_SCREEN* SCH_ALTIUM_PLUGIN::getCurrentScreen()
|
||||
SCH_SCREEN* SCH_IO_ALTIUM::getCurrentScreen()
|
||||
{
|
||||
return m_sheetPath.LastScreen();
|
||||
}
|
||||
|
||||
|
||||
SCH_SHEET* SCH_ALTIUM_PLUGIN::getCurrentSheet()
|
||||
SCH_SHEET* SCH_IO_ALTIUM::getCurrentSheet()
|
||||
{
|
||||
return m_sheetPath.Last();
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseAltiumSch( const wxString& aFileName )
|
||||
void SCH_IO_ALTIUM::ParseAltiumSch( const wxString& aFileName )
|
||||
{
|
||||
ALTIUM_COMPOUND_FILE altiumSchFile( aFileName );
|
||||
|
||||
@ -507,7 +507,7 @@ void SCH_ALTIUM_PLUGIN::ParseAltiumSch( const wxString& aFileName )
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseStorage( const ALTIUM_COMPOUND_FILE& aAltiumSchFile )
|
||||
void SCH_IO_ALTIUM::ParseStorage( const ALTIUM_COMPOUND_FILE& aAltiumSchFile )
|
||||
{
|
||||
const CFB::COMPOUND_FILE_ENTRY* file = aAltiumSchFile.FindStream( { "Storage" } );
|
||||
|
||||
@ -543,7 +543,7 @@ void SCH_ALTIUM_PLUGIN::ParseStorage( const ALTIUM_COMPOUND_FILE& aAltiumSchFile
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseAdditional( const ALTIUM_COMPOUND_FILE& aAltiumSchFile )
|
||||
void SCH_IO_ALTIUM::ParseAdditional( const ALTIUM_COMPOUND_FILE& aAltiumSchFile )
|
||||
{
|
||||
const CFB::COMPOUND_FILE_ENTRY* file = aAltiumSchFile.FindStream( { "Additional" } );
|
||||
|
||||
@ -619,7 +619,7 @@ void SCH_ALTIUM_PLUGIN::ParseAdditional( const ALTIUM_COMPOUND_FILE& aAltiumSchF
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseFileHeader( const ALTIUM_COMPOUND_FILE& aAltiumSchFile )
|
||||
void SCH_IO_ALTIUM::ParseFileHeader( const ALTIUM_COMPOUND_FILE& aAltiumSchFile )
|
||||
{
|
||||
const CFB::COMPOUND_FILE_ENTRY* file = aAltiumSchFile.FindStream( { "FileHeader" } );
|
||||
|
||||
@ -831,7 +831,7 @@ void SCH_ALTIUM_PLUGIN::ParseFileHeader( const ALTIUM_COMPOUND_FILE& aAltiumSchF
|
||||
break;
|
||||
}
|
||||
|
||||
SCH_ALTIUM_PLUGIN::m_harnessOwnerIndexOffset = index;
|
||||
SCH_IO_ALTIUM::m_harnessOwnerIndexOffset = index;
|
||||
}
|
||||
|
||||
if( reader.HasParsingError() )
|
||||
@ -879,7 +879,7 @@ void SCH_ALTIUM_PLUGIN::ParseFileHeader( const ALTIUM_COMPOUND_FILE& aAltiumSchF
|
||||
}
|
||||
|
||||
|
||||
bool SCH_ALTIUM_PLUGIN::IsComponentPartVisible( int aOwnerindex, int aOwnerpartdisplaymode ) const
|
||||
bool SCH_IO_ALTIUM::IsComponentPartVisible( int aOwnerindex, int aOwnerpartdisplaymode ) const
|
||||
{
|
||||
const auto& component = m_altiumComponents.find( aOwnerindex );
|
||||
|
||||
@ -890,7 +890,7 @@ bool SCH_ALTIUM_PLUGIN::IsComponentPartVisible( int aOwnerindex, int aOwnerpartd
|
||||
}
|
||||
|
||||
|
||||
const ASCH_STORAGE_FILE* SCH_ALTIUM_PLUGIN::GetFileFromStorage( const wxString& aFilename ) const
|
||||
const ASCH_STORAGE_FILE* SCH_IO_ALTIUM::GetFileFromStorage( const wxString& aFilename ) const
|
||||
{
|
||||
const ASCH_STORAGE_FILE* nonExactMatch = nullptr;
|
||||
|
||||
@ -907,7 +907,7 @@ const ASCH_STORAGE_FILE* SCH_ALTIUM_PLUGIN::GetFileFromStorage( const wxString&
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseComponent( int aIndex,
|
||||
void SCH_IO_ALTIUM::ParseComponent( int aIndex,
|
||||
const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
SCH_SHEET* currentSheet = m_sheetPath.Last();
|
||||
@ -971,7 +971,7 @@ void SCH_ALTIUM_PLUGIN::ParseComponent( int aIndex,
|
||||
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::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 );
|
||||
|
||||
@ -1233,7 +1233,7 @@ void SetTextPositioning( EDA_TEXT* text, ASCH_LABEL_JUSTIFICATION justification,
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::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 );
|
||||
|
||||
@ -1331,7 +1331,7 @@ void SCH_ALTIUM_PLUGIN::ParseLabel( const std::map<wxString, wxString>& aPropert
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::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 );
|
||||
|
||||
@ -1342,7 +1342,7 @@ void SCH_ALTIUM_PLUGIN::ParseTextFrame( const std::map<wxString, wxString>& aPro
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseNote( const std::map<wxString, wxString>& aProperties )
|
||||
void SCH_IO_ALTIUM::ParseNote( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
ASCH_NOTE elem( aProperties );
|
||||
AddTextBox( static_cast<ASCH_TEXT_FRAME*>( &elem ) );
|
||||
@ -1351,7 +1351,7 @@ void SCH_ALTIUM_PLUGIN::ParseNote( const std::map<wxString, wxString>& aProperti
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::AddTextBox(const ASCH_TEXT_FRAME *aElem )
|
||||
void SCH_IO_ALTIUM::AddTextBox(const ASCH_TEXT_FRAME *aElem )
|
||||
{
|
||||
SCH_TEXTBOX* textBox = new SCH_TEXTBOX();
|
||||
|
||||
@ -1414,7 +1414,7 @@ void SCH_ALTIUM_PLUGIN::AddTextBox(const ASCH_TEXT_FRAME *aElem )
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::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
|
||||
@ -1493,7 +1493,7 @@ void SCH_ALTIUM_PLUGIN::AddLibTextBox(const ASCH_TEXT_FRAME *aElem, std::vector<
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseBezier( const std::map<wxString, wxString>& aProperties,
|
||||
void SCH_IO_ALTIUM::ParseBezier( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
{
|
||||
ASCH_BEZIER elem( aProperties );
|
||||
@ -1657,7 +1657,7 @@ void SCH_ALTIUM_PLUGIN::ParseBezier( const std::map<wxString, wxString>& aProper
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParsePolyline( const std::map<wxString, wxString>& aProperties,
|
||||
void SCH_IO_ALTIUM::ParsePolyline( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
{
|
||||
ASCH_POLYLINE elem( aProperties );
|
||||
@ -1727,7 +1727,7 @@ void SCH_ALTIUM_PLUGIN::ParsePolyline( const std::map<wxString, wxString>& aProp
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParsePolygon( const std::map<wxString, wxString>& aProperties,
|
||||
void SCH_IO_ALTIUM::ParsePolygon( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
{
|
||||
ASCH_POLYGON elem( aProperties );
|
||||
@ -1807,7 +1807,7 @@ void SCH_ALTIUM_PLUGIN::ParsePolygon( const std::map<wxString, wxString>& aPrope
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseRoundRectangle( const std::map<wxString, wxString>& aProperties,
|
||||
void SCH_IO_ALTIUM::ParseRoundRectangle( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
{
|
||||
ASCH_ROUND_RECTANGLE elem( aProperties );
|
||||
@ -1900,7 +1900,7 @@ void SCH_ALTIUM_PLUGIN::ParseRoundRectangle( const std::map<wxString, wxString>&
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::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 );
|
||||
|
||||
@ -2013,7 +2013,7 @@ void SCH_ALTIUM_PLUGIN::ParseArc( const std::map<wxString, wxString>& aPropertie
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::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 );
|
||||
|
||||
@ -2107,7 +2107,7 @@ void SCH_ALTIUM_PLUGIN::ParseEllipticalArc( const std::map<wxString, wxString>&
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::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 );
|
||||
|
||||
@ -2235,7 +2235,7 @@ void SCH_ALTIUM_PLUGIN::ParseEllipse( const std::map<wxString, wxString>& aPrope
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::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 );
|
||||
|
||||
@ -2301,7 +2301,7 @@ void SCH_ALTIUM_PLUGIN::ParseCircle( const std::map<wxString, wxString>& aProper
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::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 );
|
||||
|
||||
@ -2369,7 +2369,7 @@ void SCH_ALTIUM_PLUGIN::ParseLine( const std::map<wxString, wxString>& aProperti
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseSignalHarness( const std::map<wxString, wxString>& aProperties )
|
||||
void SCH_IO_ALTIUM::ParseSignalHarness( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
ASCH_SIGNAL_HARNESS elem( aProperties );
|
||||
|
||||
@ -2398,7 +2398,7 @@ void SCH_ALTIUM_PLUGIN::ParseSignalHarness( const std::map<wxString, wxString>&
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseHarnessConnector( int aIndex, const std::map<wxString,
|
||||
void SCH_IO_ALTIUM::ParseHarnessConnector( int aIndex, const std::map<wxString,
|
||||
wxString>& aProperties )
|
||||
{
|
||||
ASCH_HARNESS_CONNECTOR elem( aProperties );
|
||||
@ -2435,7 +2435,7 @@ void SCH_ALTIUM_PLUGIN::ParseHarnessConnector( int aIndex, const std::map<wxStri
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseHarnessEntry( const std::map<wxString, wxString>& aProperties )
|
||||
void SCH_IO_ALTIUM::ParseHarnessEntry( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
ASCH_HARNESS_ENTRY elem( aProperties );
|
||||
|
||||
@ -2444,7 +2444,7 @@ void SCH_ALTIUM_PLUGIN::ParseHarnessEntry( const std::map<wxString, wxString>& a
|
||||
if( sheetIt == m_sheets.end() )
|
||||
{
|
||||
m_reporter->Report( wxString::Format( wxT( "Harness entry's parent (%d) not found." ),
|
||||
SCH_ALTIUM_PLUGIN::m_harnessEntryParent ),
|
||||
SCH_IO_ALTIUM::m_harnessEntryParent ),
|
||||
RPT_SEVERITY_DEBUG );
|
||||
return;
|
||||
}
|
||||
@ -2485,7 +2485,7 @@ void SCH_ALTIUM_PLUGIN::ParseHarnessEntry( const std::map<wxString, wxString>& a
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseHarnessType( const std::map<wxString, wxString>& aProperties )
|
||||
void SCH_IO_ALTIUM::ParseHarnessType( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
ASCH_HARNESS_TYPE elem( aProperties );
|
||||
|
||||
@ -2531,7 +2531,7 @@ void SCH_ALTIUM_PLUGIN::ParseHarnessType( const std::map<wxString, wxString>& aP
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseRectangle( const std::map<wxString, wxString>& aProperties,
|
||||
void SCH_IO_ALTIUM::ParseRectangle( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
{
|
||||
ASCH_RECTANGLE elem( aProperties );
|
||||
@ -2603,7 +2603,7 @@ void SCH_ALTIUM_PLUGIN::ParseRectangle( const std::map<wxString, wxString>& aPro
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseSheetSymbol( int aIndex,
|
||||
void SCH_IO_ALTIUM::ParseSheetSymbol( int aIndex,
|
||||
const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
ASCH_SHEET_SYMBOL elem( aProperties );
|
||||
@ -2641,7 +2641,7 @@ void SCH_ALTIUM_PLUGIN::ParseSheetSymbol( int aIndex,
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseSheetEntry( const std::map<wxString, wxString>& aProperties )
|
||||
void SCH_IO_ALTIUM::ParseSheetEntry( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
ASCH_SHEET_ENTRY elem( aProperties );
|
||||
|
||||
@ -2922,7 +2922,7 @@ VECTOR2I HelperGeneratePowerPortGraphics( LIB_SYMBOL* aKsymbol, ASCH_POWER_PORT_
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParsePowerPort( const std::map<wxString, wxString>& aProperties )
|
||||
void SCH_IO_ALTIUM::ParsePowerPort( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
ASCH_POWER_PORT elem( aProperties );
|
||||
LIB_ID libId = AltiumToKiCadLibID( getLibName(), elem.text );
|
||||
@ -3020,7 +3020,7 @@ void SCH_ALTIUM_PLUGIN::ParsePowerPort( const std::map<wxString, wxString>& aPro
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseHarnessPort( const ASCH_PORT& aElem )
|
||||
void SCH_IO_ALTIUM::ParseHarnessPort( const ASCH_PORT& aElem )
|
||||
{
|
||||
SCH_TEXTBOX* textBox = new SCH_TEXTBOX();
|
||||
|
||||
@ -3084,7 +3084,7 @@ void SCH_ALTIUM_PLUGIN::ParseHarnessPort( const ASCH_PORT& aElem )
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParsePort( const ASCH_PORT& aElem )
|
||||
void SCH_IO_ALTIUM::ParsePort( const ASCH_PORT& aElem )
|
||||
{
|
||||
if( !aElem.HarnessType.IsEmpty() )
|
||||
{
|
||||
@ -3224,7 +3224,7 @@ void SCH_ALTIUM_PLUGIN::ParsePort( const ASCH_PORT& aElem )
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseNoERC( const std::map<wxString, wxString>& aProperties )
|
||||
void SCH_IO_ALTIUM::ParseNoERC( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
ASCH_NO_ERC elem( aProperties );
|
||||
|
||||
@ -3241,7 +3241,7 @@ void SCH_ALTIUM_PLUGIN::ParseNoERC( const std::map<wxString, wxString>& aPropert
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseNetLabel( const std::map<wxString, wxString>& aProperties )
|
||||
void SCH_IO_ALTIUM::ParseNetLabel( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
ASCH_NET_LABEL elem( aProperties );
|
||||
|
||||
@ -3257,7 +3257,7 @@ void SCH_ALTIUM_PLUGIN::ParseNetLabel( const std::map<wxString, wxString>& aProp
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseBus( const std::map<wxString, wxString>& aProperties )
|
||||
void SCH_IO_ALTIUM::ParseBus( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
ASCH_BUS elem( aProperties );
|
||||
|
||||
@ -3277,7 +3277,7 @@ void SCH_ALTIUM_PLUGIN::ParseBus( const std::map<wxString, wxString>& aPropertie
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseWire( const std::map<wxString, wxString>& aProperties )
|
||||
void SCH_IO_ALTIUM::ParseWire( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
ASCH_WIRE elem( aProperties );
|
||||
|
||||
@ -3297,7 +3297,7 @@ void SCH_ALTIUM_PLUGIN::ParseWire( const std::map<wxString, wxString>& aProperti
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseJunction( const std::map<wxString, wxString>& aProperties )
|
||||
void SCH_IO_ALTIUM::ParseJunction( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
SCH_SCREEN* screen = getCurrentScreen();
|
||||
wxCHECK( screen, /* void */ );
|
||||
@ -3311,7 +3311,7 @@ void SCH_ALTIUM_PLUGIN::ParseJunction( const std::map<wxString, wxString>& aProp
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseImage( const std::map<wxString, wxString>& aProperties )
|
||||
void SCH_IO_ALTIUM::ParseImage( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
ASCH_IMAGE elem( aProperties );
|
||||
|
||||
@ -3388,7 +3388,7 @@ void SCH_ALTIUM_PLUGIN::ParseImage( const std::map<wxString, wxString>& aPropert
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseSheet( const std::map<wxString, wxString>& aProperties )
|
||||
void SCH_IO_ALTIUM::ParseSheet( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
m_altiumSheet = std::make_unique<ASCH_SHEET>( aProperties );
|
||||
|
||||
@ -3437,7 +3437,7 @@ void SCH_ALTIUM_PLUGIN::ParseSheet( const std::map<wxString, wxString>& aPropert
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseSheetName( const std::map<wxString, wxString>& aProperties )
|
||||
void SCH_IO_ALTIUM::ParseSheetName( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
ASCH_SHEET_NAME elem( aProperties );
|
||||
|
||||
@ -3460,7 +3460,7 @@ void SCH_ALTIUM_PLUGIN::ParseSheetName( const std::map<wxString, wxString>& aPro
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseFileName( const std::map<wxString, wxString>& aProperties )
|
||||
void SCH_IO_ALTIUM::ParseFileName( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
ASCH_FILE_NAME elem( aProperties );
|
||||
|
||||
@ -3485,7 +3485,7 @@ void SCH_ALTIUM_PLUGIN::ParseFileName( const std::map<wxString, wxString>& aProp
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseDesignator( const std::map<wxString, wxString>& aProperties )
|
||||
void SCH_IO_ALTIUM::ParseDesignator( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
ASCH_DESIGNATOR elem( aProperties );
|
||||
|
||||
@ -3524,7 +3524,7 @@ void SCH_ALTIUM_PLUGIN::ParseDesignator( const std::map<wxString, wxString>& aPr
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseLibDesignator( const std::map<wxString, wxString>& aProperties,
|
||||
void SCH_IO_ALTIUM::ParseLibDesignator( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol,
|
||||
std::vector<int>& aFontSizes )
|
||||
{
|
||||
@ -3552,7 +3552,7 @@ void SCH_ALTIUM_PLUGIN::ParseLibDesignator( const std::map<wxString, wxString>&
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseBusEntry( const std::map<wxString, wxString>& aProperties )
|
||||
void SCH_IO_ALTIUM::ParseBusEntry( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
ASCH_BUS_ENTRY elem( aProperties );
|
||||
|
||||
@ -3569,7 +3569,7 @@ void SCH_ALTIUM_PLUGIN::ParseBusEntry( const std::map<wxString, wxString>& aProp
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseParameter( const std::map<wxString, wxString>& aProperties )
|
||||
void SCH_IO_ALTIUM::ParseParameter( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
ASCH_PARAMETER elem( aProperties );
|
||||
|
||||
@ -3667,7 +3667,7 @@ void SCH_ALTIUM_PLUGIN::ParseParameter( const std::map<wxString, wxString>& aPro
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseLibParameter( const std::map<wxString, wxString>& aProperties,
|
||||
void SCH_IO_ALTIUM::ParseLibParameter( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol,
|
||||
std::vector<int>& aFontSizes )
|
||||
{
|
||||
@ -3741,7 +3741,7 @@ void SCH_ALTIUM_PLUGIN::ParseLibParameter( const std::map<wxString, wxString>& a
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseImplementationList( int aIndex,
|
||||
void SCH_IO_ALTIUM::ParseImplementationList( int aIndex,
|
||||
const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
ASCH_IMPLEMENTATION_LIST elem( aProperties );
|
||||
@ -3750,7 +3750,7 @@ void SCH_ALTIUM_PLUGIN::ParseImplementationList( int aIndex,
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ParseImplementation( const std::map<wxString, wxString>& aProperties,
|
||||
void SCH_IO_ALTIUM::ParseImplementation( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
{
|
||||
ASCH_IMPLEMENTATION elem( aProperties );
|
||||
@ -3814,7 +3814,7 @@ void SCH_ALTIUM_PLUGIN::ParseImplementation( const std::map<wxString, wxString>&
|
||||
|
||||
|
||||
|
||||
std::vector<LIB_SYMBOL*> SCH_ALTIUM_PLUGIN::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 );
|
||||
|
||||
@ -3842,7 +3842,7 @@ std::vector<LIB_SYMBOL*> SCH_ALTIUM_PLUGIN::ParseLibComponent( const std::map<wx
|
||||
}
|
||||
|
||||
|
||||
std::map<wxString,LIB_SYMBOL*> SCH_ALTIUM_PLUGIN::ParseLibFile( const ALTIUM_COMPOUND_FILE& aAltiumLibFile )
|
||||
std::map<wxString,LIB_SYMBOL*> SCH_IO_ALTIUM::ParseLibFile( const ALTIUM_COMPOUND_FILE& aAltiumLibFile )
|
||||
{
|
||||
std::map<wxString,LIB_SYMBOL*> ret;
|
||||
std::vector<int> fontSizes;
|
||||
@ -4013,7 +4013,7 @@ std::map<wxString,LIB_SYMBOL*> SCH_ALTIUM_PLUGIN::ParseLibFile( const ALTIUM_COM
|
||||
}
|
||||
|
||||
|
||||
long long SCH_ALTIUM_PLUGIN::getLibraryTimestamp( const wxString& aLibraryPath ) const
|
||||
long long SCH_IO_ALTIUM::getLibraryTimestamp( const wxString& aLibraryPath ) const
|
||||
{
|
||||
wxFileName fn( aLibraryPath );
|
||||
|
||||
@ -4024,7 +4024,7 @@ long long SCH_ALTIUM_PLUGIN::getLibraryTimestamp( const wxString& aLibraryPath )
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::ensureLoadedLibrary( const wxString& aLibraryPath,
|
||||
void SCH_IO_ALTIUM::ensureLoadedLibrary( const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
if( m_libCache.count( aLibraryPath ) )
|
||||
@ -4085,7 +4085,7 @@ void SCH_ALTIUM_PLUGIN::ensureLoadedLibrary( const wxString& aLibraryPath
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::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" } );
|
||||
|
||||
@ -4130,7 +4130,7 @@ void SCH_ALTIUM_PLUGIN::ParseLibHeader( const ALTIUM_COMPOUND_FILE& aAltiumSchFi
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
void SCH_IO_ALTIUM::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -4147,7 +4147,7 @@ void SCH_ALTIUM_PLUGIN::EnumerateSymbolLib( wxArrayString& aSymbolNameLi
|
||||
}
|
||||
|
||||
|
||||
void SCH_ALTIUM_PLUGIN::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
void SCH_IO_ALTIUM::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -4162,7 +4162,7 @@ void SCH_ALTIUM_PLUGIN::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolLis
|
||||
}
|
||||
}
|
||||
|
||||
LIB_SYMBOL* SCH_ALTIUM_PLUGIN::LoadSymbol( const wxString& aLibraryPath,
|
||||
LIB_SYMBOL* SCH_IO_ALTIUM::LoadSymbol( const wxString& aLibraryPath,
|
||||
const wxString& aAliasName,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
@ -22,8 +22,8 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef _SCH_ALTIUM_PLUGIN_H_
|
||||
#define _SCH_ALTIUM_PLUGIN_H_
|
||||
#ifndef _SCH_IO_ALTIUM_H_
|
||||
#define _SCH_IO_ALTIUM_H_
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
@ -42,7 +42,7 @@ class TITLE_BLOCK;
|
||||
class ALTIUM_COMPOUND_FILE;
|
||||
|
||||
/**
|
||||
* SCH_ALTIUM_PLUGIN
|
||||
* SCH_IO_ALTIUM
|
||||
* is a #SCH_IO derivation for loading Altium .SchDoc schematic files.
|
||||
*
|
||||
* As with all SCH_IO there is no UI dependencies i.e. windowing calls allowed.
|
||||
@ -52,11 +52,11 @@ static std::vector<LIB_SYMBOL*> nullsym;
|
||||
static std::vector<int> nullint;
|
||||
|
||||
|
||||
class SCH_ALTIUM_PLUGIN : public SCH_IO
|
||||
class SCH_IO_ALTIUM : public SCH_IO
|
||||
{
|
||||
public:
|
||||
SCH_ALTIUM_PLUGIN();
|
||||
~SCH_ALTIUM_PLUGIN();
|
||||
SCH_IO_ALTIUM();
|
||||
~SCH_IO_ALTIUM();
|
||||
|
||||
const wxString GetName() const override;
|
||||
|
||||
@ -235,4 +235,4 @@ private:
|
||||
std::vector<std::pair<wxString, int>> m_fonts;
|
||||
};
|
||||
|
||||
#endif // _SCH_ALTIUM_PLUGIN_H_
|
||||
#endif // _SCH_IO_ALTIUM_H_
|
@ -18,28 +18,28 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef ALTIUM_LIB_IO_CACHE_
|
||||
#define ALTIUM_LIB_IO_CACHE_
|
||||
#ifndef SCH_IO_ALTIUM_LIB_CACHE_H_
|
||||
#define SCH_IO_ALTIUM_LIB_CACHE_H_
|
||||
|
||||
#include "sch_io/sch_lib_plugin_cache.h"
|
||||
#include "sch_io/sch_io_lib_cache.h"
|
||||
|
||||
class FILE_LINE_READER;
|
||||
class SCH_SEXPR_IO;
|
||||
class SCH_IO_KICAD_SEXPR;
|
||||
|
||||
/**
|
||||
* A cache assistant for Altium symbol libraries.
|
||||
*/
|
||||
class ALTIUM_LIB_IO_CACHE : public SCH_LIB_IO_CACHE
|
||||
class SCH_IO_ALTIUM_LIB_CACHE : public SCH_IO_LIB_CACHE
|
||||
{
|
||||
public:
|
||||
ALTIUM_LIB_IO_CACHE( const wxString& aLibraryPath );
|
||||
virtual ~ALTIUM_LIB_IO_CACHE();
|
||||
SCH_IO_ALTIUM_LIB_CACHE( const wxString& aLibraryPath );
|
||||
virtual ~SCH_IO_ALTIUM_LIB_CACHE();
|
||||
|
||||
void Load() override;
|
||||
|
||||
private:
|
||||
friend SCH_SEXPR_IO;
|
||||
friend SCH_IO_KICAD_SEXPR;
|
||||
|
||||
};
|
||||
|
||||
#endif // ALTIUM_LIB_IO_CACHE_
|
||||
#endif // SCH_IO_ALTIUM_LIB_CACHE_H_
|
@ -18,14 +18,8 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file cadstar_pcb_archive_plugin.cpp
|
||||
* @brief Pcbnew PLUGIN for CADSTAR PCB Archive (*.cpa) format: an ASCII format
|
||||
* based on S-expressions.
|
||||
*/
|
||||
|
||||
#include <sch_io/cadstar/cadstar_sch_archive_loader.h>
|
||||
#include <sch_io/cadstar/cadstar_sch_archive_plugin.h>
|
||||
#include <sch_io/cadstar/sch_io_cadstar_archive.h>
|
||||
#include <io/cadstar/cadstar_parts_lib_parser.h>
|
||||
|
||||
#include <lib_symbol.h>
|
||||
@ -35,7 +29,7 @@
|
||||
#include <sch_screen.h>
|
||||
#include <sch_sheet.h>
|
||||
#include <schematic.h>
|
||||
#include <sch_io/kicad/sch_sexpr_plugin.h>
|
||||
#include <sch_io/kicad_sexpr/sch_io_kicad_sexpr.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
#include <wx_filename.h>
|
||||
#include <wx/dir.h>
|
||||
@ -43,13 +37,13 @@
|
||||
#include <wx/txtstrm.h>
|
||||
|
||||
|
||||
const wxString CADSTAR_SCH_ARCHIVE_PLUGIN::GetName() const
|
||||
const wxString SCH_IO_CADSTAR_ARCHIVE::GetName() const
|
||||
{
|
||||
return wxT( "CADSTAR Schematic Archive" );
|
||||
}
|
||||
|
||||
|
||||
bool CADSTAR_SCH_ARCHIVE_PLUGIN::CanReadLibrary( const wxString& aFileName ) const
|
||||
bool SCH_IO_CADSTAR_ARCHIVE::CanReadLibrary( const wxString& aFileName ) const
|
||||
{
|
||||
if( !SCH_IO::CanReadLibrary( aFileName ) )
|
||||
return false;
|
||||
@ -67,13 +61,13 @@ bool CADSTAR_SCH_ARCHIVE_PLUGIN::CanReadLibrary( const wxString& aFileName ) con
|
||||
}
|
||||
|
||||
|
||||
int CADSTAR_SCH_ARCHIVE_PLUGIN::GetModifyHash() const
|
||||
int SCH_IO_CADSTAR_ARCHIVE::GetModifyHash() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
SCH_SHEET* CADSTAR_SCH_ARCHIVE_PLUGIN::LoadSchematicFile( const wxString& aFileName,
|
||||
SCH_SHEET* SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile( const wxString& aFileName,
|
||||
SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* aAppendToMe,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
@ -157,7 +151,7 @@ SCH_SHEET* CADSTAR_SCH_ARCHIVE_PLUGIN::LoadSchematicFile( const wxString&
|
||||
|
||||
// set properties to prevent save file on every symbol save
|
||||
STRING_UTF8_MAP properties;
|
||||
properties.emplace( SCH_SEXPR_PLUGIN::PropBuffering, "" );
|
||||
properties.emplace( SCH_IO_KICAD_SEXPR::PropBuffering, "" );
|
||||
|
||||
for( LIB_SYMBOL* const& symbol : csaLoader.GetLoadedSymbols() )
|
||||
sch_plugin->SaveSymbol( libFileName.GetFullPath(), symbol, &properties );
|
||||
@ -187,7 +181,7 @@ SCH_SHEET* CADSTAR_SCH_ARCHIVE_PLUGIN::LoadSchematicFile( const wxString&
|
||||
}
|
||||
|
||||
|
||||
void CADSTAR_SCH_ARCHIVE_PLUGIN::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
void SCH_IO_CADSTAR_ARCHIVE::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -198,7 +192,7 @@ void CADSTAR_SCH_ARCHIVE_PLUGIN::EnumerateSymbolLib( wxArrayString& aSym
|
||||
}
|
||||
|
||||
|
||||
void CADSTAR_SCH_ARCHIVE_PLUGIN::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
void SCH_IO_CADSTAR_ARCHIVE::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -209,7 +203,7 @@ void CADSTAR_SCH_ARCHIVE_PLUGIN::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& a
|
||||
}
|
||||
|
||||
|
||||
LIB_SYMBOL* CADSTAR_SCH_ARCHIVE_PLUGIN::LoadSymbol( const wxString& aLibraryPath,
|
||||
LIB_SYMBOL* SCH_IO_CADSTAR_ARCHIVE::LoadSymbol( const wxString& aLibraryPath,
|
||||
const wxString& aAliasName,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -222,7 +216,7 @@ LIB_SYMBOL* CADSTAR_SCH_ARCHIVE_PLUGIN::LoadSymbol( const wxString& aLibr
|
||||
}
|
||||
|
||||
|
||||
void CADSTAR_SCH_ARCHIVE_PLUGIN::GetAvailableSymbolFields( std::vector<wxString>& aNames )
|
||||
void SCH_IO_CADSTAR_ARCHIVE::GetAvailableSymbolFields( std::vector<wxString>& aNames )
|
||||
{
|
||||
std::set<wxString> fieldNames;
|
||||
|
||||
@ -244,7 +238,7 @@ void CADSTAR_SCH_ARCHIVE_PLUGIN::GetAvailableSymbolFields( std::vector<wxString>
|
||||
}
|
||||
|
||||
|
||||
void CADSTAR_SCH_ARCHIVE_PLUGIN::SymbolLibOptions( STRING_UTF8_MAP* aListToAppendTo ) const
|
||||
void SCH_IO_CADSTAR_ARCHIVE::SymbolLibOptions( STRING_UTF8_MAP* aListToAppendTo ) const
|
||||
{
|
||||
( *aListToAppendTo )["csa"] =
|
||||
UTF8( _( "Path to the CADSTAR schematic archive (*.csa) file related to this CADSTAR "
|
||||
@ -258,7 +252,7 @@ void CADSTAR_SCH_ARCHIVE_PLUGIN::SymbolLibOptions( STRING_UTF8_MAP* aListToAppen
|
||||
}
|
||||
|
||||
|
||||
void CADSTAR_SCH_ARCHIVE_PLUGIN::ensureLoadedLibrary( const wxString& aLibraryPath,
|
||||
void SCH_IO_CADSTAR_ARCHIVE::ensureLoadedLibrary( const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxFileName csafn;
|
@ -18,14 +18,8 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file cadstar_pcb_archive_plugin.h
|
||||
* @brief Pcbnew PLUGIN for CADSTAR PCB Archive (*.cpa) format: an ASCII format
|
||||
* based on S-expressions.
|
||||
*/
|
||||
|
||||
#ifndef CADSTAR_SCH_ARCHIVE_PLUGIN_H_
|
||||
#define CADSTAR_SCH_ARCHIVE_PLUGIN_H_
|
||||
#ifndef SCH_IO_CADSTAR_ARCHIVE_H_
|
||||
#define SCH_IO_CADSTAR_ARCHIVE_H_
|
||||
|
||||
#include <map>
|
||||
#include <sch_io/sch_io.h>
|
||||
@ -38,17 +32,17 @@
|
||||
class SCH_SHEET;
|
||||
class SCH_SCREEN;
|
||||
|
||||
class CADSTAR_SCH_ARCHIVE_PLUGIN : public SCH_IO
|
||||
class SCH_IO_CADSTAR_ARCHIVE : public SCH_IO
|
||||
{
|
||||
public:
|
||||
CADSTAR_SCH_ARCHIVE_PLUGIN() :
|
||||
SCH_IO_CADSTAR_ARCHIVE() :
|
||||
m_cacheTimestamp( 0 )
|
||||
{
|
||||
m_reporter = &WXLOG_REPORTER::GetInstance();
|
||||
m_progressReporter = nullptr;
|
||||
}
|
||||
|
||||
virtual ~CADSTAR_SCH_ARCHIVE_PLUGIN() {}
|
||||
virtual ~SCH_IO_CADSTAR_ARCHIVE() {}
|
||||
|
||||
const wxString GetName() const override;
|
||||
|
||||
@ -117,4 +111,4 @@ private:
|
||||
PROGRESS_REPORTER* m_progressReporter; // optional; may be nullptr
|
||||
};
|
||||
|
||||
#endif // CADSTAR_SCH_ARCHIVE_PLUGIN_H_
|
||||
#endif // SCH_IO_CADSTAR_ARCHIVE_H_
|
@ -30,10 +30,10 @@
|
||||
#include <lib_symbol.h>
|
||||
#include <symbol_lib_table.h>
|
||||
|
||||
#include "sch_database_plugin.h"
|
||||
#include "sch_io_database.h"
|
||||
|
||||
|
||||
SCH_DATABASE_PLUGIN::SCH_DATABASE_PLUGIN() :
|
||||
SCH_IO_DATABASE::SCH_IO_DATABASE() :
|
||||
m_libTable( nullptr ),
|
||||
m_settings(),
|
||||
m_conn()
|
||||
@ -41,12 +41,12 @@ SCH_DATABASE_PLUGIN::SCH_DATABASE_PLUGIN() :
|
||||
}
|
||||
|
||||
|
||||
SCH_DATABASE_PLUGIN::~SCH_DATABASE_PLUGIN()
|
||||
SCH_IO_DATABASE::~SCH_IO_DATABASE()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void SCH_DATABASE_PLUGIN::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
void SCH_IO_DATABASE::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -58,7 +58,7 @@ void SCH_DATABASE_PLUGIN::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
}
|
||||
|
||||
|
||||
void SCH_DATABASE_PLUGIN::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
void SCH_IO_DATABASE::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -107,7 +107,7 @@ void SCH_DATABASE_PLUGIN::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolL
|
||||
}
|
||||
|
||||
|
||||
LIB_SYMBOL* SCH_DATABASE_PLUGIN::LoadSymbol( const wxString& aLibraryPath,
|
||||
LIB_SYMBOL* SCH_IO_DATABASE::LoadSymbol( const wxString& aLibraryPath,
|
||||
const wxString& aAliasName,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -175,7 +175,7 @@ LIB_SYMBOL* SCH_DATABASE_PLUGIN::LoadSymbol( const wxString& aLibraryPath,
|
||||
}
|
||||
|
||||
|
||||
void SCH_DATABASE_PLUGIN::GetSubLibraryNames( std::vector<wxString>& aNames )
|
||||
void SCH_IO_DATABASE::GetSubLibraryNames( std::vector<wxString>& aNames )
|
||||
{
|
||||
ensureSettings( wxEmptyString );
|
||||
|
||||
@ -194,20 +194,20 @@ void SCH_DATABASE_PLUGIN::GetSubLibraryNames( std::vector<wxString>& aNames )
|
||||
}
|
||||
|
||||
|
||||
void SCH_DATABASE_PLUGIN::GetAvailableSymbolFields( std::vector<wxString>& aNames )
|
||||
void SCH_IO_DATABASE::GetAvailableSymbolFields( std::vector<wxString>& aNames )
|
||||
{
|
||||
std::copy( m_customFields.begin(), m_customFields.end(), std::back_inserter( aNames ) );
|
||||
}
|
||||
|
||||
|
||||
void SCH_DATABASE_PLUGIN::GetDefaultSymbolFields( std::vector<wxString>& aNames )
|
||||
void SCH_IO_DATABASE::GetDefaultSymbolFields( std::vector<wxString>& aNames )
|
||||
{
|
||||
std::copy( m_defaultShownFields.begin(), m_defaultShownFields.end(),
|
||||
std::back_inserter( aNames ) );
|
||||
}
|
||||
|
||||
|
||||
bool SCH_DATABASE_PLUGIN::TestConnection( wxString* aErrorMsg )
|
||||
bool SCH_IO_DATABASE::TestConnection( wxString* aErrorMsg )
|
||||
{
|
||||
if( m_conn && m_conn->IsConnected() )
|
||||
return true;
|
||||
@ -221,7 +221,7 @@ bool SCH_DATABASE_PLUGIN::TestConnection( wxString* aErrorMsg )
|
||||
}
|
||||
|
||||
|
||||
void SCH_DATABASE_PLUGIN::ensureSettings( const wxString& aSettingsPath )
|
||||
void SCH_IO_DATABASE::ensureSettings( const wxString& aSettingsPath )
|
||||
{
|
||||
auto tryLoad =
|
||||
[&]()
|
||||
@ -261,7 +261,7 @@ void SCH_DATABASE_PLUGIN::ensureSettings( const wxString& aSettingsPath )
|
||||
}
|
||||
|
||||
|
||||
void SCH_DATABASE_PLUGIN::ensureConnection()
|
||||
void SCH_IO_DATABASE::ensureConnection()
|
||||
{
|
||||
wxCHECK_RET( m_settings, "Call ensureSettings before ensureConnection!" );
|
||||
|
||||
@ -278,7 +278,7 @@ void SCH_DATABASE_PLUGIN::ensureConnection()
|
||||
}
|
||||
|
||||
|
||||
void SCH_DATABASE_PLUGIN::connect()
|
||||
void SCH_IO_DATABASE::connect()
|
||||
{
|
||||
wxCHECK_RET( m_settings, "Call ensureSettings before connect()!" );
|
||||
|
||||
@ -339,7 +339,7 @@ void SCH_DATABASE_PLUGIN::connect()
|
||||
}
|
||||
|
||||
|
||||
std::optional<bool> SCH_DATABASE_PLUGIN::boolFromAny( const std::any& aVal )
|
||||
std::optional<bool> SCH_IO_DATABASE::boolFromAny( const std::any& aVal )
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -388,7 +388,7 @@ std::optional<bool> SCH_DATABASE_PLUGIN::boolFromAny( const std::any& aVal )
|
||||
}
|
||||
|
||||
|
||||
LIB_SYMBOL* SCH_DATABASE_PLUGIN::loadSymbolFromRow( const wxString& aSymbolName,
|
||||
LIB_SYMBOL* SCH_IO_DATABASE::loadSymbolFromRow( const wxString& aSymbolName,
|
||||
const DATABASE_LIB_TABLE& aTable,
|
||||
const DATABASE_CONNECTION::ROW& aRow )
|
||||
{
|
@ -18,8 +18,8 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef KICAD_SCH_DATABASE_PLUGIN_H
|
||||
#define KICAD_SCH_DATABASE_PLUGIN_H
|
||||
#ifndef SCH_IO_DATABASE_H_
|
||||
#define SCH_IO_DATABASE_H_
|
||||
|
||||
#include <database/database_connection.h>
|
||||
#include <sch_io/sch_io.h>
|
||||
@ -38,12 +38,12 @@ struct DATABASE_LIB_TABLE;
|
||||
* plugins because the backing file is just a configuration file rather than something that
|
||||
* contains symbol or footprint data.
|
||||
*/
|
||||
class SCH_DATABASE_PLUGIN : public SCH_IO
|
||||
class SCH_IO_DATABASE : public SCH_IO
|
||||
{
|
||||
public:
|
||||
|
||||
SCH_DATABASE_PLUGIN();
|
||||
virtual ~SCH_DATABASE_PLUGIN();
|
||||
SCH_IO_DATABASE();
|
||||
virtual ~SCH_IO_DATABASE();
|
||||
|
||||
const wxString GetName() const override
|
||||
{
|
||||
@ -119,4 +119,4 @@ private:
|
||||
wxString m_lastError;
|
||||
};
|
||||
|
||||
#endif //KICAD_SCH_DATABASE_PLUGIN_H
|
||||
#endif //SCH_IO_DATABASE_H_
|
@ -22,7 +22,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <sch_io/eagle/sch_eagle_plugin.h>
|
||||
#include <sch_io/eagle/sch_io_eagle.h>
|
||||
|
||||
#include <locale_io.h>
|
||||
#include <string_utf8_map.h>
|
||||
@ -51,7 +51,7 @@
|
||||
#include <project/net_settings.h>
|
||||
#include <sch_edit_frame.h>
|
||||
#include <sch_junction.h>
|
||||
#include <sch_io/legacy/sch_legacy_plugin.h>
|
||||
#include <sch_io/kicad_legacy/sch_io_kicad_legacy.h>
|
||||
#include <sch_marker.h>
|
||||
#include <sch_screen.h>
|
||||
#include <sch_shape.h>
|
||||
@ -132,13 +132,13 @@ static inline wxString extractNetName( const wxString& aPinName )
|
||||
}
|
||||
|
||||
|
||||
SCH_SHEET* SCH_EAGLE_PLUGIN::getCurrentSheet()
|
||||
SCH_SHEET* SCH_IO_EAGLE::getCurrentSheet()
|
||||
{
|
||||
return m_sheetPath.Last();
|
||||
}
|
||||
|
||||
|
||||
SCH_SCREEN* SCH_EAGLE_PLUGIN::getCurrentScreen()
|
||||
SCH_SCREEN* SCH_IO_EAGLE::getCurrentScreen()
|
||||
{
|
||||
SCH_SHEET* currentSheet = m_sheetPath.Last();
|
||||
wxCHECK( currentSheet, nullptr );
|
||||
@ -146,7 +146,7 @@ SCH_SCREEN* SCH_EAGLE_PLUGIN::getCurrentScreen()
|
||||
}
|
||||
|
||||
|
||||
wxString SCH_EAGLE_PLUGIN::getLibName()
|
||||
wxString SCH_IO_EAGLE::getLibName()
|
||||
{
|
||||
if( m_libName.IsEmpty() )
|
||||
{
|
||||
@ -170,7 +170,7 @@ wxString SCH_EAGLE_PLUGIN::getLibName()
|
||||
}
|
||||
|
||||
|
||||
wxFileName SCH_EAGLE_PLUGIN::getLibFileName()
|
||||
wxFileName SCH_IO_EAGLE::getLibFileName()
|
||||
{
|
||||
wxFileName fn;
|
||||
|
||||
@ -182,7 +182,7 @@ wxFileName SCH_EAGLE_PLUGIN::getLibFileName()
|
||||
}
|
||||
|
||||
|
||||
void SCH_EAGLE_PLUGIN::loadLayerDefs( wxXmlNode* aLayers )
|
||||
void SCH_IO_EAGLE::loadLayerDefs( wxXmlNode* aLayers )
|
||||
{
|
||||
std::vector<ELAYER> eagleLayers;
|
||||
|
||||
@ -227,7 +227,7 @@ void SCH_EAGLE_PLUGIN::loadLayerDefs( wxXmlNode* aLayers )
|
||||
}
|
||||
|
||||
|
||||
SCH_LAYER_ID SCH_EAGLE_PLUGIN::kiCadLayer( int aEagleLayer )
|
||||
SCH_LAYER_ID SCH_IO_EAGLE::kiCadLayer( int aEagleLayer )
|
||||
{
|
||||
auto it = m_layerMap.find( aEagleLayer );
|
||||
return it == m_layerMap.end() ? LAYER_NOTES : it->second;
|
||||
@ -356,7 +356,7 @@ static void eagleToKicadAlignment( EDA_TEXT* aText, int aEagleAlignment, int aRe
|
||||
}
|
||||
|
||||
|
||||
SCH_EAGLE_PLUGIN::SCH_EAGLE_PLUGIN() :
|
||||
SCH_IO_EAGLE::SCH_IO_EAGLE() :
|
||||
m_progressReporter( nullptr ),
|
||||
m_doneCount( 0 ),
|
||||
m_lastProgressCount( 0 ),
|
||||
@ -369,24 +369,24 @@ SCH_EAGLE_PLUGIN::SCH_EAGLE_PLUGIN() :
|
||||
}
|
||||
|
||||
|
||||
SCH_EAGLE_PLUGIN::~SCH_EAGLE_PLUGIN()
|
||||
SCH_IO_EAGLE::~SCH_IO_EAGLE()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
const wxString SCH_EAGLE_PLUGIN::GetName() const
|
||||
const wxString SCH_IO_EAGLE::GetName() const
|
||||
{
|
||||
return wxT( "EAGLE" );
|
||||
}
|
||||
|
||||
|
||||
int SCH_EAGLE_PLUGIN::GetModifyHash() const
|
||||
int SCH_IO_EAGLE::GetModifyHash() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void SCH_EAGLE_PLUGIN::checkpoint()
|
||||
void SCH_IO_EAGLE::checkpoint()
|
||||
{
|
||||
const unsigned PROGRESS_DELTA = 5;
|
||||
|
||||
@ -406,7 +406,7 @@ void SCH_EAGLE_PLUGIN::checkpoint()
|
||||
}
|
||||
|
||||
|
||||
SCH_SHEET* SCH_EAGLE_PLUGIN::LoadSchematicFile( const wxString& aFileName, SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* SCH_IO_EAGLE::LoadSchematicFile( const wxString& aFileName, SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* aAppendToMe,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -463,7 +463,7 @@ SCH_SHEET* SCH_EAGLE_PLUGIN::LoadSchematicFile( const wxString& aFileName, SCHEM
|
||||
|
||||
m_pi.set( SCH_IO_MGR::FindPlugin( SCH_IO_MGR::SCH_KICAD ) );
|
||||
m_properties = std::make_unique<STRING_UTF8_MAP>();
|
||||
( *m_properties )[SCH_LEGACY_PLUGIN::PropBuffering] = "";
|
||||
( *m_properties )[SCH_IO_KICAD_LEGACY::PropBuffering] = "";
|
||||
|
||||
/// @note No check is being done here to see if the existing symbol library exists so this
|
||||
/// will overwrite the existing one.
|
||||
@ -514,7 +514,7 @@ SCH_SHEET* SCH_EAGLE_PLUGIN::LoadSchematicFile( const wxString& aFileName, SCHEM
|
||||
}
|
||||
|
||||
|
||||
void SCH_EAGLE_PLUGIN::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
void SCH_IO_EAGLE::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -533,7 +533,7 @@ void SCH_EAGLE_PLUGIN::EnumerateSymbolLib( wxArrayString& aSymbolNameLis
|
||||
}
|
||||
|
||||
|
||||
void SCH_EAGLE_PLUGIN::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
void SCH_IO_EAGLE::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -552,7 +552,7 @@ void SCH_EAGLE_PLUGIN::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList
|
||||
}
|
||||
|
||||
|
||||
LIB_SYMBOL* SCH_EAGLE_PLUGIN::LoadSymbol( const wxString& aLibraryPath, const wxString& aAliasName,
|
||||
LIB_SYMBOL* SCH_IO_EAGLE::LoadSymbol( const wxString& aLibraryPath, const wxString& aAliasName,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
m_filename = aLibraryPath;
|
||||
@ -574,7 +574,7 @@ LIB_SYMBOL* SCH_EAGLE_PLUGIN::LoadSymbol( const wxString& aLibraryPath, const wx
|
||||
}
|
||||
|
||||
|
||||
long long SCH_EAGLE_PLUGIN::getLibraryTimestamp( const wxString& aLibraryPath ) const
|
||||
long long SCH_IO_EAGLE::getLibraryTimestamp( const wxString& aLibraryPath ) const
|
||||
{
|
||||
wxFileName fn( aLibraryPath );
|
||||
|
||||
@ -585,7 +585,7 @@ long long SCH_EAGLE_PLUGIN::getLibraryTimestamp( const wxString& aLibraryPath )
|
||||
}
|
||||
|
||||
|
||||
void SCH_EAGLE_PLUGIN::ensureLoadedLibrary( const wxString& aLibraryPath )
|
||||
void SCH_IO_EAGLE::ensureLoadedLibrary( const wxString& aLibraryPath )
|
||||
{
|
||||
if( m_eagleLibs.find( m_libName ) != m_eagleLibs.end() )
|
||||
{
|
||||
@ -626,7 +626,7 @@ void SCH_EAGLE_PLUGIN::ensureLoadedLibrary( const wxString& aLibraryPath )
|
||||
}
|
||||
|
||||
|
||||
wxXmlDocument SCH_EAGLE_PLUGIN::loadXmlDocument( const wxString& aFileName )
|
||||
wxXmlDocument SCH_IO_EAGLE::loadXmlDocument( const wxString& aFileName )
|
||||
{
|
||||
wxXmlDocument xmlDocument;
|
||||
wxFFileInputStream stream( m_filename.GetFullPath() );
|
||||
@ -652,7 +652,7 @@ wxXmlDocument SCH_EAGLE_PLUGIN::loadXmlDocument( const wxString& aFileName )
|
||||
}
|
||||
|
||||
|
||||
void SCH_EAGLE_PLUGIN::loadDrawing( wxXmlNode* aDrawingNode )
|
||||
void SCH_IO_EAGLE::loadDrawing( wxXmlNode* aDrawingNode )
|
||||
{
|
||||
// Map all children into a readable dictionary
|
||||
NODE_MAP drawingChildren = MapChildren( aDrawingNode );
|
||||
@ -687,7 +687,7 @@ void SCH_EAGLE_PLUGIN::loadDrawing( wxXmlNode* aDrawingNode )
|
||||
}
|
||||
|
||||
|
||||
void SCH_EAGLE_PLUGIN::countNets( wxXmlNode* aSchematicNode )
|
||||
void SCH_IO_EAGLE::countNets( wxXmlNode* aSchematicNode )
|
||||
{
|
||||
// Map all children into a readable dictionary
|
||||
NODE_MAP schematicChildren = MapChildren( aSchematicNode );
|
||||
@ -721,7 +721,7 @@ void SCH_EAGLE_PLUGIN::countNets( wxXmlNode* aSchematicNode )
|
||||
}
|
||||
|
||||
|
||||
void SCH_EAGLE_PLUGIN::loadSchematic( wxXmlNode* aSchematicNode )
|
||||
void SCH_IO_EAGLE::loadSchematic( wxXmlNode* aSchematicNode )
|
||||
{
|
||||
// Map all children into a readable dictionary
|
||||
NODE_MAP schematicChildren = MapChildren( aSchematicNode );
|
||||
@ -939,7 +939,7 @@ void SCH_EAGLE_PLUGIN::loadSchematic( wxXmlNode* aSchematicNode )
|
||||
}
|
||||
|
||||
|
||||
void SCH_EAGLE_PLUGIN::loadSheet( wxXmlNode* aSheetNode, int aSheetIndex )
|
||||
void SCH_IO_EAGLE::loadSheet( wxXmlNode* aSheetNode, int aSheetIndex )
|
||||
{
|
||||
// Map all children into a readable dictionary
|
||||
NODE_MAP sheetChildren = MapChildren( aSheetNode );
|
||||
@ -1150,7 +1150,7 @@ void SCH_EAGLE_PLUGIN::loadSheet( wxXmlNode* aSheetNode, int aSheetIndex )
|
||||
}
|
||||
|
||||
|
||||
void SCH_EAGLE_PLUGIN::loadFrame( wxXmlNode* aFrameNode, std::vector<SCH_ITEM*>& aItems )
|
||||
void SCH_IO_EAGLE::loadFrame( wxXmlNode* aFrameNode, std::vector<SCH_ITEM*>& aItems )
|
||||
{
|
||||
EFRAME eframe( aFrameNode );
|
||||
|
||||
@ -1347,7 +1347,7 @@ void SCH_EAGLE_PLUGIN::loadFrame( wxXmlNode* aFrameNode, std::vector<SCH_ITEM*>&
|
||||
}
|
||||
|
||||
|
||||
void SCH_EAGLE_PLUGIN::loadSegments( wxXmlNode* aSegmentsNode, const wxString& netName,
|
||||
void SCH_IO_EAGLE::loadSegments( wxXmlNode* aSegmentsNode, const wxString& netName,
|
||||
const wxString& aNetClass )
|
||||
{
|
||||
// Loop through all segments
|
||||
@ -1489,7 +1489,7 @@ void SCH_EAGLE_PLUGIN::loadSegments( wxXmlNode* aSegmentsNode, const wxString& n
|
||||
}
|
||||
|
||||
|
||||
SCH_SHAPE* SCH_EAGLE_PLUGIN::loadPolyLine( wxXmlNode* aPolygonNode )
|
||||
SCH_SHAPE* SCH_IO_EAGLE::loadPolyLine( wxXmlNode* aPolygonNode )
|
||||
{
|
||||
std::unique_ptr<SCH_SHAPE> poly = std::make_unique<SCH_SHAPE>( SHAPE_T::POLY );
|
||||
EPOLYGON epoly( aPolygonNode );
|
||||
@ -1530,7 +1530,7 @@ SCH_SHAPE* SCH_EAGLE_PLUGIN::loadPolyLine( wxXmlNode* aPolygonNode )
|
||||
}
|
||||
|
||||
|
||||
SCH_ITEM* SCH_EAGLE_PLUGIN::loadWire( wxXmlNode* aWireNode, SEG& endpoints )
|
||||
SCH_ITEM* SCH_IO_EAGLE::loadWire( wxXmlNode* aWireNode, SEG& endpoints )
|
||||
{
|
||||
EWIRE ewire = EWIRE( aWireNode );
|
||||
|
||||
@ -1570,7 +1570,7 @@ SCH_ITEM* SCH_EAGLE_PLUGIN::loadWire( wxXmlNode* aWireNode, SEG& endpoints )
|
||||
}
|
||||
|
||||
|
||||
SCH_SHAPE* SCH_EAGLE_PLUGIN::loadCircle( wxXmlNode* aCircleNode )
|
||||
SCH_SHAPE* SCH_IO_EAGLE::loadCircle( wxXmlNode* aCircleNode )
|
||||
{
|
||||
std::unique_ptr<SCH_SHAPE> circle = std::make_unique<SCH_SHAPE>( SHAPE_T::CIRCLE );
|
||||
ECIRCLE c( aCircleNode );
|
||||
@ -1585,7 +1585,7 @@ SCH_SHAPE* SCH_EAGLE_PLUGIN::loadCircle( wxXmlNode* aCircleNode )
|
||||
}
|
||||
|
||||
|
||||
SCH_SHAPE* SCH_EAGLE_PLUGIN::loadRectangle( wxXmlNode* aRectNode )
|
||||
SCH_SHAPE* SCH_IO_EAGLE::loadRectangle( wxXmlNode* aRectNode )
|
||||
{
|
||||
std::unique_ptr<SCH_SHAPE> rectangle = std::make_unique<SCH_SHAPE>( SHAPE_T::RECTANGLE );
|
||||
ERECT rect( aRectNode );
|
||||
@ -1614,7 +1614,7 @@ SCH_SHAPE* SCH_EAGLE_PLUGIN::loadRectangle( wxXmlNode* aRectNode )
|
||||
}
|
||||
|
||||
|
||||
SCH_JUNCTION* SCH_EAGLE_PLUGIN::loadJunction( wxXmlNode* aJunction )
|
||||
SCH_JUNCTION* SCH_IO_EAGLE::loadJunction( wxXmlNode* aJunction )
|
||||
{
|
||||
std::unique_ptr<SCH_JUNCTION> junction = std::make_unique<SCH_JUNCTION>();
|
||||
|
||||
@ -1627,7 +1627,7 @@ SCH_JUNCTION* SCH_EAGLE_PLUGIN::loadJunction( wxXmlNode* aJunction )
|
||||
}
|
||||
|
||||
|
||||
SCH_TEXT* SCH_EAGLE_PLUGIN::loadLabel( wxXmlNode* aLabelNode, const wxString& aNetName )
|
||||
SCH_TEXT* SCH_IO_EAGLE::loadLabel( wxXmlNode* aLabelNode, const wxString& aNetName )
|
||||
{
|
||||
ELABEL elabel = ELABEL( aLabelNode, aNetName );
|
||||
VECTOR2I elabelpos( elabel.x.ToSchUnits(), -elabel.y.ToSchUnits() );
|
||||
@ -1664,7 +1664,7 @@ SCH_TEXT* SCH_EAGLE_PLUGIN::loadLabel( wxXmlNode* aLabelNode, const wxString& aN
|
||||
|
||||
|
||||
std::pair<VECTOR2I, const SEG*>
|
||||
SCH_EAGLE_PLUGIN::findNearestLinePoint( const VECTOR2I& aPoint,
|
||||
SCH_IO_EAGLE::findNearestLinePoint( const VECTOR2I& aPoint,
|
||||
const std::vector<SEG>& aLines ) const
|
||||
{
|
||||
VECTOR2I nearestPoint;
|
||||
@ -1710,7 +1710,7 @@ SCH_EAGLE_PLUGIN::findNearestLinePoint( const VECTOR2I& aPoint,
|
||||
}
|
||||
|
||||
|
||||
void SCH_EAGLE_PLUGIN::loadInstance( wxXmlNode* aInstanceNode )
|
||||
void SCH_IO_EAGLE::loadInstance( wxXmlNode* aInstanceNode )
|
||||
{
|
||||
EINSTANCE einstance = EINSTANCE( aInstanceNode );
|
||||
SCH_SCREEN* screen = getCurrentScreen();
|
||||
@ -1982,7 +1982,7 @@ void SCH_EAGLE_PLUGIN::loadInstance( wxXmlNode* aInstanceNode )
|
||||
}
|
||||
|
||||
|
||||
EAGLE_LIBRARY* SCH_EAGLE_PLUGIN::loadLibrary( wxXmlNode* aLibraryNode,
|
||||
EAGLE_LIBRARY* SCH_IO_EAGLE::loadLibrary( wxXmlNode* aLibraryNode,
|
||||
EAGLE_LIBRARY* aEagleLibrary )
|
||||
{
|
||||
NODE_MAP libraryChildren = MapChildren( aLibraryNode );
|
||||
@ -2130,7 +2130,7 @@ EAGLE_LIBRARY* SCH_EAGLE_PLUGIN::loadLibrary( wxXmlNode* aLibraryNode,
|
||||
}
|
||||
|
||||
|
||||
bool SCH_EAGLE_PLUGIN::loadSymbol( wxXmlNode* aSymbolNode, std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
||||
bool SCH_IO_EAGLE::loadSymbol( wxXmlNode* aSymbolNode, std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
||||
EDEVICE* aDevice, int aGateNumber, const wxString& aGateName )
|
||||
{
|
||||
wxString symbolName = aSymbolNode->GetAttribute( wxT( "name" ) );
|
||||
@ -2286,7 +2286,7 @@ bool SCH_EAGLE_PLUGIN::loadSymbol( wxXmlNode* aSymbolNode, std::unique_ptr<LIB_S
|
||||
}
|
||||
|
||||
|
||||
LIB_SHAPE* SCH_EAGLE_PLUGIN::loadSymbolCircle( std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
||||
LIB_SHAPE* SCH_IO_EAGLE::loadSymbolCircle( std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
||||
wxXmlNode* aCircleNode, int aGateNumber )
|
||||
{
|
||||
// Parse the circle properties
|
||||
@ -2303,7 +2303,7 @@ LIB_SHAPE* SCH_EAGLE_PLUGIN::loadSymbolCircle( std::unique_ptr<LIB_SYMBOL>& aSym
|
||||
}
|
||||
|
||||
|
||||
LIB_SHAPE* SCH_EAGLE_PLUGIN::loadSymbolRectangle( std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
||||
LIB_SHAPE* SCH_IO_EAGLE::loadSymbolRectangle( std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
||||
wxXmlNode* aRectNode, int aGateNumber )
|
||||
{
|
||||
ERECT rect( aRectNode );
|
||||
@ -2334,7 +2334,7 @@ LIB_SHAPE* SCH_EAGLE_PLUGIN::loadSymbolRectangle( std::unique_ptr<LIB_SYMBOL>& a
|
||||
}
|
||||
|
||||
|
||||
LIB_ITEM* SCH_EAGLE_PLUGIN::loadSymbolWire( std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
||||
LIB_ITEM* SCH_IO_EAGLE::loadSymbolWire( std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
||||
wxXmlNode* aWireNode, int aGateNumber )
|
||||
{
|
||||
EWIRE ewire = EWIRE( aWireNode );
|
||||
@ -2392,7 +2392,7 @@ LIB_ITEM* SCH_EAGLE_PLUGIN::loadSymbolWire( std::unique_ptr<LIB_SYMBOL>& aSymbol
|
||||
}
|
||||
|
||||
|
||||
LIB_SHAPE* SCH_EAGLE_PLUGIN::loadSymbolPolyLine( std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
||||
LIB_SHAPE* SCH_IO_EAGLE::loadSymbolPolyLine( std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
||||
wxXmlNode* aPolygonNode, int aGateNumber )
|
||||
{
|
||||
LIB_SHAPE* poly = new LIB_SHAPE( aSymbol.get(), SHAPE_T::POLY );
|
||||
@ -2434,7 +2434,7 @@ LIB_SHAPE* SCH_EAGLE_PLUGIN::loadSymbolPolyLine( std::unique_ptr<LIB_SYMBOL>& aS
|
||||
}
|
||||
|
||||
|
||||
LIB_PIN* SCH_EAGLE_PLUGIN::loadPin( std::unique_ptr<LIB_SYMBOL>& aSymbol, wxXmlNode* aPin,
|
||||
LIB_PIN* SCH_IO_EAGLE::loadPin( std::unique_ptr<LIB_SYMBOL>& aSymbol, wxXmlNode* aPin,
|
||||
EPIN* aEPin, int aGateNumber )
|
||||
{
|
||||
std::unique_ptr<LIB_PIN> pin = std::make_unique<LIB_PIN>( aSymbol.get() );
|
||||
@ -2511,7 +2511,7 @@ LIB_PIN* SCH_EAGLE_PLUGIN::loadPin( std::unique_ptr<LIB_SYMBOL>& aSymbol, wxXmlN
|
||||
}
|
||||
|
||||
|
||||
LIB_TEXT* SCH_EAGLE_PLUGIN::loadSymbolText( std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
||||
LIB_TEXT* SCH_IO_EAGLE::loadSymbolText( std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
||||
wxXmlNode* aLibText, int aGateNumber )
|
||||
{
|
||||
std::unique_ptr<LIB_TEXT> libtext = std::make_unique<LIB_TEXT>( aSymbol.get() );
|
||||
@ -2542,7 +2542,7 @@ LIB_TEXT* SCH_EAGLE_PLUGIN::loadSymbolText( std::unique_ptr<LIB_SYMBOL>& aSymbol
|
||||
}
|
||||
|
||||
|
||||
void SCH_EAGLE_PLUGIN::loadFrame( wxXmlNode* aFrameNode, std::vector<LIB_ITEM*>& aItems )
|
||||
void SCH_IO_EAGLE::loadFrame( wxXmlNode* aFrameNode, std::vector<LIB_ITEM*>& aItems )
|
||||
{
|
||||
EFRAME eframe( aFrameNode );
|
||||
|
||||
@ -2731,7 +2731,7 @@ void SCH_EAGLE_PLUGIN::loadFrame( wxXmlNode* aFrameNode, std::vector<LIB_ITEM*>&
|
||||
}
|
||||
|
||||
|
||||
SCH_TEXT* SCH_EAGLE_PLUGIN::loadPlainText( wxXmlNode* aSchText )
|
||||
SCH_TEXT* SCH_IO_EAGLE::loadPlainText( wxXmlNode* aSchText )
|
||||
{
|
||||
std::unique_ptr<SCH_TEXT> schtext = std::make_unique<SCH_TEXT>();
|
||||
ETEXT etext = ETEXT( aSchText );
|
||||
@ -2760,7 +2760,7 @@ SCH_TEXT* SCH_EAGLE_PLUGIN::loadPlainText( wxXmlNode* aSchText )
|
||||
}
|
||||
|
||||
|
||||
void SCH_EAGLE_PLUGIN::loadTextAttributes( EDA_TEXT* aText, const ETEXT& aAttribs ) const
|
||||
void SCH_IO_EAGLE::loadTextAttributes( EDA_TEXT* aText, const ETEXT& aAttribs ) const
|
||||
{
|
||||
aText->SetTextSize( aAttribs.ConvertSize() );
|
||||
|
||||
@ -2782,7 +2782,7 @@ void SCH_EAGLE_PLUGIN::loadTextAttributes( EDA_TEXT* aText, const ETEXT& aAttrib
|
||||
}
|
||||
|
||||
|
||||
void SCH_EAGLE_PLUGIN::loadFieldAttributes( LIB_FIELD* aField, const LIB_TEXT* aText ) const
|
||||
void SCH_IO_EAGLE::loadFieldAttributes( LIB_FIELD* aField, const LIB_TEXT* aText ) const
|
||||
{
|
||||
aField->SetTextPos( aText->GetPosition() );
|
||||
aField->SetTextSize( aText->GetTextSize() );
|
||||
@ -2793,7 +2793,7 @@ void SCH_EAGLE_PLUGIN::loadFieldAttributes( LIB_FIELD* aField, const LIB_TEXT* a
|
||||
}
|
||||
|
||||
|
||||
void SCH_EAGLE_PLUGIN::adjustNetLabels()
|
||||
void SCH_IO_EAGLE::adjustNetLabels()
|
||||
{
|
||||
// Eagle supports detached labels, so a label does not need to be placed on a wire
|
||||
// to be associated with it. KiCad needs to move them, so the labels actually touch the
|
||||
@ -2868,7 +2868,7 @@ void SCH_EAGLE_PLUGIN::adjustNetLabels()
|
||||
}
|
||||
|
||||
|
||||
bool SCH_EAGLE_PLUGIN::CanReadSchematicFile( const wxString& aFileName ) const
|
||||
bool SCH_IO_EAGLE::CanReadSchematicFile( const wxString& aFileName ) const
|
||||
{
|
||||
if( !SCH_IO::CanReadSchematicFile( aFileName ) )
|
||||
return false;
|
||||
@ -2877,7 +2877,7 @@ bool SCH_EAGLE_PLUGIN::CanReadSchematicFile( const wxString& aFileName ) const
|
||||
}
|
||||
|
||||
|
||||
bool SCH_EAGLE_PLUGIN::CanReadLibrary( const wxString& aFileName ) const
|
||||
bool SCH_IO_EAGLE::CanReadLibrary( const wxString& aFileName ) const
|
||||
{
|
||||
if( !SCH_IO::CanReadLibrary( aFileName ) )
|
||||
return false;
|
||||
@ -2886,7 +2886,7 @@ bool SCH_EAGLE_PLUGIN::CanReadLibrary( const wxString& aFileName ) const
|
||||
}
|
||||
|
||||
|
||||
bool SCH_EAGLE_PLUGIN::checkHeader( const wxString& aFileName ) const
|
||||
bool SCH_IO_EAGLE::checkHeader( const wxString& aFileName ) const
|
||||
{
|
||||
wxFileInputStream input( aFileName );
|
||||
|
||||
@ -2908,7 +2908,7 @@ bool SCH_EAGLE_PLUGIN::checkHeader( const wxString& aFileName ) const
|
||||
}
|
||||
|
||||
|
||||
void SCH_EAGLE_PLUGIN::moveLabels( SCH_LINE* aWire, const VECTOR2I& aNewEndPoint )
|
||||
void SCH_IO_EAGLE::moveLabels( SCH_LINE* aWire, const VECTOR2I& aNewEndPoint )
|
||||
{
|
||||
SCH_SCREEN* screen = getCurrentScreen();
|
||||
|
||||
@ -2925,7 +2925,7 @@ void SCH_EAGLE_PLUGIN::moveLabels( SCH_LINE* aWire, const VECTOR2I& aNewEndPoint
|
||||
}
|
||||
|
||||
|
||||
void SCH_EAGLE_PLUGIN::addBusEntries()
|
||||
void SCH_IO_EAGLE::addBusEntries()
|
||||
{
|
||||
// Add bus entry symbols
|
||||
// TODO: Cleanup this function and break into pieces
|
||||
@ -3475,7 +3475,7 @@ void SCH_EAGLE_PLUGIN::addBusEntries()
|
||||
}
|
||||
|
||||
|
||||
const SEG* SCH_EAGLE_PLUGIN::SEG_DESC::LabelAttached( const SCH_TEXT* aLabel ) const
|
||||
const SEG* SCH_IO_EAGLE::SEG_DESC::LabelAttached( const SCH_TEXT* aLabel ) const
|
||||
{
|
||||
VECTOR2I labelPos( aLabel->GetPosition() );
|
||||
|
||||
@ -3491,7 +3491,7 @@ const SEG* SCH_EAGLE_PLUGIN::SEG_DESC::LabelAttached( const SCH_TEXT* aLabel ) c
|
||||
|
||||
// TODO could be used to place junctions, instead of IsJunctionNeeded()
|
||||
// (see SCH_EDIT_FRAME::importFile())
|
||||
bool SCH_EAGLE_PLUGIN::checkConnections( const SCH_SYMBOL* aSymbol, const LIB_PIN* aPin ) const
|
||||
bool SCH_IO_EAGLE::checkConnections( const SCH_SYMBOL* aSymbol, const LIB_PIN* aPin ) const
|
||||
{
|
||||
wxCHECK( aSymbol && aPin, false );
|
||||
|
||||
@ -3509,7 +3509,7 @@ bool SCH_EAGLE_PLUGIN::checkConnections( const SCH_SYMBOL* aSymbol, const LIB_PI
|
||||
}
|
||||
|
||||
|
||||
void SCH_EAGLE_PLUGIN::addImplicitConnections( SCH_SYMBOL* aSymbol, SCH_SCREEN* aScreen,
|
||||
void SCH_IO_EAGLE::addImplicitConnections( SCH_SYMBOL* aSymbol, SCH_SCREEN* aScreen,
|
||||
bool aUpdateSet )
|
||||
{
|
||||
wxCHECK( aSymbol->GetLibSymbolRef(), /*void*/ );
|
||||
@ -3599,7 +3599,7 @@ void SCH_EAGLE_PLUGIN::addImplicitConnections( SCH_SYMBOL* aSymbol, SCH_SCREEN*
|
||||
}
|
||||
|
||||
|
||||
wxString SCH_EAGLE_PLUGIN::translateEagleBusName( const wxString& aEagleName ) const
|
||||
wxString SCH_IO_EAGLE::translateEagleBusName( const wxString& aEagleName ) const
|
||||
{
|
||||
if( NET_SETTINGS::ParseBusVector( aEagleName, nullptr, nullptr ) )
|
||||
return aEagleName;
|
@ -22,8 +22,8 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _SCH_EAGLE_PLUGIN_H_
|
||||
#define _SCH_EAGLE_PLUGIN_H_
|
||||
#ifndef SCH_IO_EAGLE_H_
|
||||
#define SCH_IO_EAGLE_H_
|
||||
|
||||
#include <sch_line.h>
|
||||
#include <sch_io/sch_io.h>
|
||||
@ -50,7 +50,6 @@ class SCH_GLOBALLABEL;
|
||||
class SCH_SYMBOL;
|
||||
class SCH_FIELD;
|
||||
class STRING_UTF8_MAP;
|
||||
class SCH_EAGLE_PLUGIN_CACHE;
|
||||
class LIB_SYMBOL;
|
||||
class SYMBOL_LIB;
|
||||
class LIB_SHAPE;
|
||||
@ -79,13 +78,13 @@ typedef boost::ptr_map<wxString, EPART> EPART_LIST;
|
||||
*
|
||||
* As with all SCH_IO there is no UI dependencies i.e. windowing calls allowed.
|
||||
*/
|
||||
class SCH_EAGLE_PLUGIN : public SCH_IO
|
||||
class SCH_IO_EAGLE : public SCH_IO
|
||||
{
|
||||
public:
|
||||
const double ARC_ACCURACY = SCH_IU_PER_MM * 0.01; // 0.01mm
|
||||
|
||||
SCH_EAGLE_PLUGIN();
|
||||
~SCH_EAGLE_PLUGIN();
|
||||
SCH_IO_EAGLE();
|
||||
~SCH_IO_EAGLE();
|
||||
|
||||
const wxString GetName() const override;
|
||||
|
||||
@ -296,4 +295,4 @@ private:
|
||||
std::map<VECTOR2I, std::set<const EDA_ITEM*>> m_connPoints;
|
||||
};
|
||||
|
||||
#endif // _SCH_EAGLE_PLUGIN_H_
|
||||
#endif // SCH_IO_EAGLE_H_
|
@ -22,8 +22,8 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "sch_easyeda_plugin.h"
|
||||
#include "sch_easyeda_parser.h"
|
||||
#include "sch_io_easyeda.h"
|
||||
|
||||
#include <schematic.h>
|
||||
#include <sch_sheet.h>
|
||||
@ -41,7 +41,7 @@
|
||||
|
||||
|
||||
|
||||
const wxString SCH_EASYEDA_PLUGIN::GetName() const
|
||||
const wxString SCH_IO_EASYEDA::GetName() const
|
||||
{
|
||||
return wxT( "EasyEDA (JLCEDA) Schematic Importer" );
|
||||
}
|
||||
@ -97,7 +97,7 @@ static bool FindSchFileInStream( const wxString& aName, wxInputStream& aStream,
|
||||
}
|
||||
|
||||
|
||||
bool SCH_EASYEDA_PLUGIN::CanReadSchematicFile( const wxString& aFileName ) const
|
||||
bool SCH_IO_EASYEDA::CanReadSchematicFile( const wxString& aFileName ) const
|
||||
{
|
||||
if( !SCH_IO::CanReadSchematicFile( aFileName ) )
|
||||
return false;
|
||||
@ -122,13 +122,13 @@ bool SCH_EASYEDA_PLUGIN::CanReadSchematicFile( const wxString& aFileName ) const
|
||||
}
|
||||
|
||||
|
||||
bool SCH_EASYEDA_PLUGIN::CanReadLibrary( const wxString& aFileName ) const
|
||||
bool SCH_IO_EASYEDA::CanReadLibrary( const wxString& aFileName ) const
|
||||
{
|
||||
return CanReadSchematicFile( aFileName );
|
||||
}
|
||||
|
||||
|
||||
int SCH_EASYEDA_PLUGIN::GetModifyHash() const
|
||||
int SCH_IO_EASYEDA::GetModifyHash() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -284,7 +284,7 @@ LIB_SYMBOL* loadSymbol( const wxString& aLibraryPath, nlohmann::json aFileData,
|
||||
}
|
||||
|
||||
|
||||
void SCH_EASYEDA_PLUGIN::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
void SCH_IO_EASYEDA::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -407,7 +407,7 @@ void SCH_EASYEDA_PLUGIN::EnumerateSymbolLib( wxArrayString& aSymbolNameL
|
||||
}
|
||||
|
||||
|
||||
void SCH_EASYEDA_PLUGIN::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
void SCH_IO_EASYEDA::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -449,7 +449,7 @@ void SCH_EASYEDA_PLUGIN::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolLi
|
||||
}
|
||||
|
||||
|
||||
LIB_SYMBOL* SCH_EASYEDA_PLUGIN::LoadSymbol( const wxString& aLibraryPath,
|
||||
LIB_SYMBOL* SCH_IO_EASYEDA::LoadSymbol( const wxString& aLibraryPath,
|
||||
const wxString& aAliasName,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -544,7 +544,7 @@ static void LoadSchematic( SCHEMATIC* aSchematic, SCH_SHEET* aRootSheet, const w
|
||||
}
|
||||
|
||||
|
||||
SCH_SHEET* SCH_EASYEDA_PLUGIN::LoadSchematicFile( const wxString& aFileName, SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* SCH_IO_EASYEDA::LoadSchematicFile( const wxString& aFileName, SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* aAppendToMe,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
@ -22,8 +22,8 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef SCH_EASYEDA_PLUGIN_H_
|
||||
#define SCH_EASYEDA_PLUGIN_H_
|
||||
#ifndef SCH_IO_EASYEDA_H_
|
||||
#define SCH_IO_EASYEDA_H_
|
||||
|
||||
#include <sch_io/sch_io.h>
|
||||
#include <sch_io/sch_io_mgr.h>
|
||||
@ -35,16 +35,16 @@ class SCH_SHEET;
|
||||
class SCH_SCREEN;
|
||||
|
||||
|
||||
class SCH_EASYEDA_PLUGIN : public SCH_IO
|
||||
class SCH_IO_EASYEDA : public SCH_IO
|
||||
{
|
||||
public:
|
||||
SCH_EASYEDA_PLUGIN()
|
||||
SCH_IO_EASYEDA()
|
||||
{
|
||||
m_reporter = &WXLOG_REPORTER::GetInstance();
|
||||
m_progressReporter = nullptr;
|
||||
}
|
||||
|
||||
~SCH_EASYEDA_PLUGIN() {}
|
||||
~SCH_IO_EASYEDA() {}
|
||||
|
||||
const wxString GetName() const override;
|
||||
|
||||
@ -89,4 +89,4 @@ private:
|
||||
};
|
||||
|
||||
|
||||
#endif // SCH_EASYEDA_PLUGIN_H_
|
||||
#endif // SCH_IO_EASYEDA_H_
|
@ -22,8 +22,8 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "sch_easyedapro_plugin.h"
|
||||
#include "sch_easyedapro_parser.h"
|
||||
#include "sch_io_easyedapro.h"
|
||||
|
||||
#include <schematic.h>
|
||||
#include <sch_sheet.h>
|
||||
@ -41,40 +41,40 @@
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <string_utils.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
#include <sch_io/kicad/sch_sexpr_plugin.h>
|
||||
#include <sch_io/kicad_sexpr/sch_io_kicad_sexpr.h>
|
||||
#include <io/easyedapro/easyedapro_import_utils.h>
|
||||
#include <core/map_helpers.h>
|
||||
#include <project_sch.h>
|
||||
|
||||
|
||||
struct SCH_EASYEDAPRO_PLUGIN::PRJ_DATA
|
||||
struct SCH_IO_EASYEDAPRO::PRJ_DATA
|
||||
{
|
||||
std::map<wxString, EASYEDAPRO::SYM_INFO> m_Symbols;
|
||||
std::map<wxString, EASYEDAPRO::BLOB> m_Blobs;
|
||||
};
|
||||
|
||||
|
||||
SCH_EASYEDAPRO_PLUGIN::SCH_EASYEDAPRO_PLUGIN()
|
||||
SCH_IO_EASYEDAPRO::SCH_IO_EASYEDAPRO()
|
||||
{
|
||||
m_reporter = &WXLOG_REPORTER::GetInstance();
|
||||
m_progressReporter = nullptr;
|
||||
}
|
||||
|
||||
|
||||
SCH_EASYEDAPRO_PLUGIN::~SCH_EASYEDAPRO_PLUGIN()
|
||||
SCH_IO_EASYEDAPRO::~SCH_IO_EASYEDAPRO()
|
||||
{
|
||||
if( m_projectData )
|
||||
delete m_projectData;
|
||||
}
|
||||
|
||||
|
||||
const wxString SCH_EASYEDAPRO_PLUGIN::GetName() const
|
||||
const wxString SCH_IO_EASYEDAPRO::GetName() const
|
||||
{
|
||||
return wxT( "EasyEDA (JLCEDA) Schematic Importer" );
|
||||
}
|
||||
|
||||
|
||||
bool SCH_EASYEDAPRO_PLUGIN::CanReadSchematicFile( const wxString& aFileName ) const
|
||||
bool SCH_IO_EASYEDAPRO::CanReadSchematicFile( const wxString& aFileName ) const
|
||||
{
|
||||
if( aFileName.Lower().EndsWith( wxS( ".epro" ) ) )
|
||||
{
|
||||
@ -104,7 +104,7 @@ bool SCH_EASYEDAPRO_PLUGIN::CanReadSchematicFile( const wxString& aFileName ) co
|
||||
}
|
||||
|
||||
|
||||
int SCH_EASYEDAPRO_PLUGIN::GetModifyHash() const
|
||||
int SCH_IO_EASYEDAPRO::GetModifyHash() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -219,7 +219,7 @@ static LIB_SYMBOL* loadSymbol( nlohmann::json project, const wxString& aLibraryP
|
||||
}
|
||||
|
||||
|
||||
void SCH_EASYEDAPRO_PLUGIN::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
void SCH_IO_EASYEDAPRO::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -255,7 +255,7 @@ void SCH_EASYEDAPRO_PLUGIN::EnumerateSymbolLib( wxArrayString& aSymbolNa
|
||||
}
|
||||
|
||||
|
||||
void SCH_EASYEDAPRO_PLUGIN::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
void SCH_IO_EASYEDAPRO::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -278,7 +278,7 @@ void SCH_EASYEDAPRO_PLUGIN::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbo
|
||||
}
|
||||
|
||||
|
||||
void SCH_EASYEDAPRO_PLUGIN::LoadAllDataFromProject( const wxString& aProjectPath )
|
||||
void SCH_IO_EASYEDAPRO::LoadAllDataFromProject( const wxString& aProjectPath )
|
||||
{
|
||||
if( m_projectData )
|
||||
delete m_projectData;
|
||||
@ -357,7 +357,7 @@ void SCH_EASYEDAPRO_PLUGIN::LoadAllDataFromProject( const wxString& aProjectPath
|
||||
}
|
||||
|
||||
|
||||
LIB_SYMBOL* SCH_EASYEDAPRO_PLUGIN::LoadSymbol( const wxString& aLibraryPath,
|
||||
LIB_SYMBOL* SCH_IO_EASYEDAPRO::LoadSymbol( const wxString& aLibraryPath,
|
||||
const wxString& aAliasName,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -371,7 +371,7 @@ LIB_SYMBOL* SCH_EASYEDAPRO_PLUGIN::LoadSymbol( const wxString& aLibraryPa
|
||||
}
|
||||
|
||||
|
||||
SCH_SHEET* SCH_EASYEDAPRO_PLUGIN::LoadSchematicFile( const wxString& aFileName,
|
||||
SCH_SHEET* SCH_IO_EASYEDAPRO::LoadSchematicFile( const wxString& aFileName,
|
||||
SCHEMATIC* aSchematic, SCH_SHEET* aAppendToMe,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -560,7 +560,7 @@ SCH_SHEET* SCH_EASYEDAPRO_PLUGIN::LoadSchematicFile( const wxString& aFileName,
|
||||
|
||||
// set properties to prevent save file on every symbol save
|
||||
STRING_UTF8_MAP properties;
|
||||
properties.emplace( SCH_SEXPR_PLUGIN::PropBuffering, wxEmptyString );
|
||||
properties.emplace( SCH_IO_KICAD_SEXPR::PropBuffering, wxEmptyString );
|
||||
|
||||
for( auto& [symbolUuid, symInfo] : m_projectData->m_Symbols )
|
||||
sch_plugin->SaveSymbol( libFileName.GetFullPath(), symInfo.libSymbol.release(),
|
@ -22,8 +22,8 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef SCH_EASYEDAPRO_PLUGIN_H_
|
||||
#define SCH_EASYEDAPRO_PLUGIN_H_
|
||||
#ifndef SCH_IO_EASYEDAPRO_H_
|
||||
#define SCH_IO_EASYEDAPRO_H_
|
||||
|
||||
#include <sch_io/sch_io.h>
|
||||
#include <sch_io/sch_io_mgr.h>
|
||||
@ -35,11 +35,11 @@ class SCH_SHEET;
|
||||
class SCH_SCREEN;
|
||||
|
||||
|
||||
class SCH_EASYEDAPRO_PLUGIN : public SCH_IO, public PROJECT_CHOOSER_PLUGIN
|
||||
class SCH_IO_EASYEDAPRO : public SCH_IO, public PROJECT_CHOOSER_PLUGIN
|
||||
{
|
||||
public:
|
||||
SCH_EASYEDAPRO_PLUGIN();
|
||||
~SCH_EASYEDAPRO_PLUGIN();
|
||||
SCH_IO_EASYEDAPRO();
|
||||
~SCH_IO_EASYEDAPRO();
|
||||
|
||||
const wxString GetName() const override;
|
||||
|
||||
@ -87,4 +87,4 @@ private:
|
||||
};
|
||||
|
||||
|
||||
#endif // SCH_EASYEDAPRO_PLUGIN_H_
|
||||
#endif // SCH_IO_EASYEDAPRO_H_
|
@ -25,21 +25,21 @@
|
||||
#include <symbol_lib_table.h>
|
||||
|
||||
#include <http_lib/http_lib_connection.h>
|
||||
#include "sch_http_lib_plugin.h"
|
||||
#include "sch_io_http_lib.h"
|
||||
|
||||
|
||||
SCH_HTTP_LIB_PLUGIN::SCH_HTTP_LIB_PLUGIN() :
|
||||
SCH_IO_HTTP_LIB::SCH_IO_HTTP_LIB() :
|
||||
m_libTable( nullptr )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
SCH_HTTP_LIB_PLUGIN::~SCH_HTTP_LIB_PLUGIN()
|
||||
SCH_IO_HTTP_LIB::~SCH_IO_HTTP_LIB()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void SCH_HTTP_LIB_PLUGIN::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
void SCH_IO_HTTP_LIB::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -51,7 +51,7 @@ void SCH_HTTP_LIB_PLUGIN::EnumerateSymbolLib( wxArrayString& aSymbolName
|
||||
}
|
||||
|
||||
|
||||
void SCH_HTTP_LIB_PLUGIN::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
void SCH_IO_HTTP_LIB::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -105,7 +105,7 @@ void SCH_HTTP_LIB_PLUGIN::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolL
|
||||
}
|
||||
|
||||
|
||||
LIB_SYMBOL* SCH_HTTP_LIB_PLUGIN::LoadSymbol( const wxString& aLibraryPath,
|
||||
LIB_SYMBOL* SCH_IO_HTTP_LIB::LoadSymbol( const wxString& aLibraryPath,
|
||||
const wxString& aAliasName,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -175,7 +175,7 @@ LIB_SYMBOL* SCH_HTTP_LIB_PLUGIN::LoadSymbol( const wxString& aLibraryPath
|
||||
}
|
||||
|
||||
|
||||
void SCH_HTTP_LIB_PLUGIN::GetSubLibraryNames( std::vector<wxString>& aNames )
|
||||
void SCH_IO_HTTP_LIB::GetSubLibraryNames( std::vector<wxString>& aNames )
|
||||
{
|
||||
ensureSettings( wxEmptyString );
|
||||
|
||||
@ -194,21 +194,21 @@ void SCH_HTTP_LIB_PLUGIN::GetSubLibraryNames( std::vector<wxString>& aNames )
|
||||
}
|
||||
|
||||
|
||||
void SCH_HTTP_LIB_PLUGIN::GetAvailableSymbolFields( std::vector<wxString>& aNames )
|
||||
void SCH_IO_HTTP_LIB::GetAvailableSymbolFields( std::vector<wxString>& aNames )
|
||||
{
|
||||
// TODO: Implement this sometime; This is currently broken...
|
||||
std::copy( m_customFields.begin(), m_customFields.end(), std::back_inserter( aNames ) );
|
||||
}
|
||||
|
||||
|
||||
void SCH_HTTP_LIB_PLUGIN::GetDefaultSymbolFields( std::vector<wxString>& aNames )
|
||||
void SCH_IO_HTTP_LIB::GetDefaultSymbolFields( std::vector<wxString>& aNames )
|
||||
{
|
||||
std::copy( m_defaultShownFields.begin(), m_defaultShownFields.end(),
|
||||
std::back_inserter( aNames ) );
|
||||
}
|
||||
|
||||
|
||||
void SCH_HTTP_LIB_PLUGIN::ensureSettings( const wxString& aSettingsPath )
|
||||
void SCH_IO_HTTP_LIB::ensureSettings( const wxString& aSettingsPath )
|
||||
{
|
||||
|
||||
auto tryLoad = [&]()
|
||||
@ -294,7 +294,7 @@ void SCH_HTTP_LIB_PLUGIN::ensureSettings( const wxString& aSettingsPath )
|
||||
}
|
||||
|
||||
|
||||
void SCH_HTTP_LIB_PLUGIN::ensureConnection()
|
||||
void SCH_IO_HTTP_LIB::ensureConnection()
|
||||
{
|
||||
wxCHECK_RET( m_settings, "Call ensureSettings before ensureConnection!" );
|
||||
|
||||
@ -311,7 +311,7 @@ void SCH_HTTP_LIB_PLUGIN::ensureConnection()
|
||||
}
|
||||
|
||||
|
||||
void SCH_HTTP_LIB_PLUGIN::connect()
|
||||
void SCH_IO_HTTP_LIB::connect()
|
||||
{
|
||||
wxCHECK_RET( m_settings, "Call ensureSettings before connect()!" );
|
||||
|
||||
@ -328,7 +328,7 @@ void SCH_HTTP_LIB_PLUGIN::connect()
|
||||
}
|
||||
|
||||
|
||||
LIB_SYMBOL* SCH_HTTP_LIB_PLUGIN::loadSymbolFromPart( const wxString& aSymbolName,
|
||||
LIB_SYMBOL* SCH_IO_HTTP_LIB::loadSymbolFromPart( const wxString& aSymbolName,
|
||||
const HTTP_LIB_CATEGORY& aCategory,
|
||||
const HTTP_LIB_PART& aPart )
|
||||
{
|
||||
@ -444,7 +444,7 @@ LIB_SYMBOL* SCH_HTTP_LIB_PLUGIN::loadSymbolFromPart( const wxString& aS
|
||||
return symbol;
|
||||
}
|
||||
|
||||
void SCH_HTTP_LIB_PLUGIN::SaveSymbol( const wxString& aLibraryPath, const LIB_SYMBOL* aSymbol,
|
||||
void SCH_IO_HTTP_LIB::SaveSymbol( const wxString& aLibraryPath, const LIB_SYMBOL* aSymbol,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// TODO: Implement this sometime;
|
@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef KICAD_SCH_HTTP_LIB_PLUGIN_H
|
||||
#define KICAD_SCH_HTTP_LIB_PLUGIN_H
|
||||
#ifndef SCH_IO_HTTP_LIB_H
|
||||
#define SCH_IO_HTTP_LIB_H
|
||||
|
||||
#include "http_lib/http_lib_settings.h"
|
||||
#include <http_lib/http_lib_connection.h>
|
||||
@ -35,12 +35,12 @@
|
||||
* plugins because the backing file is just a configuration file rather than something that
|
||||
* contains symbol or footprint data.
|
||||
*/
|
||||
class SCH_HTTP_LIB_PLUGIN : public SCH_IO
|
||||
class SCH_IO_HTTP_LIB : public SCH_IO
|
||||
{
|
||||
public:
|
||||
|
||||
SCH_HTTP_LIB_PLUGIN();
|
||||
virtual ~SCH_HTTP_LIB_PLUGIN();
|
||||
SCH_IO_HTTP_LIB();
|
||||
virtual ~SCH_IO_HTTP_LIB();
|
||||
|
||||
const wxString GetName() const override
|
||||
{
|
||||
@ -128,4 +128,4 @@ private:
|
||||
|
||||
};
|
||||
|
||||
#endif //KICAD_SCH_HTTP_LIB_PLUGIN_H
|
||||
#endif // SCH_IO_HTTP_LIB_H_
|
@ -54,9 +54,9 @@
|
||||
#include <sch_sheet_pin.h>
|
||||
#include <bus_alias.h>
|
||||
#include <io/io_utils.h>
|
||||
#include <sch_io/legacy/sch_legacy_lib_plugin_cache.h>
|
||||
#include <sch_io/legacy/sch_legacy_plugin.h>
|
||||
#include <sch_io/legacy/sch_legacy_plugin_helpers.h>
|
||||
#include <sch_io/kicad_legacy/sch_io_kicad_legacy_lib_cache.h>
|
||||
#include <sch_io/kicad_legacy/sch_io_kicad_legacy.h>
|
||||
#include <sch_io/kicad_legacy/sch_io_kicad_legacy_helpers.h>
|
||||
#include <sch_screen.h>
|
||||
#include <schematic.h>
|
||||
#include <symbol_library.h>
|
||||
@ -72,7 +72,7 @@
|
||||
#define T_WIDTH "width"
|
||||
|
||||
|
||||
SCH_LEGACY_PLUGIN::SCH_LEGACY_PLUGIN() :
|
||||
SCH_IO_KICAD_LEGACY::SCH_IO_KICAD_LEGACY() :
|
||||
m_appending( false ),
|
||||
m_progressReporter( nullptr ),
|
||||
m_lineReader( nullptr ),
|
||||
@ -83,13 +83,13 @@ SCH_LEGACY_PLUGIN::SCH_LEGACY_PLUGIN() :
|
||||
}
|
||||
|
||||
|
||||
SCH_LEGACY_PLUGIN::~SCH_LEGACY_PLUGIN()
|
||||
SCH_IO_KICAD_LEGACY::~SCH_IO_KICAD_LEGACY()
|
||||
{
|
||||
delete m_cache;
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::init( SCHEMATIC* aSchematic, const STRING_UTF8_MAP* aProperties )
|
||||
void SCH_IO_KICAD_LEGACY::init( SCHEMATIC* aSchematic, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
m_version = 0;
|
||||
m_rootSheet = nullptr;
|
||||
@ -100,7 +100,7 @@ void SCH_LEGACY_PLUGIN::init( SCHEMATIC* aSchematic, const STRING_UTF8_MAP* aPro
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::checkpoint()
|
||||
void SCH_IO_KICAD_LEGACY::checkpoint()
|
||||
{
|
||||
const unsigned PROGRESS_DELTA = 250;
|
||||
|
||||
@ -122,7 +122,7 @@ void SCH_LEGACY_PLUGIN::checkpoint()
|
||||
}
|
||||
|
||||
|
||||
SCH_SHEET* SCH_LEGACY_PLUGIN::LoadSchematicFile( const wxString& aFileName, SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* SCH_IO_KICAD_LEGACY::LoadSchematicFile( const wxString& aFileName, SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* aAppendToMe,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -193,7 +193,7 @@ SCH_SHEET* SCH_LEGACY_PLUGIN::LoadSchematicFile( const wxString& aFileName, SCHE
|
||||
|
||||
// Everything below this comment is recursive. Modify with care.
|
||||
|
||||
void SCH_LEGACY_PLUGIN::loadHierarchy( SCH_SHEET* aSheet )
|
||||
void SCH_IO_KICAD_LEGACY::loadHierarchy( SCH_SHEET* aSheet )
|
||||
{
|
||||
SCH_SCREEN* screen = nullptr;
|
||||
|
||||
@ -277,7 +277,7 @@ void SCH_LEGACY_PLUGIN::loadHierarchy( SCH_SHEET* aSheet )
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::loadFile( const wxString& aFileName, SCH_SCREEN* aScreen )
|
||||
void SCH_IO_KICAD_LEGACY::loadFile( const wxString& aFileName, SCH_SCREEN* aScreen )
|
||||
{
|
||||
FILE_LINE_READER reader( aFileName );
|
||||
|
||||
@ -316,13 +316,13 @@ void SCH_LEGACY_PLUGIN::loadFile( const wxString& aFileName, SCH_SCREEN* aScreen
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::LoadContent( LINE_READER& aReader, SCH_SCREEN* aScreen, int version )
|
||||
void SCH_IO_KICAD_LEGACY::LoadContent( LINE_READER& aReader, SCH_SCREEN* aScreen, int version )
|
||||
{
|
||||
m_version = version;
|
||||
|
||||
// We cannot safely load content without a set root level.
|
||||
wxCHECK_RET( m_rootSheet,
|
||||
"Cannot call SCH_LEGACY_PLUGIN::LoadContent() without setting root sheet." );
|
||||
"Cannot call SCH_IO_KICAD_LEGACY::LoadContent() without setting root sheet." );
|
||||
|
||||
while( aReader.ReadLine() )
|
||||
{
|
||||
@ -365,7 +365,7 @@ void SCH_LEGACY_PLUGIN::LoadContent( LINE_READER& aReader, SCH_SCREEN* aScreen,
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::loadHeader( LINE_READER& aReader, SCH_SCREEN* aScreen )
|
||||
void SCH_IO_KICAD_LEGACY::loadHeader( LINE_READER& aReader, SCH_SCREEN* aScreen )
|
||||
{
|
||||
const char* line = aReader.ReadLine();
|
||||
|
||||
@ -405,7 +405,7 @@ void SCH_LEGACY_PLUGIN::loadHeader( LINE_READER& aReader, SCH_SCREEN* aScreen )
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::loadPageSettings( LINE_READER& aReader, SCH_SCREEN* aScreen )
|
||||
void SCH_IO_KICAD_LEGACY::loadPageSettings( LINE_READER& aReader, SCH_SCREEN* aScreen )
|
||||
{
|
||||
wxASSERT( aScreen != nullptr );
|
||||
|
||||
@ -534,7 +534,7 @@ void SCH_LEGACY_PLUGIN::loadPageSettings( LINE_READER& aReader, SCH_SCREEN* aScr
|
||||
}
|
||||
|
||||
|
||||
SCH_SHEET* SCH_LEGACY_PLUGIN::loadSheet( LINE_READER& aReader )
|
||||
SCH_SHEET* SCH_IO_KICAD_LEGACY::loadSheet( LINE_READER& aReader )
|
||||
{
|
||||
std::unique_ptr<SCH_SHEET> sheet = std::make_unique<SCH_SHEET>();
|
||||
|
||||
@ -644,7 +644,7 @@ SCH_SHEET* SCH_LEGACY_PLUGIN::loadSheet( LINE_READER& aReader )
|
||||
}
|
||||
|
||||
|
||||
SCH_BITMAP* SCH_LEGACY_PLUGIN::loadBitmap( LINE_READER& aReader )
|
||||
SCH_BITMAP* SCH_IO_KICAD_LEGACY::loadBitmap( LINE_READER& aReader )
|
||||
{
|
||||
std::unique_ptr<SCH_BITMAP> bitmap = std::make_unique<SCH_BITMAP>();
|
||||
|
||||
@ -735,7 +735,7 @@ SCH_BITMAP* SCH_LEGACY_PLUGIN::loadBitmap( LINE_READER& aReader )
|
||||
}
|
||||
|
||||
|
||||
SCH_JUNCTION* SCH_LEGACY_PLUGIN::loadJunction( LINE_READER& aReader )
|
||||
SCH_JUNCTION* SCH_IO_KICAD_LEGACY::loadJunction( LINE_READER& aReader )
|
||||
{
|
||||
std::unique_ptr<SCH_JUNCTION> junction = std::make_unique<SCH_JUNCTION>();
|
||||
|
||||
@ -757,7 +757,7 @@ SCH_JUNCTION* SCH_LEGACY_PLUGIN::loadJunction( LINE_READER& aReader )
|
||||
}
|
||||
|
||||
|
||||
SCH_NO_CONNECT* SCH_LEGACY_PLUGIN::loadNoConnect( LINE_READER& aReader )
|
||||
SCH_NO_CONNECT* SCH_IO_KICAD_LEGACY::loadNoConnect( LINE_READER& aReader )
|
||||
{
|
||||
std::unique_ptr<SCH_NO_CONNECT> no_connect = std::make_unique<SCH_NO_CONNECT>();
|
||||
|
||||
@ -779,7 +779,7 @@ SCH_NO_CONNECT* SCH_LEGACY_PLUGIN::loadNoConnect( LINE_READER& aReader )
|
||||
}
|
||||
|
||||
|
||||
SCH_LINE* SCH_LEGACY_PLUGIN::loadWire( LINE_READER& aReader )
|
||||
SCH_LINE* SCH_IO_KICAD_LEGACY::loadWire( LINE_READER& aReader )
|
||||
{
|
||||
std::unique_ptr<SCH_LINE> wire = std::make_unique<SCH_LINE>();
|
||||
|
||||
@ -885,7 +885,7 @@ SCH_LINE* SCH_LEGACY_PLUGIN::loadWire( LINE_READER& aReader )
|
||||
}
|
||||
|
||||
|
||||
SCH_BUS_ENTRY_BASE* SCH_LEGACY_PLUGIN::loadBusEntry( LINE_READER& aReader )
|
||||
SCH_BUS_ENTRY_BASE* SCH_IO_KICAD_LEGACY::loadBusEntry( LINE_READER& aReader )
|
||||
{
|
||||
const char* line = aReader.Line();
|
||||
|
||||
@ -944,7 +944,7 @@ const std::map<LABEL_FLAG_SHAPE, const char*> sheetLabelNames
|
||||
// clang-format on
|
||||
|
||||
|
||||
SCH_TEXT* SCH_LEGACY_PLUGIN::loadText( LINE_READER& aReader )
|
||||
SCH_TEXT* SCH_IO_KICAD_LEGACY::loadText( LINE_READER& aReader )
|
||||
{
|
||||
const char* line = aReader.Line();
|
||||
KICAD_T textType = TYPE_NOT_INIT;
|
||||
@ -1081,7 +1081,7 @@ SCH_TEXT* SCH_LEGACY_PLUGIN::loadText( LINE_READER& aReader )
|
||||
}
|
||||
|
||||
|
||||
SCH_SYMBOL* SCH_LEGACY_PLUGIN::loadSymbol( LINE_READER& aReader )
|
||||
SCH_SYMBOL* SCH_IO_KICAD_LEGACY::loadSymbol( LINE_READER& aReader )
|
||||
{
|
||||
const char* line = aReader.Line();
|
||||
|
||||
@ -1428,7 +1428,7 @@ SCH_SYMBOL* SCH_LEGACY_PLUGIN::loadSymbol( LINE_READER& aReader )
|
||||
}
|
||||
|
||||
|
||||
std::shared_ptr<BUS_ALIAS> SCH_LEGACY_PLUGIN::loadBusAlias( LINE_READER& aReader,
|
||||
std::shared_ptr<BUS_ALIAS> SCH_IO_KICAD_LEGACY::loadBusAlias( LINE_READER& aReader,
|
||||
SCH_SCREEN* aScreen )
|
||||
{
|
||||
auto busAlias = std::make_shared<BUS_ALIAS>( aScreen );
|
||||
@ -1453,7 +1453,7 @@ std::shared_ptr<BUS_ALIAS> SCH_LEGACY_PLUGIN::loadBusAlias( LINE_READER& aReader
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::SaveSchematicFile( const wxString& aFileName, SCH_SHEET* aSheet,
|
||||
void SCH_IO_KICAD_LEGACY::SaveSchematicFile( const wxString& aFileName, SCH_SHEET* aSheet,
|
||||
SCHEMATIC* aSchematic,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -1480,7 +1480,7 @@ void SCH_LEGACY_PLUGIN::SaveSchematicFile( const wxString& aFileName, SCH_SHEET*
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::Format( SCH_SHEET* aSheet )
|
||||
void SCH_IO_KICAD_LEGACY::Format( SCH_SHEET* aSheet )
|
||||
{
|
||||
wxCHECK_RET( aSheet != nullptr, "NULL SCH_SHEET* object." );
|
||||
wxCHECK_RET( m_schematic != nullptr, "NULL SCHEMATIC* object." );
|
||||
@ -1569,7 +1569,7 @@ void SCH_LEGACY_PLUGIN::Format( SCH_SHEET* aSheet )
|
||||
saveText( static_cast<SCH_TEXT*>( item ) );
|
||||
break;
|
||||
default:
|
||||
wxASSERT( "Unexpected schematic object type in SCH_LEGACY_PLUGIN::Format()" );
|
||||
wxASSERT( "Unexpected schematic object type in SCH_IO_KICAD_LEGACY::Format()" );
|
||||
}
|
||||
}
|
||||
|
||||
@ -1577,7 +1577,7 @@ void SCH_LEGACY_PLUGIN::Format( SCH_SHEET* aSheet )
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::Format( SELECTION* aSelection, OUTPUTFORMATTER* aFormatter )
|
||||
void SCH_IO_KICAD_LEGACY::Format( SELECTION* aSelection, OUTPUTFORMATTER* aFormatter )
|
||||
{
|
||||
m_out = aFormatter;
|
||||
|
||||
@ -1616,13 +1616,13 @@ void SCH_LEGACY_PLUGIN::Format( SELECTION* aSelection, OUTPUTFORMATTER* aFormatt
|
||||
saveText( static_cast< SCH_TEXT* >( item ) );
|
||||
break;
|
||||
default:
|
||||
wxASSERT( "Unexpected schematic object type in SCH_LEGACY_PLUGIN::Format()" );
|
||||
wxASSERT( "Unexpected schematic object type in SCH_IO_KICAD_LEGACY::Format()" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::saveSymbol( SCH_SYMBOL* aSymbol )
|
||||
void SCH_IO_KICAD_LEGACY::saveSymbol( SCH_SYMBOL* aSymbol )
|
||||
{
|
||||
std::string name1;
|
||||
std::string name2;
|
||||
@ -1728,7 +1728,7 @@ void SCH_LEGACY_PLUGIN::saveSymbol( SCH_SYMBOL* aSymbol )
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::saveField( SCH_FIELD* aField )
|
||||
void SCH_IO_KICAD_LEGACY::saveField( SCH_FIELD* aField )
|
||||
{
|
||||
char hjustify = 'C';
|
||||
|
||||
@ -1764,7 +1764,7 @@ void SCH_LEGACY_PLUGIN::saveField( SCH_FIELD* aField )
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::saveBitmap( SCH_BITMAP* aBitmap )
|
||||
void SCH_IO_KICAD_LEGACY::saveBitmap( SCH_BITMAP* aBitmap )
|
||||
{
|
||||
wxCHECK_RET( aBitmap != nullptr, "SCH_BITMAP* is NULL" );
|
||||
|
||||
@ -1804,7 +1804,7 @@ void SCH_LEGACY_PLUGIN::saveBitmap( SCH_BITMAP* aBitmap )
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::saveSheet( SCH_SHEET* aSheet )
|
||||
void SCH_IO_KICAD_LEGACY::saveSheet( SCH_SHEET* aSheet )
|
||||
{
|
||||
wxCHECK_RET( aSheet != nullptr, "SCH_SHEET* is NULL" );
|
||||
|
||||
@ -1872,7 +1872,7 @@ void SCH_LEGACY_PLUGIN::saveSheet( SCH_SHEET* aSheet )
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::saveJunction( SCH_JUNCTION* aJunction )
|
||||
void SCH_IO_KICAD_LEGACY::saveJunction( SCH_JUNCTION* aJunction )
|
||||
{
|
||||
wxCHECK_RET( aJunction != nullptr, "SCH_JUNCTION* is NULL" );
|
||||
|
||||
@ -1882,7 +1882,7 @@ void SCH_LEGACY_PLUGIN::saveJunction( SCH_JUNCTION* aJunction )
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::saveNoConnect( SCH_NO_CONNECT* aNoConnect )
|
||||
void SCH_IO_KICAD_LEGACY::saveNoConnect( SCH_NO_CONNECT* aNoConnect )
|
||||
{
|
||||
wxCHECK_RET( aNoConnect != nullptr, "SCH_NOCONNECT* is NULL" );
|
||||
|
||||
@ -1892,7 +1892,7 @@ void SCH_LEGACY_PLUGIN::saveNoConnect( SCH_NO_CONNECT* aNoConnect )
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::saveBusEntry( SCH_BUS_ENTRY_BASE* aBusEntry )
|
||||
void SCH_IO_KICAD_LEGACY::saveBusEntry( SCH_BUS_ENTRY_BASE* aBusEntry )
|
||||
{
|
||||
wxCHECK_RET( aBusEntry != nullptr, "SCH_BUS_ENTRY_BASE* is NULL" );
|
||||
|
||||
@ -1915,7 +1915,7 @@ void SCH_LEGACY_PLUGIN::saveBusEntry( SCH_BUS_ENTRY_BASE* aBusEntry )
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::saveLine( SCH_LINE* aLine )
|
||||
void SCH_IO_KICAD_LEGACY::saveLine( SCH_LINE* aLine )
|
||||
{
|
||||
wxCHECK_RET( aLine != nullptr, "SCH_LINE* is NULL" );
|
||||
|
||||
@ -1957,7 +1957,7 @@ void SCH_LEGACY_PLUGIN::saveLine( SCH_LINE* aLine )
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::saveText( SCH_TEXT* aText )
|
||||
void SCH_IO_KICAD_LEGACY::saveText( SCH_TEXT* aText )
|
||||
{
|
||||
wxCHECK_RET( aText != nullptr, "SCH_TEXT* is NULL" );
|
||||
|
||||
@ -2038,7 +2038,7 @@ void SCH_LEGACY_PLUGIN::saveText( SCH_TEXT* aText )
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::saveBusAlias( std::shared_ptr<BUS_ALIAS> aAlias )
|
||||
void SCH_IO_KICAD_LEGACY::saveBusAlias( std::shared_ptr<BUS_ALIAS> aAlias )
|
||||
{
|
||||
wxCHECK_RET( aAlias != nullptr, "BUS_ALIAS* is NULL" );
|
||||
|
||||
@ -2049,13 +2049,13 @@ void SCH_LEGACY_PLUGIN::saveBusAlias( std::shared_ptr<BUS_ALIAS> aAlias )
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::cacheLib( const wxString& aLibraryFileName, const STRING_UTF8_MAP* aProperties )
|
||||
void SCH_IO_KICAD_LEGACY::cacheLib( const wxString& aLibraryFileName, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
if( !m_cache || !m_cache->IsFile( aLibraryFileName ) || m_cache->IsFileChanged() )
|
||||
{
|
||||
// a spectacular episode in memory management:
|
||||
delete m_cache;
|
||||
m_cache = new SCH_LEGACY_PLUGIN_CACHE( aLibraryFileName );
|
||||
m_cache = new SCH_IO_KICAD_LEGACY_LIB_CACHE( aLibraryFileName );
|
||||
|
||||
if( !isBuffering( aProperties ) )
|
||||
m_cache->Load();
|
||||
@ -2063,9 +2063,9 @@ void SCH_LEGACY_PLUGIN::cacheLib( const wxString& aLibraryFileName, const STRING
|
||||
}
|
||||
|
||||
|
||||
bool SCH_LEGACY_PLUGIN::writeDocFile( const STRING_UTF8_MAP* aProperties )
|
||||
bool SCH_IO_KICAD_LEGACY::writeDocFile( const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
std::string propName( SCH_LEGACY_PLUGIN::PropNoDocFile );
|
||||
std::string propName( SCH_IO_KICAD_LEGACY::PropNoDocFile );
|
||||
|
||||
if( aProperties && aProperties->find( propName ) != aProperties->end() )
|
||||
return false;
|
||||
@ -2074,13 +2074,13 @@ bool SCH_LEGACY_PLUGIN::writeDocFile( const STRING_UTF8_MAP* aProperties )
|
||||
}
|
||||
|
||||
|
||||
bool SCH_LEGACY_PLUGIN::isBuffering( const STRING_UTF8_MAP* aProperties )
|
||||
bool SCH_IO_KICAD_LEGACY::isBuffering( const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
return ( aProperties && aProperties->Exists( SCH_LEGACY_PLUGIN::PropBuffering ) );
|
||||
return ( aProperties && aProperties->Exists( SCH_IO_KICAD_LEGACY::PropBuffering ) );
|
||||
}
|
||||
|
||||
|
||||
int SCH_LEGACY_PLUGIN::GetModifyHash() const
|
||||
int SCH_IO_KICAD_LEGACY::GetModifyHash() const
|
||||
{
|
||||
if( m_cache )
|
||||
return m_cache->GetModifyHash();
|
||||
@ -2090,7 +2090,7 @@ int SCH_LEGACY_PLUGIN::GetModifyHash() const
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
void SCH_IO_KICAD_LEGACY::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -2111,7 +2111,7 @@ void SCH_LEGACY_PLUGIN::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
void SCH_IO_KICAD_LEGACY::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -2132,7 +2132,7 @@ void SCH_LEGACY_PLUGIN::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolLis
|
||||
}
|
||||
|
||||
|
||||
LIB_SYMBOL* SCH_LEGACY_PLUGIN::LoadSymbol( const wxString& aLibraryPath,
|
||||
LIB_SYMBOL* SCH_IO_KICAD_LEGACY::LoadSymbol( const wxString& aLibraryPath,
|
||||
const wxString& aSymbolName,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
@ -2149,7 +2149,7 @@ LIB_SYMBOL* SCH_LEGACY_PLUGIN::LoadSymbol( const wxString& aLibraryPath,
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::SaveSymbol( const wxString& aLibraryPath, const LIB_SYMBOL* aSymbol,
|
||||
void SCH_IO_KICAD_LEGACY::SaveSymbol( const wxString& aLibraryPath, const LIB_SYMBOL* aSymbol,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
@ -2163,7 +2163,7 @@ void SCH_LEGACY_PLUGIN::SaveSymbol( const wxString& aLibraryPath, const LIB_SYMB
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::DeleteSymbol( const wxString& aLibraryPath, const wxString& aSymbolName,
|
||||
void SCH_IO_KICAD_LEGACY::DeleteSymbol( const wxString& aLibraryPath, const wxString& aSymbolName,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
@ -2177,7 +2177,7 @@ void SCH_LEGACY_PLUGIN::DeleteSymbol( const wxString& aLibraryPath, const wxStri
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::CreateSymbolLib( const wxString& aLibraryPath,
|
||||
void SCH_IO_KICAD_LEGACY::CreateSymbolLib( const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
if( wxFileExists( aLibraryPath ) )
|
||||
@ -2189,14 +2189,14 @@ void SCH_LEGACY_PLUGIN::CreateSymbolLib( const wxString& aLibraryPath,
|
||||
LOCALE_IO toggle;
|
||||
|
||||
delete m_cache;
|
||||
m_cache = new SCH_LEGACY_PLUGIN_CACHE( aLibraryPath );
|
||||
m_cache = new SCH_IO_KICAD_LEGACY_LIB_CACHE( aLibraryPath );
|
||||
m_cache->SetModified();
|
||||
m_cache->Save( writeDocFile( aProperties ) );
|
||||
m_cache->Load(); // update m_writable and m_mod_time
|
||||
}
|
||||
|
||||
|
||||
bool SCH_LEGACY_PLUGIN::DeleteSymbolLib( const wxString& aLibraryPath,
|
||||
bool SCH_IO_KICAD_LEGACY::DeleteSymbolLib( const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxFileName fn = aLibraryPath;
|
||||
@ -2222,10 +2222,10 @@ bool SCH_LEGACY_PLUGIN::DeleteSymbolLib( const wxString& aLibraryPath,
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::SaveLibrary( const wxString& aLibraryPath, const STRING_UTF8_MAP* aProperties )
|
||||
void SCH_IO_KICAD_LEGACY::SaveLibrary( const wxString& aLibraryPath, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
if( !m_cache )
|
||||
m_cache = new SCH_LEGACY_PLUGIN_CACHE( aLibraryPath );
|
||||
m_cache = new SCH_IO_KICAD_LEGACY_LIB_CACHE( aLibraryPath );
|
||||
|
||||
wxString oldFileName = m_cache->GetFileName();
|
||||
|
||||
@ -2241,7 +2241,7 @@ void SCH_LEGACY_PLUGIN::SaveLibrary( const wxString& aLibraryPath, const STRING_
|
||||
}
|
||||
|
||||
|
||||
bool SCH_LEGACY_PLUGIN::CanReadSchematicFile( const wxString& aFileName ) const
|
||||
bool SCH_IO_KICAD_LEGACY::CanReadSchematicFile( const wxString& aFileName ) const
|
||||
{
|
||||
if( !SCH_IO::CanReadSchematicFile( aFileName ) )
|
||||
return false;
|
||||
@ -2250,7 +2250,7 @@ bool SCH_LEGACY_PLUGIN::CanReadSchematicFile( const wxString& aFileName ) const
|
||||
}
|
||||
|
||||
|
||||
bool SCH_LEGACY_PLUGIN::CanReadLibrary( const wxString& aFileName ) const
|
||||
bool SCH_IO_KICAD_LEGACY::CanReadLibrary( const wxString& aFileName ) const
|
||||
{
|
||||
if( !SCH_IO::CanReadLibrary( aFileName ) )
|
||||
return false;
|
||||
@ -2259,26 +2259,26 @@ bool SCH_LEGACY_PLUGIN::CanReadLibrary( const wxString& aFileName ) const
|
||||
}
|
||||
|
||||
|
||||
bool SCH_LEGACY_PLUGIN::IsSymbolLibWritable( const wxString& aLibraryPath )
|
||||
bool SCH_IO_KICAD_LEGACY::IsSymbolLibWritable( const wxString& aLibraryPath )
|
||||
{
|
||||
// Writing legacy symbol libraries is deprecated.
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
LIB_SYMBOL* SCH_LEGACY_PLUGIN::ParsePart( LINE_READER& reader, int aMajorVersion,
|
||||
LIB_SYMBOL* SCH_IO_KICAD_LEGACY::ParsePart( LINE_READER& reader, int aMajorVersion,
|
||||
int aMinorVersion )
|
||||
{
|
||||
return SCH_LEGACY_PLUGIN_CACHE::LoadPart( reader, aMajorVersion, aMinorVersion );
|
||||
return SCH_IO_KICAD_LEGACY_LIB_CACHE::LoadPart( reader, aMajorVersion, aMinorVersion );
|
||||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::FormatPart( LIB_SYMBOL* symbol, OUTPUTFORMATTER & formatter )
|
||||
void SCH_IO_KICAD_LEGACY::FormatPart( LIB_SYMBOL* symbol, OUTPUTFORMATTER & formatter )
|
||||
{
|
||||
SCH_LEGACY_PLUGIN_CACHE::SaveSymbol( symbol, formatter );
|
||||
SCH_IO_KICAD_LEGACY_LIB_CACHE::SaveSymbol( symbol, formatter );
|
||||
}
|
||||
|
||||
|
||||
|
||||
const char* SCH_LEGACY_PLUGIN::PropBuffering = "buffering";
|
||||
const char* SCH_LEGACY_PLUGIN::PropNoDocFile = "no_doc_file";
|
||||
const char* SCH_IO_KICAD_LEGACY::PropBuffering = "buffering";
|
||||
const char* SCH_IO_KICAD_LEGACY::PropNoDocFile = "no_doc_file";
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user