summaryrefslogtreecommitdiffstats
path: root/src/server/events/CreateGraph.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-01-11 04:47:21 +0000
committerDavid Robillard <d@drobilla.net>2013-01-11 04:47:21 +0000
commit10e9a3a800a35916872abf9e354be4c554338e4e (patch)
treed6be3ce7993f5d8efd525629fd321b32a6341633 /src/server/events/CreateGraph.cpp
parent684eaf6b58e41f6758b160b882a6313faf0cff18 (diff)
downloadingen-10e9a3a800a35916872abf9e354be4c554338e4e.tar.gz
ingen-10e9a3a800a35916872abf9e354be4c554338e4e.tar.bz2
ingen-10e9a3a800a35916872abf9e354be4c554338e4e.zip
Use type safe enumerations.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4918 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/events/CreateGraph.cpp')
-rw-r--r--src/server/events/CreateGraph.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/server/events/CreateGraph.cpp b/src/server/events/CreateGraph.cpp
index 23c6ef14..f2131246 100644
--- a/src/server/events/CreateGraph.cpp
+++ b/src/server/events/CreateGraph.cpp
@@ -48,12 +48,12 @@ bool
CreateGraph::pre_process()
{
if (_path.is_root() || _engine.store()->get(_path)) {
- return Event::pre_process_done(EXISTS, _path);
+ return Event::pre_process_done(Status::EXISTS, _path);
}
_parent = dynamic_cast<GraphImpl*>(_engine.store()->get(_path.parent()));
if (!_parent) {
- return Event::pre_process_done(PARENT_NOT_FOUND, _path.parent());
+ return Event::pre_process_done(Status::PARENT_NOT_FOUND, _path.parent());
}
const Ingen::URIs& uris = _engine.world()->uris();
@@ -68,7 +68,7 @@ CreateGraph::pre_process()
}
if (int_poly < 1 || int_poly > 128) {
- return Event::pre_process_done(INVALID_POLY, _path);
+ return Event::pre_process_done(Status::INVALID_POLY, _path);
}
if (int_poly == _parent->internal_poly()) {
@@ -81,7 +81,8 @@ CreateGraph::pre_process()
_graph->properties().insert(_properties.begin(), _properties.end());
_graph->add_property(uris.rdf_type, uris.ingen_Graph);
_graph->add_property(uris.rdf_type,
- Resource::Property(uris.ingen_Block, Resource::EXTERNAL));
+ Resource::Property(uris.ingen_Block,
+ Resource::Graph::EXTERNAL));
_parent->add_block(*_graph);
if (_parent->enabled()) {
@@ -96,7 +97,7 @@ CreateGraph::pre_process()
_update = _graph->properties();
- return Event::pre_process_done(SUCCESS);
+ return Event::pre_process_done(Status::SUCCESS);
}
void
@@ -111,7 +112,7 @@ void
CreateGraph::post_process()
{
Broadcaster::Transfer t(*_engine.broadcaster());
- if (!respond()) {
+ if (respond() == Status::SUCCESS) {
_engine.broadcaster()->put(Node::path_to_uri(_path), _update);
}
}