aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine/machina
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-12-05 23:45:51 +0000
committerDavid Robillard <d@drobilla.net>2007-12-05 23:45:51 +0000
commita96b70b1c92b7f2622ebeff9d34c92ba089997f1 (patch)
tree732a8c2b225f619394ef5bb3d4a4a27d682409db /src/engine/machina
parentf673a148c7104b3aaee4b1332a3631ac15f5f769 (diff)
downloadmachina-a96b70b1c92b7f2622ebeff9d34c92ba089997f1.tar.gz
machina-a96b70b1c92b7f2622ebeff9d34c92ba089997f1.tar.bz2
machina-a96b70b1c92b7f2622ebeff9d34c92ba089997f1.zip
Working mutation operators.
git-svn-id: http://svn.drobilla.net/lad/machina@952 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/machina')
-rw-r--r--src/engine/machina/MachineMutation.hpp4
-rw-r--r--src/engine/machina/Node.hpp5
2 files changed, 7 insertions, 2 deletions
diff --git a/src/engine/machina/MachineMutation.hpp b/src/engine/machina/MachineMutation.hpp
index 34eda30..0a9731c 100644
--- a/src/engine/machina/MachineMutation.hpp
+++ b/src/engine/machina/MachineMutation.hpp
@@ -26,6 +26,10 @@ namespace Mutation {
struct Mutation { virtual void mutate(Machine& machine) = 0; };
+struct Compress { static void mutate(Machine& machine); };
+struct AddNode { static void mutate(Machine& machine); };
+struct RemoveNode { static void mutate(Machine& machine); };
+struct AdjustNode { static void mutate(Machine& machine); };
struct AddEdge { static void mutate(Machine& machine); };
struct RemoveEdge { static void mutate(Machine& machine); };
struct AdjustEdge { static void mutate(Machine& machine); };
diff --git a/src/engine/machina/Node.hpp b/src/engine/machina/Node.hpp
index a916eb6..5926a50 100644
--- a/src/engine/machina/Node.hpp
+++ b/src/engine/machina/Node.hpp
@@ -56,9 +56,10 @@ public:
void enter(SharedPtr<Raul::MIDISink> driver, BeatTime time);
void exit(SharedPtr<Raul::MIDISink> driver, BeatTime time);
- void add_outgoing_edge(SharedPtr<Edge> edge);
- void remove_outgoing_edge(SharedPtr<Edge> edge);
+ void add_edge(SharedPtr<Edge> edge);
+ void remove_edge(SharedPtr<Edge> edge);
void remove_edges_to(SharedPtr<Node> node);
+ bool connected_to(SharedPtr<Node> node);
void write_state(Redland::Model& model);