KiCad PCB EDA Suite
Loading...
Searching...
No Matches
easypc_classes_root.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 2
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, see <https://www.gnu.org/licenses/>.
18 */
19
24
25#ifndef EASYPC_CLASSES_ROOT_H
26#define EASYPC_CLASSES_ROOT_H
27
28#include <cstdint>
29#include <map>
30#include <vector>
31
33
34
35namespace EASYPC
36{
37
39struct POINT32
40{
41 int32_t X = 0;
42 int32_t Y = 0;
43};
44
45
47
48
50LOAD_TASK SkipMember( ARCHIVE& aAr, const char* aClass, bool aDesignOwned = false );
51
52
58{
59 LOAD_TASK Load( ARCHIVE& aAr ) override;
60 int ItemFormat( const ARCHIVE& aAr ) const override;
61
62 bool DesignOwned = false;
63 bool OwnerRead = false;
64};
65
66
69{
70 LOAD_TASK Load( ARCHIVE& aAr ) override;
71
72 bool IsChecking( int32_t aId ) const
73 {
74 auto it = Values.find( aId );
75 return it != Values.end() && it->second != 0;
76 }
77
78 std::map<int32_t, int32_t> Values;
79};
80
81
99
100
102{
103 LOAD_TASK Load( ARCHIVE& aAr ) override;
104
106 int32_t Param( int aIndex, int32_t aDefault = 0 ) const
107 {
108 return aIndex >= 0 && aIndex < static_cast<int>( Params.size() ) ? Params[aIndex] : aDefault;
109 }
110
111 std::vector<int32_t> Params;
112};
113
114
116{
117 LOAD_TASK Load( ARCHIVE& aAr ) override;
118
119 OBJECT* TextStyle = nullptr;
120 wxString NetClass;
121};
122
123
129{
130 LOAD_TASK Load( ARCHIVE& aAr ) override;
131 int ItemFormat( const ARCHIVE& aAr ) const override { return Version; }
132
133 int32_t Version = 0;
135
136 OBJECT* Areas = nullptr;
137 OBJECT* Boards = nullptr;
138 OBJECT* Coppers = nullptr;
139 OBJECT* Layers = nullptr;
140 OBJECT* NetClasses = nullptr;
141 OBJECT* Symbols = nullptr;
142 OBJECT* Nets = nullptr;
143 OBJECT* Pads = nullptr;
144 OBJECT* Texts = nullptr;
145 OBJECT* Spacings = nullptr;
146 OBJECT* Attributes = nullptr;
149 OBJECT* Buses = nullptr;
151 int32_t IsolationGap = 0x9ec;
152 int32_t ThermalRelief = 0x9ec;
153 bool ThermalAngled = false;
155 OBJECT* Groups = nullptr;
156 bool AdjustTextRotation = false;
158
161};
162
163} // namespace EASYPC
164
165#endif // EASYPC_CLASSES_ROOT_H
One archive load stream; it owns every object it creates.
A loader coroutine. Awaiting one queues it on its archive's frame stack instead of nesting the call.
Design items, attributes, styles, layers, net classes and spacings.
DESIGN_PARAM_INDEX
Indices into the design parameter table.
@ DP_MIRROR_PAD_STYLE_EXCEPTIONS
@ DP_MIN_SOLDER_MASK_TO_TRACK
LOAD_TASK SkipMember(ARCHIVE &aAr, const char *aClass, bool aDesignOwned)
Load and drop an embedded member of a registered class; aDesignOwned marks its design as owner.
POINT32 ReadPoint(ARCHIVE &aAr)
A member stored inside the design.
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
int ItemFormat(const ARCHIVE &aAr) const override
The version this object gates on; the base is the archive's current read format.
Root of every deserialized object.
A point read as two int32 values.
A map of DRC switch id to value.
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
bool IsChecking(int32_t aId) const
std::map< int32_t, int32_t > Values
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
A design data member: owner tag only.
The base of nearly every class.
int32_t Param(int aIndex, int32_t aDefault=0) const
The value at aIndex, or aDefault where the stored array is shorter, as the accessors do.
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
The document: OLE items, then the design.
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
OBJECT * Spacings
legacy or current design spacings, depending on format
SOURCE_CHECK_PARAMETERS DrcParameters
from 13000
SOURCE_DESIGN_PARAMETERS DesignParameters
after 8000
int ItemFormat(const ARCHIVE &aAr) const override
The version this object gates on; the base is the archive's current read format.