Skip to content

UAndromedaStationDatabankComponent

Kind: class Source: Source/Andromeda/Station/AndromedaStationDatabankComponent.h Base classes: UActorComponent

Details

Station-owned scan memory keyed by IAndromedaScannableInterface::GetScannableId.

Protected Properties

Member Type Summary
ScanRecordsByScannableId TMap< FGuidFAndromedaScannedItemRecord, > Runtime-only station memory; records are not currently saved.

Public Methods

Member Type Summary
UAndromedaStationDatabankComponent function Disables ticking because the databank only changes when scanner workstations record results.
TryRecordScanResult bool Stores or replaces the scan record for a stable scannable id.
GetScanRecordForObject TOptional< FAndromedaScannedItemRecord > Looks up a scan record by scannable object.
GetScanRecordById TOptional< FAndromedaScannedItemRecord > Looks up a scan record by stable scan id.
HasValidScanRecordForObject bool Reports whether a record exists and its scan result is valid.
GetAllScanRecords TArray< FAndromedaScannedItemRecord > Returns all records as an array.

Members

ScanRecordsByScannableId

TMap< FGuidFAndromedaScannedItemRecord, > ScanRecordsByScannableId

Runtime-only station memory; records are not currently saved.

UAndromedaStationDatabankComponent

UAndromedaStationDatabankComponent::UAndromedaStationDatabankComponent()

Disables ticking because the databank only changes when scanner workstations record results.

TryRecordScanResult

bool UAndromedaStationDatabankComponent::TryRecordScanResult(const FGuid &ScannableId, const FAndromedaScanResult &ScanResult)

Stores or replaces the scan record for a stable scannable id.

Requires a valid scannable id. Records are timestamped with FDateTime::UtcNow.

Parameters:

Name Type Description
ScannableId const FGuid & Stable id that keys the record.
ScanResult const FAndromedaScanResult & Scan payload to store.

Returns:

True when the record was stored.

GetScanRecordForObject

TOptional< FAndromedaScannedItemRecord > UAndromedaStationDatabankComponent::GetScanRecordForObject(const UObject *ScannableObject) const

Looks up a scan record by scannable object.

Parameters:

Name Type Description
ScannableObject const UObject * Object whose scannable id should be resolved.

Returns:

Record for the object's scannable id, or unset when no record exists.

GetScanRecordById

TOptional< FAndromedaScannedItemRecord > UAndromedaStationDatabankComponent::GetScanRecordById(const FGuid &ScannableId) const

Looks up a scan record by stable scan id.

Parameters:

Name Type Description
ScannableId const FGuid & Stable id to search for.

Returns:

Record for the scannable id, or unset when no record exists.

HasValidScanRecordForObject

bool UAndromedaStationDatabankComponent::HasValidScanRecordForObject(UObject *ScannableObject) const

Reports whether a record exists and its scan result is valid.

The packager uses this to require a meaningful scan before packaging.

Parameters:

Name Type Description
ScannableObject UObject * Object to query.

Returns:

True when a record exists and Record.ScanResult.bValidResult is true.

GetAllScanRecords

TArray< FAndromedaScannedItemRecord > UAndromedaStationDatabankComponent::GetAllScanRecords() const

Returns all records as an array.

Returns:

Copy of current records; callers that care about ordering sort the returned array.