VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtSimEntry.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2009 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtSimEntry.h,v $ $Revision: 1.14 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtSimEntry_H_
14 #define DtSimEntry_H_
15 
16 #include <vrvCore/vrvCore.h>
17 #include <vrvCore/DtUniqueID.h>
19 
20 #include <vector>
21 #include <map>
22 
23 namespace makVrv
24 {
25  class DtDe;
26  struct DtSimState;
27  class DtBaseStateView;
28 
32  {
33  public:
34 
36  friend class DtSimData;
37 
39  DtSimEntry(DtDe& de, DtUniqueID id);
40 
42  virtual ~DtSimEntry();
43 
45  typedef std::vector<DtSimState*> SimStateVector;
46 
48  typedef std::multimap< DtSimEntryUpdater::UpdateRate, DtBaseStateView* > UpdateRateMap;
49 
51  const SimStateVector& simStates() const;
52 
54  bool addState(DtSimState* state);
55 
57  bool removeState(DtSimState* state);
58 
61  void forceUpdate(DtBaseStateView* stateView);
62 
66  void setUpdateRate(DtSimEntryUpdater::UpdateRate rate, DtBaseStateView* stateView);
67 
69  DtSimEntryUpdater::UpdateRate rateForView(DtBaseStateView* stateView) const;
70 
73  void stateUpdated();
74 
76  DtUniqueID id() const;
77 
78  protected:
79 
80  //Clears out the internal state.
81  void reset();
82 
85  void addStateViewToUpdateRateMap(DtSimEntryUpdater::UpdateRate rate,
86  DtBaseStateView* stateView);
87 
90  void removeStateViewFromUpdateRateMap(DtBaseStateView* stateView);
91 
93  DtSimEntryUpdater::UpdateRate maxUpdateRate();
94 
96  DtSimEntryUpdater::UpdateRate minUpdateRate();
97 
98  protected:
99 
104  unsigned long long myUpdateCounter;
106  };
107 }
108 
109 #endif
110 

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)