From 2914f6685bedd088c14d625ac89e7517aec09563 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Fri, 12 Jun 2009 20:10:27 +0200 Subject: [PATCH] actually create the chain of Definition-Objects --- .../proc/control/command-basic-test.cpp | 34 ++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/tests/components/proc/control/command-basic-test.cpp b/tests/components/proc/control/command-basic-test.cpp index da57f94a0..e5b47de85 100644 --- a/tests/components/proc/control/command-basic-test.cpp +++ b/tests/components/proc/control/command-basic-test.cpp @@ -22,6 +22,7 @@ #include "lib/test/run.hpp" +#include "lib/test/test-helper.hpp" //#include "proc/asset/media.hpp" //#include "proc/mobject/session.hpp" //#include "proc/mobject/session/edl.hpp" @@ -40,7 +41,7 @@ #include //#include -//#include +#include #include using std::tr1::bind; @@ -51,7 +52,8 @@ using std::tr1::function; using lumiera::Time; //using util::contains; using std::string; -//using std::cout; +using std::cout; +using std::endl; namespace lumiera { @@ -256,6 +258,8 @@ namespace typelist{ namespace control { namespace test { + using lib::test::showSizeof; + // using session::test::TestClip; using lumiera::P; @@ -324,15 +328,25 @@ namespace test { template struct UndoDefinition { + typedef typename FunctionSignature< function >::Args BasicArgs; + typedef typename FunctionTypedef::Sig UndoCaptureSig; + + UndoDefinition (function& undoCapOperation) + { + cout << showSizeof(undoCapOperation) << endl; + UNIMPLEMENTED ("re-fetch command definition and augment it with Functor for capturing Undo information"); + } template - UndoDefinition + UndoDefinition& undoOperation (SIG2& how_to_Undo) { typedef typename UndoSignature::UndoOp_Sig UndoSig; function opera3 (how_to_Undo); + UNIMPLEMENTED ("store actual Undo-Functor into the command definition held by the enclosing UndoDefinition instance"); + return *this; } }; @@ -348,14 +362,22 @@ namespace test { template struct BasicDefinition { + BasicDefinition(function& operation) + { + cout << showSizeof(operation) << endl; + UNIMPLEMENTED ("create new command object an store the operation functor"); + } + + template typename BuildUndoDefType >::Type captureUndo (SIG2& how_to_capture_UndoState) { typedef typename UndoSignature::CaptureSig UndoCapSig; + typedef typename BuildUndoDefType >::Type SpecificUndoDefinition; function opera2 (how_to_capture_UndoState); - + return SpecificUndoDefinition (opera2); } }; @@ -370,6 +392,7 @@ namespace test { operation (SIG& operation_to_define) { function opera1 (operation_to_define); + return BasicDefinition(opera1); } }; @@ -378,6 +401,9 @@ namespace test { ///////////////////////////// ///////////////////////////// + + //////////////////////////// start of the actual Test.... + /* bind: opFunc(a,b,c) -> op(void)