From 30c08ba655330232767554c48bda1975bfb5628c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 11 Aug 2006 03:24:57 +0000 Subject: - Changed IO's vector's to PortList - Added new Port classes, code to drive them - Added PortList, which is a filthy mess ATM (nevermind that, it's the interface that's important at this stage) - Added ChanCount, though it isn't very thoroughly used yet. That's the next step.... - Fixed a few bugs relating to loading sessions saved with trunk - Fixed a few random other bugs Slowly working towards type agnosticism while keeping all the former code/logic intact is the name of the game here Warning: Removing ports is currently (intentionally) broken due solely to laziness. git-svn-id: svn://localhost/ardour2/branches/midi@786 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/session_command.cc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'libs/ardour/session_command.cc') diff --git a/libs/ardour/session_command.cc b/libs/ardour/session_command.cc index 9a43de55de..1b8d6b3718 100644 --- a/libs/ardour/session_command.cc +++ b/libs/ardour/session_command.cc @@ -1,7 +1,29 @@ #include #include +#include +#include namespace ARDOUR { + +Command *Session::memento_command_factory(XMLNode *n) +{ + PBD::ID id; + XMLNode *before, *after; + //void *obj; + + /* get obj_id */ + + /* get before and/or after */ + + /* get an object by id by trial and error, and use it to construct an + * appropriate memento command */ + // e.g. + if (Diskstream *obj = diskstream_by_id(id)) + return new MementoCommand(*obj, *before, *after); + // etc. + return 0; +} + // solo Session::GlobalSoloStateCommand::GlobalSoloStateCommand(Session &sess, void *src) : sess(sess), src(src) -- cgit v1.2.3