VR-Vantage 3.0 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtTickable.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
13 
15 
16 #include <vlutil/vlTime.h>
17 
18 
19 namespace makVrv
20 {
21  class DtTickableManagerInterface;
22 
27  {
28  public:
32  {
36  };
37 
38  public:
39 
49  virtual bool needsUpdate( DtTime tNow );
50 
52  virtual bool updateIfNeeded(DtTime tNow);
53 
56  virtual void update( DtTime tNow ) = 0;
57 
59  virtual ~DtTickable();
60 
62 
63 
64 
65 
66  virtual void setIsThreadSafe(bool safe);
67  virtual bool isThreadSafe() const;
69 
71 
72 
73 
74 
75 
76  virtual void setTickableListState(TickableListState safeList);
77  virtual TickableListState tickableListState() const;
79 
81 
82 
83 
84 
85 
86 
87  virtual void setUpdatePeriod( unsigned int period );
88  virtual unsigned int updatePeriod() const;
89 
91  virtual bool lodSystemEnabled() const;
92 
94 
95  protected:
102 
104  DtTickable();
105 
106  virtual void slot_managerAboutToBeDeleted();
107 
108  protected:
111 
112  protected:
114  unsigned int myFrameCounter;
115  unsigned int myFrameToUpdate;
116  unsigned int myUpdatePeriod;
117  // NOTE: Several derived updater classes also have a myLastUpdateTime
118  // member variable with its own initializer
119  // Double check whether you are modifying the child or the parent!
120  // Ideally all the children myLastUpdateTime should go away
124  };
125 }


Copyright © 2005-2022 MAK Technologies. All Rights Reserved (www.mak.com)