KiCad PCB EDA Suite
Loading...
Searching...
No Matches
diff_tree_grouping.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 3
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, you may find one here:
18 * http://www.gnu.org/licenses/gpl-3.0.html
19 * or you may search the http://www.gnu.org website for the version 3 license,
20 * or you may write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
24#ifndef KICAD_DIFF_DIFF_TREE_GROUPING_H
25#define KICAD_DIFF_DIFF_TREE_GROUPING_H
26
27#include <kicommon.h>
28
31
32#include <wx/string.h>
33
34#include <array>
35#include <vector>
36
37
38namespace KICAD_DIFF
39{
40
53
54
64{
66 wxString groupLabel;
67 std::vector<CHANGE_TREE_ENTRY> entries;
68};
69
70
80
81
91KICOMMON_API bool ChangeMatchesSearchFilter( const ITEM_CHANGE& aChange, const wxString& aLowercaseFilter );
92
93
116KICOMMON_API std::vector<CHANGE_TREE_GROUP>
117 BuildChangeTreeGroups( const DOCUMENT_DIFF& aDiff, const wxString& aSearchFilter,
118 const std::array<bool, CATEGORY_COUNT>& aVisibleCategories );
119
120} // namespace KICAD_DIFF
121
122#endif // KICAD_DIFF_DIFF_TREE_GROUPING_H
#define KICOMMON_API
Definition kicommon.h:27
CHANGE_KIND
Coarse classification of a single item-level change between two documents.
bool ChangeMatchesSearchFilter(const ITEM_CHANGE &aChange, const wxString &aLowercaseFilter)
Predicate: does this item change match the active search filter?
std::vector< CHANGE_TREE_GROUP > BuildChangeTreeGroups(const DOCUMENT_DIFF &aDiff, const wxString &aSearchFilter, const std::array< bool, CATEGORY_COUNT > &aVisibleCategories)
Group the changes in a DOCUMENT_DIFF by kind, apply category and search filters, and return the resul...
wxString ChangeKindLabel(CHANGE_KIND aKind)
Human-readable label for a CHANGE_KIND (e.g.
One row in a grouped change tree — an ITEM_CHANGE plus its display label (typeName + optional refdes ...
const ITEM_CHANGE * change
wxString itemLabel
One bucket in a grouped change tree — a CHANGE_KIND, a human- readable group label,...
std::vector< CHANGE_TREE_ENTRY > entries
The full set of changes between two parsed documents of one type.
One change record on a single item.