Commit graph

1173 commits

Author SHA1 Message Date
ec8d0557e8 ChainSearch: draft interface and possible implementation approach
The intention is to augment the iterator based (linear) search
used in EventLog to allow for real backtracking, based on a evaluation tree.
This should be rather staight forward to implement, relying on the
exploreChildren() functionality of TreeExplorer. The trick is to package
the chained search step as a monadic flatMap operation
2018-09-14 21:06:14 +02:00
9d7ce1e6a4 EventLog: now able to use the CursorGear immediately as state core
...since TreeExplorer automatically does the iterator wrapping for us.
As added benefit, we have now a direct API to control the search direction
2018-09-14 21:06:14 +02:00
75e1eab4bb EventLog: drop-in the new TreeExplorer::mutableFilter
while this is basically a drop-in replacement,
it marks the switch to the monadic evaluation technology,
which is prerequisite for building real backtracking into the search.
2018-09-14 21:06:14 +02:00
b3f328f28d EventLog: consolidate existing calls to configure the search
create a narrow configuration API for the underlying search mechanism.
Simplifies the task of turning that search into a real backtracking evaluation.
2018-09-14 21:06:14 +02:00
604ffbf73c TreeExplorer: fix a bug and finish the feature
we did an unnecessary copy of the argument, which was uncovered
by the test case manipulating the state core.


Whew.
Now we have a beautiful new overengineered solution
2018-09-14 21:06:14 +02:00
be7f47d5b7 TreeExplorer: rework the solution to allow for arbitrary functor types
outift the Filter base class with the most generic form of the Functor
wrapper, and rather wrap each functor argument individually. This allows
then to combine various kinds of functors
2018-09-14 21:06:14 +02:00
90c0f43cfd TreeExplorer: code all the combination cases
...this solution works, but has a shortcoming:
the type of the passed lambdas is effectively pinned to conform
with the signature of the first lambda used initially when building the filter.

Well, this is the standard use case, but it kind of turns all the
tricky warpping and re-binding into a nonsense excercise; in this form
the filter can only be used in the monadic case (value -> bool).

Especially this rules out all the advanced usages, where the filter
collaborates with the internals of the source.
2018-09-14 21:06:14 +02:00
e29d9ae19e TreeExplorer: better package this very specific code as subclass
while this is basically just code code cosmetics,
at least it marks this as a very distinct special case,
and keeps the API for the standard Filter layer clean.
2018-09-14 21:06:14 +02:00
8f70b4e902 TreeExplorer: prototype for the extracted boilerplate helper
a quite convoluted construct built from several nested generic lambdas.
When investigated in the debugger, the observed addresses and the
invoked code looks sane and as expected.
2018-09-14 21:06:14 +02:00
b4edf8e33c TreeExplorer: find a way to extract the boilerplate
...based on generic lambdas, which are effectively template classes themselves
2018-09-14 21:06:14 +02:00
94da0f627f TreeExplorer: draft ability to remould the filter
The intention is to switch from the itertools-based filter
to the filter available in the TreeExplorer framework.
Thus "basically" we just need to copy the solution over,
since both are conceptually equivalent.

