1 #ifndef LEGACY_PLUGIN_H_ 2 #define LEGACY_PLUGIN_H_ 38 #define FOOTPRINT_LIBRARY_HEADER "PCBNEW-LibModule-V1" 39 #define FOOTPRINT_LIBRARY_HEADER_CNT 18 68 return wxT(
"KiCad-Legacy" );
82 const PROPERTIES* aProperties =
nullptr )
override;
85 bool aKeepUUID =
false,
86 const PROPERTIES* aProperties =
nullptr )
override;
89 const PROPERTIES* aProperties =
nullptr )
override;
114 if( (
unsigned int) aNetCode <
m_netCodes.size() )
131 BIU biuParse(
const char* aValue,
const char** nptrptr =
nullptr );
145 double degParse(
const char* aValue,
const char** nptrptr =
nullptr );
180 void cacheLib(
const wxString& aLibraryPath );
210 #endif // LEGACY_PLUGIN_H_
long long GetLibraryTimestamp(const wxString &aLibraryPath) const override
Generate a timestamp representing all the files in the library (including the library directory).
An abstract class from which implementation specific LINE_READERs may be derived to read single lines...
void FootprintEnumerate(wxArrayString &aFootprintNames, const wxString &aLibraryPath, bool aBestEfforts, const PROPERTIES *aProperties=nullptr) override
Return a list of footprint names contained within the library at aLibraryPath.
Container for project specific data.
void cacheLib(const wxString &aLibraryPath)
we only cache one footprint library for now, this determines which one.
BOARD * Load(const wxString &aFileName, BOARD *aAppendToMe, const PROPERTIES *aProperties=nullptr, PROJECT *aProject=nullptr, PROGRESS_REPORTER *aProgressReporter=nullptr) override
Load information from some input file format that this PLUGIN implementation knows about into either ...
bool m_showLegacyZoneWarning
A progress reporter interface for use in multi-threaded environments.
BIU biuParse(const char *aValue, const char **nptrptr=nullptr)
Parse an ASCII decimal floating point value and scales it into a BIU according to the current value o...
int LAYER_NUM
This can be replaced with int and removed.
static PCB_LAYER_ID leg_layer2new(int cu_count, LAYER_NUM aLayerNum)
wxString m_field
reused to stuff FOOTPRINT fields.
A name/value tuple with unique names and optional values.
int m_loading_format_version
which BOARD_FORMAT_VERSION am I Load()ing?
bool FootprintLibDelete(const wxString &aLibraryPath, const PROPERTIES *aProperties=nullptr) override
Delete an existing footprint library and returns true, or if library does not exist returns false,...
void SetReader(LINE_READER *aReader)
FILE * m_fp
no ownership here.
double degParse(const char *aValue, const char **nptrptr=nullptr)
Parse an ASCII decimal floating point value which is certainly an angle.
double biuToDisk
convert from BIUs to disk engineering units with this scale factor
The footprint portion of the PLUGIN API, and only for the LEGACY_PLUGIN, so therefore is private to t...
std::vector< int > m_netCodes
net codes mapping for boards being loaded
unsigned m_lineCount
for progress reporting
LINE_READER * m_reader
no ownership here.
LSET is a set of PCB_LAYER_IDs.
A container for NETCLASS instances.
void init(const PROPERTIES *aProperties)
initialize PLUGIN like a constructor would, and futz with fresh BOARD if needed.
bool IsFootprintLibWritable(const wxString &aLibraryPath) override
Return true if the library at aLibraryPath is writable.
A PLUGIN derivation which could possibly be put into a DLL/DSO.
A collection of nets and the parameters used to route or test these nets.
void loadFP_SHAPE(FOOTPRINT *aFootprint)
void loadMODULE_TEXT(FP_TEXT *aText)
FOOTPRINT * FootprintLoad(const wxString &aLibraryPath, const wxString &aFootprintName, bool aKeepUUID=false, const PROPERTIES *aProperties=nullptr) override
Load a footprint having aFootprintName from the aLibraryPath containing a library format that this PL...
Handle a list of polygons defining a copper zone.
double diskToBiu
convert from disk engineering units to BIUs with this scale factor
BOARD * m_board
which BOARD, no ownership here
void loadAllSections(bool doAppend)
void checkpoint()
Converts net code using the mapping table if available, otherwise returns unchanged net code.
void loadFOOTPRINT(FOOTPRINT *aFootprint)
void loadZONE_CONTAINER()
static LSET leg_mask2new(int cu_count, unsigned aMask)
Handle the data for a net.
Information pertinent to a Pcbnew printed circuit board.
const wxString PluginName() const override
Return a brief hard coded name for this PLUGIN.
PCB_LAYER_ID
A quick note on layer IDs:
wxString m_error
for throwing exceptions
A base class that BOARD loading and saving plugins should derive from.
unsigned m_lastProgressLine
PROGRESS_REPORTER * m_progressReporter
may be NULL, no ownership
void load3D(FOOTPRINT *aFootprint)
int getNetCode(int aNetCode)
void loadPAD(FOOTPRINT *aFootprint)
void loadTrackList(int aStructType)
Read a list of segments (Tracks and Vias, or Segzones)
const wxString GetFileExtension() const override
Returns the file extension for the PLUGIN.
const PROPERTIES * m_props
passed via Save() or Load(), no ownership, may be NULL.