aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine/ActionFactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/ActionFactory.cpp')
-rw-r--r--src/engine/ActionFactory.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/engine/ActionFactory.cpp b/src/engine/ActionFactory.cpp
index 4ca1a3e..6632b3c 100644
--- a/src/engine/ActionFactory.cpp
+++ b/src/engine/ActionFactory.cpp
@@ -20,6 +20,16 @@
namespace Machina {
+SharedPtr<Action>
+ActionFactory::copy(SharedPtr<Action> copy)
+{
+ SharedPtr<MidiAction> ma = PtrCast<MidiAction>(copy);
+ if (ma)
+ return SharedPtr<Action>(new MidiAction(ma->event_size(), ma->event()));
+ else
+ return SharedPtr<Action>();
+}
+
SharedPtr<Action>
ActionFactory::note_on(unsigned char note)