61 #ifndef LIB_TIME_MUTATION_H 62 #define LIB_TIME_MUTATION_H 88 enum{ MUTATION_IMPL_SIZE =
sizeof(TimeValue) };
105 virtual void change (
Duration&)
const =0;
106 virtual void change (
TimeSpan&)
const =0;
107 virtual void change (
QuTime&)
const =0;
115 static EncapsulatedMutation
nudge (
int adjustment);
116 static EncapsulatedMutation
nudge (
int adjustment,
Symbol gridID);
117 #ifdef LIB_TIME_TIMEQUANT_H 118 static EncapsulatedMutation
nudge (
int adjustment,
PQuant const& grid);
131 inline void Duration::accept (
Mutation const& muta) { muta.change (*
this); }
134 #ifdef LIB_TIME_TIMEQUANT_H 149 return target = valueToSet;
168 #ifdef LIB_TIME_TIMEQUANT_H 179 PQuant const& grid (target);
180 FrameCnt originalGridPoint = grid->gridPoint(target);
181 FrameCnt adjustedGridPoint = originalGridPoint + steps;
182 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.