52 #ifndef LIB_TIME_MUTATION_H 53 #define LIB_TIME_MUTATION_H 79 enum{ MUTATION_IMPL_SIZE =
sizeof(TimeValue) };
96 virtual void change (
Duration&)
const =0;
97 virtual void change (
TimeSpan&)
const =0;
98 virtual void change (
QuTime&)
const =0;
106 static EncapsulatedMutation
nudge (
int adjustment);
107 static EncapsulatedMutation
nudge (
int adjustment,
Symbol gridID);
108 #ifdef LIB_TIME_TIMEQUANT_H 109 static EncapsulatedMutation
nudge (
int adjustment,
PQuant const& grid);
122 inline void Duration::accept (
Mutation const& muta) { muta.change (*
this); }
125 #ifdef LIB_TIME_TIMEQUANT_H 140 return target = valueToSet;
159 #ifdef LIB_TIME_TIMEQUANT_H 170 PQuant const& grid (target);
171 FrameCnt originalGridPoint = grid->gridPoint(target);
172 FrameCnt adjustedGridPoint = originalGridPoint + steps;
173 return imposeChange (target, grid->timeOf (adjustedGridPoint));
a mutable time value, behaving like a plain number, allowing copy and re-accessing ...
static EncapsulatedMutation changeTime(Time)
Convenience factory to yield a simple Mutation changing the absolute start time.
void accept(Mutation const &)
may change start / duration
A variation for limited copy support.
static EncapsulatedMutation adjust(Offset)
Convenience factory: simple Mutation to adjust the duration or length of a timespan.
Interface: an opaque change imposed onto some time value.
A mechanism to allow for opaque polymorphic value objects.
#define LUMIERA_ERROR_DECLARE(err)
Forward declare an error constant.
static TimeValue & imposeChange(TimeValue &, TimeValue const &)
void accept(Mutation const &)
receive change message, which might cause re-quantisation
Implementation namespace for support and library code.
Lumiera's internal time value datatype.
Token or Atom with distinct identity.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
static EncapsulatedMutation materialise(QuTime const &)
Convenience factory: materialise the given quantised time into an explicit fixed internal time value...
Marker types to indicate a literal string and a Symbol.
Template to build polymorphic value objects.
boost::rational< int64_t > FSecs
rational representation of fractional seconds
Lumiera error handling (C++ interface).
Offset measures a distance in time.
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 i...
Duration is the internal Lumiera time metric.
static EncapsulatedMutation changeDuration(Duration)
Convenience factory: simple Mutation to adjust the duration or length of a timespan.
A time interval anchored at a specific point in time.
int64_t FrameCnt
relative framecount or frame number.
a family of time value like entities and their relationships.
basic constant internal time value.
grid aligned time specification, referring to a specific scale.