API Documentation
Loading...
Searching...
No Matches
DesignObjectLookup Class Reference

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. More...

#include <DesignObjectLookup.h>

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

Public Member Functions

DesignParameterAccumulator accumulateDesignParameter (const DesignParameter &channel, const BitFlag &accumulation_flags) const
 
Buffer< DesignParameterAccumulator, uint04, ObjectAllocator< false > > accumulateDesignParameters (const BitFlag &accumulation_flags) const
 
virtual UUID activeProject () const
 
virtual Project activeProjectModel () const
 
virtual void addCameraModel (const UUID &camera, const Model &object)
 
virtual void addEffect (Effect object)
 
virtual void addGeometry (Geometry object)
 
virtual void addLayer (Model layer)
 
virtual void addMaterial (Material object)
 
virtual void addModel (Model object)
 
virtual void addScene (Scene scene, bool ignore_application_scene=false)
 
virtual void addSelection (const DesignSelection &object)
 
void addUpdateTarget (DesignObjectUpdateTarget *target)
 
virtual void appendSelected (Buffer< UUID > ids)
 
Bounds< 3, fltp08bounds () const
 
Bounds< 3, fltp08boundsOfVisible () const
 
void cleanupMemory (Buffer< UUID > deleted_objects)
 
virtual void clearAll ()
 
virtual void clearSelected ()
 
void colorByChannel (UUID target, const DesignParameter &channel)
 
WLock commandLock ()
 
virtual DesignCommandManagercommandManager ()
 
Material createCameraMaterial (UUID camera)
 
Model createCameraModel (UUID camera)
 
Model createLayer ()
 
Material createMaterial ()
 
Geometry createMesh ()
 
Model createModel ()
 
const ScenedefaultScene ()
 
const Dictionary< UUID, DesignObject > & deletedObjects ()
 
virtual void deleteObject (UUID id)
 
 DesignObjectLookup ()
 
Buffer< DesignParameter, uint04, ObjectAllocator< false > > designParameters () const
 
Effect effect (const UUID &id, bool allow_deleted=false) const
 
const Dictionary< UUID, Effect > & effectObjects ()
 
void ensureLayerExistsInScene (const UUID &layer_id, const UUID &scene_id)
 
virtual void eraseModel (UUID id)
 
virtual void executePendingCommands ()
 
Model findLayer (const String &layer, bool use_translation=true) const
 
Model findLayer (const TranslatedString &layer) const
 
virtual void finishCommand (const DynamicPointer< DesignCommand > &command)
 
Geometry geometry (const UUID &id, bool allow_deleted=false) const
 
const Dictionary< UUID, Geometry > & geometryObjects ()
 
const Dictionary< UUID, Model > & getAllSceneLayers (const UUID &id) const
 
virtual Buffer< UUIDgetDescendentsOf (const Buffer< UUID > &model_ids)
 
virtual Buffer< UUIDgetInverseOf (const Buffer< UUID > &model_ids)
 
Buffer< ModelgetLayersByType (const Buffer< String > &types) const
 
Buffer< ModelgetLayersByType (const String &type) const
 
Buffer< UUIDgetModelIDsByType (const String &type) const
 
Buffer< ModelgetModelsByID (const Buffer< UUID > &ids) const
 
Buffer< ModelgetModelsByName (const String &name) const
 
Buffer< ModelgetModelsByType (const Buffer< String > &types) const
 
Buffer< ModelgetModelsByType (const String &type) const
 
Buffer< UUIDgetRootObjectIDs (bool include_app_owned=false) const
 
Buffer< UUIDgetRootObjectIDs (UUID camera_id, bool include_app_owned=false) const
 
Buffer< ModelgetRootObjects (bool include_app_owned=false) const
 
Buffer< ModelgetRootObjects (UUID camera_id, bool include_app_owned=false) const
 
const DynamicPointer< DesignSelection > & getSelectionInfo (const UUID &id)
 
const ConstPointer< DesignSelection > & getSelectionInfo (const UUID &id) const
 
bool hasEffect (const UUID &id) const
 
bool hasGeometryID (const UUID &id) const
 
bool hasLayerID (const UUID &id, bool allow_deleted=false) const
 
bool hasLayerID (const UUID &id, const UUID &scene_id) const
 
bool hasMaterialID (const UUID &id) const
 
bool hasModelID (const UUID &id, bool allow_deleted=false) const
 
bool hasObjectID (const UUID &id, bool allow_deleted=false) const
 
bool hasSceneID (const UUID &id, bool allow_deleted=false) const
 
bool hasSelectionInfo (const UUID &id) const
 
