VR-Forces 4.6.1 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 }

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)