ASAPCabinetFE
 
Loading...
Searching...
No Matches
VpsDataScanner Class Reference

Matches VPX table metadata to VPS database entries in ASAPCabinetFE. More...

#include <vps_database_scanner.h>

+ Collaboration diagram for VpsDataScanner:

Public Member Functions

 VpsDataScanner (const nlohmann::json &vpsDb)
 Constructs a VpsDataScanner instance with a loaded VPS database.
 
bool matchMetadata (const nlohmann::json &vpxTable, TableData &tableData, LoadingProgress *progress=nullptr) const
 Matches a VPX table's metadata to a VPS database entry.
 

Detailed Description

Matches VPX table metadata to VPS database entries in ASAPCabinetFE.

This class enriches TableData objects by matching their metadata (primarily filename-derived title, manufacturer, and year) against vpsdb.json entries. It prioritizes filename-derived fields to handle unreliable internal metadata, uses simplified scoring for accuracy, and optimizes performance.

Constructor & Destructor Documentation

◆ VpsDataScanner()

VpsDataScanner::VpsDataScanner ( const nlohmann::json &  vpsDb)

Constructs a VpsDataScanner instance with a loaded VPS database.

Parameters
vpsDbReference to the parsed vpsdb.json data.

Member Function Documentation

◆ matchMetadata()

bool VpsDataScanner::matchMetadata ( const nlohmann::json &  vpxTable,
TableData tableData,
LoadingProgress progress = nullptr 
) const

Matches a VPX table's metadata to a VPS database entry.

Compares vpxTable JSON and TableData against vpsdb.json, prioritizing filename_title. Populates TableData's VPS fields (e.g., vpsId, vpsName) for high-confidence matches. Updates progress and logs mismatches.

Parameters
vpxTableJSON data from a VPX table (e.g., from vpin_scanner).
tableDataReference to the TableData object to match.
progressOptional pointer to LoadingProgress for real-time updates.
Returns
True if a match is found and applied, false otherwise.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: