|
KiCad PCB EDA Suite
|
Public Member Functions | |
| GPCB_FPL_CACHE (PCB_IO_GEDA *aOwner, const wxString &aLibraryPath) | |
| wxString | GetPath () const |
| bool | IsWritable () const |
| boost::ptr_map< std::string, GPCB_FPL_CACHE_ENTRY > & | GetFootprints () |
| void | Load () |
| Save not implemented for the Geda PCB footprint library format. | |
| void | Remove (const wxString &aFootprintName) |
| bool | IsModified () |
| Return true if the cache is not up-to-date. | |
Static Public Member Functions | |
| static long long | GetTimestamp (const wxString &aLibPath) |
| Generate a timestamp representing all source files in the cache (including the parent directory). | |
Private Member Functions | |
| FOOTPRINT * | parseFOOTPRINT (LINE_READER *aLineReader) |
| bool | testFlags (const wxString &aFlag, long aMask, const wxChar *aName) |
| Test aFlag for aMask or aName. | |
| void | parseParameters (wxArrayString &aParameterList, LINE_READER *aLineReader) |
| Extract parameters and tokens from aLineReader and adds them to aParameterList. | |
Private Attributes | |
| PCB_IO_GEDA * | m_owner |
| Plugin object that owns the cache. | |
| wxFileName | m_lib_path |
| The path of the library. | |
| boost::ptr_map< std::string, GPCB_FPL_CACHE_ENTRY > | m_footprints |
| Map of footprint filename to cache entries. | |
| bool | m_cache_dirty |
| Stored separately because it's expensive to check m_cache_timestamp against all the files. | |
| long long | m_cache_timestamp |
| A hash of the timestamps for all the footprint files. | |
Definition at line 145 of file pcb_io_geda.cpp.
| GPCB_FPL_CACHE::GPCB_FPL_CACHE | ( | PCB_IO_GEDA * | aOwner, |
| const wxString & | aLibraryPath ) |
Definition at line 222 of file pcb_io_geda.cpp.
References m_cache_dirty, m_cache_timestamp, m_lib_path, and m_owner.
|
inline |
Definition at line 152 of file pcb_io_geda.cpp.
References m_footprints.
|
inline |
Definition at line 150 of file pcb_io_geda.cpp.
References m_lib_path.
|
static |
Generate a timestamp representing all source files in the cache (including the parent directory).
Timestamps should not be considered ordered. They either match or they don't.
Definition at line 317 of file pcb_io_geda.cpp.
References FILEEXT::GedaPcbFootprintLibFileExtension, and KIPLATFORM::IO::TimestampDir().
Referenced by PCB_IO_GEDA::GetLibraryTimestamp(), and IsModified().
| bool GPCB_FPL_CACHE::IsModified | ( | ) |
Return true if the cache is not up-to-date.
Definition at line 309 of file pcb_io_geda.cpp.
References GetTimestamp(), m_cache_dirty, m_cache_timestamp, and m_lib_path.
|
inline |
Definition at line 151 of file pcb_io_geda.cpp.
References m_lib_path.
| void GPCB_FPL_CACHE::Load | ( | ) |
Save not implemented for the Geda PCB footprint library format.
Definition at line 231 of file pcb_io_geda.cpp.
References _, FILEEXT::GedaPcbFootprintLibFileExtension, WX_FILENAME::GetFullPath(), WX_FILENAME::GetName(), m_cache_dirty, m_cache_timestamp, m_footprints, m_lib_path, name, parseFOOTPRINT(), FOOTPRINT::SetFPID(), WX_FILENAME::SetFullName(), THROW_IO_ERROR, TO_UTF8, and IO_ERROR::What().
|
private |
Definition at line 325 of file pcb_io_geda.cpp.
References _, PADSTACK::ALL_LAYERS, LSET::AllCuMask(), ANGLE_180, ANGLE_360, ARC, B_Cu, B_Mask, B_Paste, CIRCLE, clearance, delta, F_Cu, F_Mask, F_Paste, F_SilkS, LINE_READER::GetSource(), LINE_READER::LineNumber(), PCB_SHAPE::Move(), NEW_GPCB_UNIT_CONV, OLD_GPCB_UNIT_CONV, OVAL, PAD, pad, parseInt(), parseParameters(), RADIANS_T, radius, LINE_READER::ReadLine(), RECTANGLE, PCB_SHAPE::Rotate(), RotatePoint(), SEGMENT, PCB_SHAPE::SetArcAngleAndEnd(), EDA_SHAPE::SetCenter(), PCB_SHAPE::SetEnd(), PCB_SHAPE::SetLayer(), PCB_SHAPE::SetShape(), PCB_SHAPE::SetStart(), PCB_SHAPE::SetStroke(), SMD, SOLID, TENTHS_OF_A_DEGREE_T, testFlags(), THROW_IO_ERROR, THROW_PARSE_ERROR, and traceGedaPcbPlugin.
Referenced by Load().
|
private |
Extract parameters and tokens from aLineReader and adds them to aParameterList.
Delimiter characters are: [ ] ( ) Begin and end of parameter list and units indicator " is a string delimiter space is the param separator The first word is the keyword the second item is one of ( or [ other are parameters (number or delimited string) last parameter is ) or ]
| aParameterList | This list of parameters parsed. |
| aLineReader | The line reader object to parse. |
Definition at line 682 of file pcb_io_geda.cpp.
References dump(), KI_FALLTHROUGH, LINE_READER::Line(), LINE_READER::ReadLine(), and traceGedaPcbPlugin.
Referenced by parseFOOTPRINT().
| void GPCB_FPL_CACHE::Remove | ( | const wxString & | aFootprintName | ) |
Definition at line 289 of file pcb_io_geda.cpp.
References _, m_footprints, m_lib_path, THROW_IO_ERROR, and TO_UTF8.
|
private |
Test aFlag for aMask or aName.
| aFlag | is a list of flags to test against: can be a bit field flag or a list name flag a bit field flag is an hexadecimal value: Ox00020000 a list name flag is a string list of flags, comma separated like square,option1. |
| aMask | is the flag list to test. |
| aName | is the flag name to find in list. |
Definition at line 792 of file pcb_io_geda.cpp.
Referenced by parseFOOTPRINT().
|
private |
Stored separately because it's expensive to check m_cache_timestamp against all the files.
Definition at line 215 of file pcb_io_geda.cpp.
Referenced by GPCB_FPL_CACHE(), IsModified(), and Load().
|
private |
A hash of the timestamps for all the footprint files.
Definition at line 217 of file pcb_io_geda.cpp.
Referenced by GPCB_FPL_CACHE(), IsModified(), and Load().
|
private |
Map of footprint filename to cache entries.
Definition at line 212 of file pcb_io_geda.cpp.
Referenced by GetFootprints(), Load(), and Remove().
|
private |
The path of the library.
Definition at line 210 of file pcb_io_geda.cpp.
Referenced by GetPath(), GPCB_FPL_CACHE(), IsModified(), IsWritable(), Load(), and Remove().
|
private |
Plugin object that owns the cache.
Definition at line 209 of file pcb_io_geda.cpp.
Referenced by GPCB_FPL_CACHE().