37 lines
771 B
Plaintext
37 lines
771 B
Plaintext
type StyleAdapter = class
|
|
public
|
|
function Create(_obj: Style);
|
|
function Init();
|
|
|
|
function GetTblStylePrByType(_key: string);
|
|
function SetTblStylePrByType(_key: string; _value: tslobj);
|
|
|
|
private
|
|
object_: Style;
|
|
tblstylepr_hash_: tableArray;
|
|
end;
|
|
|
|
function StyleAdapter.Create(_obj: Style);
|
|
begin
|
|
object_ := _obj;
|
|
tblstylepr_hash_ := array();
|
|
{self.}Init();
|
|
end;
|
|
|
|
function StyleAdapter.Init();
|
|
begin
|
|
elements := object_.TblStylePrs();
|
|
for k,v in elements do
|
|
tblstylepr_hash_[v.Type] := v;
|
|
end;
|
|
|
|
function StyleAdapter.GetTblStylePrByType(_key: string);
|
|
begin
|
|
return tblstylepr_hash_[_key];
|
|
end;
|
|
|
|
function StyleAdapter.SetTblStylePrByType(_key: string; _value: tslobj);
|
|
begin
|
|
tblstylepr_hash_[_key] := _value;
|
|
end;
|