VR-Engage  2.3
Loading...
Searching...
No Matches
makVre::DtVreAssignmentPersistence Class Reference

Detailed Description

Serializes and deserializes assignment layouts to versioned JSON files. This class is UI-free and returns error and warning strings for the caller to present.

#include <vreAssignmentPersistence.h>

Static Public Member Functions

static bool saveToFile (const QString &filePath, const DtPersistedAssignmentFile &fileData, QString &errorText)
 
static bool loadFromFile (const QString &filePath, DtPersistedAssignmentFile &fileData, QString &errorText, QStringList &warningTexts)
 
static DtPersistedAssignmentFile buildFileData (const DtVreAssignmentTracker &tracker)
 

Member Function Documentation

◆ saveToFile()

static bool makVre::DtVreAssignmentPersistence::saveToFile ( const QString & filePath,
const DtPersistedAssignmentFile & fileData,
QString & errorText )
static

Saves the assignment file data to a JSON file.

Parameters
filePathThe target file path.
fileDataThe assignment data to serialize.
errorTextReceives an error description on failure.
Returns
true on success.

◆ loadFromFile()

static bool makVre::DtVreAssignmentPersistence::loadFromFile ( const QString & filePath,
DtPersistedAssignmentFile & fileData,
QString & errorText,
QStringList & warningTexts )
static

Loads assignment data from a JSON file.

Parameters
filePathThe source file path.
fileDataReceives the parsed assignment data on success.
errorTextReceives an error description on failure.
warningTextsReceives non-fatal warnings.
Returns
true on success.

◆ buildFileData()

static DtPersistedAssignmentFile makVre::DtVreAssignmentPersistence::buildFileData ( const DtVreAssignmentTracker & tracker)
static

Builds a persistence snapshot from the tracker's effective assignment state.

Exports the merged confirmed plus pending view so the saved file represents the operator's intended layout.

Parameters
trackerThe assignment tracker to export from.
Returns
The file data ready for saveToFile.

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