Commit graph

4050 commits

Author SHA1 Message Date
b91734b0a6 WIP: first draft -- properties of an external symbolic record type
This Record type is intended to play a role in the
diff description / exchange of GUI data structures.
2015-08-16 01:35:28 +02:00
7fcee74960 formatting helper to join a collection into a string
Ouch!
Why does C++ lack the most basic everyday stuff?
It needn't be performant. It needn't support some fancy
higher order container. Just join the f***ing strings.

use Bosst??  -- OMG!! pulls in half the metra programming library
and tries to work on any concievable range like object. Just
somehow our Lumiera Forward Iterators aren't "range-like" enough
for boost's taste.

Thus let's code up that fucking for-loop ourselves, once and forever.
2015-08-16 01:35:28 +02:00
50faff29a9 add a startsWith util function
Boost has a starts_with in the string algorithms lib,
but we do not want to pull that in everywhere.
2015-08-16 01:35:28 +02:00
ff0950fd3b DOC: a note regarding Lumiera Forward Iterators and the range-for loop 2015-08-16 01:35:28 +02:00
46e573efb7 includes: split out rarely used PtrDerefIter
this allows us to avoid a boost include otherwise
dragged in through the widely used iter-adapter.hpp
2015-08-16 01:35:28 +02:00
ce7c38312d iterator improvements: use Lumiera Forward Iterator in range for loops
This is kind of the logic consequence, since we consider our
functional iterator concept still superior and will continue
to rely on it.

For some time now, I've considered to build a generic bridge
function, to use enable_if and metaprogramming to figure out
if some type is a "Lumiera Forward Iterator" automatically.
But since our concept is to some degree a contract regarding
semantics, which never can be captured by any kind of introspection,
such a bridge implementation would be rather heuristic and
bears the danger to trigger on types actually not intended
as iterator at all. So I consider such a solution as dangerous
and we'll settle with just supplying the necessary bridge
functions as free functions injected for ADL on a case by case base
2015-08-16 01:35:28 +02:00
e40c85fd7b DOK: rename Track -> Fork (III) -- closes #155
Introduce the new term "Fork" at various relevant places
within the documentation. We do not entirely purge the
term "track" though; rather we

- make clear that "Fork" is the entity to build tracks
- use "fork" also synonymous to the "tree of tracks"
2015-05-31 03:46:05 +02:00
8e16149a25 Ticket #155: rename Track -> Fork (II)
actual renaming of types and variables in the entire code base
2015-05-31 02:03:24 +02:00
7c7a07b54f Ticket #155: rename the Track-MObject to "Fork"
In Lumiera, "Tracks" are not what you'd expect from
conventional video editing software. They are a mere
grouping devide, and are also used to implement the
"media bins" and tool palettes.

But having "folders" on the timeline would be likewise
confusing, as would be to have a "branch" or "tree".
To get out of that dilemma, we chose an understandable
but deliberately somewhat strange name: "Fork"

It was common understanding on the Mailinglist that we
should handle this renaming in a tuned-down and discrete
way: The UI will continue to show "Tracks" for a familiar
sight and "Bins" in the Asset section. But Lumiera developers
will be nudged to accomodate by renaming the entity in
source code accordingly
2015-05-30 22:09:26 +02:00
97fec4179b clean-up: remove cockoo hash (unused and unmaintained)
Cockoo hashing is a thrilling algorithm.
We investigated it during the time or our first draft
towards a confirugation system in 2008. This usage turned
up some problems -- not sure if based on the implementation
or the algorithm itself; at that time, we just switched
to the probabilistic splay tree. The whole configuration
system effort stalled afterwards; so the cuckoo implementation
remained in tree as a zombie.
2015-05-30 17:53:09 +02:00
07822182d9 player: planning play proces memory management 2015-05-30 17:52:44 +02:00
dece405801 LANDING: transition to GTK-3
This switches the Lumiera UI from GTK-2 to GTK-3
Unfortunately, this move breaks two crucial features, which have been
disabled for now: the display of video and our custom timeline widget.

Since both of these require some reworking, which in fact has already
started, we prefer to do the library and framework switch right away.
2015-05-30 17:11:41 +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
d964e98601 style-adjustment: GUI namespaces
it is a widely accepted rule to shape names with the usage site in mind.
Especially this means, that we use the singular form for all kinds
of collections and assortments.

Thus, the namespace should be called "widget" not "widgets",
because at usage site this becomes gui::widget::TimelineWidget

Likewise for "dialogs" and "pannels"
2015-05-28 18:47:25 +02:00
4c4a430728 DOC: summarise suitable mechanisms for dependency decoupling
This too was a long-standing issue. While these practices
basically can be considered "common knowledge", experience
showed those topics are frequently unknown even to practised
programmers.

So now we have a single page dealing with all those issues of
code bloat, dependency poliferation, binary dependency resolution
and issues of transitive and circular library dependencies
2015-05-28 03:05:49 +02:00
182f6ac8e5 DOC: upgrade dependencies to reflect the transition to GTK-3
the corresponding requirements are already reflected in the
SCons build, see Platform.py

NOTE: the current debian package is still based on the preview
Release 0.2.pre from last year. It will be upgraded probably after
the transition to Jessie as reference system
2015-05-28 00:24:25 +02:00
e447fa9a0e DOC: workaround when --as-needed linking breaks auto-registration (closes #948)
This piece of documentation describes an insideous special case, which
some time ago prevented us from switching to --as-needed linking.
We treat this as a special case (and it is way easier to do so
now, after the reorganisation of our test suite).

deliberately, I've left #948 open to nudge me about writing this doc
2015-05-27 21:12:55 +02:00
6c7628fdfe DOC: the RPATH and RUNPATH tags and the $ORIGIN token
This is very arkane, hard to find knowledge about some intricacies
of the dynamic library resolution. Very relevant for Lumiera,
since we use a resolution scheme relative to the location
of the executable. Documenting this stuff was a long-standing issue
2015-05-27 18:52:15 +02:00
f17b1c8428 DOC: locating of dependencies and resources at application start-up
a long standing TODO to document the actual start-up sequence, which
is implemented this way since a long time now. There was an unwritten
section in the "Linking and Application Structure", which seems the
apropriate place for this kind of intricate techincal details.

Last week, Benny Lyons was here on visit in munich and he was pondering
the idea of an experimental secondary build system, as a way to learn
more about the source structure of Lumiera. This reminded me to fill
some missing parts of the documentation. Possibly this is also the
right moment to land the GTK-3 transition?
2015-05-27 04:01:09 +02:00
75aa5c970e summarise my thoughts regarding the 'External Tree Description'
seems like a new concept, closely related to the 'systematic metadata' RfC
2015-05-26 16:17:00 +02:00
f9d0d13501 ability to pick up the attribute type from the closure/functor
The actual trick to make it work is to use decltype on the function operator
http://stackoverflow.com/questions/7943525/is-it-possible-to-figure-out-the-parameter-type-and-return-type-of-a-lambda/7943765#7943765

In addition, we now pick up the functor by template type and
store it under that very type. For one, this cuts the size
of the generated class by a factor of two. And it gives the
compiler the ability to inline a closure as much as is possible,
especially when the created Binder / Mutator lives in the same
reference frame the closure taps into.
2015-05-03 05:24:06 +02:00
f45884975b generalise to arbitrary acceptable attribute values
...not yet able to pick up the closure argument type automagically
however, right now we can only hypothesise this might be possible
2015-05-02 02:02:48 +02:00
2ce85a1449 use the attributeID to activate the right closure
...under the assumption that the number of attributes is small,
using just a chained sequence of inlined if-statements
"would be acceptable"
2015-05-02 01:39:58 +02:00
6de24bc7f0 Ticket #956: decide layout and handling of GenNode elements
to carry out that rather obvious step, I was bound to consider
all the implications of choosing a given layout and handling pattern
for our external structure representation.

Finally, I settled upon the following decisions
- the value space represented within the DataCap is flat, not further structured
- the distinction between "attribute" and "nested object" is merely conceptual
  and will be enforced solely by the diff detection / representation protocol
- basically, a nested subtree may appear as an attribute; the difference
  between attributes and children lies solely in the way of access and referral:
  by-name vs. positional
- it is pointless to save space for the representation of the discriminator ID
- but we can omit any further explicit type tag, because
- we do *not* support programming by switch-on-type, and thus
- we do *not* support full introspection, only a passive type-safety check
- this is *not* a limitation, since we acknowledge that GenNode is a *Monad*
- and the partial function needed within any flatMap implementation
  maps naturally onto our Variant-Visitor; thus
- the DataCap can basically just *be* a Variant
- and GenNode has just to supply the neccessary shaffolding
  to turn that into a full fledged Monad implementation, including
  direct construction by wrapping a value and flatMap with tree walk
2015-05-02 01:11:39 +02:00
5d056f032d phase out the (now obsoleted) old Variant and AccessCasted implementation
All relevant uses will rely on the more strict access policy
implemented with the new util::AccessCasted. Along the same line
of thinking, I've removed the "second try" convenience conversion
from the typed get-Function of OpaqueHolder. Such an unbounded
"convert it somehow" approach is almost never a good idea. Either,
one knows by design the precise type to expect, or alternatively
should rely on the base interface solely.

...with the sole exception of the usage in WrapperPointer,
which in itself looks obsolete to me; we should better re-think
the way we handle "wrapped" objects for the BuilderTools, once
we actually start implementing the Builder

Ticket #450
2015-04-28 04:49:08 +02:00
Christoph Varga
f952cad073 Lumiera GUI thoughts -- Mindmap to complement the Interface concept PDF
This mindmap explains some of the ideas and concepts in more detail.
It can be viewed with the "freeplane" mind mapping software.
("freemind" works as well, but will mess up some of the formatting)
2015-04-26 23:22:42 +02:00
Christoph Varga
05e5ab95a3 Lumiera GUI thoughts -- early draft for an interface concept
note by the committer: this mindmap was really work in progress.
Christoph shared it with me while in discussion. I'll place it
here in the git history, since it might be interesting to se
how the thoughts evolved. Isn't that what mindmaps are all about?
2015-04-26 23:22:40 +02:00
250a5519de TICKET 141: now we've full coverage, both for Variant and AccessCasted
Note: the new Variant implementation is a re-write from scratch
and does not rely on util::AccessCasted any more. Anyway, both
are now thoroughly covered by unit test
2015-04-26 05:55:54 +02:00
3dfac48dea verify actual memory locations
- all those casts must refer to the same memory location
- but building a new object needs to create a different address
2015-04-26 05:07:44 +02:00
11c8a8afe9 cover some simple value conversion cases 2015-04-26 04:46:32 +02:00
2aeb18c118 additionally cover mix-in and cross-casting cases 2015-04-26 04:28:32 +02:00
0413d2b8b3 cover all the actual cast and downcast cases 2015-04-26 04:19:18 +02:00
6998e04f87 verify all invalid cases are spotted by the compiler
NOTE: this was a one-time verification. Unfortunately there is no way
to verify a failing compilation automatically from a unit-test.
Thus we need to comment out these invalid cases, leaving them
here just for later referral. Need to check those manually
for new compilers to be sure!
2015-04-26 03:17:41 +02:00
c698d80a80 build in a catch-all to signal failure
this overload will be picked only if none of the more specific
overloads is applicable. Instantiating this overload will then
trigger a static assertion failure. This way we sort out
impossible or dangerous combinations at compile time already.
I found no simple way to include the actual type parameters in
the generated error message (string concatenation at compiletime)

The throw-statement is only there to prevent a warning due
to missing return statement.
2015-04-26 02:35:34 +02:00
Christoph Varga
4e3d113c7d complement note about the author 2015-04-25 22:12:00 +02:00
504ff07fc0 add coverage for the const correctness cases
actually the positive cases only. In another step,
I'll add all those combinations which won't compile.
2015-04-25 19:39:16 +02:00
69bf324a1e extend to dereference pointer and take addresses
...since I consider that a comparatively safe convenience feature.
Of course we *do perform* a NULL check and throw an exception.

So now the actual casting or conversion functions are designed
to work always on the same level of references or pointers,
which means we can just use the standard conversions of the
language. This has the nice effect of ruling out dangerous
combinations (like taking a L-ref from a R-ref) automatically
2015-04-25 19:26:59 +02:00
b9aa8033c7 Ticket #141: rewrite of AccessCasted -- cover the basics
get the param handling straight, including rvalue references.
We do not want to allow any dangerous combinations anymore.
2015-04-25 18:51:49 +02:00
273bd698e1 test helper to show short demangled type names without scope 2015-04-25 01:40:39 +02:00
505903e71e Ticket #141 : move asside the old util::AccessCasted for rework
..existing code still uses the old version; will switch
when the new one is ready
2015-04-24 01:54:54 +02:00
0f37cbdf8f un-burry an unit test draft from 2008 (for lib::AccessCasted)
(extracted from the git history of file try.cpp, May 2008)
basically this is the draft implementation from which
AccessCasted was extracted. I see two problems

- this version prints from within the access functions
- we do not want the automatic static downcast anymore.
  meanwhile, I consider this kind of "do everything for me"
  programming style as dangerous. If unchecked donwcasts
  are desired, then code them up explicitly
2015-04-20 04:11:55 +02:00
de50bf7c91 virtual copy support documented and covered with unit test 2015-04-20 03:41:28 +02:00
67b5df0d1d WIP: start factoring out the virtual copy support 2015-04-20 00:49:49 +02:00
5a4290d4a7 TICKET #738: re-implemented Variant functionality complete - unit test pass 2015-04-19 03:18:24 +02:00
7686122354 implementation complete -- kindof works
there is a problem with the virtual assignment,
seems the default policy was picked.

Beyond that, the rest of the unit test passes
2015-04-19 02:02:54 +02:00
93ced30770 Format-Utils: switch to demangled type names
TODO: might break some unit-tests...

Explanation: our wrapper around boost::format has special
built-in support for custom operator string(). Any type,
which is neiter standard, or printable through such a
custom string conversion, is represented as a type-string.
For this fallback case, we now use our recently added
demangling call (which actually relies on a rather obscure
but standard compiler API)
2015-04-19 01:02:34 +02:00
7a6d352ef5 code up the full virtual copy support policty decision logic
still passes compilation, but not actually tested.
The visitor-style accees needs to be implemented, and the
whole virtual copy support mechanism extracted into a separate
header and covered by unit test
2015-04-18 18:08:48 +02:00
5e95a4e31d adjust to pass compilation
now the solution with the copy policy class is in place,
I prefer to return to the more verbose yet clearer notion
of distinct constructors for each case on the outer and
the inner capsule likewise.

The idea with the separate builder class would be significant
only if this class would also provide the copy support. This
turns out to be difficult, due to the access restrictions
and the necessary passing of type parameters.
2015-04-18 16:53:39 +02:00
40a9df666f WIP: draft towards a solution of the copy policy problem
turns out to be quite a tough challenge....
since obviously we want to support usage of types with
partially disabled copy/assignment operations within Variant.
As long as the corresponding operations on the container aren't
invoked, we expect those types to be usable just fine.

The problem arises at the interaction with type erasure;
to support corret copy / assignement in such a situation, we need
virtual copy / assignment operators. And, since these are to be installed
into a VTable, the templated functions will be instantiated allways,
which might cause invocation of inhibited copy / assignement functions
and thus compilation failure, in spite of never actually invoking such
an illegal operation.

The drafted solution is to mix in a specifically configured copy support policy,
which at least raises a runtime error, instead of invoking the incriminating operation(s)
2015-04-18 02:49:09 +02:00
c32685ada8 WIP: first round of implementation
finally got all those copy / assgnment flavours straight.

Still unsolved: unable to instantiate the Variant template
for a type with private assignment operator (like e.g. Time )
The problem is our virtual assignement operator, which forces
instantiation of the implementation (for the VTable), even if
the actual assignment is never invoked.
2015-04-17 19:33:25 +02:00