📄 eermodel_xml.pas
字号:
unit EERModel_XML;
//----------------------------------------------------------------------------------------------------------------------
//
// This file is part of fabFORCE DBDesigner4.
// Copyright (C) 2002 Michael G. Zinner, www.fabFORCE.net
//
// DBDesigner4 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// DBDesigner4 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with DBDesigner4; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
//----------------------------------------------------------------------------------------------------------------------
//
// Unit EERModel_XML.pas
// ---------------------
// Version 1.3, 11.04.2003, Mike
// Description
// Contains the XML Data Binding for the DBDesigner4 XML Model files
//
// Changes:
// Version 1.3, 11.04.2003, Mike
// added UsePositionGrid, DefaultTableType, TableNameInRefs, ActivateRefDefForNewRelations
// Datatype-EditParamsAsString
// Version 1.2, 28.03.2003, Mike
// added UsePosition Params
// Version 1.1, 20.03.2003, Mike
// added PrevTableName and index-column length parameter
// Version 1.0, 13.03.2003, Mike
// initial version, Mike
//
//----------------------------------------------------------------------------------------------------------------------
interface
uses xmldom, XMLDoc, XMLIntf;
type
{ Forward Decls }
IXMLDBMODELType = interface;
IXMLSETTINGSType = interface;
IXMLGLOBALSETTINGSType = interface;
IXMLDATATYPEGROUPSType = interface;
IXMLDATATYPEGROUPType = interface;
IXMLDATATYPESType = interface;
IXMLDATATYPEType = interface;
IXMLPARAMSType = interface;
IXMLPARAMType = interface;
IXMLOPTIONSType = interface;
IXMLOPTIONType = interface;
IXMLCOMMON_DATATYPESType = interface;
IXMLCOMMON_DATATYPEType = interface;
IXMLTABLEPREFIXESType = interface;
IXMLTABLEPREFIXType = interface;
IXMLREGIONCOLORSType = interface;
IXMLREGIONCOLORType = interface;
IXMLPOSITIONMARKERSType = interface;
IXMLPOSITIONMARKERType = interface;
IXMLMETADATAType = interface;
IXMLREGIONSType = interface;
IXMLREGIONType = interface;
IXMLTABLESType = interface;
IXMLTABLEType = interface;
IXMLCOLUMNSType = interface;
IXMLCOLUMNType = interface;
IXMLOPTIONSELECTEDType = interface;
IXMLOPTIONSELECTType = interface;
IXMLRELATIONS_STARTType = interface;
IXMLRELATION_STARTType = interface;
IXMLRELATIONS_ENDType = interface;
IXMLRELATION_ENDType = interface;
IXMLINDICESType = interface;
IXMLINDEXType = interface;
IXMLINDEXCOLUMNSType = interface;
IXMLINDEXCOLUMNType = interface;
IXMLRELATIONSType = interface;
IXMLRELATIONType = interface;
IXMLNOTESType = interface;
IXMLNOTEType = interface;
IXMLIMAGESType = interface;
IXMLIMAGEType = interface;
IXMLPLUGINDATAType = interface;
IXMLPLUGINDATARECORDSType = interface;
IXMLPLUGINDATARECORDType = interface;
IXMLPLUGINDATAPARAMSType = interface;
IXMLPLUGINDATAPARAMType = interface;
IXMLQUERYDATAType = interface;
IXMLQUERYRECORDSType = interface;
IXMLQUERYRECORDType = interface;
IXMLLINKEDMODELSType = interface;
IXMLLINKEDMODELType = interface;
{ IXMLDBMODELType }
IXMLDBMODELType = interface(IXMLNode)
['{CD469CD4-9ADB-4706-A30F-84B0A1E5F182}']
{ Property Accessors }
function Get_Version: WideString;
function Get_SETTINGS: IXMLSETTINGSType;
function Get_METADATA: IXMLMETADATAType;
function Get_PLUGINDATA: IXMLPLUGINDATAType;
function Get_QUERYDATA: IXMLQUERYDATAType;
function Get_LINKEDMODELS: IXMLLINKEDMODELSType;
procedure Set_Version(Value: WideString);
{ Methods & Properties }
property Version: WideString read Get_Version write Set_Version;
property SETTINGS: IXMLSETTINGSType read Get_SETTINGS;
property METADATA: IXMLMETADATAType read Get_METADATA;
property PLUGINDATA: IXMLPLUGINDATAType read Get_PLUGINDATA;
property QUERYDATA: IXMLQUERYDATAType read Get_QUERYDATA;
property LINKEDMODELS: IXMLLINKEDMODELSType read Get_LINKEDMODELS;
end;
{ IXMLSETTINGSType }
IXMLSETTINGSType = interface(IXMLNode)
['{6B3D5680-9AA1-4F15-A70E-E19EC46E9B9B}']
{ Property Accessors }
function Get_GLOBALSETTINGS: IXMLGLOBALSETTINGSType;
function Get_DATATYPEGROUPS: IXMLDATATYPEGROUPSType;
function Get_DATATYPES: IXMLDATATYPESType;
function Get_COMMON_DATATYPES: IXMLCOMMON_DATATYPESType;
function Get_TABLEPREFIXES: IXMLTABLEPREFIXESType;
function Get_REGIONCOLORS: IXMLREGIONCOLORSType;
function Get_POSITIONMARKERS: IXMLPOSITIONMARKERSType;
{ Methods & Properties }
property GLOBALSETTINGS: IXMLGLOBALSETTINGSType read Get_GLOBALSETTINGS;
property DATATYPEGROUPS: IXMLDATATYPEGROUPSType read Get_DATATYPEGROUPS;
property DATATYPES: IXMLDATATYPESType read Get_DATATYPES;
property COMMON_DATATYPES: IXMLCOMMON_DATATYPESType read Get_COMMON_DATATYPES;
property TABLEPREFIXES: IXMLTABLEPREFIXESType read Get_TABLEPREFIXES;
property REGIONCOLORS: IXMLREGIONCOLORSType read Get_REGIONCOLORS;
property POSITIONMARKERS: IXMLPOSITIONMARKERSType read Get_POSITIONMARKERS;
end;
{ IXMLGLOBALSETTINGSType }
IXMLGLOBALSETTINGSType = interface(IXMLNode)
['{C3F13DE9-9ADF-408B-896F-090695160A9A}']
{ Property Accessors }
function Get_ModelName: WideString;
function Get_IDModel: Integer;
function Get_IDVersion: Integer;
function Get_VersionStr: WideString;
function Get_Comments: WideString;
function Get_UseVersionHistroy: Integer;
function Get_AutoIncVersion: Integer;
function Get_DatabaseType: WideString;
function Get_ZoomFac: WideString;
function Get_XPos: Integer;
function Get_YPos: Integer;
function Get_DefaultDataType: Integer;
function Get_DefaultTablePrefix: Integer;
function Get_DefSaveDBConn: WideString;
function Get_DefSyncDBConn: WideString;
function Get_DefQueryDBConn: WideString;
function Get_Printer: WideString;
function Get_HPageCount: WideString;
function Get_PageAspectRatio: WideString;
function Get_PageOrientation: Integer;
function Get_PageFormat: WideString;
function Get_SelectedPages: WideString;
function Get_UsePositionGrid: Integer;
function Get_PositionGridX: Integer;
function Get_PositionGridY: Integer;
function Get_TableNameInRefs: Integer;
function Get_DefaultTableType: Integer;
function Get_ActivateRefDefForNewRelations: Integer;
function Get_FKPrefix: WideString;
function Get_FKPostfix: WideString;
function Get_CreateFKRefDefIndex: Integer;
function Get_DBQuoteCharacter: WideString;
function Get_CreateSQLforLinkedObjects: Integer;
function Get_DefModelFont: WideString;
function Get_CanvasWidth: Integer;
function Get_CanvasHeight: Integer;
procedure Set_ModelName(Value: WideString);
procedure Set_IDModel(Value: Integer);
procedure Set_IDVersion(Value: Integer);
procedure Set_VersionStr(Value: WideString);
procedure Set_Comments(Value: WideString);
procedure Set_UseVersionHistroy(Value: Integer);
procedure Set_AutoIncVersion(Value: Integer);
procedure Set_DatabaseType(Value: WideString);
procedure Set_ZoomFac(Value: WideString);
procedure Set_XPos(Value: Integer);
procedure Set_YPos(Value: Integer);
procedure Set_DefaultDataType(Value: Integer);
procedure Set_DefaultTablePrefix(Value: Integer);
procedure Set_DefSaveDBConn(Value: WideString);
procedure Set_DefSyncDBConn(Value: WideString);
procedure Set_DefQueryDBConn(Value: WideString);
procedure Set_Printer(Value: WideString);
procedure Set_HPageCount(Value: WideString);
procedure Set_PageAspectRatio(Value: WideString);
procedure Set_PageOrientation(Value: Integer);
procedure Set_PageFormat(Value: WideString);
procedure Set_SelectedPages(Value: WideString);
procedure Set_UsePositionGrid(Value: Integer);
procedure Set_PositionGridX(Value: Integer);
procedure Set_PositionGridY(Value: Integer);
procedure Set_TableNameInRefs(Value: Integer);
procedure Set_DefaultTableType(Value: Integer);
procedure Set_ActivateRefDefForNewRelations(Value: Integer);
procedure Set_FKPrefix(Value: WideString);
procedure Set_FKPostfix(Value: WideString);
procedure Set_CreateFKRefDefIndex(Value: Integer);
procedure Set_DBQuoteCharacter(Value: WideString);
procedure Set_CreateSQLforLinkedObjects(Value: Integer);
procedure Set_DefModelFont(Value: WideString);
procedure Set_CanvasWidth(Value: Integer);
procedure Set_CanvasHeight(Value: Integer);
{ Methods & Properties }
property ModelName: WideString read Get_ModelName write Set_ModelName;
property IDModel: Integer read Get_IDModel write Set_IDModel;
property IDVersion: Integer read Get_IDVersion write Set_IDVersion;
property VersionStr: WideString read Get_VersionStr write Set_VersionStr;
property Comments: WideString read Get_Comments write Set_Comments;
property UseVersionHistroy: Integer read Get_UseVersionHistroy write Set_UseVersionHistroy;
property AutoIncVersion: Integer read Get_AutoIncVersion write Set_AutoIncVersion;
property DatabaseType: WideString read Get_DatabaseType write Set_DatabaseType;
property ZoomFac: WideString read Get_ZoomFac write Set_ZoomFac;
property XPos: Integer read Get_XPos write Set_XPos;
property YPos: Integer read Get_YPos write Set_YPos;
property DefaultDataType: Integer read Get_DefaultDataType write Set_DefaultDataType;
property DefaultTablePrefix: Integer read Get_DefaultTablePrefix write Set_DefaultTablePrefix;
property DefSaveDBConn: WideString read Get_DefSaveDBConn write Set_DefSaveDBConn;
property DefSyncDBConn: WideString read Get_DefSyncDBConn write Set_DefSyncDBConn;
property DefQueryDBConn: WideString read Get_DefQueryDBConn write Set_DefQueryDBConn;
property Printer: WideString read Get_Printer write Set_Printer;
property HPageCount: WideString read Get_HPageCount write Set_HPageCount;
property PageAspectRatio: WideString read Get_PageAspectRatio write Set_PageAspectRatio;
property PageOrientation: Integer read Get_PageOrientation write Set_PageOrientation;
property PageFormat: WideString read Get_PageFormat write Set_PageFormat;
property SelectedPages: WideString read Get_SelectedPages write Set_SelectedPages;
property UsePositionGrid: Integer read Get_UsePositionGrid write Set_UsePositionGrid;
property PositionGridX: Integer read Get_PositionGridX write Set_PositionGridX;
property PositionGridY: Integer read Get_PositionGridY write Set_PositionGridY;
property TableNameInRefs: Integer read Get_TableNameInRefs write Set_TableNameInRefs;
property DefaultTableType: Integer read Get_DefaultTableType write Set_DefaultTableType;
property ActivateRefDefForNewRelations: Integer read Get_ActivateRefDefForNewRelations write Set_ActivateRefDefForNewRelations;
property FKPrefix: WideString read Get_FKPrefix write Set_FKPrefix;
property FKPostfix: WideString read Get_FKPostfix write Set_FKPostfix;
property CreateFKRefDefIndex: Integer read Get_CreateFKRefDefIndex write Set_CreateFKRefDefIndex;
property DBQuoteCharacter: WideString read Get_DBQuoteCharacter write Set_DBQuoteCharacter;
property CreateSQLforLinkedObjects: Integer read Get_CreateSQLforLinkedObjects write Set_CreateSQLforLinkedObjects;
property DefModelFont: WideString read Get_DefModelFont write Set_DefModelFont;
property CanvasWidth: Integer read Get_CanvasWidth write Set_CanvasWidth;
property CanvasHeight: Integer read Get_CanvasHeight write Set_CanvasHeight;
end;
{ IXMLDATATYPEGROUPSType }
IXMLDATATYPEGROUPSType = interface(IXMLNodeCollection)
['{BDFEA2B2-0243-411F-BF23-57FC8CE16153}']
{ Property Accessors }
function Get_DATATYPEGROUP(Index: Integer): IXMLDATATYPEGROUPType;
{ Methods & Properties }
function Add: IXMLDATATYPEGROUPType;
function Insert(const Index: Integer): IXMLDATATYPEGROUPType;
property DATATYPEGROUP[Index: Integer]: IXMLDATATYPEGROUPType read Get_DATATYPEGROUP; default;
end;
{ IXMLDATATYPEGROUPType }
IXMLDATATYPEGROUPType = interface(IXMLNode)
['{181A43B3-E773-46A8-966E-7976034B39DF}']
{ Property Accessors }
function Get_Name: WideString;
function Get_Icon: Integer;
procedure Set_Name(Value: WideString);
procedure Set_Icon(Value: Integer);
{ Methods & Properties }
property Name: WideString read Get_Name write Set_Name;
property Icon: Integer read Get_Icon write Set_Icon;
end;
{ IXMLDATATYPESType }
IXMLDATATYPESType = interface(IXMLNodeCollection)
['{E1C85DE2-B775-4AB5-9FA5-CDD5CF73D52A}']
{ Property Accessors }
function Get_DATATYPE(Index: Integer): IXMLDATATYPEType;
{ Methods & Properties }
function Add: IXMLDATATYPEType;
function Insert(const Index: Integer): IXMLDATATYPEType;
property DATATYPE[Index: Integer]: IXMLDATATYPEType read Get_DATATYPE; default;
end;
{ IXMLDATATYPEType }
IXMLDATATYPEType = interface(IXMLNode)
['{FDFEE111-CEEB-4218-9BB2-80CB3D16117E}']
{ Property Accessors }
function Get_ID: Integer;
function Get_IDGroup: Integer;
function Get_TypeName: WideString;
function Get_Description: WideString;
function Get_ParamCount: Integer;
function Get_OptionCount: Integer;
function Get_ParamRequired: Integer;
function Get_EditParamsAsString: Integer;
function Get_SynonymGroup: Integer;
function Get_PhysicalMapping: Integer;
function Get_PhysicalTypeName: WideString;
function Get_PARAMS: IXMLPARAMSType;
function Get_OPTIONS: IXMLOPTIONSType;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -