Show/Hide Toolbars

RiverSoftAVG Products Help

Defines a class which accepts a writer and uses it to write heterogeneous collections (collections that contain items of different item classes.

noteNote

This class can only read and write heterogeneous collections at the TOP level. If a heterogeneous collection contains a heterogeneous collection property, you need to DefineProperty again.

Namespace: GStreams

Delphi

procedure DefineProperties(Filer: TFiler); override;
 begin
      inherited DefineProperties(Filer);
      Filer.DefineProperty( 'HPresets',
                            LoadPresetsProperty, StorePresetsProperty,
                            Presets.Count > 0 );
 end;
 procedure LoadPresetsProperty(Reader: TReader);
 var
    Filer: TGSpecialFiler;
 begin
      Filer := TGSpecialFiler.Create(Reader);
      try
         Filer.ReadCollection(Presets);
      finally
         Filer.Free;
      end;
 end;
 procedure StorePresetsProperty(Writer: TWriter);
 var
    Filer: TGSpecialFiler;
 begin
      Filer := TGSpecialFiler.Create(Writer);
      try
         Filer.WriteCollection(Presets);
      finally
         Filer.Free;
      end;
 end;
   

RiverSoftAVG Products Help © 1996-2016 Thomas G. Grubb