void invalidateStationVisuals (bool invalidate_visuals, bool invalidate_font)
 
bool isCommandLocked () const
 
Model layer (const UUID &id, bool allow_deleted=false) const
 
Model layer (const UUID &layer_id, const UUID &scene_id, bool allow_deleted=false) const
 
const Dictionary< UUID, Dictionary< UUID, Model > > & layerObjects ()
 
const void * lockPtr () const
 
virtual LogManagerlogManager () const
 
Material material (const UUID &id, bool allow_deleted=false) const
 
const Dictionary< UUID, Material > & materialObjects ()
 
Model model (const UUID &id, bool allow_deleted=false) const
 
const Dictionary< UUID, Model > & modelObjects ()
 
Model modelOrLayer (const UUID &id, bool allow_deleted=false) const
 
DesignObject object (const UUID &id) const
 
const Dictionary< UUID, DesignObject > & objects ()
 
virtual void postCommand (const DynamicPointer< DesignCommand > &command)
 
void processSelection (SelectionInfo &info) const
 
RLock readLock () const
 
RLock readLock (const std::function< void()> &wait_callback) const
 
RDesignLock readLock (UUID id)
 
virtual void refreshModel (const Model &object)
 
virtual void refreshScene (UUID scene_id, bool ignore_application_scene)
 
void removeDeletedObject (UUID id)
 
void removeUpdateTarget (DesignObjectUpdateTarget *target)
 
virtual void requestAutoSave ()
 
virtual void requestAutoSaveCheckpoint ()
 
virtual Model restoreModel (UUID id)
 
virtual void runCommand (const DynamicPointer< DesignCommand > &command)
 
Scene scene (const UUID &id, bool allow_deleted=false) const
 
const Dictionary< UUID, Scene > & sceneObjects ()
 
void selectEnclosed (UUID selection_id)
 
virtual void setActiveLayer (UUID layer_id)
 
virtual void setActiveProject (UUID layer_id)
 
virtual void setSelected (Buffer< UUID > ids)
 
void setSelectionEffect (SelectionEffect *effect)
 
void setupDefaultScene ()
 
void startUpdateThread (const TimeSpan &span, std::function< void(const Exception &)> exception_callback)
 
void stopUpdateThread ()
 
virtual DesignTaskManagertaskManager () const
 
WLock tryCommandLock ()
 
RLock tryReadLock (const TimeSpan &span) const
 
RLock tryReadLock (uint08 milliseconds=10) const
 
WLock tryWriteLock (const TimeSpan &span)
 
WLock tryWriteLock (uint08 milliseconds=10)
 
virtual void update (const Time &time, const std::function< void()> &wait_callback)
 
virtual void updateModelTopLevel (const Model &object)
 
void updateTranslation ()
 
Buffer< UUIDvisibleModels () const
 
WLock writeLock ()
 
WLock writeLock (const std::function< void()> &wait_callback)
 
WDesignLock writeLock (UUID id)
 
virtual ~DesignObjectLookup ()
 

Public Attributes

Resource< Timeautosave_checkpoint_request_time
 
Resource< Timeautosave_request_time
 
Resource< UUIDcurrent_layer
 
Resource< RGBColorfocus_color
 
Resource< Timemodified_time
 

Protected Member Functions

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

Protected Attributes

UUID m_active_layer
 
UUID m_active_project
 
Dictionary< UUID, Scenem_all_scene_objects
 
Dictionary< UUID, Modelm_application_root_objects
 
Dictionary< UUID, Modelm_camera_root
 
DesignCommandManagerm_command_controller
 
Scene m_default_scene
 
Dictionary< UUID, DesignObjectm_deleted_objects
 
Dictionary< UUID, DesignObjectm_design_objects
 
ModelEditController * m_edit_controller
 
Dictionary< UUID, Effectm_effect_objects
 
Dictionary< UUID, UUIDm_erased_objects
 
std::function< void(const Exception &)> m_exception_callback = nullptr
 
Dictionary< UUID, Geometrym_geometry_objects
 
ResourceListenerm_invalidate_station_visuals_listener
 
ResourceListenerm_language_change_listener
 
Time m_last_update_time
 
Dictionary< UUID, Dictionary< UUID, Model > > m_layer_objects
 
LogManagerm_log_manager
 
Dictionary< UUID, Materialm_material_objects
 
Dictionary< UUID, Modelm_model_objects
 
Dictionary< UUID, Modelm_model_root_objects
 
TimeSpan m_prefered_update_timespan
 
Dictionary< UUID, Scenem_scene_objects
 
