KiCad PCB EDA Suite
Loading...
Searching...
No Matches
diff_job_output.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_JOB_OUTPUT_H
25#define KICAD_DIFF_JOB_OUTPUT_H
26
28#include <jobs/job_diff_base.h>
29
30#include <gal/color4d.h>
31#include <wx/string.h>
32
33#include <functional>
34
35
36class REPORTER;
37
38
39namespace KICAD_DIFF
40{
41
42struct DOCUMENT_DIFF;
43
44
66
67
73DIFF_EMIT_OPTIONS MakeEmitOptions( const JOB_DIFF_BASE& aJob, const wxString& aLabelA,
74 const wxString& aLabelB );
75
76
81int DiffExitCode( const DOCUMENT_DIFF& aResult );
82
83
94int EmitDiffResult( const DOCUMENT_DIFF& aResult, const DIFF_EMIT_OPTIONS& aOptions,
95 int aDiffExitCode, REPORTER& aReporter );
96
97} // namespace KICAD_DIFF
98
99#endif // KICAD_DIFF_JOB_OUTPUT_H
Shared base for the document/library diff jobs (PCB, schematic, symbol and footprint library).
A color representation with 4 components: red, green, blue, alpha.
Definition color4d.h:101
A pure virtual class used to derive REPORTER objects from.
Definition reporter.h:71
DIFF_EMIT_OPTIONS MakeEmitOptions(const JOB_DIFF_BASE &aJob, const wxString &aLabelA, const wxString &aLabelB)
Build a DIFF_EMIT_OPTIONS pre-filled from the job's format, resolved output path and the supplied per...
DOC_KIND
Document type a diff/merge entry point should route to, derived from a file path's extension.
int EmitDiffResult(const DOCUMENT_DIFF &aResult, const DIFF_EMIT_OPTIONS &aOptions, int aDiffExitCode, REPORTER &aReporter)
Emit a computed DOCUMENT_DIFF in the requested format.
int DiffExitCode(const DOCUMENT_DIFF &aResult)
Map a computed diff onto its CLI exit code – SUCCESS when empty, otherwise ERR_RC_VIOLATIONS.
Describes how a computed DOCUMENT_DIFF should be emitted by a diff job.
std::function< DOCUMENT_GEOMETRY(const KIGFX::COLOR4D &)> comparisonGeometry
JOB_DIFF_BASE::OUTPUT_FORMAT format
DOC_KIND docKind
Source document type, propagated onto the scene so the PNG/SVG renderer sizes its viewport with the m...
std::function< DOCUMENT_GEOMETRY(const KIGFX::COLOR4D &)> referenceGeometry
wxString outputPath
empty -> stdout (JSON/text only)
The full set of changes between two parsed documents of one type.
Aggregate of background geometry extracted from one source document.
Definition diff_scene.h:163