224 std::string stationId,
const DtUUID& entityUUID,
const std::string& roleName,
bool spectatorMode =
false);
283 const DtUUID& entityUUID,
const std::string& roleName,
bool includePending =
true)
const;
294 const std::vector<std::string>& availableRoles)
const;
306 std::string stationId, DtUUID& entityUUID, std::string& roleName,
bool& isPending)
const;
428 virtual int getAssignedRoleCount(
const DtUUID& entityUUID,
const std::vector<std::string>& availableRoles)
const;
483 const std::function<
bool(
const DtUUID&)>& entityExists,
484 std::vector<std::string>& warnings,
485 std::string& errorText);
Tracks the status of VREngage applications.
Definition vreListener.h:105
virtual bool hasConflict(std::string stationId) const
Checks if a station is part of an unresolved conflict (2+ non-spectator stations on the same entity+r...
void stationRemoved(std::string stationId)
Emitted when a station is removed.
virtual std::vector< std::string > getPendingUnassignments() const
Gets all stations with pending unassignments.
DtVreAssignmentTracker(DtVreStatusListener &statusListener, QObject *parent=nullptr)
Constructor.
virtual bool isPlaceholderStation(std::string stationId) const
Checks if a station ID is a synthetic placeholder.
virtual bool hasPendingChanges() const
Checks if there are any pending changes.
void stationAdded(std::string stationId)
Emitted when a station is added.
virtual bool hasPendingUnassignment(std::string stationId) const
Checks if a station has a pending unassignment.
void stationAssignmentChanged(std::string stationId)
Emitted when a station's confirmed assignment changes.
virtual std::string getStationObjectName(std::string stationId) const
Gets the saved entity object name for an offline placeholder station.
virtual void clearPendingAssignment(std::string stationId)
Clears the pending assignment or unassignment for a station.
virtual void clearAllPendingAssignments()
Clears all pending assignments.
virtual DtUUID getStationEntityUUID(std::string stationId) const
Gets the confirmed entity UUID for a station.
std::string ensurePlaceholderStation(const DtPersistedAssignmentRecord &record)
virtual std::vector< DtPendingAssignmentInfo > getPendingAssignments() const
Gets all pending assignments for submit iteration.
DtVreAssignmentTracker(const DtVreAssignmentTracker &)=delete
Copy constructor (deleted)
virtual std::vector< DtRoleAssignment > getRoleAssignments(const DtUUID &entityUUID, const std::vector< std::string > &availableRoles) const
Gets role assignment information for all roles on an entity.
std::map< std::string, bool > mySpectatorPreferences
Map of station ID to pre-assignment spectator preference.
Definition vreAssignmentTracker.h:548
std::set< std::string > myRemovedStationIds
Station IDs that have been removed but may still be in the listener's map.
Definition vreAssignmentTracker.h:538
virtual void getPendingCounts(int &pendingCount, int &conflictCount) const
Gets counts of pending changes and conflicts.
std::map< std::string, DtPlaceholderStation > myPlaceholderStations
Map of placeholder station ID to placeholder data.
Definition vreAssignmentTracker.h:560
virtual void setPendingAssignment(std::string stationId, const DtUUID &entityUUID, const std::string &roleName, bool spectatorMode=false)
Sets a pending assignment for a station.
std::set< std::string > myPendingUnassignments
Set of station IDs with pending unassignments.
Definition vreAssignmentTracker.h:532
DtVreStatusListener & myStatusListener
Reference to status listener for confirmed assignments.
Definition vreAssignmentTracker.h:511
DtVreAssignmentTracker & operator=(const DtVreAssignmentTracker &)=delete
Assignment operator (deleted)
virtual void setPendingSpectatorMode(std::string stationId, bool spectatorMode)
Toggles spectator mode on an existing pending assignment.
std::map< std::string, std::string > myPlaceholderIdsByName
Map of station name to placeholder station ID for quick lookup.
Definition vreAssignmentTracker.h:563
virtual int getUnassignedStationCount() const
Gets count of unassigned stations.
virtual std::vector< DtPersistedAssignmentRecord > exportAssignmentsForPersistence() const
Exports the effective assignment snapshot for persistence.
virtual std::vector< std::string > getAssignedStations(const DtUUID &entityUUID, const std::string &roleName, bool includePending=true) const
Gets all stations assigned to a specific role.
virtual ~DtVreAssignmentTracker() override
Destructor.
unsigned int myNextPlaceholderStationId
Next synthetic placeholder ID suffix to allocate.
Definition vreAssignmentTracker.h:557
virtual bool importAssignmentsForPersistence(const std::vector< DtPersistedAssignmentRecord > &records, const std::function< bool(const DtUUID &)> &entityExists, std::vector< std::string > &warnings, std::string &errorText)
Imports saved assignments as pending state.
virtual bool getStationAssignment(std::string stationId, DtUUID &entityUUID, std::string &roleName, bool &isPending) const
Gets the current assignment for a station.
void wakePlaceholderForLiveStation(std::string liveStationId)
bool findLiveStationIdByName(const std::string &stationName, std::string &stationId) const
virtual bool isStationSpectator(std::string stationId) const
Gets whether a station is in spectator mode.
std::map< std::string, PendingAssignment > myPendingAssignments
Map of station ID to pending assignment.
Definition vreAssignmentTracker.h:525
void removePlaceholderStation(std::string stationId)
virtual std::vector< std::string > getPlaceholderStationIds() const
Returns all synthetic placeholder station IDs.
static constexpr const char * thePlaceholderStationIdPrefix
Prefix for synthetic placeholder station IDs.
Definition vreAssignmentTracker.h:554
static void onStationChanged(const std::string &id, void *userData)
Callback invoked when a station's confirmed state changes.
virtual void setPendingUnassignment(std::string stationId)
Sets a pending unassignment for a station.
virtual void setSpectatorPreference(std::string stationId, bool spectatorMode)
Sets the spectator mode preference for a station.
virtual std::string getStationRoleName(std::string stationId) const
Gets the confirmed role name for a station.
virtual std::string getStationName(std::string stationId) const
Gets the display name for a station.
virtual std::vector< std::string > getStationsToUnassign() const
Returns confirmed stations that will be unassigned on submit.
virtual int getAssignedRoleCount(const DtUUID &entityUUID, const std::vector< std::string > &availableRoles) const
Gets count of assigned roles for an entity.
virtual bool hasUnresolvedConflicts() const
Checks if any entity+role has 2+ non-spectator stations When true, the Submit button is disabled.
static void onStationRemoved(const std::string &id, void *userData)
Callback invoked when a station is removed from the listener.
void assignmentStateChanged()
Emitted when any assignment state changes.
virtual std::vector< std::string > getAllStationIds() const
Gets all station IDs.
static void onStationAdded(const std::string &id, void *userData)
Callback invoked when a station is added to the listener.
virtual int getConflictCount() const
Returns the number of roles with unresolved conflicts.
virtual int getTotalStationCount() const
Gets total station count.
std::string allocatePlaceholderStationId()
Export macros for the VREngage Manager library.
#define VREMANAGER_DLL
Platform-specific export/import macro for VREngage Manager library.
Definition export.h:28
!
Definition glsVreMessageUtil.h:50
Structure representing a pending assignment for submit iteration.
Definition vreAssignmentTracker.h:91
std::string myRoleName
The role name being assigned.
Definition vreAssignmentTracker.h:99
bool mySpectatorMode
Whether spectator mode should be enabled.
Definition vreAssignmentTracker.h:102
std::string myStationId
Station ID receiving the assignment.
Definition vreAssignmentTracker.h:93
DtUUID myEntityUUID
The entity UUID being assigned to.
Definition vreAssignmentTracker.h:96
One saved station-to-role assignment record.
Definition vreAssignmentPersistence.h:30
Represents an offline placeholder station whose assignment is saved but whose real station is not cur...
Definition vreAssignmentTracker.h:109
std::string myRoleName
Role name the placeholder holds (e.g., "driver", "gunner")
Definition vreAssignmentTracker.h:126
std::string myObjectName
Entity object name from the saved layout, for display.
Definition vreAssignmentTracker.h:123
std::string myStationId
Synthetic station ID assigned to the placeholder.
Definition vreAssignmentTracker.h:111
bool mySpectatorMode
Whether spectator mode is enabled for this placeholder assignment.
Definition vreAssignmentTracker.h:129
DtUUID myEntityUUID
UUID of the entity the placeholder is assigned to.
Definition vreAssignmentTracker.h:117
std::string myStationName
Name of the offline station (used for matching on discovery)
Definition vreAssignmentTracker.h:114
Structure representing a role assignment for display.
Definition vreAssignmentTracker.h:53
std::vector< bool > myStationSpectatorFlags
Whether each station is a spectator (parallel to myStationIds)
Definition vreAssignmentTracker.h:68
std::vector< std::string > myStationIds
Station IDs currently assigned to this role (confirmed state)
Definition vreAssignmentTracker.h:62
bool myHasConflict
True if 2+ non-spectator stations are on this role (unresolved conflict)
Definition vreAssignmentTracker.h:81
std::vector< bool > myStationPendingFlags
Whether each station is a pending assignment (parallel to myStationIds)
Definition vreAssignmentTracker.h:74
std::vector< std::string > myStationNames
Station names for display (parallel to myStationIds)
Definition vreAssignmentTracker.h:65
std::string myRoleName
The role name (e.g., "driver", "gunner", "commander")
Definition vreAssignmentTracker.h:55
Internal structure for pending assignment data.
Definition vreAssignmentTracker.h:515
DtUUID myEntityUUID
Entity UUID for pending assignment.
Definition vreAssignmentTracker.h:516
bool mySpectatorMode
Spectator mode flag.
Definition vreAssignmentTracker.h:518
std::string myRoleName
Role name for pending assignment.
Definition vreAssignmentTracker.h:517
JSON persistence helpers for Manager Panel assignment layouts.