SelectionController * m_selection_controller
 
SelectionEffectm_selection_effect
 
Dictionary< UUID, DynamicPointer< DesignSelection > > m_selection_info
 
DesignTaskManagerm_task_controller
 
bool m_update_language
 
bool m_update_station_font
 
bool m_update_station_visuals
 
Buffer< DesignObjectUpdateTarget * > m_update_targets
 
Threadm_update_thread = nullptr
 
UUID m_uuid
 

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.


Constructor & Destructor Documentation

◆ DesignObjectLookup()

◆ ~DesignObjectLookup()

virtual ~DesignObjectLookup ( )
virtual

Member Function Documentation

◆ accumulateDesignParameter()

DesignParameterAccumulator accumulateDesignParameter ( const DesignParameter & channel,
const BitFlag & accumulation_flags ) const

◆ accumulateDesignParameters()

Buffer< DesignParameterAccumulator, uint04, ObjectAllocator< false > > accumulateDesignParameters ( const BitFlag & accumulation_flags) const

◆ activeProject()

virtual UUID activeProject ( ) const
inlinevirtual

◆ activeProjectModel()

virtual Project activeProjectModel ( ) const
virtual

◆ addCameraModel()

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

Reimplemented in QTModelManager.

◆ addEffect()

virtual void addEffect ( Effect object)
virtual

◆ addGeometry()

virtual void addGeometry ( Geometry object)
virtual

Reimplemented in QTModelManager.

◆ addLayer()

virtual void addLayer ( Model layer)
virtual

Reimplemented in QTModelManager.

◆ addMaterial()

virtual void addMaterial ( Material object)
virtual

Reimplemented in QTModelManager.

◆ addModel()

virtual void addModel ( Model object)
virtual

Reimplemented in QTModelManager.

◆ addScene()

virtual void addScene ( Scene scene,
bool ignore_application_scene = false )
virtual

Reimplemented in QTModelManager.

◆ addSelection()

virtual void addSelection ( const DesignSelection & object)
virtual

◆ addUpdateTarget()

void addUpdateTarget ( DesignObjectUpdateTarget * target)

◆ appendSelected()

virtual void appendSelected ( Buffer< UUID > ids)
virtual

Reimplemented in QTModelManager.

◆ bounds()

Bounds< 3, fltp08 > bounds ( ) const

◆ boundsOfVisible()

Bounds< 3, fltp08 > boundsOfVisible ( ) const

◆ cleanupMemory()

void cleanupMemory ( Buffer< UUID > deleted_objects)

◆ clearAll()

virtual void clearAll ( )
virtual

Reimplemented in QTModelManager.

◆ clearSelected()

virtual void clearSelected ( )
virtual

Reimplemented in QTModelManager.

◆ colorByChannel()

void colorByChannel ( UUID target,
const DesignParameter & channel )

◆ commandLock()

WLock commandLock ( )

◆ commandManager()

virtual DesignCommandManager * commandManager ( )
virtual

◆ createCameraMaterial()

Material createCameraMaterial ( UUID camera)

◆ createCameraModel()

Model createCameraModel ( UUID camera)

◆ createLayer()

Model createLayer ( )

◆ createMaterial()

Material createMaterial ( )

◆ createMesh()

Geometry createMesh ( )

◆ createModel()

Model createModel ( )

◆ defaultScene()

const Scene & defaultScene ( )
inline

◆ deletedObjects()

const Dictionary< UUID, DesignObject > & deletedObjects ( )
inline

◆ deleteObject()

virtual void deleteObject ( UUID id)
virtual

Reimplemented in QTModelManager.

◆ designParameters()

Buffer< DesignParameter, uint04, ObjectAllocator< false > > designParameters ( ) const

◆ effect()

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

◆ effectObjects()

const Dictionary< UUID, Effect > & effectObjects ( )
inline

◆ ensureLayerExistsInScene()

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

◆ eraseModel()

virtual void eraseModel ( UUID id)
virtual

Reimplemented in QTModelManager.

◆ executePendingCommands()

virtual void executePendingCommands ( )
virtual

◆ findLayer() [1/2]

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

◆ findLayer() [2/2]

Model findLayer ( const TranslatedString & layer) const

◆ finishCommand()

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

◆ geometry()

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

◆ geometryObjects()

const Dictionary< UUID, Geometry > & geometryObjects ( )
inline

◆ getAllSceneLayers()

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

◆ getDescendentsOf()

virtual Buffer< UUID > getDescendentsOf ( const Buffer< UUID > & model_ids)
virtual

◆ getInverseOf()

