mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 10:09:20 +02:00
* ppudump: Mark objects with abstract methods in the JSON/XML output.
* pas2jni: Properly handle inherited classes when an ancestor has abstract methods. git-svn-id: trunk@35746 -
This commit is contained in:
parent
9093047a7a
commit
ea61dee00b
@ -3349,7 +3349,10 @@ begin
|
|||||||
writeln([space,' IID String : ',objdef.IID]);
|
writeln([space,' IID String : ',objdef.IID]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
writeln([space,' Abstract methods : ',getlongint]);
|
l:=getlongint;
|
||||||
|
if l > 0 then
|
||||||
|
objdef.Options:=objdef.Options + [ooAbstractMethods];
|
||||||
|
writeln([space,' Abstract methods : ',l]);
|
||||||
|
|
||||||
if tobjecttyp(b)=odt_helper then
|
if tobjecttyp(b)=odt_helper then
|
||||||
begin
|
begin
|
||||||
|
@ -256,7 +256,7 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
TPpuObjType = (otUnknown, otClass, otObject, otInterface, otHelper);
|
TPpuObjType = (otUnknown, otClass, otObject, otInterface, otHelper);
|
||||||
TPpuObjOption = (ooIsAbstract, ooCopied);
|
TPpuObjOption = (ooIsAbstract, ooCopied, ooAbstractMethods);
|
||||||
TPpuObjOptions = set of TPpuObjOption;
|
TPpuObjOptions = set of TPpuObjOption;
|
||||||
|
|
||||||
{ TPpuObjectDef }
|
{ TPpuObjectDef }
|
||||||
@ -460,7 +460,7 @@ const
|
|||||||
('', 'class', 'object', 'interface', 'helper');
|
('', 'class', 'object', 'interface', 'helper');
|
||||||
|
|
||||||
ObjOptionNames: array[TPpuObjOption] of string =
|
ObjOptionNames: array[TPpuObjOption] of string =
|
||||||
('abstract','copied');
|
('abstract','copied','abstract_methods');
|
||||||
|
|
||||||
PropOptionNames: array[TPpuPropOption] of string =
|
PropOptionNames: array[TPpuPropOption] of string =
|
||||||
('default');
|
('default');
|
||||||
|
@ -411,6 +411,13 @@ var
|
|||||||
AncestorClass:=TClassDef(_GetRef(it.Get('Ancestor', TJSONObject(nil)), TClassDef));
|
AncestorClass:=TClassDef(_GetRef(it.Get('Ancestor', TJSONObject(nil)), TClassDef));
|
||||||
if CType in [ctObject, ctRecord] then
|
if CType in [ctObject, ctRecord] then
|
||||||
Size:=it.Integers['Size'];
|
Size:=it.Integers['Size'];
|
||||||
|
arr:=it.Get('Options', TJSONArray(nil));
|
||||||
|
if arr <> nil then
|
||||||
|
for j:=0 to arr.Count - 1 do begin
|
||||||
|
s:=arr.Strings[j];
|
||||||
|
if s = 'abstract_methods' then
|
||||||
|
HasAbstractMethods:=True;
|
||||||
|
end;
|
||||||
_ReadDefs(d, it, 'Fields');
|
_ReadDefs(d, it, 'Fields');
|
||||||
end;
|
end;
|
||||||
dtProc, dtProcType:
|
dtProc, dtProcType:
|
||||||
|
Loading…
Reference in New Issue
Block a user