* Tablename property

git-svn-id: trunk@11496 -
This commit is contained in:
michael 2008-07-31 12:56:09 +00:00
parent d6c475c944
commit d04b2c5c7d

View File

@ -36,6 +36,7 @@ TYpe
FListAncestorName: String; FListAncestorName: String;
FListClassName : String; FListClassName : String;
FVisitorOptions: TVisitorOptions; FVisitorOptions: TVisitorOptions;
FTableName : String;
function GetListClassName: String; function GetListClassName: String;
procedure SetListAncestorName(const AValue: String); procedure SetListAncestorName(const AValue: String);
procedure SetListClassName(const AValue: String); procedure SetListClassName(const AValue: String);
@ -48,6 +49,7 @@ TYpe
Property ListAncestorName : String Read FListAncestorName Write SetListAncestorName; Property ListAncestorName : String Read FListAncestorName Write SetListAncestorName;
Property ListClassName : String Read GetListClassName Write SetListClassName; Property ListClassName : String Read GetListClassName Write SetListClassName;
Property AncestorClass; Property AncestorClass;
Property TableName : String Read FTableName Write FTableName;
end; end;
{ TTiOPFCodeGenerator } { TTiOPFCodeGenerator }
@ -98,6 +100,7 @@ TYpe
Const Const
SOID = 'OID'; // OID property. SOID = 'OID'; // OID property.
SDefTableName = 'MYTABLE'; // Default table name.
implementation implementation
@ -128,6 +131,7 @@ begin
FListAncestorName:='TtiObjectList'; FListAncestorName:='TtiObjectList';
AncestorClass:='TtiObject'; AncestorClass:='TtiObject';
ObjectClassName:='MyObject'; ObjectClassName:='MyObject';
TableName:=SDefTableName;
FVisitorOptions:=[voRead,voCreate,voDelete,voUpdate]; FVisitorOptions:=[voRead,voCreate,voDelete,voUpdate];
FClassOptions:=[caCreateList,caListAddMethod,caListItemsProperty]; FClassOptions:=[caCreateList,caListAddMethod,caListItemsProperty];
end; end;
@ -145,6 +149,7 @@ begin
AncestorClass:=OC.AncestorClass; AncestorClass:=OC.AncestorClass;
FVisitorOptions:=OC.FVisitorOptions; FVisitorOptions:=OC.FVisitorOptions;
FClassOptions:=OC.FClassOptions; FClassOptions:=OC.FClassOptions;
FTableName:=OC.TableName;
end; end;
inherited Assign(ASource); inherited Assign(ASource);
end; end;
@ -277,7 +282,9 @@ Var
F : TFieldPropDef; F : TFieldPropDef;
begin begin
TN:='MyTable'; TN:=TiOPFOptions.TableName;
If (TN='') then
TN:=SDefTableName;
S:=''; S:='';
VS:=''; VS:='';
W:='Your condition here'; W:='Your condition here';