VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 
19 
21 
23 
24 #include <boost/unordered_map.hpp>
25 #include <vl/globalObjectDesignator.h>
26 
27 namespace makVrv
28 {
29  class DtAggregateVisualizerSet;
30  class DtElementAttribute;
31 
32  namespace DT_PROTOCOL_NAMESPACE
33  {
34  class DtAggregateElement;
35  class DtEntityElement;
36  class DtVrlinkAggregateStateListener;
37  class DtVrlinkAggregateListener;
38  class DtVrlinkConnection;
40 
47  {
48  public:
49 
52 
55  static void registerInstance(DtVrlinkConnection& conn,
56  DtAggregateElementProcessor* instance);
57 
59  static DtAggregateElementProcessor* findInstance(DtVrlinkConnection& conn);
60 
62  virtual ~DtAggregateElementProcessor();
63 
65  DtAggregateVisualizerSet* findVisualizer(int modelSet,
66  const DtGlobalObjectDesignator& id);
67 
70  std::vector<DtAggregateVisualizerSet*> findVisualizers(
71  const DtGlobalObjectDesignator& id);
72 
74  DtAggregateVisualizerSet* findVisualizer( DtUniqueID sceneId );
75 
77  DtVrlinkAggregateStateListener* findListener( DtUniqueID elementId );
78 
80  DtAggregateElement* findElement( const DtUniqueID& elementId );
81 
83  DtAggregateElement* findElement( const DtGlobalObjectDesignator& id );
84 
86  void toggleLabelPinnedState(const DtSelectionManager::IdSet& ids);
87 
89  void changeAggregateSelection(const DtSelectionManager::IdSet& selected,
90  const DtSelectionManager::IdSet& deselected);
91 
93  virtual void setAggregateSettings(const makArchives::DtAggregateSettingsRecord&);
94 
97  void setVisualizerCreationProcessingTime(double);
98  double visualizerCreationProcessingTime() const;
99 
102  visualTypeVisualizerCreationMap() const;
103 
104  public:
105  boost::signal<void (DtVrlinkAggregateStateListener&, DtAggregateElement*)> signal_elementCreated;
106  boost::signal<void (DtVrlinkAggregateStateListener&, DtAggregateElement*)> signal_elementAboutToBeDestroyed;
107 
108  protected:
109 
112  virtual void modelSetVisualized(int modelSet, bool enabled);
113 
115  virtual void elementAttributeChangeRequested( DtUniqueID id,
116  DtUniqueID parentID, DtBoost::shared_ptr<const DtElementAttribute> atr );
117 
119  virtual void handleElementAttributeChanged(
120  DtAggregateElement& entity, const DtElementAttribute* attr);
121 
123  virtual void onAggregateDiscovered(DtVrlinkAggregateStateListener& listener);
124 
126  virtual void onAggregateToBeDestroyed(DtVrlinkAggregateStateListener& listener);
127 
129  virtual void slot_echelonVisibilityChange(DtElementID, DtElementIDHierarchyNode::DisplayState);
130  virtual void slot_echelonVisibilityChanged(DtElementIDHierarchy::VisibilityProcessingList);
131 
134  virtual void slot_visualizerCreationEnabled( int modelSet, int visualType );
135 
138  virtual void slot_visualizerCreationDisabled( int modelSet, int visualType );
139 
141  virtual void slot_aggregateDestroyedStateChanged(DtElementID, bool);
142 
144  virtual void processVisualizer(int modelSet, DtElementIDHierarchyNode::DisplayState displayState,
145  DtElementID id, DtVisualizerSet* s, bool respectLeafFlag);
146 
148  virtual bool isGhostable(DtVisualizerSet* set) const;
149 
151  virtual double setTransparency(DtVisualizerSet* set, double t) const;
152 
154  virtual double currentTransparency(DtVisualizerSet* set) const;
155 
157  virtual void applyGhosting(int modelSet, DtElementID elementID, DtVisualizerSet*);
158 
159  virtual void removeGhosting(int modelSet, DtElementID elementID);
160 
162  virtual void setDisplayAggregates(bool b);
163 
165  virtual void setShowLeafNodes(bool b);
166 
168  virtual void setGhostEchelonLevelItems(bool b);
169 
171  virtual void setEchelonLevel(int i);
172 
174  virtual void setAllowSelectionOfGhostedItems(bool);
175 
177  virtual void slot_hierarchyItemModified(DtElementIDHierarchyNode*);
178 
181  virtual void slot_hierarchyItemToBeRemoved(DtElementIDHierarchyNode*);
182 
186  virtual void slot_subordinatesChanged(DtAggregateElement*);
187 
191  virtual void mapGlobalIdsToElementIds(DtElementID parent,
192  const std::set<std::string>& globalIds, DtElementIDHierarchy::ElementIDs& children);
193 
196  virtual void watchForGlobalIdDiscovery(DtElementID parent, const std::string& globalId);
197 
199  virtual void slot_entityElementCreated(DtVrlinkEntityStateListener&, DtEntityElement*);
200 
202  virtual void aggregateElementCreated(DtVrlinkAggregateStateListener&, DtAggregateElement*);
203 
205  virtual void removeFromWatchList(DtElementID id);
206 
208  virtual void connectToElementProcessor();
209  virtual void disconnectFromElementProcessor();
210 
212  virtual void slot_completeDiscovery();
213 
214  virtual void createVisualizer(DtVrlinkAggregateStateListener&);
215 
216  protected:
217 
218  typedef boost::unordered_map<DtUniqueID, DtAggregateElement*>
220  typedef boost::unordered_map<std::string, DtAggregateElement*>
222  typedef boost::unordered_map<DtUniqueID, DtVrlinkAggregateStateListener*>
224 
230 
234 
235  protected:
236  typedef boost::unordered_map<int, DtVisualizerSet*> GhostPair;
237  typedef boost::unordered_map<DtElementID, GhostPair> GhostMap;
238 
240 
241  typedef boost::unordered_map<std::string, DtElementID> WatchList;
244  };
245  }
246 }

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)