Class TDataArray

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TDataArray = class(TObserver)

Description

TDataArray provides an interface to a 3D array of data.

All descendants of TDataArray that are instantiated must be registered with the system using RegisterClass in the initialization section of the unit in which they are declared.

Hierarchy

Overview

Fields

Private FAnnotation: T3DStringDataSet;
Private FCheckMax: boolean;
Private FCheckMin: boolean;
Private FColumnCount: integer;
Private FDataArray: pointer;
Private FDataType: TRbwDataType;
Private FEvaluatedAt: TEvaluatedAt;
Private FFormula: string;
Private FLayerCount: integer;
Private FLimits: TColoringLimits;
Private FLock: TDataLock;
Private FMax: double;
Private FMin: double;
Private FOrientation: TDataSetOrientation;
Private FRowCount: integer;
Private FTwoDInterpolator: TCustom2DInterpolater;
Private FUnits: string;
Private FUseList: TStringList;
Private FUseListUpToDate: boolean;
Private FVisible: boolean;
Private FOnDataSetUsed: TObjectUsedEvent;
Private FTimeList: TCustomTimeList;
Private FClassification: string;
Private FOnPostInitialize: TNotifyEvent;
Private FOnDestroy: TNotifyEvent;
Private FParameterUsed: boolean;
Private FParameterFormula: string;
Private FUniformStringValue: string;
Private FUniformIntegerValue: integer;
Private FUniformAnnotation: string;
Private FUniformBooleanValue: boolean;
Private FUniformRealValue: double;
Private FCachedLayerCount: Integer;
Private FCachedRowCount: Integer;
Private FCachedColumnCount: Integer;
Private FComment: string;
Private FAssociatedDataSets: string;
Private FMaxValue: string;
Private FMinValue: string;
Private FMinReal: double;
Private FMaxReal: double;
Private FMinRealPositive: double;
Private FMinInteger: Integer;
Private FMaxInteger: Integer;
Private FMinBoolean: Boolean;
Private FMaxBoolean: Boolean;
Private FMinString: string;
Private FMaxString: string;
Private FContourLimits: TColoringLimits;
Private FContours: TContours;
Private FFormulaObject: TFormulaObject;
Private FHash: longint;
Private FReadDataFromFile: Boolean;
Private FUpdatingProgress: Boolean;
Private FUseLgrEdgeCells: TLgrCellTreatment;
Private FUnicodeSaved: Boolean;
Private FDisplayName: string;
Private FContourAlg: TContourAlg;
Private FMinMaxUpToDate: Boolean;
Private FAngleType: TAngleType;
Protected FDimensionsChanged: boolean;
Protected FIsUniform: TIsUniform;
Protected FModel: TBaseModel;
Protected FCleared: boolean;
Protected FDataCached: boolean;
Protected FTempFileName: string;

Methods

Private function GetTwoDInterpolatorClass: string;
Private procedure ResetFormula(const Compiler: TRbwParser; const ErrorMessage: string);
Private procedure SetFormula(const Value: string);
Private procedure SetLimits(const Value: TColoringLimits);
Private procedure SetLock(const Value: TDataLock);
Private procedure SetTwoDInterpolator(const Value: TCustom2DInterpolater);
Private procedure SetTwoDInterpolatorClass(const Value: string);
Private procedure SetUnits(const Value: string);
Private procedure SetVisible(const Value: boolean);
Private procedure UpdateUseList;
Private procedure SetClassification(const Value: string);
Private function GetClassification: string;
Private procedure SetParameterFormula(const Value: string);
Private procedure SetParameterUsed(const Value: boolean);
Private procedure GetBoolArray(var AnArray: T3DBooleanDataSet);
Private procedure GetStringArray(var AnArray: T3DStringDataSet);
Private procedure GetRealArray(var AnArray: T3DRealDataSet);
Private procedure GetIntegerArray(var AnArray: T3DIntegerDataSet);
Private function GetLayerCount: integer;
Private function GetColumnCount: integer;
Private function GetRowCount: integer;
Private procedure SetComment(const Value: string);
Private function GetMaxValue: string;
Private function GetMinValue: string;
Private procedure SetContourLimits(const Value: TColoringLimits);
Private procedure ContourLimitsChanged(Sender: TObject);
Private procedure SetContours(const Value: TContours);
Private function GetFormula: string;
Private function ValueOK(const Layer, Row, Col: Integer; LocalLimits: TColoringLimits): Boolean;
Private function GetHash: longint;
Private procedure UpdateSubscriptions(NewUseList: TStringList; OldUseList: TStringList);
Private procedure ReadCompressedData(Stream: TStream);
Private procedure WriteCompressedData(Stream: TStream);
Private procedure SetUnicodeSaved(const Value: Boolean);
Private procedure SetDisplayName(const Value: string);
Private function GetDisplayName: string;
Private function GetDisplayFormula: string;
Private procedure SetContourAlg(const Value: TContourAlg);
Private function GetMaxReal: double;
Private function GetMinReal: double;
Private function GetMinRealPositive: double;
Private function GetMinInteger: integer;
Private function GetMaxInteger: integer;
Private function GetMinBoolean: boolean;
Private function GetMaxBoolean: boolean;
Private function GetMinString: string;
Private function GetMaxString: string;
Private procedure SetAngleType(const Value: TAngleType);
Protected procedure SetEvaluatedAt(const Value: TEvaluatedAt); virtual;
Protected procedure DefineProperties(Filer: TFiler); override;
Protected function GetCompiler: TRbwParser;
Protected procedure SetOrientation(const Value: TDataSetOrientation); virtual;
Protected procedure GetLimits(out ColLimit, RowLimit, LayerLimit: Integer);
Protected procedure ReadData(DecompressionStream: TDecompressionStream); virtual;
Protected procedure CountValues(out LayerLimit, RowLimit, ColLimit, Count: Integer);
Protected procedure StoreData(Stream: TStream); virtual;
Protected procedure RestoreArraySize;
Protected procedure ChangeAFormula(const NewFormula: string; var OldFormula: string; var UseListUpToDate: boolean; UseListFunction: TUseListFunction);
Protected function GetAnnotation(const Layer, Row, Col: integer): string; virtual;
Protected function GetBooleanData(const Layer, Row, Col: integer): boolean; virtual;
Protected function GetIntegerData(const Layer, Row, Col: integer): integer; virtual;
Protected function GetIsValue(const Layer, Row, Col: Integer): boolean; virtual;
Protected function GetOwner: TPersistent; override;
Protected function GetRealData(const Layer, Row, Col: integer): double; virtual;
Protected procedure GetRequiredDimensions(out NumberOfLayers, NumberOfRows, NumberOfColumns: integer);
Protected function GetStringData(const Layer, Row, Col: integer): string; virtual;
Protected function GetUseList: TStringList; virtual;
Protected procedure LimitsChanged(Sender: TObject);
Protected procedure SetAnnotation(const Layer, Row, Col: integer; const Value: string); virtual;
Protected procedure SetBooleanData(const Layer, Row, Col: integer; const Value: boolean); virtual;
Protected procedure SetDataType(const Value: TRbwDataType); virtual;
Protected procedure SetDimensions(const SetToZero: boolean = False); virtual;
Protected procedure SetIntegerData(const Layer, Row, Col, Value: integer); virtual;
Protected procedure SetIsValue(const Layer, Row, Col: Integer; const Value: boolean); virtual;
Protected procedure SetName(const Value: TComponentName); override;
Protected procedure SetRealData(const Layer, Row, Col: integer; const Value: double); virtual;
Protected procedure SetStringData(const Layer, Row, Col: integer; const Value: string); virtual;
Protected procedure SetUpToDate(const Value: boolean); override;
Protected procedure PostInitialize;
Protected procedure Clear; virtual;
Protected procedure RestoreData;
Protected procedure CheckRestoreData;
Protected procedure RemoveSubscription(Sender: TObject; const AName: string);
Protected procedure RestoreSubscription(Sender: TObject; const AName: string);
Protected procedure UpdateNotifiers; virtual;
Protected function IsSparseArray: boolean; virtual;
Public procedure UpdateWithoutNotification(NewOrientation: TDataSetOrientation; NewEvaluatedAt: TEvaluatedAt; NewDataType: TRbwDataType; var NeedToInvalidate: boolean);
Public procedure UpdateWithName(const AName: string); override;
Public procedure RestoreUpToDateStatus;
Public Procedure SetModelToNil;
Public procedure RefreshUseList;
Public function ColorGridValueOK(const Layer, Row, Col: integer): boolean;
Public function ContourGridValueOK(const Layer, Row, Col: integer): boolean;
Public procedure CheckIfUniform; virtual;
Public procedure GetMinMaxStoredLimits(out LayerMin, RowMin, ColMin, LayerMax, RowMax, ColMax: integer); virtual;
Public procedure UpdateMinMaxValues;
Public procedure Assign(Source: TPersistent); override;
Public procedure CacheData;
Public function FullClassification: string;
Public constructor Create(AnOwner: TComponent); override;
Public destructor Destroy; override;
Public function DisplayRealValue: boolean; virtual;
Public procedure FullUseList(const AStringList: TStringList);
Public procedure Initialize; virtual;
Public procedure Invalidate; virtual;
Public procedure UpdateDimensions(NumberOfLayers, NumberOfRows, NumberOfColumns: integer; ForceResize: boolean = False);
Public function UsedByModel: boolean;
Public procedure RefreshFormula; virtual;
Public procedure ComputeHash;
Public function IdenticalDataArrayContents(ADataArray: TDataArray): boolean;
Public procedure AssignProperties(Source: TDataArray); virtual;

Properties

Protected property DimensionsChanged: boolean read FDimensionsChanged;
Public property UnicodeSaved: Boolean read FUnicodeSaved write SetUnicodeSaved;
Public property Annotation[constLayer,Row,Col:integer]: string read GetAnnotation write SetAnnotation;
Public property BooleanData[constLayer,Row,Col:integer]: boolean read GetBooleanData write SetBooleanData;
Public property ColumnCount: integer read GetColumnCount;
Public property Formula: string read GetFormula write SetFormula;
Public property DisplayFormula: string read GetDisplayFormula write SetFormula;
Public property ParameterFormula: string read FParameterFormula write SetParameterFormula;
Public property ParameterUsed: boolean read FParameterUsed write SetParameterUsed;
Public property IntegerData[constLayer,Row,Col:integer]: integer read GetIntegerData write SetIntegerData;
Public property IsValue[constLayer,Row,Col:Integer]: boolean read GetIsValue write SetIsValue;
Public property IsUniform: TIsUniform read FIsUniform;
Public property UniformRealValue: double read FUniformRealValue;
Public property UniformIntegerValue: integer read FUniformIntegerValue;
Public property UniformBooleanValue: boolean read FUniformBooleanValue;
Public property UniformStringValue: string read FUniformStringValue;
Public property UniformAnnotation: string read FUniformAnnotation;
Public property LayerCount: integer read GetLayerCount;
Public property RealData[constLayer,Row,Col:integer]: double read GetRealData write SetRealData;
Public property RowCount: integer read GetRowCount;
Public property StringData[constLayer,Row,Col:integer]: string read GetStringData write SetStringData;
Public property UseList: TStringList read GetUseList;
Public property OnDataSetUsed: TObjectUsedEvent read FOnDataSetUsed write FOnDataSetUsed;
Public property ATimeList: TCustomTimeList read FTimeList write FTimeList;
Public property OnPostInitialize: TNotifyEvent read FOnPostInitialize write FOnPostInitialize;
Public property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy;
Public property AssociatedDataSets: string read FAssociatedDataSets write FAssociatedDataSets;
Public property MaxValue: string read GetMaxValue;
Public property MinValue: string read GetMinValue;
Public property MinReal: double read GetMinReal;
Public property MaxReal: double read GetMaxReal;
Public property MinRealPositive: double read GetMinRealPositive;
Public property MinInteger: integer read GetMinInteger;
Public property MaxInteger: integer read GetMaxInteger;
Public property MinBoolean: boolean read GetMinBoolean;
Public property MaxBoolean: boolean read GetMaxBoolean;
Public property MinString: string read GetMinString;
Public property MaxString: string read GetMaxString;
Public property Contours: TContours read FContours write SetContours;
Public property Hash: longint read GetHash;
Public property Model: TBaseModel read FModel;
Public property UseLgrEdgeCells: TLgrCellTreatment read FUseLgrEdgeCells write FUseLgrEdgeCells;
Public property DisplayName: string read GetDisplayName write SetDisplayName;
Public property ContourAlg: TContourAlg read FContourAlg write SetContourAlg;
Published property Classification: string read GetClassification write SetClassification;
Published property CheckMax: boolean read FCheckMax write FCheckMax;
Published property CheckMin: boolean read FCheckMin write FCheckMin;
Published property Comment: string read FComment write SetComment;
Published property DataType: TRbwDataType read FDataType write SetDataType;
Published property EvaluatedAt: TEvaluatedAt read FEvaluatedAt write SetEvaluatedAt;
Published property Limits: TColoringLimits read FLimits write SetLimits;
Published property ContourLimits: TColoringLimits read FContourLimits write SetContourLimits;
Published property Lock: TDataLock read FLock write SetLock;
Published property Max: double read FMax write FMax;
Published property Min: double read FMin write FMin;
Published property Orientation: TDataSetOrientation read FOrientation write SetOrientation;
Published property TwoInterpolatorClass: string read GetTwoDInterpolatorClass write SetTwoDInterpolatorClass stored False;
Published property TwoDInterpolatorClass: string read GetTwoDInterpolatorClass write SetTwoDInterpolatorClass;
Published property TwoDInterpolator: TCustom2DInterpolater read FTwoDInterpolator write SetTwoDInterpolator;
Published property Units: string read FUnits write SetUnits;
Published property Visible: boolean read FVisible write SetVisible stored False;
Published property AngleType: TAngleType read FAngleType write SetAngleType;

Description

Fields

Private FAnnotation: T3DStringDataSet;

See Annotation.

Private FCheckMax: boolean;

See CheckMax.

Private FCheckMin: boolean;

See CheckMin.

Private FColumnCount: integer;

See ColumnCount.

Private FDataArray: pointer;

Depending on DataType, FDataArray will be either a T3DRealDataSet, T3DIntegerDataSet, T3DBooleanDataSet, or T3DStringDataSet.

See RealData, IntegerData, BooleanData, and StringData,

Private FDataType: TRbwDataType;

See DataType.

Private FEvaluatedAt: TEvaluatedAt;

See EvaluatedAt.

Private FFormula: string;

FFormula is used as temporary storage when changing a formula. See Formula.

Private FLayerCount: integer;

See LayerCount.

Private FLimits: TColoringLimits;

See Limits.

Private FLock: TDataLock;

See Lock.

Private FMax: double;

See Max.

Private FMin: double;

See Min.

Private FOrientation: TDataSetOrientation;

See Orientation.

Private FRowCount: integer;

See RowCount.

Private FTwoDInterpolator: TCustom2DInterpolater;

See TwoDInterpolator.

Private FUnits: string;

See Units.

Private FUseList: TStringList;

See UseList.

Private FUseListUpToDate: boolean;

FUseListUpToDate is used to indicate whether the values in UseList need to be regenerated. Changing Formula causes FUseListUpToDate to be set to False. Calling UpdateUseList causes FUseListUpToDate to be set to True.

Private FVisible: boolean;

See Visible.

Private FOnDataSetUsed: TObjectUsedEvent;

See OnDataSetUsed.

Private FTimeList: TCustomTimeList;

See TCustomTimeList.

Private FClassification: string;

See Classification.

Private FOnPostInitialize: TNotifyEvent;

See OnPostInitialize.

Private FOnDestroy: TNotifyEvent;

See OnDestroy.

Private FParameterUsed: boolean;

See ParameterUsed.

Private FParameterFormula: string;

See ParameterFormula.

Private FUniformStringValue: string;

See UniformStringValue.

Private FUniformIntegerValue: integer;

See UniformIntegerValue.

Private FUniformAnnotation: string;

See UniformAnnotation.

Private FUniformBooleanValue: boolean;

See UniformBooleanValue.

Private FUniformRealValue: double;

See UniformRealValue.

Private FCachedLayerCount: Integer;

When the TDataArray is cached, FCachedLayerCount stores the number of layers.

Private FCachedRowCount: Integer;

When the TDataArray is cached, FCachedRowCount stores the number of rows.

Private FCachedColumnCount: Integer;

When the TDataArray is cached, FCachedColumnCount stores the number of columns.

Private FComment: string;

see Comment.

Private FAssociatedDataSets: string;

see AssociatedDataSets.

Private FMaxValue: string;

See MaxValue.

Private FMinValue: string;

See MinValue.

Private FMinReal: double;
 
Private FMaxReal: double;
 
Private FMinRealPositive: double;
 
Private FMinInteger: Integer;
 
Private FMaxInteger: Integer;
 
Private FMinBoolean: Boolean;
 
Private FMaxBoolean: Boolean;
 
Private FMinString: string;
 
Private FMaxString: string;
 
Private FContourLimits: TColoringLimits;
 
Private FContours: TContours;
 
Private FFormulaObject: TFormulaObject;
 
Private FHash: longint;
 
Private FReadDataFromFile: Boolean;
 
Private FUpdatingProgress: Boolean;
 
Private FUseLgrEdgeCells: TLgrCellTreatment;
 
Private FUnicodeSaved: Boolean;
 
Private FDisplayName: string;
 
Private FContourAlg: TContourAlg;
 
Private FMinMaxUpToDate: Boolean;
 
Private FAngleType: TAngleType;
 
Protected FDimensionsChanged: boolean;

See DimensionsChanged.

Protected FIsUniform: TIsUniform;

See IsUniform.

Protected FModel: TBaseModel;

FModel is the TPhastModel that owns the TDataArray.

Protected FCleared: boolean;

FCleared is True if the TDataArray has been cleared.

Protected FDataCached: boolean;

FDataCached is true if the TDataArray data has been stored in a temporary file.

Protected FTempFileName: string;

FTempFileName is the name of the temporary file used to store the TDataArray data.

Methods

Private function GetTwoDInterpolatorClass: string;

See TwoDInterpolatorClass.

Private procedure ResetFormula(const Compiler: TRbwParser; const ErrorMessage: string);

ResetFormula is called if an invalid formula has been specified. ResetFormula changes the formula to something that is sure to work.

Private procedure SetFormula(const Value: string);

See Formula.

Private procedure SetLimits(const Value: TColoringLimits);

See Limits.

Private procedure SetLock(const Value: TDataLock);

See Lock.

Private procedure SetTwoDInterpolator(const Value: TCustom2DInterpolater);

See TwoDInterpolator.

Private procedure SetTwoDInterpolatorClass(const Value: string);

See TwoDInterpolatorClass.

Private procedure SetUnits(const Value: string);

See Units.

Private procedure SetVisible(const Value: boolean);

See Visible.

Private procedure UpdateUseList;

UpdateUseList updates UseList with the variables used by Formula.

Private procedure SetClassification(const Value: string);

See Classification.

Private function GetClassification: string;

See Classification.

Private procedure SetParameterFormula(const Value: string);

See ParameterFormula.

Private procedure SetParameterUsed(const Value: boolean);

See ParameterUsed.

Private procedure GetBoolArray(var AnArray: T3DBooleanDataSet);

GetBoolArray gets the array used to store the boolean data.

Private procedure GetStringArray(var AnArray: T3DStringDataSet);

GetStringArray gets the array used to store the string data.

Private procedure GetRealArray(var AnArray: T3DRealDataSet);

GetRealArray gets the array used to store the real-number data.

Private procedure GetIntegerArray(var AnArray: T3DIntegerDataSet);

GetIntegerArray gets the array used to store the integer data.

Private function GetLayerCount: integer;

See LayerCount.

Private function GetColumnCount: integer;

See ColumnCount.

Private function GetRowCount: integer;

See RowCount.

Private procedure SetComment(const Value: string);

See Comment.

Private function GetMaxValue: string;

See MaxValue.

Private function GetMinValue: string;

See MinValue.

Private procedure SetContourLimits(const Value: TColoringLimits);
 
Private procedure ContourLimitsChanged(Sender: TObject);
 
Private procedure SetContours(const Value: TContours);
 
Private function GetFormula: string;
 
Private function ValueOK(const Layer, Row, Col: Integer; LocalLimits: TColoringLimits): Boolean;
 
Private function GetHash: longint;
 
Private procedure UpdateSubscriptions(NewUseList: TStringList; OldUseList: TStringList);
 
Private procedure ReadCompressedData(Stream: TStream);
 
Private procedure WriteCompressedData(Stream: TStream);
 
Private procedure SetUnicodeSaved(const Value: Boolean);
 
Private procedure SetDisplayName(const Value: string);
 
Private function GetDisplayName: string;
 
Private function GetDisplayFormula: string;
 
Private procedure SetContourAlg(const Value: TContourAlg);
 
Private function GetMaxReal: double;
 
Private function GetMinReal: double;
 
Private function GetMinRealPositive: double;
 
Private function GetMinInteger: integer;
 
Private function GetMaxInteger: integer;
 
Private function GetMinBoolean: boolean;
 
Private function GetMaxBoolean: boolean;
 
Private function GetMinString: string;
 
Private function GetMaxString: string;
 
Private procedure SetAngleType(const Value: TAngleType);
 
Protected procedure SetEvaluatedAt(const Value: TEvaluatedAt); virtual;

See EvaluatedAt.

Protected procedure DefineProperties(Filer: TFiler); override;
 
Protected function GetCompiler: TRbwParser;
 
Protected procedure SetOrientation(const Value: TDataSetOrientation); virtual;

See Orientation.

Protected procedure GetLimits(out ColLimit, RowLimit, LayerLimit: Integer);

GetLimits returns the dimensions of the TDataArray.

Protected procedure ReadData(DecompressionStream: TDecompressionStream); virtual;

ReadData reads the data that has been previously stored in a temporary file.

See also
StoreData
StoreData stores the data in TDataArray to a temporary file.
Protected procedure CountValues(out LayerLimit, RowLimit, ColLimit, Count: Integer);

CountValues returns the dimensions of the TDataArray and the number of values stored in the TDataArray.

Protected procedure StoreData(Stream: TStream); virtual;

StoreData stores the data in TDataArray to a temporary file.

See also
ReadData
ReadData reads the data that has been previously stored in a temporary file.
Protected procedure RestoreArraySize;

RestoreArraySize restores the dimensions of the TDataArray to what they should be.

Protected procedure ChangeAFormula(const NewFormula: string; var OldFormula: string; var UseListUpToDate: boolean; UseListFunction: TUseListFunction);

ChangeAFormula changes OldFormula to NewFormula and in the process updates the list of TObservers that affect the TDataArray.

Protected function GetAnnotation(const Layer, Row, Col: integer): string; virtual;

See Annotation.

Protected function GetBooleanData(const Layer, Row, Col: integer): boolean; virtual;

See BooleanData.

Protected function GetIntegerData(const Layer, Row, Col: integer): integer; virtual;

See IntegerData.

Protected function GetIsValue(const Layer, Row, Col: Integer): boolean; virtual;

See IsValue.

Protected function GetOwner: TPersistent; override;

GetOwner returns frmGoPhast.PhastModel.

Protected function GetRealData(const Layer, Row, Col: integer): double; virtual;

See RealData.

Protected procedure GetRequiredDimensions(out NumberOfLayers, NumberOfRows, NumberOfColumns: integer);

GetRequiredDimensions gets the number of dimensions that TDataArray needs to have.

Protected function GetStringData(const Layer, Row, Col: integer): string; virtual;

See StringData.

Protected function GetUseList: TStringList; virtual;

See UseList.

Protected procedure LimitsChanged(Sender: TObject);

LimitsChanged is the event handler for TColoringLimit.OnChange. If this TDataArray is being used to color the grid, LimitsChanged causes the colors displayed on the grid to be recalculated and the display to be updated.

Protected procedure SetAnnotation(const Layer, Row, Col: integer; const Value: string); virtual;

See Annotation.

Protected procedure SetBooleanData(const Layer, Row, Col: integer; const Value: boolean); virtual;

See BooleanData.

Protected procedure SetDataType(const Value: TRbwDataType); virtual;

See DataType.

Protected procedure SetDimensions(const SetToZero: boolean = False); virtual;

SetDimensions sets the size of the array of data stored by TDataArray to be set to the correct size. If SetToZero is true, the dimensions are all set to zero.

Protected procedure SetIntegerData(const Layer, Row, Col, Value: integer); virtual;

See IntegerData.

Protected procedure SetIsValue(const Layer, Row, Col: Integer; const Value: boolean); virtual;

See IsValue.

Protected procedure SetName(const Value: TComponentName); override;

SetName calls inherited SetName and then invalidates the model.

Protected procedure SetRealData(const Layer, Row, Col: integer; const Value: double); virtual;

See RealData.

Protected procedure SetStringData(const Layer, Row, Col: integer; const Value: string); virtual;

See StringData.

Protected procedure SetUpToDate(const Value: boolean); override;

SetUpToDate calls inherited and also notifies the model that it has changed. If the TDataArray is newly set to be up-to-date, the minimum and maximum values are calculated.

Protected procedure PostInitialize;

PostInitialize is used to set values of some cells in a TDataArray in some special way after it has been set in Initialize. PostInitialize calls OnPostInitialize if OnPostInitialize is assigned.

If a TDataArray overrides Initialize, it should call PostInitialize just before setting TObserver.UpToDate to True at the end of Initialize.

Protected procedure Clear; virtual;

Clear sets the array size to (0,0,0).

Protected procedure RestoreData;

RestoreData restores data from a temporary file.

Protected procedure CheckRestoreData;

When appropriate, CheckRestoreData restores data from a temporary file.

Protected procedure RemoveSubscription(Sender: TObject; const AName: string);

RemoveSubscription sets FIsUniform, FUniformAnnotation, and depending on DataType it also sets one of the following:

Protected procedure RestoreSubscription(Sender: TObject; const AName: string);
 
Protected procedure UpdateNotifiers; virtual;
 
Protected function IsSparseArray: boolean; virtual;
 
Public procedure UpdateWithoutNotification(NewOrientation: TDataSetOrientation; NewEvaluatedAt: TEvaluatedAt; NewDataType: TRbwDataType; var NeedToInvalidate: boolean);
 
Public procedure UpdateWithName(const AName: string); override;
 
Public procedure RestoreUpToDateStatus;
 
Public Procedure SetModelToNil;
 
Public procedure RefreshUseList;
 
Public function ColorGridValueOK(const Layer, Row, Col: integer): boolean;
 
Public function ContourGridValueOK(const Layer, Row, Col: integer): boolean;
 
Public procedure CheckIfUniform; virtual;
 
Public procedure GetMinMaxStoredLimits(out LayerMin, RowMin, ColMin, LayerMax, RowMax, ColMax: integer); virtual;
 
Public procedure UpdateMinMaxValues;

UpdateMinMaxValues updates MinValue and MaxValue.

Public procedure Assign(Source: TPersistent); override;

Assign does nothing is the Source is a TDataArray. otherwise, it raises an exception.

Public procedure CacheData;

CacheData stores the data in TDataArray in a temporary file.

Public function FullClassification: string;

FullClassification adds to Classification information about whether a TDataArray is required for the current model or not.

Public constructor Create(AnOwner: TComponent); override;

Create creates an instance of TDataArray.

Public destructor Destroy; override;

Destroy destroys the the current instance of TDataArray. Do not call Destroy directly. Call Free instead.

Public function DisplayRealValue: boolean; virtual;

DisplayRealValue is used when coloring the grid to specify that the real number value should be used when coloring the grid instead of the integer value. In TDataArray, DisplayRealValue always returns false. This is overridden in TIntegerPhastDataSet and TSparseIntegerPhastDataSet.

Public procedure FullUseList(const AStringList: TStringList);

FullUseList fills AStringList with the names of all the TDataArray that depend on the current TDataArray.

Public procedure Initialize; virtual;

Initialize assigns values to each location in RealData, IntegerData, BooleanData, or StringData in TDataArray. It first uses either Formula or TwoDInterpolator to assign values and then assigns values using TScreenObjects. See TCustomPhastDataSet.Initialize for a flow chart.

See also
PostInitialize
PostInitialize is used to set values of some cells in a TDataArray in some special way after it has been set in Initialize.
Public procedure Invalidate; virtual;

Invalidate is called when something has happened that would change the values assigned to the TDataArray.

Public procedure UpdateDimensions(NumberOfLayers, NumberOfRows, NumberOfColumns: integer; ForceResize: boolean = False);

UpdateDimensions updates the number of dimensions that need to be in the TDataArray. It does not actually change the dimensions of the array used to hold the data. See SetDimensions.

Public function UsedByModel: boolean;

UsedByModel returns true unless OnDataSetUsed is assigned. in which case it calls OnDataSetUsed and returns its result. See TPhastModel.ChemistryUsed. See TPhastModel.EquilibriumPhasesUsed. See TPhastModel.ExchangeUsed. See TPhastModel.GasPhaseUsed. See TPhastModel.InitialHeadUsed. See TPhastModel.KineticsUsed. See TPhastModel.SolidSolutionUsed. See TPhastModel.SurfacesUsed. See TPhastModel.InitialWaterTableUsed.

Public procedure RefreshFormula; virtual;
 
Public procedure ComputeHash;
 
Public function IdenticalDataArrayContents(ADataArray: TDataArray): boolean;
 
Public procedure AssignProperties(Source: TDataArray); virtual;
 

Properties

Protected property DimensionsChanged: boolean read FDimensionsChanged;

DimensionsChanged indicates that the dimensions of the data set have changed. This can happen either by the number of rows, columns, or layers in the grid has changed, because EvaluatedAt has changed, or because the Orientation has changed.

Public property UnicodeSaved: Boolean read FUnicodeSaved write SetUnicodeSaved;
 
Public property Annotation[constLayer,Row,Col:integer]: string read GetAnnotation write SetAnnotation;

When a value is assigned to a location in a TDataArray, Annotation is used to specify how that value was assigned. This can help the user understand why the value is what it is.

Public property BooleanData[constLayer,Row,Col:integer]: boolean read GetBooleanData write SetBooleanData;

BooleanData gives the boolean value at the location specified by Layer, Row, and Col.

Public property ColumnCount: integer read GetColumnCount;

ColumnCount gives the number of columns of data in the TDataArray.

Public property Formula: string read GetFormula write SetFormula;

Formula is the formula used to assign values to the TDataArray.

Public property DisplayFormula: string read GetDisplayFormula write SetFormula;
 
Public property ParameterFormula: string read FParameterFormula write SetParameterFormula;

ParameterFormula is the formula that is used to simulate how MODFLOW parameters are used in MODFLOW.

Public property ParameterUsed: boolean read FParameterUsed write SetParameterUsed;

ParameterUsed indicates whether MODFLOW parameters are used to set the TDataArray.

Public property IntegerData[constLayer,Row,Col:integer]: integer read GetIntegerData write SetIntegerData;

IntegerData gives the integer value at the location specified by Layer, Row, and Col.

Public property IsValue[constLayer,Row,Col:Integer]: boolean read GetIsValue write SetIsValue;

IsValue indicates that a value is present at the location specified by Layer, Row, Col. In TDataArray, IsValue is always true. In some descendants of TDataArray, IsValue can be false.

Public property IsUniform: TIsUniform read FIsUniform;

IsUniform indicates whether or not a TDataArray is uniform or not.

Public property UniformRealValue: double read FUniformRealValue;

