diff options
-rw-r--r-- | src/engine/Machine.cpp | 31 | ||||
-rw-r--r-- | src/engine/machina/Machine.hpp | 8 | ||||
-rw-r--r-- | src/engine/machina/Makefile.am | 1 |
3 files changed, 0 insertions, 40 deletions
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 <redlandmm/Model.hpp> #include <redlandmm/World.hpp> #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<Gene> genotype) - : _is_activated(false) - , _is_finished(false) - , _time(0) - , _genotype(genotype) -{ -} - - Machine::~Machine() { } -SharedPtr<Gene> -Machine::genotype() -{ - if (_genotype) - return _genotype; - - _genotype = SharedPtr<Gene>(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<Gene> genotype); ~Machine(); - SharedPtr<Gene> 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<Gene> _genotype; SharedPtr<LearnRequest> _pending_learn; WeakPtr<Raul::MIDISink> _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 \ |