This commit is contained in:
csh
2024-12-13 17:18:59 +08:00
parent 6385b6300f
commit e687379248
59 changed files with 639 additions and 45 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ public
function Create();
function Init();virtual;
function InitZip(zip: ZipFile);
function OpenFile(alias: string; file: string; password: string): tableArray;
function Open(alias: string; file: string; password: string): tableArray;
function Save(): tableArray;
function SaveAs(alias: string; file: string): tableArray;
function Zip(): ZipFile;
@@ -29,7 +29,7 @@ begin
zipfile_ := zip;
end;
function TSComponentsBase.OpenFile(alias: string; file: string; password: string): tableArray;
function TSComponentsBase.Open(alias: string; file: string; password: string): tableArray;
begin
{self.}Init();
zipfile_ := new ZipFile();
+32
View File
@@ -5,6 +5,7 @@ public
function Add(data: any): boolean;
function Append(data: any): boolean;
function Insert(data: any): boolean;
function InsertAfter(data: any; pos_data: any);
function Get(name: string; index: integer);overload;
function Get(): array of tslobj;overload;
@@ -23,6 +24,7 @@ public
function Create(name: string);
function Set(data: any);
function Add(data: any);
function InsertAfter(data: any; pos_data: any): boolean;
function Name(): string;
function Size(): integer;
function First(): Node;
@@ -113,6 +115,16 @@ begin
return ifnil(child_[data.ElementName]) ? {self.}Append(data) : {self.}Add(data);
end;
function TSOfficeContainer.InsertAfter(data: any; pos_data: any);
begin
for i:=0 to current_index_ do
begin
obj := bucket_[i];
if ifObj(obj) then
if obj.InsertAfter(data, pos_data) then break;
end
end;
function TSOfficeContainer.Get(): array of tslobj;overload;
begin
arr := array();
@@ -207,6 +219,26 @@ begin
size_++;
end;
function LinkList.InsertAfter(data: any; pos_data: any): boolean;
begin
node := {self.}First();
while ifObj(node) do
begin
if node.data = pos_data then
begin
new_node := new Node();
new_node.data := data;
new_node.next := node.next;
node.next := new_node;
if tail_ = node then tail_ := new_node;
size_++;
return true;
end
node := node.next;
end
return false;
end;
function LinkList.Name(): string;
begin
return name_;