⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 supertopolib_tlb.pas

📁 GIS开发源代码。 SuperMax5.0+Delphi,用Delphi编写的控件工具包
💻 PAS
字号:
unit SuperTopoLib_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 2005-2-25 10:07:04 from Type Library described below.

// ************************************************************************  //
// Type Lib: D:\Program Files\SuperMap\5.0.2\SuperTopo.ocx (1)
// LIBID: {A6985C02-94B5-4D89-A1FE-C2FFD60BB633}
// LCID: 0
// Helpfile: d:\Program Files\SuperMap\SuperMap Objects 5.0\help\SmProRef.chm
// HelpString: SuperMap Objects 5.0 Topology Control
// DepndLst: 
//   (1) v2.0 stdole, (C:\WINDOWS\system32\STDOLE2.TLB)
//   (2) v5.0 SuperMapLib, (D:\Program Files\SuperMap\5.0.2\SuperMap.ocx)
// ************************************************************************ //
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. 
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}
{$VARPROPSETTER ON}
interface

uses Windows, ActiveX, Classes, Graphics, OleCtrls, OleServer, StdVCL, SuperMapLib_TLB, 
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
  SuperTopoLibMajorVersion = 5;
  SuperTopoLibMinorVersion = 0;

  LIBID_SuperTopoLib: TGUID = '{A6985C02-94B5-4D89-A1FE-C2FFD60BB633}';

  DIID_IsoTopoBuildFilter: TGUID = '{784E6B39-3D55-42C2-B225-E54F488C4A60}';
  CLASS_soTopoBuildFilter: TGUID = '{9405922A-C45E-400E-9AF8-D150BF45D334}';
  DIID__DSuperTopo: TGUID = '{25A29E52-3BFB-4340-BB0D-ACD8521958A1}';
  DIID__DSuperTopoEvents: TGUID = '{F5BD2B5E-9D54-4D7C-9AB4-042DCDFAFF7E}';
  CLASS_SuperTopo: TGUID = '{4F772A15-B347-40EE-9209-8584EF797BEA}';
type

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary                    
// *********************************************************************//
  IsoTopoBuildFilter = dispinterface;
  _DSuperTopo = dispinterface;
  _DSuperTopoEvents = dispinterface;

// *********************************************************************//
// Declaration of CoClasses defined in Type Library                       
// (NOTE: Here we map each CoClass to its Default Interface)              
// *********************************************************************//
  soTopoBuildFilter = IsoTopoBuildFilter;
  SuperTopo = _DSuperTopo;


// *********************************************************************//
// DispIntf:  IsoTopoBuildFilter
// Flags:     (4096) Dispatchable
// GUID:      {784E6B39-3D55-42C2-B225-E54F488C4A60}
// *********************************************************************//
  IsoTopoBuildFilter = dispinterface
    ['{784E6B39-3D55-42C2-B225-E54F488C4A60}']
    property IdentityPointDataset: IsoDatasetVector dispid 1;
    property EdgeFilter: WideString dispid 2;
    property Tolerance: Double dispid 3;
  end;

// *********************************************************************//
// DispIntf:  _DSuperTopo
// Flags:     (4112) Hidden Dispatchable
// GUID:      {25A29E52-3BFB-4340-BB0D-ACD8521958A1}
// *********************************************************************//
  _DSuperTopo = dispinterface
    ['{25A29E52-3BFB-4340-BB0D-ACD8521958A1}']
    procedure AboutBox; dispid -552;
    function RegisterForRuntime(const strUser: WideString; const strCompany: WideString; 
                                const strSerialNo: WideString): WordBool; dispid 13;
    function CheckErrors(const objSrcDataset: IDispatch): WordBool; dispid 12;
    function Clean(const objSrcDataset: IDispatch): WordBool; dispid 11;
    function BuildNetwork(const objSrcDataset: IDispatch; const objDestDataSource: IDispatch; 
                          const strDestDataset: WideString): WordBool; dispid 10;
    function BuildPolygons(const objSrcDataset: IDispatch; const objDestDataSource: IDispatch; 
                           const strDestDataset: WideString): WordBool; dispid 9;
    property CleanOvershootDangles: WordBool dispid 6;
    property MergeRedundantNodes: WordBool dispid 3;
    property CleanRepeatedLines: WordBool dispid 4;
    property MergePseudoNodes: WordBool dispid 5;
    property ReadyState: Integer readonly dispid -525;
    property ExtendDangleLines: WordBool dispid 7;
    property Filter: IsoTopoBuildFilter dispid 8;
    property IntersectLines: WordBool dispid 1;
    property CleanIdenticalVertices: WordBool dispid 2;
  end;

