NDEVR
API Documentation
DesignObjectLookup

A core class where all Design Objects including models, materials, and geometries are stored. More...

Inheritance diagram for DesignObjectLookup:
[legend]
Collaboration diagram for DesignObjectLookup:
[legend]

Public Member Functions

 DesignObjectLookup ()
 Constructs a new DesignObjectLookup with default-initialized members.
virtual ~DesignObjectLookup ()
 Virtual destructor.
DesignParameterAccumulator accumulateDesignParameter (const DesignParameter &channel, const BitFlag &accumulation_flags) const
 Accumulates statistics for a single design parameter.
Buffer< DesignParameterAccumulatoraccumulateDesignParameters (const BitFlag &accumulation_flags) const
 Accumulates statistics for all design parameters matching the given flags.
virtual UUID activeProject () const
 Returns the UUID of the currently active project.
virtual Project activeProjectModel () const
 Returns the active project as a Project model.
virtual void addCamera (const DynamicPointer< Camera > &object, bool generate_decorations=true)
 Adds a camera to the lookup.
virtual void addCameraModel (const UUID &camera, const Model &object)
 Associates a model with a specific camera.
virtual void addEffect (Effect object)
 Registers an effect in the lookup.
virtual void addGeometry (Geometry object)
 Registers a geometry in the lookup.
virtual void addLayer (Model layer)
 Registers a layer model in the lookup.
virtual void addMaterial (Material object)
 Registers a material in the lookup.
virtual void addModel (Model object)
 Registers a model in the lookup.
virtual void addScene (Scene scene, bool add_all_scene_models=true)
 Adds a scene to the lookup and optionally registers all of its models.
virtual void addSelection (const DesignSelection &object)
 Adds a design selection to the lookup.
void addUpdateTarget (DesignObjectUpdateTarget *target)
 Registers a target to receive design object update notifications.
virtual void appendSelected (Buffer< UUID > ids)
 Appends the specified object IDs to the current selection.
virtual uint08 approximateMemorySize (bool include_app_owned=false) const
 Estimates the total memory usage of all stored design objects.
Bounds< 3, fltp08bounds () const
 Computes the 3D bounding box encompassing all stored objects.
Bounds< 3, fltp08boundsOfVisible () const
 Computes the 3D bounding box encompassing all visible objects.
Bounds< 3, fltp08boundsOfVisible (const Camera &camera) const
 Computes the 3D bounding box of all objects visible to the given camera.
virtual CameraManagercameraManager ()
 Returns the camera manager.
virtual const CameraManagercameraManager () const
 Returns the camera manager (const).
void cleanupMemory ()
 Releases unused memory held by internal data structures.
virtual void clearAll ()
 Removes all design objects, scenes, and resets the lookup to an empty state.
virtual void clearSelected ()
 Clears all currently selected objects.
void colorByChannel (UUID target, const DesignParameter &channel)
 Applies color-by-channel visualization to a target model.
WLock commandLock ()
 Acquires a write lock specifically for command execution.
virtual DesignCommandManagercommandManager ()
 Returns the design command manager.
DynamicPointer< CameracreateCamera (const ViewportFormat &format)
 Creates a new camera with no explicit parent model.
DynamicPointer< CameracreateCamera (Model &parent, const ViewportFormat &format)
 Creates a new camera as a child of the specified parent model.
Material createCameraMaterial (UUID camera)
 Creates a new material associated with a specific camera.
Model createCameraModel (UUID camera)
 Creates a new model associated with a specific camera.
Model createLayer ()
 Creates a new layer model and registers it in the lookup.
Material createMaterial ()
 Creates a new material and registers it in the lookup.
Geometry createMesh ()
 Creates a new mesh geometry and registers it in the lookup.
Model createModel ()
 Creates a new model and registers it in the lookup.
const ScenedefaultScene ()
 Returns the default scene, which is constant to the application.
const Dictionary< UUID, DesignObject > & deletedObjects ()
 Returns the dictionary of all deleted design objects.
void deleteLayer (const UUID &layer_id, const UUID &scene_id)
 Removes a layer from a specific scene.
virtual void deleteObject (UUID id)
 Marks a design object as deleted by its UUID.
Buffer< DesignParameterdesignParameters () const
 Returns all available design parameters across all stored objects.
virtual ModelEditControllereditManager ()
 Returns the model edit controller.
Effect effect (const UUID &id, bool allow_deleted=false) const
 Retrieves an effect by its UUID.
const Dictionary< UUID, Effect > & effectObjects ()
 Returns the dictionary of all registered effects.
void ensureLayerExistsInAllScenes (const UUID &layer_id)
 Ensures the specified layer exists in all registered scenes.
void ensureLayerExistsInScene (const UUID &layer_id, const UUID &scene_id)
 Ensures a layer exists within a specific scene, creating it if necessary.
virtual void eraseModel (UUID id)
 Erases a model from the lookup, moving it to the erased objects store.
virtual void executePendingCommands ()
 Executes all pending design commands in the command queue.
Model findLayer (const String &layer, bool use_translation=true) const
 Finds a layer by its name string.
Model findLayer (const TranslatedString &layer) const
 Finds a layer by its translated name.
virtual void finishCommand (const DynamicPointer< DesignCommand > &command)
 Finalizes a design command after execution.
Geometry geometry (const UUID &id, bool allow_deleted=false) const
 Retrieves a geometry by its UUID.
const Dictionary< UUID, Geometry > & geometryObjects ()
 Returns the dictionary of all registered geometries.
const Dictionary< UUID, Model > & getAllSceneLayers (const UUID &id) const
 Returns all layers associated with a given scene.
DynamicPointer< CameragetCamera (const UUID &id)
 Retrieves a mutable camera pointer by its UUID.
ConstPointer< CameragetCamera (const UUID &id) const
 Retrieves a const camera pointer by its UUID.
Buffer< ModelgetCameraObjects () const
 Returns all models that are associated with cameras.
virtual Buffer< UUIDgetDescendantsOf (const Buffer< UUID > &model_ids)
 Returns the UUIDs of all descendants of the given models.
Set< UUIDgetExcludedIDs (UUID camera_id) const
 Returns the set of object IDs excluded from a specific camera's view.
virtual Buffer< UUIDgetInverseOf (const Buffer< UUID > &model_ids)
 Returns the UUIDs of all models that are NOT in the given set.
Buffer< ModelgetLayersByType (const Buffer< String > &types) const
 Returns all layers matching any of the specified type strings.
Buffer< ModelgetLayersByType (const StringView &type) const
 Returns all layers matching the specified type string.
Buffer< UUIDgetModelIDsByType (const StringView &type) const
 Returns the UUIDs of all models matching the specified type string.
Buffer< ModelgetModelsByID (const Buffer< UUID > &ids) const
 Retrieves models by their UUIDs from a buffer.
Buffer< ModelgetModelsByID (const Set< UUID > &ids) const
 Retrieves models by their UUIDs from a set.
Buffer< ModelgetModelsByName (const StringView &name) const
 Retrieves all models whose name matches the given string.
Buffer< ModelgetModelsByType (const Buffer< String > &types) const
 Returns all models matching any of the specified type strings.
Buffer< ModelgetModelsByType (const StringView &type) const
 Returns all models matching the specified type string.
Buffer< UUIDgetRootObjectIDs (bool include_app_owned=false) const
 Returns the UUIDs of all root-level objects.
