6 #ifndef CNOID_BASE_TIME_SYNC_ITEM_ENGINE_H
7 #define CNOID_BASE_TIME_SYNC_ITEM_ENGINE_H
13 #include "exportdecl.h"
28 virtual bool onPlaybackInitialized(
double time);
29 virtual void onPlaybackStarted(
double time);
30 virtual bool onTimeChanged(
double time) = 0;
31 virtual void onPlaybackStopped(
double time,
bool isStoppedManually);
32 virtual bool isTimeSyncAlwaysMaintained()
const;
34 void startOngoingTimeUpdate();
35 void startOngoingTimeUpdate(
double time);
38 void updateOngoingTime(
double time);
39 void stopOngoingTimeUpdate();
47 bool isTimeSyncForcedToBeMaintained_;
48 bool isUpdatingOngoingTime_;
54 void setupOngoingTimeUpdate();
55 bool isTimeSyncForcedToBeMaintained()
const {
return isTimeSyncForcedToBeMaintained_; }
71 template<
class ItemType,
class EngineType = TimeSyncItemEngine>
76 return factory(
static_cast<ItemType*
>(item),
dynamic_cast<EngineType*
>(prevEngine));
84 int createEngines(
Item* item, std::vector<TimeSyncItemEnginePtr>& io_engines);
91 void registerFactory_(
92 const std::type_info& type,