forked from bergsteiger/mindstream
-
Notifications
You must be signed in to change notification settings - Fork 0
/
msDiagramms.pas
90 lines (73 loc) · 1.51 KB
/
msDiagramms.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
unit msDiagramms;
interface
uses
System.Types,
FMX.Objects,
System.Classes,
msCoreObjects,
msShape,
Data.DBXJSONReflect,
msDiagramm,
msInterfaces,
msDiagrammsList
;
type
TmsDiagramms = class(TmsDiagrammsList, ImsDiagramms)
private
constructor CreatePrim;
protected
procedure Serialize;
procedure DeSerialize;
procedure SaveTo(const aFileName: String); override;
procedure LoadFrom(const aFileName: String); override;
procedure Cleanup; override;
public
class function Create: ImsDiagramms;
procedure Assign(anOther: TmsDiagramms);
end;//TmsDiagramms
implementation
uses
System.SysUtils,
FMX.Graphics,
System.UITypes,
msDiagrammsMarshal,
msRegisteredShapes,
msInvalidators
;
// TmsDiagramms
procedure TmsDiagramms.Cleanup;
begin
// - ïåðåêðûòî ÷èñòî äëÿ îòëàäêè
inherited;
end;
class function TmsDiagramms.Create: ImsDiagramms;
begin
Result := CreatePrim;
end;
constructor TmsDiagramms.CreatePrim;
begin
inherited Create;
end;
const
c_FileName = 'All.json';
procedure TmsDiagramms.DeSerialize;
begin
TmsDiagrammsMarshal.DeSerialize(c_FileName, self);
end;
procedure TmsDiagramms.Assign(anOther: TmsDiagramms);
begin
inherited Assign(anOther);
end;
procedure TmsDiagramms.Serialize;
begin
TmsDiagrammsMarshal.Serialize(c_FileName, self);
end;
procedure TmsDiagramms.SaveTo(const aFileName: String);
begin
TmsDiagrammsMarshal.Serialize(aFileName, Self);
end;
procedure TmsDiagramms.LoadFrom(const aFileName: String);
begin
TmsDiagrammsMarshal.DeSerialize(aFileName, Self);
end;
end.