KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pads_sch_binary_builder.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 modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your option)
9 * any later version.
10 */
11
12#pragma once
13
15
16#include <cstddef>
17#include <functional>
18#include <utility>
19#include <vector>
20
21class SCHEMATIC;
22class SCH_SHEET;
23
24namespace PADS_SCH_BINARY
25{
26
28{
29 size_t sheets = 0;
30 size_t symbols = 0;
31 size_t wires = 0;
32 size_t buses = 0;
33 size_t busEntries = 0;
34 size_t junctions = 0;
35 size_t labels = 0;
36 size_t texts = 0;
37 size_t graphics = 0;
38 size_t images = 0;
39
40 bool operator==( const BUILD_COUNTS& ) const = default;
41};
42
43
45{
47 std::vector<PARSER_DIAGNOSTIC> diagnostics;
48};
49
50
52{
53public:
54 explicit PADS_SCH_BINARY_BUILDER( std::function<void()> aBeforeCommit = {} ) :
55 m_beforeCommit( std::move( aBeforeCommit ) )
56 {
57 }
58
59 BUILD_RESULT Build( const PADS_SCH_MODEL& aModel, SCHEMATIC* aSchematic, SCH_SHEET* aAppendToMe,
60 const wxString& aSourcePath );
61
62private:
63 std::function<void()> m_beforeCommit;
64};
65
66} // namespace PADS_SCH_BINARY
PADS_SCH_BINARY_BUILDER(std::function< void()> aBeforeCommit={})
BUILD_RESULT Build(const PADS_SCH_MODEL &aModel, SCHEMATIC *aSchematic, SCH_SHEET *aAppendToMe, const wxString &aSourcePath)
Holds all the data relating to one schematic.
Definition schematic.h:148
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition sch_sheet.h:48
STL namespace.
bool operator==(const BUILD_COUNTS &) const =default
std::vector< PARSER_DIAGNOSTIC > diagnostics