📄 libreria.txt
字号:
unit MoPathFinder_TLB;
// ************************************************************************ //
// WARNING
// -------
// The types declared in this file were generated from data read from a
// Type Library. If this type library is explicitly or indirectly (via
// another type library referring to this type library) re-imported, or the
// 'Refresh' command of the Type Library Editor activated while editing the
// Type Library, the contents of this file will be regenerated and all
// manual modifications will be lost.
// ************************************************************************ //
// PASTLWTR : 1.2
// File generated on 05/06/08 11:19:36 a.m. from Type Library described below.
// ************************************************************************ //
// Type Lib: D:\programas\mo21\mopathfinder\MoPathFinder.TLB (1)
// LIBID: {6FCA4C14-236D-11D3-9F58-00C04F796AAD}
// LCID: 0
// Helpfile: D:\programas\mo21\mopathfinder\MoPlus.hlp
// HelpString: ESRI Map Objects Pathfinder
// DepndLst:
// (1) v2.0 stdole, (C:\WINDOWS\system32\stdole2.tlb)
// (2) v2.0 MapObjects2, (C:\Archivos de programa\Archivos comunes\ESRI\mo20.ocx)
// Errors:
// Error creating palette bitmap of (TPathFinder) : No Server registered for this CoClass
// ************************************************************************ //
// *************************************************************************//
// NOTE:
// Items guarded by $IFDEF_LIVE_SERVER_AT_DESIGN_TIME are used by properties
// which return objects that may need to be explicitly created via a function
// call prior to any access via the property. These items have been disabled
// in order to prevent accidental use from within the object inspector. You
// may enable them by defining LIVE_SERVER_AT_DESIGN_TIME or by selectively
// removing them from the $IFDEF blocks. However, such items must still be
// programmatically created via a method of the appropriate CoClass before
// they can be used.
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}
{$VARPROPSETTER ON}
interface
uses Windows, ActiveX, Classes, Graphics, MapObjects2_TLB, OleServer, StdVCL, Variants;
// *********************************************************************//
// GUIDS declared in the TypeLibrary. Following prefixes are used:
// Type Libraries : LIBID_xxxx
// CoClasses : CLASS_xxxx
// DISPInterfaces : DIID_xxxx
// Non-DISP interfaces: IID_xxxx
// *********************************************************************//
const
// TypeLibrary Major and minor versions
MoPathFinderMajorVersion = 2;
MoPathFinderMinorVersion = 0;
LIBID_MoPathFinder: TGUID = '{6FCA4C14-236D-11D3-9F58-00C04F796AAD}';
DIID__PathFinder: TGUID = '{96D20820-2371-11D3-9F58-00C04F796AAD}';
CLASS_PathFinder: TGUID = '{96D20821-2371-11D3-9F58-00C04F796AAD}';
type
// *********************************************************************//
// Forward declaration of types defined in TypeLibrary
// *********************************************************************//
_PathFinder = dispinterface;
// *********************************************************************//
// Declaration of CoClasses defined in Type Library
// (NOTE: Here we map each CoClass to its Default Interface)
// *********************************************************************//
PathFinder = _PathFinder;
// *********************************************************************//
// DispIntf: _PathFinder
// Flags: (4096) Dispatchable
// GUID: {96D20820-2371-11D3-9F58-00C04F796AAD}
// *********************************************************************//
_PathFinder = dispinterface
['{96D20820-2371-11D3-9F58-00C04F796AAD}']
function FindPath(const start: IDispatch; const finish: IDispatch): Line; dispid 2;
property GeoDataset: IMoGeoDataset dispid 1;
end;
// *********************************************************************//
// The Class CoPathFinder provides a Create and CreateRemote method to
// create instances of the default interface _PathFinder exposed by
// the CoClass PathFinder. The functions are intended to be used by
// clients wishing to automate the CoClass objects exposed by the
// server of this typelibrary.
// *********************************************************************//
CoPathFinder = class
class function Create: _PathFinder;
class function CreateRemote(const MachineName: string): _PathFinder;
end;
// *********************************************************************//
// OLE Server Proxy class declaration
// Server Object : TPathFinder
// Help String : PathFinder
// Default Interface: _PathFinder
// Def. Intf. DISP? : Yes
// Event Interface:
// TypeFlags : (2) CanCreate
// *********************************************************************//
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
TPathFinderProperties= class;
{$ENDIF}
TPathFinder = class(TOleServer)
private
FIntf: _PathFinder;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps: TPathFinderProperties;
function GetServerProperties: TPathFinderProperties;
{$ENDIF}
function GetDefaultInterface: _PathFinder;
protected
procedure InitServerData; override;
function Get_GeoDataset: IMoGeoDataset;
procedure Set_GeoDataset(const Value: IMoGeoDataset);
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Connect; override;
procedure ConnectTo(svrIntf: _PathFinder);
procedure Disconnect; override;
function FindPath(const start: IDispatch; const finish: IDispatch): Line;
property DefaultInterface: _PathFinder read GetDefaultInterface;
property GeoDataset: IMoGeoDataset read Get_GeoDataset write Set_GeoDataset;
published
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
property Server: TPathFinderProperties read GetServerProperties;
{$ENDIF}
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
// *********************************************************************//
// OLE Server Properties Proxy Class
// Server Object : TPathFinder
// (This object is used by the IDE's Property Inspector to allow editing
// of the properties of this server)
// *********************************************************************//
TPathFinderProperties = class(TPersistent)
private
FServer: TPathFinder;
function GetDefaultInterface: _PathFinder;
constructor Create(AServer: TPathFinder);
protected
function Get_GeoDataset: IMoGeoDataset;
procedure Set_GeoDataset(const Value: IMoGeoDataset);
public
property DefaultInterface: _PathFinder read GetDefaultInterface;
published
property GeoDataset: IMoGeoDataset read Get_GeoDataset write Set_GeoDataset;
end;
{$ENDIF}
procedure Register;
resourcestring
dtlServerPage = 'ActiveX';
dtlOcxPage = 'ActiveX';
implementation
uses ComObj;
class function CoPathFinder.Create: _PathFinder;
begin
Result := CreateComObject(CLASS_PathFinder) as _PathFinder;
end;
class function CoPathFinder.CreateRemote(const MachineName: string): _PathFinder;
begin
Result := CreateRemoteComObject(MachineName, CLASS_PathFinder) as _PathFinder;
end;
procedure TPathFinder.InitServerData;
const
CServerData: TServerData = (
ClassID: '{96D20821-2371-11D3-9F58-00C04F796AAD}';
IntfIID: '{96D20820-2371-11D3-9F58-00C04F796AAD}';
EventIID: '';
LicenseKey: nil;
Version: 500);
begin
ServerData := @CServerData;
end;
procedure TPathFinder.Connect;
var
punk: IUnknown;
begin
if FIntf = nil then
begin
punk := GetServer;
Fintf:= punk as _PathFinder;
end;
end;
procedure TPathFinder.ConnectTo(svrIntf: _PathFinder);
begin
Disconnect;
FIntf := svrIntf;
end;
procedure TPathFinder.DisConnect;
begin
if Fintf <> nil then
begin
FIntf := nil;
end;
end;
function TPathFinder.GetDefaultInterface: _PathFinder;
begin
if FIntf = nil then
Connect;
Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
Result := FIntf;
end;
constructor TPathFinder.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps := TPathFinderProperties.Create(Self);
{$ENDIF}
end;
destructor TPathFinder.Destroy;
begin
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
FProps.Free;
{$ENDIF}
inherited Destroy;
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
function TPathFinder.GetServerProperties: TPathFinderProperties;
begin
Result := FProps;
end;
{$ENDIF}
function TPathFinder.Get_GeoDataset: IMoGeoDataset;
begin
Result := DefaultInterface.GeoDataset;
end;
procedure TPathFinder.Set_GeoDataset(const Value: IMoGeoDataset);
begin
DefaultInterface.GeoDataset := Value;
end;
function TPathFinder.FindPath(const start: IDispatch; const finish: IDispatch): Line;
begin
Result := DefaultInterface.FindPath(start, finish);
end;
{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
constructor TPathFinderProperties.Create(AServer: TPathFinder);
begin
inherited Create;
FServer := AServer;
end;
function TPathFinderProperties.GetDefaultInterface: _PathFinder;
begin
Result := FServer.DefaultInterface;
end;
function TPathFinderProperties.Get_GeoDataset: IMoGeoDataset;
begin
Result := DefaultInterface.GeoDataset;
end;
procedure TPathFinderProperties.Set_GeoDataset(const Value: IMoGeoDataset);
begin
DefaultInterface.GeoDataset := Value;
end;
{$ENDIF}
procedure Register;
begin
RegisterComponents(dtlServerPage, [TPathFinder]);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -