Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/time/mutation.hpp"
Interface: an opaque change imposed onto some time value.
Definition at line 91 of file mutation.hpp.
Public Member Functions | |
virtual void | change (Duration &) const =0 |
virtual void | change (TimeSpan &) const =0 |
virtual void | change (QuTime &) const =0 |
Static Public Member Functions | |
static EncapsulatedMutation | adjust (Offset) |
Convenience factory: simple Mutation to adjust the duration or length of a timespan. More... | |
static EncapsulatedMutation | changeDuration (Duration) |
Convenience factory: simple Mutation to adjust the duration or length of a timespan. More... | |
static EncapsulatedMutation | changeTime (Time) |
Convenience factory to yield a simple Mutation changing the absolute start time. More... | |
static EncapsulatedMutation | materialise (QuTime const &) |
Convenience factory: materialise the given quantised time into an explicit fixed internal time value, according to the underlying time grid; impose the resulting value then as new time point or start point to the target. More... | |
static EncapsulatedMutation | nudge (int adjustment) |
build a time mutation to nudge the target time value by an offset, defined as number of steps on an implicit nudge grid. More... | |
static EncapsulatedMutation | nudge (int adjustment, Symbol gridID) |
build a time mutation to nudge the target time value in steps based on a pre-defined grid. More... | |
Static Protected Member Functions | |
static TimeValue & | imposeChange (TimeValue &, TimeValue const &) |
static TimeValue & | imposeChange (TimeValue &, Offset const &) |
static TimeValue & | imposeChange (TimeValue &, int) |
static TimeValue & | imposeChange (QuTime &, int) |
|
static |
Convenience factory to yield a simple Mutation changing the absolute start time.
This whole procedure might look quite inefficient, but actually most of the abstractions are removed at runtime, leaving only a single indirection through the VTable of the Mutation Interface.
error::Logic | when attempting to change the (non existent) start time of a Duration |
Definition at line 285 of file mutation.cpp.
Referenced by TimelineState::TimelineState().
|
static |
Convenience factory: simple Mutation to adjust the duration or length of a timespan.
error::Logic | when attempting to change the "duration" of a quantised time point |
Definition at line 296 of file mutation.cpp.
|
static |
Convenience factory: simple Mutation to adjust the duration or length of a timespan.
error::Logic | when attempting to change the "duration" of a quantised time point |
Definition at line 307 of file mutation.cpp.
|
static |
Convenience factory: materialise the given quantised time into an explicit fixed internal time value, according to the underlying time grid; impose the resulting value then as new time point or start point to the target.
Definition at line 319 of file mutation.cpp.
|
static |
build a time mutation to nudge the target time value by an offset, defined as number of steps on an implicit nudge grid.
If the target is an continuous (not quantised) time value or duration, an internal 'default nudge grid' will be used to calculate the offset value. Typically, this grid counts in seconds. To the contrary, when the target is a quantised value, it will be aligned to the grid point relative to the current value's next grid point, measured in number of steps. This includes materialising the internal time to the exact grid position. If especially the adjustment is zero, the internal value will be changed to literally equal the current value's next grid point.
Definition at line 336 of file mutation.cpp.
|
static |
build a time mutation to nudge the target time value in steps based on a pre-defined grid.
adjustment | number of grid steps to apply as offset |
gridID | symbolic reference to a grid, which needs to be defined "somewhere" within the system, typically within the session. |
Definition at line 109 of file common-services.cpp.
References Quantiser::retrieve().
actually force a change into a target time entity to mutate. Mutation is declared fried to TimeValue and thus is allowed to influence the basic value stored in each time entity
Definition at line 138 of file mutation.hpp.
Referenced by SetNewStartTimeMutation::change(), ImposeOffsetMutation::change(), NaturalNudgeMutation::change(), and Mutation::imposeChange().
variation to mutate a target time value by applying an offset
Definition at line 145 of file mutation.hpp.
References Mutation::imposeChange().
nudge a target time value by a step wise offset. The standard case uses a fixed offset of 1 second per step //////////////////TICKET #810
Definition at line 154 of file mutation.hpp.
References Mutation::imposeChange().