* 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 : ']); write ([space,' OverrideProp : ']);
readderef(''); readderef('');
end; end;
if ppo_defaultproperty in propoptions then
Include(TPpuPropDef(def).Options, poDefault);
write ([space,' Prop Type : ']); write ([space,' Prop Type : ']);
readderef('',TPpuPropDef(def).PropType); readderef('',TPpuPropDef(def).PropType);
writeln([space,' Index : ',getlongint]); writeln([space,' Index : ',getlongint]);

View File

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