* ppudump: Output the "default" option for properties.

git-svn-id: trunk@26173 -
This commit is contained in:
yury 2013-12-03 14:31:33 +00:00
parent c952076699
commit 7e8ce16f6b
2 changed files with 18 additions and 0 deletions

View File

@ -2509,6 +2509,8 @@ begin
write ([space,' OverrideProp : ']);
readderef('');
end;
if ppo_defaultproperty in propoptions then
Include(TPpuPropDef(def).Options, poDefault);
write ([space,' Prop Type : ']);
readderef('',TPpuPropDef(def).PropType);
writeln([space,' Index : ',getlongint]);

View File

@ -279,6 +279,9 @@ type
constructor Create(AParent: TPpuContainerDef); override;
end;
TPpuPropOption = (poDefault);
TPpuPropOptions = set of TPpuPropOption;
{ TPpuPropDef }
TPpuPropDef = class(TPpuContainerDef)
protected
@ -286,6 +289,7 @@ type
public
PropType: TPpuRef;
Getter, Setter: TPpuRef;
Options: TPpuPropOptions;
constructor Create(AParent: TPpuContainerDef); override;
destructor Destroy; override;
end;
@ -456,6 +460,9 @@ const
ObjOptionNames: array[TPpuObjOption] of string =
('abstract','copied');
PropOptionNames: array[TPpuPropOption] of string =
('default');
ArrayOptionNames: array[TPpuArrayOption] of string =
('dynamic');
@ -807,11 +814,20 @@ end;
{ TPpuPropDef }
procedure TPpuPropDef.BeforeWriteItems(Output: TPpuOutput);
var
opt: TPpuPropOption;
begin
inherited BeforeWriteItems(Output);
PropType.Write(Output, 'PropType');
Getter.Write(Output, 'Getter');
Setter.Write(Output, 'Setter');
if Options <> [] then begin
Output.WriteArrayStart('Options');
for opt:=Low(opt) to High(opt) do
if opt in Options then
Output.WriteStr('', PropOptionNames[opt]);
Output.WriteArrayEnd('Options');
end;
end;
constructor TPpuPropDef.Create(AParent: TPpuContainerDef);