◆ TableOverrideManager()
TableOverrideManager::TableOverrideManager |
( |
| ) |
|
|
default |
◆ applyOverrides()
void TableOverrideManager::applyOverrides |
( |
TableData & |
table | ) |
const |
Applies overrides from the table's JSON file to the TableData object.
Loads the JSON file (<table_name>.json) from the same directory as table.vpxFile and merges specified fields (e.g., title, playfieldVideo) into the TableData object. Only user-overrideable fields are updated. Logs errors if the file is missing or invalid.
- Parameters
-
table | The TableData object to modify with override values. |
◆ deleteOverride()
void TableOverrideManager::deleteOverride |
( |
const TableData & |
table | ) |
const |
Deletes the override JSON file for a table if it exists.
Removes <table_name>.json from the same directory as table.vpxFile.
- Parameters
-
table | The TableData object containing vpxFile. |
◆ overrideFileExists()
bool TableOverrideManager::overrideFileExists |
( |
const TableData & |
table | ) |
const |
Checks if the override JSON file exists for a table.
- Parameters
-
table | The TableData object containing vpxFile. |
- Returns
- True if <table_name>.json exists, false otherwise.
◆ reloadOverrides()
void TableOverrideManager::reloadOverrides |
( |
TableData & |
table | ) |
const |
Reloads overrides for a table (placeholder for dynamic reloading).
Future implementation will reload overrides during runtime if the JSON file changes.
- Parameters
-
table | The TableData object to reload overrides for. |
◆ saveOverride()
void TableOverrideManager::saveOverride |
( |
const TableData & |
table, |
|
|
const std::map< std::string, std::string > & |
overrides |
|
) |
| const |
Saves overrides to the table's JSON file.
Writes user-edited fields to <table_name>.json, merging with existing fields to preserve unedited ones. Logs errors if the file cannot be written.
- Parameters
-
table | The TableData object containing vpxFile for the file path. |
overrides | Map of field names to edited values. |
The documentation for this class was generated from the following files: