modelcreator.pas
来自「delphi框架」· PAS 代码 · 共 76 行
PAS
76 行
unit ModelCreator;
{**********************************************************************}
{ Copyright 2005 Reserved by Eazisoft.com }
{ File Name: ModelCreator.pas }
{ Author: Larry Le }
{ Description: Model Creator }
{ }
{ History: }
{ - 1.0, 19 May 2006 }
{ First version }
{ }
{ Email: linfengle@gmail.com }
{ }
{ The contents of this file are subject to the Mozilla Public License }
{ Version 1.1 (the "License"); you may not use this file except in }
{ compliance with the License. You may obtain a copy of the License at }
{ http://www.mozilla.org/MPL/ }
{ }
{ Software distributed under the License is distributed on an "AS IS" }
{ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See }
{ the License for the specific language governing rights and }
{ limitations under the License. }
{ }
{ The Original Code is written in Delphi. }
{ }
{ The Initial Developer of the Original Code is Larry Le. }
{ Copyright (C) eazisoft.com. All Rights Reserved. }
{ }
{**********************************************************************}
interface
uses
Windows, SysUtils,
ViewCreator,
FileCreator,
ToolsApi,
BaseCreator;
type
TModelCreator = class(TBaseCreator)
public
constructor Create(const APath: string = ''; ABaseName: string = '';
AUnNamed: Boolean = true); override;
function GetImplFileName: string; override;
function NewImplSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile; override;
end;
implementation
{ TModelCreator }
constructor TModelCreator.Create(const APath: string = ''; ABaseName: string = '';
AUnNamed: Boolean = true);
begin
inherited create(APath, ABaseName, AUnNamed);
self.SetAncestorName('Observable');
end;
function TModelCreator.GetImplFileName: string;
begin
result := self.getpath + getBaseName + 'Mdl.pas';
end;
function TModelCreator.NewImplSource(const ModuleIdent,
FormIdent, AncestorIdent: string): IOTAFile;
begin
Result := TFileCreator.Create(ModuleIdent, FormIdent, AncestorIdent, cMODEL);
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?