aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine/machina
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-12-05 01:41:54 +0000
committerDavid Robillard <d@drobilla.net>2007-12-05 01:41:54 +0000
commitf6aea091cd1263fc5ac93333d60799fcb5791b19 (patch)
tree53561c89f5253bc5bb1fc4ac5e6cdbb8c6e8899c /src/engine/machina
parent2ab01419f334b834710a41fd26a538df3522cf49 (diff)
downloadmachina-f6aea091cd1263fc5ac93333d60799fcb5791b19.tar.gz
machina-f6aea091cd1263fc5ac93333d60799fcb5791b19.tar.bz2
machina-f6aea091cd1263fc5ac93333d60799fcb5791b19.zip
Preliminary evolutionary stuff in machina.
Fix compilation against redlandmm (instead of old Raul RDF stuff). git-svn-id: http://svn.drobilla.net/lad/machina@949 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/machina')
-rw-r--r--src/engine/machina/Loader.hpp4
-rw-r--r--src/engine/machina/Machine.hpp17
-rw-r--r--src/engine/machina/Makefile.am23
3 files changed, 25 insertions, 19 deletions
diff --git a/src/engine/machina/Loader.hpp b/src/engine/machina/Loader.hpp
index 914df24..4a3c123 100644
--- a/src/engine/machina/Loader.hpp
+++ b/src/engine/machina/Loader.hpp
@@ -21,9 +21,9 @@
#include <glibmm/ustring.h>
#include <raul/SharedPtr.hpp>
#include <raul/Path.hpp>
-#include <raul/RDFWorld.hpp>
+#include <redlandmm/World.hpp>
-using Raul::Namespaces;
+using Redland::Namespaces;
namespace Machina {
diff --git a/src/engine/machina/Machine.hpp b/src/engine/machina/Machine.hpp
index c63537d..76ccef1 100644
--- a/src/engine/machina/Machine.hpp
+++ b/src/engine/machina/Machine.hpp
@@ -21,19 +21,28 @@
#include <boost/utility.hpp>
#include <raul/SharedPtr.hpp>
#include <raul/List.hpp>
-#include <raul/RDFModel.hpp>
#include <raul/TimeSlice.hpp>
+#include <redlandmm/Model.hpp>
#include "types.hpp"
#include "LearnRequest.hpp"
#include "Node.hpp"
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; }
@@ -74,13 +83,13 @@ private:
static const size_t MAX_ACTIVE_NODES = 128;
SharedPtr<Node> _active_nodes[MAX_ACTIVE_NODES];
- WeakPtr<Raul::MIDISink> _sink;
bool _is_activated;
bool _is_finished;
Raul::BeatTime _time;
- Nodes _nodes;
-
+ 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 4a97f3e..e7c5a56 100644
--- a/src/engine/machina/Makefile.am
+++ b/src/engine/machina/Makefile.am
@@ -1,22 +1,19 @@
libmachinaincludedir = $(includedir)/machina
libmachinainclude_HEADERS = \
- types.hpp \
Action.hpp \
- Node.hpp \
- Edge.hpp \
- Machine.hpp \
- Loader.hpp \
- MidiAction.hpp \
ActionFactory.hpp \
Driver.hpp \
- LearnRequest.hpp \
+ Edge.hpp \
Engine.hpp \
- Recorder.hpp \
+ Gene.hpp \
+ JackDriver.hpp \
+ LearnRequest.hpp \
+ Loader.hpp \
+ Machine.hpp \
MachineBuilder.hpp \
+ MidiAction.hpp \
+ Node.hpp \
+ Recorder.hpp \
SMFDriver.hpp \
- JackDriver.hpp
-
-if WITH_JACK
- JackDriver.hpp
-endif
+ types.hpp