If the TDataArray is uniform (see IsUniform and DataType is rdtReal, UniformRealValue is the uniform value in the TDataArray.

Public property UniformIntegerValue: integer read FUniformIntegerValue;

If the TDataArray is uniform (see IsUniform and DataType is rdtInteger, UniformIntegerValue is the uniform value in the TDataArray.

Public property UniformBooleanValue: boolean read FUniformBooleanValue;

If the TDataArray is uniform (see IsUniform and DataType is rdtBoolean, UniformBooleanValue is the uniform value in the TDataArray.

Public property UniformStringValue: string read FUniformStringValue;

If the TDataArray is uniform (see IsUniform and DataType is rdtString, UniformStringValue is the uniform value in the TDataArray.

Public property UniformAnnotation: string read FUniformAnnotation;

If the TDataArray is uniform (see IsUniform, UniformAnnotation is the annotation in the TDataArray.

Public property LayerCount: integer read GetLayerCount;

LayerCount gives the number of layers of data in the TDataArray.

Public property RealData[constLayer,Row,Col:integer]: double read GetRealData write SetRealData;

RealData gives the real number value at the location specified by Layer, Row, and Col.

Public property RowCount: integer read GetRowCount;

RowCount gives the number of rows of data in the TDataArray.

Public property StringData[constLayer,Row,Col:integer]: string read GetStringData write SetStringData;

StringData gives the string value at the location specified by Layer, Row, and Col.

Public property UseList: TStringList read GetUseList;

UseList is a list of the variables used by the Formula.

Public property OnDataSetUsed: TObjectUsedEvent read FOnDataSetUsed write FOnDataSetUsed;

See UsedByModel.

Public property ATimeList: TCustomTimeList read FTimeList write FTimeList;

ATimeList is the TPhastTimeList that controls this TDataArray.

Public property OnPostInitialize: TNotifyEvent read FOnPostInitialize write FOnPostInitialize;

OnPostInitialize is used to set values of some cells in a TDataArray in some special way after it has been set in Initialize. OnPostInitialize is called in PostInitialize if OnPostInitialize is assigned.

If a TDataArray overrides Initialize, it should call PostInitialize just before setting TObserver.UpToDate to True at the end of Initialize.

See also
PostInitialize
PostInitialize is used to set values of some cells in a TDataArray in some special way after it has been set in Initialize.
Initialize
Initialize assigns values to each location in RealData, IntegerData, BooleanData, or StringData in TDataArray.
Public property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy;

OnDestroy is called when a TDataArray is being destroyed.

Public property AssociatedDataSets: string read FAssociatedDataSets write FAssociatedDataSets;

AssociatedDataSets indicates the names of the data sets in the MODFLOW and/or PHAST model input files that are associated with the TDataArray.

Public property MaxValue: string read GetMaxValue;

MaxValue is a string representation of the maximum value in the TDataArray. See UpdateMinMaxValues.

Public property MinValue: string read GetMinValue;

MinValue is a string representation of the minimum value in the TDataArray. See UpdateMinMaxValues.

Public property MinReal: double read GetMinReal;
 
Public property MaxReal: double read GetMaxReal;
 
Public property MinRealPositive: double read GetMinRealPositive;
 
Public property MinInteger: integer read GetMinInteger;
 
Public property MaxInteger: integer read GetMaxInteger;
 
Public property MinBoolean: boolean read GetMinBoolean;
 
Public property MaxBoolean: boolean read GetMaxBoolean;
 
Public property MinString: string read GetMinString;
 
Public property MaxString: string read GetMaxString;
 
Public property Contours: TContours read FContours write SetContours;

Contours records the contouring data used to contour the data set. Contours may be nil.

Public property Hash: longint read GetHash;
 
Public property Model: TBaseModel read FModel;
 
Public property UseLgrEdgeCells: TLgrCellTreatment read FUseLgrEdgeCells write FUseLgrEdgeCells;
 
Public property DisplayName: string read GetDisplayName write SetDisplayName;
 
Public property ContourAlg: TContourAlg read FContourAlg write SetContourAlg;
 
Published property Classification: string read GetClassification write SetClassification;

Classification indicates the hierarchical position of this instance of TDataArray when it is required by MODFLOW.

Published property CheckMax: boolean read FCheckMax write FCheckMax;

If CheckMax is True, attempting to set IntegerData or RealData to a value greater than Max will cause it to be set to Trunc(Max) or Max.

Published property CheckMin: boolean read FCheckMin write FCheckMin;

If CheckMin is True, attempting to set IntegerData or RealData to a value less than Min will cause it to be set to Trunc(Min) or Min.

Published property Comment: string read FComment write SetComment;

Comment is a user-defined comment about the TDataArray. When importing a TDataArray, Comment may be assigned automatically.

Published property DataType: TRbwDataType read FDataType write SetDataType;

DataType indicates whether the data stored in TDataArray are real numbers, integers, booleans, or strings.

Published property EvaluatedAt: TEvaluatedAt read FEvaluatedAt write SetEvaluatedAt;

EvaluatedAt indicates whether the data in TDataArray are evaluated at element centers or nodes.

Published property Limits: TColoringLimits read FLimits write SetLimits;

Limits specifies how (or if) the values used to color the grid should be limited. See TColoringLimits.

Published property ContourLimits: TColoringLimits read FContourLimits write SetContourLimits;

ContourLimits specifies how (or if) the values used to color the grid should be limited. See TColoringLimits.

Published property Lock: TDataLock read FLock write SetLock;

Members of Lock are things the user ought not to be able to edit.

Published property Max: double read FMax write FMax;

See CheckMax.

Published property Min: double read FMin write FMin;

See CheckMin.

Published property Orientation: TDataSetOrientation read FOrientation write SetOrientation;

Orientation is used to indicate whether the TDataArray is a 2D or 3D data set and, if it is 2D, which face of the grid it is associated with.

Published property TwoInterpolatorClass: string read GetTwoDInterpolatorClass write SetTwoDInterpolatorClass stored False;

TwoInterpolatorClass is used only for backwards compatibility. TwoInterpolatorClass must be before TwoDInterpolator. See TwoDInterpolatorClass.

Published property TwoDInterpolatorClass: string read GetTwoDInterpolatorClass write SetTwoDInterpolatorClass;

TwoDInterpolatorClass is the name of the Class of TCustom2DInterpolater used with this TDataArray. Assigning TwoDInterpolatorClass will cause an instance of TCustom2DInterpolater to be created and assigned to TwoDInterpolator.

Important: when reading a TDataArray from a stream TwoDInterpolatorClass must be assigned before TwoDInterpolator so that an instance of TCustom2DInterpolater of the correct type will be created. To achieve this, TwoDInterpolatorClass must appear before TwoDInterpolator in the list of published properties.

Published property TwoDInterpolator: TCustom2DInterpolater read FTwoDInterpolator write SetTwoDInterpolator;

TwoDInterpolator is the TCustom2DInterpolater that is used to interpolate among TScreenObjects when assigning values to TDataArray.

Published property Units: string read FUnits write SetUnits;

Units is used to indicate the units for the data in TDataArray. Units is only a label; it has no significance for the model.

Published property Visible: boolean read FVisible write SetVisible stored False;

Visible has no effect. It is maintained only for backwards compatibility.

Published property AngleType: TAngleType read FAngleType write SetAngleType;
 

Generated by PasDoc 0.12.1 on 2013-05-13 15:41:30