VR-Forces 4.10 Class 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  virtual void setIsThreadSafe(bool safe);
67  virtual bool isThreadSafe() const;
69 
71  virtual void setTickableListState(TickableListState safeList);
77  virtual TickableListState tickableListState() const;
79 
81  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 }
Definition: DtTickable.h:34
unsigned int myFrameToUpdate
Definition: DtTickable.h:115
An abstract interface for managers of DtTickable objects.
Definition: DtTickableManagerInterface.h:25
An abstract base class for objects that require updates.
Definition: DtTickable.h:26
DtTime myLastUpdateTime
Definition: DtTickable.h:121
TickableListState
Enumeration used to indicate which DtTickableManager&#39;s tickable list the tickable is on...
Definition: DtTickable.h:31
unsigned int myUpdatePeriod
Definition: DtTickable.h:116
DtSignalConnectionManager myConnections
Definition: DtTickable.h:113
bool myIsThreadSafe
Definition: DtTickable.h:122
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtTickableManagerInterface * myManager
Pointer to manager for removal during destruction.
Definition: DtTickable.h:110
unsigned int myFrameCounter
Definition: DtTickable.h:114
Base class to provide boost signal/slot management.
Definition: DtTickable.h:33
TickableListState myTickableListState
Definition: DtTickable.h:123
Contains DLL export macros.

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)