aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/engine/Controller.cpp2
-rw-r--r--src/engine/Edge.cpp2
-rw-r--r--src/engine/Node.cpp2
-rw-r--r--src/gui/EdgeView.cpp6
-rw-r--r--src/gui/MachinaCanvas.cpp12
-rw-r--r--src/gui/NodePropertiesWindow.cpp2
-rw-r--r--src/gui/NodeView.cpp12
7 files changed, 19 insertions, 19 deletions
diff --git a/src/engine/Controller.cpp b/src/engine/Controller.cpp
index 00ad9f9..c400043 100644
--- a/src/engine/Controller.cpp
+++ b/src/engine/Controller.cpp
@@ -41,7 +41,7 @@ Controller::create(const client::ClientObject& properties)
{
TimeDuration dur(
_engine->machine()->time().unit(),
- properties.get(URIs::instance().machina_duration).get_float());
+ properties.get(URIs::instance().machina_duration).get<float>());
SPtr<Node> node(new Node(dur));
SPtr<client::ClientObject> obj(
new client::ClientObject(properties, node->id()));
diff --git a/src/engine/Edge.cpp b/src/engine/Edge.cpp
index cc76e61..d1f8240 100644
--- a/src/engine/Edge.cpp
+++ b/src/engine/Edge.cpp
@@ -28,7 +28,7 @@ void
Edge::set(URIInt key, const Raul::Atom& value)
{
if (key == URIs::instance().machina_probability) {
- _probability.set(value.get_float());
+ _probability.set(value.get<float>());
}
}
diff --git a/src/engine/Node.cpp b/src/engine/Node.cpp
index cf326a1..06317ef 100644
--- a/src/engine/Node.cpp
+++ b/src/engine/Node.cpp
@@ -227,7 +227,7 @@ Node::set(URIInt key, const Raul::Atom& value)
if (key == URIs::instance().machina_initial) {
std::cerr << "error: Attempt to change node initial state" << std::endl;
} else if (key == URIs::instance().machina_selector) {
- set_selector(value.get_bool());
+ set_selector(value.get<int32_t>());
}
}
diff --git a/src/gui/EdgeView.cpp b/src/gui/EdgeView.cpp
index 2cf84a6..a332859 100644
--- a/src/gui/EdgeView.cpp
+++ b/src/gui/EdgeView.cpp
@@ -87,14 +87,14 @@ EdgeView::~EdgeView()
float
EdgeView::probability() const
{
- return _edge->get(URIs::instance().machina_probability).get_float();
+ return _edge->get(URIs::instance().machina_probability).get<float>();
}
double
EdgeView::length_hint() const
{
NodeView* tail = dynamic_cast<NodeView*>(get_tail());
- return tail->node()->get(URIs::instance().machina_duration).get_float()
+ return tail->node()->get(URIs::instance().machina_duration).get<float>()
* 10.0;
}
@@ -134,7 +134,7 @@ void
EdgeView::on_property(machina::URIInt key, const Raul::Atom& value)
{
if (key == URIs::instance().machina_probability) {
- set_color(edge_color(value.get_float()));
+ set_color(edge_color(value.get<float>()));
}
}
diff --git a/src/gui/MachinaCanvas.cpp b/src/gui/MachinaCanvas.cpp
index 243930f..2c5e8a0 100644
--- a/src/gui/MachinaCanvas.cpp
+++ b/src/gui/MachinaCanvas.cpp
@@ -119,8 +119,8 @@ MachinaCanvas::on_new_object(SPtr<client::ClientObject> object)
float x, y;
if (node_x.type() == _app->forge().Float &&
node_y.type() == _app->forge().Float) {
- x = node_x.get_float();
- y = node_y.get_float();
+ x = node_x.get<float>();
+ y = node_y.get<float>();
} else {
int scroll_x, scroll_y;
get_scroll_offsets(scroll_x, scroll_y);
@@ -141,15 +141,15 @@ MachinaCanvas::on_new_object(SPtr<client::ClientObject> object)
} else if (type.get<URIInt>() == uris.machina_Edge) {
SPtr<machina::client::ClientObject> tail = _app->client_model()->find(
- object->get(uris.machina_tail_id).get_int32());
+ object->get(uris.machina_tail_id).get<int32_t>());
SPtr<machina::client::ClientObject> head = _app->client_model()->find(
- object->get(uris.machina_head_id).get_int32());
+ object->get(uris.machina_head_id).get<int32_t>());
if (!tail || !head) {
std::cerr << "Invalid arc "
- << object->get(uris.machina_tail_id).get_int32()
+ << object->get(uris.machina_tail_id).get<int32_t>()
<< " => "
- << object->get(uris.machina_head_id).get_int32()
+ << object->get(uris.machina_head_id).get<int32_t>()
<< std::endl;
return;
}
diff --git a/src/gui/NodePropertiesWindow.cpp b/src/gui/NodePropertiesWindow.cpp
index 6a5f0fc..f22eb57 100644
--- a/src/gui/NodePropertiesWindow.cpp
+++ b/src/gui/NodePropertiesWindow.cpp
@@ -110,7 +110,7 @@ NodePropertiesWindow::set_node(MachinaGUI* gui,
}
#endif
_duration_spinbutton->set_value(
- node->get(URIs::instance().machina_duration).get_float());
+ node->get(URIs::instance().machina_duration).get<float>());
}
void
diff --git a/src/gui/NodeView.cpp b/src/gui/NodeView.cpp
index e4e4faa..09ec6a8 100644
--- a/src/gui/NodeView.cpp
+++ b/src/gui/NodeView.cpp
@@ -77,7 +77,7 @@ bool
NodeView::is(Raul::Forge& forge, machina::URIInt key)
{
const Raul::Atom& value = _node->get(key);
- return value.type() == forge.Bool && value.get_bool();
+ return value.type() == forge.Bool && value.get<int32_t>();
}
bool
@@ -135,7 +135,7 @@ NodeView::show_label(bool show)
URIs::instance().machina_note_number);
if (note_number.is_valid()) {
uint8_t buf[8];
- midi_note_name(note_number.get_int32(), buf);
+ midi_note_name(note_number.get<int32_t>(), buf);
set_label((const char*)buf);
return;
}
@@ -151,15 +151,15 @@ NodeView::on_property(machina::URIInt key, const Raul::Atom& value)
static const uint32_t active_border_color = 0x00FF00FF;
if (key == URIs::instance().machina_selector) {
- if (value.get_bool()) {
+ if (value.get<int32_t>()) {
set_dash_length(4.0);
} else {
set_dash_length(0.0);
}
} else if (key == URIs::instance().machina_initial) {
- set_border_width(value.get_bool() ? 4.0 : 1.0);
+ set_border_width(value.get<int32_t>() ? 4.0 : 1.0);
} else if (key == URIs::instance().machina_active) {
- if (value.get_bool()) {
+ if (value.get<int32_t>()) {
if (get_fill_color() != active_color) {
set_fill_color(active_color);
set_border_color(active_border_color);
@@ -168,7 +168,7 @@ NodeView::on_property(machina::URIInt key, const Raul::Atom& value)
set_default_colors();
}
} else if (key == URIs::instance().machina_enter_action) {
- const uint64_t action_id = value.get_int32();
+ const uint64_t action_id = value.get<int32_t>();
MachinaCanvas* canvas = dynamic_cast<MachinaCanvas*>(this->canvas());
_enter_action_connection.disconnect();
_enter_action = canvas->app()->client_model()->find(action_id);