Commit graph

1555 commits

Author SHA1 Message Date
24d7f55935 Merge Platform upgrade and Diff-Framework development 2015-08-16 01:42:26 +02:00
9ff79b86cf fix warnings found by CLang (3.5)
Note: not fixing all relevant warnings.

Especially, the "-Woverloaded-virtual" of Clang defeats the whole purpose
of generated generic interfaces. For example, our Variant type is instantiated
with a list of types the variant can hold. Through metaprogramming, this
instantiation generates also an embedded Visitor interface, which has
virtual 'handle(TY)' functions for all the types in question

The client now may implement, or even partially implement this Visitor,
to retrieve specific data out of given Variant instance with unknown conent.
To complain that some other virtual overload is now shaddowed is besides the point,
so we might consider to disable this warning altogether
2015-08-16 01:37:04 +02:00
bfb7bbd2f5 implement Record: operator string() for diagnostics 2015-08-16 01:35:30 +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
5b0d58518e WIP: stub GenNode ref 2015-08-16 01:35:30 +02:00
d14c502ea9 WIP: decision about the builder sequence
after sleeping a night over this, it seems obvios
that we do not want to start the build proces "implicitly",
starting from a Record<GenNode>. Rather, we always want
the user to plant a dedicated Mutator object, which then
can remain noncopyable and is passed by reference through
the whole builder chain. Movin innards of *this object*
are moved away a the end of the chain does not pose much risk.
2015-08-16 01:35:30 +02:00
8e990fc04d WIP: simple implementation / stubbing
especially I've now decided how to handle const-ness:
We're open to all forms of const-ness, the actual usage decides.
const GenNode will only expose a const& to the data values

still TODO is the object builder notation for diff::Record
2015-08-16 01:35:30 +02:00
8c78af2adc bool conversion for record references (see also #477)
I decided to allow for an 'unbound' reference to allow
default construction of elements involving record references.

I am aware of the implications, but I place the focus
on the value nature of GenNode elements; the RecordRef
was introduced only as a means to cary out diff comparisons
and similar computations.
2015-08-16 01:35:30 +02:00
f15266e435 GenNode(#956): define the ctors
implies decision on the ID representation
2015-08-16 01:35:30 +02:00
1082196906 EntryID : fix test definition to account for the changed ID format
The format of the string representation of EntryID was altered
with the switch to our 'generic ID functions' in 1898d9
2015-08-16 01:35:30 +02:00
150fdea7a0 improve spread of the hash function used for EntryID
basically this is the well known problem #587
Just it became more pressing with the Upgrade to Jessie and Boost 1.55
So I've pulled off the well known "Knuth trick" to spread the
input data more evenly within the hash domain.

And voilà: now we're able to use 100000 number suffixes without collision
2015-08-16 01:35:30 +02:00
9b694044eb clean-up: rename variable in Test
formerly 'track' now 'fork'
2015-08-16 01:35:29 +02:00
16cc7e608c EntryID(#865): move into the support library
does no longer depend on the asset subsystem
2015-08-16 01:35:29 +02:00
1c8cddba84 clean-up visibility of lib::P
this was introduced into namespace mobject and spread from there.
Since the habit is to use more specific typedefs like PClip,
it is preferrable to spell out the full namespace
2015-08-16 01:35:29 +02:00
f88236319f relocate EntryID to library namespace 2015-08-16 01:35:29 +02:00
7285c6f4d5 reverse dependency order of Asset::Ident and EntryID 2015-08-16 01:35:29 +02:00
de08a4d3c6 WIP: draft GenNode symbolic object references
these speical reference-flavours of a GenNode are built
to stand-in for a full fledged "object" GenNode.

The purpose is to be able to handle sub-trees of objects
efficiently in comparisions and processing.
2015-08-16 01:35:29 +02:00
248fbef9b4 WIP: draft a DSL for simplified definition of literal records
This is just a draft for now -- kindof a by-catch, since it is
chep to build that DSL on top of the Rec::Mutator.
This DSL could be of value later, when it comes to define
some configuration data inline, in a copact and clear fashion,
without the need to use a bridge to/from JSON
2015-08-16 01:35:29 +02:00
f79f4cd82f WIP: fix -- revert back
I had added this variation just to check compilation and
forgot to revert ist. Of course, we do *not* want to move
the inwards of our Mutator in the test. Rather, we want
to draw a copy from the mutated state
2015-08-16 01:35:29 +02:00
b81419ad63 WIP: decide to implement the record ref as simple referenc wrapper 2015-08-16 01:35:29 +02:00
bee4d11b34 WIP: draft some basic properties of a GenNode
- can build from the supported value types
- is optionally named
- is copyable value, but only assignable within one payload type
- is recursive, for object / tree representation
2015-08-16 01:35:29 +02:00
e664ea552f stub the Record::Mutator implementation
passes compiler again
2015-08-16 01:35:28 +02:00
28c27243c8 WIP: const correctnes: Record is conceived as immutable
...and so should be all the exposed iterators.
Thanks, dear C++ compiler for spotting this subtle mismatch!
2015-08-16 01:35:28 +02:00
96e10faa84 WIP: first round of stubbing for diff::Record 2015-08-16 01:35:28 +02:00
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
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
9384835559 verify and improve another test
...also spotted by new compiler warnings
2015-08-16 01:19:18 +02:00
03e87d4d33 fix several warnings spotted by GCC-4.9.2
as usual, the compiler was right in most cases
Several typedefs are really just leftovers from copy-n-paste
2015-08-16 01:18:58 +02:00
db1ca03220 build the valgrind-suppression similar to the testsuite
the valgrind memcheck got more and more flooded with
"possibly lost" memory blocks allocated by GLib and friends.

Linking the vgsuppression binary in the same way than the
testsuite helps us getting ahead of all that noise

Incidentally, we need to rearrange the build dependency tree
here; previously we made the testsuite depend on vgsuppression,
to ensure the latter gets recompiled prior to running tests;
now vgsuppression itself depends on all the test libraries,
so we rather need to make it direcly a prerequisite target
of running the testsuite (this approach is not precisely
correct in a logical sense, yet helps us to get it
recompiled when needed)
2015-08-16 01:17:39 +02:00
9a89d7b193 Testsuite: change resource limits to work on Debian/Jessie
this is strange; we need to crank up the VSize to 6 GiB
to get the 5 massively multithreaded tests to run.
I checked those tests with valgrind and can not see
any such huge allocation
2015-08-16 01:17:39 +02:00
bd825758e2 test.sh - reorganise how limits are set
attempt to make the code more readable and remove
a spurious second set of embedded defaults
2015-08-16 01:17:39 +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
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
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
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
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