anchor.diff:  implementation
   
   uses
  -  sysutils;
  +  sysutils, variants;
   
   { TmDataProvider }
  +
  +procedure TmDataProvider.ClearIndexes;
  +var
  +  i : integer;
  +  tmpIndex : TmStringDictionary;
  +begin
  +  for i := 0 to FIndexedFieldNames.Count - 1 do
  +  begin
  +    tmpIndex := FIndexes.Find(FIndexedFieldNames.Strings[i]) as TmStringDictionary;
  +    if Assigned(tmpIndex) then
  +      tmpIndex.Clear;
  +  end;
  +  FMainIndex.Clear;
  +  FMustRebuildIndex:=true;
  +end;
  +
  +procedure TmDataProvider.AddIndex(const aFieldName: String);
  +begin
  +  if FIndexedFieldNames.IndexOf(aFieldName) < 0 then
  +  begin
  +    FIndexedFieldNames.Add(aFieldName);
  +    FMustRebuildIndex:= true;
  +  end;
  +end;
   
   procedure TmDataProvider.InternalAdd(aDatum: TObject);
   begin
  
positive.code: constructor TmDataProvider.Create(const aOwnsObject : boolean = true);
  begin
    FList := TObjectList.Create(aOwnsObject);
    FMap := TmStringDictionary.Create;
    FMustRebuildIndex:= true;
  end;
  
  destructor TmDataProvider.Destroy;
  begin
    FList.Free;
    FMap.Free;
    inherited Destroy;
  end;
  
  procedure TmDataProvider.Clear;
  begin
    FList.Clear;
    FMap.Clear;
    FMustRebuildIndex:=true;
  
  end;
  
  function TmDataProvider.Count: integer;
  
negative.code:     function GetDatum(const aIndex : integer) : IVDDatum;
      function FindDatumByKey (const aKey : IVDDatumKey) : IVDDatum;
      function FindDatumByStringKey (const aStringKey : string): IVDDatum;
      function FindDatumByIndexedField (const aIndexedFieldName, aValue : String): IVDDatum;
      procedure RebuildIndex;
  
      procedure FillVirtualFieldDefs (aFieldDefs : TmVirtualFieldDefs; const aPrefix : String); virtual; abstract;
  