Fixed enumerator data type name
This commit is contained in:
parent
1e12269490
commit
9acb394d30
@ -1631,12 +1631,14 @@ begin
|
|||||||
if not AItem.IsCollection then
|
if not AItem.IsCollection then
|
||||||
Exit;
|
Exit;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
case ASection of
|
case ASection of
|
||||||
dxsInterface:
|
dxsInterface:
|
||||||
begin
|
begin
|
||||||
AStream.WriteLnNamedFmt(EnumeratorInterface,
|
AStream.WriteLnNamedFmt(EnumeratorInterface,
|
||||||
['Name', AItem.TranslatedName,
|
['Name', AItem.TranslatedName,
|
||||||
'ItemName', AItem.CollectionItem.TranslatedName,
|
'DataType', GetDataTypeName(AItem.CollectionItem, True),
|
||||||
'GUID', CreateNewGUID]);
|
'GUID', CreateNewGUID]);
|
||||||
AStream.WriteLn('');
|
AStream.WriteLn('');
|
||||||
end;
|
end;
|
||||||
@ -1645,7 +1647,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
AStream.WriteLnNamedFmt(EnumeratorClass,
|
AStream.WriteLnNamedFmt(EnumeratorClass,
|
||||||
['Name', AItem.TranslatedName,
|
['Name', AItem.TranslatedName,
|
||||||
'ItemName', AItem.CollectionItem.TranslatedName]);
|
'DataType', GetDataTypeName(AItem.CollectionItem, True)]);
|
||||||
AStream.WriteLn('');
|
AStream.WriteLn('');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1653,7 +1655,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
AStream.WriteLnNamedFmt(EnumeratorImplementation,
|
AStream.WriteLnNamedFmt(EnumeratorImplementation,
|
||||||
['Name', AItem.TranslatedName,
|
['Name', AItem.TranslatedName,
|
||||||
'ItemName', AItem.CollectionItem.TranslatedName]);
|
'DataType', GetDataTypeName(AItem.CollectionItem, True)]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -98,7 +98,7 @@ const
|
|||||||
XSDValidateMethodImplementationEnd = 'end;' + CrLf;
|
XSDValidateMethodImplementationEnd = 'end;' + CrLf;
|
||||||
|
|
||||||
|
|
||||||
EnumeratorMethodInterface = ' function GetEnumerator: IXML%<Name>:sEnumerator;';
|
EnumeratorMethodInterface = ' function GetEnumerator: %<Name>:sEnumerator;';
|
||||||
EnumeratorMethodImplementation = 'function TXML%<Name>:s.GetEnumerator: IXML%<Name>:sEnumerator;' + CrLf +
|
EnumeratorMethodImplementation = 'function TXML%<Name>:s.GetEnumerator: IXML%<Name>:sEnumerator;' + CrLf +
|
||||||
'begin' + CrLf +
|
'begin' + CrLf +
|
||||||
' Result := TXML%<Name>:sEnumerator.Create(Self);' + CrLf +
|
' Result := TXML%<Name>:sEnumerator.Create(Self);' + CrLf +
|
||||||
@ -107,20 +107,20 @@ const
|
|||||||
|
|
||||||
EnumeratorInterface = ' IXML%<Name>:sEnumerator = interface' + CrLf +
|
EnumeratorInterface = ' IXML%<Name>:sEnumerator = interface' + CrLf +
|
||||||
' %<GUID>:s' + CrLf +
|
' %<GUID>:s' + CrLf +
|
||||||
' function GetCurrent: IXML%<ItemName>:s;' + CrLf +
|
' function GetCurrent: %<DataType>:s;' + CrLf +
|
||||||
' function MoveNext: Boolean;' + CrLf +
|
' function MoveNext: Boolean;' + CrLf +
|
||||||
' property Current: IXML%<ItemName>:s read GetCurrent;' + CrLf +
|
' property Current: %<DataType>:s read GetCurrent;' + CrLf +
|
||||||
' end;' + CrLf;
|
' end;' + CrLf;
|
||||||
|
|
||||||
|
|
||||||
EnumeratorClass = ' TXML%<Name>:sEnumerator = class(TXMLNodeCollectionEnumerator, IXML%<Name>:sEnumerator)' + CrLf +
|
EnumeratorClass = ' TXML%<Name>:sEnumerator = class(TXMLNodeCollectionEnumerator, IXML%<Name>:sEnumerator)' + CrLf +
|
||||||
' protected' + CrLf +
|
' protected' + CrLf +
|
||||||
' function GetCurrent: IXML%<ItemName>:s;' + CrLf +
|
' function GetCurrent: %<DataType>:s;' + CrLf +
|
||||||
' end;' + CrLf;
|
' end;' + CrLf;
|
||||||
|
|
||||||
EnumeratorImplementation = 'function TXML%<Name>:sEnumerator.GetCurrent: IXML%<ItemName>:s;' + CrLf +
|
EnumeratorImplementation = 'function TXML%<Name>:sEnumerator.GetCurrent: %<DataType>:s;' + CrLf +
|
||||||
'begin' + CrLf +
|
'begin' + CrLf +
|
||||||
' Result := (inherited GetCurrent as IXML%<ItemName>:s);' + CrLf +
|
' Result := (inherited GetCurrent as %<DataType>:s);' + CrLf +
|
||||||
'end;' + CrLf;
|
'end;' + CrLf;
|
||||||
|
|
||||||
PropertyIntfMethodGetOptional = ' function GetHas%<PropertyName>:s: Boolean;';
|
PropertyIntfMethodGetOptional = ' function GetHas%<PropertyName>:s: Boolean;';
|
||||||
|
Loading…
Reference in New Issue
Block a user