aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine/machina/Node.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-03-25 03:01:32 +0000
committerDavid Robillard <d@drobilla.net>2007-03-25 03:01:32 +0000
commitf9c827a15fda4a0ce2ca3cfdc64ec1448385f149 (patch)
tree2a84884814207da7c5ec8f8d7b6902b8fc979910 /src/engine/machina/Node.hpp
parent2bcf45ee765a733cd5b0a606ed44a7d311eb9783 (diff)
downloadmachina-f9c827a15fda4a0ce2ca3cfdc64ec1448385f149.tar.gz
machina-f9c827a15fda4a0ce2ca3cfdc64ec1448385f149.tar.bz2
machina-f9c827a15fda4a0ce2ca3cfdc64ec1448385f149.zip
Added node properties window.
Improved learning algorithm. git-svn-id: http://svn.drobilla.net/lad/machina@375 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/machina/Node.hpp')
-rw-r--r--src/engine/machina/Node.hpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/engine/machina/Node.hpp b/src/engine/machina/Node.hpp
index 2f9c2e4..5181149 100644
--- a/src/engine/machina/Node.hpp
+++ b/src/engine/machina/Node.hpp
@@ -46,11 +46,11 @@ public:
Node(BeatCount duration=0, bool initial=false);
- void add_enter_action(SharedPtr<Action> action);
- void remove_enter_action(SharedPtr<Action> action);
+ void set_enter_action(SharedPtr<Action> action);
+ void remove_enter_action();
- void add_exit_action(SharedPtr<Action> action);
- void remove_exit_action(SharedPtr<Action> action);
+ void set_exit_action(SharedPtr<Action> action);
+ void remove_exit_action();
SharedPtr<Action> enter_action() { return _enter_action; }
SharedPtr<Action> exit_action() { return _exit_action; }
@@ -67,13 +67,13 @@ public:
bool is_initial() const { return _is_initial; }
void set_initial(bool i) { _is_initial = i; }
bool is_active() const { return _is_active; }
- BeatTime enter_time() const { return _enter_time; }
- BeatTime exit_time() const { return _enter_time + _duration; }
+ BeatTime enter_time() const { assert(_is_active); return _enter_time; }
+ BeatTime exit_time() const { assert(_is_active); return _enter_time + _duration; }
BeatCount duration() { return _duration; }
void set_duration(BeatCount d) { _duration = d; }
typedef Raul::List<SharedPtr<Edge> > Edges;
- const Edges& outgoing_edges() const { return _outgoing_edges; }
+ Edges& outgoing_edges() { return _outgoing_edges; }
private:
bool _is_initial;