Rename PROPERTIES to STRING_UTF8_MAP for clarity
This class has nothing to do with the properties system
This commit is contained in:
parent
68de92313e
commit
dd94b2d3a7
|
@ -361,7 +361,6 @@ set( COMMON_SRCS
|
|||
paths.cpp
|
||||
printout.cpp
|
||||
project.cpp
|
||||
properties.cpp
|
||||
ptree.cpp
|
||||
rc_item.cpp
|
||||
refdes_utils.cpp
|
||||
|
@ -372,6 +371,7 @@ set( COMMON_SRCS
|
|||
search_stack.cpp
|
||||
searchhelpfilefullpath.cpp
|
||||
status_popup.cpp
|
||||
string_utf8_map.cpp
|
||||
stroke_params.cpp
|
||||
systemdirsappend.cpp
|
||||
template_fieldnames.cpp
|
||||
|
|
|
@ -45,7 +45,7 @@ LIB_TABLE_ROW* new_clone( const LIB_TABLE_ROW& aRow )
|
|||
}
|
||||
|
||||
|
||||
void LIB_TABLE_ROW::setProperties( PROPERTIES* aProperties )
|
||||
void LIB_TABLE_ROW::setProperties( STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
properties.reset( aProperties );
|
||||
}
|
||||
|
@ -355,14 +355,14 @@ void LIB_TABLE::Save( const wxString& aFileName ) const
|
|||
}
|
||||
|
||||
|
||||
PROPERTIES* LIB_TABLE::ParseOptions( const std::string& aOptionsList )
|
||||
STRING_UTF8_MAP* LIB_TABLE::ParseOptions( const std::string& aOptionsList )
|
||||
{
|
||||
if( aOptionsList.size() )
|
||||
{
|
||||
const char* cp = &aOptionsList[0];
|
||||
const char* end = cp + aOptionsList.size();
|
||||
|
||||
PROPERTIES props;
|
||||
STRING_UTF8_MAP props;
|
||||
std::string pair;
|
||||
|
||||
// Parse all name=value pairs
|
||||
|
@ -413,20 +413,20 @@ PROPERTIES* LIB_TABLE::ParseOptions( const std::string& aOptionsList )
|
|||
}
|
||||
|
||||
if( props.size() )
|
||||
return new PROPERTIES( props );
|
||||
return new STRING_UTF8_MAP( props );
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
UTF8 LIB_TABLE::FormatOptions( const PROPERTIES* aProperties )
|
||||
UTF8 LIB_TABLE::FormatOptions( const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
UTF8 ret;
|
||||
|
||||
if( aProperties )
|
||||
{
|
||||
for( PROPERTIES::const_iterator it = aProperties->begin(); it != aProperties->end(); ++it )
|
||||
for( STRING_UTF8_MAP::const_iterator it = aProperties->begin(); it != aProperties->end(); ++it )
|
||||
{
|
||||
const std::string& name = it->first;
|
||||
|
||||
|
|
|
@ -18,12 +18,12 @@
|
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <properties.h>
|
||||
#include <string_utf8_map.h>
|
||||
|
||||
|
||||
bool PROPERTIES::Value( const char* aName, UTF8* aFetchedValue ) const
|
||||
bool STRING_UTF8_MAP::Value( const char* aName, UTF8* aFetchedValue ) const
|
||||
{
|
||||
PROPERTIES::const_iterator it = find( aName );
|
||||
STRING_UTF8_MAP::const_iterator it = find( aName );
|
||||
|
||||
if( it != end() )
|
||||
{
|
|
@ -793,7 +793,7 @@ SYMBOL_LIB_TABLE_RESCUER::SYMBOL_LIB_TABLE_RESCUER( PROJECT& aProject, SCHEMATIC
|
|||
EDA_DRAW_PANEL_GAL::GAL_TYPE aGalBackEndType ) :
|
||||
RESCUER( aProject, aSchematic, aCurrentSheet, aGalBackEndType )
|
||||
{
|
||||
m_properties = std::make_unique<PROPERTIES>();
|
||||
m_properties = std::make_unique<STRING_UTF8_MAP>();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include <wx/string.h>
|
||||
#include <boost/ptr_container/ptr_vector.hpp>
|
||||
|
||||
#include <properties.h>
|
||||
#include <string_utf8_map.h>
|
||||
#include <lib_symbol.h>
|
||||
#include <sch_plugins/legacy/sch_legacy_plugin.h>
|
||||
#include <class_draw_panel_gal.h>
|
||||
|
@ -381,7 +381,7 @@ public:
|
|||
private:
|
||||
std::vector<std::unique_ptr<LIB_SYMBOL>> m_rescueLibSymbols;
|
||||
|
||||
std::unique_ptr< PROPERTIES > m_properties; ///< Library plugin properties.
|
||||
std::unique_ptr<STRING_UTF8_MAP> m_properties; ///< Library plugin properties.
|
||||
};
|
||||
|
||||
#endif // _LIB_CACHE_RESCUE_H_
|
||||
|
|
|
@ -38,7 +38,7 @@ class SYMBOL_LIB_TABLE;
|
|||
class KIWAY;
|
||||
class LIB_SYMBOL;
|
||||
class SYMBOL_LIB;
|
||||
class PROPERTIES;
|
||||
class STRING_UTF8_MAP;
|
||||
class PROGRESS_REPORTER;
|
||||
|
||||
|
||||
|
@ -193,7 +193,7 @@ public:
|
|||
*/
|
||||
virtual int GetModifyHash() const = 0;
|
||||
|
||||
virtual void SaveLibrary( const wxString& aFileName, const PROPERTIES* aProperties = nullptr );
|
||||
virtual void SaveLibrary( const wxString& aFileName, const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
|
||||
/**
|
||||
* Load information from some input file format that this #SCH_PLUGIN implementation
|
||||
|
@ -225,7 +225,7 @@ public:
|
|||
*/
|
||||
virtual SCH_SHEET* Load( const wxString& aFileName, SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* aAppendToMe = nullptr,
|
||||
const PROPERTIES* aProperties = nullptr );
|
||||
const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
|
||||
/**
|
||||
* Write \a aSchematic to a storage file in a format that this #SCH_PLUGIN implementation
|
||||
|
@ -253,7 +253,7 @@ public:
|
|||
* @throw IO_ERROR if there is a problem saving or exporting.
|
||||
*/
|
||||
virtual void Save( const wxString& aFileName, SCH_SHEET* aSheet, SCHEMATIC* aSchematic,
|
||||
const PROPERTIES* aProperties = nullptr );
|
||||
const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
|
||||
/**
|
||||
* Populate a list of #LIB_SYMBOL alias names contained within the library \a aLibraryPath.
|
||||
|
@ -272,7 +272,7 @@ public:
|
|||
* @throw IO_ERROR if the library cannot be found, the part library cannot be loaded.
|
||||
*/
|
||||
virtual void EnumerateSymbolLib( wxArrayString& aSymbolNameList, const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties = nullptr );
|
||||
const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
|
||||
/**
|
||||
* Populate a list of #LIB_SYMBOL aliases contained within the library \a aLibraryPath.
|
||||
|
@ -295,7 +295,7 @@ public:
|
|||
*/
|
||||
virtual void EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties = nullptr );
|
||||
const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
|
||||
/**
|
||||
* Load a #LIB_SYMBOL object having \a aPartName from the \a aLibraryPath containing
|
||||
|
@ -319,7 +319,7 @@ public:
|
|||
* is thrown in the case where aAliasName cannot be found.
|
||||
*/
|
||||
virtual LIB_SYMBOL* LoadSymbol( const wxString& aLibraryPath, const wxString& aPartName,
|
||||
const PROPERTIES* aProperties = nullptr );
|
||||
const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
|
||||
/**
|
||||
* Write \a aSymbol to an existing library located at \a aLibraryPath. If a #LIB_SYMBOL
|
||||
|
@ -343,7 +343,7 @@ public:
|
|||
* @throw IO_ERROR if there is a problem saving.
|
||||
*/
|
||||
virtual void SaveSymbol( const wxString& aLibraryPath, const LIB_SYMBOL* aSymbol,
|
||||
const PROPERTIES* aProperties = nullptr );
|
||||
const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
|
||||
/**
|
||||
* Delete the entire #LIB_SYMBOL associated with \a aAliasName from the library
|
||||
|
@ -364,7 +364,7 @@ public:
|
|||
* @throw IO_ERROR if there is a problem finding the alias or the library or deleting it.
|
||||
*/
|
||||
virtual void DeleteSymbol( const wxString& aLibraryPath, const wxString& aSymbolName,
|
||||
const PROPERTIES* aProperties = nullptr );
|
||||
const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
|
||||
/**
|
||||
* Create a new empty symbol library at \a aLibraryPath. It is an error to attempt
|
||||
|
@ -382,7 +382,7 @@ public:
|
|||
* @throw IO_ERROR if there is a problem finding the library, or creating it.
|
||||
*/
|
||||
virtual void CreateSymbolLib( const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties = nullptr );
|
||||
const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
|
||||
/**
|
||||
* Delete an existing symbol library and returns true if successful, or if library
|
||||
|
@ -404,7 +404,7 @@ public:
|
|||
* @throw IO_ERROR if there is a problem deleting an existing library.
|
||||
*/
|
||||
virtual bool DeleteSymbolLib( const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties = nullptr );
|
||||
const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
|
||||
/**
|
||||
* Return true if the library at \a aLibraryPath is writable. (Often
|
||||
|
@ -441,7 +441,7 @@ public:
|
|||
* This would require a 3 column list, and introducing wx GUI knowledge to
|
||||
* #SCH_PLUGIN, which has been avoided to date.
|
||||
*/
|
||||
virtual void SymbolLibOptions( PROPERTIES* aListToAppendTo ) const;
|
||||
virtual void SymbolLibOptions( STRING_UTF8_MAP* aListToAppendTo ) const;
|
||||
|
||||
/**
|
||||
* @return true if this plugin supports libraries that contain sub-libraries.
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <properties.h>
|
||||
#include <string_utf8_map.h>
|
||||
|
||||
#include <sch_io_mgr.h>
|
||||
#include <wx/translation.h>
|
||||
|
@ -42,14 +42,14 @@ static void not_implemented( const SCH_PLUGIN* aPlugin, const char* aCaller )
|
|||
}
|
||||
|
||||
|
||||
void SCH_PLUGIN::SaveLibrary( const wxString& aFileName, const PROPERTIES* aProperties )
|
||||
void SCH_PLUGIN::SaveLibrary( const wxString& aFileName, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
not_implemented( this, __FUNCTION__ );
|
||||
}
|
||||
|
||||
|
||||
SCH_SHEET* SCH_PLUGIN::Load( const wxString& aFileName, SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* aAppendToMe, const PROPERTIES* aProperties )
|
||||
SCH_SHEET* aAppendToMe, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
not_implemented( this, __FUNCTION__ );
|
||||
return nullptr;
|
||||
|
@ -57,7 +57,7 @@ SCH_SHEET* SCH_PLUGIN::Load( const wxString& aFileName, SCHEMATIC* aSchematic,
|
|||
|
||||
|
||||
void SCH_PLUGIN::Save( const wxString& aFileName, SCH_SHEET* aSheet, SCHEMATIC* aSchematic,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// not pure virtual so that plugins only have to implement subset of the SCH_PLUGIN interface.
|
||||
not_implemented( this, __FUNCTION__ );
|
||||
|
@ -66,7 +66,7 @@ void SCH_PLUGIN::Save( const wxString& aFileName, SCH_SHEET* aSheet, SCHEMATIC*
|
|||
|
||||
void SCH_PLUGIN::EnumerateSymbolLib( wxArrayString& aAliasNameList,
|
||||
const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// not pure virtual so that plugins only have to implement subset of the SCH_PLUGIN interface.
|
||||
not_implemented( this, __FUNCTION__ );
|
||||
|
@ -75,7 +75,7 @@ void SCH_PLUGIN::EnumerateSymbolLib( wxArrayString& aAliasNameList,
|
|||
|
||||
void SCH_PLUGIN::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// not pure virtual so that plugins only have to implement subset of the SCH_PLUGIN interface.
|
||||
not_implemented( this, __FUNCTION__ );
|
||||
|
@ -83,7 +83,7 @@ void SCH_PLUGIN::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
|||
|
||||
|
||||
LIB_SYMBOL* SCH_PLUGIN::LoadSymbol( const wxString& aLibraryPath, const wxString& aSymbolName,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// not pure virtual so that plugins only have to implement subset of the SCH_PLUGIN interface.
|
||||
not_implemented( this, __FUNCTION__ );
|
||||
|
@ -92,7 +92,7 @@ LIB_SYMBOL* SCH_PLUGIN::LoadSymbol( const wxString& aLibraryPath, const wxString
|
|||
|
||||
|
||||
void SCH_PLUGIN::SaveSymbol( const wxString& aLibraryPath, const LIB_SYMBOL* aSymbol,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// not pure virtual so that plugins only have to implement subset of the SCH_PLUGIN interface.
|
||||
not_implemented( this, __FUNCTION__ );
|
||||
|
@ -100,21 +100,21 @@ void SCH_PLUGIN::SaveSymbol( const wxString& aLibraryPath, const LIB_SYMBOL* aSy
|
|||
|
||||
|
||||
void SCH_PLUGIN::DeleteSymbol( const wxString& aLibraryPath, const wxString& aSymbolName,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// not pure virtual so that plugins only have to implement subset of the SCH_PLUGIN interface.
|
||||
not_implemented( this, __FUNCTION__ );
|
||||
}
|
||||
|
||||
|
||||
void SCH_PLUGIN::CreateSymbolLib( const wxString& aLibraryPath, const PROPERTIES* aProperties )
|
||||
void SCH_PLUGIN::CreateSymbolLib( const wxString& aLibraryPath, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// not pure virtual so that plugins only have to implement subset of the SCH_PLUGIN interface.
|
||||
not_implemented( this, __FUNCTION__ );
|
||||
}
|
||||
|
||||
|
||||
bool SCH_PLUGIN::DeleteSymbolLib( const wxString& aLibraryPath, const PROPERTIES* aProperties )
|
||||
bool SCH_PLUGIN::DeleteSymbolLib( const wxString& aLibraryPath, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// not pure virtual so that plugins only have to implement subset of the SCH_PLUGIN interface.
|
||||
not_implemented( this, __FUNCTION__ );
|
||||
|
@ -130,7 +130,7 @@ bool SCH_PLUGIN::IsSymbolLibWritable( const wxString& aLibraryPath )
|
|||
}
|
||||
|
||||
|
||||
void SCH_PLUGIN::SymbolLibOptions( PROPERTIES* aListToAppendTo ) const
|
||||
void SCH_PLUGIN::SymbolLibOptions( STRING_UTF8_MAP* aListToAppendTo ) const
|
||||
{
|
||||
// disable all these in another couple of months, after everyone has seen them:
|
||||
#if 1
|
||||
|
|
|
@ -220,7 +220,7 @@ wxFileName SCH_ALTIUM_PLUGIN::getLibFileName()
|
|||
|
||||
|
||||
SCH_SHEET* SCH_ALTIUM_PLUGIN::Load( const wxString& aFileName, SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* aAppendToMe, const PROPERTIES* aProperties )
|
||||
SCH_SHEET* aAppendToMe, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxCHECK( !aFileName.IsEmpty() && aSchematic, nullptr );
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
|
||||
SCH_SHEET* Load( const wxString& aFileName, SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* aAppendToMe = nullptr,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
bool CheckHeader( const wxString& aFileName ) override;
|
||||
|
||||
|
@ -160,7 +160,7 @@ private:
|
|||
wxString m_libName; // Library name to save symbols
|
||||
|
||||
SCH_PLUGIN::SCH_PLUGIN_RELEASER m_pi; // Plugin to create KiCad symbol library.
|
||||
std::unique_ptr<PROPERTIES> m_properties; // Library plugin properties.
|
||||
std::unique_ptr<STRING_UTF8_MAP> m_properties; // Library plugin properties.
|
||||
|
||||
std::unique_ptr<TITLE_BLOCK> m_currentTitleBlock; // Will be assigned at the end of parsing
|
||||
// a sheet
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <sch_plugins/cadstar/cadstar_sch_archive_loader.h>
|
||||
#include <sch_plugins/cadstar/cadstar_sch_archive_plugin.h>
|
||||
|
||||
#include <properties.h>
|
||||
#include <string_utf8_map.h>
|
||||
#include <sch_screen.h>
|
||||
#include <sch_sheet.h>
|
||||
#include <schematic.h>
|
||||
|
@ -59,7 +59,7 @@ int CADSTAR_SCH_ARCHIVE_PLUGIN::GetModifyHash() const
|
|||
|
||||
|
||||
SCH_SHEET* CADSTAR_SCH_ARCHIVE_PLUGIN::Load( const wxString& aFileName, SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* aAppendToMe, const PROPERTIES* aProperties )
|
||||
SCH_SHEET* aAppendToMe, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxASSERT( !aFileName || aSchematic != NULL );
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
|
||||
SCH_SHEET* Load( const wxString& aFileName, SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* aAppendToMe = nullptr,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
bool CheckHeader( const wxString& aFileName ) override;
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ SCH_DATABASE_PLUGIN::~SCH_DATABASE_PLUGIN()
|
|||
|
||||
void SCH_DATABASE_PLUGIN::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
std::vector<LIB_SYMBOL*> symbols;
|
||||
EnumerateSymbolLib( symbols, aLibraryPath, aProperties );
|
||||
|
@ -58,7 +58,7 @@ void SCH_DATABASE_PLUGIN::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
|||
|
||||
void SCH_DATABASE_PLUGIN::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxCHECK_RET( m_libTable, "Database plugin missing library table handle!" );
|
||||
ensureSettings( aLibraryPath );
|
||||
|
@ -103,7 +103,7 @@ void SCH_DATABASE_PLUGIN::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolL
|
|||
|
||||
LIB_SYMBOL* SCH_DATABASE_PLUGIN::LoadSymbol( const wxString& aLibraryPath,
|
||||
const wxString& aAliasName,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxCHECK( m_libTable, nullptr );
|
||||
ensureSettings( aLibraryPath );
|
||||
|
|
|
@ -64,14 +64,14 @@ public:
|
|||
|
||||
void EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
void EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
LIB_SYMBOL* LoadSymbol( const wxString& aLibraryPath, const wxString& aAliasName,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
bool SupportsSubLibraries() const override { return true; }
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <sch_plugins/eagle/sch_eagle_plugin.h>
|
||||
|
||||
#include <locale_io.h>
|
||||
#include <properties.h>
|
||||
#include <string_utf8_map.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
|
@ -427,7 +427,7 @@ void SCH_EAGLE_PLUGIN::checkpoint()
|
|||
|
||||
|
||||
SCH_SHEET* SCH_EAGLE_PLUGIN::Load( const wxString& aFileName, SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* aAppendToMe, const PROPERTIES* aProperties )
|
||||
SCH_SHEET* aAppendToMe, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxASSERT( !aFileName || aSchematic != nullptr );
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
|
@ -485,7 +485,7 @@ SCH_SHEET* SCH_EAGLE_PLUGIN::Load( const wxString& aFileName, SCHEMATIC* aSchema
|
|||
wxCHECK_MSG( libTable, nullptr, wxT( "Could not load symbol lib table." ) );
|
||||
|
||||
m_pi.set( SCH_IO_MGR::FindPlugin( SCH_IO_MGR::SCH_KICAD ) );
|
||||
m_properties = std::make_unique<PROPERTIES>();
|
||||
m_properties = std::make_unique<STRING_UTF8_MAP>();
|
||||
( *m_properties )[SCH_LEGACY_PLUGIN::PropBuffering] = "";
|
||||
|
||||
/// @note No check is being done here to see if the existing symbol library exists so this
|
||||
|
|
|
@ -47,7 +47,7 @@ class SCH_TEXT;
|
|||
class SCH_GLOBALLABEL;
|
||||
class SCH_SYMBOL;
|
||||
class SCH_FIELD;
|
||||
class PROPERTIES;
|
||||
class STRING_UTF8_MAP;
|
||||
class SCH_EAGLE_PLUGIN_CACHE;
|
||||
class LIB_SYMBOL;
|
||||
class SYMBOL_LIB;
|
||||
|
@ -100,7 +100,7 @@ public:
|
|||
|
||||
SCH_SHEET* Load( const wxString& aFileName, SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* aAppendToMe = nullptr,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
bool CheckHeader( const wxString& aFileName ) override;
|
||||
|
||||
|
@ -228,7 +228,7 @@ private:
|
|||
std::map<wxString, EAGLE_LIBRARY> m_eagleLibs;
|
||||
|
||||
SCH_PLUGIN::SCH_PLUGIN_RELEASER m_pi; ///< PI to create KiCad symbol library.
|
||||
std::unique_ptr< PROPERTIES > m_properties; ///< Library plugin properties.
|
||||
std::unique_ptr<STRING_UTF8_MAP> m_properties; ///< Library plugin properties.
|
||||
|
||||
PROGRESS_REPORTER* m_progressReporter; ///< optional; may be nullptr
|
||||
unsigned m_doneCount;
|
||||
|
|
|
@ -85,7 +85,7 @@ SCH_SEXPR_PLUGIN::~SCH_SEXPR_PLUGIN()
|
|||
}
|
||||
|
||||
|
||||
void SCH_SEXPR_PLUGIN::init( SCHEMATIC* aSchematic, const PROPERTIES* aProperties )
|
||||
void SCH_SEXPR_PLUGIN::init( SCHEMATIC* aSchematic, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
m_version = 0;
|
||||
m_appending = false;
|
||||
|
@ -98,7 +98,7 @@ void SCH_SEXPR_PLUGIN::init( SCHEMATIC* aSchematic, const PROPERTIES* aPropertie
|
|||
|
||||
|
||||
SCH_SHEET* SCH_SEXPR_PLUGIN::Load( const wxString& aFileName, SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* aAppendToMe, const PROPERTIES* aProperties )
|
||||
SCH_SHEET* aAppendToMe, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxASSERT( !aFileName || aSchematic != nullptr );
|
||||
|
||||
|
@ -319,7 +319,7 @@ void SCH_SEXPR_PLUGIN::LoadContent( LINE_READER& aReader, SCH_SHEET* aSheet, int
|
|||
|
||||
|
||||
void SCH_SEXPR_PLUGIN::Save( const wxString& aFileName, SCH_SHEET* aSheet, SCHEMATIC* aSchematic,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxCHECK_RET( aSheet != nullptr, "NULL SCH_SHEET object." );
|
||||
wxCHECK_RET( !aFileName.IsEmpty(), "No schematic file name defined." );
|
||||
|
@ -1297,7 +1297,7 @@ void SCH_SEXPR_PLUGIN::saveInstances( const std::vector<SCH_SHEET_INSTANCE>& aSh
|
|||
}
|
||||
|
||||
|
||||
void SCH_SEXPR_PLUGIN::cacheLib( const wxString& aLibraryFileName, const PROPERTIES* aProperties )
|
||||
void SCH_SEXPR_PLUGIN::cacheLib( const wxString& aLibraryFileName, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
if( !m_cache || !m_cache->IsFile( aLibraryFileName ) || m_cache->IsFileChanged() )
|
||||
{
|
||||
|
@ -1311,7 +1311,7 @@ void SCH_SEXPR_PLUGIN::cacheLib( const wxString& aLibraryFileName, const PROPERT
|
|||
}
|
||||
|
||||
|
||||
bool SCH_SEXPR_PLUGIN::isBuffering( const PROPERTIES* aProperties )
|
||||
bool SCH_SEXPR_PLUGIN::isBuffering( const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
return ( aProperties && aProperties->Exists( SCH_SEXPR_PLUGIN::PropBuffering ) );
|
||||
}
|
||||
|
@ -1329,7 +1329,7 @@ int SCH_SEXPR_PLUGIN::GetModifyHash() const
|
|||
|
||||
void SCH_SEXPR_PLUGIN::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
|
||||
|
@ -1350,7 +1350,7 @@ void SCH_SEXPR_PLUGIN::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
|||
|
||||
void SCH_SEXPR_PLUGIN::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
|
||||
|
@ -1370,7 +1370,7 @@ void SCH_SEXPR_PLUGIN::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList
|
|||
|
||||
|
||||
LIB_SYMBOL* SCH_SEXPR_PLUGIN::LoadSymbol( const wxString& aLibraryPath, const wxString& aSymbolName,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
|
||||
|
@ -1386,7 +1386,7 @@ LIB_SYMBOL* SCH_SEXPR_PLUGIN::LoadSymbol( const wxString& aLibraryPath, const wx
|
|||
|
||||
|
||||
void SCH_SEXPR_PLUGIN::SaveSymbol( const wxString& aLibraryPath, const LIB_SYMBOL* aSymbol,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
|
||||
|
@ -1400,7 +1400,7 @@ void SCH_SEXPR_PLUGIN::SaveSymbol( const wxString& aLibraryPath, const LIB_SYMBO
|
|||
|
||||
|
||||
void SCH_SEXPR_PLUGIN::DeleteSymbol( const wxString& aLibraryPath, const wxString& aSymbolName,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
|
||||
|
@ -1414,7 +1414,7 @@ void SCH_SEXPR_PLUGIN::DeleteSymbol( const wxString& aLibraryPath, const wxStrin
|
|||
|
||||
|
||||
void SCH_SEXPR_PLUGIN::CreateSymbolLib( const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
if( wxFileExists( aLibraryPath ) )
|
||||
{
|
||||
|
@ -1433,7 +1433,7 @@ void SCH_SEXPR_PLUGIN::CreateSymbolLib( const wxString& aLibraryPath,
|
|||
|
||||
|
||||
bool SCH_SEXPR_PLUGIN::DeleteSymbolLib( const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxFileName fn = aLibraryPath;
|
||||
|
||||
|
@ -1458,7 +1458,7 @@ bool SCH_SEXPR_PLUGIN::DeleteSymbolLib( const wxString& aLibraryPath,
|
|||
}
|
||||
|
||||
|
||||
void SCH_SEXPR_PLUGIN::SaveLibrary( const wxString& aLibraryPath, const PROPERTIES* aProperties )
|
||||
void SCH_SEXPR_PLUGIN::SaveLibrary( const wxString& aLibraryPath, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
if( !m_cache )
|
||||
m_cache = new SCH_SEXPR_PLUGIN_CACHE( aLibraryPath );
|
||||
|
|
|
@ -46,7 +46,7 @@ class SCH_TEXTBOX;
|
|||
class SCH_SYMBOL;
|
||||
class SCH_FIELD;
|
||||
struct SYMBOL_INSTANCE_REFERENCE;
|
||||
class PROPERTIES;
|
||||
class STRING_UTF8_MAP;
|
||||
class EE_SELECTION;
|
||||
class SCH_SEXPR_PLUGIN_CACHE;
|
||||
class LIB_SYMBOL;
|
||||
|
@ -97,13 +97,13 @@ public:
|
|||
|
||||
SCH_SHEET* Load( const wxString& aFileName, SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* aAppendToMe = nullptr,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
void LoadContent( LINE_READER& aReader, SCH_SHEET* aSheet,
|
||||
int aVersion = SEXPR_SCHEMATIC_FILE_VERSION );
|
||||
|
||||
void Save( const wxString& aFileName, SCH_SHEET* aSheet, SCHEMATIC* aSchematic,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
void Format( SCH_SHEET* aSheet );
|
||||
|
||||
|
@ -112,22 +112,22 @@ public:
|
|||
|
||||
void EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
void EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
LIB_SYMBOL* LoadSymbol( const wxString& aLibraryPath, const wxString& aAliasName,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
void SaveSymbol( const wxString& aLibraryPath, const LIB_SYMBOL* aSymbol,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
void DeleteSymbol( const wxString& aLibraryPath, const wxString& aSymbolName,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
void CreateSymbolLib( const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
bool DeleteSymbolLib( const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
void SaveLibrary( const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
bool CheckHeader( const wxString& aFileName ) override;
|
||||
bool IsSymbolLibWritable( const wxString& aLibraryPath ) override;
|
||||
|
@ -160,8 +160,8 @@ private:
|
|||
void saveBusAlias( std::shared_ptr<BUS_ALIAS> aAlias, int aNestLevel );
|
||||
void saveInstances( const std::vector<SCH_SHEET_INSTANCE>& aSheets, int aNestLevel );
|
||||
|
||||
void cacheLib( const wxString& aLibraryFileName, const PROPERTIES* aProperties );
|
||||
bool isBuffering( const PROPERTIES* aProperties );
|
||||
void cacheLib( const wxString& aLibraryFileName, const STRING_UTF8_MAP* aProperties );
|
||||
bool isBuffering( const STRING_UTF8_MAP* aProperties );
|
||||
|
||||
protected:
|
||||
int m_version; ///< Version of file being loaded.
|
||||
|
@ -179,7 +179,7 @@ protected:
|
|||
SCH_SEXPR_PLUGIN_CACHE* m_cache;
|
||||
|
||||
/// initialize PLUGIN like a constructor would.
|
||||
void init( SCHEMATIC* aSchematic, const PROPERTIES* aProperties = nullptr );
|
||||
void init( SCHEMATIC* aSchematic, const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
};
|
||||
|
||||
#endif // _SCH_SEXPR_PLUGIN_H_
|
||||
|
|
|
@ -88,7 +88,7 @@ SCH_LEGACY_PLUGIN::~SCH_LEGACY_PLUGIN()
|
|||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::init( SCHEMATIC* aSchematic, const PROPERTIES* aProperties )
|
||||
void SCH_LEGACY_PLUGIN::init( SCHEMATIC* aSchematic, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
m_version = 0;
|
||||
m_rootSheet = nullptr;
|
||||
|
@ -122,7 +122,7 @@ void SCH_LEGACY_PLUGIN::checkpoint()
|
|||
|
||||
|
||||
SCH_SHEET* SCH_LEGACY_PLUGIN::Load( const wxString& aFileName, SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* aAppendToMe, const PROPERTIES* aProperties )
|
||||
SCH_SHEET* aAppendToMe, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxASSERT( !aFileName || aSchematic != nullptr );
|
||||
|
||||
|
@ -1447,7 +1447,7 @@ std::shared_ptr<BUS_ALIAS> SCH_LEGACY_PLUGIN::loadBusAlias( LINE_READER& aReader
|
|||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::Save( const wxString& aFileName, SCH_SHEET* aSheet, SCHEMATIC* aSchematic,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxCHECK_RET( aSheet != nullptr, "NULL SCH_SHEET object." );
|
||||
wxCHECK_RET( !aFileName.IsEmpty(), "No schematic file name defined." );
|
||||
|
@ -2035,7 +2035,7 @@ void SCH_LEGACY_PLUGIN::saveBusAlias( std::shared_ptr<BUS_ALIAS> aAlias )
|
|||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::cacheLib( const wxString& aLibraryFileName, const PROPERTIES* aProperties )
|
||||
void SCH_LEGACY_PLUGIN::cacheLib( const wxString& aLibraryFileName, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
if( !m_cache || !m_cache->IsFile( aLibraryFileName ) || m_cache->IsFileChanged() )
|
||||
{
|
||||
|
@ -2049,7 +2049,7 @@ void SCH_LEGACY_PLUGIN::cacheLib( const wxString& aLibraryFileName, const PROPER
|
|||
}
|
||||
|
||||
|
||||
bool SCH_LEGACY_PLUGIN::writeDocFile( const PROPERTIES* aProperties )
|
||||
bool SCH_LEGACY_PLUGIN::writeDocFile( const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
std::string propName( SCH_LEGACY_PLUGIN::PropNoDocFile );
|
||||
|
||||
|
@ -2060,7 +2060,7 @@ bool SCH_LEGACY_PLUGIN::writeDocFile( const PROPERTIES* aProperties )
|
|||
}
|
||||
|
||||
|
||||
bool SCH_LEGACY_PLUGIN::isBuffering( const PROPERTIES* aProperties )
|
||||
bool SCH_LEGACY_PLUGIN::isBuffering( const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
return ( aProperties && aProperties->Exists( SCH_LEGACY_PLUGIN::PropBuffering ) );
|
||||
}
|
||||
|
@ -2078,7 +2078,7 @@ int SCH_LEGACY_PLUGIN::GetModifyHash() const
|
|||
|
||||
void SCH_LEGACY_PLUGIN::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
|
||||
|
@ -2099,7 +2099,7 @@ void SCH_LEGACY_PLUGIN::EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
|||
|
||||
void SCH_LEGACY_PLUGIN::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
|
||||
|
@ -2120,7 +2120,7 @@ void SCH_LEGACY_PLUGIN::EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolLis
|
|||
|
||||
LIB_SYMBOL* SCH_LEGACY_PLUGIN::LoadSymbol( const wxString& aLibraryPath,
|
||||
const wxString& aSymbolName,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
|
||||
|
@ -2136,7 +2136,7 @@ LIB_SYMBOL* SCH_LEGACY_PLUGIN::LoadSymbol( const wxString& aLibraryPath,
|
|||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::SaveSymbol( const wxString& aLibraryPath, const LIB_SYMBOL* aSymbol,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
|
||||
|
@ -2150,7 +2150,7 @@ void SCH_LEGACY_PLUGIN::SaveSymbol( const wxString& aLibraryPath, const LIB_SYMB
|
|||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::DeleteSymbol( const wxString& aLibraryPath, const wxString& aSymbolName,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
|
||||
|
@ -2164,7 +2164,7 @@ void SCH_LEGACY_PLUGIN::DeleteSymbol( const wxString& aLibraryPath, const wxStri
|
|||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::CreateSymbolLib( const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
if( wxFileExists( aLibraryPath ) )
|
||||
{
|
||||
|
@ -2183,7 +2183,7 @@ void SCH_LEGACY_PLUGIN::CreateSymbolLib( const wxString& aLibraryPath,
|
|||
|
||||
|
||||
bool SCH_LEGACY_PLUGIN::DeleteSymbolLib( const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxFileName fn = aLibraryPath;
|
||||
|
||||
|
@ -2208,7 +2208,7 @@ bool SCH_LEGACY_PLUGIN::DeleteSymbolLib( const wxString& aLibraryPath,
|
|||
}
|
||||
|
||||
|
||||
void SCH_LEGACY_PLUGIN::SaveLibrary( const wxString& aLibraryPath, const PROPERTIES* aProperties )
|
||||
void SCH_LEGACY_PLUGIN::SaveLibrary( const wxString& aLibraryPath, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
if( !m_cache )
|
||||
m_cache = new SCH_LEGACY_PLUGIN_CACHE( aLibraryPath );
|
||||
|
|
|
@ -41,7 +41,7 @@ class SCH_BUS_ENTRY_BASE;
|
|||
class SCH_TEXT;
|
||||
class SCH_SYMBOL;
|
||||
class SCH_FIELD;
|
||||
class PROPERTIES;
|
||||
class STRING_UTF8_MAP;
|
||||
class SELECTION;
|
||||
class SCH_LEGACY_PLUGIN_CACHE;
|
||||
class LIB_SYMBOL;
|
||||
|
@ -104,13 +104,13 @@ public:
|
|||
|
||||
SCH_SHEET* Load( const wxString& aFileName, SCHEMATIC* aSchematic,
|
||||
SCH_SHEET* aAppendToMe = nullptr,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
void LoadContent( LINE_READER& aReader, SCH_SCREEN* aScreen,
|
||||
int version = EESCHEMA_VERSION );
|
||||
|
||||
void Save( const wxString& aFileName, SCH_SHEET* aScreen, SCHEMATIC* aSchematic,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
void Format( SCH_SHEET* aSheet );
|
||||
|
||||
|
@ -118,22 +118,22 @@ public:
|
|||
|
||||
void EnumerateSymbolLib( wxArrayString& aSymbolNameList,
|
||||
const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
void EnumerateSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
||||
const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
LIB_SYMBOL* LoadSymbol( const wxString& aLibraryPath, const wxString& aAliasName,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
void SaveSymbol( const wxString& aLibraryPath, const LIB_SYMBOL* aSymbol,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
void DeleteSymbol( const wxString& aLibraryPath, const wxString& aSymbolName,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
void CreateSymbolLib( const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
bool DeleteSymbolLib( const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
void SaveLibrary( const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
bool CheckHeader( const wxString& aFileName ) override;
|
||||
bool IsSymbolLibWritable( const wxString& aLibraryPath ) override;
|
||||
|
@ -171,9 +171,9 @@ private:
|
|||
void saveText( SCH_TEXT* aText );
|
||||
void saveBusAlias( std::shared_ptr<BUS_ALIAS> aAlias );
|
||||
|
||||
void cacheLib( const wxString& aLibraryFileName, const PROPERTIES* aProperties );
|
||||
bool writeDocFile( const PROPERTIES* aProperties );
|
||||
bool isBuffering( const PROPERTIES* aProperties );
|
||||
void cacheLib( const wxString& aLibraryFileName, const STRING_UTF8_MAP* aProperties );
|
||||
bool writeDocFile( const STRING_UTF8_MAP* aProperties );
|
||||
bool isBuffering( const STRING_UTF8_MAP* aProperties );
|
||||
|
||||
protected:
|
||||
int m_version; ///< Version of file being loaded.
|
||||
|
@ -197,7 +197,7 @@ protected:
|
|||
SCHEMATIC* m_schematic;
|
||||
|
||||
/// initialize PLUGIN like a constructor would.
|
||||
void init( SCHEMATIC* aSchematic, const PROPERTIES* aProperties = nullptr );
|
||||
void init( SCHEMATIC* aSchematic, const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
};
|
||||
|
||||
#endif // _SCH_LEGACY_PLUGIN_H_
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include <wildcards_and_files_ext.h>
|
||||
#include <project/project_file.h>
|
||||
#include <project_rescue.h>
|
||||
#include <properties.h>
|
||||
#include <string_utf8_map.h>
|
||||
#include <widgets/app_progress_dialog.h>
|
||||
|
||||
#include <general.h>
|
||||
|
@ -61,7 +61,7 @@ SYMBOL_LIB::SYMBOL_LIB( SCH_LIB_TYPE aType, const wxString& aFileName,
|
|||
fileName = "unnamed.lib";
|
||||
|
||||
m_plugin.reset( SCH_IO_MGR::FindPlugin( m_pluginType ) );
|
||||
m_properties = std::make_unique<PROPERTIES>();
|
||||
m_properties = std::make_unique<STRING_UTF8_MAP>();
|
||||
m_mod_hash = 0;
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ void SYMBOL_LIB::Save( bool aSaveDocFile )
|
|||
wxString::Format( wxT( "no plugin defined for library `%s`." ),
|
||||
fileName.GetFullPath() ) );
|
||||
|
||||
PROPERTIES props;
|
||||
STRING_UTF8_MAP props;
|
||||
|
||||
if( !aSaveDocFile )
|
||||
props[ SCH_LEGACY_PLUGIN::PropNoDocFile ] = "";
|
||||
|
|
|
@ -44,7 +44,7 @@ class LIB_SYMBOL;
|
|||
class LIB_ID;
|
||||
class LINE_READER;
|
||||
class OUTPUTFORMATTER;
|
||||
class PROPERTIES;
|
||||
class STRING_UTF8_MAP;
|
||||
class SCH_PLUGIN;
|
||||
class SYMBOL_LIB;
|
||||
|
||||
|
@ -316,7 +316,7 @@ private:
|
|||
|
||||
SCH_IO_MGR::SCH_FILE_T m_pluginType;
|
||||
std::unique_ptr< SCH_PLUGIN > m_plugin;
|
||||
std::unique_ptr< PROPERTIES > m_properties; ///< Library properties
|
||||
std::unique_ptr<STRING_UTF8_MAP> m_properties; ///< Library properties
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -167,7 +167,7 @@ bool SYMBOL_LIBRARY_MANAGER::SaveLibrary( const wxString& aLibrary, const wxStri
|
|||
SCH_PLUGIN::SCH_PLUGIN_RELEASER pi( SCH_IO_MGR::FindPlugin( aFileType ) );
|
||||
bool res = true; // assume all libraries are successfully saved
|
||||
|
||||
PROPERTIES properties;
|
||||
STRING_UTF8_MAP properties;
|
||||
properties.emplace( SCH_LEGACY_PLUGIN::PropBuffering, "" );
|
||||
|
||||
auto it = m_libs.find( aLibrary );
|
||||
|
@ -959,7 +959,7 @@ bool SYMBOL_LIBRARY_MANAGER::LIB_BUFFER::SaveBuffer( std::shared_ptr<SYMBOL_BUFF
|
|||
LIB_SYMBOL* originalSymbol = aSymbolBuf->GetOriginal();
|
||||
wxCHECK( libSymbol && originalSymbol, false );
|
||||
SYMBOL_LIB_TABLE::SAVE_T result;
|
||||
PROPERTIES properties;
|
||||
STRING_UTF8_MAP properties;
|
||||
properties.emplace( SCH_LEGACY_PLUGIN::PropBuffering, "" );
|
||||
|
||||
wxString errorMsg = _( "Error saving symbol %s to library '%s'." ) + wxS( "\n%s" );
|
||||
|
@ -1066,7 +1066,7 @@ bool SYMBOL_LIBRARY_MANAGER::LIB_BUFFER::SaveBuffer( std::shared_ptr<SYMBOL_BUFF
|
|||
wxString errorMsg = _( "Error saving symbol %s to library '%s'." ) + wxS( "\n%s" );
|
||||
|
||||
// set properties to prevent save file on every symbol save
|
||||
PROPERTIES properties;
|
||||
STRING_UTF8_MAP properties;
|
||||
properties.emplace( SCH_LEGACY_PLUGIN::PropBuffering, "" );
|
||||
|
||||
// Delete the original symbol if the symbol name has been changed.
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <project.h>
|
||||
#include <properties.h>
|
||||
#include <string_utf8_map.h>
|
||||
#include <richio.h>
|
||||
|
||||
|
||||
|
@ -186,7 +186,7 @@ public:
|
|||
* Return the constant #PROPERTIES for this library (#LIB_TABLE_ROW). These are
|
||||
* the "options" in a table.
|
||||
*/
|
||||
const PROPERTIES* GetProperties() const { return properties.get(); }
|
||||
const STRING_UTF8_MAP* GetProperties() const { return properties.get(); }
|
||||
|
||||
/**
|
||||
* Serialize this object as utf8 text to an #OUTPUTFORMATTER, and tries to
|
||||
|
@ -218,7 +218,7 @@ protected:
|
|||
m_parent( aRow.m_parent )
|
||||
{
|
||||
if( aRow.properties )
|
||||
properties = std::make_unique<PROPERTIES>( *aRow.properties.get() );
|
||||
properties = std::make_unique<STRING_UTF8_MAP>( *aRow.properties.get() );
|
||||
else
|
||||
properties.reset();
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ protected:
|
|||
private:
|
||||
virtual LIB_TABLE_ROW* do_clone() const = 0;
|
||||
|
||||
void setProperties( PROPERTIES* aProperties );
|
||||
void setProperties( STRING_UTF8_MAP* aProperties );
|
||||
|
||||
wxString nickName;
|
||||
wxString uri_user; ///< what user entered from UI or loaded from disk
|
||||
|
@ -245,7 +245,7 @@ private:
|
|||
bool m_loaded = false; ///< Whether the LIB_TABLE_ROW is loaded
|
||||
LIB_TABLE* m_parent; ///< Pointer to the table this row lives in (maybe null)
|
||||
|
||||
std::unique_ptr< PROPERTIES > properties;
|
||||
std::unique_ptr<STRING_UTF8_MAP> properties;
|
||||
|
||||
std::mutex m_loadMutex;
|
||||
};
|
||||
|
@ -506,7 +506,7 @@ public:
|
|||
* a library table, this formatting is handled for you.
|
||||
* </p>
|
||||
*/
|
||||
static PROPERTIES* ParseOptions( const std::string& aOptionsList );
|
||||
static STRING_UTF8_MAP* ParseOptions( const std::string& aOptionsList );
|
||||
|
||||
/**
|
||||
* Returns a list of options from the aProperties parameter.
|
||||
|
@ -518,7 +518,7 @@ public:
|
|||
* @param aProperties is the PROPERTIES to format or NULL. If NULL the returned
|
||||
* string will be empty.
|
||||
*/
|
||||
static UTF8 FormatOptions( const PROPERTIES* aProperties );
|
||||
static UTF8 FormatOptions( const STRING_UTF8_MAP* aProperties );
|
||||
|
||||
protected:
|
||||
/**
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
* A name/value tuple with unique names and optional values. The names
|
||||
* may be iterated alphabetically.
|
||||
*/
|
||||
class PROPERTIES : public std::map< std::string, UTF8 >
|
||||
class STRING_UTF8_MAP : public std::map< std::string, UTF8 >
|
||||
{
|
||||
public:
|
||||
bool Clear( const std::string& aProperty )
|
|
@ -79,7 +79,9 @@ public:
|
|||
if( m_choices.size() )
|
||||
{
|
||||
unsigned int row = 0;
|
||||
for( PROPERTIES::const_iterator it = m_choices.begin(); it != m_choices.end(); ++it, ++row )
|
||||
|
||||
for( STRING_UTF8_MAP::const_iterator it = m_choices.begin(); it != m_choices.end();
|
||||
++it, ++row )
|
||||
{
|
||||
wxString item = FROM_UTF8( it->first.c_str() );
|
||||
|
||||
|
@ -113,7 +115,7 @@ public:
|
|||
// Fill the grid with existing aOptions
|
||||
string options = TO_UTF8( m_callers_options );
|
||||
|
||||
PROPERTIES* props = LIB_TABLE::ParseOptions( options );
|
||||
STRING_UTF8_MAP* props = LIB_TABLE::ParseOptions( options );
|
||||
|
||||
if( props )
|
||||
{
|
||||
|
@ -121,7 +123,9 @@ public:
|
|||
m_grid->AppendRows( props->size() - m_grid->GetNumberRows() );
|
||||
|
||||
int row = 0;
|
||||
for( PROPERTIES::const_iterator it = props->begin(); it != props->end(); ++it, ++row )
|
||||
|
||||
for( STRING_UTF8_MAP::const_iterator it = props->begin(); it != props->end();
|
||||
++it, ++row )
|
||||
{
|
||||
m_grid->SetCellValue( row, 0, FROM_UTF8( it->first.c_str() ) );
|
||||
m_grid->SetCellValue( row, 1, it->second );
|
||||
|
@ -141,7 +145,7 @@ public:
|
|||
if( !DIALOG_SHIM::TransferDataFromWindow() )
|
||||
return false;
|
||||
|
||||
PROPERTIES props;
|
||||
STRING_UTF8_MAP props;
|
||||
const int rowCount = m_grid->GetNumberRows();
|
||||
|
||||
for( int row = 0; row<rowCount; ++row )
|
||||
|
@ -162,7 +166,7 @@ public:
|
|||
private:
|
||||
const wxString& m_callers_options;
|
||||
wxString* m_result;
|
||||
PROPERTIES m_choices;
|
||||
STRING_UTF8_MAP m_choices;
|
||||
wxString m_initial_help;
|
||||
bool m_grid_widths_dirty;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#ifndef __BOARD_EXPORTER_BASE_H
|
||||
#define __BOARD_EXPORTER_BASE_H
|
||||
|
||||
#include <properties.h>
|
||||
#include <string_utf8_map.h>
|
||||
#include <wx/file.h>
|
||||
|
||||
class BOARD;
|
||||
|
@ -67,7 +67,7 @@ public:
|
|||
virtual bool Run() = 0;
|
||||
|
||||
protected:
|
||||
PROPERTIES m_properties;
|
||||
STRING_UTF8_MAP m_properties;
|
||||
BOARD* m_board = nullptr;
|
||||
wxFileName m_outputFilePath;
|
||||
REPORTER* m_reporter = nullptr;
|
||||
|
|
|
@ -704,7 +704,7 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
|||
|
||||
try
|
||||
{
|
||||
PROPERTIES props;
|
||||
STRING_UTF8_MAP props;
|
||||
char xbuf[30];
|
||||
char ybuf[30];
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ IO_MGR::PCB_FILE_T IO_MGR::GuessPluginTypeFromLibPath( const wxString& aLibPath
|
|||
|
||||
|
||||
BOARD* IO_MGR::Load( PCB_FILE_T aFileType, const wxString& aFileName, BOARD* aAppendToMe,
|
||||
const PROPERTIES* aProperties, PROJECT* aProject,
|
||||
const STRING_UTF8_MAP* aProperties, PROJECT* aProject,
|
||||
PROGRESS_REPORTER* aProgressReporter )
|
||||
{
|
||||
// release the PLUGIN even if an exception is thrown.
|
||||
|
@ -176,7 +176,7 @@ BOARD* IO_MGR::Load( PCB_FILE_T aFileType, const wxString& aFileName, BOARD* aAp
|
|||
|
||||
|
||||
void IO_MGR::Save( PCB_FILE_T aFileType, const wxString& aFileName, BOARD* aBoard,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// release the PLUGIN even if an exception is thrown.
|
||||
PLUGIN::RELEASER pi( PluginFind( aFileType ) );
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
class BOARD;
|
||||
class PLUGIN;
|
||||
class FOOTPRINT;
|
||||
class PROPERTIES;
|
||||
class STRING_UTF8_MAP;
|
||||
class PROJECT;
|
||||
class PROGRESS_REPORTER;
|
||||
|
||||
|
@ -210,7 +210,7 @@ public:
|
|||
* be loaded.
|
||||
*/
|
||||
static BOARD* Load( PCB_FILE_T aFileType, const wxString& aFileName,
|
||||
BOARD* aAppendToMe = nullptr, const PROPERTIES* aProperties = nullptr,
|
||||
BOARD* aAppendToMe = nullptr, const STRING_UTF8_MAP* aProperties = nullptr,
|
||||
PROJECT* aProject = nullptr,
|
||||
PROGRESS_REPORTER* aProgressReporter = nullptr );
|
||||
|
||||
|
@ -234,7 +234,7 @@ public:
|
|||
* @throw IO_ERROR if there is a problem saving or exporting.
|
||||
*/
|
||||
static void Save( PCB_FILE_T aFileType, const wxString& aFileName, BOARD* aBoard,
|
||||
const PROPERTIES* aProperties = nullptr );
|
||||
const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
};
|
||||
|
||||
|
||||
|
@ -316,7 +316,7 @@ public:
|
|||
* possible.
|
||||
*/
|
||||
virtual BOARD* Load( const wxString& aFileName, BOARD* aAppendToMe,
|
||||
const PROPERTIES* aProperties = nullptr, PROJECT* aProject = nullptr,
|
||||
const STRING_UTF8_MAP* aProperties = nullptr, PROJECT* aProject = nullptr,
|
||||
PROGRESS_REPORTER* aProgressReporter = nullptr );
|
||||
|
||||
/**
|
||||
|
@ -348,7 +348,7 @@ public:
|
|||
* @throw IO_ERROR if there is a problem saving or exporting.
|
||||
*/
|
||||
virtual void Save( const wxString& aFileName, BOARD* aBoard,
|
||||
const PROPERTIES* aProperties = nullptr );
|
||||
const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
|
||||
/**
|
||||
* Return a list of footprint names contained within the library at @a aLibraryPath.
|
||||
|
@ -365,7 +365,7 @@ public:
|
|||
* @throw IO_ERROR if the library cannot be found, or footprint cannot be loaded.
|
||||
*/
|
||||
virtual void FootprintEnumerate( wxArrayString& aFootprintNames, const wxString& aLibraryPath,
|
||||
bool aBestEfforts, const PROPERTIES* aProperties = nullptr );
|
||||
bool aBestEfforts, const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
|
||||
/**
|
||||
* Generate a timestamp representing all the files in the library (including the library
|
||||
|
@ -393,7 +393,7 @@ public:
|
|||
* @throw IO_ERROR if there is an error prefetching the library.
|
||||
*/
|
||||
virtual void PrefetchLib( const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties = nullptr );
|
||||
const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
|
||||
/**
|
||||
* Load a footprint having @a aFootprintName from the @a aLibraryPath containing a library
|
||||
|
@ -419,7 +419,7 @@ public:
|
|||
virtual FOOTPRINT* FootprintLoad( const wxString& aLibraryPath,
|
||||
const wxString& aFootprintName,
|
||||
bool aKeepUUID = false,
|
||||
const PROPERTIES* aProperties = nullptr );
|
||||
const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
|
||||
/**
|
||||
* A version of FootprintLoad() for use after FootprintEnumerate() for more efficient
|
||||
|
@ -427,13 +427,13 @@ public:
|
|||
*/
|
||||
virtual const FOOTPRINT* GetEnumeratedFootprint( const wxString& aLibraryPath,
|
||||
const wxString& aFootprintName,
|
||||
const PROPERTIES* aProperties = nullptr );
|
||||
const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
|
||||
/**
|
||||
* Check for the existence of a footprint.
|
||||
*/
|
||||
virtual bool FootprintExists( const wxString& aLibraryPath, const wxString& aFootprintName,
|
||||
const PROPERTIES* aProperties = nullptr );
|
||||
const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
|
||||
/**
|
||||
* Write @a aFootprint to an existing library located at @a aLibraryPath.
|
||||
|
@ -452,7 +452,7 @@ public:
|
|||
* @throw IO_ERROR if there is a problem saving.
|
||||
*/
|
||||
virtual void FootprintSave( const wxString& aLibraryPath, const FOOTPRINT* aFootprint,
|
||||
const PROPERTIES* aProperties = nullptr );
|
||||
const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
|
||||
/**
|
||||
* Delete @a aFootprintName from the library at @a aLibraryPath.
|
||||
|
@ -469,7 +469,7 @@ public:
|
|||
* @throw IO_ERROR if there is a problem finding the footprint or the library, or deleting it.
|
||||
*/
|
||||
virtual void FootprintDelete( const wxString& aLibraryPath, const wxString& aFootprintName,
|
||||
const PROPERTIES* aProperties = nullptr );
|
||||
const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
|
||||
/**
|
||||
* Create a new empty footprint library at @a aLibraryPath empty.
|
||||
|
@ -488,7 +488,7 @@ public:
|
|||
* @throw IO_ERROR if there is a problem finding the library, or creating it.
|
||||
*/
|
||||
virtual void FootprintLibCreate( const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties = nullptr );
|
||||
const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
|
||||
/**
|
||||
* Delete an existing footprint library and returns true, or if library does not
|
||||
|
@ -507,7 +507,7 @@ public:
|
|||
* @throw IO_ERROR if there is a problem deleting an existing library.
|
||||
*/
|
||||
virtual bool FootprintLibDelete( const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties = nullptr );
|
||||
const STRING_UTF8_MAP* aProperties = nullptr );
|
||||
|
||||
/**
|
||||
* Return true if the library at @a aLibraryPath is writable.
|
||||
|
@ -548,7 +548,7 @@ public:
|
|||
* This would require a 3 column list, and introducing wx GUI knowledge to
|
||||
* PLUGIN, which has been avoided to date.
|
||||
*/
|
||||
virtual void FootprintLibOptions( PROPERTIES* aListToAppendTo ) const;
|
||||
virtual void FootprintLibOptions( STRING_UTF8_MAP* aListToAppendTo ) const;
|
||||
|
||||
virtual ~PLUGIN()
|
||||
{
|
||||
|
|
|
@ -350,7 +350,7 @@ BOARD_ITEM* CLIPBOARD_IO::Parse()
|
|||
|
||||
|
||||
void CLIPBOARD_IO::Save( const wxString& aFileName, BOARD* aBoard,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
init( aProperties );
|
||||
|
||||
|
@ -395,7 +395,7 @@ void CLIPBOARD_IO::Save( const wxString& aFileName, BOARD* aBoard,
|
|||
|
||||
|
||||
BOARD* CLIPBOARD_IO::Load( const wxString& aFileName, BOARD* aAppendToMe,
|
||||
const PROPERTIES* aProperties, PROJECT* aProject,
|
||||
const STRING_UTF8_MAP* aProperties, PROJECT* aProject,
|
||||
PROGRESS_REPORTER* aProgressReporter )
|
||||
{
|
||||
std::string result;
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
* Saves the entire board to the clipboard formatted using the PCB_PLUGIN formatting
|
||||
*/
|
||||
void Save( const wxString& aFileName, BOARD* aBoard,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
/*
|
||||
* Write all the settings of the BOARD* set by setBoard() and then adds all the
|
||||
|
@ -59,7 +59,7 @@ public:
|
|||
BOARD_ITEM* Parse();
|
||||
|
||||
BOARD* Load( const wxString& aFileName, BOARD* aAppendToMe,
|
||||
const PROPERTIES* aProperties = nullptr, PROJECT* aProject = nullptr,
|
||||
const STRING_UTF8_MAP* aProperties = nullptr, PROJECT* aProject = nullptr,
|
||||
PROGRESS_REPORTER* aProgressReporter = nullptr ) override;
|
||||
|
||||
void SetBoard( BOARD* aBoard );
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
|
||||
#include <io_mgr.h>
|
||||
#include <properties.h>
|
||||
#include <string_utf8_map.h>
|
||||
#include <wx/translation.h>
|
||||
|
||||
|
||||
|
@ -43,7 +43,7 @@ static void not_implemented( PLUGIN* aPlugin, const char* aCaller )
|
|||
}
|
||||
|
||||
|
||||
BOARD* PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe, const PROPERTIES* aProperties,
|
||||
BOARD* PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe, const STRING_UTF8_MAP* aProperties,
|
||||
PROJECT* aProject, PROGRESS_REPORTER* aProgressReporter )
|
||||
{
|
||||
not_implemented( this, __FUNCTION__ );
|
||||
|
@ -57,7 +57,7 @@ std::vector<FOOTPRINT*> PLUGIN::GetImportedCachedLibraryFootprints()
|
|||
return std::vector<FOOTPRINT*>();
|
||||
}
|
||||
|
||||
void PLUGIN::Save( const wxString& aFileName, BOARD* aBoard, const PROPERTIES* aProperties )
|
||||
void PLUGIN::Save( const wxString& aFileName, BOARD* aBoard, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// not pure virtual so that plugins only have to implement subset of the PLUGIN interface.
|
||||
not_implemented( this, __FUNCTION__ );
|
||||
|
@ -65,21 +65,21 @@ void PLUGIN::Save( const wxString& aFileName, BOARD* aBoard, const PROPERTIES* a
|
|||
|
||||
|
||||
void PLUGIN::FootprintEnumerate( wxArrayString& aFootprintNames, const wxString& aLibraryPath,
|
||||
bool aBestEfforts, const PROPERTIES* aProperties )
|
||||
bool aBestEfforts, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// not pure virtual so that plugins only have to implement subset of the PLUGIN interface.
|
||||
not_implemented( this, __FUNCTION__ );
|
||||
}
|
||||
|
||||
|
||||
void PLUGIN::PrefetchLib( const wxString&, const PROPERTIES* )
|
||||
void PLUGIN::PrefetchLib( const wxString&, const STRING_UTF8_MAP* )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
const FOOTPRINT* PLUGIN::GetEnumeratedFootprint( const wxString& aLibraryPath,
|
||||
const wxString& aFootprintName,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// default implementation
|
||||
return FootprintLoad( aLibraryPath, aFootprintName, false, aProperties );
|
||||
|
@ -87,7 +87,7 @@ const FOOTPRINT* PLUGIN::GetEnumeratedFootprint( const wxString& aLibraryPath,
|
|||
|
||||
|
||||
bool PLUGIN::FootprintExists( const wxString& aLibraryPath, const wxString& aFootprintName,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// default implementation
|
||||
return FootprintLoad( aLibraryPath, aFootprintName, true, aProperties ) != nullptr;
|
||||
|
@ -95,7 +95,7 @@ bool PLUGIN::FootprintExists( const wxString& aLibraryPath, const wxString& aFoo
|
|||
|
||||
|
||||
FOOTPRINT* PLUGIN::FootprintLoad( const wxString& aLibraryPath, const wxString& aFootprintName,
|
||||
bool aKeepUUID, const PROPERTIES* aProperties )
|
||||
bool aKeepUUID, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// not pure virtual so that plugins only have to implement subset of the PLUGIN interface.
|
||||
not_implemented( this, __FUNCTION__ );
|
||||
|
@ -104,7 +104,7 @@ FOOTPRINT* PLUGIN::FootprintLoad( const wxString& aLibraryPath, const wxString&
|
|||
|
||||
|
||||
void PLUGIN::FootprintSave( const wxString& aLibraryPath, const FOOTPRINT* aFootprint,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// not pure virtual so that plugins only have to implement subset of the PLUGIN interface.
|
||||
not_implemented( this, __FUNCTION__ );
|
||||
|
@ -112,21 +112,21 @@ void PLUGIN::FootprintSave( const wxString& aLibraryPath, const FOOTPRINT* aFoot
|
|||
|
||||
|
||||
void PLUGIN::FootprintDelete( const wxString& aLibraryPath, const wxString& aFootprintName,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// not pure virtual so that plugins only have to implement subset of the PLUGIN interface.
|
||||
not_implemented( this, __FUNCTION__ );
|
||||
}
|
||||
|
||||
|
||||
void PLUGIN::FootprintLibCreate( const wxString& aLibraryPath, const PROPERTIES* aProperties )
|
||||
void PLUGIN::FootprintLibCreate( const wxString& aLibraryPath, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// not pure virtual so that plugins only have to implement subset of the PLUGIN interface.
|
||||
not_implemented( this, __FUNCTION__ );
|
||||
}
|
||||
|
||||
|
||||
bool PLUGIN::FootprintLibDelete( const wxString& aLibraryPath, const PROPERTIES* aProperties )
|
||||
bool PLUGIN::FootprintLibDelete( const wxString& aLibraryPath, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// not pure virtual so that plugins only have to implement subset of the PLUGIN interface.
|
||||
not_implemented( this, __FUNCTION__ );
|
||||
|
@ -142,7 +142,7 @@ bool PLUGIN::IsFootprintLibWritable( const wxString& aLibraryPath )
|
|||
}
|
||||
|
||||
|
||||
void PLUGIN::FootprintLibOptions( PROPERTIES* aListToAppendTo ) const
|
||||
void PLUGIN::FootprintLibOptions( STRING_UTF8_MAP* aListToAppendTo ) const
|
||||
{
|
||||
// disable all these in another couple of months, after everyone has seen them:
|
||||
#if 1
|
||||
|
|
|
@ -63,7 +63,7 @@ const wxString ALTIUM_CIRCUIT_MAKER_PLUGIN::GetFileExtension() const
|
|||
|
||||
|
||||
BOARD* ALTIUM_CIRCUIT_MAKER_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe,
|
||||
const PROPERTIES* aProperties, PROJECT* aProject,
|
||||
const STRING_UTF8_MAP* aProperties, PROJECT* aProject,
|
||||
PROGRESS_REPORTER* aProgressReporter )
|
||||
{
|
||||
m_props = aProperties;
|
||||
|
|
|
@ -38,7 +38,7 @@ class ALTIUM_CIRCUIT_MAKER_PLUGIN : public PLUGIN
|
|||
public:
|
||||
const wxString PluginName() const override;
|
||||
|
||||
BOARD* Load( const wxString& aFileName, BOARD* aAppendToMe, const PROPERTIES* aProperties,
|
||||
BOARD* Load( const wxString& aFileName, BOARD* aAppendToMe, const STRING_UTF8_MAP* aProperties,
|
||||
PROJECT* aProject = nullptr,
|
||||
PROGRESS_REPORTER* aProgressReporter = nullptr ) override;
|
||||
|
||||
|
@ -54,7 +54,7 @@ public:
|
|||
~ALTIUM_CIRCUIT_MAKER_PLUGIN();
|
||||
|
||||
private:
|
||||
const PROPERTIES* m_props;
|
||||
const STRING_UTF8_MAP* m_props;
|
||||
BOARD* m_board;
|
||||
};
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ const wxString ALTIUM_CIRCUIT_STUDIO_PLUGIN::GetFileExtension() const
|
|||
|
||||
|
||||
BOARD* ALTIUM_CIRCUIT_STUDIO_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe,
|
||||
const PROPERTIES* aProperties, PROJECT* aProject,
|
||||
const STRING_UTF8_MAP* aProperties, PROJECT* aProject,
|
||||
PROGRESS_REPORTER* aProgressReporter )
|
||||
{
|
||||
m_props = aProperties;
|
||||
|
|
|
@ -38,7 +38,7 @@ class ALTIUM_CIRCUIT_STUDIO_PLUGIN : public PLUGIN
|
|||
public:
|
||||
const wxString PluginName() const override;
|
||||
|
||||
BOARD* Load( const wxString& aFileName, BOARD* aAppendToMe, const PROPERTIES* aProperties,
|
||||
BOARD* Load( const wxString& aFileName, BOARD* aAppendToMe, const STRING_UTF8_MAP* aProperties,
|
||||
PROJECT* aProject, PROGRESS_REPORTER* aProgressReporter = nullptr ) override;
|
||||
|
||||
const wxString GetFileExtension() const override;
|
||||
|
@ -53,7 +53,7 @@ public:
|
|||
~ALTIUM_CIRCUIT_STUDIO_PLUGIN();
|
||||
|
||||
private:
|
||||
const PROPERTIES* m_props;
|
||||
const STRING_UTF8_MAP* m_props;
|
||||
BOARD* m_board;
|
||||
};
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ const wxString ALTIUM_DESIGNER_PLUGIN::GetFileExtension() const
|
|||
|
||||
|
||||
BOARD* ALTIUM_DESIGNER_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe,
|
||||
const PROPERTIES* aProperties, PROJECT* aProject,
|
||||
const STRING_UTF8_MAP* aProperties, PROJECT* aProject,
|
||||
PROGRESS_REPORTER* aProgressReporter )
|
||||
{
|
||||
m_props = aProperties;
|
||||
|
@ -138,7 +138,7 @@ long long ALTIUM_DESIGNER_PLUGIN::GetLibraryTimestamp( const wxString& aLibraryP
|
|||
|
||||
void ALTIUM_DESIGNER_PLUGIN::FootprintEnumerate( wxArrayString& aFootprintNames,
|
||||
const wxString& aLibraryPath, bool aBestEfforts,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
ALTIUM_COMPOUND_FILE altiumLibFile( aLibraryPath );
|
||||
|
||||
|
@ -186,7 +186,7 @@ void ALTIUM_DESIGNER_PLUGIN::FootprintEnumerate( wxArrayString& aFootprintNames
|
|||
|
||||
FOOTPRINT* ALTIUM_DESIGNER_PLUGIN::FootprintLoad( const wxString& aLibraryPath,
|
||||
const wxString& aFootprintName, bool aKeepUUID,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
ALTIUM_COMPOUND_FILE altiumLibFile( aLibraryPath );
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
|
||||
const wxString PluginName() const override;
|
||||
|
||||
BOARD* Load( const wxString& aFileName, BOARD* aAppendToMe, const PROPERTIES* aProperties,
|
||||
BOARD* Load( const wxString& aFileName, BOARD* aAppendToMe, const STRING_UTF8_MAP* aProperties,
|
||||
PROJECT* aProject = nullptr,
|
||||
PROGRESS_REPORTER* aProgressReporter = nullptr ) override;
|
||||
|
||||
|
@ -49,11 +49,11 @@ public:
|
|||
long long GetLibraryTimestamp( const wxString& aLibraryPath ) const override;
|
||||
|
||||
void FootprintEnumerate( wxArrayString& aFootprintNames, const wxString& aLibraryPath,
|
||||
bool aBestEfforts, const PROPERTIES* aProperties = nullptr ) override;
|
||||
bool aBestEfforts, const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
FOOTPRINT* FootprintLoad( const wxString& aLibraryPath, const wxString& aFootprintName,
|
||||
bool aKeepUUID = false,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
//bool FootprintExists( const wxString& aLibraryPath, const wxString& aFootprintName, const PROPERTIES* aProperties = nullptr );
|
||||
|
||||
|
@ -65,7 +65,7 @@ public:
|
|||
~ALTIUM_DESIGNER_PLUGIN();
|
||||
|
||||
private:
|
||||
const PROPERTIES* m_props;
|
||||
const STRING_UTF8_MAP* m_props;
|
||||
BOARD* m_board;
|
||||
};
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include <cadstar_pcb_archive_plugin.h>
|
||||
#include <board.h>
|
||||
#include <footprint.h>
|
||||
#include <properties.h>
|
||||
#include <string_utf8_map.h>
|
||||
|
||||
|
||||
std::map<wxString, PCB_LAYER_ID> CADSTAR_PCB_ARCHIVE_PLUGIN::DefaultLayerMappingCallback(
|
||||
|
@ -106,7 +106,7 @@ std::vector<FOOTPRINT*> CADSTAR_PCB_ARCHIVE_PLUGIN::GetImportedCachedLibraryFoot
|
|||
|
||||
|
||||
BOARD* CADSTAR_PCB_ARCHIVE_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe,
|
||||
const PROPERTIES* aProperties, PROJECT* aProject,
|
||||
const STRING_UTF8_MAP* aProperties, PROJECT* aProject,
|
||||
PROGRESS_REPORTER* aProgressReporter )
|
||||
{
|
||||
m_props = aProperties;
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
const wxString PluginName() const override;
|
||||
|
||||
BOARD* Load( const wxString& aFileName, BOARD* aAppendToMe,
|
||||
const PROPERTIES* aProperties = nullptr, PROJECT* aProject = nullptr,
|
||||
const STRING_UTF8_MAP* aProperties = nullptr, PROJECT* aProject = nullptr,
|
||||
PROGRESS_REPORTER* aProgressReporter = nullptr ) override;
|
||||
|
||||
const wxString GetFileExtension() const override;
|
||||
|
@ -74,7 +74,7 @@ public:
|
|||
private:
|
||||
void clearLoadedFootprints();
|
||||
|
||||
const PROPERTIES* m_props;
|
||||
const STRING_UTF8_MAP* m_props;
|
||||
BOARD* m_board;
|
||||
std::vector<FOOTPRINT*> m_loaded_footprints;
|
||||
bool m_show_layer_mapping_warnings;
|
||||
|
|
|
@ -64,7 +64,7 @@ Load() TODO's
|
|||
#include <geometry/geometry_utils.h>
|
||||
#include <string_utils.h>
|
||||
#include <locale_io.h>
|
||||
#include <properties.h>
|
||||
#include <string_utf8_map.h>
|
||||
#include <trigo.h>
|
||||
#include <math/util.h> // for KiROUND
|
||||
#include <progress_reporter.h>
|
||||
|
@ -358,7 +358,7 @@ wxSize inline EAGLE_PLUGIN::kicad_fontz( const ECOORD& d, int aTextThickness ) c
|
|||
|
||||
|
||||
BOARD* EAGLE_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe,
|
||||
const PROPERTIES* aProperties, PROJECT* aProject,
|
||||
const STRING_UTF8_MAP* aProperties, PROJECT* aProject,
|
||||
PROGRESS_REPORTER* aProgressReporter )
|
||||
{
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
|
@ -501,7 +501,7 @@ std::vector<FOOTPRINT*> EAGLE_PLUGIN::GetImportedCachedLibraryFootprints()
|
|||
}
|
||||
|
||||
|
||||
void EAGLE_PLUGIN::init( const PROPERTIES* aProperties )
|
||||
void EAGLE_PLUGIN::init( const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
m_hole_count = 0;
|
||||
m_min_trace = 0;
|
||||
|
@ -3231,7 +3231,7 @@ void EAGLE_PLUGIN::cacheLib( const wxString& aLibPath )
|
|||
|
||||
|
||||
void EAGLE_PLUGIN::FootprintEnumerate( wxArrayString& aFootprintNames, const wxString& aLibraryPath,
|
||||
bool aBestEfforts, const PROPERTIES* aProperties )
|
||||
bool aBestEfforts, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxString errorMsg;
|
||||
|
||||
|
@ -3259,7 +3259,7 @@ void EAGLE_PLUGIN::FootprintEnumerate( wxArrayString& aFootprintNames, const wxS
|
|||
|
||||
FOOTPRINT* EAGLE_PLUGIN::FootprintLoad( const wxString& aLibraryPath,
|
||||
const wxString& aFootprintName, bool aKeepUUID,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
init( aProperties );
|
||||
cacheLib( aLibraryPath );
|
||||
|
@ -3275,7 +3275,7 @@ FOOTPRINT* EAGLE_PLUGIN::FootprintLoad( const wxString& aLibraryPath,
|
|||
}
|
||||
|
||||
|
||||
void EAGLE_PLUGIN::FootprintLibOptions( PROPERTIES* aListToAppendTo ) const
|
||||
void EAGLE_PLUGIN::FootprintLibOptions( STRING_UTF8_MAP* aListToAppendTo ) const
|
||||
{
|
||||
PLUGIN::FootprintLibOptions( aListToAppendTo );
|
||||
}
|
||||
|
|
|
@ -132,7 +132,7 @@ public:
|
|||
const wxString PluginName() const override;
|
||||
|
||||
BOARD* Load( const wxString& aFileName, BOARD* aAppendToMe,
|
||||
const PROPERTIES* aProperties = nullptr, PROJECT* aProject = nullptr,
|
||||
const STRING_UTF8_MAP* aProperties = nullptr, PROJECT* aProject = nullptr,
|
||||
PROGRESS_REPORTER* aProgressReporter = nullptr ) override;
|
||||
|
||||
std::vector<FOOTPRINT*> GetImportedCachedLibraryFootprints() override;
|
||||
|
@ -140,11 +140,11 @@ public:
|
|||
const wxString GetFileExtension() const override;
|
||||
|
||||
void FootprintEnumerate( wxArrayString& aFootprintNames, const wxString& aLibraryPath,
|
||||
bool aBestEfforts, const PROPERTIES* aProperties = nullptr) override;
|
||||
bool aBestEfforts, const STRING_UTF8_MAP* aProperties = nullptr) override;
|
||||
|
||||
FOOTPRINT* FootprintLoad( const wxString& aLibraryPath, const wxString& aFootprintName,
|
||||
bool aKeepUUID = false,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
long long GetLibraryTimestamp( const wxString& aLibraryPath ) const override
|
||||
{
|
||||
|
@ -156,7 +156,7 @@ public:
|
|||
return false; // until someone writes others like FootprintSave(), etc.
|
||||
}
|
||||
|
||||
void FootprintLibOptions( PROPERTIES* aProperties ) const override;
|
||||
void FootprintLibOptions( STRING_UTF8_MAP* aProperties ) const override;
|
||||
|
||||
typedef int BIU;
|
||||
|
||||
|
@ -178,7 +178,7 @@ public:
|
|||
|
||||
private:
|
||||
/// initialize PLUGIN like a constructor would, and futz with fresh BOARD if needed.
|
||||
void init( const PROPERTIES* aProperties );
|
||||
void init( const STRING_UTF8_MAP* aProperties );
|
||||
|
||||
void checkpoint();
|
||||
|
||||
|
@ -332,7 +332,7 @@ private:
|
|||
///< lookup key is either libname.packagename or simply
|
||||
///< packagename if FootprintLoad() or FootprintEnumberate()
|
||||
|
||||
const PROPERTIES* m_props; ///< passed via Save() or Load(), no ownership, may be NULL.
|
||||
const STRING_UTF8_MAP* m_props; ///< passed via Save() or Load(), no ownership, may be NULL.
|
||||
BOARD* m_board; ///< which BOARD is being worked on, no ownership here
|
||||
|
||||
PROGRESS_REPORTER* m_progressReporter; ///< optional; may be nullptr
|
||||
|
|
|
@ -59,7 +59,7 @@ const wxString FABMASTER_PLUGIN::GetFileExtension() const
|
|||
|
||||
|
||||
BOARD* FABMASTER_PLUGIN::Load( const wxString &aFileName, BOARD *aAppendToMe,
|
||||
const PROPERTIES *aProperties, PROJECT *aProject,
|
||||
const STRING_UTF8_MAP* aProperties, PROJECT *aProject,
|
||||
PROGRESS_REPORTER* aProgressReporter )
|
||||
{
|
||||
m_props = aProperties;
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
const wxString PluginName() const override;
|
||||
|
||||
BOARD* Load( const wxString& aFileName, BOARD* aAppendToMe,
|
||||
const PROPERTIES* aProperties = nullptr, PROJECT* aProject = nullptr,
|
||||
const STRING_UTF8_MAP* aProperties = nullptr, PROJECT* aProject = nullptr,
|
||||
PROGRESS_REPORTER* aProgressReporter = nullptr ) override;
|
||||
|
||||
const wxString GetFileExtension() const override;
|
||||
|
@ -54,7 +54,7 @@ public:
|
|||
~FABMASTER_PLUGIN();
|
||||
|
||||
private:
|
||||
const PROPERTIES* m_props;
|
||||
const STRING_UTF8_MAP* m_props;
|
||||
BOARD* m_board;
|
||||
|
||||
FABMASTER m_fabmaster;
|
||||
|
|
|
@ -853,7 +853,7 @@ GPCB_PLUGIN::~GPCB_PLUGIN()
|
|||
}
|
||||
|
||||
|
||||
void GPCB_PLUGIN::init( const PROPERTIES* aProperties )
|
||||
void GPCB_PLUGIN::init( const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
m_props = aProperties;
|
||||
}
|
||||
|
@ -872,7 +872,7 @@ void GPCB_PLUGIN::validateCache( const wxString& aLibraryPath, bool checkModifie
|
|||
|
||||
|
||||
void GPCB_PLUGIN::FootprintEnumerate( wxArrayString& aFootprintNames, const wxString& aLibraryPath,
|
||||
bool aBestEfforts, const PROPERTIES* aProperties )
|
||||
bool aBestEfforts, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
wxDir dir( aLibraryPath );
|
||||
|
@ -913,7 +913,7 @@ void GPCB_PLUGIN::FootprintEnumerate( wxArrayString& aFootprintNames, const wxSt
|
|||
|
||||
const FOOTPRINT* GPCB_PLUGIN::getFootprint( const wxString& aLibraryPath,
|
||||
const wxString& aFootprintName,
|
||||
const PROPERTIES* aProperties,
|
||||
const STRING_UTF8_MAP* aProperties,
|
||||
bool checkModified )
|
||||
{
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
|
@ -935,7 +935,7 @@ const FOOTPRINT* GPCB_PLUGIN::getFootprint( const wxString& aLibraryPath,
|
|||
|
||||
const FOOTPRINT* GPCB_PLUGIN::GetEnumeratedFootprint( const wxString& aLibraryPath,
|
||||
const wxString& aFootprintName,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
return getFootprint( aLibraryPath, aFootprintName, aProperties, false );
|
||||
}
|
||||
|
@ -944,7 +944,7 @@ const FOOTPRINT* GPCB_PLUGIN::GetEnumeratedFootprint( const wxString& aLibraryPa
|
|||
FOOTPRINT* GPCB_PLUGIN::FootprintLoad( const wxString& aLibraryPath,
|
||||
const wxString& aFootprintName,
|
||||
bool aKeepUUID,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
const FOOTPRINT* footprint = getFootprint( aLibraryPath, aFootprintName, aProperties, true );
|
||||
|
||||
|
@ -960,7 +960,7 @@ FOOTPRINT* GPCB_PLUGIN::FootprintLoad( const wxString& aLibraryPath,
|
|||
|
||||
|
||||
void GPCB_PLUGIN::FootprintDelete( const wxString& aLibraryPath, const wxString& aFootprintName,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
|
||||
|
@ -978,7 +978,7 @@ void GPCB_PLUGIN::FootprintDelete( const wxString& aLibraryPath, const wxString&
|
|||
}
|
||||
|
||||
|
||||
bool GPCB_PLUGIN::FootprintLibDelete( const wxString& aLibraryPath, const PROPERTIES* aProperties )
|
||||
bool GPCB_PLUGIN::FootprintLibDelete( const wxString& aLibraryPath, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxFileName fn;
|
||||
fn.SetPath( aLibraryPath );
|
||||
|
|
|
@ -58,21 +58,21 @@ public:
|
|||
|
||||
void FootprintEnumerate( wxArrayString& aFootprintNames, const wxString& aLibraryPath,
|
||||
bool aBestEfforts,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
const FOOTPRINT* GetEnumeratedFootprint( const wxString& aLibraryPath,
|
||||
const wxString& aFootprintName,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
FOOTPRINT* FootprintLoad( const wxString& aLibraryPath, const wxString& aFootprintName,
|
||||
bool aKeepUUID = false,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
void FootprintDelete( const wxString& aLibraryPath, const wxString& aFootprintName,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
bool FootprintLibDelete( const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
long long GetLibraryTimestamp( const wxString& aLibraryPath ) const override;
|
||||
|
||||
|
@ -90,15 +90,15 @@ private:
|
|||
void validateCache( const wxString& aLibraryPath, bool checkModified = true );
|
||||
|
||||
const FOOTPRINT* getFootprint( const wxString& aLibraryPath, const wxString& aFootprintName,
|
||||
const PROPERTIES* aProperties, bool checkModified );
|
||||
const STRING_UTF8_MAP* aProperties, bool checkModified );
|
||||
|
||||
void init( const PROPERTIES* aProperties );
|
||||
void init( const STRING_UTF8_MAP* aProperties );
|
||||
|
||||
friend class GPCB_FPL_CACHE;
|
||||
|
||||
protected:
|
||||
wxString m_error; ///< for throwing exceptions
|
||||
const PROPERTIES* m_props; ///< passed via Save() or Load(), no ownership, may be NULL.
|
||||
const STRING_UTF8_MAP* m_props; ///< passed via Save() or Load(), no ownership, may be NULL.
|
||||
GPCB_FPL_CACHE* m_cache; ///< Footprint library cache.
|
||||
int m_ctl;
|
||||
LINE_READER* m_reader; ///< no ownership here.
|
||||
|
|
|
@ -339,7 +339,7 @@ long long FP_CACHE::GetTimestamp( const wxString& aLibPath )
|
|||
}
|
||||
|
||||
|
||||
void PCB_PLUGIN::Save( const wxString& aFileName, BOARD* aBoard, const PROPERTIES* aProperties )
|
||||
void PCB_PLUGIN::Save( const wxString& aFileName, BOARD* aBoard, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
|
||||
|
@ -2435,7 +2435,7 @@ PCB_PLUGIN::~PCB_PLUGIN()
|
|||
|
||||
|
||||
BOARD* PCB_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe,
|
||||
const PROPERTIES* aProperties, PROJECT* aProject,
|
||||
const STRING_UTF8_MAP* aProperties, PROJECT* aProject,
|
||||
PROGRESS_REPORTER* aProgressReporter )
|
||||
{
|
||||
FILE_LINE_READER reader( aFileName );
|
||||
|
@ -2465,7 +2465,7 @@ BOARD* PCB_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe,
|
|||
}
|
||||
|
||||
|
||||
BOARD* PCB_PLUGIN::DoLoad( LINE_READER& aReader, BOARD* aAppendToMe, const PROPERTIES* aProperties,
|
||||
BOARD* PCB_PLUGIN::DoLoad( LINE_READER& aReader, BOARD* aAppendToMe, const STRING_UTF8_MAP* aProperties,
|
||||
PROGRESS_REPORTER* aProgressReporter, unsigned aLineCount)
|
||||
{
|
||||
init( aProperties );
|
||||
|
@ -2501,7 +2501,7 @@ BOARD* PCB_PLUGIN::DoLoad( LINE_READER& aReader, BOARD* aAppendToMe, const PROPE
|
|||
}
|
||||
|
||||
|
||||
void PCB_PLUGIN::init( const PROPERTIES* aProperties )
|
||||
void PCB_PLUGIN::init( const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
m_board = nullptr;
|
||||
m_reader = nullptr;
|
||||
|
@ -2522,7 +2522,7 @@ void PCB_PLUGIN::validateCache( const wxString& aLibraryPath, bool checkModified
|
|||
|
||||
|
||||
void PCB_PLUGIN::FootprintEnumerate( wxArrayString& aFootprintNames, const wxString& aLibPath,
|
||||
bool aBestEfforts, const PROPERTIES* aProperties )
|
||||
bool aBestEfforts, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
wxDir dir( aLibPath );
|
||||
|
@ -2552,7 +2552,7 @@ void PCB_PLUGIN::FootprintEnumerate( wxArrayString& aFootprintNames, const wxStr
|
|||
|
||||
const FOOTPRINT* PCB_PLUGIN::getFootprint( const wxString& aLibraryPath,
|
||||
const wxString& aFootprintName,
|
||||
const PROPERTIES* aProperties,
|
||||
const STRING_UTF8_MAP* aProperties,
|
||||
bool checkModified )
|
||||
{
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
|
@ -2580,14 +2580,14 @@ const FOOTPRINT* PCB_PLUGIN::getFootprint( const wxString& aLibraryPath,
|
|||
|
||||
const FOOTPRINT* PCB_PLUGIN::GetEnumeratedFootprint( const wxString& aLibraryPath,
|
||||
const wxString& aFootprintName,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
return getFootprint( aLibraryPath, aFootprintName, aProperties, false );
|
||||
}
|
||||
|
||||
|
||||
bool PCB_PLUGIN::FootprintExists( const wxString& aLibraryPath, const wxString& aFootprintName,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// Note: checking the cache sounds like a good idea, but won't catch files which differ
|
||||
// only in case.
|
||||
|
@ -2605,7 +2605,7 @@ bool PCB_PLUGIN::FootprintExists( const wxString& aLibraryPath, const wxString&
|
|||
FOOTPRINT* PCB_PLUGIN::FootprintLoad( const wxString& aLibraryPath,
|
||||
const wxString& aFootprintName,
|
||||
bool aKeepUUID,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
const FOOTPRINT* footprint = getFootprint( aLibraryPath, aFootprintName, aProperties, true );
|
||||
|
||||
|
@ -2627,7 +2627,7 @@ FOOTPRINT* PCB_PLUGIN::FootprintLoad( const wxString& aLibraryPath,
|
|||
|
||||
|
||||
void PCB_PLUGIN::FootprintSave( const wxString& aLibraryPath, const FOOTPRINT* aFootprint,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
|
||||
|
@ -2721,7 +2721,7 @@ void PCB_PLUGIN::FootprintSave( const wxString& aLibraryPath, const FOOTPRINT* a
|
|||
|
||||
|
||||
void PCB_PLUGIN::FootprintDelete( const wxString& aLibraryPath, const wxString& aFootprintName,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
|
||||
|
@ -2746,7 +2746,7 @@ long long PCB_PLUGIN::GetLibraryTimestamp( const wxString& aLibraryPath ) const
|
|||
}
|
||||
|
||||
|
||||
void PCB_PLUGIN::FootprintLibCreate( const wxString& aLibraryPath, const PROPERTIES* aProperties )
|
||||
void PCB_PLUGIN::FootprintLibCreate( const wxString& aLibraryPath, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
if( wxDir::Exists( aLibraryPath ) )
|
||||
{
|
||||
|
@ -2764,7 +2764,7 @@ void PCB_PLUGIN::FootprintLibCreate( const wxString& aLibraryPath, const PROPERT
|
|||
}
|
||||
|
||||
|
||||
bool PCB_PLUGIN::FootprintLibDelete( const wxString& aLibraryPath, const PROPERTIES* aProperties )
|
||||
bool PCB_PLUGIN::FootprintLibDelete( const wxString& aLibraryPath, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxFileName fn;
|
||||
fn.SetPath( aLibraryPath );
|
||||
|
|
|
@ -190,42 +190,42 @@ public:
|
|||
}
|
||||
|
||||
void Save( const wxString& aFileName, BOARD* aBoard,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
BOARD* Load( const wxString& aFileName, BOARD* aAppendToMe,
|
||||
const PROPERTIES* aProperties = nullptr, PROJECT* aProject = nullptr,
|
||||
const STRING_UTF8_MAP* aProperties = nullptr, PROJECT* aProject = nullptr,
|
||||
PROGRESS_REPORTER* aProgressReporter = nullptr ) override;
|
||||
|
||||
BOARD* DoLoad( LINE_READER& aReader, BOARD* aAppendToMe, const PROPERTIES* aProperties,
|
||||
BOARD* DoLoad( LINE_READER& aReader, BOARD* aAppendToMe, const STRING_UTF8_MAP* aProperties,
|
||||
PROGRESS_REPORTER* aProgressReporter, unsigned aLineCount );
|
||||
|
||||
void FootprintEnumerate( wxArrayString& aFootprintNames, const wxString& aLibraryPath,
|
||||
bool aBestEfforts, const PROPERTIES* aProperties = nullptr ) override;
|
||||
bool aBestEfforts, const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
const FOOTPRINT* GetEnumeratedFootprint( const wxString& aLibraryPath,
|
||||
const wxString& aFootprintName,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
bool FootprintExists( const wxString& aLibraryPath, const wxString& aFootprintName,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
FOOTPRINT* FootprintLoad( const wxString& aLibraryPath, const wxString& aFootprintName,
|
||||
bool aKeepUUID = false,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
void FootprintSave( const wxString& aLibraryPath, const FOOTPRINT* aFootprint,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
void FootprintDelete( const wxString& aLibraryPath, const wxString& aFootprintName,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
long long GetLibraryTimestamp( const wxString& aLibraryPath ) const override;
|
||||
|
||||
void FootprintLibCreate( const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties = nullptr) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr) override;
|
||||
|
||||
bool FootprintLibDelete( const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
bool IsFootprintLibWritable( const wxString& aLibraryPath ) override;
|
||||
|
||||
|
@ -260,9 +260,9 @@ protected:
|
|||
void validateCache( const wxString& aLibraryPath, bool checkModified = true );
|
||||
|
||||
const FOOTPRINT* getFootprint( const wxString& aLibraryPath, const wxString& aFootprintName,
|
||||
const PROPERTIES* aProperties, bool checkModified );
|
||||
const STRING_UTF8_MAP* aProperties, bool checkModified );
|
||||
|
||||
void init( const PROPERTIES* aProperties );
|
||||
void init( const STRING_UTF8_MAP* aProperties );
|
||||
|
||||
/// formats the board setup information
|
||||
void formatSetup( const BOARD* aBoard, int aNestLevel = 0 ) const;
|
||||
|
@ -325,8 +325,7 @@ protected:
|
|||
wxString m_error; ///< for throwing exceptions
|
||||
BOARD* m_board; ///< which BOARD, no ownership here
|
||||
|
||||
const
|
||||
PROPERTIES* m_props; ///< passed via Save() or Load(), no ownership, may be NULL.
|
||||
const STRING_UTF8_MAP* m_props; ///< passed via Save() or Load(), no ownership, may be NULL.
|
||||
FP_CACHE* m_cache; ///< Footprint library cache.
|
||||
|
||||
LINE_READER* m_reader; ///< no ownership here.
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
#include <string_utils.h>
|
||||
#include <locale_io.h>
|
||||
#include <macros.h>
|
||||
#include <properties.h>
|
||||
#include <string_utf8_map.h>
|
||||
#include <zones.h>
|
||||
|
||||
#include <board.h>
|
||||
|
@ -403,7 +403,7 @@ static inline long hexParse( const char* next, const char** out = nullptr )
|
|||
|
||||
|
||||
BOARD* LEGACY_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe,
|
||||
const PROPERTIES* aProperties, PROJECT* aProject,
|
||||
const STRING_UTF8_MAP* aProperties, PROJECT* aProject,
|
||||
PROGRESS_REPORTER* aProgressReporter )
|
||||
{
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
|
@ -2866,7 +2866,7 @@ EDA_ANGLE LEGACY_PLUGIN::degParse( const char* aValue, const char** nptrptr )
|
|||
}
|
||||
|
||||
|
||||
void LEGACY_PLUGIN::init( const PROPERTIES* aProperties )
|
||||
void LEGACY_PLUGIN::init( const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
m_loading_format_version = 0;
|
||||
m_cu_count = 16;
|
||||
|
@ -3155,7 +3155,7 @@ void LEGACY_PLUGIN::cacheLib( const wxString& aLibraryPath )
|
|||
|
||||
|
||||
void LEGACY_PLUGIN::FootprintEnumerate( wxArrayString& aFootprintNames, const wxString& aLibPath,
|
||||
bool aBestEfforts, const PROPERTIES* aProperties )
|
||||
bool aBestEfforts, const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
wxString errorMsg;
|
||||
|
@ -3184,7 +3184,7 @@ void LEGACY_PLUGIN::FootprintEnumerate( wxArrayString& aFootprintNames, const wx
|
|||
|
||||
FOOTPRINT* LEGACY_PLUGIN::FootprintLoad( const wxString& aLibraryPath,
|
||||
const wxString& aFootprintName, bool aKeepUUID,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||
|
||||
|
@ -3208,7 +3208,7 @@ FOOTPRINT* LEGACY_PLUGIN::FootprintLoad( const wxString& aLibraryPath,
|
|||
|
||||
|
||||
bool LEGACY_PLUGIN::FootprintLibDelete( const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties )
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
wxFileName fn = aLibraryPath;
|
||||
|
||||
|
|
|
@ -75,19 +75,19 @@ public:
|
|||
}
|
||||
|
||||
BOARD* Load( const wxString& aFileName, BOARD* aAppendToMe,
|
||||
const PROPERTIES* aProperties = nullptr, PROJECT* aProject = nullptr,
|
||||
const STRING_UTF8_MAP* aProperties = nullptr, PROJECT* aProject = nullptr,
|
||||
PROGRESS_REPORTER* aProgressReporter = nullptr ) override;
|
||||
|
||||
void FootprintEnumerate( wxArrayString& aFootprintNames, const wxString& aLibraryPath,
|
||||
bool aBestEfforts,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
FOOTPRINT* FootprintLoad( const wxString& aLibraryPath, const wxString& aFootprintName,
|
||||
bool aKeepUUID = false,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
bool FootprintLibDelete( const wxString& aLibraryPath,
|
||||
const PROPERTIES* aProperties = nullptr ) override;
|
||||
const STRING_UTF8_MAP* aProperties = nullptr ) override;
|
||||
|
||||
long long GetLibraryTimestamp( const wxString& aLibraryPath ) const override;
|
||||
|
||||
|
@ -104,7 +104,7 @@ public:
|
|||
|
||||
protected:
|
||||
/// initialize PLUGIN like a constructor would, and futz with fresh BOARD if needed.
|
||||
void init( const PROPERTIES* aProperties );
|
||||
void init( const STRING_UTF8_MAP* aProperties );
|
||||
|
||||
void checkpoint();
|
||||
|
||||
|
@ -181,7 +181,7 @@ protected:
|
|||
|
||||
wxString m_error; ///< for throwing exceptions
|
||||
BOARD* m_board; ///< which BOARD, no ownership here
|
||||
const PROPERTIES* m_props; ///< passed via Save() or Load(), no ownership,
|
||||
const STRING_UTF8_MAP* m_props; ///< passed via Save() or Load(), no ownership,
|
||||
///< may be NULL.
|
||||
PROGRESS_REPORTER* m_progressReporter; ///< may be NULL, no ownership
|
||||
unsigned m_lastProgressLine;
|
||||
|
|
|
@ -67,7 +67,7 @@ const wxString PCAD_PLUGIN::GetFileExtension() const
|
|||
|
||||
|
||||
BOARD* PCAD_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe,
|
||||
const PROPERTIES* aProperties, PROJECT* aProject,
|
||||
const STRING_UTF8_MAP* aProperties, PROJECT* aProject,
|
||||
PROGRESS_REPORTER* aProgressReporter )
|
||||
{
|
||||
wxXmlDocument xmlDoc;
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
|
||||
BOARD* Load( const wxString& aFileName,
|
||||
BOARD* aAppendToMe,
|
||||
const PROPERTIES* aProperties = nullptr,
|
||||
const STRING_UTF8_MAP* aProperties = nullptr,
|
||||
PROJECT* aProject = nullptr,
|
||||
PROGRESS_REPORTER* aProgressReporter = nullptr ) override;
|
||||
|
||||
|
@ -55,7 +55,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
const PROPERTIES* m_props;
|
||||
const STRING_UTF8_MAP* m_props;
|
||||
BOARD* m_board;
|
||||
};
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
#include <origin_viewitem.h>
|
||||
#include <pcb_edit_frame.h>
|
||||
#include <pcb_painter.h>
|
||||
#include <properties.h>
|
||||
#include <string_utf8_map.h>
|
||||
#include <settings/color_settings.h>
|
||||
#include <tool/tool_manager.h>
|
||||
#include <footprint_edit_frame.h>
|
||||
|
@ -1197,7 +1197,7 @@ int PCB_CONTROL::AppendBoard( PLUGIN& pi, wxString& fileName )
|
|||
// Load the data
|
||||
try
|
||||
{
|
||||
PROPERTIES props;
|
||||
STRING_UTF8_MAP props;
|
||||
char xbuf[30];
|
||||
char ybuf[30];
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ you can either use the basic targets, or use the FindPython tools:
|
|||
# Python method:
|
||||
Python_add_library(MyModule2 src2.cpp)
|
||||
target_link_libraries(MyModule2 pybind11::headers)
|
||||
set_target_properties(MyModule2 PROPERTIES
|
||||
set_target_properties(MyModule2 STRING_UTF8_MAP
|
||||
INTERPROCEDURAL_OPTIMIZATION ON
|
||||
CXX_VISIBILITY_PRESET ON
|
||||
VISIBILITY_INLINES_HIDDEN ON)
|
||||
|
@ -220,7 +220,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/pybind11Targets.cmake")
|
|||
|
||||
# Easier to use / remember
|
||||
add_library(pybind11::headers IMPORTED INTERFACE)
|
||||
set_target_properties(pybind11::headers PROPERTIES INTERFACE_LINK_LIBRARIES
|
||||
set_target_properties(pybind11::headers STRING_UTF8_MAP INTERFACE_LINK_LIBRARIES
|
||||
pybind11::pybind11_headers)
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/pybind11Common.cmake")
|
||||
|
|
Loading…
Reference in New Issue