|
KiCad PCB EDA Suite
|
Materialize a MERGE_PLAN into a merged name-keyed library. More...
#include <lib_merge_applier.h>
Classes | |
| struct | REPORT |
Public Types | |
| using | ITEM_MAP = std::map<wxString, const ITEM*> |
| using | COMBINER = std::function<std::unique_ptr<ITEM>( const KIID_PATH& aId )> |
| Both sides' edits of the item with this id applied to one copy, or null when they cannot be combined. | |
Public Member Functions | |
| LIB_MERGE_APPLIER (const ITEM_MAP &aAncestor, const ITEM_MAP &aOurs, const ITEM_MAP &aTheirs, MERGE_PLAN aPlan, COMBINER aCombine={}) | |
| std::vector< std::unique_ptr< ITEM > > | Apply () |
| const REPORT & | GetReport () const |
Static Private Member Functions | |
| static const ITEM * | findItem (const ITEM_MAP &aMap, const wxString &aName) |
| static std::set< wxString > | collectNames (const ITEM_MAP &aAncestor, const ITEM_MAP &aOurs, const ITEM_MAP &aTheirs) |
| static void | takeFrom (const ITEM_MAP &aSource, const wxString &aName, std::map< wxString, const ITEM * > &aLive, std::size_t &aCounter) |
Private Attributes | |
| const ITEM_MAP & | m_ancestor |
| const ITEM_MAP & | m_ours |
| const ITEM_MAP & | m_theirs |
| MERGE_PLAN | m_plan |
| COMBINER | m_combine |
| REPORT | m_report |
Materialize a MERGE_PLAN into a merged name-keyed library.
Library identity is the canonical item name (LIB_SYMBOL or FOOTPRINT). Plan IDs come from LibraryItemKiidPath(name) on the differ side; the applier reconstructs the same KIID_PATH from each input map's keys and looks up matching resolutions.
A MERGE_PROPS item is built by the combiner, which owns the knowledge of how two edits of one item fit together. Without a combiner, or when it returns null, the item is downgraded to TAKE_OURS and counted in mergePropsFallback so the job handler can surface it as unresolved.
Definition at line 59 of file lib_merge_applier.h.
| using KICAD_DIFF::LIB_MERGE_APPLIER< ITEM >::COMBINER = std::function<std::unique_ptr<ITEM>( const KIID_PATH& aId )> |
Both sides' edits of the item with this id applied to one copy, or null when they cannot be combined.
Definition at line 65 of file lib_merge_applier.h.
| using KICAD_DIFF::LIB_MERGE_APPLIER< ITEM >::ITEM_MAP = std::map<wxString, const ITEM*> |
Definition at line 62 of file lib_merge_applier.h.
|
inline |
Definition at line 67 of file lib_merge_applier.h.
|
inline |
Definition at line 94 of file lib_merge_applier.h.
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(), 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(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), PCBNEW_JOBS_HANDLER::runFpLibMerge(), and EESCHEMA_JOBS_HANDLER::runSymLibMerge().
|
inlinestaticprivate |
Definition at line 196 of file lib_merge_applier.h.
Referenced by KICAD_DIFF::LIB_MERGE_APPLIER< LIB_SYMBOL >::Apply().
|
inlinestaticprivate |
Definition at line 190 of file lib_merge_applier.h.
Referenced by KICAD_DIFF::LIB_MERGE_APPLIER< LIB_SYMBOL >::Apply(), and KICAD_DIFF::LIB_MERGE_APPLIER< LIB_SYMBOL >::takeFrom().
|
inline |
Definition at line 187 of file lib_merge_applier.h.
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(), 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(), BOOST_AUTO_TEST_CASE(), PCBNEW_JOBS_HANDLER::runFpLibMerge(), and EESCHEMA_JOBS_HANDLER::runSymLibMerge().
|
inlinestaticprivate |
Definition at line 210 of file lib_merge_applier.h.
Referenced by KICAD_DIFF::LIB_MERGE_APPLIER< LIB_SYMBOL >::Apply().
|
private |
Definition at line 221 of file lib_merge_applier.h.
|
private |
Definition at line 225 of file lib_merge_applier.h.
Referenced by KICAD_DIFF::LIB_MERGE_APPLIER< LIB_SYMBOL >::Apply().
|
private |
Definition at line 222 of file lib_merge_applier.h.
|
private |
Definition at line 224 of file lib_merge_applier.h.
|
private |
Definition at line 226 of file lib_merge_applier.h.
|
private |
Definition at line 223 of file lib_merge_applier.h.