Buffer< UUIDgetRootObjectIDs (UUID camera_id, bool include_app_owned=false) const
 Returns the UUIDs of root-level objects visible to a specific camera.
Buffer< ModelgetRootObjects (bool include_app_owned=false) const
 Returns all root-level model objects.
Buffer< ModelgetRootObjects (UUID camera_id, bool include_app_owned=false) const
 Returns root-level model objects visible to a specific camera.
const DynamicPointer< DesignSelection > & getSelectionInfo (const UUID &id)
 Retrieves a mutable selection info pointer by its UUID.
const ConstPointer< DesignSelection > & getSelectionInfo (const UUID &id) const
 Retrieves a const selection info pointer by its UUID.
bool hasCamera (const UUID &id) const
 Checks whether a camera with the given UUID exists.
bool hasEffect (const UUID &id) const
 Checks whether an effect with the given UUID exists.
bool hasGeometryID (const UUID &id, bool allow_deleted=false) const
 Checks whether a geometry with the given UUID exists.
bool hasLayerID (const UUID &id, bool allow_deleted=false) const
 Checks whether a layer with the given UUID exists in any scene.
bool hasLayerID (const UUID &id, const UUID &scene_id) const
 Checks whether a layer with the given UUID exists within a specific scene.
bool hasLayersOfType (const StringView &type) const
 Checks whether any layers of the specified type exist.
bool hasMaterialID (const UUID &id, bool allow_deleted=false) const
 Checks whether a material with the given UUID exists.
bool hasModelID (const UUID &id, bool allow_deleted=false) const
 Checks whether a model with the given UUID exists.
bool hasModelsOfType (const StringView &type) const
 Checks whether any models of the specified type exist.
bool hasObjectID (const UUID &id, bool allow_deleted=false) const
 Checks whether any design object with the given UUID exists.
bool hasSceneID (const UUID &id, bool allow_deleted=false) const
 Checks whether a scene with the given UUID exists.
bool hasSelectionInfo (const UUID &id) const
 Checks whether selection info with the given UUID exists.
void invalidateStationVisuals (bool invalidate_visuals, bool invalidate_font)
 Marks station visuals and/or fonts as needing re-rendering.
bool isCommandLocked () const
 Checks whether the command lock is currently held.
Model layer (const UUID &id, bool allow_deleted=false) const
 Retrieves a layer by its UUID.
Model layer (const UUID &layer_id, const UUID &scene_id, bool allow_deleted=false) const
 Retrieves a layer by its UUID within a specific scene.
const Dictionary< UUID, Dictionary< UUID, Model > > & layerObjects ()
 Returns the dictionary of all registered layers, organized by scene.
const void * lockPtr () const
 Returns a raw pointer to the internal lock primitive.
virtual LogManagerlogManager () const
 Returns the log manager.
Material material (const UUID &id, bool allow_deleted=false) const
 Retrieves a material by its UUID.
const Dictionary< UUID, Material > & materialObjects ()
 Returns the dictionary of all registered materials.
Model model (const UUID &id, bool allow_deleted=false) const
 Retrieves a model by its UUID.
const Dictionary< UUID, Model > & modelObjects ()
 Returns the dictionary of all registered models.
Model modelOrLayer (const UUID &id, bool allow_deleted=false) const
 Retrieves a model or layer by its UUID, checking both stores.
Buffer< Modelmodels (const Buffer< UUID > &ids, bool allow_deleted=false) const
 Retrieves multiple models by their UUIDs.
DesignObject object (const UUID &id) const
 Retrieves a generic design object by its UUID.
const Dictionary< UUID, DesignObject > & objects ()
 Returns the dictionary of all registered design objects.
void performDeletion (Buffer< UUID > deleted_objects)
 Permanently removes the specified objects from all stores.
template<class t_design_command_type>
void postCommand (const DynamicPointer< t_design_command_type > &command)
 Posts a typed design command for asynchronous execution.
virtual void postDesignCommand (const DynamicPointer< DesignCommand > &command)
 Posts a design command for asynchronous execution.
Dictionary< UUID, EnclosedModelInfoprocessSelection (const DesignSelection &info) const
 Processes a design selection and returns enclosed model information.
void processSelection (SelectionInfo &info) const
 Processes a selection query and populates the given SelectionInfo.
RLock readLock () const
 Acquires a shared read lock on the design object store.
RLock readLock (const std::function< void()> &wait_callback) const
 Acquires a shared read lock, calling a callback while waiting.
RDesignLock readLock (UUID id)
 Acquires a design-specific read lock for the object with the given UUID.
virtual void refreshModel (const Model &object)
 Triggers a refresh of the specified model.
virtual void refreshScene (UUID scene_id)
 Triggers a refresh of the scene with the given ID.
void removeDeletedObject (UUID id)
 Removes an object from the deleted objects store permanently.
void removeUpdateTarget (DesignObjectUpdateTarget *target)
 Unregisters a target from receiving design object update notifications.
virtual void requestAutoSave ()
 Requests an auto-save of the current design state.
virtual void requestAutoSaveCheckpoint ()
 Requests an auto-save checkpoint of the current design state.
virtual Material restoreMaterial (UUID id)
 Restores a previously deleted material back into the lookup.
virtual Model restoreModel (UUID id)
 Restores a previously deleted model back into the lookup.
template<class t_design_command_type>
void runCommand (const DynamicPointer< t_design_command_type > &command)
 Runs a typed design command synchronously.
virtual void runDesignCommand (const DynamicPointer< DesignCommand > &command)
 Runs a design command synchronously.
Scene scene (const UUID &id, bool allow_deleted=false) const
 Retrieves a scene by its UUID.
const Dictionary< UUID, Scene > & sceneObjects ()
 Returns the dictionary of all registered scenes.
Buffer< UUIDselected () const
 Returns the UUIDs of all currently selected objects.
void selectEnclosed (UUID selection_id)
 Selects all models enclosed by the specified selection region.
virtual SelectionControllerselectionController ()
 Returns the selection controller for viewport-based selection.
virtual SelectionEffectselectionEffect ()
 Returns the selection effect used for highlighting selected objects.
virtual void setActiveLayer (UUID layer_id)
 Sets the active layer by UUID.
virtual void setActiveProject (UUID layer_id)
 Sets the active project by UUID.
virtual void setSelected (Buffer< UUID > ids)
 Replaces the current selection with the specified object IDs.
void setSelectionEffect (SelectionEffect *effect)
 Sets the selection effect used for highlighting selected objects.
void setupDefaultScene ()
 Initializes the default scene with standard settings.
void setViewportFocus (AutoZoomFocus focus)
 Sets the auto-zoom focus target for viewports.
void startUpdateThread (const TimeSpan &span, std::function< void(const Exception &)> exception_callback)
 Starts a background thread that periodically calls update().
void stopUpdateThread ()
 Stops the background update thread if it is running.
virtual DesignTaskManagertaskManager () const
 Returns the design task manager.
WLock tryCommandLock ()
 Attempts to acquire a command write lock without blocking.
RLock tryReadLock (const TimeSpan &span) const
 Attempts to acquire a read lock within the specified time span.
RLock tryReadLock (uint08 milliseconds=10) const
 Attempts to acquire a read lock within the specified timeout.
WLock tryWriteLock (const TimeSpan &span)
 Attempts to acquire a write lock within the specified time span.
