* Added support for interface delegation (Implements)

git-svn-id: trunk@11677 -
This commit is contained in:
michael 2008-08-31 21:25:21 +00:00
parent 461ba64623
commit 53deaee379
2 changed files with 8 additions and 1 deletions

View File

@ -357,7 +357,7 @@ type
function GetDeclaration(full : boolean) : string; override; function GetDeclaration(full : boolean) : string; override;
public public
Args: TList; // List of TPasArgument objects Args: TList; // List of TPasArgument objects
IndexValue, ReadAccessorName, WriteAccessorName, IndexValue, ReadAccessorName, WriteAccessorName,ImplementsName,
StoredAccessorName, DefaultValue: string; StoredAccessorName, DefaultValue: string;
IsDefault, IsNodefault: Boolean; IsDefault, IsNodefault: Boolean;
end; end;
@ -1428,7 +1428,11 @@ begin
else else
S:=' '; S:=' ';
If Full then If Full then
begin
Result:=Name+S+': '+Result; Result:=Name+S+': '+Result;
If (ImplementsName<>'') then
Result:=Result+' implements '+ImplementsName;
end;
If IsDefault then If IsDefault then
Result:=Result+'; default' Result:=Result+'; default'
end; end;

View File

@ -1725,6 +1725,9 @@ begin
if (CurToken = tkIdentifier) and (UpperCase(CurTokenText) = 'WRITE') then if (CurToken = tkIdentifier) and (UpperCase(CurTokenText) = 'WRITE') then
TPasProperty(Element).WriteAccessorName := GetAccessorName TPasProperty(Element).WriteAccessorName := GetAccessorName
else else
if (CurToken = tkIdentifier) and (UpperCase(CurTokenText) = 'IMPLEMENTS') then
TPasProperty(Element).ImplementsName := GetAccessorName
else
// not write accessor will be recheck for another token // not write accessor will be recheck for another token
UngetToken; UngetToken;