26 #include <wx/translation.h> 28 #define FMT_UNIMPLEMENTED "Plugin \"%s\" does not implement the \"%s\" function." 41 wxString::FromUTF8( aCaller ).GetData() ) );
68 const wxString& aLibraryPath,
77 const wxString& aLibraryPath,
137 (*aListToAppendTo)[
"debug_level"] =
UTF8(
_(
138 "Enable <b>debug</b> logging for Symbol*() functions in this SCH_PLUGIN." 141 (*aListToAppendTo)[
"read_filter_regex"] =
UTF8(
_(
142 "Regular expression <b>symbol name</b> filter." 145 (*aListToAppendTo)[
"enable_transaction_logging"] =
UTF8(
_(
146 "Enable transaction logging. The mere presence of this option turns on the " 147 "logging, no need to set a Value." 150 (*aListToAppendTo)[
"username"] =
UTF8(
_(
151 "User name for <b>login</b> to some special library server." 154 (*aListToAppendTo)[
"password"] =
UTF8(
_(
155 "Password for <b>login</b> to some special library server." 162 (*aListToAppendTo)[
"python_symbol_plugin"] =
UTF8(
_(
163 "Enter the python symbol which implements the SCH_PLUGIN::Symbol*() functions." 181 static wxString error;
An 8 bit string that is assuredly encoded in UTF8, and supplies special conversion support to and fro...
virtual void DeleteSymbol(const wxString &aLibraryPath, const wxString &aSymbolName, const PROPERTIES *aProperties=nullptr)
Delete the entire LIB_SYMBOL associated with aAliasName from the library aLibraryPath.
static void not_implemented(const SCH_PLUGIN *aPlugin, const char *aCaller)
Function not_implemented throws an IO_ERROR and complains of an API function not being implemented.
Holds all the data relating to one schematic.
virtual SCH_SHEET * Load(const wxString &aFileName, SCHEMATIC *aSchematic, SCH_SHEET *aAppendToMe=nullptr, const PROPERTIES *aProperties=nullptr)
Load information from some input file format that this SCH_PLUGIN implementation knows about,...
virtual void CreateSymbolLib(const wxString &aLibraryPath, const PROPERTIES *aProperties=nullptr)
Create a new empty symbol library at aLibraryPath.
virtual void SaveSymbol(const wxString &aLibraryPath, const LIB_SYMBOL *aSymbol, const PROPERTIES *aProperties=nullptr)
Write aSymbol to an existing library located at aLibraryPath.
virtual const wxString GetName() const =0
Return a brief hard coded name for this SCH_PLUGIN.
A name/value tuple with unique names and optional values.
Define a library symbol object.
virtual bool CheckHeader(const wxString &aFileName)
Return true if the first line in aFileName begins with the expected header.
#define FMT_UNIMPLEMENTED
Base class that schematic file and library loading and saving plugins should derive from.
virtual bool DeleteSymbolLib(const wxString &aLibraryPath, const PROPERTIES *aProperties=nullptr)
Delete an existing symbol library and returns true if successful, or if library does not exist return...
virtual void EnumerateSymbolLib(wxArrayString &aSymbolNameList, const wxString &aLibraryPath, const PROPERTIES *aProperties=nullptr)
Populate a list of LIB_SYMBOL alias names contained within the library aLibraryPath.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
virtual void Save(const wxString &aFileName, SCH_SHEET *aSheet, SCHEMATIC *aSchematic, const PROPERTIES *aProperties=nullptr)
Write aSchematic to a storage file in a format that this SCH_PLUGIN implementation knows about,...
virtual const wxString & GetError() const
Return an error string to the caller.
virtual bool IsSymbolLibWritable(const wxString &aLibraryPath)
Return true if the library at aLibraryPath is writable.
virtual void SymbolLibOptions(PROPERTIES *aListToAppendTo) const
Append supported SCH_PLUGIN options to aListToAppenTo along with internationalized descriptions.
virtual LIB_SYMBOL * LoadSymbol(const wxString &aLibraryPath, const wxString &aPartName, const PROPERTIES *aProperties=nullptr)
Load a LIB_SYMBOL object having aPartName from the aLibraryPath containing a library format that this...
#define THROW_IO_ERROR(msg)
virtual void SaveLibrary(const wxString &aFileName, const PROPERTIES *aProperties=nullptr)