13 #ifndef DtBalancedUpdater_H_
14 #define DtBalancedUpdater_H_
28 template <
typename Updatee>
48 void update(
double newTime);
79 #define DtBalancedUpdater_INL_
80 #include <vrvUtil/DtBalancedUpdater.inl>
81 #undef DtBalancedUpdater_INL_
virtual ~DtBalancedUpdater()
Override if necessary.
void addUpdatee(const Updatee &updater)
Add an updatee object to the group.
UpdateeList myFinishedList
Definition: DtBalancedUpdater.h:75
std::vector< Updatee > UpdateeList
Definition: DtBalancedUpdater.h:68
Contains DLL export macros.
double myTimeStep
Definition: DtBalancedUpdater.h:70
void removeUpdatee(const Updatee &updater)
Remove an updater object from the group.
void setTimeStep(double timeStep)
Change the time step of the updater which is the time between updates of a particular instance...
size_t numberOfUpdatees() const
Get the number of updaters added.
UpdateeList myWaitingList
Definition: DtBalancedUpdater.h:74
DtBalanacedUpdater updates updatee classes at a desired rate in a fair (each instance gets the same n...
Definition: DtBalancedUpdater.h:29
void update(double newTime)
Update the group, this function should be called frequently.
size_t myInitialWaitingSize
Definition: DtBalancedUpdater.h:72
void finishUpdates(double newTime)
Finish all remaining updates.
double myCurrentTime
Definition: DtBalancedUpdater.h:71
double timeStep() const
Get the time step of the updater.
DtBalancedUpdater(double timeStep=1.0)
Create a balanced updater which will update at a given rate.