Commit graph

5071 commits

Author SHA1 Message Date
ebe74bcb53 UI-Coordinates: add further coverage for various boundary cases 2017-10-01 04:45:19 +02:00
107e9008e5 UI-Coordinates: bugfix to pass unit test thus far
whew!
2017-10-01 03:58:42 +02:00
5dfd135595 Library: remove redundant checks from IterAdapter implementation
Explicitly assuming that those functions are called solely from IterAdapter
and that they are implemented in a typical standard style, we're able to elide
two redundant calls to the checkPoint() function. Since checkPoint typically performs
some non-trivial checks, this has the potential of a significant performance improvement

- we check (and throw ITER_EXHAUST) anyway from operator++, so we know that pos is valid
- the iterate() function ensures checkPoint is invoked right after iterNext,
  and thus the typical standard implementation of iterNext need not do the same
2017-10-01 03:25:33 +02:00
a08fba5880 UI-Coordinates: establish contract 2017-10-01 01:30:53 +02:00
294efb0321 UI-Coordinates: finish iteration control logic 2017-09-30 21:34:55 +02:00
d7dd01ad62 UI-Coordinates: change subscript to expose const& 2017-09-30 20:03:05 +02:00
21e2227d50 UI-Coordinates: simplify copy initialisation
deliberately skip calls to the default ctor, since we're copying anyway
2017-09-30 19:57:13 +02:00
0bef215350 UI-Coordinates: switch internal path array storage to Literal
...since that is what it meant to be.
To allow this chance, I've now added a default ctor to lib::Literal,
defaulting to the Symbol::EMPTY (the interned empty string)
2017-09-30 18:32:08 +02:00
dd45d6110d Library: Literal now default constructible to empty string
The class Literal is used as a thin wrapper to mark the fact that
some string parameter or value is assumed to be given *literally*

For the contract this indicates
- that storage is somewhere
- storage is not owned and managed by Literal
- yet storage guaranteed to exist during the whole lifetime of the program
- Literal can not be altered
- Literal is transparently convertible to const char *


Currently I am in the course of building some path abstraction, and for that
task it makes sense to hold an array of Literals (instead of pointers), just
because it expresses the intent way more clear. I do not see anything in the
above mentioned contract to prohibit a default constructed Literal, with the
empty string being the most obvious choice.

