aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/Action.cpp2
-rw-r--r--src/engine/Edge.cpp8
-rw-r--r--src/engine/Machine.cpp6
-rw-r--r--src/engine/MidiAction.cpp4
-rw-r--r--src/engine/Node.cpp6
-rw-r--r--src/engine/Stateful.cpp4
-rw-r--r--src/engine/machina/Stateful.hpp3
7 files changed, 17 insertions, 16 deletions
diff --git a/src/engine/Action.cpp b/src/engine/Action.cpp
index abea09f..bd8cc1c 100644
--- a/src/engine/Action.cpp
+++ b/src/engine/Action.cpp
@@ -26,7 +26,7 @@ Action::write_state(Redland::Model& model)
{
using namespace Raul;
- model.add_statement(id(model.world()),
+ model.add_statement(rdf_id(model.world()),
Redland::Node(model.world(), Redland::Node::RESOURCE, "rdf:type"),
Redland::Node(model.world(), Redland::Node::RESOURCE, "machina:Action"));
}
diff --git a/src/engine/Edge.cpp b/src/engine/Edge.cpp
index d2c628f..1e8e723 100644
--- a/src/engine/Edge.cpp
+++ b/src/engine/Edge.cpp
@@ -30,7 +30,7 @@ Edge::write_state(Redland::Model& model)
{
using namespace Raul;
- const Redland::Node& rdf_id = id(model.world());
+ const Redland::Node& rdf_id = this->rdf_id(model.world());
model.add_statement(
rdf_id,
@@ -43,15 +43,15 @@ Edge::write_state(Redland::Model& model)
if (!tail || !head)
return;
- assert(tail->id(model.world()) && head->id(model.world()));
+ assert(tail->rdf_id(model.world()) && head->rdf_id(model.world()));
model.add_statement(rdf_id,
"machina:tail",
- tail->id(model.world()));
+ tail->rdf_id(model.world()));
model.add_statement(rdf_id,
"machina:head",
- head->id(model.world()));
+ head->rdf_id(model.world()));
model.add_statement(
rdf_id,
diff --git a/src/engine/Machine.cpp b/src/engine/Machine.cpp
index 611ecc5..0c785e7 100644
--- a/src/engine/Machine.cpp
+++ b/src/engine/Machine.cpp
@@ -397,11 +397,11 @@ Machine::write_state(Redland::Model& model)
if ((*n)->is_initial()) {
model.add_statement(model.base_uri(),
Redland::Node(model.world(), Redland::Node::RESOURCE, "machina:initialNode"),
- (*n)->id(model.world()));
+ (*n)->rdf_id(model.world()));
} else {
model.add_statement(model.base_uri(),
Redland::Node(model.world(), Redland::Node::RESOURCE, "machina:node"),
- (*n)->id(model.world()));
+ (*n)->rdf_id(model.world()));
}
}
@@ -416,7 +416,7 @@ Machine::write_state(Redland::Model& model)
model.add_statement(model.base_uri(),
Redland::Node(model.world(), Redland::Node::RESOURCE, "machina:edge"),
- (*e)->id(model.world()));
+ (*e)->rdf_id(model.world()));
}
}
diff --git a/src/engine/MidiAction.cpp b/src/engine/MidiAction.cpp
index bcdf7e2..c4bd84d 100644
--- a/src/engine/MidiAction.cpp
+++ b/src/engine/MidiAction.cpp
@@ -98,12 +98,12 @@ MidiAction::write_state(Redland::Model& model)
Action::write_state(model);
- model.add_statement(id(model.world()),
+ model.add_statement(rdf_id(model.world()),
Redland::Node(model.world(), Redland::Node::RESOURCE, "rdf:type"),
Redland::Node(model.world(), Redland::Node::RESOURCE, "machina:MidiAction"));
// FIXME: Assumes note on/note off
- model.add_statement(id(model.world()),
+ model.add_statement(rdf_id(model.world()),
Redland::Node(model.world(), Redland::Node::RESOURCE, "machina:midiNote"),
AtomRDF::atom_to_node(model, Atom((int)(_event.get()[1]))));
}
diff --git a/src/engine/Node.cpp b/src/engine/Node.cpp
index e4f70d1..40f2c5e 100644
--- a/src/engine/Node.cpp
+++ b/src/engine/Node.cpp
@@ -209,7 +209,7 @@ Node::write_state(Redland::Model& model)
{
using namespace Raul;
- const Redland::Node& rdf_id = id(model.world());
+ const Redland::Node& rdf_id = this->rdf_id(model.world());
if (_is_selector)
model.add_statement(
@@ -232,7 +232,7 @@ Node::write_state(Redland::Model& model)
model.add_statement(rdf_id,
"machina:enterAction",
- _enter_action->id(model.world()));
+ _enter_action->rdf_id(model.world()));
}
if (_exit_action) {
@@ -240,7 +240,7 @@ Node::write_state(Redland::Model& model)
model.add_statement(rdf_id,
"machina:exitAction",
- _exit_action->id(model.world()));
+ _exit_action->rdf_id(model.world()));
}
}
diff --git a/src/engine/Stateful.cpp b/src/engine/Stateful.cpp
index 7ddf1c1..c547258 100644
--- a/src/engine/Stateful.cpp
+++ b/src/engine/Stateful.cpp
@@ -27,8 +27,8 @@ Stateful::Stateful()
}
-Redland::Node
-Stateful::id(Redland::World& world) const
+const Redland::Node&
+Stateful::rdf_id(Redland::World& world) const
{
if (!_rdf_id.is_valid()) {
std::ostringstream ss;
diff --git a/src/engine/machina/Stateful.hpp b/src/engine/machina/Stateful.hpp
index 8dbf23d..9d7bb19 100644
--- a/src/engine/machina/Stateful.hpp
+++ b/src/engine/machina/Stateful.hpp
@@ -33,7 +33,8 @@ public:
virtual void write_state(Redland::Model& model) = 0;
- Redland::Node id(Redland::World& world) const;
+ uint64_t id() const { return _id; }
+ const Redland::Node& rdf_id(Redland::World& world) const;
private:
static uint64_t _next_id;