Added: FS#14 - LoadFromFile/Stream methods missing for Base64Binary properties
Changed: moved to Delphi XE2, changed StreamHelper to StreamWriter descendant Added: 64-bits build, for fun
This commit is contained in:
parent
dc29a0ae51
commit
f3d8ef6968
@ -51,26 +51,26 @@ type
|
|||||||
function TranslateDataType(ADataType: IXMLTypeDef): String;
|
function TranslateDataType(ADataType: IXMLTypeDef): String;
|
||||||
function CreateNewGUID: String;
|
function CreateNewGUID: String;
|
||||||
|
|
||||||
procedure WriteUnitHeader(AStream: TStreamHelper; const ASourceFileName, AFileName: String);
|
procedure WriteUnitHeader(AWriter: TNamedFormatWriter; const ASourceFileName, AFileName: String);
|
||||||
procedure WriteSection(AStream: TStreamHelper; ASection: TDelphiXMLSection; ASchemaList: TXMLSchemaList);
|
procedure WriteSection(AWriter: TNamedFormatWriter; ASection: TDelphiXMLSection; ASchemaList: TXMLSchemaList);
|
||||||
procedure WriteDocumentFunctions(AStream: TStreamHelper; ASection: TDelphiXMLSection; ASchemaList: TXMLSchemaList);
|
procedure WriteDocumentFunctions(AWriter: TNamedFormatWriter; ASection: TDelphiXMLSection; ASchemaList: TXMLSchemaList);
|
||||||
procedure WriteEnumerationConversions(AStream: TStreamHelper; ASection: TDelphiXMLSection; ASchemaList: TXMLSchemaList);
|
procedure WriteEnumerationConversions(AWriter: TNamedFormatWriter; ASection: TDelphiXMLSection; ASchemaList: TXMLSchemaList);
|
||||||
procedure WriteImplementationUses(AStream: TStreamHelper; ASchemaList: TXMLSchemaList);
|
procedure WriteImplementationUses(AWriter: TNamedFormatWriter; ASchemaList: TXMLSchemaList);
|
||||||
procedure WriteDocumentation(AStream: TStreamHelper; AItem: TXMLDataBindingItem);
|
procedure WriteDocumentation(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingItem);
|
||||||
procedure WriteAfterConstruction(AStream: TStreamHelper; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection);
|
procedure WriteAfterConstruction(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection);
|
||||||
function WriteInlineCollectionFields(AStream: TStreamHelper; AItem: TXMLDataBindingInterface): Boolean;
|
function WriteInlineCollectionFields(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingInterface): Boolean;
|
||||||
|
|
||||||
procedure WriteSchemaItem(AStream: TStreamHelper; AItem: TXMLDataBindingItem; ASection: TDelphiXMLSection);
|
procedure WriteSchemaItem(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingItem; ASection: TDelphiXMLSection);
|
||||||
procedure WriteSchemaInterface(AStream: TStreamHelper; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection);
|
procedure WriteSchemaInterface(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection);
|
||||||
procedure WriteSchemaInterfaceProperties(AStream: TStreamHelper; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection);
|
procedure WriteSchemaInterfaceProperties(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection);
|
||||||
function WriteSchemaInterfaceCollectionProperties(AStream: TStreamHelper; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection): Boolean;
|
function WriteSchemaInterfaceCollectionProperties(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection): Boolean;
|
||||||
function WriteSchemaInterfaceProperty(AStream: TStreamHelper; AItem: TXMLDataBindingInterface; AProperty: TXMLDataBindingProperty; ASection: TDelphiXMLSection; AMember: TDelphiXMLMember; ANewLine: Boolean): Boolean;
|
function WriteSchemaInterfaceProperty(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingInterface; AProperty: TXMLDataBindingProperty; ASection: TDelphiXMLSection; AMember: TDelphiXMLMember; ANewLine: Boolean): Boolean;
|
||||||
procedure WriteSchemaEnumeration(AStream: TStreamHelper; AItem: TXMLDataBindingEnumeration; ASection: TDelphiXMLSection);
|
procedure WriteSchemaEnumeration(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingEnumeration; ASection: TDelphiXMLSection);
|
||||||
procedure WriteSchemaEnumerationArray(AStream: TStreamHelper; AItem: TXMLDataBindingEnumeration);
|
procedure WriteSchemaEnumerationArray(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingEnumeration);
|
||||||
|
|
||||||
procedure WriteValidate(AStream: TStreamHelper; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection);
|
procedure WriteValidate(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection);
|
||||||
procedure WriteEnumeratorMethod(AStream: TStreamHelper; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection);
|
procedure WriteEnumeratorMethod(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection);
|
||||||
procedure WriteEnumerator(AStream: TStreamHelper; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection);
|
procedure WriteEnumerator(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection);
|
||||||
|
|
||||||
function GetDelphiNodeType(AProperty: TXMLDataBindingProperty): TDelphiNodeType;
|
function GetDelphiNodeType(AProperty: TXMLDataBindingProperty): TDelphiNodeType;
|
||||||
function GetDelphiElementType(AProperty: TXMLDataBindingProperty): TDelphiElementType;
|
function GetDelphiElementType(AProperty: TXMLDataBindingProperty): TDelphiElementType;
|
||||||
@ -147,7 +147,7 @@ end;
|
|||||||
|
|
||||||
procedure TDelphiXMLDataBindingGenerator.GenerateOutputFile(ASchemaList: TXMLSchemaList; const ASourceFileName, AUnitName: String);
|
procedure TDelphiXMLDataBindingGenerator.GenerateOutputFile(ASchemaList: TXMLSchemaList; const ASourceFileName, AUnitName: String);
|
||||||
var
|
var
|
||||||
unitStream: TStreamHelper;
|
unitWriter: TNamedFormatWriter;
|
||||||
usesClause: String;
|
usesClause: String;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -156,38 +156,38 @@ begin
|
|||||||
if OutputType = otMultiple then
|
if OutputType = otMultiple then
|
||||||
usesClause := GenerateUsesClause(ASchemaList);
|
usesClause := GenerateUsesClause(ASchemaList);
|
||||||
|
|
||||||
unitStream := TStreamHelper.Create(TFileStream.Create(AUnitName, fmCreate), soOwned);
|
unitWriter := TNamedFormatWriter.Create(AUnitName, False, TEncoding.ANSI);
|
||||||
try
|
try
|
||||||
WriteUnitHeader(unitStream, ASourceFileName, AUnitName);
|
WriteUnitHeader(unitWriter, ASourceFileName, AUnitName);
|
||||||
|
|
||||||
unitStream.WriteNamedFmt(UnitInterface,
|
unitWriter.WriteNamedFmt(UnitInterface,
|
||||||
['UsesClause', usesClause]);
|
['UsesClause', usesClause]);
|
||||||
WriteSection(unitStream, dxsForward, ASchemaList);
|
WriteSection(unitWriter, dxsForward, ASchemaList);
|
||||||
|
|
||||||
FProcessedItems := TX2OIHash.Create;
|
FProcessedItems := TX2OIHash.Create;
|
||||||
try
|
try
|
||||||
FProcessedItems.Clear;
|
FProcessedItems.Clear;
|
||||||
WriteSection(unitStream, dxsInterface, ASchemaList);
|
WriteSection(unitWriter, dxsInterface, ASchemaList);
|
||||||
|
|
||||||
FProcessedItems.Clear;
|
FProcessedItems.Clear;
|
||||||
WriteSection(unitStream, dxsClass, ASchemaList);
|
WriteSection(unitWriter, dxsClass, ASchemaList);
|
||||||
finally
|
finally
|
||||||
FreeAndNil(FProcessedItems);
|
FreeAndNil(FProcessedItems);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
WriteDocumentFunctions(unitStream, dxsInterface, ASchemaList);
|
WriteDocumentFunctions(unitWriter, dxsInterface, ASchemaList);
|
||||||
WriteEnumerationConversions(unitStream, dxsInterface, ASchemaList);
|
WriteEnumerationConversions(unitWriter, dxsInterface, ASchemaList);
|
||||||
|
|
||||||
unitStream.Write(UnitImplementation);
|
unitWriter.Write(UnitImplementation);
|
||||||
WriteImplementationUses(unitStream, ASchemaList);
|
WriteImplementationUses(unitWriter, ASchemaList);
|
||||||
WriteDocumentFunctions(unitStream, dxsImplementation, ASchemaList);
|
WriteDocumentFunctions(unitWriter, dxsImplementation, ASchemaList);
|
||||||
WriteEnumerationConversions(unitStream, dxsImplementation, ASchemaList);
|
WriteEnumerationConversions(unitWriter, dxsImplementation, ASchemaList);
|
||||||
|
|
||||||
WriteSection(unitStream, dxsImplementation, ASchemaList);
|
WriteSection(unitWriter, dxsImplementation, ASchemaList);
|
||||||
|
|
||||||
unitStream.Write(unitFooter);
|
unitWriter.Write(unitFooter);
|
||||||
finally
|
finally
|
||||||
FreeAndNil(unitStream);
|
FreeAndNil(unitWriter);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -341,7 +341,7 @@ begin
|
|||||||
{ Remove unsafe characters }
|
{ Remove unsafe characters }
|
||||||
for charIndex := Length(Result) downto 1 do
|
for charIndex := Length(Result) downto 1 do
|
||||||
begin
|
begin
|
||||||
if not (Result[charIndex] in SafeChars) then
|
if not CharInSet(Result[charIndex], SafeChars) then
|
||||||
Delete(Result, charIndex, 1);
|
Delete(Result, charIndex, 1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -349,7 +349,7 @@ begin
|
|||||||
if Length(Result) > 0 then
|
if Length(Result) > 0 then
|
||||||
begin
|
begin
|
||||||
{ Number as the first character is not allowed }
|
{ Number as the first character is not allowed }
|
||||||
if Result[1] in ['0'..'9'] then
|
if CharInSet(Result[1], ['0'..'9']) then
|
||||||
Result := '_' + Result;
|
Result := '_' + Result;
|
||||||
|
|
||||||
|
|
||||||
@ -424,16 +424,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TDelphiXMLDataBindingGenerator.WriteUnitHeader(AStream: TStreamHelper; const ASourceFileName, AFileName: String);
|
procedure TDelphiXMLDataBindingGenerator.WriteUnitHeader(AWriter: TNamedFormatWriter; const ASourceFileName, AFileName: String);
|
||||||
begin
|
begin
|
||||||
AStream.WriteNamedFmt(UnitHeader,
|
AWriter.WriteNamedFmt(UnitHeader,
|
||||||
['SourceFileName', ASourceFileName,
|
['SourceFileName', ASourceFileName,
|
||||||
'UnitName', ChangeFileExt(ExtractFileName(AFileName), ''),
|
'UnitName', ChangeFileExt(ExtractFileName(AFileName), ''),
|
||||||
'DateTime', DateTimeToStr(Now)]);
|
'DateTime', DateTimeToStr(Now)]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TDelphiXMLDataBindingGenerator.WriteSection(AStream: TStreamHelper; ASection: TDelphiXMLSection; ASchemaList: TXMLSchemaList);
|
procedure TDelphiXMLDataBindingGenerator.WriteSection(AWriter: TNamedFormatWriter; ASection: TDelphiXMLSection; ASchemaList: TXMLSchemaList);
|
||||||
var
|
var
|
||||||
schemaIndex: Integer;
|
schemaIndex: Integer;
|
||||||
schema: TXMLDataBindingSchema;
|
schema: TXMLDataBindingSchema;
|
||||||
@ -443,18 +443,18 @@ begin
|
|||||||
for schemaIndex := 0 to Pred(ASchemaList.Count) do
|
for schemaIndex := 0 to Pred(ASchemaList.Count) do
|
||||||
begin
|
begin
|
||||||
schema := ASchemaList[schemaIndex];
|
schema := ASchemaList[schemaIndex];
|
||||||
AStream.WriteLnNamedFmt(SectionComments[ASection],
|
AWriter.WriteLineNamedFmt(SectionComments[ASection],
|
||||||
['SchemaName', schema.SchemaName]);
|
['SchemaName', schema.SchemaName]);
|
||||||
|
|
||||||
for itemIndex := 0 to Pred(schema.ItemCount) do
|
for itemIndex := 0 to Pred(schema.ItemCount) do
|
||||||
WriteSchemaItem(AStream, schema.Items[itemIndex], ASection);
|
WriteSchemaItem(AWriter, schema.Items[itemIndex], ASection);
|
||||||
|
|
||||||
AStream.WriteLn;
|
AWriter.WriteLine;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TDelphiXMLDataBindingGenerator.WriteDocumentFunctions(AStream: TStreamHelper; ASection: TDelphiXMLSection; ASchemaList: TXMLSchemaList);
|
procedure TDelphiXMLDataBindingGenerator.WriteDocumentFunctions(AWriter: TNamedFormatWriter; ASection: TDelphiXMLSection; ASchemaList: TXMLSchemaList);
|
||||||
var
|
var
|
||||||
schemaIndex: Integer;
|
schemaIndex: Integer;
|
||||||
schema: TXMLDataBindingSchema;
|
schema: TXMLDataBindingSchema;
|
||||||
@ -485,9 +485,9 @@ begin
|
|||||||
if not hasItem then
|
if not hasItem then
|
||||||
begin
|
begin
|
||||||
if ASection = dxsInterface then
|
if ASection = dxsInterface then
|
||||||
AStream.Write(' ');
|
AWriter.Write(' ');
|
||||||
|
|
||||||
AStream.WriteLn('{ Document functions }');
|
AWriter.WriteLine('{ Document functions }');
|
||||||
hasItem := True;
|
hasItem := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -501,13 +501,13 @@ begin
|
|||||||
dxsImplementation: Add(DocumentFunctionsImplementation);
|
dxsImplementation: Add(DocumentFunctionsImplementation);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
AStream.Write(Format(['SourceName', interfaceItem.Name,
|
AWriter.Write(Format(['SourceName', interfaceItem.Name,
|
||||||
'Name', interfaceItem.TranslatedName]));
|
'Name', interfaceItem.TranslatedName]));
|
||||||
finally
|
finally
|
||||||
Free;
|
Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
AStream.WriteLn;
|
AWriter.WriteLine;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -515,15 +515,15 @@ begin
|
|||||||
|
|
||||||
if (ASection = dxsInterface) and hasItem then
|
if (ASection = dxsInterface) and hasItem then
|
||||||
begin
|
begin
|
||||||
AStream.WriteLn('const');
|
AWriter.WriteLine('const');
|
||||||
AStream.WriteLnFmt(' TargetNamespace = ''%s'';', [nameSpace]);
|
AWriter.WriteLine(' TargetNamespace = ''%s'';', [nameSpace]);
|
||||||
AStream.WriteLn;
|
AWriter.WriteLine;
|
||||||
AStream.WriteLn;
|
AWriter.WriteLine;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TDelphiXMLDataBindingGenerator.WriteEnumerationConversions(AStream: TStreamHelper; ASection: TDelphiXMLSection; ASchemaList: TXMLSchemaList);
|
procedure TDelphiXMLDataBindingGenerator.WriteEnumerationConversions(AWriter: TNamedFormatWriter; ASection: TDelphiXMLSection; ASchemaList: TXMLSchemaList);
|
||||||
var
|
var
|
||||||
enumerations: TObjectList;
|
enumerations: TObjectList;
|
||||||
schemaIndex: Integer;
|
schemaIndex: Integer;
|
||||||
@ -560,18 +560,18 @@ begin
|
|||||||
if ASection = dxsInterface then
|
if ASection = dxsInterface then
|
||||||
begin
|
begin
|
||||||
{ Enumeration value arrays }
|
{ Enumeration value arrays }
|
||||||
AStream.WriteLn('const');
|
AWriter.WriteLine('const');
|
||||||
|
|
||||||
for itemIndex := 0 to Pred(enumerations.Count) do
|
for itemIndex := 0 to Pred(enumerations.Count) do
|
||||||
WriteSchemaEnumerationArray(AStream, TXMLDataBindingEnumeration(enumerations[itemIndex]));
|
WriteSchemaEnumerationArray(AWriter, TXMLDataBindingEnumeration(enumerations[itemIndex]));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ Conversion helpers }
|
{ Conversion helpers }
|
||||||
if ASection = dxsInterface then
|
if ASection = dxsInterface then
|
||||||
AStream.Write(' ');
|
AWriter.Write(' ');
|
||||||
|
|
||||||
AStream.WriteLn('{ Enumeration conversion helpers }');
|
AWriter.WriteLine('{ Enumeration conversion helpers }');
|
||||||
|
|
||||||
|
|
||||||
for itemIndex := Pred(enumerations.Count) downto 0 do
|
for itemIndex := Pred(enumerations.Count) downto 0 do
|
||||||
@ -603,14 +603,14 @@ begin
|
|||||||
sourceCode.AddLn;
|
sourceCode.AddLn;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
AStream.Write(sourceCode.Format(['ItemName', enumerationItem.TranslatedName,
|
AWriter.Write(sourceCode.Format(['ItemName', enumerationItem.TranslatedName,
|
||||||
'DataType', PrefixClass + enumerationItem.TranslatedName]));
|
'DataType', PrefixClass + enumerationItem.TranslatedName]));
|
||||||
finally
|
finally
|
||||||
FreeAndNil(sourceCode);
|
FreeAndNil(sourceCode);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
AStream.WriteLn;
|
AWriter.WriteLine;
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
FreeAndNil(enumerations);
|
FreeAndNil(enumerations);
|
||||||
@ -618,17 +618,17 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TDelphiXMLDataBindingGenerator.WriteImplementationUses(AStream: TStreamHelper; ASchemaList: TXMLSchemaList);
|
procedure TDelphiXMLDataBindingGenerator.WriteImplementationUses(AWriter: TNamedFormatWriter; ASchemaList: TXMLSchemaList);
|
||||||
begin
|
begin
|
||||||
{ In ye olde days this is where we checked if XMLDataBindingUtils was required. With the
|
{ In ye olde days this is where we checked if XMLDataBindingUtils was required. With the
|
||||||
introduction of the IXSDValidate, this is practically always the case. }
|
introduction of the IXSDValidate, this is practically always the case. }
|
||||||
AStream.WriteLn('uses');
|
AWriter.WriteLine('uses');
|
||||||
AStream.WriteLn(' SysUtils;');
|
AWriter.WriteLine(' SysUtils;');
|
||||||
AStream.WriteLn;
|
AWriter.WriteLine;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TDelphiXMLDataBindingGenerator.WriteDocumentation(AStream: TStreamHelper; AItem: TXMLDataBindingItem);
|
procedure TDelphiXMLDataBindingGenerator.WriteDocumentation(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingItem);
|
||||||
var
|
var
|
||||||
documentation: String;
|
documentation: String;
|
||||||
lineIndex: Integer;
|
lineIndex: Integer;
|
||||||
@ -648,27 +648,27 @@ begin
|
|||||||
|
|
||||||
lines.Text := WrapText(documentation, 76);
|
lines.Text := WrapText(documentation, 76);
|
||||||
|
|
||||||
AStream.WriteLn(' {');
|
AWriter.WriteLine(' {');
|
||||||
for lineIndex := 0 to Pred(lines.Count) do
|
for lineIndex := 0 to Pred(lines.Count) do
|
||||||
AStream.WriteLn(' ' + lines[lineIndex]);
|
AWriter.WriteLine(' ' + lines[lineIndex]);
|
||||||
|
|
||||||
AStream.WriteLn(' }');
|
AWriter.WriteLine(' }');
|
||||||
finally
|
finally
|
||||||
FreeAndNil(lines);
|
FreeAndNil(lines);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TDelphiXMLDataBindingGenerator.WriteSchemaItem(AStream: TStreamHelper; AItem: TXMLDataBindingItem; ASection: TDelphiXMLSection);
|
procedure TDelphiXMLDataBindingGenerator.WriteSchemaItem(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingItem; ASection: TDelphiXMLSection);
|
||||||
begin
|
begin
|
||||||
case AItem.ItemType of
|
case AItem.ItemType of
|
||||||
itInterface: WriteSchemaInterface(AStream, TXMLDataBindingInterface(AItem), ASection);
|
itInterface: WriteSchemaInterface(AWriter, TXMLDataBindingInterface(AItem), ASection);
|
||||||
itEnumeration: WriteSchemaEnumeration(AStream, TXMLDataBindingEnumeration(AItem), ASection);
|
itEnumeration: WriteSchemaEnumeration(AWriter, TXMLDataBindingEnumeration(AItem), ASection);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TDelphiXMLDataBindingGenerator.WriteSchemaInterface(AStream: TStreamHelper; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection);
|
procedure TDelphiXMLDataBindingGenerator.WriteSchemaInterface(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection);
|
||||||
var
|
var
|
||||||
parent: String;
|
parent: String;
|
||||||
|
|
||||||
@ -681,7 +681,7 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
|
|
||||||
if Assigned(AItem.BaseItem) then
|
if Assigned(AItem.BaseItem) then
|
||||||
WriteSchemaInterface(AStream, AItem.BaseItem, ASection);
|
WriteSchemaInterface(AWriter, AItem.BaseItem, ASection);
|
||||||
|
|
||||||
ProcessedItems[AItem] := 1;
|
ProcessedItems[AItem] := 1;
|
||||||
end;
|
end;
|
||||||
@ -689,7 +689,7 @@ begin
|
|||||||
|
|
||||||
case ASection of
|
case ASection of
|
||||||
dxsForward:
|
dxsForward:
|
||||||
AStream.WriteLnNamedFmt(InterfaceItemForward,
|
AWriter.WriteLineNamedFmt(InterfaceItemForward,
|
||||||
['Name', AItem.TranslatedName]);
|
['Name', AItem.TranslatedName]);
|
||||||
|
|
||||||
dxsInterface:
|
dxsInterface:
|
||||||
@ -699,21 +699,21 @@ begin
|
|||||||
else if AItem.IsCollection then
|
else if AItem.IsCollection then
|
||||||
begin
|
begin
|
||||||
parent := CollectionInterface;
|
parent := CollectionInterface;
|
||||||
WriteEnumerator(AStream, AItem, ASection);
|
WriteEnumerator(AWriter, AItem, ASection);
|
||||||
end else
|
end else
|
||||||
parent := ItemInterface;
|
parent := ItemInterface;
|
||||||
|
|
||||||
|
|
||||||
WriteDocumentation(AStream, AItem);
|
WriteDocumentation(AWriter, AItem);
|
||||||
AStream.WriteLnNamedFmt(InterfaceItemInterface,
|
AWriter.WriteLineNamedFmt(InterfaceItemInterface,
|
||||||
['Name', AItem.TranslatedName,
|
['Name', AItem.TranslatedName,
|
||||||
'ParentName', parent]);
|
'ParentName', parent]);
|
||||||
AStream.WriteLn(' ' + CreateNewGUID);
|
AWriter.WriteLine(' ' + CreateNewGUID);
|
||||||
|
|
||||||
WriteSchemaInterfaceProperties(AStream, AItem, ASection);
|
WriteSchemaInterfaceProperties(AWriter, AItem, ASection);
|
||||||
|
|
||||||
AStream.WriteLn(' end;');
|
AWriter.WriteLine(' end;');
|
||||||
AStream.WriteLn;
|
AWriter.WriteLine;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
dxsClass:
|
dxsClass:
|
||||||
@ -723,7 +723,7 @@ begin
|
|||||||
else if AItem.IsCollection then
|
else if AItem.IsCollection then
|
||||||
begin
|
begin
|
||||||
parent := CollectionClass;
|
parent := CollectionClass;
|
||||||
WriteEnumerator(AStream, AItem, ASection);
|
WriteEnumerator(AWriter, AItem, ASection);
|
||||||
end else
|
end else
|
||||||
parent := ItemClass;
|
parent := ItemClass;
|
||||||
|
|
||||||
@ -732,26 +732,26 @@ begin
|
|||||||
parent := parent + ', ' + XSDValidateInterface;
|
parent := parent + ', ' + XSDValidateInterface;
|
||||||
|
|
||||||
|
|
||||||
AStream.WriteLnNamedFmt(InterfaceItemClass,
|
AWriter.WriteLineNamedFmt(InterfaceItemClass,
|
||||||
['Name', AItem.TranslatedName,
|
['Name', AItem.TranslatedName,
|
||||||
'ParentName', parent]);
|
'ParentName', parent]);
|
||||||
|
|
||||||
WriteSchemaInterfaceProperties(AStream, AItem, ASection);
|
WriteSchemaInterfaceProperties(AWriter, AItem, ASection);
|
||||||
|
|
||||||
AStream.WriteLn(' end;');
|
AWriter.WriteLine(' end;');
|
||||||
AStream.WriteLn;
|
AWriter.WriteLine;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
dxsImplementation:
|
dxsImplementation:
|
||||||
begin
|
begin
|
||||||
WriteEnumerator(AStream, AItem, ASection);
|
WriteEnumerator(AWriter, AItem, ASection);
|
||||||
WriteSchemaInterfaceProperties(AStream, AItem, ASection);
|
WriteSchemaInterfaceProperties(AWriter, AItem, ASection);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TDelphiXMLDataBindingGenerator.WriteAfterConstruction(AStream: TStreamHelper; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection);
|
procedure TDelphiXMLDataBindingGenerator.WriteAfterConstruction(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection);
|
||||||
var
|
var
|
||||||
hasPrototype: Boolean;
|
hasPrototype: Boolean;
|
||||||
|
|
||||||
@ -763,14 +763,14 @@ var
|
|||||||
case ASection of
|
case ASection of
|
||||||
dxsClass:
|
dxsClass:
|
||||||
begin
|
begin
|
||||||
AStream.WriteLn(' public');
|
AWriter.WriteLine(' public');
|
||||||
AStream.WriteLn(' procedure AfterConstruction; override;');
|
AWriter.WriteLine(' procedure AfterConstruction; override;');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
dxsImplementation:
|
dxsImplementation:
|
||||||
begin
|
begin
|
||||||
AStream.WriteLnFmt('procedure TXML%s.AfterConstruction;', [AItem.TranslatedName]);
|
AWriter.WriteLine('procedure TXML%s.AfterConstruction;', [AItem.TranslatedName]);
|
||||||
AStream.WriteLn('begin');
|
AWriter.WriteLine('begin');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -790,7 +790,7 @@ begin
|
|||||||
|
|
||||||
if (ASection = dxsClass) and
|
if (ASection = dxsClass) and
|
||||||
(not AItem.IsCollection) then
|
(not AItem.IsCollection) then
|
||||||
WriteInlineCollectionFields(AStream, AItem);
|
WriteInlineCollectionFields(AWriter, AItem);
|
||||||
|
|
||||||
|
|
||||||
hasPrototype := False;
|
hasPrototype := False;
|
||||||
@ -809,17 +809,17 @@ begin
|
|||||||
if propertyItem.PropertyType = ptItem then
|
if propertyItem.PropertyType = ptItem then
|
||||||
begin
|
begin
|
||||||
if propertyItem.HasTargetNamespace then
|
if propertyItem.HasTargetNamespace then
|
||||||
AStream.WriteLnNamedFmt(' RegisterChildNode(''%<ItemSourceName>:s'', %<ItemClass>:s, ''%<Namespace>:s'');',
|
AWriter.WriteLineNamedFmt(' RegisterChildNode(''%<ItemSourceName>:s'', %<ItemClass>:s, ''%<Namespace>:s'');',
|
||||||
['ItemSourceName', propertyItem.Name,
|
['ItemSourceName', propertyItem.Name,
|
||||||
'ItemClass', GetDataTypeName(propertyItem, False),
|
'ItemClass', GetDataTypeName(propertyItem, False),
|
||||||
'Namespace', propertyItem.TargetNamespace])
|
'Namespace', propertyItem.TargetNamespace])
|
||||||
else
|
else
|
||||||
AStream.WriteLnNamedFmt(' RegisterChildNode(''%<ItemSourceName>:s'', %<ItemClass>:s);',
|
AWriter.WriteLineNamedFmt(' RegisterChildNode(''%<ItemSourceName>:s'', %<ItemClass>:s);',
|
||||||
['ItemSourceName', propertyItem.Name,
|
['ItemSourceName', propertyItem.Name,
|
||||||
'ItemClass', GetDataTypeName(propertyItem, False)]);
|
'ItemClass', GetDataTypeName(propertyItem, False)]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
AStream.WriteLnNamedFmt(' %<FieldName>:s := CreateCollection(%<CollectionClass>:s, %<ItemInterface>:s, ''%<ItemSourceName>:s'') as %<CollectionInterface>:s;',
|
AWriter.WriteLineNamedFmt(' %<FieldName>:s := CreateCollection(%<CollectionClass>:s, %<ItemInterface>:s, ''%<ItemSourceName>:s'') as %<CollectionInterface>:s;',
|
||||||
['FieldName', PrefixField + propertyItem.TranslatedName,
|
['FieldName', PrefixField + propertyItem.TranslatedName,
|
||||||
'CollectionClass', PrefixClass + propertyItem.Collection.TranslatedName,
|
'CollectionClass', PrefixClass + propertyItem.Collection.TranslatedName,
|
||||||
'CollectionInterface', PrefixInterface + propertyItem.Collection.TranslatedName,
|
'CollectionInterface', PrefixInterface + propertyItem.Collection.TranslatedName,
|
||||||
@ -848,12 +848,12 @@ begin
|
|||||||
WritePrototype;
|
WritePrototype;
|
||||||
|
|
||||||
if propertyItem.HasTargetNamespace then
|
if propertyItem.HasTargetNamespace then
|
||||||
AStream.WriteLnNamedFmt(' RegisterChildNode(''%<SourceName>:s'', TXML%<Name>:s, ''%<Namespace>:s'');',
|
AWriter.WriteLineNamedFmt(' RegisterChildNode(''%<SourceName>:s'', TXML%<Name>:s, ''%<Namespace>:s'');',
|
||||||
['SourceName', propertyItem.Name,
|
['SourceName', propertyItem.Name,
|
||||||
'Name', itemProperty.Item.TranslatedName,
|
'Name', itemProperty.Item.TranslatedName,
|
||||||
'Namespace', propertyItem.TargetNamespace])
|
'Namespace', propertyItem.TargetNamespace])
|
||||||
else
|
else
|
||||||
AStream.WriteLnNamedFmt(' RegisterChildNode(''%<SourceName>:s'', TXML%<Name>:s);',
|
AWriter.WriteLineNamedFmt(' RegisterChildNode(''%<SourceName>:s'', TXML%<Name>:s);',
|
||||||
['SourceName', propertyItem.Name,
|
['SourceName', propertyItem.Name,
|
||||||
'Name', itemProperty.Item.TranslatedName]);
|
'Name', itemProperty.Item.TranslatedName]);
|
||||||
end;
|
end;
|
||||||
@ -871,32 +871,32 @@ begin
|
|||||||
begin
|
begin
|
||||||
WritePrototype;
|
WritePrototype;
|
||||||
if AItem.CollectionItem.HasTargetNamespace then
|
if AItem.CollectionItem.HasTargetNamespace then
|
||||||
AStream.WriteLnNamedFmt(' RegisterChildNode(''%<SourceName>:s'', %<DataClass>:s, ''%<Namespace>:s'');',
|
AWriter.WriteLineNamedFmt(' RegisterChildNode(''%<SourceName>:s'', %<DataClass>:s, ''%<Namespace>:s'');',
|
||||||
['SourceName', AItem.CollectionItem.Name,
|
['SourceName', AItem.CollectionItem.Name,
|
||||||
'DataClass', GetDataTypeName(AItem.CollectionItem, False),
|
'DataClass', GetDataTypeName(AItem.CollectionItem, False),
|
||||||
'Namespace', AItem.CollectionItem.TargetNamespace])
|
'Namespace', AItem.CollectionItem.TargetNamespace])
|
||||||
else
|
else
|
||||||
AStream.WriteLnNamedFmt(' RegisterChildNode(''%<SourceName>:s'', %<DataClass>:s);',
|
AWriter.WriteLineNamedFmt(' RegisterChildNode(''%<SourceName>:s'', %<DataClass>:s);',
|
||||||
['SourceName', AItem.CollectionItem.Name,
|
['SourceName', AItem.CollectionItem.Name,
|
||||||
'DataClass', GetDataTypeName(AItem.CollectionItem, False)]);
|
'DataClass', GetDataTypeName(AItem.CollectionItem, False)]);
|
||||||
|
|
||||||
AStream.WriteLn;
|
AWriter.WriteLine;
|
||||||
AStream.WriteLnFmt(' ItemTag := ''%s'';', [AItem.CollectionItem.Name]);
|
AWriter.WriteLine(' ItemTag := ''%s'';', [AItem.CollectionItem.Name]);
|
||||||
AStream.WriteLnFmt(' ItemInterface := %s;', [GetDataTypeName(AItem.CollectionItem, True)]);
|
AWriter.WriteLine(' ItemInterface := %s;', [GetDataTypeName(AItem.CollectionItem, True)]);
|
||||||
AStream.WriteLn;
|
AWriter.WriteLine;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if hasPrototype and (ASection = dxsImplementation) then
|
if hasPrototype and (ASection = dxsImplementation) then
|
||||||
begin
|
begin
|
||||||
AStream.WriteLn(' inherited;');
|
AWriter.WriteLine(' inherited;');
|
||||||
AStream.WriteLn('end;');
|
AWriter.WriteLine('end;');
|
||||||
AStream.WriteLn;
|
AWriter.WriteLine;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function TDelphiXMLDataBindingGenerator.WriteInlineCollectionFields(AStream: TStreamHelper; AItem: TXMLDataBindingInterface): Boolean;
|
function TDelphiXMLDataBindingGenerator.WriteInlineCollectionFields(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingInterface): Boolean;
|
||||||
var
|
var
|
||||||
propertyIndex: Integer;
|
propertyIndex: Integer;
|
||||||
collectionProperty: TXMLDataBindingProperty;
|
collectionProperty: TXMLDataBindingProperty;
|
||||||
@ -913,11 +913,11 @@ begin
|
|||||||
begin
|
begin
|
||||||
if not Result then
|
if not Result then
|
||||||
begin
|
begin
|
||||||
AStream.WriteLn(' private');
|
AWriter.WriteLine(' private');
|
||||||
Result := True;
|
Result := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
AStream.WriteLnNamedFmt(' %<PropertyName>:s: %<DataInterface>:s;',
|
AWriter.WriteLineNamedFmt(' %<PropertyName>:s: %<DataInterface>:s;',
|
||||||
['PropertyName', PrefixField + collectionProperty.TranslatedName,
|
['PropertyName', PrefixField + collectionProperty.TranslatedName,
|
||||||
'DataInterface', PrefixInterface + collectionProperty.Collection.TranslatedName]);
|
'DataInterface', PrefixInterface + collectionProperty.Collection.TranslatedName]);
|
||||||
end;
|
end;
|
||||||
@ -925,7 +925,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TDelphiXMLDataBindingGenerator.WriteSchemaInterfaceProperties(AStream: TStreamHelper; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection);
|
procedure TDelphiXMLDataBindingGenerator.WriteSchemaInterfaceProperties(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection);
|
||||||
var
|
var
|
||||||
propertyIndex: Integer;
|
propertyIndex: Integer;
|
||||||
itemProperty: TXMLDataBindingProperty;
|
itemProperty: TXMLDataBindingProperty;
|
||||||
@ -938,14 +938,14 @@ begin
|
|||||||
Exit;
|
Exit;
|
||||||
|
|
||||||
if ASection in [dxsClass, dxsImplementation] then
|
if ASection in [dxsClass, dxsImplementation] then
|
||||||
WriteAfterConstruction(AStream, AItem, ASection);
|
WriteAfterConstruction(AWriter, AItem, ASection);
|
||||||
|
|
||||||
if ASection = dxsClass then
|
if ASection = dxsClass then
|
||||||
AStream.WriteLn(' protected');
|
AWriter.WriteLine(' protected');
|
||||||
|
|
||||||
WriteValidate(AStream, AItem, ASection);
|
WriteValidate(AWriter, AItem, ASection);
|
||||||
WriteEnumeratorMethod(AStream, AItem, ASection);
|
WriteEnumeratorMethod(AWriter, AItem, ASection);
|
||||||
hasMembers := WriteSchemaInterfaceCollectionProperties(AStream, AItem, ASection);
|
hasMembers := WriteSchemaInterfaceCollectionProperties(AWriter, AItem, ASection);
|
||||||
|
|
||||||
for member := Low(TDelphiXMLMember) to High(TDelphiXMLMember) do
|
for member := Low(TDelphiXMLMember) to High(TDelphiXMLMember) do
|
||||||
begin
|
begin
|
||||||
@ -955,7 +955,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
itemProperty := AItem.Properties[propertyIndex];
|
itemProperty := AItem.Properties[propertyIndex];
|
||||||
|
|
||||||
if WriteSchemaInterfaceProperty(AStream, AItem, itemProperty, ASection, member,
|
if WriteSchemaInterfaceProperty(AWriter, AItem, itemProperty, ASection, member,
|
||||||
hasMembers and firstMember and (ASection in [dxsInterface, dxsClass])) then
|
hasMembers and firstMember and (ASection in [dxsInterface, dxsClass])) then
|
||||||
begin
|
begin
|
||||||
firstMember := False;
|
firstMember := False;
|
||||||
@ -966,7 +966,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function TDelphiXMLDataBindingGenerator.WriteSchemaInterfaceCollectionProperties(AStream: TStreamHelper; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection): Boolean;
|
function TDelphiXMLDataBindingGenerator.WriteSchemaInterfaceCollectionProperties(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection): Boolean;
|
||||||
var
|
var
|
||||||
dataIntfName: String;
|
dataIntfName: String;
|
||||||
dataTypeName: String;
|
dataTypeName: String;
|
||||||
@ -1092,7 +1092,7 @@ begin
|
|||||||
Result := (sourceCode.Count > 0);
|
Result := (sourceCode.Count > 0);
|
||||||
|
|
||||||
if Result then
|
if Result then
|
||||||
AStream.Write(sourceCode.Format(['Name', AItem.TranslatedName,
|
AWriter.Write(sourceCode.Format(['Name', AItem.TranslatedName,
|
||||||
'ItemName', AItem.CollectionItem.TranslatedName,
|
'ItemName', AItem.CollectionItem.TranslatedName,
|
||||||
'ItemSourceName', AItem.CollectionItem.Name,
|
'ItemSourceName', AItem.CollectionItem.Name,
|
||||||
'DataType', dataTypeName,
|
'DataType', dataTypeName,
|
||||||
@ -1104,12 +1104,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function TDelphiXMLDataBindingGenerator.WriteSchemaInterfaceProperty(AStream: TStreamHelper; AItem: TXMLDataBindingInterface; AProperty: TXMLDataBindingProperty; ASection: TDelphiXMLSection; AMember: TDelphiXMLMember; ANewLine: Boolean): Boolean;
|
function TDelphiXMLDataBindingGenerator.WriteSchemaInterfaceProperty(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingInterface; AProperty: TXMLDataBindingProperty; ASection: TDelphiXMLSection; AMember: TDelphiXMLMember; ANewLine: Boolean): Boolean;
|
||||||
|
|
||||||
procedure WriteNewLine;
|
procedure WriteNewLine;
|
||||||
begin
|
begin
|
||||||
if ANewLine then
|
if ANewLine then
|
||||||
AStream.WriteLn;
|
AWriter.WriteLine;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -1140,6 +1140,7 @@ var
|
|||||||
fieldName: String;
|
fieldName: String;
|
||||||
writeStream: Boolean;
|
writeStream: Boolean;
|
||||||
typeMapping: TTypeMapping;
|
typeMapping: TTypeMapping;
|
||||||
|
elementType: TDelphiElementType;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
@ -1157,7 +1158,7 @@ begin
|
|||||||
AProperty.IsOptional;
|
AProperty.IsOptional;
|
||||||
|
|
||||||
writeStream := False;
|
writeStream := False;
|
||||||
if (AMember = dxmPropertyGet) and (AProperty.PropertyType = ptSimple) then
|
if (AMember = dxmPropertyMethods) and (AProperty.PropertyType = ptSimple) then
|
||||||
begin
|
begin
|
||||||
if GetDataTypeMapping(TXMLDataBindingSimpleProperty(AProperty).DataType, typeMapping) then
|
if GetDataTypeMapping(TXMLDataBindingSimpleProperty(AProperty).DataType, typeMapping) then
|
||||||
writeStream := (typeMapping.Conversion = tcBase64);
|
writeStream := (typeMapping.Conversion = tcBase64);
|
||||||
@ -1227,12 +1228,6 @@ begin
|
|||||||
if writeTextProp then
|
if writeTextProp then
|
||||||
sourceCode.Add(PropertyIntfMethodGetText);
|
sourceCode.Add(PropertyIntfMethodGetText);
|
||||||
|
|
||||||
if writeStream then
|
|
||||||
begin
|
|
||||||
sourceCode.Add(PropertyIntfMethodStream);
|
|
||||||
sourceCode.Add(PropertyIntfMethodFile);
|
|
||||||
end;
|
|
||||||
|
|
||||||
sourceCode.Add(PropertyIntfMethodGet);
|
sourceCode.Add(PropertyIntfMethodGet);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1250,6 +1245,15 @@ begin
|
|||||||
sourceCode.Add(PropertyIntfMethodSet);
|
sourceCode.Add(PropertyIntfMethodSet);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
dxmPropertyMethods:
|
||||||
|
if writeStream then
|
||||||
|
begin
|
||||||
|
sourceCode.Add(PropertyIntfMethodLoadFromStream);
|
||||||
|
sourceCode.Add(PropertyIntfMethodLoadFromFile);
|
||||||
|
sourceCode.Add(PropertyIntfMethodSaveToStream);
|
||||||
|
sourceCode.Add(PropertyIntfMethodSaveToFile);
|
||||||
|
end;
|
||||||
|
|
||||||
dxmPropertyDeclaration:
|
dxmPropertyDeclaration:
|
||||||
if ASection = dxsInterface then
|
if ASection = dxsInterface then
|
||||||
begin
|
begin
|
||||||
@ -1286,28 +1290,23 @@ begin
|
|||||||
case AMember of
|
case AMember of
|
||||||
dxmPropertyGet:
|
dxmPropertyGet:
|
||||||
begin
|
begin
|
||||||
|
elementType := GetDelphiElementType(AProperty);
|
||||||
WriteNewLine;
|
WriteNewLine;
|
||||||
|
|
||||||
if writeOptional then
|
if writeOptional then
|
||||||
if AProperty.IsAttribute then
|
if AProperty.IsAttribute then
|
||||||
sourceCode.Add(PropertyImplMethodGetOptionalAttr)
|
sourceCode.Add(PropertyImplMethodGetOptionalAttr)
|
||||||
else
|
else
|
||||||
sourceCode.Add(PropertyImplMethodGetOptional[GetDelphiElementType(AProperty)]);
|
sourceCode.Add(PropertyImplMethodGetOptional[elementType]);
|
||||||
|
|
||||||
if writeNil then
|
if writeNil then
|
||||||
sourceCode.Add(PropertyImplMethodGetNil[GetDelphiElementType(AProperty)]);
|
sourceCode.Add(PropertyImplMethodGetNil[elementType]);
|
||||||
|
|
||||||
if writeTextProp then
|
if writeTextProp then
|
||||||
if AProperty.IsAttribute then
|
if AProperty.IsAttribute then
|
||||||
sourceCode.Add(PropertyImplMethodGetTextAttr)
|
sourceCode.Add(PropertyImplMethodGetTextAttr)
|
||||||
else
|
else
|
||||||
sourceCode.Add(PropertyImplMethodGetText[GetDelphiElementType(AProperty)]);
|
sourceCode.Add(PropertyImplMethodGetText[elementType]);
|
||||||
|
|
||||||
if writeStream then
|
|
||||||
begin
|
|
||||||
sourceCode.Add(PropertyImplMethodStream[GetDelphiElementType(AProperty)]);
|
|
||||||
sourceCode.Add(PropertyImplMethodFile[GetDelphiElementType(AProperty)]);
|
|
||||||
end;
|
|
||||||
|
|
||||||
sourceCode.Add('function TXML%<Name>:s.Get%<PropertyName>:s: %<DataType>:s;');
|
sourceCode.Add('function TXML%<Name>:s.Get%<PropertyName>:s: %<DataType>:s;');
|
||||||
|
|
||||||
@ -1322,7 +1321,7 @@ begin
|
|||||||
sourceCode.Add(XMLToNativeDataType('Result',
|
sourceCode.Add(XMLToNativeDataType('Result',
|
||||||
'%<PropertySourceName>:s',
|
'%<PropertySourceName>:s',
|
||||||
TXMLDataBindingSimpleProperty(AProperty).DataType,
|
TXMLDataBindingSimpleProperty(AProperty).DataType,
|
||||||
GetDelphiNodeType(AProperty),
|
elementType,
|
||||||
AProperty.TargetNamespace));
|
AProperty.TargetNamespace));
|
||||||
|
|
||||||
ptItem:
|
ptItem:
|
||||||
@ -1363,19 +1362,21 @@ begin
|
|||||||
|
|
||||||
sourceCode.AddLn;
|
sourceCode.AddLn;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
dxmPropertySet:
|
dxmPropertySet:
|
||||||
if not IsReadOnly(AProperty) then
|
if not IsReadOnly(AProperty) then
|
||||||
begin
|
begin
|
||||||
|
elementType := GetDelphiElementType(AProperty);
|
||||||
WriteNewLine;
|
WriteNewLine;
|
||||||
|
|
||||||
if writeNil then
|
if writeNil then
|
||||||
sourceCode.Add(PropertyImplMethodSetNil[GetDelphiElementType(AProperty)]);
|
sourceCode.Add(PropertyImplMethodSetNil[elementType]);
|
||||||
|
|
||||||
if writeTextProp then
|
if writeTextProp then
|
||||||
if AProperty.IsAttribute then
|
if AProperty.IsAttribute then
|
||||||
sourceCode.Add(PropertyImplMethodSetTextAttr)
|
sourceCode.Add(PropertyImplMethodSetTextAttr)
|
||||||
else
|
else
|
||||||
sourceCode.Add(PropertyImplMethodSetText[GetDelphiElementType(AProperty)]);
|
sourceCode.Add(PropertyImplMethodSetText[elementType]);
|
||||||
|
|
||||||
sourceCode.Add('procedure TXML%<Name>:s.Set%<PropertyName>:s(const Value: %<DataType>:s);');
|
sourceCode.Add('procedure TXML%<Name>:s.Set%<PropertyName>:s(const Value: %<DataType>:s);');
|
||||||
value := '%<PropertySourceName>:s';
|
value := '%<PropertySourceName>:s';
|
||||||
@ -1383,7 +1384,7 @@ begin
|
|||||||
if Assigned(propertyItem) and (propertyItem.ItemType = itEnumeration) then
|
if Assigned(propertyItem) and (propertyItem.ItemType = itEnumeration) then
|
||||||
begin
|
begin
|
||||||
sourceCode.Add(NativeDataTypeToXML(value, '%<PropertyItemName>:sValues[Value]', nil,
|
sourceCode.Add(NativeDataTypeToXML(value, '%<PropertyItemName>:sValues[Value]', nil,
|
||||||
GetDelphiNodeType(AProperty),
|
elementType,
|
||||||
AProperty.TargetNamespace));
|
AProperty.TargetNamespace));
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
@ -1392,12 +1393,22 @@ begin
|
|||||||
|
|
||||||
sourceCode.Add(NativeDataTypeToXML(value, 'Value',
|
sourceCode.Add(NativeDataTypeToXML(value, 'Value',
|
||||||
TXMLDataBindingSimpleProperty(AProperty).DataType,
|
TXMLDataBindingSimpleProperty(AProperty).DataType,
|
||||||
GetDelphiNodeType(AProperty),
|
elementType,
|
||||||
AProperty.TargetNamespace));
|
AProperty.TargetNamespace));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
sourceCode.AddLn;
|
sourceCode.AddLn;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
dxmPropertyMethods:
|
||||||
|
if writeStream then
|
||||||
|
begin
|
||||||
|
elementType := GetDelphiElementType(AProperty);
|
||||||
|
sourceCode.Add(PropertyImplMethodLoadFromStream[elementType]);
|
||||||
|
sourceCode.Add(PropertyImplMethodLoadFromFile[elementType]);
|
||||||
|
sourceCode.Add(PropertyImplMethodSaveToStream[elementType]);
|
||||||
|
sourceCode.Add(PropertyImplMethodSaveToFile[elementType]);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -1408,7 +1419,7 @@ begin
|
|||||||
|
|
||||||
Result := (sourceCode.Count > 0);
|
Result := (sourceCode.Count > 0);
|
||||||
if Result then
|
if Result then
|
||||||
AStream.Write(sourceCode.Format(['Name', AItem.TranslatedName,
|
AWriter.Write(sourceCode.Format(['Name', AItem.TranslatedName,
|
||||||
'PropertySourceName', AProperty.Name,
|
'PropertySourceName', AProperty.Name,
|
||||||
'PropertyName', AProperty.TranslatedName,
|
'PropertyName', AProperty.TranslatedName,
|
||||||
'PropertyItemName', propertyItemName,
|
'PropertyItemName', propertyItemName,
|
||||||
@ -1421,7 +1432,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TDelphiXMLDataBindingGenerator.WriteSchemaEnumeration(AStream: TStreamHelper; AItem: TXMLDataBindingEnumeration; ASection: TDelphiXMLSection);
|
procedure TDelphiXMLDataBindingGenerator.WriteSchemaEnumeration(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingEnumeration; ASection: TDelphiXMLSection);
|
||||||
var
|
var
|
||||||
memberIndex: Integer;
|
memberIndex: Integer;
|
||||||
enumStart: String;
|
enumStart: String;
|
||||||
@ -1433,25 +1444,25 @@ begin
|
|||||||
|
|
||||||
enumStart := NamedFormat(' TXML%<Name>:s = (',
|
enumStart := NamedFormat(' TXML%<Name>:s = (',
|
||||||
['Name', AItem.TranslatedName]);
|
['Name', AItem.TranslatedName]);
|
||||||
AStream.Write(enumStart);
|
AWriter.Write(enumStart);
|
||||||
lineIndent := StringOfChar(' ', Length(enumStart));
|
lineIndent := StringOfChar(' ', Length(enumStart));
|
||||||
|
|
||||||
for memberIndex := 0 to Pred(AItem.MemberCount) do
|
for memberIndex := 0 to Pred(AItem.MemberCount) do
|
||||||
begin
|
begin
|
||||||
if memberIndex > 0 then
|
if memberIndex > 0 then
|
||||||
AStream.Write(lineIndent);
|
AWriter.Write(lineIndent);
|
||||||
|
|
||||||
AStream.Write(AItem.Members[memberIndex].TranslatedName);
|
AWriter.Write(AItem.Members[memberIndex].TranslatedName);
|
||||||
|
|
||||||
if memberIndex < Pred(AItem.MemberCount) then
|
if memberIndex < Pred(AItem.MemberCount) then
|
||||||
AStream.WriteLn(',')
|
AWriter.WriteLine(',')
|
||||||
else
|
else
|
||||||
AStream.WriteLn(');');
|
AWriter.WriteLine(');');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TDelphiXMLDataBindingGenerator.WriteSchemaEnumerationArray(AStream: TStreamHelper; AItem: TXMLDataBindingEnumeration);
|
procedure TDelphiXMLDataBindingGenerator.WriteSchemaEnumerationArray(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingEnumeration);
|
||||||
var
|
var
|
||||||
memberIndex: Integer;
|
memberIndex: Integer;
|
||||||
enumStart: String;
|
enumStart: String;
|
||||||
@ -1462,31 +1473,31 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
|
|
||||||
enumStart := NamedFormat(' %<Name>:sValues: ', ['Name', AItem.TranslatedName]);
|
enumStart := NamedFormat(' %<Name>:sValues: ', ['Name', AItem.TranslatedName]);
|
||||||
AStream.WriteLn(enumStart + NamedFormat('array[TXML%<Name>:s] of WideString =',
|
AWriter.WriteLine(enumStart + NamedFormat('array[TXML%<Name>:s] of WideString =',
|
||||||
['Name', AItem.TranslatedName]));
|
['Name', AItem.TranslatedName]));
|
||||||
|
|
||||||
lineIndent := StringOfChar(' ', Length(enumStart));
|
lineIndent := StringOfChar(' ', Length(enumStart));
|
||||||
|
|
||||||
AStream.WriteLn(lineIndent + '(');
|
AWriter.WriteLine(lineIndent + '(');
|
||||||
|
|
||||||
for memberIndex := 0 to Pred(AItem.MemberCount) do
|
for memberIndex := 0 to Pred(AItem.MemberCount) do
|
||||||
begin
|
begin
|
||||||
AStream.Write(NamedFormat('%<Indent>:s ''%<Name>:s''',
|
AWriter.Write(NamedFormat('%<Indent>:s ''%<Name>:s''',
|
||||||
['Indent', lineIndent,
|
['Indent', lineIndent,
|
||||||
'Name', AItem.Members[memberIndex].Name]));
|
'Name', AItem.Members[memberIndex].Name]));
|
||||||
|
|
||||||
if memberIndex < Pred(AItem.MemberCount) then
|
if memberIndex < Pred(AItem.MemberCount) then
|
||||||
AStream.WriteLn(',')
|
AWriter.WriteLine(',')
|
||||||
else
|
else
|
||||||
AStream.WriteLn;
|
AWriter.WriteLine;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
AStream.WriteLn(lineIndent + ');');
|
AWriter.WriteLine(lineIndent + ');');
|
||||||
AStream.WriteLn;
|
AWriter.WriteLine;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TDelphiXMLDataBindingGenerator.WriteValidate(AStream: TStreamHelper; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection);
|
procedure TDelphiXMLDataBindingGenerator.WriteValidate(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection);
|
||||||
var
|
var
|
||||||
propertyIndex: Integer;
|
propertyIndex: Integer;
|
||||||
propertyItem: TXMLDataBindingProperty;
|
propertyItem: TXMLDataBindingProperty;
|
||||||
@ -1503,10 +1514,10 @@ begin
|
|||||||
case ASection of
|
case ASection of
|
||||||
dxsInterface,
|
dxsInterface,
|
||||||
dxsClass:
|
dxsClass:
|
||||||
AStream.WriteLn(XSDValidateDocumentMethodInterface);
|
AWriter.WriteLine(XSDValidateDocumentMethodInterface);
|
||||||
|
|
||||||
dxsImplementation:
|
dxsImplementation:
|
||||||
AStream.WriteLnNamedFmt(XSDValidateDocumentMethodImplementation,
|
AWriter.WriteLineNamedFmt(XSDValidateDocumentMethodImplementation,
|
||||||
['Name', AItem.TranslatedName]);
|
['Name', AItem.TranslatedName]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -1517,13 +1528,13 @@ begin
|
|||||||
dxsInterface,
|
dxsInterface,
|
||||||
dxsClass:
|
dxsClass:
|
||||||
begin
|
begin
|
||||||
AStream.WriteLn(XSDValidateMethodInterface);
|
AWriter.WriteLine(XSDValidateMethodInterface);
|
||||||
AStream.WriteLn('');
|
AWriter.WriteLine('');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
dxsImplementation:
|
dxsImplementation:
|
||||||
begin
|
begin
|
||||||
AStream.WriteLnNamedFmt(XSDValidateMethodImplementationBegin,
|
AWriter.WriteLineNamedFmt(XSDValidateMethodImplementationBegin,
|
||||||
['Name', AItem.TranslatedName]);
|
['Name', AItem.TranslatedName]);
|
||||||
|
|
||||||
elementSortOrder := '';
|
elementSortOrder := '';
|
||||||
@ -1571,7 +1582,7 @@ begin
|
|||||||
{ For Item properties, we call our getter property. This ensures the child element exists,
|
{ For Item properties, we call our getter property. This ensures the child element exists,
|
||||||
but also that it is created using our binding implementation. Otherwise there will be no
|
but also that it is created using our binding implementation. Otherwise there will be no
|
||||||
IXSDValidate interface to call on the newly created node. }
|
IXSDValidate interface to call on the newly created node. }
|
||||||
AStream.WriteLnNamedFmt(XSDValidateMethodImplementationComplex,
|
AWriter.WriteLineNamedFmt(XSDValidateMethodImplementationComplex,
|
||||||
['Name', propertyItem.TranslatedName]);
|
['Name', propertyItem.TranslatedName]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -1582,7 +1593,7 @@ begin
|
|||||||
if elementRequiredCount > 0 then
|
if elementRequiredCount > 0 then
|
||||||
begin
|
begin
|
||||||
Delete(elementRequired, 1, 2);
|
Delete(elementRequired, 1, 2);
|
||||||
AStream.WriteLnNamedFmt(XSDValidateMethodImplementationRequired,
|
AWriter.WriteLineNamedFmt(XSDValidateMethodImplementationRequired,
|
||||||
['RequiredElements', elementRequired]);
|
['RequiredElements', elementRequired]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1590,25 +1601,25 @@ begin
|
|||||||
if attributeRequiredCount > 0 then
|
if attributeRequiredCount > 0 then
|
||||||
begin
|
begin
|
||||||
Delete(attributeRequired, 1, 2);
|
Delete(attributeRequired, 1, 2);
|
||||||
AStream.WriteLnNamedFmt(XSDValidateMethodImplementationAttrib,
|
AWriter.WriteLineNamedFmt(XSDValidateMethodImplementationAttrib,
|
||||||
['RequiredAttributes', attributeRequired]);
|
['RequiredAttributes', attributeRequired]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if elementSortCount > 1 then
|
if elementSortCount > 1 then
|
||||||
begin
|
begin
|
||||||
Delete(elementSortOrder, 1, 2);
|
Delete(elementSortOrder, 1, 2);
|
||||||
AStream.WriteLnNamedFmt(XSDValidateMethodImplementationSort,
|
AWriter.WriteLineNamedFmt(XSDValidateMethodImplementationSort,
|
||||||
['SortOrder', elementSortOrder]);
|
['SortOrder', elementSortOrder]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
AStream.WriteLn(XSDValidateMethodImplementationEnd);
|
AWriter.WriteLine(XSDValidateMethodImplementationEnd);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TDelphiXMLDataBindingGenerator.WriteEnumeratorMethod(AStream: TStreamHelper; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection);
|
procedure TDelphiXMLDataBindingGenerator.WriteEnumeratorMethod(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection);
|
||||||
begin
|
begin
|
||||||
if not AItem.IsCollection then
|
if not AItem.IsCollection then
|
||||||
Exit;
|
Exit;
|
||||||
@ -1617,14 +1628,14 @@ begin
|
|||||||
dxsInterface,
|
dxsInterface,
|
||||||
dxsClass:
|
dxsClass:
|
||||||
begin
|
begin
|
||||||
AStream.WriteLnNamedFmt(EnumeratorMethodInterface,
|
AWriter.WriteLineNamedFmt(EnumeratorMethodInterface,
|
||||||
['Name', AItem.TranslatedName]);
|
['Name', AItem.TranslatedName]);
|
||||||
AStream.WriteLn('');
|
AWriter.WriteLine('');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
dxsImplementation:
|
dxsImplementation:
|
||||||
begin
|
begin
|
||||||
AStream.WriteLnNamedFmt(EnumeratorMethodImplementation,
|
AWriter.WriteLineNamedFmt(EnumeratorMethodImplementation,
|
||||||
['Name', AItem.TranslatedName]);
|
['Name', AItem.TranslatedName]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -1632,7 +1643,7 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
procedure TDelphiXMLDataBindingGenerator.WriteEnumerator(AStream: TStreamHelper; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection);
|
procedure TDelphiXMLDataBindingGenerator.WriteEnumerator(AWriter: TNamedFormatWriter; AItem: TXMLDataBindingInterface; ASection: TDelphiXMLSection);
|
||||||
begin
|
begin
|
||||||
if not AItem.IsCollection then
|
if not AItem.IsCollection then
|
||||||
Exit;
|
Exit;
|
||||||
@ -1642,24 +1653,24 @@ begin
|
|||||||
case ASection of
|
case ASection of
|
||||||
dxsInterface:
|
dxsInterface:
|
||||||
begin
|
begin
|
||||||
AStream.WriteLnNamedFmt(EnumeratorInterface,
|
AWriter.WriteLineNamedFmt(EnumeratorInterface,
|
||||||
['Name', AItem.TranslatedName,
|
['Name', AItem.TranslatedName,
|
||||||
'DataType', GetDataTypeName(AItem.CollectionItem, True),
|
'DataType', GetDataTypeName(AItem.CollectionItem, True),
|
||||||
'GUID', CreateNewGUID]);
|
'GUID', CreateNewGUID]);
|
||||||
AStream.WriteLn('');
|
AWriter.WriteLine('');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
dxsClass:
|
dxsClass:
|
||||||
begin
|
begin
|
||||||
AStream.WriteLnNamedFmt(EnumeratorClass,
|
AWriter.WriteLineNamedFmt(EnumeratorClass,
|
||||||
['Name', AItem.TranslatedName,
|
['Name', AItem.TranslatedName,
|
||||||
'DataType', GetDataTypeName(AItem.CollectionItem, True)]);
|
'DataType', GetDataTypeName(AItem.CollectionItem, True)]);
|
||||||
AStream.WriteLn('');
|
AWriter.WriteLine('');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
dxsImplementation:
|
dxsImplementation:
|
||||||
begin
|
begin
|
||||||
AStream.WriteLnNamedFmt(EnumeratorImplementation,
|
AWriter.WriteLineNamedFmt(EnumeratorImplementation,
|
||||||
['Name', AItem.TranslatedName,
|
['Name', AItem.TranslatedName,
|
||||||
'DataType', GetDataTypeName(AItem.CollectionItem, True)]);
|
'DataType', GetDataTypeName(AItem.CollectionItem, True)]);
|
||||||
end;
|
end;
|
||||||
|
@ -5,7 +5,7 @@ unit DelphiXMLDataBindingResources;
|
|||||||
interface
|
interface
|
||||||
type
|
type
|
||||||
TDelphiXMLSection = (dxsForward, dxsInterface, dxsClass, dxsImplementation);
|
TDelphiXMLSection = (dxsForward, dxsInterface, dxsClass, dxsImplementation);
|
||||||
TDelphiXMLMember = (dxmPropertyGet, dxmPropertySet, dxmPropertyDeclaration);
|
TDelphiXMLMember = (dxmPropertyGet, dxmPropertySet, dxmPropertyMethods, dxmPropertyDeclaration);
|
||||||
TDelphiAccessor = (daGet, daSet);
|
TDelphiAccessor = (daGet, daSet);
|
||||||
TDelphiNodeType = (dntElement, dntElementNS, dntAttribute, dntNodeValue, dntCustom);
|
TDelphiNodeType = (dntElement, dntElementNS, dntAttribute, dntNodeValue, dntCustom);
|
||||||
TDelphiElementType = dntElement..dntElementNS;
|
TDelphiElementType = dntElement..dntElementNS;
|
||||||
@ -145,8 +145,10 @@ const
|
|||||||
PropertyIntfMethodSetNil = ' procedure Set%<PropertyName>:sIsNil(const Value: Boolean);';
|
PropertyIntfMethodSetNil = ' procedure Set%<PropertyName>:sIsNil(const Value: Boolean);';
|
||||||
PropertyIntfMethodSetText = ' procedure Set%<PropertyName>:sText(const Value: WideString);';
|
PropertyIntfMethodSetText = ' procedure Set%<PropertyName>:sText(const Value: WideString);';
|
||||||
PropertyIntfMethodSet = ' procedure Set%<PropertyName>:s(const Value: %<DataType>:s);';
|
PropertyIntfMethodSet = ' procedure Set%<PropertyName>:s(const Value: %<DataType>:s);';
|
||||||
PropertyIntfMethodStream = ' procedure Save%<PropertyName>:sToStream(AStream: TStream);';
|
PropertyIntfMethodLoadFromStream = ' procedure Load%<PropertyName>:sFromStream(AStream: TStream);';
|
||||||
PropertyIntfMethodFile = ' procedure Save%<PropertyName>:sToFile(const AFileName: string);';
|
PropertyIntfMethodLoadFromFile = ' procedure Load%<PropertyName>:sFromFile(const AFileName: string);';
|
||||||
|
PropertyIntfMethodSaveToStream = ' procedure Save%<PropertyName>:sToStream(AStream: TStream);';
|
||||||
|
PropertyIntfMethodSaveToFile = ' procedure Save%<PropertyName>:sToFile(const AFileName: string);';
|
||||||
|
|
||||||
PropertyInterfaceOptional = ' property Has%<PropertyName>:s: Boolean read GetHas%<PropertyName>:s;';
|
PropertyInterfaceOptional = ' property Has%<PropertyName>:s: Boolean read GetHas%<PropertyName>:s;';
|
||||||
PropertyInterfaceNilReadOnly = ' property %<PropertyName>:sIsNil: Boolean read Get%<PropertyName>:sIsNil;';
|
PropertyInterfaceNilReadOnly = ' property %<PropertyName>:sIsNil: Boolean read Get%<PropertyName>:sIsNil;';
|
||||||
@ -259,7 +261,41 @@ const
|
|||||||
'end;' + CrLf +
|
'end;' + CrLf +
|
||||||
'' + CrLf;
|
'' + CrLf;
|
||||||
|
|
||||||
PropertyImplMethodStream: array[TDelphiElementType] of string =
|
PropertyImplMethodLoadFromStream: array[TDelphiElementType] of string =
|
||||||
|
(
|
||||||
|
{ dntElement }
|
||||||
|
'procedure TXML%<Name>:s.Load%<PropertyName>:sFromStream(AStream: TStream);' + CrLf +
|
||||||
|
'begin' + CrLf +
|
||||||
|
' ChildNodes[''%<PropertySourceName>:s''].NodeValue := Base64EncodeFromStream(AStream);' + CrLf +
|
||||||
|
'end;' + CrLf +
|
||||||
|
'' + CrLf,
|
||||||
|
|
||||||
|
{ dntElementNS }
|
||||||
|
'procedure TXML%<Name>:s.Load%<PropertyName>:sFromStream(AStream: TStream);' + CrLf +
|
||||||
|
'begin' + CrLf +
|
||||||
|
' ChildNodesNS[''%<PropertySourceName>:s'', ''%<Namespace>:s''].NodeValue := Base64EncodeFromStream(AStream);' + CrLf +
|
||||||
|
'end;' + CrLf +
|
||||||
|
'' + CrLf
|
||||||
|
);
|
||||||
|
|
||||||
|
PropertyImplMethodLoadFromFile: array[TDelphiElementType] of string =
|
||||||
|
(
|
||||||
|
{ dntElement }
|
||||||
|
'procedure TXML%<Name>:s.Load%<PropertyName>:sFromFile(const AFileName: string);' + CrLf +
|
||||||
|
'begin' + CrLf +
|
||||||
|
' ChildNodes[''%<PropertySourceName>:s''].NodeValue := Base64EncodeFromFile(AFileName);' + CrLf +
|
||||||
|
'end;' + CrLf +
|
||||||
|
'' + CrLf,
|
||||||
|
|
||||||
|
{ dntElementNS }
|
||||||
|
'procedure TXML%<Name>:s.Load%<PropertyName>:sFromFile(const AFileName: string);' + CrLf +
|
||||||
|
'begin' + CrLf +
|
||||||
|
' ChildNodesNS[''%<PropertySourceName>:s'', ''%<Namespace>:s''].NodeValue := Base64EncodeFromFile(AFileName);' + CrLf +
|
||||||
|
'end;' + CrLf +
|
||||||
|
'' + CrLf
|
||||||
|
);
|
||||||
|
|
||||||
|
PropertyImplMethodSaveToStream: array[TDelphiElementType] of string =
|
||||||
(
|
(
|
||||||
{ dntElement }
|
{ dntElement }
|
||||||
'procedure TXML%<Name>:s.Save%<PropertyName>:sToStream(AStream: TStream);' + CrLf +
|
'procedure TXML%<Name>:s.Save%<PropertyName>:sToStream(AStream: TStream);' + CrLf +
|
||||||
@ -276,7 +312,7 @@ const
|
|||||||
'' + CrLf
|
'' + CrLf
|
||||||
);
|
);
|
||||||
|
|
||||||
PropertyImplMethodFile: array[TDelphiElementType] of string =
|
PropertyImplMethodSaveToFile: array[TDelphiElementType] of string =
|
||||||
(
|
(
|
||||||
{ dntElement }
|
{ dntElement }
|
||||||
'procedure TXML%<Name>:s.Save%<PropertyName>:sToFile(const AFileName: string);' + CrLf +
|
'procedure TXML%<Name>:s.Save%<PropertyName>:sToFile(const AFileName: string);' + CrLf +
|
||||||
|
@ -2,35 +2,14 @@ unit XMLDataBindingHelpers;
|
|||||||
|
|
||||||
interface
|
interface
|
||||||
uses
|
uses
|
||||||
Classes;
|
System.Classes;
|
||||||
|
|
||||||
|
|
||||||
type
|
type
|
||||||
TStreamHelper = class(TObject)
|
TNamedFormatWriter = class(TStreamWriter)
|
||||||
private
|
|
||||||
FOwnership: TStreamOwnership;
|
|
||||||
FStream: TStream;
|
|
||||||
public
|
public
|
||||||
constructor Create(AStream: TStream; AOwnership: TStreamOwnership = soReference);
|
|
||||||
destructor Destroy; override;
|
|
||||||
|
|
||||||
function ReadString(ASize: Integer = -1): String;
|
|
||||||
function ReadInteger: Integer;
|
|
||||||
function ReadDateTime: TDateTime;
|
|
||||||
function ReadBoolean: Boolean;
|
|
||||||
|
|
||||||
procedure Write(const ASource: String);
|
|
||||||
procedure WriteLn(const ASource: String = '');
|
|
||||||
|
|
||||||
procedure WriteFmt(const ASource: String; const AParams: array of const);
|
|
||||||
procedure WriteLnFmt(const ASource: String; const AParams: array of const);
|
|
||||||
|
|
||||||
procedure WriteNamedFmt(const ASource: String; const AParams: array of const);
|
procedure WriteNamedFmt(const ASource: String; const AParams: array of const);
|
||||||
procedure WriteLnNamedFmt(const ASource: String; const AParams: array of const);
|
procedure WriteLineNamedFmt(const ASource: String; const AParams: array of const);
|
||||||
|
|
||||||
procedure WriteString(const ASource: String);
|
|
||||||
procedure WriteInteger(const ASource: Integer);
|
|
||||||
procedure WriteDateTime(const ASource: TDateTime);
|
|
||||||
procedure WriteBoolean(const ASource: Boolean);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -41,120 +20,16 @@ uses
|
|||||||
X2UtNamedFormat;
|
X2UtNamedFormat;
|
||||||
|
|
||||||
|
|
||||||
{ TStreamHelper }
|
{ TNamedFormatWriter }
|
||||||
constructor TStreamHelper.Create(AStream: TStream; AOwnership: TStreamOwnership);
|
procedure TNamedFormatWriter.WriteNamedFmt(const ASource: String; const AParams: array of const);
|
||||||
begin
|
|
||||||
FOwnership := AOwnership;
|
|
||||||
FStream := AStream;
|
|
||||||
|
|
||||||
inherited Create;
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
destructor TStreamHelper.Destroy;
|
|
||||||
begin
|
|
||||||
if FOwnership = soOwned then
|
|
||||||
FreeAndNil(FStream);
|
|
||||||
|
|
||||||
inherited;
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
function TStreamHelper.ReadString(ASize: Integer): String;
|
|
||||||
var
|
|
||||||
iSize: Integer;
|
|
||||||
|
|
||||||
begin
|
|
||||||
if ASize = -1 then
|
|
||||||
iSize := ReadInteger
|
|
||||||
else
|
|
||||||
iSize := ASize;
|
|
||||||
|
|
||||||
SetLength(Result, iSize);
|
|
||||||
FStream.Read(PChar(Result)^, iSize);
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
function TStreamHelper.ReadInteger: Integer;
|
|
||||||
begin
|
|
||||||
FStream.Read(Result, SizeOf(Integer));
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
function TStreamHelper.ReadDateTime: TDateTime;
|
|
||||||
begin
|
|
||||||
FStream.Read(Result, SizeOf(TDateTime));
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
function TStreamHelper.ReadBoolean: Boolean;
|
|
||||||
begin
|
|
||||||
FStream.Read(Result, SizeOf(Boolean));
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure TStreamHelper.Write(const ASource: String);
|
|
||||||
begin
|
|
||||||
FStream.Write(PChar(ASource)^, Length(ASource));
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure TStreamHelper.WriteLn(const ASource: String);
|
|
||||||
begin
|
|
||||||
Write(ASource + #13#10);
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure TStreamHelper.WriteFmt(const ASource: String; const AParams: array of const);
|
|
||||||
begin
|
|
||||||
Write(Format(ASource, AParams));
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure TStreamHelper.WriteLnFmt(const ASource: String; const AParams: array of const);
|
|
||||||
begin
|
|
||||||
WriteLn(Format(ASource, AParams));
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure TStreamHelper.WriteNamedFmt(const ASource: String; const AParams: array of const);
|
|
||||||
begin
|
begin
|
||||||
Write(NamedFormat(ASource, AParams));
|
Write(NamedFormat(ASource, AParams));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TStreamHelper.WriteLnNamedFmt(const ASource: String; const AParams: array of const);
|
procedure TNamedFormatWriter.WriteLineNamedFmt(const ASource: String; const AParams: array of const);
|
||||||
begin
|
begin
|
||||||
WriteLn(NamedFormat(ASource, AParams));
|
WriteLine(NamedFormat(ASource, AParams));
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure TStreamHelper.WriteString(const ASource: String);
|
|
||||||
var
|
|
||||||
iSize: Integer;
|
|
||||||
|
|
||||||
begin
|
|
||||||
iSize := Length(ASource);
|
|
||||||
WriteInteger(iSize);
|
|
||||||
FStream.Write(PChar(ASource)^, iSize);
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure TStreamHelper.WriteInteger(const ASource: Integer);
|
|
||||||
begin
|
|
||||||
FStream.Write(ASource, SizeOf(Integer));
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure TStreamHelper.WriteDateTime(const ASource: TDateTime);
|
|
||||||
begin
|
|
||||||
FStream.Write(ASource, SizeOf(TDateTime));
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure TStreamHelper.WriteBoolean(const ASource: Boolean);
|
|
||||||
begin
|
|
||||||
FStream.Write(ASource, SizeOf(Boolean));
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -3,7 +3,6 @@ program X2XMLDataBinding;
|
|||||||
{$WARN SYMBOL_PLATFORM OFF}
|
{$WARN SYMBOL_PLATFORM OFF}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
VistaManAsInvoker,
|
|
||||||
Forms,
|
Forms,
|
||||||
MainFrm in 'Forms\MainFrm.pas' {MainForm},
|
MainFrm in 'Forms\MainFrm.pas' {MainForm},
|
||||||
XMLDataBindingGenerator in 'Units\XMLDataBindingGenerator.pas',
|
XMLDataBindingGenerator in 'Units\XMLDataBindingGenerator.pas',
|
||||||
|
@ -3,47 +3,143 @@
|
|||||||
<ProjectGuid>{983dfcaf-23ca-48a0-a147-d96769428a71}</ProjectGuid>
|
<ProjectGuid>{983dfcaf-23ca-48a0-a147-d96769428a71}</ProjectGuid>
|
||||||
<MainSource>X2XMLDataBinding.dpr</MainSource>
|
<MainSource>X2XMLDataBinding.dpr</MainSource>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
|
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
|
||||||
<DCC_DependencyCheckOutputName>bin\X2XMLDataBinding.exe</DCC_DependencyCheckOutputName>
|
<DCC_DependencyCheckOutputName>bin\X2XMLDataBinding.exe</DCC_DependencyCheckOutputName>
|
||||||
|
<FrameworkType>VCL</FrameworkType>
|
||||||
|
<ProjectVersion>13.4</ProjectVersion>
|
||||||
|
<Base>True</Base>
|
||||||
|
<Config Condition="'$(Config)'==''">Build</Config>
|
||||||
|
<Platform Condition="'$(Platform)'==''">Win64</Platform>
|
||||||
|
<TargetedPlatforms>3</TargetedPlatforms>
|
||||||
|
<AppType>Application</AppType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||||
<Version>7.0</Version>
|
<Base>true</Base>
|
||||||
<DCC_DebugInformation>False</DCC_DebugInformation>
|
|
||||||
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
|
|
||||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
|
||||||
<DCC_MapFile>3</DCC_MapFile>
|
|
||||||
<DCC_Define>RELEASE</DCC_Define>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
|
||||||
<Version>7.0</Version>
|
<Base_Win64>true</Base_Win64>
|
||||||
<DCC_MapFile>3</DCC_MapFile>
|
<CfgParent>Base</CfgParent>
|
||||||
<DCC_Define>DEBUG</DCC_Define>
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
|
||||||
|
<Base_Win32>true</Base_Win32>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Config)'=='Build' or '$(Cfg_2)'!=''">
|
||||||
|
<Cfg_2>true</Cfg_2>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
|
||||||
|
<Cfg_2_Win32>true</Cfg_2_Win32>
|
||||||
|
<CfgParent>Cfg_2</CfgParent>
|
||||||
|
<Cfg_2>true</Cfg_2>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Base)'!=''">
|
||||||
<DCC_ExeOutput>bin</DCC_ExeOutput>
|
<DCC_ExeOutput>bin</DCC_ExeOutput>
|
||||||
<DCC_DcuOutput>Lib</DCC_DcuOutput>
|
<Icon_MainIcon>X2XMLDataBinding_Icon.ico</Icon_MainIcon>
|
||||||
|
<DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;Xml.Win;System.Win;$(DCC_Namespace)</DCC_Namespace>
|
||||||
|
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||||
|
<DCC_DcuOutput>lib</DCC_DcuOutput>
|
||||||
|
<VerInfo_Locale>1043</VerInfo_Locale>
|
||||||
|
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||||
|
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||||
|
<DCC_Namespace>Data.Win;Datasnap.Win;Web.Win;Soap.Win;$(DCC_Namespace)</DCC_Namespace>
|
||||||
|
<DCC_ExeOutput>bin64</DCC_ExeOutput>
|
||||||
|
<DCC_DcuOutput>lib64</DCC_DcuOutput>
|
||||||
|
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||||
|
<DCC_Namespace>Data.Win;Datasnap.Win;Web.Win;Soap.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
||||||
|
<Debugger_RunParams>"P:\updateserver\xsd\ads111.xsd"</Debugger_RunParams>
|
||||||
|
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
||||||
|
<Version>7.0</Version>
|
||||||
|
<DCC_MapFile>3</DCC_MapFile>
|
||||||
|
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
|
||||||
<DCC_ObjOutput>Lib</DCC_ObjOutput>
|
<DCC_ObjOutput>Lib</DCC_ObjOutput>
|
||||||
<DCC_HppOutput>Lib</DCC_HppOutput>
|
<DCC_HppOutput>Lib</DCC_HppOutput>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
|
||||||
|
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||||
|
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||||
|
</PropertyGroup>
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<Borland.Personality>Delphi.Personality</Borland.Personality>
|
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
|
||||||
<Borland.ProjectType/>
|
<Borland.ProjectType/>
|
||||||
<BorlandProject>
|
<BorlandProject>
|
||||||
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters><Parameters Name="RunParams">"P:\updateserver\xsd\ads111.xsd"</Parameters></Parameters><VersionInfo><VersionInfo Name="IncludeVerInfo">False</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">1043</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Source><Source Name="MainSource">X2XMLDataBinding.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
|
<Delphi.Personality>
|
||||||
|
<Parameters>
|
||||||
|
<Parameters Name="UseLauncher">False</Parameters>
|
||||||
|
<Parameters Name="LoadAllSymbols">True</Parameters>
|
||||||
|
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
|
||||||
|
<Parameters Name="RunParams">"P:\updateserver\xsd\ads111.xsd"</Parameters>
|
||||||
|
</Parameters>
|
||||||
|
<VersionInfo>
|
||||||
|
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
|
||||||
|
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||||
|
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||||
|
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||||
|
<VersionInfo Name="Release">0</VersionInfo>
|
||||||
|
<VersionInfo Name="Build">0</VersionInfo>
|
||||||
|
<VersionInfo Name="Debug">False</VersionInfo>
|
||||||
|
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||||
|
<VersionInfo Name="Special">False</VersionInfo>
|
||||||
|
<VersionInfo Name="Private">False</VersionInfo>
|
||||||
|
<VersionInfo Name="DLL">False</VersionInfo>
|
||||||
|
<VersionInfo Name="Locale">1043</VersionInfo>
|
||||||
|
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||||
|
</VersionInfo>
|
||||||
|
<VersionInfoKeys>
|
||||||
|
<VersionInfoKeys Name="CompanyName"/>
|
||||||
|
<VersionInfoKeys Name="FileDescription"/>
|
||||||
|
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||||
|
<VersionInfoKeys Name="InternalName"/>
|
||||||
|
<VersionInfoKeys Name="LegalCopyright"/>
|
||||||
|
<VersionInfoKeys Name="LegalTrademarks"/>
|
||||||
|
<VersionInfoKeys Name="OriginalFilename"/>
|
||||||
|
<VersionInfoKeys Name="ProductName"/>
|
||||||
|
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||||
|
<VersionInfoKeys Name="Comments"/>
|
||||||
|
</VersionInfoKeys>
|
||||||
|
<Source>
|
||||||
|
<Source Name="MainSource">X2XMLDataBinding.dpr</Source>
|
||||||
|
</Source>
|
||||||
|
</Delphi.Personality>
|
||||||
|
<Platforms>
|
||||||
|
<Platform value="Win64">True</Platform>
|
||||||
|
<Platform value="Win32">True</Platform>
|
||||||
|
</Platforms>
|
||||||
|
</BorlandProject>
|
||||||
|
<ProjectFileVersion>12</ProjectFileVersion>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
|
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<DelphiCompile Include="X2XMLDataBinding.dpr">
|
<DelphiCompile Include="$(MainSource)">
|
||||||
<MainSource>MainSource</MainSource>
|
<MainSource>MainSource</MainSource>
|
||||||
</DelphiCompile>
|
</DelphiCompile>
|
||||||
<DCCReference Include="Forms\MainFrm.pas">
|
<DCCReference Include="Forms\MainFrm.pas">
|
||||||
<Form>MainForm</Form>
|
<Form>MainForm</Form>
|
||||||
</DCCReference>
|
</DCCReference>
|
||||||
<DCCReference Include="Units\DataBindingHintsXML.pas" />
|
|
||||||
<DCCReference Include="Units\DataBindingSettingsXML.pas" />
|
|
||||||
<DCCReference Include="Units\DelphiXMLDataBindingGenerator.pas" />
|
|
||||||
<DCCReference Include="Units\DelphiXMLDataBindingResources.pas" />
|
|
||||||
<DCCReference Include="Units\MSXML2_TLB.pas" />
|
|
||||||
<DCCReference Include="Units\XMLDataBindingGenerator.pas"/>
|
<DCCReference Include="Units\XMLDataBindingGenerator.pas"/>
|
||||||
|
<DCCReference Include="Units\DelphiXMLDataBindingGenerator.pas"/>
|
||||||
<DCCReference Include="Units\XMLDataBindingHelpers.pas"/>
|
<DCCReference Include="Units\XMLDataBindingHelpers.pas"/>
|
||||||
|
<DCCReference Include="Units\DelphiXMLDataBindingResources.pas"/>
|
||||||
|
<DCCReference Include="Units\DataBindingSettingsXML.pas"/>
|
||||||
|
<DCCReference Include="Units\DataBindingHintsXML.pas"/>
|
||||||
|
<DCCReference Include="Units\MSXML2_TLB.pas"/>
|
||||||
|
<BuildConfiguration Include="Build">
|
||||||
|
<Key>Cfg_2</Key>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
</BuildConfiguration>
|
||||||
|
<BuildConfiguration Include="Base">
|
||||||
|
<Key>Base</Key>
|
||||||
|
</BuildConfiguration>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
|
||||||
</Project>
|
</Project>
|
Binary file not shown.
BIN
X2XMLDataBinding_Icon.ico
Normal file
BIN
X2XMLDataBinding_Icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 158 KiB |
Loading…
Reference in New Issue
Block a user