Note: there is the class Symbol, which derives from Literal. Symbol takes
arbitrary strings, but *interns* them into a static symbol table.
2017-09-30 17:45:38 +02:00
1138898989 UI-Coordinates: implement indexed access
...under the assumption that the content is normalised,
which means
- leading NULL is changed to Symbol::EMPTY
- missing elements in the middle are marked as "*"
- trailing NULL in extension storage is handled by adjusting nominal extension size
2017-09-30 02:48:25 +02:00
ab391d3dfa UI-Coordinates: implement size()
...which is the first step towards standard storage handling
2017-09-30 02:17:13 +02:00
9378badf6b UI-Coordinates: integrate the initialisation split
...as developed in during the metaprogramming investigation
2017-09-30 00:46:52 +02:00
a839cac02b UI-Coordinates: memory management for PathArray extension storage 2017-09-29 18:04:28 +02:00
73adcdf2e0 UI-Coordinates: initial draft for PathArray storage
after various fruitless attempts to rely somehow on the array variant of unique_ptr,
I ended up with a hand coded version of an heap allocated array, managed automatically
2017-09-29 15:03:14 +02:00
fcd8882206 Metaprogramming: finish variadic argument picker test 2017-09-29 03:21:47 +02:00
4348cd462c Metaprogramming: extend testcase and remould pickInit to support arbitrary arguments
as it turned out, the solution from yesterday works only with uniform argument lists,
but not with arbitrarily mixed types. Moreover the whole trickery with the
indices was shitty -- better use a predicate decision on template argument level.
This simple solution somehow just didn't occur to me...
2017-09-29 02:35:15 +02:00
636ab6e608 Metaprogramming: integrate the new facilities into the library 2017-09-29 00:51:13 +02:00
7296e60731 Metaprogramming: draft test for the new argument picker (WIP) 2017-09-28 16:28:15 +02:00
b5af8dbb51 Investigation: cleaner solution for default initialisation
Handle corner cases within the front-end functions,
either by static assert or direct branching;
keeps the variadic implementation template clean
2017-09-28 04:51:25 +02:00
dc35a1a6e5 Investigation: add a solution for default initialisation of missing arguments
...still somewhat unsatisfactory, because
- no clear compile error message when invoking pickArg with insufficient arguments
- the default initialisation case in SelectVararg is duplicated and messy
2017-09-28 03:58:09 +02:00
3f9565a156 Investigation: augment index iterator to deal with insufficient arguments
basically we want "all the rest" of the arguments to go to the recursive delegate
2017-09-28 01:40:23 +02:00
3f8606c474 Metaprogramming(#987): extract some variadic sequence helpers
some time ago we abandoned our own tuple type in favour of std::tuple
Since then, the helpers and ported utilities provide some generic helpers
to deal with variadic argument sequences, especially to build index sequences,
which in turn can be used to "pick" individual arguments from a variadic parameter pack.

The expectation is for this part of the support library gradually to grow and
in parts to replace the existing type sequence processing helpers. The expectation
is that we'll retain the basic type sequence, lib::meta::Types, but retrofit it
to rely on variadic arguments
2017-09-28 00:19:52 +02:00
4b67521e26 Metaprogramming(#987): mark planned transition to variadic arguments
since the adoption of C++11, we gradually transition our metaprogramming helpers
to support and rely on variadic template parameters. For the time being,
we just augment existing facilities when it comes in handy, yet some more
heavyweight lifting and overall clean-up remains to be done eventually.
2017-09-28 00:10:45 +02:00
3da370000c Investigation: likely the only way to get it to work
seems to be impossible to get rid of the intermediary argument repackaging delegate call.
As always the reason is that argument packs are no real first class types
2017-09-27 20:07:51 +02:00
5e3088c45b Investigation: need to limit the scope of the quest
there is the danger to get into building a fully generic solution, which is
- quite hard / challenging
- counterfeits the goal of writing easy-to-read code

This is the very reason why I do not want to use boost::MPL,
because in our usage situation, their abstractions are not worth
the price in terms of hard to read code.
2017-09-27 18:39:47 +02:00
3ad3f11f1e Investigation: slightly improved similar solution 2017-09-27 02:46:01 +02:00
23cc0597b5 Investigation: basically working yet convoluted solution draft 2017-09-27 00:26:04 +02:00
97727a6283 Investigation: draft intended call structure
using function calls here, but in the end, what we want is to invoke
some ctor with part of the provided argument sequence
2017-09-26 20:44:27 +02:00
e5dc7ba2bc Investigation: dissect argument packs
start investigation on generic techniques to dissect an variadic argument pack
2017-09-26 19:23:03 +02:00
372512006f UI-Coordinates: use a recursive implementation layout
this is a more or less arbitrary guess regaring performance requirements
2017-09-25 00:26:19 +02:00
5e1c25aaf5 UI-Coordinates: extract PathArray base abstraction into a library class 2017-09-24 22:50:42 +02:00
4082526ec6 UI-Coordinates: stub basic path element iteration 2017-09-24 21:14:26 +02:00
6073dbfcaf UI-Coordinates: stub basic access operations (WIP) 2017-09-24 17:20:47 +02:00
08f70c068c UI-Coordinates: dream up some basic properties (WIP)
ZOMG... who is to code up all this stuff...?
2017-09-24 02:04:23 +02:00
78cbf0f57e UI-Coordinates: define basic design 2017-09-23 17:55:40 +02:00
feb8414016 UI-Coordinates: stub to pass compilation 2017-09-23 02:25:52 +02:00
c1f240687b UI-Coordinates: elaborate and simplify DSL draft (WIP) 2017-09-23 01:21:06 +02:00
ff1b22a889 UI-Coordinates: DSL draft (WIP) 2017-09-15 01:38:11 +02:00
afda9e0a69 UI-coordinates: also need to define a topological addressing scheme (#1106) 2017-09-10 00:32:31 +02:00
fef0a812c1 DockAccess: start implementation draft for the DSL 2017-09-09 23:30:44 +02:00
8a36327604 DockAccess: elaborate design of the DSL 2017-09-09 15:21:40 +02:00
b27681ec4f DockAccess: design a configuration DSL 2017-09-08 18:50:39 +02:00
a9797e4a4f DockAccess: analysis continued...
exploring the idea of a configuration DSL.
As a first step, this could be a simple internal DSL,
implemented as a bunch of static functor objects, which are internally bound
and thus implemented by the ViewLocator within InteractionDirector
2017-09-08 03:53:52 +02:00
eb04552c88 DockAccess: some analysis regarding Configuration/Strategy for access to views
...we have to face the problem that we need some generic strategy
for access to component views, which possibly will become customisable.
And the allowed patterns of access are quite different for the various
kind of view we know....
2017-09-04 01:21:53 +02:00
753c895035 DockAccess: consider a generic ID addessing scheme for the UI (#1005)
...based on a selection of Model types and an access strategy
2017-09-03 01:04:00 +02:00
0ad387f5c9 DockAccess: create a ViewLocator service
responsible for access and allocation of component views.
Internally wired to the PanelLocator within the global WindowLocator

This setup settles those nasty qeustions of crosswise top-level access
2017-09-02 19:28:57 +02:00
4f77075d9c DockAccess: integrate a PanelLocator intermediary
...into the WindowLocator
This is to become a low-level query and acess front-end
and will be implemented just by traversing the windowList_
2017-09-02 19:03:00 +02:00
0614ca36ca DockAccess: consider how to access view components. Rename WindowList (#1104)
this starts work on a new UI global topic (#1004)

- coin a new term: "view component"
- distinction between veiw component and Panel
- consider how to locate view components
- WindowList becomes WindowLocator
2017-09-02 18:36:58 +02:00
5b445a2361 InfoBox: extract into dedicated widget 2017-09-02 00:51:06 +02:00
ee67e4914c InfoBox: scroll to the last inserted line reliably
need to use a text mark; we can simplify this task somewhat
by exploiting the fact that the text cursor is a default defined text mark
2017-09-01 01:02:48 +02:00