VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtAggregateElement.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>
15 #include <vrvVrl/DtVrlinkElement.h>
16 #include <boost/unordered_map.hpp>
17 
18 namespace makVrv
19 {
20  class DtStateVisualizerFactory;
21 
22  namespace DT_PROTOCOL_NAMESPACE
23  {
24  class DtVrlinkConnection;
25  class DtVrlinkAggregateStateListener;
26 
31  {
32  public:
33 
34  typedef boost::unordered_map<int, DtAggregateVisualizerSet*> ModelSetMap;
35 
38 
41 
43  void visualize(const DtSharedModelSetSettings::ModelSetVisualizedMap& sets);
44 
46  virtual void setVisible(bool visible);
47 
49  virtual void show(DtShowHideContext::ShowHideContext);
50  virtual void hide(DtShowHideContext::ShowHideContext);
51 
54  void setModelSetEnabled( int modelSet, bool enabled );
55 
57  inline const ModelSetMap& modelSetMap() const
58  {
59  return myAggregateModelSetMap;
60  }
61 
62  template <typename VisualizerClass>
63  void findVisualizers(std::vector<VisualizerClass*>& visualizers)
64  {
65  ModelSetMap::iterator i = myAggregateModelSetMap.begin();
66  ModelSetMap::iterator e = myAggregateModelSetMap.end();
67  for(;i != e;++i)
68  {
69  i->second->findVisualizers(visualizers);
70  }
71  }
72 
74  inline DtVrlinkAggregateStateListener& listener()
75  {
76  return myListener;
77  }
78 
79  virtual DtElementEntry::ObjectType elementType() const
80  {
82  }
83 
85  virtual void slot_subordinatesChanged();
86 
89  void createVisualizersByModelSetAndType( int modelSet, int visualType );
90 
93  void destroyVisualizersByModelSetAndType( int modelSet, int visualType );
94 
95  boost::signal<void (DtAggregateElement*)> signal_subordinatesChanged;
96 
97  protected:
99  void damageSet(unsigned int damage);
100 
102  virtual void updateVisibilityStates();
103 
107  virtual void updateVisibilityState(DtAggregateVisualizerSet*);
108 
109  virtual void getDefinitions( std::vector<DtUnicode>& definitions );
110 
111  protected:
112 
117  };
118  }
119 }

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)