aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-01-23 02:34:45 +0000
committerDavid Robillard <d@drobilla.net>2007-01-23 02:34:45 +0000
commit4ba23866bc60df1d63f9a18cb61808825e7d3303 (patch)
treec55933f8923a8c57d8fb5f72671464d0b639a057
parentb19a6d45819da3094bdf76545d1b54ae39036313 (diff)
downloadmachina-4ba23866bc60df1d63f9a18cb61808825e7d3303.tar.gz
machina-4ba23866bc60df1d63f9a18cb61808825e7d3303.tar.bz2
machina-4ba23866bc60df1d63f9a18cb61808825e7d3303.zip
Renamed "MetaState" to "Machine".
git-svn-id: http://svn.drobilla.net/lad/machina@268 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/Machine.cpp (renamed from src/MetaState.cpp)10
-rw-r--r--src/Machine.hpp (renamed from src/MetaState.hpp)12
-rw-r--r--src/main.cpp10
3 files changed, 16 insertions, 16 deletions
diff --git a/src/MetaState.cpp b/src/Machine.cpp
index 43ff4b1..91335c7 100644
--- a/src/MetaState.cpp
+++ b/src/Machine.cpp
@@ -15,14 +15,14 @@
*/
#include <algorithm>
-#include "MetaState.hpp"
+#include "Machine.hpp"
#include "Node.hpp"
#include "Edge.hpp"
namespace Machina {
-MetaState::MetaState(size_t poly)
+Machine::Machine(size_t poly)
: _initial_node(new Node())
, _voices(poly, NULL)//_initial_node)
, _time(0)
@@ -33,14 +33,14 @@ MetaState::MetaState(size_t poly)
}
-MetaState::~MetaState()
+Machine::~Machine()
{
delete _initial_node;
}
void
-MetaState::reset()
+Machine::reset()
{
for (std::vector<Node*>::iterator i = _voices.begin();
i != _voices.end(); ++i) {
@@ -50,7 +50,7 @@ MetaState::reset()
void
-MetaState::process(FrameCount nframes)
+Machine::process(FrameCount nframes)
{
const FrameCount cycle_end = _time + nframes;
bool done = false;
diff --git a/src/MetaState.hpp b/src/Machine.hpp
index 08e15a7..aefd041 100644
--- a/src/MetaState.hpp
+++ b/src/Machine.hpp
@@ -14,8 +14,8 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef MACHINA_METASTATE_HPP
-#define MACHINA_METASTATE_HPP
+#ifndef MACHINA_MACHINE_HPP
+#define MACHINA_MACHINE_HPP
#include <vector>
#include "types.hpp"
@@ -25,10 +25,10 @@ namespace Machina {
class Node;
-class MetaState {
+class Machine {
public:
- MetaState(size_t poly);
- ~MetaState();
+ Machine(size_t poly);
+ ~Machine();
Node* initial_node() { return _initial_node; }
@@ -45,4 +45,4 @@ private:
} // namespace Machina
-#endif // MACHINA_METASTATE_HPP
+#endif // MACHINA_MACHINE_HPP
diff --git a/src/main.cpp b/src/main.cpp
index bf3148e..9b4511b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -15,7 +15,7 @@
*/
#include <iostream>
-#include "MetaState.hpp"
+#include "Machine.hpp"
#include "Node.hpp"
#include "Action.hpp"
#include "Edge.hpp"
@@ -42,19 +42,19 @@ Node* create_debug_node(const string& name, FrameCount duration)
int
main()//int argc, char** argv)
{
- MetaState ms(1);
+ Machine m(1);
Node* n1 = create_debug_node("1", 1);
Node* n2 = create_debug_node("2", 10);
- ms.initial_node()->add_outgoing_edge(new Edge(n1));
+ m.initial_node()->add_outgoing_edge(new Edge(n1));
n1->add_outgoing_edge(new Edge(n2));
- n2->add_outgoing_edge(new Edge(ms.initial_node()));
+ n2->add_outgoing_edge(new Edge(m.initial_node()));
Timestamp t = 0;
while (t < 80) {
- ms.process(10);
+ m.process(10);
t += 10;
}