// *********************************************************************//
// DispIntf:  _DSuperTopoEvents
// Flags:     (4096) Dispatchable
// GUID:      {F5BD2B5E-9D54-4D7C-9AB4-042DCDFAFF7E}
// *********************************************************************//
  _DSuperTopoEvents = dispinterface
    ['{F5BD2B5E-9D54-4D7C-9AB4-042DCDFAFF7E}']
    procedure ReadyStateChange; dispid -609;
  end;

// *********************************************************************//
// The Class CosoTopoBuildFilter provides a Create and CreateRemote method to          
// create instances of the default interface IsoTopoBuildFilter exposed by              
// the CoClass soTopoBuildFilter. The functions are intended to be used by             
// clients wishing to automate the CoClass objects exposed by the         
// server of this typelibrary.                                            
// *********************************************************************//
  CosoTopoBuildFilter = class
    class function Create: IsoTopoBuildFilter;
    class function CreateRemote(const MachineName: string): IsoTopoBuildFilter;
  end;


// *********************************************************************//
// OLE Control Proxy class declaration
// Control Name     : TSuperTopo
// Help String      : SuperTopo Control
// Default Interface: _DSuperTopo
// Def. Intf. DISP? : Yes
// Event   Interface: _DSuperTopoEvents
// TypeFlags        : (38) CanCreate Licensed Control
// *********************************************************************//
  TSuperTopo = class(TOleControl)
  private
    FOnReadyStateChange: TNotifyEvent;
    FIntf: _DSuperTopo;
    function  GetControlInterface: _DSuperTopo;
  protected
    procedure CreateControl;
    procedure InitControlData; override;
    function Get_Filter: IsoTopoBuildFilter;
    procedure Set_Filter(const Value: IsoTopoBuildFilter);
  public
    procedure AboutBox;
    function RegisterForRuntime(const strUser: WideString; const strCompany: WideString; 
                                const strSerialNo: WideString): WordBool;
    function CheckErrors(const objSrcDataset: IDispatch): WordBool;
    function Clean(const objSrcDataset: IDispatch): WordBool;
    function BuildNetwork(const objSrcDataset: IDispatch; const objDestDataSource: IDispatch; 
                          const strDestDataset: WideString): WordBool;
    function BuildPolygons(const objSrcDataset: IDispatch; const objDestDataSource: IDispatch; 
                           const strDestDataset: WideString): WordBool;
    property  ControlInterface: _DSuperTopo read GetControlInterface;
    property  DefaultInterface: _DSuperTopo read GetControlInterface;
    property ReadyState: Integer index -525 read GetIntegerProp;
  published
    property Anchors;
    property CleanOvershootDangles: WordBool index 6 read GetWordBoolProp write SetWordBoolProp stored False;
    property MergeRedundantNodes: WordBool index 3 read GetWordBoolProp write SetWordBoolProp stored False;
    property CleanRepeatedLines: WordBool index 4 read GetWordBoolProp write SetWordBoolProp stored False;
    property MergePseudoNodes: WordBool index 5 read GetWordBoolProp write SetWordBoolProp stored False;
    property ExtendDangleLines: WordBool index 7 read GetWordBoolProp write SetWordBoolProp stored False;
    property Filter: IsoTopoBuildFilter read Get_Filter write Set_Filter stored False;
    property IntersectLines: WordBool index 1 read GetWordBoolProp write SetWordBoolProp stored False;
    property CleanIdenticalVertices: WordBool index 2 read GetWordBoolProp write SetWordBoolProp stored False;
    property OnReadyStateChange: TNotifyEvent read FOnReadyStateChange write FOnReadyStateChange;
  end;

