Componentes.Terceros.RemObj.../internal/5.0.23.613/1/RemObjects SDK for Delphi/Source/CodeGen2/uRODLAsyncConverter.pas
david f0e35ec439 - Eliminadas las librerías para Delphi 6 (Dcu\D6) en RO y DA.
- Recompilación de RO para poner RemObjects_Core_D10 como paquete de runtime/designtime.

git-svn-id: https://192.168.0.254/svn/Componentes.Terceros.RemObjects@3 b6239004-a887-0f4b-9937-50029ccdca16
2007-09-10 10:40:17 +00:00

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.