WLock tryWriteLock (uint08 milliseconds=10)
 Attempts to acquire a write lock within the specified timeout.
virtual void update (const Time &time, const std::function< void()> &wait_callback)
 Performs a periodic update of all design objects and effects.
virtual void updateModelTopLevel (const Model &object)
 Updates the top-level status of a model in the hierarchy.
void updateTranslation ()
 Triggers a translation update for all design objects.
Buffer< UUIDvisibleModels () const
 Returns the UUIDs of all currently visible models.
WLock writeLock () const
 Acquires an exclusive write lock on the design object store.
WLock writeLock (const std::function< void()> &wait_callback)
 Acquires an exclusive write lock, calling a callback while waiting.
WDesignLock writeLock (UUID id)
 Acquires a design-specific write lock for the object with the given UUID.

Public Attributes

Resource< Timeautosave_checkpoint_request_time
 The time of the most recent auto-save checkpoint request.
Resource< Timeautosave_request_time
 The time of the most recent auto-save request.
Resource< UUIDcurrent_layer
 The UUID of the currently active layer.
Resource< RGBColorfocus_color
 The highlight color used for focused objects.
Resource< Timemodified_time
 The last modification time of the design data.

Protected Member Functions

void updateEffects (const Time &time, const std::function< void()> &wait_callback)
 Updates all active effects for the current time step.

Protected Attributes

UUID m_active_layer
 The UUID of the currently active layer.
UUID m_active_project
 The UUID of the currently active project.
CameraManagerm_camera_controller
 Manages all camera instances and their lifecycle.
Dictionary< UUID, Modelm_camera_root
 Root models associated with each camera.
DesignCommandManagerm_command_controller
 Manages the design command queue and execution.
Scene m_default_scene
 The default scene, constant to the application (not written to files).
Dictionary< UUID, DesignObjectm_deleted_objects
 Design objects that have been soft-deleted.
Dictionary< UUID, DesignObjectm_design_objects
 All registered design objects keyed by UUID.
ModelEditControllerm_edit_controller
 Manages model editing operations.
Dictionary< UUID, Effectm_effect_objects
 All registered effect objects keyed by UUID.
Dictionary< UUID, std::pair< UUID, uint04 > > m_erased_objects
 Erased objects stored with their parent UUID and child index.
std::function< void(const Exception &)> m_exception_callback = nullptr
 Callback for exceptions thrown during background updates.
Dictionary< UUID, Geometrym_geometry_objects
 All registered geometry objects keyed by UUID.
ResourceListenerm_invalidate_station_visuals_listener
 Listener that triggers station visual invalidation.
ResourceListenerm_language_change_listener
 Listener that triggers translation updates on language change.
Time m_last_update_time
 The timestamp of the most recent update cycle.
Dictionary< UUID, Dictionary< UUID, Model > > m_layer_objects
 Layers organized by scene UUID, then layer UUID.
LogManagerm_log_manager
 Manages logging for design operations.
Dictionary< UUID, Materialm_material_objects
 All registered material objects keyed by UUID.
Dictionary< UUID, Modelm_model_objects
 All registered model objects keyed by UUID.
Dictionary< UUID, Modelm_model_root_objects
 Top-level root model objects.
TimeSpan m_preferred_update_timespan
 The preferred interval between background update cycles.
Dictionary< UUID, Modelm_referenced_root_objects
 Root objects referenced from external sources.
Dictionary< UUID, Scenem_referenced_scenes
 Scenes referenced by the lookup but not directly owned.
Dictionary< UUID, Scenem_scene_objects
 All registered scene objects keyed by UUID.
Buffer< UUIDm_selected_objects
 The UUIDs of currently selected objects.
SelectionControllerm_selection_controller
 Manages viewport-based selection logic.
SelectionEffectm_selection_effect
 The visual effect applied to selected objects.
Dictionary< UUID, DynamicPointer< DesignSelection > > m_selection_info
 Selection metadata keyed by selection UUID.
DesignTaskManagerm_task_controller
 Manages asynchronous design tasks.
bool m_update_language
 Whether a language/translation update is pending.
bool m_update_station_font
 Whether station fonts need to be re-rendered.
bool m_update_station_visuals
 Whether station visuals need to be re-rendered.
Buffer< DesignObjectUpdateTarget * > m_update_targets
 Registered targets that receive design object update notifications.
Threadm_update_thread = nullptr
 The background update thread, or nullptr if not running.
UUID m_uuid
 The unique identifier for this DesignObjectLookup instance.

Detailed Description

A core class where all Design Objects including models, materials, and geometries are stored.


Contains the logic necessary to build or display any number of Scenes simultaniously

See also
DesignObject, Model, Scene, DesignCommandManager

Definition at line 67 of file DesignObjectLookup.h.

Constructor & Destructor Documentation

◆ ~DesignObjectLookup()

virtual DesignObjectLookup::~DesignObjectLookup ( )
virtual

Virtual destructor.

Cleans up all managed resources and controllers.

Member Function Documentation

◆ accumulateDesignParameter()

DesignParameterAccumulator DesignObjectLookup::accumulateDesignParameter ( const DesignParameter & channel,
const BitFlag & accumulation_flags ) const
nodiscard

Accumulates statistics for a single design parameter.

Parameters
[in]channelThe design parameter to accumulate.
[in]accumulation_flagsFlags controlling which statistics to accumulate.
Returns
A DesignParameterAccumulator with the results.

◆ accumulateDesignParameters()

Buffer< DesignParameterAccumulator > DesignObjectLookup::accumulateDesignParameters ( const BitFlag & accumulation_flags) const
nodiscard

Accumulates statistics for all design parameters matching the given flags.

Parameters
[in]accumulation_flagsFlags controlling which statistics to accumulate.
Returns
A buffer of DesignParameterAccumulator results.

◆ activeProject()

virtual UUID DesignObjectLookup::activeProject ( ) const
inlinenodiscardvirtual

Returns the UUID of the currently active project.

Returns
The UUID of the active project.

Definition at line 199 of file DesignObjectLookup.h.

References m_active_project.

◆ activeProjectModel()

virtual Project DesignObjectLookup::activeProjectModel ( ) const
nodiscardvirtual

Returns the active project as a Project model.

Returns
The active Project model.

◆ addCamera()

virtual void DesignObjectLookup::addCamera ( const DynamicPointer< Camera > & object,
bool generate_decorations = true )
virtual

Adds a camera to the lookup.

Parameters
[in]objectThe camera to add.
[in]generate_decorationsWhether to generate visual decorations for the camera.

Reimplemented in QTModelManager.

◆ addCameraModel()

virtual void DesignObjectLookup::addCameraModel ( const UUID & camera,
const Model & object )
virtual

Associates a model with a specific camera.

Parameters
[in]cameraThe UUID of the camera to associate with.
[in]objectThe model to add under the camera.

Reimplemented in QTModelManager.

◆ addEffect()

virtual void DesignObjectLookup::addEffect ( Effect object)
virtual

Registers an effect in the lookup.

Parameters
[in]objectThe effect to add.

◆ addGeometry()

virtual void DesignObjectLookup::addGeometry ( Geometry object)
virtual

Registers a geometry in the lookup.

Parameters
[in]objectThe geometry to add.

Reimplemented in QTModelManager.

◆ addLayer()

virtual void DesignObjectLookup::addLayer ( Model layer)
virtual

Registers a layer model in the lookup.

