From: Andrea P. <and...@us...> - 2004-09-10 10:17:52
|
Update of /cvsroot/instantobjects/Source/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30063 Modified Files: InstantCode.pas InstantConsts.pas InstantPersistence.pas Log Message: External TParts and External TReferences support Index: InstantConsts.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Core/InstantConsts.pas,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** InstantConsts.pas 5 Aug 2004 12:29:02 -0000 1.3 --- InstantConsts.pas 10 Sep 2004 10:16:59 -0000 1.4 *************** *** 56,59 **** --- 56,65 ---- InstantStartTagFormat= InstantTagStart + '%s' + InstantTagEnd; InstantUpdateCountFieldName = 'UpdateCount'; + + InstantParentIdFieldName = 'ParentId'; + InstantParentClassFieldName = 'ParentClass'; + InstantParentAttributeFieldName = 'ParentAttribute'; + InstantChildIdFieldName = 'ChildId'; + InstantChildClassFieldName = 'ChildClass'; resourcestring Index: InstantCode.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Core/InstantCode.pas,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** InstantCode.pas 29 Jul 2004 20:43:15 -0000 1.3 --- InstantCode.pas 10 Sep 2004 10:16:59 -0000 1.4 *************** *** 621,624 **** --- 621,630 ---- procedure SetStorageName(const Value: string); procedure SetVisibility(Value: TInstantCodeVisibility); + function GetExternalLinkedName: string; + function GetExternalStoredName: string; + function GetIsExternal: TInstantContainerIsExternal; + procedure SetExternalLinkedName(const Value: string); + procedure SetExternalStoredName(const Value: string); + procedure SetIsExternal(const Value: TInstantContainerIsExternal); protected function GetIsDefault: Boolean; virtual; *************** *** 666,669 **** --- 672,677 ---- property AttributeTypeName: string read GetAttributeTypeName write SetAttributeTypeName; property AttributeTypeText: string read GetAttributeTypeText; + property ExternalLinkedName: string read GetExternalLinkedName write SetExternalLinkedName; + property ExternalStoredName: string read GetExternalStoredName write SetExternalStoredName; property IncludeAddMethod: Boolean read GetIncludeAddMethod write SetIncludeAddMethod; property IncludeClearMethod: Boolean read GetIncludeClearMethod write SetIncludeClearMethod; *************** *** 673,676 **** --- 681,685 ---- property IncludeRemoveMethod: Boolean read GetIncludeRemoveMethod write SetIncludeRemoveMethod; property IsDefault: Boolean read GetIsDefault write SetIsDefault; + property IsExternal: TInstantContainerIsExternal read GetIsExternal write SetIsExternal; property IsIndexed: Boolean read GetIsIndexed write SetIsIndexed; property IsRequired: Boolean read GetIsRequired write SetIsRequired; *************** *** 1516,1519 **** --- 1525,1530 ---- MetaKeyDefault = 'default'; + MetaKeyExternalStored = 'externalstored'; + MetaKeyExternalLinked = 'externallinked'; MetaKeyFormat = 'format'; MetaKeyIndex = 'index'; *************** *** 1756,1759 **** --- 1767,1772 ---- procedure TContainerTypeProcessor.InternalRead; + var + Token:String; begin inherited; *************** *** 1764,1769 **** if NextChar = ';' then Break; ! if SameText(ReadToken, 'default') then FMetadata.IsDefault := True; end; end; --- 1777,1793 ---- if NextChar = ';' then Break; ! Token:=ReadToken; ! if SameText(Token, 'default') then FMetadata.IsDefault := True; + if SameText(Token, MetaKeyExternalStored) then + begin + FMetadata.IsExternal := ceStored; + FMetadata.ExternalStoredName := ReadStringValue; + end; + if SameText(Token, MetaKeyExternalLinked) then + begin + FMetadata.IsExternal := ceLinked; + FMetadata.ExternalLinkedName := ReadStringValue; + end; end; end; *************** *** 3693,3696 **** --- 3717,3730 ---- end; + function TInstantCodeAttribute.GetExternalLinkedName: string; + begin + Result := Metadata.ExternalLinkedName; + end; + + function TInstantCodeAttribute.GetExternalStoredName: string; + begin + Result := Metadata.ExternalStoredName; + end; + function TInstantCodeAttribute.GetFieldName: string; begin *************** *** 3753,3756 **** --- 3787,3795 ---- end; + function TInstantCodeAttribute.GetIsExternal: TInstantContainerIsExternal; + begin + Result := Metadata.IsExternal; + end; + function TInstantCodeAttribute.GetIsIndexed: Boolean; begin *************** *** 3939,3943 **** begin Writer.WriteFmt('%s: %s', [Name, AttributeTypeText]); ! WriteStr(MetaKeyStored, Metadata.StorageName); WriteStr(MetaKeyDefault, Metadata.DefaultValue); WriteStr(MetaKeyMask, Metadata.EditMask); --- 3978,3987 ---- begin Writer.WriteFmt('%s: %s', [Name, AttributeTypeText]); ! if Metadata.IsExternal = ceLinked then ! WriteStr(MetaKeyExternalLinked, Metadata.ExternalLinkedName) ! else if Metadata.IsExternal = ceStored then ! WriteStr(MetaKeyExternalStored, Metadata.ExternalStoredName) ! else ! WriteStr(MetaKeyStored, Metadata.StorageName); WriteStr(MetaKeyDefault, Metadata.DefaultValue); WriteStr(MetaKeyMask, Metadata.EditMask); *************** *** 3993,3996 **** --- 4037,4050 ---- end; + procedure TInstantCodeAttribute.SetExternalLinkedName(const Value: string); + begin + Metadata.ExternalLinkedName := Value; + end; + + procedure TInstantCodeAttribute.SetExternalStoredName(const Value: string); + begin + Metadata.ExternalStoredName := Value; + end; + procedure TInstantCodeAttribute.SetIncludeAddMethod(const Value: Boolean); begin *************** *** 4033,4036 **** --- 4087,4095 ---- end; + procedure TInstantCodeAttribute.SetIsExternal(const Value: TInstantContainerIsExternal); + begin + Metadata.IsExternal := Value; + end; + procedure TInstantCodeAttribute.SetIsIndexed(const Value: Boolean); begin Index: InstantPersistence.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Core/InstantPersistence.pas,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** InstantPersistence.pas 8 Sep 2004 21:59:52 -0000 1.7 --- InstantPersistence.pas 10 Sep 2004 10:16:59 -0000 1.8 *************** *** 25,29 **** * * Contributor(s): ! * Carlo Barazzetta, Adrea Petrelli: porting Kylix * Carlo Barazzetta: * - blob streaming in XML format (Part, Parts, References) --- 25,29 ---- * * Contributor(s): ! * Carlo Barazzetta, Andrea Petrelli: porting Kylix * Carlo Barazzetta: [...1727 lines suppressed...] I: Integer; --- 13768,13772 ---- procedure TInstantSQLResolver.ReadAttributes(AObject: TInstantObject; ! const AObjectId: string; Map: TInstantAttributeMap; DataSet: TDataSet); var I: Integer; *************** *** 13025,13029 **** if Assigned(AObject) and Assigned(Map) and Assigned(DataSet) then for I := 0 to Pred(Map.Count) do ! ReadAttribute(AObject, Map[I], DataSet); end; --- 13774,13778 ---- if Assigned(AObject) and Assigned(Map) and Assigned(DataSet) then for I := 0 to Pred(Map.Count) do ! ReadAttribute(AObject, AObjectId, Map[I], DataSet); end; |