-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdpm.dspec.format.pas
215 lines (191 loc) · 5.85 KB
/
dpm.dspec.format.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
// This unit is autogenerated. Do not edit it manually.
// Source: JSON pasted from clipboard
// Date: 25/12/2023 9:54:54 PM
unit dpm.dspec.format;
interface
uses
System.Classes, REST.Json.Types;
type
[JsonSerialize(jmAllPubProps)]
TSource = class(TPersistent)
private
Fsrc: string;
Fflatten: Boolean;
Fdest: string;
Fexclude: TArray<string>;
public
destructor Destroy; override;
property src: string read Fsrc write Fsrc;
property flatten: Boolean read Fflatten write Fflatten;
property dest: string read Fdest write Fdest;
property exclude: TArray<string> read Fexclude write Fexclude;
end;
[JsonSerialize(jmAllPubProps)]
TDesign = class(TPersistent)
private
FbuildId: string;
Fsrc: string;
Finstall: Boolean;
public
destructor Destroy; override;
property buildId: string read FbuildId write FbuildId;
property src: string read Fsrc write Fsrc;
property install: Boolean read Finstall write Finstall;
end;
[JsonSerialize(jmAllPubProps)]
TSearchPath = class(TPersistent)
private
Fpath: string;
public
property path: string read Fpath write Fpath;
end;
[JsonSerialize(jmAllPubProps)]
TBuild = class(TPersistent)
private
Fid: string;
Fproject: string;
Fconfiguration: string;
FbuildForDesign: Boolean;
FdesignOnly: Boolean;
public
property id: string read Fid write Fid;
property project: string read Fproject write Fproject;
property configuration: string read Fconfiguration write Fconfiguration;
property buildForDesign: Boolean read FbuildForDesign write FbuildForDesign;
property designOnly: Boolean read FdesignOnly write FdesignOnly;
end;
[JsonSerialize(jmAllPubProps)]
TDependency = class(TPersistent)
private
Fid: string;
Fversion: string;
public
property id: string read Fid write Fid;
property version: string read Fversion write Fversion;
end;
[JsonSerialize(jmAllPubProps)]
TRuntime = class(TPersistent)
private
FBuildId: string;
Fsrc: string;
FcopyLocal: Boolean;
public
property buildId: string read FbuildId write FBuildId;
property src: string read Fsrc write Fsrc;
property copyLocal: Boolean read FcopyLocal write FcopyLocal;
end;
[JsonSerialize(jmAllPubProps)]
TMetadata = class(TPersistent)
private
Fid: string;
Fversion: string;
Fdescription: string;
Fowners: string;
Fauthors: string;
FprojectUrl: string;
FrepositoryUrl: string;
Flicense: string;
Fcopyright: string;
Ftags: string;
public
property id: string read Fid write Fid;
property version: string read Fversion write Fversion;
property description: string read Fdescription write Fdescription;
property owners: string read Fowners write Fowners;
property authors: string read Fauthors write Fauthors;
property projectUrl: string read FprojectUrl write FprojectUrl;
property repositoryUrl: string read FrepositoryUrl write FrepositoryUrl;
property license: string read Flicense write Flicense;
property copyright: string read Fcopyright write Fcopyright;
property tags: string read Ftags write Ftags;
end;
[JsonSerialize(jmAllPubProps)]
TTargetPlatform = class(TPersistent)
private
Fcompiler: string;
Fplatforms: string;
Ftemplate: string;
public
property compiler: string read Fcompiler write Fcompiler;
property platforms: string read Fplatforms write Fplatforms;
property template: string read Ftemplate write Ftemplate;
end;
[JsonSerialize(jmAllPubProps)]
TTemplate = class(TPersistent)
private
Fname: string;
Fsource: TArray<TSource>;
FsearchPaths: TArray<TSearchPath>;
Fbuild: TArray<TBuild>;
Fruntime: TArray<TRuntime>;
Fdesign: TArray<TDesign>;
Fdependency: TArray<TDependency>;
public
destructor Destroy; override;
property name: string read Fname write Fname;
property source: TArray<TSource> read Fsource write Fsource;
property searchPaths: TArray<TSearchPath> read FsearchPaths write FsearchPaths;
property build: TArray<TBuild> read Fbuild write Fbuild;
property runtime: TArray<TRuntime> read Fruntime write Fruntime;
property design: TArray<TDesign> read Fdesign write Fdesign;
property dependencies: TArray<TDependency> read Fdependency write Fdependency;
end;
[JsonSerialize(jmAllPubProps)]
TDPMSpecFormat = class(TPersistent)
private
Fmetadata: TMetadata;
FtargetPlatforms: TArray<TTargetPlatform>;
Ftemplates: TArray<TTemplate>;
public
constructor Create;
destructor Destroy; override;
property metadata: TMetadata read Fmetadata;
property targetPlatforms: TArray<TTargetPlatform> read FtargetPlatforms write FtargetPlatforms;
property templates: TArray<TTemplate> read Ftemplates write Ftemplates;
end;
implementation
uses
System.SysUtils, System.Generics.Collections;
destructor TSource.Destroy;
begin
TArray.FreeValues<string>(Fexclude);
inherited Destroy;
end;
destructor TTemplate.Destroy;
begin
TArray.FreeValues<TSource>(Fsource);
TArray.FreeValues<TSearchPath>(FsearchPaths);
TArray.FreeValues<TBuild>(Fbuild);
TArray.FreeValues<TRuntime>(Fruntime);
TArray.FreeValues<TDesign>(Fdesign);
TArray.FreeValues<TDependency>(Fdependency);
inherited Destroy;
end;
constructor TDPMSpecFormat.Create;
begin
inherited Create;
Fmetadata := TMetadata.Create;
end;
destructor TDPMSpecFormat.Destroy;
begin
FreeAndNil(Fmetadata);
TArray.FreeValues<TTargetPlatform>(FtargetPlatforms);
TArray.FreeValues<TTemplate>(Ftemplates);
inherited Destroy;
end;
{ TDesign }
destructor TDesign.Destroy;
begin
inherited;
end;
initialization
RegisterClass(TSource);
RegisterClass(TSearchPath);
RegisterClass(TBuild);
RegisterClass(TRuntime);
RegisterClass(TDesign);
RegisterClass(TMetadata);
RegisterClass(TTargetPlatform);
RegisterClass(TTemplate);
RegisterClass(TDPMSpecFormat);
end.