diff options
author | David Robillard <d@drobilla.net> | 2007-12-06 19:06:54 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-12-06 19:06:54 +0000 |
commit | 33e9991326a1cd90a4956f3221f5a48d03d5af89 (patch) | |
tree | c0367028d619b64e6dfcaf64cf68b158031a5d0d /src/engine/Node.cpp | |
parent | d0dbdee864a3d38e385906cf05c03fe4c264f5d8 (diff) | |
download | machina-33e9991326a1cd90a4956f3221f5a48d03d5af89.tar.gz machina-33e9991326a1cd90a4956f3221f5a48d03d5af89.tar.bz2 machina-33e9991326a1cd90a4956f3221f5a48d03d5af89.zip |
Added missing files.
git-svn-id: http://svn.drobilla.net/lad/machina@956 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/Node.cpp')
-rw-r--r-- | src/engine/Node.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/engine/Node.cpp b/src/engine/Node.cpp index 0eca0e6..f965aff 100644 --- a/src/engine/Node.cpp +++ b/src/engine/Node.cpp @@ -21,6 +21,7 @@ #include <redlandmm/Model.hpp> #include <machina/Node.hpp> #include <machina/Edge.hpp> +#include <machina/ActionFactory.hpp> namespace Machina { @@ -35,6 +36,23 @@ Node::Node(BeatCount duration, bool initial) } +Node::Node(const Node& copy) + : Raul::Stateful() // don't copy RDF ID + , _is_initial(copy._is_initial) + , _is_selector(copy._is_selector) + , _is_active(false) + , _enter_time(0) + , _duration(copy._duration) + , _enter_action(ActionFactory::copy(copy._enter_action)) + , _exit_action(ActionFactory::copy(copy._exit_action)) +{ + for (Edges::const_iterator i = copy._edges.begin(); i != copy._edges.end(); ++i) { + SharedPtr<Edge> edge(new Edge(*i->get())); + _edges.push_back(edge); + } +} + + /** Always returns an edge, unless there are none */ SharedPtr<Edge> Node::random_edge() |