1
0
mirror of synced 2024-12-22 00:53:08 +01:00

Fixed enumerator data type name

This commit is contained in:
Mark van Renswoude 2013-07-03 14:53:48 +00:00
parent 1e12269490
commit 9acb394d30
2 changed files with 11 additions and 9 deletions

View File

@ -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;

View File

@ -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;';