TDataPoint<T> review

This commit is contained in:
Michael Schimmel
2025-06-11 08:54:04 +02:00
parent c4152d25cd
commit b03d02449a
3 changed files with 27 additions and 27 deletions
+4 -4
View File
@@ -21,7 +21,7 @@ type
TChartDataController = class
private
FTickDataArray: TArray<TDataRecord<TAskBidItem>>;
FTickDataArray: TArray<TDataPoint<TAskBidItem>>;
FOHLCCacheList: TList<TOHLC>;
FTimeframeSettingsArray: TArray<TTimeframeSetting>; // Now includes registered generic builders
FMemoLog: TStrings;
@@ -48,7 +48,7 @@ type
procedure ClearAllDataAndCaches;
function GetTickDataCount: Integer;
function GetTickDataLength: Integer;
function GetTickDataItem(AIndex: Integer): TDataRecord<TAskBidItem>;
function GetTickDataItem(AIndex: Integer): TDataPoint<TAskBidItem>;
function HasData: Boolean;
// ABuilderCaption is the unique key used for FTimeframeSettingsArray.Caption and FGenericBuilders key.
@@ -512,7 +512,7 @@ begin
Result := Length(FTickDataArray);
end;
function TChartDataController.GetTickDataItem(AIndex: Integer): TDataRecord<TAskBidItem>;
function TChartDataController.GetTickDataItem(AIndex: Integer): TDataPoint<TAskBidItem>;
begin
if (AIndex >= 0) and (AIndex < Length(FTickDataArray)) then
Result := FTickDataArray[AIndex]
@@ -522,7 +522,7 @@ begin
FMemoLog.Add(
Format('DataController: Attempted to access invalid tick data index %d. Count is %d.', [AIndex, Length(FTickDataArray)])
);
Result := Default(TDataRecord<TAskBidItem>);
Result := Default(TDataPoint<TAskBidItem>);
end;
end;