virtual Buffer< UUID > getInverseOf ( const Buffer< UUID > & model_ids)
virtual

◆ getLayersByType() [1/2]

Buffer< Model > getLayersByType ( const Buffer< String > & types) const

◆ getLayersByType() [2/2]

Buffer< Model > getLayersByType ( const String & type) const

◆ getModelIDsByType()

Buffer< UUID > getModelIDsByType ( const String & type) const

◆ getModelsByID()

Buffer< Model > getModelsByID ( const Buffer< UUID > & ids) const

◆ getModelsByName()

Buffer< Model > getModelsByName ( const String & name) const

◆ getModelsByType() [1/2]

Buffer< Model > getModelsByType ( const Buffer< String > & types) const

◆ getModelsByType() [2/2]

Buffer< Model > getModelsByType ( const String & type) const

◆ getRootObjectIDs() [1/2]

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

◆ getRootObjectIDs() [2/2]

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

◆ getRootObjects() [1/2]

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

◆ getRootObjects() [2/2]

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

◆ getSelectionInfo() [1/2]

const DynamicPointer< DesignSelection > & getSelectionInfo ( const UUID & id)

◆ getSelectionInfo() [2/2]

const ConstPointer< DesignSelection > & getSelectionInfo ( const UUID & id) const

◆ hasEffect()

bool hasEffect ( const UUID & id) const

◆ hasGeometryID()

bool hasGeometryID ( const UUID & id) const

◆ hasLayerID() [1/2]

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

◆ hasLayerID() [2/2]

bool hasLayerID ( const UUID & id,
const UUID & scene_id ) const

◆ hasMaterialID()

bool hasMaterialID ( const UUID & id) const

◆ hasModelID()

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

◆ hasObjectID()

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

◆ hasSceneID()

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

◆ hasSelectionInfo()

bool hasSelectionInfo ( const UUID & id) const

◆ invalidateStationVisuals()

void invalidateStationVisuals ( bool invalidate_visuals,
bool invalidate_font )

◆ isCommandLocked()

bool isCommandLocked ( ) const

◆ layer() [1/2]

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

◆ layer() [2/2]

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

◆ layerObjects()

const Dictionary< UUID, Dictionary< UUID, Model > > & layerObjects ( )
inline

◆ lockPtr()

const void * lockPtr ( ) const

◆ logManager()

virtual LogManager * logManager ( ) const
virtual

Reimplemented in QTModelManager.

◆ material()

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

◆ materialObjects()

const Dictionary< UUID, Material > & materialObjects ( )
inline

◆ model()

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

◆ modelObjects()

const Dictionary< UUID, Model > & modelObjects ( )
inline

◆ modelOrLayer()

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

◆ object()

DesignObject object ( const UUID & id) const

◆ objects()

const Dictionary< UUID, DesignObject > & objects ( )
inline

◆ postCommand()

virtual void postCommand ( const DynamicPointer< DesignCommand > & command)
virtual

Reimplemented in QTModelManager.

◆ processSelection()

void processSelection ( SelectionInfo & info) const

◆ readLock() [1/3]

RLock readLock ( ) const

◆ readLock() [2/3]

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

◆ readLock() [3/3]

RDesignLock readLock ( UUID id)

◆ refreshModel()

virtual void refreshModel ( const Model & object)
virtual

◆ refreshScene()

virtual void refreshScene ( UUID scene_id,
bool ignore_application_scene )
virtual

◆ removeDeletedObject()

void removeDeletedObject ( UUID id)
inline

◆ removeUpdateTarget()

void removeUpdateTarget ( DesignObjectUpdateTarget * target)

◆ requestAutoSave()

virtual void requestAutoSave ( )
virtual

◆ requestAutoSaveCheckpoint()

virtual void requestAutoSaveCheckpoint ( )
virtual

◆ restoreModel()

virtual Model restoreModel ( UUID id)
virtual

Reimplemented in QTModelManager.

◆ runCommand()

virtual void runCommand ( const DynamicPointer< DesignCommand > & command)
virtual

Reimplemented in QTModelManager.

◆ scene()

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

◆ sceneObjects()

const Dictionary< UUID, Scene > & sceneObjects ( )
inline

◆ selectEnclosed()

void selectEnclosed ( UUID selection_id)

◆ setActiveLayer()

virtual void setActiveLayer ( UUID layer_id)
virtual

Reimplemented in QTModelManager.

◆ setActiveProject()

virtual void setActiveProject ( UUID layer_id)
virtual

Reimplemented in QTModelManager.

◆ setSelected()

virtual void setSelected ( Buffer< UUID > ids)
virtual

