diff options
author | David Robillard <d@drobilla.net> | 2007-02-05 06:23:05 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-02-05 06:23:05 +0000 |
commit | 4c8aad127d9504c7d355975180f877f5baa9f744 (patch) | |
tree | bdb70b9a849a290f32c9bbb45947da4b796dcd97 /src/Node.cpp | |
parent | 60647fedf17cdebfcf45c76d8fa9cee120006921 (diff) | |
download | machina-4c8aad127d9504c7d355975180f877f5baa9f744.tar.gz machina-4c8aad127d9504c7d355975180f877f5baa9f744.tar.bz2 machina-4c8aad127d9504c7d355975180f877f5baa9f744.zip |
It's aliiiiivee!
git-svn-id: http://svn.drobilla.net/lad/machina@278 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/Node.cpp')
-rw-r--r-- | src/Node.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/Node.cpp b/src/Node.cpp index 841b728..2e45d51 100644 --- a/src/Node.cpp +++ b/src/Node.cpp @@ -21,9 +21,10 @@ namespace Machina { -Node::Node(FrameCount duration) - : _is_active(false) - , _start_time(0) +Node::Node(FrameCount duration, bool initial) + : _is_initial(initial) + , _is_active(false) + , _enter_time(0) , _duration(duration) , _enter_action(NULL) , _exit_action(NULL) @@ -66,7 +67,7 @@ void Node::enter(Timestamp time) { _is_active = true; - _start_time = time; + _enter_time = time; if (_enter_action) _enter_action->execute(time); } @@ -78,20 +79,21 @@ Node::exit(Timestamp time) if (_exit_action) _exit_action->execute(time); _is_active = false; - _start_time = 0; + _enter_time = 0; } void -Node::add_outgoing_edge(Edge* edge) +Node::add_outgoing_edge(SharedPtr<Edge> edge) { - edge->set_src(this); + assert(edge->src().lock().get() == this); + _outgoing_edges.push_back(edge); } void -Node::remove_outgoing_edge(Edge* edge) +Node::remove_outgoing_edge(SharedPtr<Edge> edge) { _outgoing_edges.remove(edge); } |