Parameters
[in]layerThe layer model to add.

Reimplemented in QTModelManager.

References layer().

◆ addMaterial()

virtual void DesignObjectLookup::addMaterial ( Material object)
virtual

Registers a material in the lookup.

Parameters
[in]objectThe material to add.

Reimplemented in QTModelManager.

◆ addModel()

virtual void DesignObjectLookup::addModel ( Model object)
virtual

Registers a model in the lookup.

Parameters
[in]objectThe model to add.

Reimplemented in QTModelManager.

Referenced by NewModelCommand::execute().

◆ addScene()

virtual void DesignObjectLookup::addScene ( Scene scene,
bool add_all_scene_models = true )
virtual

Adds a scene to the lookup and optionally registers all of its models.

Parameters
[in]sceneThe scene to add.
[in]add_all_scene_modelsWhether to also add all models contained in the scene.

Reimplemented in QTModelManager.

References scene().

Referenced by NewModelCommand::execute().

◆ addSelection()

virtual void DesignObjectLookup::addSelection ( const DesignSelection & object)
virtual

Adds a design selection to the lookup.

Parameters
[in]objectThe selection to add.

◆ addUpdateTarget()

void DesignObjectLookup::addUpdateTarget ( DesignObjectUpdateTarget * target)

Registers a target to receive design object update notifications.

Parameters
[in]targetThe update target to add.

◆ appendSelected()

virtual void DesignObjectLookup::appendSelected ( Buffer< UUID > ids)
virtual

Appends the specified object IDs to the current selection.

Parameters
[in]idsThe UUIDs of the objects to add to the selection.

Reimplemented in QTModelManager.

◆ approximateMemorySize()

virtual uint08 DesignObjectLookup::approximateMemorySize ( bool include_app_owned = false) const
nodiscardvirtual

Estimates the total memory usage of all stored design objects.

Parameters
[in]include_app_ownedWhether to include application-owned objects in the estimate.
Returns
Approximate memory size in bytes.

◆ bounds()

Bounds< 3, fltp08 > DesignObjectLookup::bounds ( ) const
nodiscard

Computes the 3D bounding box encompassing all stored objects.

Returns
The 3D bounding box of all objects.

◆ boundsOfVisible() [1/2]

Bounds< 3, fltp08 > DesignObjectLookup::boundsOfVisible ( ) const
nodiscard

Computes the 3D bounding box encompassing all visible objects.

Returns
The 3D bounding box of visible objects.

◆ boundsOfVisible() [2/2]

Bounds< 3, fltp08 > DesignObjectLookup::boundsOfVisible ( const Camera & camera) const
nodiscard

Computes the 3D bounding box of all objects visible to the given camera.

Parameters
[in]cameraThe camera whose visible bounds to compute.
Returns
The 3D bounding box of visible objects.

◆ cameraManager() [1/2]

virtual CameraManager * DesignObjectLookup::cameraManager ( )
nodiscardvirtual

Returns the camera manager.

Returns
Pointer to the CameraManager.

◆ cameraManager() [2/2]

virtual const CameraManager * DesignObjectLookup::cameraManager ( ) const
nodiscardvirtual

Returns the camera manager (const).

Returns
Const pointer to the CameraManager.

◆ colorByChannel()

void DesignObjectLookup::colorByChannel ( UUID target,
const DesignParameter & channel )

Applies color-by-channel visualization to a target model.

Parameters
[in]targetThe UUID of the model to colorize.
[in]channelThe design parameter channel to use for coloring.

◆ commandLock()

WLock DesignObjectLookup::commandLock ( )
nodiscard

Acquires a write lock specifically for command execution.

Returns
A scoped write lock for the command system.

◆ commandManager()

virtual DesignCommandManager * DesignObjectLookup::commandManager ( )
nodiscardvirtual

Returns the design command manager.

Returns
Pointer to the DesignCommandManager.

◆ createCamera() [1/2]

DynamicPointer< Camera > DesignObjectLookup::createCamera ( const ViewportFormat & format)
nodiscard

Creates a new camera with no explicit parent model.

Parameters
[in]formatThe viewport format configuration for the camera.
Returns
A dynamic pointer to the newly created Camera.

◆ createCamera() [2/2]

DynamicPointer< Camera > DesignObjectLookup::createCamera ( Model & parent,
const ViewportFormat & format )
nodiscard

Creates a new camera as a child of the specified parent model.

Parameters
[in]parentThe parent model for the camera.
[in]formatThe viewport format configuration for the camera.
Returns
A dynamic pointer to the newly created Camera.

◆ createCameraMaterial()

Material DesignObjectLookup::createCameraMaterial ( UUID camera)
nodiscard

Creates a new material associated with a specific camera.

Parameters
[in]cameraThe UUID of the camera to associate with.
Returns
The newly created Material.

◆ createCameraModel()

Model DesignObjectLookup::createCameraModel ( UUID camera)
nodiscard

Creates a new model associated with a specific camera.

Parameters
[in]cameraThe UUID of the camera to associate with.
Returns
The newly created Model.

◆ createLayer()

Model DesignObjectLookup::createLayer ( )
nodiscard

Creates a new layer model and registers it in the lookup.

Returns
The newly created layer Model.

◆ createMaterial()

Material DesignObjectLookup::createMaterial ( )
nodiscard

Creates a new material and registers it in the lookup.

Returns
The newly created Material.

◆ createMesh()

Geometry DesignObjectLookup::createMesh ( )
nodiscard

Creates a new mesh geometry and registers it in the lookup.

Returns
The newly created Geometry.

◆ createModel()

Model DesignObjectLookup::createModel ( )
nodiscard

Creates a new model and registers it in the lookup.

Returns
The newly created Model.

◆ defaultScene()

const Scene & DesignObjectLookup::defaultScene ( )
inlinenodiscard

Returns the default scene, which is constant to the application.

Returns
A const reference to the default Scene.

Definition at line 515 of file DesignObjectLookup.h.

References m_default_scene.

◆ deletedObjects()

const Dictionary< UUID, DesignObject > & DesignObjectLookup::deletedObjects ( )
inlinenodiscard

Returns the dictionary of all deleted design objects.

Returns
A const reference to the deleted object dictionary.

Definition at line 546 of file DesignObjectLookup.h.

References m_deleted_objects.

◆ deleteLayer()

void DesignObjectLookup::deleteLayer ( const UUID & layer_id,
const UUID & scene_id )

Removes a layer from a specific scene.

Parameters
[in]layer_idThe UUID of the layer to remove.
[in]scene_idThe UUID of the scene to remove it from.

◆ deleteObject()

virtual void DesignObjectLookup::deleteObject ( UUID id)
virtual

Marks a design object as deleted by its UUID.

Parameters
[in]idThe UUID of the object to delete.

Reimplemented in QTModelManager.

Referenced by NewModelCommand::execute().

◆ designParameters()

Buffer< DesignParameter > DesignObjectLookup::designParameters ( ) const
nodiscard

Returns all available design parameters across all stored objects.

Returns
A buffer of DesignParameter descriptors.

◆ editManager()

virtual ModelEditController * DesignObjectLookup::editManager ( )
nodiscardvirtual

Returns the model edit controller.

Returns
Pointer to the ModelEditController.

◆ effect()

Effect DesignObjectLookup::effect ( const UUID & id,
bool allow_deleted = false ) const
nodiscard

