TDataPoint<T> review
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user