diff --git a/research/try.cpp b/research/try.cpp index b35d87891..077bd3e1a 100644 --- a/research/try.cpp +++ b/research/try.cpp @@ -47,6 +47,7 @@ typedef unsigned int uint; //#include "lib/diff/gen-node.hpp" #include "lib/time/timevalue.hpp" +#include "proc/control/command-def.hpp" #include "lib/format-cout.hpp" #include "lib/format-util.hpp" @@ -55,6 +56,8 @@ typedef unsigned int uint; #include //using lib::diff::GenNode; +using proc::control::CommandSignature; +using proc::control::CommandDef; using lib::time::Time; using util::stringify; using util::join; @@ -67,27 +70,67 @@ using VecS = vector; template -string +void operate (ARGS const& ...args) + { + VecS strs = stringify (args...); + cout << join (strs); + } + +template +string +capture (ARGS const& ...args) { VecS strs = stringify (args...); return join (strs); } +template +void +undo (ARGS const& ...args) + { + VecS strs = stringify (args...); + cout << "UNDO..." << join (strs); + } + + + + + +#define SHOW_TYPE(_TY_) \ + cout << "typeof( " << STRINGIFY(_TY_) << " )= " << lib::meta::typeStr<_TY_>() <; + + using FunnySIG = lib::meta::_Fun::Sig; + + using SIG_Opr = CommandSignature::OperateSig; + using SIG_Cap = CommandSignature::CaptureSig; + using SIG_Udo = CommandSignature::UndoOp_Sig; + + SHOW_TYPE (SIG_Opr); + SHOW_TYPE (SIG_Cap); + SHOW_TYPE (SIG_Udo); + + function funny; + function capy; + function undy; - function funny; cout << "funny? " << bool(funny) <; + capy = capture; + undy = undo; cout << "funny? " << bool(funny) <