diff --git a/research/try.cpp b/research/try.cpp
index 0f26bf401..9cd84e612 100644
--- a/research/try.cpp
+++ b/research/try.cpp
@@ -45,13 +45,11 @@
// 06/19 - use a statefull counting filter in a treeExplorer pipeline
// 03/20 - investigate type deduction bug with PtrDerefIter
// 01/21 - look for ways to detect the presence of an (possibly inherited) getID() function
+// 08/22 - techniques to supply additional feature selectors to a constructor call
/** @file try.cpp
- * Verify a way to detect the presence of a specific implementation function,
- * even when it is just inherited and thus not part of the concrete class definition.
- * The trick is to _emulate the use_ of the object method in question within a `decltype( )`
- * statement, which in turn is used to build the concrete template signature.
+ * Investigate techniques to supply additional descriptive ctor arguments in a type safe way.
*/
typedef unsigned int uint;
@@ -60,90 +58,86 @@ typedef unsigned int uint;
#include "lib/format-cout.hpp"
#include "lib/test/test-helper.hpp"
#include "lib/util.hpp"
-#include "lib/idi/entry-id.hpp"
-#include "lib/meta/duck-detector.hpp"
-#include
+//#include
+#include
#include
using std::string;
-using lib::idi::EntryID;
-using lib::idi::BareEntryID;
-using lib::meta::Yes_t;
-using lib::meta::No_t;
-
-
#define SHOW_TYPE(_TY_) \
cout << "typeof( " << STRINGIFY(_TY_) << " )= " << lib::meta::typeStr<_TY_>() <
- class Can_retrieve_and_compare_ID
- {
- template() == std::declval().getID())>
- struct Probe
- { }; \
- \
- template \
- static Yes_t check(Probe * ); \
- template \
- static No_t check(...); \
- \
- public: \
- static const bool value = (sizeof(Yes_t)==sizeof(check(0))); \
- };
-
-
-class Base
+class Feat
{
- EntryID idi;
- public:
- BareEntryID const&
- getID() const
+ string prop_{"∅"};
+
+ using Manipulator = std::function;
+
+ struct Qualifier
+ : Manipulator
{
- return idi;
+ using Manipulator::Manipulator;
+ };
+
+ friend Qualifier bla();
+ friend Qualifier blubb(string);
+
+ public:
+ operator string () const
+ {
+ return "Feat{"+prop_+"}";
}
+
+ Feat() = default;
+
+ template
+ Feat(Qualifier qual, QS... qs)
+ : Feat{qual(Feat{qs...})}
+ { }
};
-class Derived
- : public Base
- { };
+Feat::Qualifier
+bla()
+{
+ return Feat::Qualifier{[](Feat feat)
+ {
+ feat.prop_ = "bla";
+ return feat;
+ }};
+}
-class Derailed
- { };
+Feat::Qualifier
+blubb(string murks)
+{
+ return Feat::Qualifier{[=](Feat feat)
+ {
+ feat.prop_ += ".blubb("+murks+")";
+ return feat;
+ }};
+}
int
main (int, char**)
{
- Base b1;
- Derived d1;
- Derailed r1;
- SHOW_EXPR( b1 );
- SHOW_EXPR( b1.getID() );
- SHOW_EXPR( HasFunSig_getID::value );
- SHOW_EXPR( HasArglessFun_getID::value );
- SHOW_EXPR( Can_retrieve_and_compare_ID::value );
+ Feat f0;
+ SHOW_EXPR(f0);
- SHOW_EXPR( d1 );
- SHOW_EXPR( d1.getID() );
- SHOW_EXPR( HasFunSig_getID::value );
- SHOW_EXPR( HasArglessFun_getID::value );
- SHOW_EXPR( Can_retrieve_and_compare_ID::value );
+ Feat f1(bla());
+ SHOW_EXPR(f1);
- SHOW_EXPR( r1 );
- SHOW_EXPR( HasFunSig_getID::value );
- SHOW_EXPR( HasArglessFun_getID::value );
- SHOW_EXPR( Can_retrieve_and_compare_ID::value );
+ Feat f2(blubb("Ψ"));
+ SHOW_EXPR(f2);
-// SHOW_TYPE( decltype( d1.getID() ))
+ Feat f3(bla(),blubb("↯")); // Note: evaluated from right to left, bla() overwrites prop
+ SHOW_EXPR(f3);
+
+ Feat f4(blubb("💡"), bla());
+ SHOW_EXPR(f4);
cout << "\n.gulp.\n";
return 0;
diff --git a/src/stage/model/canvas-hook.hpp b/src/stage/model/canvas-hook.hpp
index 57d6c9350..2b7abf909 100644
--- a/src/stage/model/canvas-hook.hpp
+++ b/src/stage/model/canvas-hook.hpp
@@ -59,7 +59,7 @@
#include
-namespace stage {
+namespace stage {
namespace model {
using lib::time::Time;
diff --git a/src/stage/timeline/clip-widget.hpp b/src/stage/timeline/clip-widget.hpp
index aea2ced99..c43a278f9 100644
--- a/src/stage/timeline/clip-widget.hpp
+++ b/src/stage/timeline/clip-widget.hpp
@@ -95,13 +95,13 @@
**
** ## Structure of the clip representation
** Obviously, managing all these wildly different appearance styles incurs a lot of complexity,
- ** which needs to be decomposed to become manageable. Thus, we introduce several responsibilities
+ ** which needs to be decomposed to keep it manageable. Thus, we introduce several responsibilities
** - the ClipPresenter is what formally corresponds to the session::Clip, i.e. in a birds
** eyes view, it "is" the clip. However, in fact the ClipPresenter only manages the
** desired properties and delegates the actual realisation to "some widget"
** - and this "widget" is in fact a "PImpl", the ClipDelegate, which foremost exposes an interface
- ** to adapt and control the appearance style, while the actual clip widget is only accessible
- ** through the ClipDelegate interface
+ ** to adapt and control the appearance style, while the actual clip widget remains a private detail
+ ** and is only accessible through the ClipDelegate interface
** - behind the scenes, [within the implementation](\ref clip-widget.cpp), several implementation
** subclasses are available, to be installed and exchanged to accommodate the desired appearance
** style. These are managed semi-automatically and hooked into the appropriate display framework
diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm
index 3a51988ed..5f1c9ebfb 100644
--- a/wiki/thinkPad.ichthyo.mm
+++ b/wiki/thinkPad.ichthyo.mm
@@ -17880,7 +17880,11 @@
-
+
+
+
+
+
@@ -17926,10 +17930,11 @@
d.h. das Text-Label bekommt ggfs. eine Längenbeschränkung.
- Und sonst wird er Körper/Hintergrund ausgedehnt
+ Und sonst wird der Körper/Hintergrund ausgedehnt