- Recompilación en Delphi10 de todos los paquetes de RO para generar las DCU's en Lib\D10 - Recompilación en Delphi10 de todos los paquetes de DA para generar las DCU's en Lib\D10 git-svn-id: https://192.168.0.254/svn/Componentes.Terceros.RemObjects@9 b6239004-a887-0f4b-9937-50029ccdca16
93 lines
2.9 KiB
ObjectPascal
93 lines
2.9 KiB
ObjectPascal
unit uRODLAsyncConverter;
|
|
|
|
{----------------------------------------------------------------------------}
|
|
{ RemObjects SDK Library - CodeGen2 }
|
|
{ }
|
|
{ compiler: Delphi 5 and up, Kylix 2 and up }
|
|
{ platform: Win32, Linux }
|
|
{ }
|
|
{ (c)opyright RemObjects Software. all rights reserved. }
|
|
{ }
|
|
{ Using this code requires a valid license of the RemObjects SDK }
|
|
{ which can be obtained at http://www.remobjects.com. }
|
|
{----------------------------------------------------------------------------}
|
|
|
|
{$IFDEF LINUX}
|
|
{$I ../RemObjects.inc}
|
|
{$ELSE}
|
|
{$I ..\RemObjects.inc}
|
|
{$ENDIF LINUX}
|
|
|
|
interface
|
|
|
|
uses
|
|
uRODL, uRODLTemplateBasedConverter, uRODLIntfConverter;
|
|
|
|
type
|
|
TRODLAsyncConverter = class (TRODLIntfConverter)
|
|
protected
|
|
function GetServicesSectionClass: TServicesSectionClass; override;
|
|
end;
|
|
|
|
|
|
type
|
|
TAsyncServicesSection = class (TIntfServicesSection)
|
|
protected
|
|
function GetAncestorName(const aService: TRODLBaseService): string; override;
|
|
function GetProxyAncestorName(const aService: TRODLBaseService): string; override;
|
|
function GetProxySuffix: string; override;
|
|
|
|
procedure DoReplacements(var curLine: string; const aService: TRODLBaseService; const aLibrary: TRODLLibrary); override;
|
|
end;
|
|
|
|
implementation
|
|
|
|
uses
|
|
uROClasses, uRODLTemplateBasedConverterUtils;
|
|
|
|
{ TRODLAsyncConverter }
|
|
|
|
function TRODLAsyncConverter.GetServicesSectionClass: TServicesSectionClass;
|
|
begin
|
|
Result := TAsyncServicesSection;
|
|
end;
|
|
|
|
{ TAsyncServicesSection }
|
|
|
|
procedure TAsyncServicesSection.DoReplacements(var curLine: string;
|
|
const aService: TRODLBaseService; const aLibrary: TRODLLibrary);
|
|
begin
|
|
inherited DoReplacements(curLine, aService, aLibrary);
|
|
|
|
MacroReplace(curLine, '%',
|
|
['ASYNC_SERVICE_UID', NewGuidAsString
|
|
]);
|
|
end;
|
|
|
|
function TAsyncServicesSection.GetAncestorName(
|
|
const aService: TRODLBaseService): string;
|
|
begin
|
|
Result := inherited GetAncestorName(aService);
|
|
|
|
if Length(Result) > 0 then
|
|
Result := Result + DEFAULT_ASYNC_SUFFIX
|
|
else
|
|
Result := DEFAULT_SERVICE_ASYNC_ANCESTOR_NAME;
|
|
end;
|
|
|
|
function TAsyncServicesSection.GetProxyAncestorName(
|
|
const aService: TRODLBaseService): string;
|
|
begin
|
|
Result := inherited GetProxyAncestorName(aService);
|
|
|
|
if (Length(Result) = 0) or (Result = DEFAULT_SERVICE_PROXY_ANCESTOR_NAME) then
|
|
Result := DEFAULT_SERVICE_ASYNC_PROXY_ANCESTOR_NAME;
|
|
end;
|
|
|
|
function TAsyncServicesSection.GetProxySuffix: string;
|
|
begin
|
|
Result := DEFAULT_ASYNC_PROXY_SUFFIX;
|
|
end;
|
|
|
|
end.
|