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