|
KiCad PCB EDA Suite
|
Diff two .pretty footprint library directories. More...
#include <fp_lib_differ.h>
Public Types | |
| using | FOOTPRINT_MAP = std::map<wxString, const FOOTPRINT*> |
Public Member Functions | |
| FP_LIB_DIFFER (const FOOTPRINT_MAP &aBefore, const FOOTPRINT_MAP &aAfter, const wxString &aPath=wxEmptyString) | |
| ~FP_LIB_DIFFER () override | |
| DOCUMENT_DIFF | Diff () override |
| Produce a DOCUMENT_DIFF of the inputs the concrete differ was constructed with. | |
| void | SetOptions (const OPTIONS &aOptions) |
| const OPTIONS & | GetOptions () const |
Static Public Member Functions | |
| static std::pair< std::vector< std::unique_ptr< FOOTPRINT > >, FOOTPRINT_MAP > | LoadLibrary (const wxString &aPrettyPath) |
| Load a .pretty directory into a FOOTPRINT_MAP. | |
Protected Attributes | |
| OPTIONS | m_options |
Private Attributes | |
| const FOOTPRINT_MAP & | m_before |
| const FOOTPRINT_MAP & | m_after |
| wxString | m_path |
Diff two .pretty footprint library directories.
Identity is footprint name (the LIB_ID item name). Renamed footprints surface as (REMOVED old, ADDED new); per-footprint property delta is available via the single-footprint differ (FOOTPRINT children walk in PCB_DIFFER::diffFootprintChildren).
Definition at line 50 of file fp_lib_differ.h.
| using KICAD_DIFF::FP_LIB_DIFFER::FOOTPRINT_MAP = std::map<wxString, const FOOTPRINT*> |
Definition at line 53 of file fp_lib_differ.h.
| KICAD_DIFF::FP_LIB_DIFFER::FP_LIB_DIFFER | ( | const FOOTPRINT_MAP & | aBefore, |
| const FOOTPRINT_MAP & | aAfter, | ||
| const wxString & | aPath = wxEmptyString ) |
Definition at line 39 of file fp_lib_differ.cpp.
|
overridedefault |
|
overridevirtual |
Produce a DOCUMENT_DIFF of the inputs the concrete differ was constructed with.
Must be deterministic for fixed inputs. Concrete differs sort their output by KIID_PATH so the JSON serialization is bit-stable across runs.
Implements KICAD_DIFF::KICAD_DIFFER.
Definition at line 83 of file fp_lib_differ.cpp.
References KICAD_DIFF::DiffLibraryByName(), KICAD_DIFF::FOOTPRINT, FOOTPRINT::GetBoundingBox(), m_after, m_before, KICAD_DIFF::KICAD_DIFFER::m_options, and m_path.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), FOOTPRINT_EDITOR_CONTROL::CompareLibraryWithFile(), PCBNEW_JOBS_HANDLER::JobFpDiff(), PCBNEW_JOBS_HANDLER::OpenDiffDialog(), and PCBNEW_JOBS_HANDLER::runFpLibMerge().
|
inlineinherited |
Definition at line 67 of file kicad_differ.h.
References m_options.
|
static |
Load a .pretty directory into a FOOTPRINT_MAP.
The vector owns the FOOTPRINT instances; the map borrows raw pointers into it.
Definition at line 51 of file fp_lib_differ.cpp.
References PCB_IO_KICAD_SEXPR::FootprintEnumerate(), PCB_IO_KICAD_SEXPR::FootprintLoad(), name, and traceDiffMerge.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), FOOTPRINT_EDITOR_CONTROL::CompareLibraryWithFile(), loadFootprintLibrarySide(), and PCBNEW_JOBS_HANDLER::runFpLibMerge().
|
inlineinherited |
Definition at line 66 of file kicad_differ.h.
References m_options.
|
private |
Definition at line 68 of file fp_lib_differ.h.
Referenced by Diff(), and FP_LIB_DIFFER().
|
private |
Definition at line 67 of file fp_lib_differ.h.
Referenced by Diff(), and FP_LIB_DIFFER().
|
protectedinherited |
Definition at line 80 of file kicad_differ.h.
Referenced by KICAD_DIFF::FP_LIB_DIFFER::Diff(), KICAD_DIFF::PCB_DIFFER::Diff(), KICAD_DIFF::SCH_DIFFER::Diff(), KICAD_DIFF::SYM_LIB_DIFFER::Diff(), KICAD_DIFF::PCB_DIFFER::diffFootprintChildren(), GetOptions(), and SetOptions().
|
private |
Definition at line 69 of file fp_lib_differ.h.
Referenced by Diff(), and FP_LIB_DIFFER().