VR-Forces 4.1 Class Documentation
DtAggregateElementProcessor.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtAggregateElementProcessor.h,v $ $Revision: 1.17 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #pragma once
14 
15 #include <vrvVrl/vrvVrl.h>
17 #include <boost/unordered_map.hpp>
18 #include <vl/globalObjDes.h>
19 
23 
24 namespace makVrv
25 {
26  class DtAggregateVisualizerSet;
27 
28  namespace DT_PROTOCOL_NAMESPACE
29  {
30  class DtAggregateElement;
31  class DtVrlinkConnection;
32  class DtVrlinkAggregateStateListener;
33  class DtVrlinkAggregateListener;
34 
41  {
42  public:
43 
46 
49  static void registerInstance(DtVrlinkConnection& conn,
50  DtAggregateElementProcessor* instance);
51 
53  static DtAggregateElementProcessor* findInstance(DtVrlinkConnection& conn);
54 
56  virtual ~DtAggregateElementProcessor();
57 
59  DtAggregateVisualizerSet* findVisualizer(int modelSet,
60  const DtGlobalObjectDesignator& id);
61 
64  std::vector<DtAggregateVisualizerSet*> findVisualizers(
65  const DtGlobalObjectDesignator& id);
66 
68  DtAggregateVisualizerSet* findVisualizer( DtUniqueID sceneId );
69 
71  DtVrlinkAggregateStateListener* findListener( DtUniqueID elementId );
72 
74  DtAggregateElement* findElement( const DtUniqueID& elementId );
75 
77  DtAggregateElement* findElement( const DtGlobalObjectDesignator& id );
78 
80  void toggleLabelPinnedState(const DtSelectionManager::IdSet& ids);
81 
83  void changeAggregateSelection(const DtSelectionManager::IdSet& selected,
84  const DtSelectionManager::IdSet& deselected);
85 
87  virtual void setAggregateSettings(const makArchives::DtAggregateSettingsRecord&);
88 
91  void setVisualizerCreationProcessingTime(double);
92  double visualizerCreationProcessingTime() const;
93 
94  public:
95  boost::signal<void (DtVrlinkAggregateStateListener&, DtAggregateElement*)> signal_elementCreated;
96  boost::signal<void (DtVrlinkAggregateStateListener&, DtAggregateElement*)> signal_elementAboutToBeDestroyed;
97 
98  protected:
99 
102  virtual void modelSetVisualized(int modelSet, bool enabled);
103 
105  virtual void elementAttributeChangeRequested( DtUniqueID id,
106  DtUniqueID parentID, DtBoost::shared_ptr<const DtElementAttribute> atr );
107 
109  virtual void handleElementAttributeChanged(
110  DtAggregateElement& entity, const DtElementAttribute* attr);
111 
113  virtual void onAggregateDiscovered(DtVrlinkAggregateStateListener& listener);
114 
116  virtual void onAggregateToBeDestroyed(DtVrlinkAggregateStateListener& listener);
117 
119  virtual void slot_echelonVisibilityChange(DtElementID, DtElementIDHierarchyNode::DisplayState);
120  virtual void slot_echelonVisibilityChanged(DtElementIDHierarchy::VisibilityProcessingList);
121 
123  virtual void slot_aggregateDestroyedStateChanged(DtElementID, bool);
124 
126  virtual void processVisualizer(int modelSet, DtElementIDHierarchyNode::DisplayState displayState,
127  DtElementID id, DtVisualizerSet* s, bool respectLeafFlag);
128 
130  virtual bool isGhostable(DtVisualizerSet* set) const;
131 
133  virtual double setTransparency(DtVisualizerSet* set, double t) const;
134 
136  virtual double currentTransparency(DtVisualizerSet* set) const;
137 
139  virtual void applyGhosting(int modelSet, DtElementID elementID, DtVisualizerSet*);
140 
141  virtual void removeGhosting(int modelSet, DtElementID elementID);
142 
144  virtual void setDisplayAggregates(bool b);
145 
147  virtual void setShowLeafNodes(bool b);
148 
150  virtual void setGhostEchelonLevelItems(bool b);
151 
153  virtual void setEchelonLevel(int i);
154 
156  virtual void setAllowSelectionOfGhostedItems(bool);
157 
159  virtual void slot_hierarchyItemModified(DtElementIDHierarchyNode*);
160 
163  virtual void slot_hierarchyItemToBeRemoved(DtElementIDHierarchyNode*);
164 
168  virtual void slot_subordinatesChanged(DtAggregateElement*);
169 
173  virtual void mapGlobalIdsToElementIds(DtElementID parent,
174  const std::set<std::string>& globalIds, DtElementIDHierarchy::ElementIDs& children);
175 
178  virtual void watchForGlobalIdDiscovery(DtElementID parent, const std::string& globalId);
179 
181  virtual void slot_entityElementCreated(DtVrlinkEntityStateListener&, DtEntityElement*);
182 
184  virtual void aggregateElementCreated(DtVrlinkAggregateStateListener&, DtAggregateElement*);
185 
187  virtual void removeFromWatchList(DtElementID id);
188 
190  virtual void connectToElementProcessor();
191  virtual void disconnectFromElementProcessor();
192 
194  virtual void slot_completeDiscovery();
195 
196  virtual void createVisualizer(DtVrlinkAggregateStateListener&);
197 
198  protected:
199 
200  typedef boost::unordered_map<DtUniqueID, DtAggregateElement*>
202  typedef boost::unordered_map<std::string, DtAggregateElement*>
204  typedef boost::unordered_map<DtUniqueID, DtVrlinkAggregateStateListener*>
206 
212 
216 
217  protected:
218  typedef boost::unordered_map<int, DtVisualizerSet*> GhostPair;
219  typedef boost::unordered_map<DtElementID, GhostPair> GhostMap;
220 
222 
223  typedef boost::unordered_map<std::string, DtElementID> WatchList;
225  };
226  }
227 }

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)