summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-02-24 09:20:22 +0000
committerDavid Robillard <d@drobilla.net>2015-02-24 09:20:22 +0000
commit9d7c1e971d51561c4bb28fa1064503e5f266908f (patch)
treee34b0f84c05020fea44fd7b8cfd55341aff50668 /src/gui
parentf408b385c2795359cfacb09032089c8387b74f45 (diff)
downloadingen-9d7c1e971d51561c4bb28fa1064503e5f266908f.tar.gz
ingen-9d7c1e971d51561c4bb28fa1064503e5f266908f.tar.bz2
ingen-9d7c1e971d51561c4bb28fa1064503e5f266908f.zip
Demodularize Parser and Serialiser.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5606 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/App.cpp5
-rw-r--r--src/gui/App.hpp6
-rw-r--r--src/gui/GraphCanvas.cpp16
-rw-r--r--src/gui/Style.cpp2
-rw-r--r--src/gui/ThreadedLoader.cpp11
-rw-r--r--src/gui/ThreadedLoader.hpp6
-rw-r--r--src/gui/wscript2
7 files changed, 19 insertions, 29 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp
index 730243a7..b0f6f28b 100644
--- a/src/gui/App.cpp
+++ b/src/gui/App.cpp
@@ -188,12 +188,9 @@ App::request_plugins_if_necessary()
}
}
-SPtr<Serialisation::Serialiser>
+SPtr<Serialiser>
App::serialiser()
{
- if (!_world->serialiser())
- _world->load_module("serialisation");
-
return _world->serialiser();
}
diff --git a/src/gui/App.hpp b/src/gui/App.hpp
index f875c7c6..0ce37ebd 100644
--- a/src/gui/App.hpp
+++ b/src/gui/App.hpp
@@ -37,6 +37,7 @@ namespace Ingen {
class Interface;
class Log;
class Port;
+class Serialiser;
class World;
namespace Client {
class ClientStore;
@@ -45,9 +46,6 @@ class PluginModel;
class PortModel;
class SigClientInterface;
}
-namespace Serialisation {
-class Serialiser;
-}
}
namespace Ingen {
@@ -116,7 +114,7 @@ public:
SPtr<Client::ClientStore> store() const { return _store; }
SPtr<ThreadedLoader> loader() const { return _loader; }
- SPtr<Serialisation::Serialiser> serialiser();
+ SPtr<Serialiser> serialiser();
static SPtr<App> create(Ingen::World* world);
void run();
diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp
index 12c60638..c3b8b937 100644
--- a/src/gui/GraphCanvas.cpp
+++ b/src/gui/GraphCanvas.cpp
@@ -29,13 +29,13 @@
#include "ingen/Configuration.hpp"
#include "ingen/Interface.hpp"
#include "ingen/Log.hpp"
+#include "ingen/Serialiser.hpp"
#include "ingen/World.hpp"
#include "ingen/client/BlockModel.hpp"
#include "ingen/client/ClientStore.hpp"
#include "ingen/client/GraphModel.hpp"
#include "ingen/client/PluginModel.hpp"
#include "ingen/ingen.h"
-#include "ingen/serialisation/Serialiser.hpp"
#include "lv2/lv2plug.in/ns/ext/atom/atom.h"
#include "App.hpp"
@@ -563,7 +563,7 @@ GraphCanvas::destroy_selection()
static void
serialise_node(GanvNode* node, void* data)
{
- Serialisation::Serialiser* serialiser = (Serialisation::Serialiser*)data;
+ Serialiser* serialiser = (Serialiser*)data;
if (!GANV_IS_MODULE(node)) {
return;
}
@@ -584,7 +584,7 @@ serialise_node(GanvNode* node, void* data)
static void
serialise_arc(GanvEdge* arc, void* data)
{
- Serialisation::Serialiser* serialiser = (Serialisation::Serialiser*)data;
+ Serialiser* serialiser = (Serialiser*)data;
if (!GANV_IS_EDGE(arc)) {
return;
}
@@ -598,7 +598,7 @@ serialise_arc(GanvEdge* arc, void* data)
void
GraphCanvas::copy_selection()
{
- Serialisation::Serialiser serialiser(*_app.world());
+ Serialiser serialiser(*_app.world());
serialiser.start_to_string(_graph->path(), _graph->base_uri());
for_each_selected_node(serialise_node, &serialiser);
@@ -614,10 +614,10 @@ GraphCanvas::paste()
{
typedef Node::Properties::const_iterator PropIter;
- const Glib::ustring str = Gtk::Clipboard::get()->wait_for_text();
- SPtr<Serialisation::Parser> parser = _app.loader()->parser();
- const URIs& uris = _app.uris();
- const Raul::Path& parent = _graph->path();
+ const Glib::ustring str = Gtk::Clipboard::get()->wait_for_text();
+ SPtr<Parser> parser = _app.loader()->parser();
+ const URIs& uris = _app.uris();
+ const Raul::Path& parent = _graph->path();
if (!parser) {
_app.log().error("Unable to load parser, paste unavailable\n");
return;
diff --git a/src/gui/Style.cpp b/src/gui/Style.cpp
index 342cb142..699398e4 100644
--- a/src/gui/Style.cpp
+++ b/src/gui/Style.cpp
@@ -22,9 +22,9 @@
#include "ganv/Port.hpp"
#include "ingen/Log.hpp"
+#include "ingen/Parser.hpp"
#include "ingen/client/PluginModel.hpp"
#include "ingen/client/PortModel.hpp"
-#include "ingen/serialisation/Parser.hpp"
#include "App.hpp"
#include "Style.hpp"
diff --git a/src/gui/ThreadedLoader.cpp b/src/gui/ThreadedLoader.cpp
index 93cccdf1..6e57c383 100644
--- a/src/gui/ThreadedLoader.cpp
+++ b/src/gui/ThreadedLoader.cpp
@@ -49,15 +49,10 @@ ThreadedLoader::~ThreadedLoader()
_thread.join();
}
-SPtr<Serialisation::Parser>
+SPtr<Parser>
ThreadedLoader::parser()
{
- Ingen::World* world = _app.world();
-
- if (!world->parser())
- world->load_module("serialisation");
-
- return world->parser();
+ return _app.world()->parser();
}
void
@@ -95,7 +90,7 @@ ThreadedLoader::load_graph(bool merge,
_events.push_back(
sigc::hide_return(
sigc::bind(sigc::mem_fun(world->parser().get(),
- &Ingen::Serialisation::Parser::parse_file),
+ &Ingen::Parser::parse_file),
_app.world(),
_app.world()->interface().get(),
document_uri,
diff --git a/src/gui/ThreadedLoader.hpp b/src/gui/ThreadedLoader.hpp
index 68f6a3f1..c197a605 100644
--- a/src/gui/ThreadedLoader.hpp
+++ b/src/gui/ThreadedLoader.hpp
@@ -27,8 +27,8 @@
#include <glibmm/thread.h>
#include "ingen/Interface.hpp"
-#include "ingen/serialisation/Parser.hpp"
-#include "ingen/serialisation/Serialiser.hpp"
+#include "ingen/Parser.hpp"
+#include "ingen/Serialiser.hpp"
#include "raul/Semaphore.hpp"
namespace Ingen {
@@ -62,7 +62,7 @@ public:
void save_graph(SPtr<const Client::GraphModel> model,
const std::string& filename);
- SPtr<Serialisation::Parser> parser();
+ SPtr<Parser> parser();
private:
void save_graph_event(SPtr<const Client::GraphModel> model,
diff --git a/src/gui/wscript b/src/gui/wscript
index 9ca90ee6..e75b064b 100644
--- a/src/gui/wscript
+++ b/src/gui/wscript
@@ -31,7 +31,7 @@ def build(bld):
name = 'libingen_gui',
target = 'ingen_gui',
install_path = '${LIBDIR}',
- use = 'libingen libingen_client libingen_serialisation')
+ use = 'libingen libingen_client')
autowaf.use_lib(bld, obj, '''
GANV
GLADEMM