VR-Forces 4.10 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) 2021 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 DtVrlinkAggregateElement;
36  class DtVrlinkEntityElement;
37  class DtVrlinkAggregateStateListener;
38  class DtVrlinkAggregateListener;
39  class DtVrlinkConnection;
41 
48  {
49  public:
50 
53 
55  virtual ~DtAggregateElementProcessor();
56 
58  DtAggregateElementProcessor() = delete;
59 
62 
64  DtAggregateElementProcessor& operator=(const DtAggregateElementProcessor&) = delete;
65 
66  public:
67 
70  static void registerInstance(DtVrlinkConnection& conn,
71  DtAggregateElementProcessor* instance);
72 
74  static DtAggregateElementProcessor* findInstance(DtVrlinkConnection& conn);
75 
76  public:
77 
79  DtAggregateVisualizerSet* findVisualizer(int modelSet,
80  const DtGlobalObjectDesignator& id);
81 
84  std::vector<DtAggregateVisualizerSet*> findVisualizers(
85  const DtGlobalObjectDesignator& id);
86 
88  DtAggregateVisualizerSet* findVisualizer( DtUniqueID sceneId );
89 
91  DtVrlinkAggregateStateListener* findListener( DtUniqueID elementId );
92 
94  DtVrlinkAggregateElement* findElement( const DtUniqueID& elementId );
95 
97  DtVrlinkAggregateElement* findElement( const DtGlobalObjectDesignator& id );
98 
100  void toggleLabelPinnedState(const DtSelectionManager::IdSet& ids);
101 
103  void changeAggregateSelection(const DtSelectionManager::IdSet& selected,
104  const DtSelectionManager::IdSet& deselected);
105 
107  virtual void setAggregateSettings(const makArchives::DtAggregateSettingsRecord&);
108 
111  void setVisualizerCreationProcessingTime(double);
112  double visualizerCreationProcessingTime() const;
113 
116  visualTypeVisualizerCreationMap() const;
117 
118  public:
119  boost::signalslib::signal<void (DtVrlinkAggregateStateListener&, DtVrlinkAggregateElement*)> signal_elementCreated;
120  boost::signalslib::signal<void (DtVrlinkAggregateStateListener&, DtVrlinkAggregateElement*)> signal_elementAboutToBeDestroyed;
121 
122  protected:
123 
126  virtual void modelSetVisualized(int modelSet, bool enabled);
127 
129  virtual void elementAttributeChangeRequested( DtUniqueID id,
130  DtUniqueID parentID, DtBoost::shared_ptr<const DtElementAttribute> atr );
131 
133  virtual void handleElementAttributeChanged(
134  DtVrlinkAggregateElement& entity, const DtElementAttribute* attr);
135 
137  virtual void onAggregateDiscovered(DtVrlinkAggregateStateListener& listener);
138 
140  virtual void onAggregateToBeDestroyed(DtVrlinkAggregateStateListener& listener);
141 
143  virtual void slot_echelonVisibilityChange(DtElementID, DtElementIDHierarchyNode::DisplayState);
144  virtual void slot_echelonVisibilityChanged(DtElementIDHierarchy::VisibilityProcessingList);
145 
148  virtual void slot_visualizerCreationEnabled( int modelSet, int visualType );
149 
152  virtual void slot_visualizerCreationDisabled( int modelSet, int visualType );
153 
155  virtual void slot_aggregateDestroyedStateChanged(DtElementID, bool);
156 
158  virtual void processVisualizer(int modelSet, DtElementIDHierarchyNode::DisplayState displayState,
159  DtElementID id, DtVisualizerSet* s, bool respectLeafFlag);
160 
162  virtual bool isGhostable(DtVisualizerSet* set) const;
163 
165  virtual double setTransparency(DtVisualizerSet* set, double t) const;
166 
168  virtual double currentTransparency(DtVisualizerSet* set) const;
169 
171  virtual void applyGhosting(int modelSet, DtElementID elementID, DtVisualizerSet*);
172 
173  virtual void removeGhosting(int modelSet, DtElementID elementID);
174 
176  virtual void setDisplayAggregates(bool b);
177 
179  virtual void setShowLeafNodes(bool b);
180 
182  virtual void setGhostEchelonLevelItems(bool b);
183 
185  virtual void setEchelonLevel(int i);
186 
188  virtual void setAllowSelectionOfGhostedItems(bool);
189 
191  virtual void slot_hierarchyItemModified(DtElementIDHierarchyNode*);
192 
195  virtual void slot_hierarchyItemToBeRemoved(DtElementIDHierarchyNode*);
196 
200  virtual void slot_subordinatesChanged(DtVrlinkAggregateElement*);
201 
205  virtual void mapGlobalIdsToElementIds(DtElementID parent,
206  const std::set<std::string>& globalIds, DtElementIDHierarchy::ElementIDs& children);
207 
210  virtual void watchForGlobalIdDiscovery(DtElementID parent, const std::string& globalId);
211 
213  virtual void slot_entityElementCreated(DtVrlinkEntityStateListener&, DtVrlinkEntityElement*);
214 
216  virtual void aggregateElementCreated(DtVrlinkAggregateStateListener&, DtVrlinkAggregateElement*);
217 
219  virtual void removeFromWatchList(DtElementID id);
220 
222  virtual void connectToElementProcessor();
223  virtual void disconnectFromElementProcessor();
224 
226  virtual void slot_completeDiscovery();
227 
228  virtual void createVisualizer(DtVrlinkAggregateStateListener&);
229 
230  protected:
231 
232  typedef boost::unordered_map<DtUniqueID, DtVrlinkAggregateElement*>
234  typedef boost::unordered_map<std::string, DtVrlinkAggregateElement*>
236  typedef boost::unordered_map<DtUniqueID, DtVrlinkAggregateStateListener*>
238 
244 
248 
249  typedef boost::unordered_map<int, DtVisualizerSet*> GhostPair;
250  typedef boost::unordered_map<DtElementID, GhostPair> GhostMap;
251 
253 
254  typedef boost::unordered_map<std::string, DtElementID> WatchList;
257  };
258  }
259 }
ToBeVisualizedMap myToBeVisualized
Definition: DtAggregateElementProcessor.h:246
DtVisualizerCreationSettings * myVisualTypeVisualizerSettings
Definition: DtAggregateElementProcessor.h:256
AggregateElementVisualizerMap myAggregateElementVisualizers
Definition: DtAggregateElementProcessor.h:241
WatchList myWatchList
Definition: DtAggregateElementProcessor.h:255
Virtual base class.
Definition: DtVirtualBaseClass.h:19
GlobalIdToAggregateElementVisualizerMap myGlobalIdToElementVisualizerMap
Definition: DtAggregateElementProcessor.h:242
std::vector< DtElementID > ElementIDs
Definition: DtElementIDHierarchy.h:114
DtVrlinkConnection & myConnection
Definition: DtAggregateElementProcessor.h:239
boost::unordered_map< DtUniqueID, DtVrlinkAggregateElement * > AggregateElementVisualizerMap
Definition: DtAggregateElementProcessor.h:233
boost::unordered_map< int, DtVisualizerSet * > GhostPair
Definition: DtAggregateElementProcessor.h:249
boost::unordered_map< DtUniqueID, DtVrlinkAggregateStateListener * > ToBeVisualizedMap
Definition: DtAggregateElementProcessor.h:237
Contains makVrv:DtSelectionManager class.
std::set< const DtElementIDHierarchyNode * > VisibilityProcessingList
Definition: DtElementIDHierarchy.h:115
boost::signalslib::signal< void(DtVrlinkAggregateStateListener &, DtVrlinkAggregateElement *)> signal_elementCreated
Definition: DtAggregateElementProcessor.h:119
DtSignalConnectionManager myConnections
Definition: DtAggregateElementProcessor.h:240
boost::unordered_map< std::string, DtElementID > WatchList
Definition: DtAggregateElementProcessor.h:254
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:247
DtUniqueID DtElementID
The ElementID is a specific type of unique ID used to represent VR-Vantage uniquely defined elements...
Definition: DtUniqueID.h:23
The class that will be used to keep track of echelon hierarchy.
Definition: DtAggregateEchelonManager.h:31
DtAggregateEchelonManager & myEchelonHierarchy
Definition: DtAggregateElementProcessor.h:245
#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
boost::signalslib::signal< void(DtVrlinkAggregateStateListener &, DtVrlinkAggregateElement *)> signal_elementAboutToBeDestroyed
Definition: DtAggregateElementProcessor.h:120
makArchives::DtAggregateSettingsRecord myAggregateSettings
Definition: DtAggregateElementProcessor.h:243
boost::unordered_map< std::string, DtVrlinkAggregateElement * > GlobalIdToAggregateElementVisualizerMap
Definition: DtAggregateElementProcessor.h:235
GhostMap myGhostMap
Definition: DtAggregateElementProcessor.h:252
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
The DtAggregateElementProcessor will connect to the DtAggregateExistenceListener and handle the creat...
Definition: DtAggregateElementProcessor.h:47
boost::unordered_map< DtElementID, GhostPair > GhostMap
Definition: DtAggregateElementProcessor.h:250
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
This contains all the DtVisualizers used to visualize an element in a particular model set...
Definition: DtVisualizerSet.h:31
#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.
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:20
Contains DLL export macros.
std::set< DtUniqueID > IdSet
Definition: DtSelectionManager.h:32
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 Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)