KiCad PCB EDA Suite
Loading...
Searching...
No Matches
merge_validators.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 */
20
21#ifndef KICAD_DIFF_MERGE_VALIDATORS_H
22#define KICAD_DIFF_MERGE_VALIDATORS_H
23
24#include <kicommon.h>
25#include <kiid.h>
27
28#include <wx/string.h>
29
30#include <vector>
31
32
33namespace KICAD_DIFF
34{
35
44{
46 wxString validator; // human-readable validator name
47 wxString message; // failure description for UI
48 std::vector<KIID_PATH> relatedItems; // items implicated, for cross-probe
49};
50
51
53{
54 std::vector<VALIDATION_FAILURE> failures;
55
56 bool Passed() const { return failures.empty(); }
57 bool HasErrors() const;
58 size_t Count() const { return failures.size(); }
59
60 void Merge( VALIDATION_REPORT&& aOther );
61};
62
63
76
77
83 const std::vector<REFDES_ENTRY>& aEntries );
84
85
95 bool aPlanRequiredRebuild, bool aApplierReportedRebuild );
96
97
104 int aOursVersion,
105 int aTheirsVersion );
106
107} // namespace KICAD_DIFF
108
109#endif // KICAD_DIFF_MERGE_VALIDATORS_H
#define KICOMMON_API
Definition kicommon.h:27
VALIDATION_REPORT CheckConnectivityRebuildFlag(bool aPlanRequiredRebuild, bool aApplierReportedRebuild)
Information needed for the connectivity-rebuild side-effect check.
VALIDATION_REPORT CheckSchemaVersions(int aAncestorVersion, int aOursVersion, int aTheirsVersion)
Schema-version compatibility check: every input to the merge must use a compatible serialization vers...
VALIDATION_REPORT CheckRefdesUniqueness(const std::vector< REFDES_ENTRY > &aEntries)
Run refdes-uniqueness checks.
SEVERITY
@ RPT_SEVERITY_WARNING
Reference-designator uniqueness over a flat list of (refdes, id) pairs.
KIID_PATH id
wxString refdes
Outcome of a single validator run.
std::vector< KIID_PATH > relatedItems
std::vector< VALIDATION_FAILURE > failures