From 147aeb40490194fc6faa6cb863441f699f368f95 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sat, 23 Dec 2017 02:29:19 +0100 Subject: [PATCH] TreeExplorer: draft immediate IterSource adaptor This is just a temporary solution, until IterSource is properly refactored (#1125) After that, IterSource is /basically a state core/ and the adaptor will be more or less trivial --- tests/library/iter-tree-explorer-test.cpp | 60 ++++++++++++++++++++++- wiki/thinkPad.ichthyo.mm | 53 +++++++++++++++----- 2 files changed, 101 insertions(+), 12 deletions(-) diff --git a/tests/library/iter-tree-explorer-test.cpp b/tests/library/iter-tree-explorer-test.cpp index d12cf70d5..f58fffe8c 100644 --- a/tests/library/iter-tree-explorer-test.cpp +++ b/tests/library/iter-tree-explorer-test.cpp @@ -876,8 +876,66 @@ namespace test{ { return new VerySpecivicIter{*wrappedIter() - 1}; } + + uint + currentVal() const + { + return *wrappedIter(); + } }; - UNIMPLEMENTED ("directly wrap and handle IterSource sub-interfaces"); + + + VerySpecivicIter vsit{5}; + +#if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #888 + auto ii = treeExplore(vsit); + + CHECK (not isnil (ii)); + CHECK (5 == *ii); + ++ii; + CHECK (4 == *ii); + CHECK (4 == vsit.currentVal()); + + VerySpecivicIter* clone = new VerySpecivicIter(vsit); + + CHECK (4 == clone->currentVal()); + + cout << materialise( + treeExplore(clone) + + ) < - + @@ -6364,6 +6364,19 @@ + + + + + + + + + + + + + @@ -6736,7 +6749,7 @@ - + @@ -7052,6 +7065,15 @@ + + + + + + + + + @@ -8059,8 +8081,8 @@ - - + + @@ -8068,8 +8090,8 @@ - - + + @@ -8096,13 +8118,22 @@ - + + + + + + + + + + + + + - - - - +