Commit graph

136 commits

Author SHA1 Message Date
104b71e8aa Timehandling: allow default initialisation for Offset values
From a purely logical viewpoint, it looked sensible to require an actual
value for an offset, especially since our time values are immutable.
But this has the unfortunate consequence that we'd be unable to use
an offset value as parameter for any command, since we store the arguments
as tuple and the tuple type has a default constructor. We might be able
to get around that problem, but such looks brittle to me; it is just
plain surprising for anyone not familiar with the internals of the
command system.

For that reason, I've now added a default ctor to the Offset type
2017-01-11 04:09:32 +01:00
1a4b6545a0 maximum munch
...feels like X-mas
2016-12-23 04:23:03 +01:00
72f9b4edb1 Analysis continued: inner contradictions of object field vs attribute
...after re-reading my own documentation, it occured to me that
we need to draw a border line and thus decide, what not to support
2016-05-21 17:55:48 +02:00
35fbd9fa1e immutable-arguments(#989): add a first-class unit test (closes #989)
the functionality as such is already covered,
but it seems important enough to warrant a dedicated test.


incidentally, Duration still lacked a default ctor.
Time values are default constructible, yet immutable.
2016-02-07 02:59:03 +01:00
9847888a00 make TimeSpan default constructible
...probably just an omission. TimeValue and Time are
also default constructible, and this makes sense, semantically.

Please note that Time values are *immutable* though.
Only TimeVar can be reassigned. This is so by design
2016-02-06 19:23:16 +01:00
1dddbdaacc improve the diagnositc representation for time values
- especially mark Offsets and Durations
- fix possible number-overflow (time values are 64 bit!)
2016-01-08 00:13:59 +01:00
2c20d407fc mass clean-up: adapt usage of std::cout pretty much everywhere
- remove unnecessary includes
- expunge all remaining usages of boost::format
- able to leave out the expliti string(elm) in output
- drop various operator<<, since we're now picking up
  custom string conversions automatically
- delete diagnostics headers, which are now largely superfluous
- use newer helper functions occasionally

I didn't blindly change any usage of <iostream> though;
sometimes, just using the output streams right away
seems adequate.
2016-01-07 20:12:46 +01:00
ff7ac5523f clean-up(#985): tighten basic header lib/meta/util.hpp
This header shall provide only very fundamental
metaprogramming helpers, since it is included pervasively
2016-01-05 22:00:53 +01:00
7b7d12d99e add internal / diagnostic display for low-level time values and time spans
Initially I've deliberately omitted those, to nudge towards
using time quantisation and TCode formatting for any external
representation of time values.

While this recommendation is still valid, the overloaded
string conversion turns out to be helpful for unit testing
and diagnostics in compound data structures.
See Record<GenNode>
2015-09-25 03:12:04 +02:00
24d7f55935 Merge Platform upgrade and Diff-Framework development 2015-08-16 01:42:26 +02:00
7f51a01631 clean-up some library and linkage problems
the object VTable is typically emitted when the compiler
encounters the first non-static non-inline function of
the class or a derived class.

Sometimes this happens within the wrong library and so
the compiler needs a nudge to emit those infrastructure functions.
But in most cases this works out of the box and need no further
magic incanctations, which might have a downside.
Especially because also a non-inline dtor does incur a call overhead,
whereas an inline dtor can be trivially elided.
2015-08-16 01:35:30 +02:00
8a45c1d948 fix typo in header include guard 2015-06-03 01:18:58 +02:00
670c670d55 style-adjustment: GUI indentation, naming and braces
over time, a specific Lumiera code writing style has emerged.
The GUI, as it stood, used somewhat different conventions,
which now have been aligned to the common standard.

Basically we use GNU style, with some adjustments for OO-programming,
we prefer CamelCase, and write TypeNames uppercase, variableNames lowercase
2015-05-29 04:44:58 +02:00
09e7e1f8f5 WIP: pondering diff representation variants
Actually I arried at the conclusion, that the *receiving* of
a diff representation is actually a typical double-dispatch situation.
This leads to the attempt to come up with a specialised visitor
as standard pattern to handle and apply a diff. Obviously,
we do not want the classical GoF-Visitor, but (yes, we had
that discussion allready) -- well in terms of runtime cost,
we have to deal with at least two indirections anyway;
so now I'm exploring the idea to implement one of these
indirections through a functor object, which at the same time
acts as "Tag" in the diff representation language (instead
of using an enum as tag)
2014-11-10 04:00:39 +01:00
7be1b7d35d Switch from TR1 preveiw to the new standard headers
- functional
- memory
- unordered collections
2014-04-03 22:42:48 +02:00
a640283e4c introduce typedef for Frame numbers (see #882) 2013-11-18 00:01:43 +01:00
4da923696b partial fix: use 64 framecounts (Ticket #882)
This is a partial and preliminary fix; we had an occasional
numeric overflow on 32bit platforms in some tests.

The complete fix will be to introduce a typedef and then
rework the relevant APIs (which are preliminary anyway,
thus no urge right now)
2013-11-10 04:14:39 +01:00
bcbd05d7eb reorganise some boost::format usage
using our util::_Fmt front-end helps to reduce the code size,
since all usages rely on a single inclusion of boost::format

including boost::format via header can cause quite some code bloat


NOTE: partial solution, still some further includes to reorganise
2013-09-01 17:36:05 +02:00
2488478a12 file-level comment for time values
a recent discussion showed that it is rather likely
for a reader new to the whole time handling framework
to encounter this header first....
2013-08-13 01:27:37 +02:00
84281d5b60 WIP: CalcStream initialisation
especially: where to establish the effective Timings.

also fixed several compilation errors
2013-06-15 04:02:48 +02:00
9cfbc7bbe6 GCC 4.7 compilation fix
now builds for me on Debian-7 Wheezy 64bit

unqualified member functions in dependent base classes not found anymore.
Need to qualify either the class or the instance.
2013-05-10 00:48:25 +02:00
ada5cefaaf re-arrange tests according to layer structure
the buildsystem will now pick up and link
all test cases according to the layer, e.g.
backend tests will automatically be linked
against the backend + library solely.
2013-01-07 05:43:01 +01:00
5292b19dd6 clean-up and finalise time::Mutation 2012-12-02 01:54:02 +01:00
3852c8f8e8 provide a time mutation for nudging based on symbolic grid reference
time handling is part of the library, while this
convenience shortcut relies on the Advice system,
which resides in the application lib.
To allow this kind of symbolic acces to a grid
entity defined "elesewhere", client code needs
to be linked against liblumieracore.so
2012-12-02 01:17:02 +01:00
5dfe5e099f refactor namespaces for query and defaults manager 2012-12-01 08:44:07 +01:00
8ee8eb1e73 create a new integration point for using application services
especially this allows to use the Advice system
or the query resolvers from within library facilities
to refer to other implementation level services by name
2012-12-01 07:46:49 +01:00
Michael Fisher
f7a7c1c416 GCC 4.7 compilation fixes. Now builds on debian wheezy beta2 2012-10-10 05:29:54 +02:00
5222384f8b try to circumvent ambiguity in overload resolution
we want to support various integral and rational factors
for linear chaining of time offsets
2012-10-10 05:20:13 +02:00
08d266819d re-read my own code and pick up the design work
..next question is: how to shape the dispatcher interface,
in order to support ongoing chunk wise planning
of new jobs, including a continuation
2012-10-10 05:20:13 +02:00
080d6913c6 fix a type converison problem
...better state explicitly we're requiring
a rational factor
2012-10-10 05:20:12 +02:00
9aec2a9806 allow for fractional scaling of time durations
implemented as extension to the linear combinations.
I decided to use the same "always floor" rule
as employed for time quantisation. Moreover,
we don't support floating point, only rationals
2012-10-10 05:20:12 +02:00
22322dfec4 refactor the division/quantisation helpers
...no need to keep them in util.hpp, as they
are used rather occasionally, while util.hpp
is used pervasively.
2012-10-10 05:20:12 +02:00
2cb254365c some musing about timing constraints and quantisation 2012-10-10 05:20:10 +02:00
477b443191 implement diagnostic OutputSlot simple frame tracking
...should be enough to run tests against the OutputSlot interface
2011-12-09 01:03:02 +01:00
e7ae9a3082 introduce marker time values to designate corner cases 2011-12-09 01:00:50 +01:00
d9f84a9bfd clean up lib/meta namespaces 2011-12-03 03:15:59 +01:00
b9d1899486 cleanup: rectify Proc-Layer namespaces (II) 2011-12-02 17:50:44 +01:00
9c04637aea fix misspelling in library 2011-10-23 02:44:52 +02:00
606251749e fix time::Control should properly include <tr1/functional> 2011-10-22 21:45:40 +02:00
1e7da409bb Fix logic error uncovered by GCC 4.4
benefits of using a newer compiler, yay!

Explanation: the Link<...> template combines
various policy templates and exposes a set
of functions, which can be bound as functor
into an concrete time::Control instance.

Actually, we need to mix in only the Mutation
baseclass, because we just want to inherit
the privilege to change time values, which
are otherwise immutable. We don't need to
mix in the Mutator template anymore (this
was a leftover from an earlier design)
2011-09-25 19:26:02 +02:00
2099ecbcac finish and comment the new time::Control facility 2011-09-25 19:25:55 +02:00
f4d0d23e48 clean up leftovers from the first implementation attempts 2011-09-25 19:25:54 +02:00
fec2d25b52 additional quantisation and duration canges covered and passing test 2011-09-25 19:25:54 +02:00
15a3694cca more complete unit test pass 2011-09-25 19:25:54 +02:00
b54cd2c722 cont. defining time::Control special cases
the refactoring seems to work out OK, was able
to cover all the cases defined thus far....
2011-09-25 19:25:53 +02:00
9bd96a1b19 time-entities refactoring: Duration isn't an Offset
removed that inheritance relation; it was a typical
example of abusing inheritance and violated the
Liscov substitution principle. It is sufficient
to allow promotion of an offset into a Duration.
Note: Duration is the time metric
2011-09-25 19:25:53 +02:00
7c5f18643b cont. reworking based on that idea; refactor mutation base cases 2011-09-25 19:25:53 +02:00
d39ae8afc6 idea for better organisation of the template specialisations 2011-09-25 19:25:53 +02:00
a8fd0bf7c5 better avoid throwing and use a default time grid in some cases 2011-09-25 19:25:53 +02:00
47afbbeab0 first attempt towards covering the various special cases
the intention is to generate most combinations from
generic template cases, but to define the difficult
cases by explicit specialisation
2011-09-25 19:25:53 +02:00