VR-Forces 4.8 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 
UpdateRateMap myUpdateRateMap
Definition: DtSimEntry.h:103
UpdateRate
Definition: DtSimEntryUpdater.h:34
The DtSimData is the repository for simulation specific, read only data.
Definition: DtSimData.h:31
A DtBaseStateView is a the base class for all DtStateView&#39;s.
Definition: DtStateView.h:28
DtUniqueID myId
Definition: DtSimEntry.h:101
A DtSimEntry is a container of DtSimState&#39;s and represents the total state of an simulation object...
Definition: DtSimEntry.h:31
std::vector< DtSimState * > SimStateVector
A vector of DtSimState&#39;s.
Definition: DtSimEntry.h:45
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
std::multimap< DtSimEntryUpdater::UpdateRate, DtBaseStateView * > UpdateRateMap
A multimap of the update rates and DtEventView&#39;s to be updated at that rate.
Definition: DtSimEntry.h:48
bool myForceUpdatePending
Definition: DtSimEntry.h:105
unsigned long long myUpdateCounter
Definition: DtSimEntry.h:104
unsigned long long DtUniqueID
Definition: DtUniqueID.h:22
DtDe & myDe
Definition: DtSimEntry.h:100
Contains makVrv::DtSimEntryUpdater class.
A DtSimState is the base class for all state objects.
Definition: DtSimState.h:22
SimStateVector mySimStateVector
Definition: DtSimEntry.h:102
Contains makVrv::DtUniqueID type.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
Contains DLL export macros.

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)