利用nil新特性进行性能优化

This commit is contained in:
csh
2024-09-19 10:45:33 +08:00
parent 9101d13b21
commit 4b9b1451ca
424 changed files with 18472 additions and 16812 deletions
@@ -0,0 +1,36 @@
type EndnotePrAdapter = class
public
function Create(_obj: EndnotePr);
function Init();
function GetEndnoteById(_key: string);
function SetEndnoteById(_key: string; _value: tslobj);
private
object_: EndnotePr;
endnote_hash_: tableArray;
end;
function EndnotePrAdapter.Create(_obj: EndnotePr);
begin
object_ := _obj;
endnote_hash_ := array();
{self.}Init();
end;
function EndnotePrAdapter.Init();
begin
elements := object_.Endnotes();
for k,v in elements do
endnote_hash_[v.Id] := v;
end;
function EndnotePrAdapter.GetEndnoteById(_key: string);
begin
return endnote_hash_[_key];
end;
function EndnotePrAdapter.SetEndnoteById(_key: string; _value: tslobj);
begin
endnote_hash_[_key] := _value;
end;
@@ -0,0 +1,36 @@
type EndnotesAdapter = class
public
function Create(_obj: Endnotes);
function Init();
function GetEndnoteById(_key: string);
function SetEndnoteById(_key: string; _value: tslobj);
private
object_: Endnotes;
endnote_hash_: tableArray;
end;
function EndnotesAdapter.Create(_obj: Endnotes);
begin
object_ := _obj;
endnote_hash_ := array();
{self.}Init();
end;
function EndnotesAdapter.Init();
begin
elements := object_.Endnotes();
for k,v in elements do
endnote_hash_[v.Id] := v;
end;
function EndnotesAdapter.GetEndnoteById(_key: string);
begin
return endnote_hash_[_key];
end;
function EndnotesAdapter.SetEndnoteById(_key: string; _value: tslobj);
begin
endnote_hash_[_key] := _value;
end;
@@ -0,0 +1,36 @@
type FootnotePrAdapter = class
public
function Create(_obj: FootnotePr);
function Init();
function GetFootnoteById(_key: string);
function SetFootnoteById(_key: string; _value: tslobj);
private
object_: FootnotePr;
footnote_hash_: tableArray;
end;
function FootnotePrAdapter.Create(_obj: FootnotePr);
begin
object_ := _obj;
footnote_hash_ := array();
{self.}Init();
end;
function FootnotePrAdapter.Init();
begin
elements := object_.Footnotes();
for k,v in elements do
footnote_hash_[v.Id] := v;
end;
function FootnotePrAdapter.GetFootnoteById(_key: string);
begin
return footnote_hash_[_key];
end;
function FootnotePrAdapter.SetFootnoteById(_key: string; _value: tslobj);
begin
footnote_hash_[_key] := _value;
end;
@@ -0,0 +1,36 @@
type FootnotesAdapter = class
public
function Create(_obj: Footnotes);
function Init();
function GetFootnoteById(_key: string);
function SetFootnoteById(_key: string; _value: tslobj);
private
object_: Footnotes;
footnote_hash_: tableArray;
end;
function FootnotesAdapter.Create(_obj: Footnotes);
begin
object_ := _obj;
footnote_hash_ := array();
{self.}Init();
end;
function FootnotesAdapter.Init();
begin
elements := object_.Footnotes();
for k,v in elements do
footnote_hash_[v.Id] := v;
end;
function FootnotesAdapter.GetFootnoteById(_key: string);
begin
return footnote_hash_[_key];
end;
function FootnotesAdapter.SetFootnoteById(_key: string; _value: tslobj);
begin
footnote_hash_[_key] := _value;
end;