Retrieves an effect by its UUID.

Parameters
[in]idThe UUID of the effect.
[in]allow_deletedWhether to search deleted objects as well.
Returns
The Effect object.

Referenced by setSelectionEffect().

◆ effectObjects()

const Dictionary< UUID, Effect > & DesignObjectLookup::effectObjects ( )
inlinenodiscard

Returns the dictionary of all registered effects.

Returns
A const reference to the effect dictionary.

Definition at line 543 of file DesignObjectLookup.h.

References m_effect_objects.

◆ ensureLayerExistsInAllScenes()

void DesignObjectLookup::ensureLayerExistsInAllScenes ( const UUID & layer_id)

Ensures the specified layer exists in all registered scenes.

Parameters
[in]layer_idThe UUID of the layer.

◆ ensureLayerExistsInScene()

void DesignObjectLookup::ensureLayerExistsInScene ( const UUID & layer_id,
const UUID & scene_id )

Ensures a layer exists within a specific scene, creating it if necessary.

Parameters
[in]layer_idThe UUID of the layer.
[in]scene_idThe UUID of the scene.

Referenced by SetLayerCommand::execute().

◆ eraseModel()

virtual void DesignObjectLookup::eraseModel ( UUID id)
virtual

Erases a model from the lookup, moving it to the erased objects store.

Parameters
[in]idThe UUID of the model to erase.

Reimplemented in QTModelManager.

◆ findLayer() [1/2]

Model DesignObjectLookup::findLayer ( const String & layer,
bool use_translation = true ) const
nodiscard

Finds a layer by its name string.

Parameters
[in]layerThe name of the layer to find.
[in]use_translationWhether to match against translated layer names.
Returns
The matching layer Model, or an invalid Model if not found.

References layer().

◆ findLayer() [2/2]

Model DesignObjectLookup::findLayer ( const TranslatedString & layer) const
nodiscard

Finds a layer by its translated name.

Parameters
[in]layerThe translated name of the layer to find.
Returns
The matching layer Model, or an invalid Model if not found.

References layer().

◆ finishCommand()

virtual void DesignObjectLookup::finishCommand ( const DynamicPointer< DesignCommand > & command)
virtual

Finalizes a design command after execution.

Parameters
[in]commandThe design command to finish.

Reimplemented in QTModelManager.

◆ geometry()

Geometry DesignObjectLookup::geometry ( const UUID & id,
bool allow_deleted = false ) const
nodiscard

Retrieves a geometry by its UUID.

Parameters
[in]idThe UUID of the geometry.
[in]allow_deletedWhether to search deleted objects as well.
Returns
The Geometry object.

◆ geometryObjects()

const Dictionary< UUID, Geometry > & DesignObjectLookup::geometryObjects ( )
inlinenodiscard

Returns the dictionary of all registered geometries.

Returns
A const reference to the geometry dictionary.

Definition at line 537 of file DesignObjectLookup.h.

References m_geometry_objects.

◆ getAllSceneLayers()

const Dictionary< UUID, Model > & DesignObjectLookup::getAllSceneLayers ( const UUID & id) const
nodiscard

Returns all layers associated with a given scene.

Parameters
[in]idThe UUID of the scene.
Returns
A const reference to the dictionary of layers keyed by UUID.

◆ getCamera() [1/2]

DynamicPointer< Camera > DesignObjectLookup::getCamera ( const UUID & id)
nodiscard

Retrieves a mutable camera pointer by its UUID.

Parameters
[in]idThe UUID of the camera.
Returns
A dynamic pointer to the Camera.

◆ getCamera() [2/2]

ConstPointer< Camera > DesignObjectLookup::getCamera ( const UUID & id) const
nodiscard

Retrieves a const camera pointer by its UUID.

Parameters
[in]idThe UUID of the camera.
Returns
A const pointer to the Camera.

◆ getCameraObjects()

Buffer< Model > DesignObjectLookup::getCameraObjects ( ) const
nodiscard

Returns all models that are associated with cameras.

Returns
A buffer of camera Model objects.

◆ getDescendantsOf()

virtual Buffer< UUID > DesignObjectLookup::getDescendantsOf ( const Buffer< UUID > & model_ids)
nodiscardvirtual

Returns the UUIDs of all descendants of the given models.

Parameters
[in]model_idsThe parent model UUIDs.
Returns
A buffer of descendant model UUIDs.

◆ getExcludedIDs()

Set< UUID > DesignObjectLookup::getExcludedIDs ( UUID camera_id) const
nodiscard

Returns the set of object IDs excluded from a specific camera's view.

Parameters
[in]camera_idThe UUID of the camera.
Returns
A set of excluded object UUIDs.

◆ getInverseOf()

virtual Buffer< UUID > DesignObjectLookup::getInverseOf ( const Buffer< UUID > & model_ids)
nodiscardvirtual

Returns the UUIDs of all models that are NOT in the given set.

Parameters
[in]model_idsThe UUIDs to exclude.
Returns
A buffer of model UUIDs not in the input set.

◆ getLayersByType() [1/2]

Buffer< Model > DesignObjectLookup::getLayersByType ( const Buffer< String > & types) const
nodiscard

Returns all layers matching any of the specified type strings.

Parameters
[in]typesThe layer type identifiers to search for.
Returns
A buffer of matching layer Model objects.

◆ getLayersByType() [2/2]

Buffer< Model > DesignObjectLookup::getLayersByType ( const StringView & type) const
nodiscard

Returns all layers matching the specified type string.

Parameters
[in]typeThe layer type identifier to search for.
Returns
A buffer of matching layer Model objects.

◆ getModelIDsByType()

Buffer< UUID > DesignObjectLookup::getModelIDsByType ( const StringView & type) const
nodiscard

Returns the UUIDs of all models matching the specified type string.

Parameters
[in]typeThe model type identifier to search for.
Returns
A buffer of matching model UUIDs.

◆ getModelsByID() [1/2]

Buffer< Model > DesignObjectLookup::getModelsByID ( const Buffer< UUID > & ids) const
nodiscard

Retrieves models by their UUIDs from a buffer.

Parameters
[in]idsThe UUIDs of the models to retrieve.
Returns
A buffer of matching Model objects.

◆ getModelsByID() [2/2]

Buffer< Model > DesignObjectLookup::getModelsByID ( const Set< UUID > & ids) const
nodiscard

Retrieves models by their UUIDs from a set.

Parameters
[in]idsThe UUIDs of the models to retrieve.
Returns
A buffer of matching Model objects.

◆ getModelsByName()

Buffer< Model > DesignObjectLookup::getModelsByName ( const StringView & name) const
nodiscard

Retrieves all models whose name matches the given string.

Parameters
[in]nameThe name to search for.
Returns
A buffer of matching Model objects.

◆ getModelsByType() [1/2]

Buffer< Model > DesignObjectLookup::getModelsByType ( const Buffer< String > & types) const
nodiscard

Returns all models matching any of the specified type strings.

Parameters
[in]typesThe model type identifiers to search for.
Returns
A buffer of matching Model objects.

◆ getModelsByType() [2/2]

Buffer< Model > DesignObjectLookup::getModelsByType ( const StringView & type) const
nodiscard

Returns all models matching the specified type string.

Parameters
[in]typeThe model type identifier to search for.
Returns
A buffer of matching Model objects.

◆ getRootObjectIDs() [1/2]

