VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtAggregateElementManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2022 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
13 
18 
19 #include <vlutil/vlSmartPointers.h>
20 
21 #include <boost/unordered_map.hpp>
22 
23 namespace makVrv
24 {
25 
26  class DtAggregateEchelonManager;
27  class DtColorValue;
28  class DtAggregateElement;
29  class DtBaseConnection;
30  class DtAggregateStateListener;
31 
43  {
44  public:
47 
49  virtual ~DtAggregateElementManager();
50 
52  DtAggregateElementManager() = delete;
53 
56 
58  DtAggregateElementManager& operator=(const DtAggregateElementManager&) = delete;
59 
60  public:
61 
63  virtual DtBaseConnection& connection();
64 
65 
67  typedef boost::unordered_map<DtElementID, DtAggregateElement*> AggregateElementMap;
68 
70  virtual const AggregateElementMap& aggregateElements() const;
72  virtual AggregateElementMap& aggregateElements();
74 
76  virtual DtAggregateStateListener* findListener(DtElementID elementId);
77 
79  virtual DtAggregateElement* findElement(DtElementID elementId);
80 
82  virtual void addElement(DtAggregateElement* element);
83 
85  virtual void destroyElement(DtElementID elementID);
86  boost::signalslib::signal<void(DtAggregateElement*)> signal_elementAboutToBeDestroyed;
87 
88 
91  virtual void createElement(DtAggregateStateListener&);
92  boost::signalslib::signal<void(DtAggregateElement*)> signal_elementCreated;
93 
94 
97  virtual double visualizerCreationProcessingTime() const;
98  protected:
99 
101  virtual void slot_hierarchyItemModified(DtElementIDHierarchyNode*);
102 
104  virtual void changeAggregateSelection(const DtSelectionManager::IdSet& selected, const DtSelectionManager::IdSet& deselected);
105 
107  void changeElementHasMouseCursorState(const DtElementID& entityId, bool hasMouseCursor);
109 
112  virtual void slot_visibilityStateChanged(DtElementID, DtElementIDHierarchyNode::DisplayState);
113 
115  virtual void slot_aggregateDestroyedStateChanged(DtElementID, bool);
116 
119  virtual void setVisualizerCreationProcessingTime(double);
120 
123  virtual void modelSetVisualized(int modelSet, bool enabled);
124 
126  virtual void handleElementAttributeChanged(
127  DtAggregateElement& entity, const DtElementAttribute* attr);
128 
130  virtual void elementAttributeChangeRequested( DtElementID id,
131  DtElementID parentID, DtBoost::shared_ptr<const DtElementAttribute> atr );
132 
135  virtual void slot_visualizerCreationEnabled( int modelSet, int visualType );
136 
139  virtual void slot_visualizerCreationDisabled( int modelSet, int visualType );
140 
141  virtual void removeFromHierarchy(DtElementID elementId);
142 
143  protected:
144 
148 
151 
152  };
153 
157  {
158 
159  public:
162  static DtAggregateElementManagerCreator& instance(DtBaseConnection& conn);
163 
165  static void registerInstance(DtBaseConnection& conn, DtAggregateElementManagerCreator* instance);
166 
168  virtual DtAggregateElementManager* create(DtBaseConnection& conn);
169  };
170 }
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
A single Aggregate element. An Aggregate element may be visualized using multiple visualizer sets one...
Definition: DtAggregateElement.h:32
boost::signalslib::signal< void(DtAggregateElement *)> signal_elementCreated
Definition: DtAggregateElementManager.h:92
boost::unordered_map< DtElementID, DtAggregateElement * > AggregateElementMap
Type definition for the element map.
Definition: DtAggregateElementManager.h:67
The abstract Aggregate Element Manager creator for the manager class.
Definition: DtAggregateElementManager.h:156
The DtAggregateStateListener extends DtEntityStateListener. It provides a interface to all the visual...
Definition: DtAggregateStateListener.h:33
Contains makVrv:DtSelectionManager class.
DtSignalConnectionManager myConnections
Definition: DtAggregateElementManager.h:146
boost::signalslib::signal< void(DtAggregateElement *)> signal_elementAboutToBeDestroyed
Definition: DtAggregateElementManager.h:86
The class that will be used to keep track of echelon hierarchy. (This was moved from vrvVrl 2022) ...
Definition: DtAggregateEchelonManager.h:32
The DtBaseConnection is an abstract class.
Definition: DtBaseConnection.h:38
DtAggregateEchelonManager & myHierarchyManager
Definition: DtAggregateElementManager.h:147
Contains makVrv::DtVirtualBaseClass class.
DisplayState
Used to keep track of state of item as it should appear visually in the hierarchy.
Definition: DtElementIDHierarchy.h:39
Contains makVrv::DtElementIDHierarchy class. This is an arbitrary hierarchy class that will allow hie...
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
double myVisualizerCreationProcessingTime
Definition: DtAggregateElementManager.h:150
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
The DtElementIDHierarchyNode class will contain information about an element, its children and its pa...
Definition: DtElementIDHierarchy.h:33
DtBaseConnection & myConnection
Definition: DtAggregateElementManager.h:145
Base class to provide boost signal/slot management.
AggregateElementMap myAggregateElements
Definition: DtAggregateElementManager.h:149
DtElementAttribute is a common base class used for all element attributes, such as those found in a D...
Definition: DtElementAttribute.h:20
std::set< DtUniqueID > IdSet
Definition: DtSelectionManager.h:32
The DtAggregateElementManager is used to create DtAggregateElements. It maintains a map of all those ...
Definition: DtAggregateElementManager.h:42
Contains DLL export macros.

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)