![]() |
NDEVR
API Documentation
|
Central manager for transit incident data, including buses, drivers, witnesses, officers, and vehicles. More...
Public Member Functions | |
| TransitIncidentManager (QTModelManager *manager) | |
| Constructs the TransitIncidentManager. | |
| UUID | activeAddressID () const |
| Returns the UUID for the active address scene node. | |
| UUID | activeBusID () const |
| Returns the UUID for the active bus scene node. | |
| UUID | activeDriverID () const |
| Returns the UUID for the active driver scene node. | |
| DynamicPointer< QTDesignObject > | busCache () |
| Returns the root design object for the bus cache. | |
| DynamicPointer< QTDesignObject > | driverCache () |
| Returns the root design object for the driver cache. | |
| DynamicPointer< QTDesignObject > | incidentAddress () |
| Returns the design object for the incident address. | |
| QTModelManager * | manager () const |
| Returns the model manager. | |
| DynamicPointer< QTDesignObject > | officerRoot () |
| Returns the root design object for officers. | |
| UUID | officerRootID () const |
| Returns the UUID for the officer root scene node. | |
| DynamicPointer< QTDesignObject > | pedestrianRoot () |
| Returns the root design object for pedestrians. | |
| UUID | pedestrianRootID () const |
| Returns the UUID for the pedestrian root scene node. | |
| void | saveBusCache () |
| Persists the bus cache to disk. | |
| void | saveDriverCache () |
| Persists the driver cache to disk. | |
| void | setActiveBus (const UUID &id) |
| Sets the active bus for the current incident by copying it from the cache. | |
| void | setActiveDriver (const UUID &id) |
| Sets the active driver for the current incident by copying from the cache. | |
| void | setupProject () |
| Initializes all root scene nodes required for an incident project. | |
| DynamicPointer< QTDesignObject > | vehicleRoot () |
| Returns the root design object for involved vehicles. | |
| UUID | vehicleRootID () const |
| Returns the UUID for the involved vehicles root scene node. | |
| DynamicPointer< QTDesignObject > | witnessRoot () |
| Returns the root design object for witnesses. | |
| UUID | witnessRootID () const |
| Returns the UUID for the witness root scene node. | |
Protected Member Functions | |
| void | createAddressRoot () |
| Creates the incident address root scene node if it does not already exist. | |
| void | createBussesRoot () |
| Loads or creates the bus cache root from disk. | |
| void | createDriverRoot () |
| Loads or creates the driver cache root from disk. | |
| void | createOfficerRoot () |
| Creates the officer root scene node if it does not already exist. | |
| void | createPedestrainRoot () |
| Creates the pedestrian root scene node if it does not already exist. | |
| void | createVehicleRoot () |
| Creates the involved vehicles root scene node if it does not already exist. | |
| void | createWitnessRoot () |
| Creates the witness root scene node if it does not already exist. | |
| UUID | readCache (const File &file, const StringView &root_name) |
| Reads a cache file from disk, or creates a new root scene if the file does not exist. | |
| void | saveCache (const File &file, const UUID &root) |
| Writes a scene tree to a cache file on disk. | |
Protected Attributes | |
| File | m_bus_cache_location |
| File path to the bus cache on disk. | |
| UUID | m_bus_cache_root = Constant<UUID>::Invalid |
| UUID of the bus cache root scene. | |
| Buffer< UUID > | m_bus_routes |
| Cached list of bus route UUIDs. | |
| File | m_driver_cache_location |
| File path to the driver cache on disk. | |
| UUID | m_driver_cache_root = Constant<UUID>::Invalid |
| UUID of the driver cache root scene. | |
| Buffer< UUID > | m_drivers |
| Cached list of driver UUIDs. | |
| QTModelManager * | m_manager |
| The model manager used for data access. | |
Central manager for transit incident data, including buses, drivers, witnesses, officers, and vehicles.
Definition at line 10 of file TransitIncidentManager.h.
|
inline |
Constructs the TransitIncidentManager.
| [in] | manager | The QTModelManager used for scene and model management. |
Definition at line 15 of file TransitIncidentManager.h.
References m_bus_cache_location, m_driver_cache_location, m_manager, and manager().
|
inline |
Returns the UUID for the active address scene node.
Definition at line 142 of file TransitIncidentManager.h.
References m_manager.
Referenced by createAddressRoot(), and incidentAddress().
|
inline |
Returns the UUID for the active bus scene node.
Definition at line 136 of file TransitIncidentManager.h.
References m_manager.
Referenced by setActiveBus().
|
inline |
Returns the UUID for the active driver scene node.
Definition at line 130 of file TransitIncidentManager.h.
References m_manager.
Referenced by setActiveDriver().
|
inline |
Returns the root design object for the bus cache.
Definition at line 63 of file TransitIncidentManager.h.
References m_bus_cache_root, and m_manager.
|
inline |
Returns the root design object for the driver cache.
Definition at line 69 of file TransitIncidentManager.h.
References m_driver_cache_root, and m_manager.
|
inline |
Returns the design object for the incident address.
Definition at line 75 of file TransitIncidentManager.h.
References activeAddressID(), and m_manager.
|
inline |
Returns the model manager.
Definition at line 22 of file TransitIncidentManager.h.
References m_manager.
Referenced by TransitIncidentManager().
|
inline |
Returns the root design object for officers.
Definition at line 39 of file TransitIncidentManager.h.
References m_manager, and officerRootID().
Referenced by OfficersEditor::OfficersEditor().
|
inline |
Returns the UUID for the officer root scene node.
Definition at line 154 of file TransitIncidentManager.h.
References m_manager.
Referenced by createOfficerRoot(), and officerRoot().
|
inline |
Returns the root design object for pedestrians.
Definition at line 51 of file TransitIncidentManager.h.
References m_manager, and pedestrianRootID().
Referenced by TransitIncidentPedestrianEditor::TransitIncidentPedestrianEditor().
|
inline |
Returns the UUID for the pedestrian root scene node.
Definition at line 160 of file TransitIncidentManager.h.
References m_manager.
Referenced by createPedestrainRoot(), and pedestrianRoot().
|
inlineprotected |
Reads a cache file from disk, or creates a new root scene if the file does not exist.
| [in] | file | The cache file path. |
| [in] | root_name | The display name for the root scene. |
Definition at line 185 of file TransitIncidentManager.h.
References FactoryOptions::application_locked, FactoryOptions::center_model, NDVFactory::DefaultFactory(), file, FactoryOptions::generate_trees, DesignObject::get(), guid, FactoryParameters::lookup, m_manager, FactoryParameters::models, NDVFactory::NDVFormat(), FactoryParameters::options, NDVFactory::readFile(), DesignObject::set(), FactoryOptions::tree_is_visible, and tree_visible.
Referenced by createBussesRoot(), and createDriverRoot().
Writes a scene tree to a cache file on disk.
| [in] | file | The cache file path. |
| [in] | root | The UUID of the root scene to save. |
Definition at line 210 of file TransitIncidentManager.h.
References NDVFactory::DefaultFactory(), file, FactoryParameters::lookup, m_manager, FactoryParameters::models, NDVFactory::NDVFormat(), and NDVFactory::writeFile().
Referenced by saveBusCache(), and saveDriverCache().
|
inline |
Sets the active bus for the current incident by copying it from the cache.
| [in] | id | The UUID of the bus to make active. |
Definition at line 81 of file TransitIncidentManager.h.
References activeBusID(), Model::copyFrom(), Model::createChild(), guid, DesignObject::isValid(), m_manager, DesignObject::set(), and uncompressed_data.
|
inline |
Sets the active driver for the current incident by copying from the cache.
| [in] | id | The UUID of the driver to make active. |
Definition at line 101 of file TransitIncidentManager.h.
References activeDriverID(), Model::createChild(), guid, m_manager, DesignObject::set(), and uncompressed_data.
|
inline |
Returns the root design object for involved vehicles.
Definition at line 57 of file TransitIncidentManager.h.
References m_manager, and vehicleRootID().
Referenced by TransitIncidentVehiclesEditor::TransitIncidentVehiclesEditor().
|
inline |
Returns the UUID for the involved vehicles root scene node.
Definition at line 166 of file TransitIncidentManager.h.
References m_manager.
Referenced by createVehicleRoot(), and vehicleRoot().
|
inline |
Returns the root design object for witnesses.
Definition at line 45 of file TransitIncidentManager.h.
References m_manager, and witnessRootID().
Referenced by WitnessEditor::WitnessEditor().
|
inline |
Returns the UUID for the witness root scene node.
Definition at line 148 of file TransitIncidentManager.h.
References m_manager.
Referenced by createWitnessRoot(), and witnessRoot().