However...... :-(
The TreeExplorer framework is designed to be way more generic
and accepts basically everything as argument and tries to adapt apropriately.

This means we have to use a lot of intricate boilerplate code,
just to get the same effect that was possible in Itertools with
a simple and elegant in-place lambda assignment
2018-09-14 21:06:14 +02:00
757258fb3a TreeExplorer: fix bug in Filter layer
Fillter needs to be re-evaluated, when an downstream entity requests
expandChildren() onto an upstream source. And obviously the ordering
of the chained calls was wrong here.

As it turns out, I had discovered that necessity to re-evaluate with
the Transformer layer. There is a dedicated test case for that, but
I cut short on verifying the filter in that situation as well, so
that piece of broken copy-n-paste code went through undetected.

This is in fact a rather esoteric corner case, because it is only
triggered when the expandChildren() call is passed through the filter.
When otoh the filter sits /after/ the entity generating the expandChildren()
calls, everything works as intended. And the latter is the typical standard
usage situation of an recursive evalutation algorithm: the filter is here
used as final part to drive the evaluation ahead and pick the solutions.
2018-09-14 21:06:14 +02:00
3fc5a94b87 TreeExplorer: investigate the backtracking abilities
There is a bug or shortcoming in the existing ErrorLog matcher implementation.
It is not really difficult to fix, however doing so would require us to intersperse
yet another helper facility into the log matcher. And it occurred to me, that
this helper would effectively re-implement the stack based backtracking ability,
which is already present in TreeExplorer (and was created precisely to support
this kind of recursive evaluation strategies).

Thus I intend to switch the implementation of the EventLog matcher from the
old IterTool framework to the newer TreeExplorer framework. And this intention
made me re-read the code, fixing several comments and re-thinking the design
2018-09-14 21:06:14 +02:00
2520ee82d1 EventLog: investigate failed match in EventLog
seemingly my quick-n-dirty implementation was to naiive.
We need real backtracking, if we want to support switches
in the search direction (match("y").after("x").before("z")

Up to now, I have cheated myself around this obvious problem :-/
2018-09-14 21:06:13 +02:00
026049a13c UiElement: likewise integrate the Revealer functor (#1162) 2018-09-14 21:06:13 +02:00
41e0496576 NotificationDisplay: now able to build the expand functionality
...by delegating to an Expander placed into the ErrorLogDisplay widget
2018-09-14 21:06:13 +02:00
3f327b335a UiElement: switch MockElement to rely on the new functor based default impl
...which is implicit verified through AbstractTangible_test::markState()
2018-09-14 21:06:13 +02:00
51a7670425 UiElement: integrate a default implementation based on the Expander functor 2018-09-14 21:06:13 +02:00
04424fb8df UiElement: code and document the functor components 2018-09-14 21:06:13 +02:00
551920e952 UiElement: decide upon the design variant to use for expand() / reveal() (#1162) 2018-09-14 21:06:13 +02:00
17bcdd952a UiElement: design of helper abstractions (#1162)
to strive at a generic implementation for
- expanding/collapsing a widget
- revealing a widget

which obviously somehow involes storing a closure
2018-09-14 21:06:13 +02:00
837c6d11ff NotificationDisplay: solve the problem with space allocation
as it turns out, we need to set the property_expand() on the child widget
within Gtk::Expander explicitly, to cause the child to grab and additional
available screen space (which obviously is what we want in case of a
log display with scrollbars)
2018-09-14 21:06:13 +02:00
bc3eb7f8da NotificationDisplay: experiment to build a collapsed display
basically Gtk::Expander will do the trick.
However, resizing of the enclosing panel is not handled properly,
the log does not expand to take up the available space, as it did
automaticall when just added directly into the frame
2018-09-14 21:06:13 +02:00
a0b80d8a46 NotificationDisplay: preliminary plans regarding information display in the UI
...while traveling with the train over the Schwäbische Alb to Karlsruhe;
on my way to FrOSCon 2018
2018-09-14 21:06:13 +02:00
65bbc45e02 NotificationDisplay: care for lifecycle issues and expansion state persistence 2018-09-14 21:06:13 +02:00
7846460530 NotificationDisplay: code up controller protocol in NotificationHub
...mostly by delegating to (stubbed) functions in ErrorLogDisplay
2018-09-14 21:06:13 +02:00
a151f28d86 NotificationDisplay: solved that nasty topic of dock access for now
phew...
2018-09-14 21:06:13 +02:00
67ac8601d8 DockAccess: implement preliminary simplistic lookup and allocation 2018-09-14 21:06:13 +02:00
76e79c02ee NotificationDisplay: view allocation can be pushed into the access functor
no need to define a private function on Wizard anymore, it just forwards the call
to the service actually implementing the view allocation. For now this is the
PanelLocator (and eventually this will be the ViewLocator / ViewSpecDSL)
2018-09-14 21:06:13 +02:00
855944eff3 NotificationDisplay: turn the error log into an optional display 2018-09-14 21:06:13 +02:00
dcde80c4cd DockAccess: wire the new service through the Wizard 2018-09-14 21:06:13 +02:00
8755153d95 DockAccess: consider a preliminary lookup implementation within PanelLocator
PanelLocator is a sub component of the WindowLocator (top-level GUI service).
Eventually this shall become a mere widget/component access service, with the
actual lookup and allocation logic layered on top through ViewLocator, configurable
via ViewSpec-DSL.

We can not implement the full scheme right now, since we're lacking knowledge
about internals of a typical Lumiera UI widget
2018-09-14 21:06:13 +02:00
c0dca2d978 DockAccess: add lookup-by-Type function to PanelManager
...now the mess multiplies
2018-09-14 21:06:12 +02:00
987aad44c1 DockAccess: add ability to retrieve a panel via PanelManager (#1144)
This is only a premature hack, since the whole structure of PanelManager is somewhat broken.
Moreover, the ViewLocator is not really ready for use yet, so this hack at least
allows us to "reach into" a top-level window and "grab" the pannel we need.
2018-09-14 21:06:12 +02:00
e7e09a642b NotificateDisplay: delegate view allocation through a functor 2018-09-14 21:06:12 +02:00
42cbc9219f NotificateDisplay: link to a widget for error log display
The ErrorLogWidget is allocated and placed elsewhere
and not owned by the NotificationHub controller.
2018-09-14 21:06:12 +02:00
a74dc596ce WLink: finished incl. exception handling guarantees and documentation 2018-09-14 21:06:12 +02:00
ae26012bf5 WLink: implement copy operations
swap-based implementation
not sure if attachTo() should be noexcept
2018-09-14 21:06:12 +02:00
c47e3d0210 WLink: draft basic behaviour 2018-09-14 21:06:12 +02:00
e829a74edf NotificationDisplay: draft idea of managed link-to-widget
a smart-reference based on sigc::trackable
2018-09-14 21:06:12 +02:00
36abe4567e NotificationDisplay: define the actual controller behaviour to be implemented
this is specification work; for now the stubs are marked UNIMPLEMENTED
2018-09-14 21:06:12 +02:00
c2c25f8134 NotificationDisplay: define and include the unique error-Log ID 2018-09-14 21:06:12 +02:00
53c47a6fcc Assets: verify creation of ErrorLog meta-Asset 2018-09-14 21:06:12 +02:00
928b4372e0 Assets: investigating the unclear distinction between asset::Struct and asset::Meta (#1156)
including a kind-of Bugfix: the ctor of TimeGrid erroneously categorised it as asset::Kind STRUCT
2018-09-14 21:06:12 +02:00
1d69bb9050 NotificationDisplay: define a new ErrorLog asset
...for now to serve as placeholder type, used as anchor for the corresponding UI display widget
2018-09-14 21:06:12 +02:00
5475839a49 NotificationDisplay: the question where to define the entity-ID 2018-09-14 21:06:12 +02:00
12244afc90 NotificationDisplay: fill in some default implementation for the controller 2018-09-14 21:06:12 +02:00
0c8151cb2f NotificationDisplay: decide upon the architecture for handling notification messages (#1102)
* have a dedicated "information hub" controller, which acts a receiver of "error log messages" on the UI-Bus
 * let that controller in turn allocate an apropriate view on demand
2018-09-14 21:06:12 +02:00
06b3c382f3 DemoGuiRoundtrip: expand on that idea (#1099) and start analysis how to create that UI component
The goal is to build a (in itself completely meaningless) ping-pong interaction
between the UI and Proc-Layer, for the purpose of driving the integration ahead.

The immediate challenge is how to create and place an apropriate "GuiComponentView",
i.e. a Tangible, which is connected to the UI-Bus with an predictable EntryID.
And the problem is to get that settled right now, without building the envisioned
generic framework for View allocation in the UI. When this is achieved,
it should be a rather small step to actually send those notifications over
the UI-Bus, which is basically implemented and ready by now.
2018-09-14 21:06:12 +02:00
3a100972d7 UI-Lifecycle: send up a dummy notification message to indicate start of content population
right now this will just end up in the log, since not even the
notification display is implemented beyond the GuiNotification-facade.

Anyway, we get some kind of communication now for real, in the actual application
2018-08-04 19:07:21 +02:00