Buffer< UUID > DesignObjectLookup::getRootObjectIDs ( bool include_app_owned = false) const
nodiscard

Returns the UUIDs of all root-level objects.

Parameters
[in]include_app_ownedWhether to include application-owned root objects.
Returns
A buffer of root object UUIDs.

◆ getRootObjectIDs() [2/2]

Buffer< UUID > DesignObjectLookup::getRootObjectIDs ( UUID camera_id,
bool include_app_owned = false ) const
nodiscard

Returns the UUIDs of root-level objects visible to a specific camera.

Parameters
[in]camera_idThe UUID of the camera.
[in]include_app_ownedWhether to include application-owned root objects.
Returns
A buffer of root object UUIDs.

◆ getRootObjects() [1/2]

Buffer< Model > DesignObjectLookup::getRootObjects ( bool include_app_owned = false) const
nodiscard

Returns all root-level model objects.

Parameters
[in]include_app_ownedWhether to include application-owned root objects.
Returns
A buffer of root Model objects.

◆ getRootObjects() [2/2]

Buffer< Model > DesignObjectLookup::getRootObjects ( UUID camera_id,
bool include_app_owned = false ) const
nodiscard

Returns root-level model objects visible to a specific camera.

Parameters
[in]camera_idThe UUID of the camera.
[in]include_app_ownedWhether to include application-owned root objects.
Returns
A buffer of root Model objects.

◆ getSelectionInfo() [1/2]

const DynamicPointer< DesignSelection > & DesignObjectLookup::getSelectionInfo ( const UUID & id)
nodiscard

Retrieves a mutable selection info pointer by its UUID.

Parameters
[in]idThe UUID of the selection.
Returns
A reference to the dynamic pointer for the DesignSelection.

◆ getSelectionInfo() [2/2]

const ConstPointer< DesignSelection > & DesignObjectLookup::getSelectionInfo ( const UUID & id) const
nodiscard

Retrieves a const selection info pointer by its UUID.

Parameters
[in]idThe UUID of the selection.
Returns
A const reference to the const pointer for the DesignSelection.

◆ hasCamera()

bool DesignObjectLookup::hasCamera ( const UUID & id) const
nodiscard

Checks whether a camera with the given UUID exists.

Parameters
[in]idThe UUID to check.
Returns
True if the camera exists.

◆ hasEffect()

bool DesignObjectLookup::hasEffect ( const UUID & id) const
nodiscard

Checks whether an effect with the given UUID exists.

Parameters
[in]idThe UUID to check.
Returns
True if the effect exists.

◆ hasGeometryID()

bool DesignObjectLookup::hasGeometryID ( const UUID & id,
bool allow_deleted = false ) const
nodiscard

Checks whether a geometry with the given UUID exists.

Parameters
[in]idThe UUID to check.
[in]allow_deletedWhether to include deleted objects in the search.
Returns
True if the geometry exists.

◆ hasLayerID() [1/2]

bool DesignObjectLookup::hasLayerID ( const UUID & id,
bool allow_deleted = false ) const
nodiscard

Checks whether a layer with the given UUID exists in any scene.

Parameters
[in]idThe UUID to check.
[in]allow_deletedWhether to include deleted objects in the search.
Returns
True if the layer exists.

Referenced by SetLayerCommand::execute().

◆ hasLayerID() [2/2]

bool DesignObjectLookup::hasLayerID ( const UUID & id,
const UUID & scene_id ) const
nodiscard

Checks whether a layer with the given UUID exists within a specific scene.

Parameters
[in]idThe UUID of the layer to check.
[in]scene_idThe UUID of the scene to search in.
Returns
True if the layer exists in the specified scene.

◆ hasLayersOfType()

bool DesignObjectLookup::hasLayersOfType ( const StringView & type) const
nodiscard

Checks whether any layers of the specified type exist.

Parameters
[in]typeThe layer type identifier to search for.
Returns
True if at least one layer of the given type exists.

◆ hasMaterialID()

bool DesignObjectLookup::hasMaterialID ( const UUID & id,
bool allow_deleted = false ) const
nodiscard

Checks whether a material with the given UUID exists.

Parameters
[in]idThe UUID to check.
[in]allow_deletedWhether to include deleted objects in the search.
Returns
True if the material exists.

◆ hasModelID()

bool DesignObjectLookup::hasModelID ( const UUID & id,
bool allow_deleted = false ) const
nodiscard

Checks whether a model with the given UUID exists.

Parameters
[in]idThe UUID to check.
[in]allow_deletedWhether to include deleted objects in the search.
Returns
True if the model exists.

Referenced by NewModelCommand::execute().

◆ hasModelsOfType()

bool DesignObjectLookup::hasModelsOfType ( const StringView & type) const
nodiscard

Checks whether any models of the specified type exist.

Parameters
[in]typeThe model type identifier to search for.
Returns
True if at least one model of the given type exists.

◆ hasObjectID()

bool DesignObjectLookup::hasObjectID ( const UUID & id,
bool allow_deleted = false ) const
nodiscard

Checks whether any design object with the given UUID exists.

Parameters
[in]idThe UUID to check.
[in]allow_deletedWhether to include deleted objects in the search.
Returns
True if the object exists.

◆ hasSceneID()

bool DesignObjectLookup::hasSceneID ( const UUID & id,
bool allow_deleted = false ) const
nodiscard

Checks whether a scene with the given UUID exists.

Parameters
[in]idThe UUID to check.
[in]allow_deletedWhether to include deleted objects in the search.
Returns
True if the scene exists.

◆ hasSelectionInfo()

bool DesignObjectLookup::hasSelectionInfo ( const UUID & id) const
nodiscard

Checks whether selection info with the given UUID exists.

Parameters
[in]idThe UUID to check.
Returns
True if the selection info exists.

◆ invalidateStationVisuals()

void DesignObjectLookup::invalidateStationVisuals ( bool invalidate_visuals,
bool invalidate_font )

Marks station visuals and/or fonts as needing re-rendering.

Parameters
[in]invalidate_visualsWhether to invalidate station visual display.
[in]invalidate_fontWhether to invalidate station font rendering.

◆ isCommandLocked()

bool DesignObjectLookup::isCommandLocked ( ) const

Checks whether the command lock is currently held.

Returns
True if the command lock is active.

◆ layer() [1/2]

Model DesignObjectLookup::layer ( const UUID & id,
bool allow_deleted = false ) const
nodiscard

Retrieves a layer by its UUID.

Parameters
[in]idThe UUID of the layer.
[in]allow_deletedWhether to search deleted objects as well.
Returns
The layer Model object.

Referenced by addLayer(), SetLayerCommand::execute(), findLayer(), and findLayer().

◆ layer() [2/2]

Model DesignObjectLookup::layer ( const UUID & layer_id,
const UUID & scene_id,
bool allow_deleted = false ) const
nodiscard

Retrieves a layer by its UUID within a specific scene.

Parameters
[in]layer_idThe UUID of the layer.
[in]scene_idThe UUID of the scene containing the layer.
[in]allow_deletedWhether to search deleted objects as well.
Returns
The layer Model object.

◆ layerObjects()

const Dictionary< UUID, Dictionary< UUID, Model > > & DesignObjectLookup::layerObjects ( )
inlinenodiscard

Returns the dictionary of all registered layers, organized by scene.

Returns
A const reference to the nested layer dictionary.

Definition at line 531 of file DesignObjectLookup.h.

