9 #ifndef CMZN_TIMENOTIFIER_HPP__ 10 #define CMZN_TIMENOTIFIER_HPP__ 12 #include "opencmiss/zinc/timenotifier.h" 13 #include "opencmiss/zinc/timekeeper.hpp" 29 cmzn_timenotifierevent_id id;
38 id(in_timenotifier_event_id)
42 id(cmzn_timenotifierevent_access(timenotifierEvent.id))
47 cmzn_timenotifierevent_id temp_id = cmzn_timenotifierevent_access(timenotifierEvent.id);
50 cmzn_timenotifierevent_destroy(&
id);
60 cmzn_timenotifierevent_destroy(&
id);
79 cmzn_timenotifierevent_id
getId()
const 91 return cmzn_timenotifierevent_get_time(
id);
111 static void C_callback(cmzn_timenotifierevent_id timenotifierevent_id,
void *callbackVoid)
113 Timenotifierevent timenotifierevent(cmzn_timenotifierevent_access(timenotifierevent_id));
115 (*callback)(timenotifierevent);
141 cmzn_timenotifier_id id;
149 explicit Timenotifier(cmzn_timenotifier_id in_timenotifier_id) :
150 id(in_timenotifier_id)
154 id(cmzn_timenotifier_access(timenotifier.id))
159 cmzn_timenotifier_id temp_id = cmzn_timenotifier_access(timenotifier.id);
162 cmzn_timenotifier_destroy(&
id);
172 cmzn_timenotifier_destroy(&
id);
203 return cmzn_timenotifier_get_time(
id);
218 return cmzn_timenotifier_set_callback(
id, callback.C_callback, static_cast<void*>(&callback));
230 return cmzn_timenotifier_clear_callback(
id);
245 return cmzn_timenotifier_get_next_callback_time(
246 id, static_cast<cmzn_timekeeper_play_direction>(playDirection));
273 Timenotifier(reinterpret_cast<cmzn_timenotifier_id>(timenotifier_regular_id))
283 return reinterpret_cast<cmzn_timenotifier_regular_id
>(id);
302 return cmzn_timenotifier_regular_set_frequency(getDerivedId(), frequency);
315 return cmzn_timenotifier_regular_set_offset(getDerivedId(), timeOffset);
328 cmzn_timekeeper_create_timenotifier_regular(
id, updateFrequency, timeOffset)));
int clearCallback()
Definition: timenotifier.hpp:228
double getTime()
Definition: timenotifier.hpp:201
TimenotifierRegular createTimenotifierRegular(double updateFrequency, double timeOffset)
Definition: timenotifier.hpp:325
int setOffset(double timeOffset)
Definition: timenotifier.hpp:313
cmzn_timenotifier_regular_id getDerivedId()
Definition: timenotifier.hpp:281
Information about changes to the timekeeper/time.
Definition: timenotifier.hpp:26
A derived timenotifier type which requests notifications at regular intervals.
Definition: timenotifier.hpp:264
TimenotifierRegular castRegular()
Definition: timenotifier.hpp:320
int setCallback(Timenotifiercallback &callback)
Definition: timenotifier.hpp:216
double getNextCallbackTime(enum Timekeeper::PlayDirection playDirection)
Definition: timenotifier.hpp:243
PlayDirection
Definition: timekeeper.hpp:84
double getTime() const
Definition: timenotifier.hpp:89
cmzn_timenotifierevent_id getId() const
Definition: timenotifier.hpp:79
cmzn_timenotifier_id getId() const
Definition: timenotifier.hpp:191
Base class functor for Timenotifier callbacks.
Definition: timenotifier.hpp:104
bool isValid() const
Definition: timenotifier.hpp:181
int setFrequency(double frequency)
Definition: timenotifier.hpp:300
The OpenCMISS namespace.
Definition: context.hpp:20
bool isValid() const
Definition: timenotifier.hpp:69
Description of timing requirements and for setting up time callbacks.
Definition: timenotifier.hpp:138