home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 October / Chip_2002-10_cd1.bin / zkuste / delphi / kolekce / d56 / FLEXCEL.ZIP / XLSAdapter / UXlsSections.pas < prev    next >
Pascal/Delphi Source File  |  2002-05-18  |  1KB  |  54 lines

  1. unit UXlsSections;
  2.  
  3. interface
  4. uses classes, sysutils, UXlsBaseRecords, UXlsBaseRecordLists, UXlsOtherRecords,
  5.      USST, XlsMessages;
  6. type
  7.   TBaseSection = class
  8.   private
  9.     FBOF: TBOFRecord;
  10.     FEOF: TEOFRecord;
  11.   protected
  12.     property BOF: TBOFRecord read FBOF write FBOF;
  13.     property EOF: TEOFRecord read FEOF write FEOF;
  14.   published
  15.     constructor Create;
  16.     destructor Destroy; override;
  17.     procedure Clear; virtual;
  18.     function TotalSize:int64; virtual;
  19.     procedure LoadFromStream( const DataStream: TStream; const First: TBOFRecord; const SST: TSST);virtual;abstract;
  20.     procedure SaveToStream( const DataStream: TStream );virtual;abstract;
  21.   end;
  22.  
  23. implementation
  24.  
  25. { TBaseSection }
  26.  
  27. procedure TBaseSection.Clear;
  28. begin
  29.   FreeAndNil(FBOF);
  30.   FreeAndNil(FEOF);
  31. end;
  32.  
  33. constructor TBaseSection.Create;
  34. begin
  35.   inherited;
  36.   FBOF:=nil;
  37.   FEOF:=nil;
  38. end;
  39.  
  40. destructor TBaseSection.Destroy;
  41. begin
  42.   Clear;
  43.   inherited;
  44. end;
  45.  
  46. function TBaseSection.TotalSize: int64;
  47. begin
  48.   Result:=EOF.TotalSize+ BOF.TotalSize;
  49. end;
  50.  
  51.  
  52.  
  53. end.
  54.