References m_layer_objects.

◆ lockPtr()

const void * DesignObjectLookup::lockPtr ( ) const

Returns a raw pointer to the internal lock primitive.

Returns
Pointer to the internal lock object.

Referenced by SetTextValue::execute(), VisibleCommand::execute(), BuildActionProgramLogic::executeMenuItems(), and BuildActionProgramLogic::setTreeWidgetsForSelection().

◆ logManager()

virtual LogManager * DesignObjectLookup::logManager ( ) const
nodiscardvirtual

Returns the log manager.

Returns
Pointer to the LogManager.

Reimplemented in QTModelManager.

◆ material()

Material DesignObjectLookup::material ( const UUID & id,
bool allow_deleted = false ) const
nodiscard

Retrieves a material by its UUID.

Parameters
[in]idThe UUID of the material.
[in]allow_deletedWhether to search deleted objects as well.
Returns
The Material object.

◆ materialObjects()

const Dictionary< UUID, Material > & DesignObjectLookup::materialObjects ( )
inlinenodiscard

Returns the dictionary of all registered materials.

Returns
A const reference to the material dictionary.

Definition at line 534 of file DesignObjectLookup.h.

References m_material_objects.

◆ model()

Model DesignObjectLookup::model ( const UUID & id,
bool allow_deleted = false ) const
nodiscard

◆ modelObjects()

const Dictionary< UUID, Model > & DesignObjectLookup::modelObjects ( )
inlinenodiscard

Returns the dictionary of all registered models.

Returns
A const reference to the model dictionary.

Definition at line 528 of file DesignObjectLookup.h.

References m_model_objects.

◆ modelOrLayer()

Model DesignObjectLookup::modelOrLayer ( const UUID & id,
bool allow_deleted = false ) const
nodiscard

Retrieves a model or layer by its UUID, checking both stores.

Parameters
[in]idThe UUID of the model or layer.
[in]allow_deletedWhether to search deleted objects as well.
Returns
The Model object.

Referenced by SetTextValue::execute(), and VisibleCommand::execute().

◆ models()

Buffer< Model > DesignObjectLookup::models ( const Buffer< UUID > & ids,
bool allow_deleted = false ) const
nodiscard

Retrieves multiple models by their UUIDs.

Parameters
[in]idsThe UUIDs of the models to retrieve.
[in]allow_deletedWhether to search deleted objects as well.
Returns
A buffer of Model objects.

◆ object()

DesignObject DesignObjectLookup::object ( const UUID & id) const
nodiscard

Retrieves a generic design object by its UUID.

Parameters
[in]idThe UUID of the object.
Returns
The DesignObject.

Referenced by SetProperties< t_property, t_type >::execute(), and SetProperty< t_property, t_type >::execute().

◆ objects()

const Dictionary< UUID, DesignObject > & DesignObjectLookup::objects ( )
inlinenodiscard

Returns the dictionary of all registered design objects.

Returns
A const reference to the design object dictionary.

Definition at line 540 of file DesignObjectLookup.h.

References m_design_objects.

◆ performDeletion()

void DesignObjectLookup::performDeletion ( Buffer< UUID > deleted_objects)

Permanently removes the specified objects from all stores.

Parameters
[in]deleted_objectsThe UUIDs of the objects to permanently delete.

◆ postCommand()

template<class t_design_command_type>
void DesignObjectLookup::postCommand ( const DynamicPointer< t_design_command_type > & command)
inline

Posts a typed design command for asynchronous execution.

Parameters
[in]commandThe command to post.
Template Parameters
t_design_command_typeThe concrete command type, must be convertible to DesignCommand.

Definition at line 447 of file DesignObjectLookup.h.

References postDesignCommand().

◆ postDesignCommand()

virtual void DesignObjectLookup::postDesignCommand ( const DynamicPointer< DesignCommand > & command)
virtual

Posts a design command for asynchronous execution.

Parameters
[in]commandThe design command to post.

Reimplemented in QTModelManager.

Referenced by postCommand().

◆ processSelection() [1/2]

Dictionary< UUID, EnclosedModelInfo > DesignObjectLookup::processSelection ( const DesignSelection & info) const

Processes a design selection and returns enclosed model information.

Parameters
[in]infoThe design selection to process.
Returns
A dictionary mapping UUIDs to EnclosedModelInfo for each enclosed model.

◆ processSelection() [2/2]

void DesignObjectLookup::processSelection ( SelectionInfo & info) const

Processes a selection query and populates the given SelectionInfo.

Parameters
[in]infoThe selection info to populate with results.

◆ readLock() [1/3]

RLock DesignObjectLookup::readLock ( ) const
nodiscard

Acquires a shared read lock on the design object store.

Returns
A scoped read lock that releases on destruction.

Referenced by FactoryModelFilters::FilterGeometryModels(), FactoryModelFilters::FilterGeometryModels(), FactoryModelFilters::FilterTypeModels(), FactoryModelFilters::FilterTypeModels(), and FactoryModelFilters::FilterTypeModels().

◆ readLock() [2/3]

RLock DesignObjectLookup::readLock ( const std::function< void()> & wait_callback) const
nodiscard

Acquires a shared read lock, calling a callback while waiting.

Parameters
[in]wait_callbackFunction invoked periodically while waiting for the lock.
Returns
A scoped read lock that releases on destruction.

◆ readLock() [3/3]

RDesignLock DesignObjectLookup::readLock ( UUID id)
nodiscard

Acquires a design-specific read lock for the object with the given UUID.

Parameters
[in]idThe UUID of the design object to lock.
Returns
A scoped design read lock.

◆ refreshModel()

virtual void DesignObjectLookup::refreshModel ( const Model & object)
virtual

Triggers a refresh of the specified model.

Parameters
[in]objectThe model to refresh.

◆ refreshScene()

virtual void DesignObjectLookup::refreshScene ( UUID scene_id)
virtual

Triggers a refresh of the scene with the given ID.

Parameters
[in]scene_idThe UUID of the scene to refresh.

◆ removeDeletedObject()

void DesignObjectLookup::removeDeletedObject ( UUID id)
inline

Removes an object from the deleted objects store permanently.

Parameters
[in]idThe UUID of the deleted object to remove.

Definition at line 549 of file DesignObjectLookup.h.

References m_deleted_objects.

◆ removeUpdateTarget()

void DesignObjectLookup::removeUpdateTarget ( DesignObjectUpdateTarget * target)

Unregisters a target from receiving design object update notifications.

Parameters
[in]targetThe update target to remove.

◆ restoreMaterial()

virtual Material DesignObjectLookup::restoreMaterial ( UUID id)
virtual

Restores a previously deleted material back into the lookup.

Parameters
[in]idThe UUID of the material to restore.
Returns
The restored Material.

◆ restoreModel()

virtual Model DesignObjectLookup::restoreModel ( UUID id)
virtual

Restores a previously deleted model back into the lookup.

Parameters
[in]idThe UUID of the model to restore.
Returns
The restored Model.

Reimplemented in QTModelManager.

Referenced by NewModelCommand::execute().

◆ runCommand()

template<class t_design_command_type>
void DesignObjectLookup::runCommand ( const DynamicPointer< t_design_command_type > & command)
inline

Runs a typed design command synchronously.

Parameters
[in]commandThe command to run.
Template Parameters
t_design_command_typeThe concrete command type, must be convertible to DesignCommand.