procedure Register;

resourcestring
  dtlServerPage = 'ActiveX';

  dtlOcxPage = 'ActiveX';

implementation

uses ComObj;

class function CosoTopoBuildFilter.Create: IsoTopoBuildFilter;
begin
  Result := CreateComObject(CLASS_soTopoBuildFilter) as IsoTopoBuildFilter;
end;

class function CosoTopoBuildFilter.CreateRemote(const MachineName: string): IsoTopoBuildFilter;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_soTopoBuildFilter) as IsoTopoBuildFilter;
end;

procedure TSuperTopo.InitControlData;
const
  CEventDispIDs: array [0..0] of DWORD = (
    $FFFFFD9F);
  CLicenseKey: array[0..39] of Word = ( $0043, $006F, $0070, $0079, $0072, $0069, $0067, $0068, $0074, $0020, $0028
    , $0063, $0029, $0020, $0032, $0030, $0030, $0030, $0020, $0053, $0075
    , $0070, $0065, $0072, $004D, $0061, $0070, $0020, $0043, $006F, $0072
    , $0070, $006F, $0072, $0061, $0074, $0069, $006F, $006E, $0000);
  CControlData: TControlData2 = (
    ClassID: '{4F772A15-B347-40EE-9209-8584EF797BEA}';
    EventIID: '{F5BD2B5E-9D54-4D7C-9AB4-042DCDFAFF7E}';
    EventCount: 1;
    EventDispIDs: @CEventDispIDs;
    LicenseKey: @CLicenseKey;
    Flags: $00000000;
    Version: 401);
begin
  ControlData := @CControlData;
  TControlData2(CControlData).FirstEventOfs := Cardinal(@@FOnReadyStateChange) - Cardinal(Self);
end;

procedure TSuperTopo.CreateControl;

  procedure DoCreate;
  begin
    FIntf := IUnknown(OleObject) as _DSuperTopo;
  end;

begin
  if FIntf = nil then DoCreate;
end;

function TSuperTopo.GetControlInterface: _DSuperTopo;
begin
  CreateControl;
  Result := FIntf;
end;

function TSuperTopo.Get_Filter: IsoTopoBuildFilter;
begin
  Result := DefaultInterface.Filter;
end;

procedure TSuperTopo.Set_Filter(const Value: IsoTopoBuildFilter);
begin
  DefaultInterface.Filter := Value;
end;

procedure TSuperTopo.AboutBox;
begin
  DefaultInterface.AboutBox;
end;

function TSuperTopo.RegisterForRuntime(const strUser: WideString; const strCompany: WideString; 
                                       const strSerialNo: WideString): WordBool;
begin
  Result := DefaultInterface.RegisterForRuntime(strUser, strCompany, strSerialNo);
end;

function TSuperTopo.CheckErrors(const objSrcDataset: IDispatch): WordBool;
begin
  Result := DefaultInterface.CheckErrors(objSrcDataset);
end;

function TSuperTopo.Clean(const objSrcDataset: IDispatch): WordBool;
begin
  Result := DefaultInterface.Clean(objSrcDataset);
end;

function TSuperTopo.BuildNetwork(const objSrcDataset: IDispatch; 
                                 const objDestDataSource: IDispatch; 
                                 const strDestDataset: WideString): WordBool;
begin
  Result := DefaultInterface.BuildNetwork(objSrcDataset, objDestDataSource, strDestDataset);
end;

function TSuperTopo.BuildPolygons(const objSrcDataset: IDispatch; 
                                  const objDestDataSource: IDispatch; 
                                  const strDestDataset: WideString): WordBool;
begin
  Result := DefaultInterface.BuildPolygons(objSrcDataset, objDestDataSource, strDestDataset);
end;

procedure Register;
begin
  RegisterComponents(dtlOcxPage, [TSuperTopo]);
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -