![]() |
XII Release 0.1.0
|
An event track is a time line that contains named events. More...
#include <EventTrack.h>
Public Member Functions | |
void | Clear () |
Removes all control points. | |
bool | IsEmpty () const |
Checks whether there are any control points in the track. | |
void | AddControlPoint (xiiTime time, xiiStringView sEvent) |
Adds a named event into the track at the given time. | |
void | Sample (xiiTime rangeStart, xiiTime rangeEnd, xiiDynamicArray< xiiHashedString > &out_events) const |
Samples the event track from range [start; end) and adds all events that occured in that time period to the array. | |
void | Save (xiiStreamWriter &ref_stream) const |
void | Load (xiiStreamReader &ref_stream) |
An event track is a time line that contains named events.
The time line can be sampled to query all events that occurred during a time period. There is no way to sample an event track at a fixed point in time, because events occur at specific time points and thus only range queries make sense.
void xiiEventTrack::Sample | ( | xiiTime | rangeStart, |
xiiTime | rangeEnd, | ||
xiiDynamicArray< xiiHashedString > & | out_events ) const |
Samples the event track from range [start; end) and adds all events that occured in that time period to the array.
Note that the range is inclusive for the start time, and exclusive for the end time.
If rangeStart is larger than rangeEnd, the events are returned in reverse order (backwards traversal).