Up \ObjAlg
{@abstract( interfaces and implementation of
1D and 2D integer arrays and
1D, 2D and 3D float arrays with file support)
author: Nikolai Shokhirev )
created: February 02, 2002)
last modified: June 06, 2003)
ŠNikolai V. Shokhirev, 2002-2003
}
unit uFileArrays;
interface
uses
uMatTypes, uTensors, uArrays;
type
{ Interfaces for arrays with file support - - - - - - - - - - - - - - - - - - }
{ Interface for Dynamic integer 1D Array with file support }
IIntArray1D = interface(IIntVector)
['{05495069-1C53-11D7-82A2-00C04F2859BF}']
procedure ReadFromFile(aFileName: string);
procedure WriteToFile(aFileName: string);
property Comment: string read GetComment write SetComment;
end;
{ Interface for Dynamic integer 2D Array with file support }
IIntArray2D = interface(IIntMatrix)
['{0549506A-1C53-11D7-82A2-00C04F2859BF}']
procedure ReadFromFile(aFileName: string);
procedure WriteToFile(aFileName: string);
property Comment: string read GetComment write SetComment;
end;
{ Interface for Dynamic float 1D Array with file support }
IArray1D = interface(IVector)
['{0549506B-1C53-11D7-82A2-00C04F2859BF}']
procedure ReadFromFile(aFileName: string);
procedure WriteToFile(aFileName: string);
property Comment: string read GetComment write SetComment;
end;
{ Interface for Dynamic float 2D Array with file support }
IArray2D = interface(IMatrix)
['{0549506C-1C53-11D7-82A2-00C04F2859BF}']
procedure ReadFromFile(aFileName: string);
procedure WriteToFile(aFileName: string);
property Comment: string read GetComment write SetComment;
end;
{ Objects with file support - - - - - - - - - - - - - - - - - - - - - - - - - }
{ Dynamic 1D Array with file support }
TIntArray1D = class(TIntVector, IIntArray1D)
// TIntArray1D = class(TIntVector, IIntArray1D, IIntTensor1D)
public
constructor Create; overload; override;
constructor Create( aDim: TInt); overload; override;
constructor Create(aFileName: string); overload; virtual;
destructor Destroy; override;
procedure ReadFromFile(aFileName: string);
procedure WriteToFile(aFileName: string);
property Comment: string read GetComment write SetComment;
end;
{ Dynamic 2D Array with file support }
TIntArray2D = class(TIntMatrix, IIntArray2D)
public
constructor Create; overload; override;
constructor Create( aDim1,aDim2: TInt); overload; override;
constructor Create(aFileName: string); overload; virtual;
destructor Destroy; override;
procedure ReadFromFile(aFileName: string);
procedure WriteToFile(aFileName: string);
property Comment: string read GetComment write SetComment;
end;
{ Dynamic 1D Array with file support }
TArray1D = class(TVector, IArray1D)
public
constructor Create; overload; override;
constructor Create( aDim: TInt); overload; override;
constructor Create(aFileName: string); overload; virtual;
destructor Destroy; override;
procedure ReadFromFile(aFileName: string);
procedure WriteToFile(aFileName: string);
property Comment: string read GetComment write SetComment;
end;
{ Dynamic 2D Array with file support }
TArray2D = class(TMatrix, IArray2D)
public
constructor Create; overload; override;
constructor Create( aDim1,aDim2: TInt); overload; override;
constructor Create(aFileName: string); overload; virtual;
destructor Destroy; override;
procedure ReadFromFile(aFileName: string);
procedure WriteToFile(aFileName: string);
property Comment: string read GetComment write SetComment;
end;
implementation
end.
Up \ObjAlg