Lumiera  0.pre.03
»edit your freedom«
mutation.cpp File Reference

Go to the source code of this file.

Description

A collection of concrete forms of time mutation.

This compilation unit defines some "mutators" based on explicitly given time values, to be applied to time durations, time spans and quantised time values. The intended usage is to build these "mutators" inline through use of the corresponding static builder functions defined in class Mutation. All the mutators defined here are "polymorphic value objects", i.e. they can be treated like simple time values, while actually hiding the concrete implementation and just exposing the #Mutation interface.

Remarks
these mutators are for casual use at places where you'd intuitively just want set a simple more or less hard wired value. The benefit of this seemingly complicated solution is that all the tricky corner cases for grid aligned time values will be treated automatically. Incidentally, there is another, quite different use case for time mutations, when it comes to receive continuous and ongoing changes to a time value (e.g. a cursor). This separate use case is handled by time::Control
See also
time::Control
lib::PolymorphicValue
TimeMutation_test
TimeControl_test

Definition in file mutation.cpp.

Classes

class  ImposeOffsetMutation
 concrete time value mutation: adjust the given time entity by an offset amount. More...
 
class  MaterialiseIntoTarget
 concrete time value mutation: make the grid aligned time value explicit, and impose the resulting value to the given time points (or start points). More...
 
class  NaturalNudgeMutation
 concrete time value mutation: nudge based on a implicit grid, which is either a quantised target value's own grid, or a natural grid. More...
 
class  NudgeMutation
 concrete time value mutation: nudge target value by the given number of 'steps', relative to the given grid. More...
 
class  SetNewDuration
 concrete time value mutation: set a new overall duration for an extended timespan. More...
 
class  SetNewStartTimeMutation
 concrete time value mutation: impose fixed new start time. More...
 

Functions

 LUMIERA_ERROR_DEFINE (INVALID_MUTATION, "Changing a time value in this way was not designated")
 

Namespaces

 lib
 Implementation namespace for support and library code.