VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtAggregateElementProcessor.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvVrl/vrvVrl.h>
13 
15 
18 
20 
22 
23 #include <boost/unordered_map.hpp>
24 #include <vl/globalObjectDesignator.h>
25 
26 #include <vlutil/vlSmartPointers.h>
27 
28 namespace makVrv
29 {
30  class DtAggregateVisualizerSet;
31  class DtElementAttribute;
32 
33  namespace DT_PROTOCOL_NAMESPACE
34  {
35  class DtAggregateElement;
36  class DtEntityElement;
37  class DtVrlinkAggregateStateListener;
38  class DtVrlinkAggregateListener;
39  class DtVrlinkConnection;
41 
48  {
49  public:
50 
53 
56  static void registerInstance(DtVrlinkConnection& conn,
57  DtAggregateElementProcessor* instance);
58 
60  static DtAggregateElementProcessor* findInstance(DtVrlinkConnection& conn);
61 
63  virtual ~DtAggregateElementProcessor();
64 
66  DtAggregateVisualizerSet* findVisualizer(int modelSet,
67  const DtGlobalObjectDesignator& id);
68 
71  std::vector<DtAggregateVisualizerSet*> findVisualizers(
72  const DtGlobalObjectDesignator& id);
73 
75  DtAggregateVisualizerSet* findVisualizer( DtUniqueID sceneId );
76 
78  DtVrlinkAggregateStateListener* findListener( DtUniqueID elementId );
79 
81  DtAggregateElement* findElement( const DtUniqueID& elementId );
82 
84  DtAggregateElement* findElement( const DtGlobalObjectDesignator& id );
85 
87  void toggleLabelPinnedState(const DtSelectionManager::IdSet& ids);
88 
90  void changeAggregateSelection(const DtSelectionManager::IdSet& selected,
91  const DtSelectionManager::IdSet& deselected);
92 
94  virtual void setAggregateSettings(const makArchives::DtAggregateSettingsRecord&);
95 
98  void setVisualizerCreationProcessingTime(double);
99  double visualizerCreationProcessingTime() const;
100 
103  visualTypeVisualizerCreationMap() const;
104 
105  public:
106  boost::signal<void (DtVrlinkAggregateStateListener&, DtAggregateElement*)> signal_elementCreated;
107  boost::signal<void (DtVrlinkAggregateStateListener&, DtAggregateElement*)> signal_elementAboutToBeDestroyed;
108 
109  protected:
110 
113  virtual void modelSetVisualized(int modelSet, bool enabled);
114 
116  virtual void elementAttributeChangeRequested( DtUniqueID id,
117  DtUniqueID parentID, DtBoost::shared_ptr<const DtElementAttribute> atr );
118 
120  virtual void handleElementAttributeChanged(
121  DtAggregateElement& entity, const DtElementAttribute* attr);
122 
124  virtual void onAggregateDiscovered(DtVrlinkAggregateStateListener& listener);
125 
127  virtual void onAggregateToBeDestroyed(DtVrlinkAggregateStateListener& listener);
128 
130  virtual void slot_echelonVisibilityChange(DtElementID, DtElementIDHierarchyNode::DisplayState);
131  virtual void slot_echelonVisibilityChanged(DtElementIDHierarchy::VisibilityProcessingList);
132 
135  virtual void slot_visualizerCreationEnabled( int modelSet, int visualType );
136 
139  virtual void slot_visualizerCreationDisabled( int modelSet, int visualType );
140 
142  virtual void slot_aggregateDestroyedStateChanged(DtElementID, bool);
143 
145  virtual void processVisualizer(int modelSet, DtElementIDHierarchyNode::DisplayState displayState,
146  DtElementID id, DtVisualizerSet* s, bool respectLeafFlag);
147 
149  virtual bool isGhostable(DtVisualizerSet* set) const;
150 
152  virtual double setTransparency(DtVisualizerSet* set, double t) const;
153 
155  virtual double currentTransparency(DtVisualizerSet* set) const;
156 
158  virtual void applyGhosting(int modelSet, DtElementID elementID, DtVisualizerSet*);
159 
160  virtual void removeGhosting(int modelSet, DtElementID elementID);
161 
163  virtual void setDisplayAggregates(bool b);
164 
166  virtual void setShowLeafNodes(bool b);
167 
169  virtual void setGhostEchelonLevelItems(bool b);
170 
172  virtual void setEchelonLevel(int i);
173 
175  virtual void setAllowSelectionOfGhostedItems(bool);
176 
178  virtual void slot_hierarchyItemModified(DtElementIDHierarchyNode*);
179 
182  virtual void slot_hierarchyItemToBeRemoved(DtElementIDHierarchyNode*);
183 
187  virtual void slot_subordinatesChanged(DtAggregateElement*);
188 
192  virtual void mapGlobalIdsToElementIds(DtElementID parent,
193  const std::set<std::string>& globalIds, DtElementIDHierarchy::ElementIDs& children);
194 
197  virtual void watchForGlobalIdDiscovery(DtElementID parent, const std::string& globalId);
198 
200  virtual void slot_entityElementCreated(DtVrlinkEntityStateListener&, DtEntityElement*);
201 
203  virtual void aggregateElementCreated(DtVrlinkAggregateStateListener&, DtAggregateElement*);
204 
206  virtual void removeFromWatchList(DtElementID id);
207 
209  virtual void connectToElementProcessor();
210  virtual void disconnectFromElementProcessor();
211 
213  virtual void slot_completeDiscovery();
214 
215  virtual void createVisualizer(DtVrlinkAggregateStateListener&);
216 
217  protected:
218 
219  typedef boost::unordered_map<DtUniqueID, DtAggregateElement*>
221  typedef boost::unordered_map<std::string, DtAggregateElement*>
223  typedef boost::unordered_map<DtUniqueID, DtVrlinkAggregateStateListener*>
225 
231 
235 
236  protected:
237  typedef boost::unordered_map<int, DtVisualizerSet*> GhostPair;
238  typedef boost::unordered_map<DtElementID, GhostPair> GhostMap;
239 
241 
242  typedef boost::unordered_map<std::string, DtElementID> WatchList;
245  };
246  }
247 }
ToBeVisualizedMap myToBeVisualized
Definition: DtAggregateElementProcessor.h:233
DtVisualizerCreationSettings * myVisualTypeVisualizerSettings
Definition: DtAggregateElementProcessor.h:244
AggregateElementVisualizerMap myAggregateElementVisualizers
Definition: DtAggregateElementProcessor.h:228
WatchList myWatchList
Definition: DtAggregateElementProcessor.h:243
Virtual base class.
Definition: DtVirtualBaseClass.h:22
boost::signal< void(DtVrlinkAggregateStateListener &, DtAggregateElement *)> signal_elementCreated
Definition: DtAggregateElementProcessor.h:106
boost::unordered_map< DtUniqueID, DtAggregateElement * > AggregateElementVisualizerMap
Definition: DtAggregateElementProcessor.h:220
GlobalIdToAggregateElementVisualizerMap myGlobalIdToElementVisualizerMap
Definition: DtAggregateElementProcessor.h:229
std::vector< DtElementID > ElementIDs
Definition: DtElementIDHierarchy.h:114
DtVrlinkConnection & myConnection
Definition: DtAggregateElementProcessor.h:226
boost::unordered_map< int, DtVisualizerSet * > GhostPair
Definition: DtAggregateElementProcessor.h:237
boost::unordered_map< DtUniqueID, DtVrlinkAggregateStateListener * > ToBeVisualizedMap
Definition: DtAggregateElementProcessor.h:224
Contains makVrv:DtSelectionManager class.
std::set< const DtElementIDHierarchyNode * > VisibilityProcessingList
Definition: DtElementIDHierarchy.h:115
DtSignalConnectionManager myConnections
Definition: DtAggregateElementProcessor.h:227
boost::unordered_map< std::string, DtElementID > WatchList
Definition: DtAggregateElementProcessor.h:242
boost::unordered_map< int, ModelSetVisualizerCreationMap > VisualTypeVisualizerCreationMap
Map that indicates whether a visualizer should be created, by visual type, for all given model sets...
Definition: DtVisualizerCreationSettings.h:36
double myVisualizerCreationProcessingTime
Definition: DtAggregateElementProcessor.h:234
DtUniqueID DtElementID
The ElementID is a specific type of unique ID used to represent VR-Vantage uniquely defined elements...
Definition: DtUniqueID.h:26
The class that will be used to keep track of echelon hierarchy.
Definition: DtAggregateEchelonManager.h:31
DtAggregateEchelonManager & myEchelonHierarchy
Definition: DtAggregateElementProcessor.h:232
#define DL_DLL_IGCONVRLINK
Definition: dllExport.h:26
DisplayState
Used to keep track of state of item as it should appear visually in the hierarchy.
Definition: DtElementIDHierarchy.h:39
A single Aggregate element.
Definition: DtAggregateElement.h:30
A single entity element.
Definition: DtEntityElement.h:30
makArchives::DtAggregateSettingsRecord myAggregateSettings
Definition: DtAggregateElementProcessor.h:230
GhostMap myGhostMap
Definition: DtAggregateElementProcessor.h:240
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:24
The DtElementIDHierarchyNode class will contain information about an element, its children and its pa...
Definition: DtElementIDHierarchy.h:33
The DtAggregateElementProcessor will connect to the DtAggregateExistenceListener and handle the creat...
Definition: DtAggregateElementProcessor.h:47
boost::unordered_map< DtElementID, GhostPair > GhostMap
Definition: DtAggregateElementProcessor.h:238
unsigned long long DtUniqueID
Definition: DtUniqueID.h:22
This contains all the DtVisualizers used to visualize an element in a particular model set...
Definition: DtVisualizerSet.h:30
#define DT_PROTOCOL_NAMESPACE
Make VR-Vantage VRLink code export with library #ifdef DL_DLL_IGCONVRLINK #undef DL_DLL_IGCONVRLINK #...
Definition: export.h:32
Base class to provide boost signal/slot management.
boost::unordered_map< std::string, DtAggregateElement * > GlobalIdToAggregateElementVisualizerMap
Definition: DtAggregateElementProcessor.h:222
This class is a set of aggregate visualizers, all of the visualizers in this set must support the agg...
Definition: DtAggregateVisualizerSet.h:24
Record class for aggregate settings.
Definition: DtAggregateSettingsRecord.h:19
DtElementAttribute is a common base class used for all element attributes, such as those found in a D...
Definition: DtElementAttribute.h:23
Contains DLL export macros.
std::set< DtUniqueID > IdSet
Definition: DtSelectionManager.h:32
boost::signal< void(DtVrlinkAggregateStateListener &, DtAggregateElement *)> signal_elementAboutToBeDestroyed
Definition: DtAggregateElementProcessor.h:107
Container class which indicates which visualizers need to be created for each modelSet, based on whether that visualizer visualizes something that is currently enabled and if the visualizer is create-on-demand vs.
Definition: DtVisualizerCreationSettings.h:26
Contains the DtAggregateSettingsRecord class declaration.

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)