Reimplemented in QTModelManager.

◆ setSelectionEffect()

void setSelectionEffect ( SelectionEffect * effect)

◆ setupDefaultScene()

void setupDefaultScene ( )

◆ startUpdateThread()

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

◆ stopUpdateThread()

void stopUpdateThread ( )

◆ taskManager()

virtual DesignTaskManager * taskManager ( ) const
virtual

Reimplemented in QTModelManager.

◆ tryCommandLock()

WLock tryCommandLock ( )

◆ tryReadLock() [1/2]

RLock tryReadLock ( const TimeSpan & span) const

◆ tryReadLock() [2/2]

RLock tryReadLock ( uint08 milliseconds = 10) const

◆ tryWriteLock() [1/2]

WLock tryWriteLock ( const TimeSpan & span)

◆ tryWriteLock() [2/2]

WLock tryWriteLock ( uint08 milliseconds = 10)

◆ update()

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

Reimplemented in QTModelManager.

◆ updateEffects()

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

◆ updateModelTopLevel()

virtual void updateModelTopLevel ( const Model & object)
virtual

Reimplemented in QTModelManager.

◆ updateTranslation()

void updateTranslation ( )

◆ visibleModels()

Buffer< UUID > visibleModels ( ) const

◆ writeLock() [1/3]

WLock writeLock ( )

◆ writeLock() [2/3]

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

◆ writeLock() [3/3]

WDesignLock writeLock ( UUID id)

Member Data Documentation

◆ autosave_checkpoint_request_time

Resource<Time> autosave_checkpoint_request_time

◆ autosave_request_time

Resource<Time> autosave_request_time

◆ current_layer

Resource<UUID> current_layer

◆ focus_color

Resource<RGBColor> focus_color

◆ m_active_layer

UUID m_active_layer
protected

◆ m_active_project

UUID m_active_project
protected

◆ m_all_scene_objects

Dictionary<UUID, Scene> m_all_scene_objects
protected

◆ m_application_root_objects

Dictionary<UUID, Model> m_application_root_objects
protected

◆ m_camera_root

Dictionary<UUID, Model> m_camera_root
protected

◆ m_command_controller

DesignCommandManager* m_command_controller
protected

◆ m_default_scene

Scene m_default_scene
protected

◆ m_deleted_objects

Dictionary<UUID, DesignObject> m_deleted_objects
protected

◆ m_design_objects

Dictionary<UUID, DesignObject> m_design_objects
protected

◆ m_edit_controller

ModelEditController* m_edit_controller
protected

◆ m_effect_objects

Dictionary<UUID, Effect> m_effect_objects
protected

◆ m_erased_objects

Dictionary<UUID, UUID> m_erased_objects
protected

◆ m_exception_callback

std::function<void(const Exception&)> m_exception_callback = nullptr
protected

◆ m_geometry_objects

Dictionary<UUID, Geometry> m_geometry_objects
protected

◆ m_invalidate_station_visuals_listener

ResourceListener* m_invalidate_station_visuals_listener
protected

◆ m_language_change_listener

ResourceListener* m_language_change_listener
protected

◆ m_last_update_time

Time m_last_update_time
protected

◆ m_layer_objects

Dictionary<UUID, Dictionary<UUID, Model> > m_layer_objects
protected

◆ m_log_manager

LogManager* m_log_manager
mutableprotected

◆ m_material_objects

Dictionary<UUID, Material> m_material_objects
protected

◆ m_model_objects

Dictionary<UUID, Model> m_model_objects
protected

◆ m_model_root_objects

Dictionary<UUID, Model> m_model_root_objects
protected

◆ m_prefered_update_timespan

TimeSpan m_prefered_update_timespan
protected

◆ m_scene_objects

Dictionary<UUID, Scene> m_scene_objects
protected

◆ m_selection_controller

SelectionController* m_selection_controller
protected

◆ m_selection_effect

SelectionEffect* m_selection_effect
protected

◆ m_selection_info

Dictionary<UUID, DynamicPointer<DesignSelection> > m_selection_info
protected

◆ m_task_controller

DesignTaskManager* m_task_controller
mutableprotected

◆ m_update_language

bool m_update_language
protected

◆ m_update_station_font

bool m_update_station_font
protected

◆ m_update_station_visuals

bool m_update_station_visuals
protected

◆ m_update_targets

Buffer<DesignObjectUpdateTarget*> m_update_targets
protected

◆ m_update_thread

Thread* m_update_thread = nullptr
protected

◆ m_uuid

UUID m_uuid
protected

◆ modified_time

Resource<Time> modified_time

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