From 8e6c991346fbe7d578b02722fbe7f292c9747187 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 5 Dec 2007 03:34:29 +0000 Subject: Remove misguided gene stuff (Machine is the gene..). git-svn-id: http://svn.drobilla.net/lad/machina@950 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/Machine.cpp | 31 ------------------------------- src/engine/machina/Machine.hpp | 8 -------- src/engine/machina/Makefile.am | 1 - 3 files changed, 40 deletions(-) (limited to 'src') diff --git a/src/engine/Machine.cpp b/src/engine/Machine.cpp index 9bb88a5..2033b5e 100644 --- a/src/engine/Machine.cpp +++ b/src/engine/Machine.cpp @@ -20,7 +20,6 @@ #include #include #include "machina/Edge.hpp" -#include "machina/Gene.hpp" #include "machina/Machine.hpp" #include "machina/MidiAction.hpp" #include "machina/Node.hpp" @@ -39,41 +38,11 @@ Machine::Machine() } -Machine::Machine(SharedPtr genotype) - : _is_activated(false) - , _is_finished(false) - , _time(0) - , _genotype(genotype) -{ -} - - Machine::~Machine() { } -SharedPtr -Machine::genotype() -{ - if (_genotype) - return _genotype; - - _genotype = SharedPtr(new Gene(_nodes.size())); - - size_t node_id = 0; - for (Nodes::iterator n = _nodes.begin(); n != _nodes.end(); ++n, ++node_id) { - size_t edge_id = 0; - for (Node::Edges::iterator e = (*n)->outgoing_edges().begin(); - e != (*n)->outgoing_edges().end(); ++e, ++edge_id) { - (*_genotype.get())[node_id].push_back(edge_id); - } - } - - return _genotype; -} - - /** Set the MIDI sink to be used for executing MIDI actions. * * MIDI actions will silently do nothing unless this call is passed an diff --git a/src/engine/machina/Machine.hpp b/src/engine/machina/Machine.hpp index 76ccef1..626ef10 100644 --- a/src/engine/machina/Machine.hpp +++ b/src/engine/machina/Machine.hpp @@ -29,21 +29,14 @@ namespace Machina { -class Gene; - /** A (Finite State) Machine. - * - * In evolutionary terms, this is the phenotype of Gene. */ class Machine : public Raul::Stateful, public boost::noncopyable { public: Machine(); - Machine(SharedPtr genotype); ~Machine(); - SharedPtr genotype(); - // Main context void activate() { _is_activated = true; } void deactivate() { _is_activated = false; } @@ -86,7 +79,6 @@ private: bool _is_activated; bool _is_finished; Raul::BeatTime _time; - SharedPtr _genotype; SharedPtr _pending_learn; WeakPtr _sink; Nodes _nodes; diff --git a/src/engine/machina/Makefile.am b/src/engine/machina/Makefile.am index e7c5a56..65ea295 100644 --- a/src/engine/machina/Makefile.am +++ b/src/engine/machina/Makefile.am @@ -6,7 +6,6 @@ libmachinainclude_HEADERS = \ Driver.hpp \ Edge.hpp \ Engine.hpp \ - Gene.hpp \ JackDriver.hpp \ LearnRequest.hpp \ Loader.hpp \ -- cgit v1.2.1