MutationMessage: limit to treating of gui::model::Tangible
the generic typing to DiffMutatble does not make much sense, since the desired implementation within gui::ctrl::Nexus is bound to work on Tangibles only, since that is what the UI-Bus stores in the routing table
This commit is contained in:
parent
b251b9a022
commit
c8ad698ac4
7 changed files with 29 additions and 16 deletions
|
|
@ -55,7 +55,6 @@
|
|||
//#include "lib/util.hpp"
|
||||
#include "lib/idi/entry-id.hpp"
|
||||
#include "lib/diff/gen-node.hpp"
|
||||
#include "gui/ctrl/mutation-message.hpp"
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <utility>
|
||||
|
|
@ -68,6 +67,8 @@ namespace model {
|
|||
}
|
||||
namespace ctrl{
|
||||
|
||||
class MutationMessage;
|
||||
|
||||
// using lib::HashVal;
|
||||
// using util::isnil;
|
||||
using lib::idi::EntryID;
|
||||
|
|
|
|||
|
|
@ -51,8 +51,8 @@
|
|||
|
||||
#include "lib/error.hpp"
|
||||
#include "lib/opaque-holder.hpp"
|
||||
#include "lib/diff/diff-mutable.hpp"
|
||||
#include "lib/diff/tree-diff-application.hpp"
|
||||
#include "gui/model/tangible.hpp"
|
||||
#include "lib/format-util.hpp"
|
||||
|
||||
#include <utility>
|
||||
|
|
@ -66,16 +66,16 @@ namespace ctrl{
|
|||
|
||||
namespace diff_msg { // implementation details for embedding concrete diff messages
|
||||
|
||||
using lib::diff::DiffMutable;
|
||||
using lib::diff::DiffApplicator;
|
||||
using model::Tangible;
|
||||
using std::move;
|
||||
|
||||
class Holder
|
||||
{
|
||||
public:
|
||||
virtual ~Holder(); ///< this is an interface
|
||||
virtual void applyTo (DiffMutable&) =0;
|
||||
virtual string describe() const =0;
|
||||
virtual void applyTo (Tangible&) =0;
|
||||
virtual string describe() const =0;
|
||||
};
|
||||
|
||||
template<typename DIFF>
|
||||
|
|
@ -85,9 +85,9 @@ namespace ctrl{
|
|||
DIFF diff_;
|
||||
|
||||
virtual void
|
||||
applyTo (DiffMutable& target) override
|
||||
applyTo (Tangible& target) override
|
||||
{
|
||||
DiffApplicator<DiffMutable> applicator(target);
|
||||
DiffApplicator<Tangible> applicator(target);
|
||||
applicator.consume (move(diff_));
|
||||
}
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ namespace ctrl{
|
|||
{ }
|
||||
|
||||
void
|
||||
applyTo (lib::diff::DiffMutable& target)
|
||||
applyTo (model::Tangible& target)
|
||||
{
|
||||
access<diff_msg::Holder>()->applyTo(target);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@
|
|||
//#include "lib/idi/entry-id.hpp"
|
||||
#include "lib/idi/genfunc.hpp"
|
||||
#include "gui/ctrl/bus-term.hpp"
|
||||
#include "gui/ctrl/mutation-message.hpp"
|
||||
#include "gui/model/tangible.hpp"
|
||||
//#include "lib/util.hpp"
|
||||
//#include "gui/model/tangible.hpp"
|
||||
|
|
|
|||
|
|
@ -208,6 +208,7 @@ namespace model {
|
|||
virtual void doFlash() =0;
|
||||
virtual void doMark(GenNode const&) =0;
|
||||
|
||||
public:
|
||||
virtual void buildMutator (lib::diff::TreeMutator::Handle) =0;
|
||||
private:
|
||||
};
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@
|
|||
#include "test/test-nexus.hpp"
|
||||
#include "lib/idi/entry-id.hpp"
|
||||
#include "proc/control/command-def.hpp"
|
||||
#include "gui/ctrl/mutation-message.hpp"
|
||||
#include "lib/iter-adapter-stl.hpp"
|
||||
#include "lib/diff/tree-diff.hpp"
|
||||
#include "lib/time/timevalue.hpp"
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@
|
|||
#include "test/test-nexus.hpp"
|
||||
#include "lib/test/event-log.hpp"
|
||||
#include "gui/ctrl/nexus.hpp"
|
||||
#include "gui/ctrl/mutation-message.hpp"
|
||||
#include "gui/interact/state-recorder.hpp"
|
||||
#include "proc/control/command.hpp"
|
||||
#include "lib/diff/gen-node.hpp"
|
||||
|
|
|
|||
|
|
@ -5585,14 +5585,18 @@
|
|||
<node CREATED="1475342401278" ID="ID_1020722080" MODIFIED="1475342430750" TEXT="macht Diff zugänglich"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1475356047496" ID="ID_667427572" MODIFIED="1475356054163" TEXT="Implementierung">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node CREATED="1475356059342" ID="ID_1039482059" MODIFIED="1475356066062" TEXT="wie wird Diff eingebettet">
|
||||
<node CREATED="1475444207483" ID="ID_920212553" MODIFIED="1475444236127" TEXT="Festlegung: Tangible als Zieltyp">
|
||||
<linktarget COLOR="#9287b2" DESTINATION="ID_920212553" ENDARROW="Default" ENDINCLINATION="398;0;" ID="Arrow_ID_52222580" SOURCE="ID_62520790" STARTARROW="None" STARTINCLINATION="398;0;"/>
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1475356047496" HGAP="29" ID="ID_667427572" MODIFIED="1475444228781" TEXT="Implementierung" VSHIFT="14">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1475356059342" ID="ID_1039482059" MODIFIED="1475444176904" TEXT="wie wird Diff eingebettet">
|
||||
<icon BUILTIN="help"/>
|
||||
</node>
|
||||
<node CREATED="1475439403514" ID="ID_1619035258" MODIFIED="1475439643157" TEXT="Entscheidung">
|
||||
<node CREATED="1475439403514" ID="ID_1619035258" MODIFIED="1475444176904" TEXT="Entscheidung">
|
||||
<icon BUILTIN="yes"/>
|
||||
<node CREATED="1475439416185" ID="ID_963854956" MODIFIED="1475439565484" TEXT="Builder-Funktion nicht sinnvoll">
|
||||
<node CREATED="1475439416185" ID="ID_963854956" MODIFIED="1475444176904" TEXT="Builder-Funktion nicht sinnvoll">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
|
|
@ -5617,7 +5621,7 @@
|
|||
</html>
|
||||
</richcontent>
|
||||
</node>
|
||||
<node CREATED="1475439429055" ID="ID_1383518557" MODIFIED="1475439634154" TEXT="also: embeded Buffer">
|
||||
<node CREATED="1475439429055" ID="ID_1383518557" MODIFIED="1475444176904" TEXT="also: embeded Buffer">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
|
|
@ -5643,10 +5647,14 @@
|
|||
</richcontent>
|
||||
<icon BUILTIN="ksmiletris"/>
|
||||
</node>
|
||||
<node CREATED="1475439436134" ID="ID_583247605" MODIFIED="1475439442228" TEXT="verwende InPlaceBuffer"/>
|
||||
<node CREATED="1475439436134" ID="ID_583247605" MODIFIED="1475444176904" TEXT="verwende InPlaceBuffer"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1475356066853" ID="ID_821643910" MODIFIED="1475356076468" TEXT="Problem: Puffergröße">
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1475356066853" ID="ID_821643910" MODIFIED="1475444176904" TEXT="Problem: Puffergröße">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node CREATED="1475444135180" ID="ID_1434100612" MODIFIED="1475444176904" TEXT="sinnvoll: Spezialfall für Tangible"/>
|
||||
<node CREATED="1475444145458" ID="ID_62520790" MODIFIED="1475444244452" TEXT="kann dann DiffSizeTraits spezialisieren">
|
||||
<arrowlink COLOR="#9287b2" DESTINATION="ID_920212553" ENDARROW="Default" ENDINCLINATION="398;0;" ID="Arrow_ID_52222580" STARTARROW="None" STARTINCLINATION="398;0;"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
|
|
|
|||
Loading…
Reference in a new issue