Definition at line 458 of file DesignObjectLookup.h.

References runDesignCommand().

◆ runDesignCommand()

virtual void DesignObjectLookup::runDesignCommand ( const DynamicPointer< DesignCommand > & command)
virtual

Runs a design command synchronously.

Parameters
[in]commandThe design command to run.

Reimplemented in QTModelManager.

Referenced by runCommand().

◆ scene()

Scene DesignObjectLookup::scene ( const UUID & id,
bool allow_deleted = false ) const
nodiscard

Retrieves a scene by its UUID.

Parameters
[in]idThe UUID of the scene.
[in]allow_deletedWhether to search deleted objects as well.
Returns
The Scene object.

Referenced by addScene().

◆ sceneObjects()

const Dictionary< UUID, Scene > & DesignObjectLookup::sceneObjects ( )
inlinenodiscard

Returns the dictionary of all registered scenes.

Returns
A const reference to the scene dictionary.

Definition at line 525 of file DesignObjectLookup.h.

References m_scene_objects.

◆ selected()

Buffer< UUID > DesignObjectLookup::selected ( ) const
nodiscard

Returns the UUIDs of all currently selected objects.

Returns
A buffer of selected object UUIDs.

Referenced by QTModelManager::onSelectedSignal().

◆ selectEnclosed()

void DesignObjectLookup::selectEnclosed ( UUID selection_id)

Selects all models enclosed by the specified selection region.

Parameters
[in]selection_idThe UUID of the selection defining the enclosure.

◆ selectionController()

virtual SelectionController * DesignObjectLookup::selectionController ( )
nodiscardvirtual

Returns the selection controller for viewport-based selection.

Returns
Pointer to the SelectionController.

◆ selectionEffect()

virtual SelectionEffect * DesignObjectLookup::selectionEffect ( )
nodiscardvirtual

Returns the selection effect used for highlighting selected objects.

Returns
Pointer to the SelectionEffect.

◆ setActiveLayer()

virtual void DesignObjectLookup::setActiveLayer ( UUID layer_id)
virtual

Sets the active layer by UUID.

Parameters
[in]layer_idThe UUID of the layer to make active.

Reimplemented in QTModelManager.

◆ setActiveProject()

virtual void DesignObjectLookup::setActiveProject ( UUID layer_id)
virtual

Sets the active project by UUID.

Parameters
[in]layer_idThe UUID of the project to make active.

Reimplemented in QTModelManager.

◆ setSelected()

virtual void DesignObjectLookup::setSelected ( Buffer< UUID > ids)
virtual

Replaces the current selection with the specified object IDs.

Parameters
[in]idsThe UUIDs of the objects to select.

Reimplemented in QTModelManager.

◆ setSelectionEffect()

void DesignObjectLookup::setSelectionEffect ( SelectionEffect * effect)

Sets the selection effect used for highlighting selected objects.

Parameters
[in]effectThe selection effect to use.

References effect().

◆ setViewportFocus()

void DesignObjectLookup::setViewportFocus ( AutoZoomFocus focus)

Sets the auto-zoom focus target for viewports.

Parameters
[in]focusThe focus configuration to apply.

◆ startUpdateThread()

void DesignObjectLookup::startUpdateThread ( const TimeSpan & span,
std::function< void(const Exception &)> exception_callback )

Starts a background thread that periodically calls update().

Parameters
[in]spanThe interval between update cycles.
[in]exception_callbackCallback invoked if an exception occurs during update.

◆ taskManager()

virtual DesignTaskManager * DesignObjectLookup::taskManager ( ) const
nodiscardvirtual

Returns the design task manager.

Returns
Pointer to the DesignTaskManager.

Reimplemented in QTModelManager.

◆ tryCommandLock()

WLock DesignObjectLookup::tryCommandLock ( )
nodiscard

Attempts to acquire a command write lock without blocking.

Returns
A scoped write lock; check validity to determine if the lock was acquired.

◆ tryReadLock() [1/2]

RLock DesignObjectLookup::tryReadLock ( const TimeSpan & span) const
nodiscard

Attempts to acquire a read lock within the specified time span.

Parameters
[in]spanMaximum duration to wait for the lock.
Returns
A scoped read lock; check validity to determine if the lock was acquired.

◆ tryReadLock() [2/2]

RLock DesignObjectLookup::tryReadLock ( uint08 milliseconds = 10) const
nodiscard

Attempts to acquire a read lock within the specified timeout.

Parameters
[in]millisecondsMaximum time in milliseconds to wait for the lock.
Returns
A scoped read lock; check validity to determine if the lock was acquired.

◆ tryWriteLock() [1/2]

WLock DesignObjectLookup::tryWriteLock ( const TimeSpan & span)
nodiscard

Attempts to acquire a write lock within the specified time span.

Parameters
[in]spanMaximum duration to wait for the lock.
Returns
A scoped write lock; check validity to determine if the lock was acquired.

◆ tryWriteLock() [2/2]

WLock DesignObjectLookup::tryWriteLock ( uint08 milliseconds = 10)
nodiscard

Attempts to acquire a write lock within the specified timeout.

Parameters
[in]millisecondsMaximum time in milliseconds to wait for the lock.
Returns
A scoped write lock; check validity to determine if the lock was acquired.

◆ update()

virtual void DesignObjectLookup::update ( const Time & time,
const std::function< void()> & wait_callback )
virtual

Performs a periodic update of all design objects and effects.

Parameters
[in]timeThe current timestamp for the update.
[in]wait_callbackFunction invoked while waiting for locks during update.

Reimplemented in QTModelManager.

◆ updateEffects()

void DesignObjectLookup::updateEffects ( const Time & time,
const std::function< void()> & wait_callback )
protected

Updates all active effects for the current time step.

Parameters
[in]timeThe current timestamp.
[in]wait_callbackFunction invoked while waiting for locks.

◆ updateModelTopLevel()

virtual void DesignObjectLookup::updateModelTopLevel ( const Model & object)
virtual

Updates the top-level status of a model in the hierarchy.

Parameters
[in]objectThe model whose top-level status should be updated.

Reimplemented in QTModelManager.

◆ visibleModels()

Buffer< UUID > DesignObjectLookup::visibleModels ( ) const
nodiscard

Returns the UUIDs of all currently visible models.

Returns
A buffer of visible model UUIDs.

◆ writeLock() [1/3]

WLock DesignObjectLookup::writeLock ( ) const
nodiscard

Acquires an exclusive write lock on the design object store.

Returns
A scoped write lock that releases on destruction.

Referenced by CheckoutCode::AddAndShow(), NewModelCommand::execute(), SetLayerCommand::execute(), SetProperties< t_property, t_type >::execute(), SetProperty< t_property, t_type >::execute(), and BuildActionProgramLogic::executeMenuItems().

◆ writeLock() [2/3]

WLock DesignObjectLookup::writeLock ( const std::function< void()> & wait_callback)
nodiscard

Acquires an exclusive write lock, calling a callback while waiting.

Parameters
[in]wait_callbackFunction invoked periodically while waiting for the lock.
Returns
A scoped write lock that releases on destruction.

◆ writeLock() [3/3]

WDesignLock DesignObjectLookup::writeLock ( UUID id)
nodiscard

Acquires a design-specific write lock for the object with the given UUID.

Parameters
[in]idThe UUID of the design object to lock.
Returns
A scoped design write lock.

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