summaryrefslogtreecommitdiffstats
path: root/src/serialisation
diff options
context:
space:
mode:
Diffstat (limited to 'src/serialisation')
-rw-r--r--src/serialisation/Parser.hpp127
-rw-r--r--src/serialisation/Serialiser.hpp31
-rw-r--r--src/serialisation/serialisation.cpp2
3 files changed, 79 insertions, 81 deletions
diff --git a/src/serialisation/Parser.hpp b/src/serialisation/Parser.hpp
index 6fbb8be6..eea5ca9b 100644
--- a/src/serialisation/Parser.hpp
+++ b/src/serialisation/Parser.hpp
@@ -28,9 +28,6 @@ namespace Raul { class Path; }
namespace Redland { class World; class Model; class Node; }
namespace Ingen { namespace Shared { class CommonInterface; } }
-
-using namespace Ingen::Shared;
-
namespace Ingen {
namespace Serialisation {
@@ -38,86 +35,88 @@ namespace Serialisation {
class Parser {
public:
virtual ~Parser() {}
+
+ typedef Shared::GraphObject::Properties Properties;
virtual bool parse_document(
- Ingen::Shared::World* world,
- Shared::CommonInterface* target,
- Glib::ustring document_uri,
- boost::optional<Raul::Path> data_path=boost::optional<Raul::Path>(),
- boost::optional<Raul::Path> parent=boost::optional<Raul::Path>(),
- boost::optional<Raul::Symbol> symbol=boost::optional<Raul::Symbol>(),
- boost::optional<GraphObject::Properties> data=boost::optional<GraphObject::Properties>());
+ Ingen::Shared::World* world,
+ Shared::CommonInterface* target,
+ Glib::ustring document_uri,
+ boost::optional<Raul::Path> data_path=boost::optional<Raul::Path>(),
+ boost::optional<Raul::Path> parent=boost::optional<Raul::Path>(),
+ boost::optional<Raul::Symbol> symbol=boost::optional<Raul::Symbol>(),
+ boost::optional<Properties> data=boost::optional<Properties>());
virtual bool parse_string(
- Ingen::Shared::World* world,
- Shared::CommonInterface* target,
- const Glib::ustring& str,
- const Glib::ustring& base_uri,
- boost::optional<Raul::Path> data_path=boost::optional<Raul::Path>(),
- boost::optional<Raul::Path> parent=boost::optional<Raul::Path>(),
- boost::optional<Raul::Symbol> symbol=boost::optional<Raul::Symbol>(),
- boost::optional<GraphObject::Properties> data=boost::optional<GraphObject::Properties>());
+ Ingen::Shared::World* world,
+ Shared::CommonInterface* target,
+ const Glib::ustring& str,
+ const Glib::ustring& base_uri,
+ boost::optional<Raul::Path> data_path=boost::optional<Raul::Path>(),
+ boost::optional<Raul::Path> parent=boost::optional<Raul::Path>(),
+ boost::optional<Raul::Symbol> symbol=boost::optional<Raul::Symbol>(),
+ boost::optional<Properties> data=boost::optional<Properties>());
virtual bool parse_update(
- Ingen::Shared::World* world,
- Shared::CommonInterface* target,
- const Glib::ustring& str,
- const Glib::ustring& base_uri,
- boost::optional<Raul::Path> data_path=boost::optional<Raul::Path>(),
- boost::optional<Raul::Path> parent=boost::optional<Raul::Path>(),
- boost::optional<Raul::Symbol> symbol=boost::optional<Raul::Symbol>(),
- boost::optional<GraphObject::Properties> data=boost::optional<GraphObject::Properties>());
+ Ingen::Shared::World* world,
+ Shared::CommonInterface* target,
+ const Glib::ustring& str,
+ const Glib::ustring& base_uri,
+ boost::optional<Raul::Path> data_path=boost::optional<Raul::Path>(),
+ boost::optional<Raul::Path> parent=boost::optional<Raul::Path>(),
+ boost::optional<Raul::Symbol> symbol=boost::optional<Raul::Symbol>(),
+ boost::optional<Properties> data=boost::optional<Properties>());
private:
boost::optional<Raul::Path> parse(
- Ingen::Shared::World* world,
- Shared::CommonInterface* target,
- Redland::Model& model,
- Glib::ustring document_uri,
- boost::optional<Raul::Path> data_path=boost::optional<Raul::Path>(),
- boost::optional<Raul::Path> parent=boost::optional<Raul::Path>(),
- boost::optional<Raul::Symbol> symbol=boost::optional<Raul::Symbol>(),
- boost::optional<GraphObject::Properties> data=boost::optional<GraphObject::Properties>());
+ Ingen::Shared::World* world,
+ Shared::CommonInterface* target,
+ Redland::Model& model,
+ Glib::ustring document_uri,
+ boost::optional<Raul::Path> data_path=boost::optional<Raul::Path>(),
+ boost::optional<Raul::Path> parent=boost::optional<Raul::Path>(),
+ boost::optional<Raul::Symbol> symbol=boost::optional<Raul::Symbol>(),
+ boost::optional<Properties> data=boost::optional<Properties>());
boost::optional<Raul::Path> parse_patch(
- Ingen::Shared::World* world,
- Ingen::Shared::CommonInterface* target,
- Redland::Model& model,
- const Redland::Node& subject,
- boost::optional<Raul::Path> parent=boost::optional<Raul::Path>(),
- boost::optional<Raul::Symbol> symbol=boost::optional<Raul::Symbol>(),
- boost::optional<GraphObject::Properties> data=boost::optional<GraphObject::Properties>());
+ Ingen::Shared::World* world,
+ Ingen::Shared::CommonInterface* target,
+ Redland::Model& model,
+ const Redland::Node& subject,
+ boost::optional<Raul::Path> parent=boost::optional<Raul::Path>(),
+ boost::optional<Raul::Symbol> symbol=boost::optional<Raul::Symbol>(),
+ boost::optional<Properties> data=boost::optional<Properties>());
boost::optional<Raul::Path> parse_node(
- Ingen::Shared::World* world,
- Ingen::Shared::CommonInterface* target,
- Redland::Model& model,
- const Redland::Node& subject,
- const Raul::Path& path,
- boost::optional<GraphObject::Properties> data=boost::optional<GraphObject::Properties>());
+ Ingen::Shared::World* world,
+ Ingen::Shared::CommonInterface* target,
+ Redland::Model& model,
+ const Redland::Node& subject,
+ const Raul::Path& path,
+ boost::optional<Properties> data=boost::optional<Properties>());
boost::optional<Raul::Path> parse_port(
- Ingen::Shared::World* world,
- Ingen::Shared::CommonInterface* target,
- Redland::Model& model,
- const Redland::Node& subject,
- const Raul::Path& path,
- boost::optional<GraphObject::Properties> data=boost::optional<GraphObject::Properties>());
+ Ingen::Shared::World* world,
+ Ingen::Shared::CommonInterface* target,
+ Redland::Model& model,
+ const Redland::Node& subject,
+ const Raul::Path& path,
+ boost::optional<Properties> data=boost::optional<Properties>());
bool parse_variables(
- Ingen::Shared::World* world,
- Ingen::Shared::CommonInterface* target,
- Redland::Model& model,
- const Redland::Node& subject,
- const Raul::Path& path,
- boost::optional<GraphObject::Properties> data=boost::optional<GraphObject::Properties>());
+ Ingen::Shared::World* world,
+ Ingen::Shared::CommonInterface* target,
+ Redland::Model& model,
+ const Redland::Node& subject,
+ const Raul::Path& path,
+ boost::optional<Properties> data=boost::optional<Properties>());
bool parse_connections(
- Ingen::Shared::World* world,
- Ingen::Shared::CommonInterface* target,
- Redland::Model& model,
- const Glib::ustring& subject,
- const Raul::Path& patch);
+ Ingen::Shared::World* world,
+ Ingen::Shared::CommonInterface* target,
+ Redland::Model& model,
+ const Glib::ustring& subject,
+ const Raul::Path& patch);
};
diff --git a/src/serialisation/Serialiser.hpp b/src/serialisation/Serialiser.hpp
index a2863871..95425bad 100644
--- a/src/serialisation/Serialiser.hpp
+++ b/src/serialisation/Serialiser.hpp
@@ -30,9 +30,6 @@
#include "interface/GraphObject.hpp"
#include "shared/Store.hpp"
-using namespace Raul;
-using namespace Ingen::Shared;
-
namespace Ingen {
namespace Shared {
@@ -56,14 +53,16 @@ class Serialiser
{
public:
Serialiser(Shared::World& world, SharedPtr<Shared::Store> store);
+
+ typedef Shared::GraphObject::Properties Properties;
struct Record {
- Record(SharedPtr<GraphObject> o, const std::string& u)
+ Record(SharedPtr<Shared::GraphObject> o, const std::string& u)
: object(o), uri(u)
{}
- const SharedPtr<GraphObject> object;
- const std::string uri;
+ const SharedPtr<Shared::GraphObject> object;
+ const std::string uri;
};
typedef std::list<Record> Records;
@@ -75,15 +74,15 @@ public:
void write_manifest(const std::string& bundle_uri,
const Records& records);
- std::string to_string(SharedPtr<GraphObject> object,
- const std::string& base_uri,
- const GraphObject::Properties& extra_rdf);
+ std::string to_string(SharedPtr<Shared::GraphObject> object,
+ const std::string& base_uri,
+ const Properties& extra_rdf);
void start_to_string(const Raul::Path& root, const std::string& base_uri);
- void serialise(SharedPtr<GraphObject> object) throw (std::logic_error);
+ void serialise(SharedPtr<Shared::GraphObject> object) throw (std::logic_error);
void serialise_plugin(const Shared::Plugin& p);
- void serialise_connection(SharedPtr<GraphObject> parent,
- SharedPtr<Shared::Connection> c) throw (std::logic_error);
+ void serialise_connection(SharedPtr<Shared::GraphObject> parent,
+ SharedPtr<Shared::Connection> c) throw (std::logic_error);
std::string finish();
@@ -100,11 +99,11 @@ private:
void serialise_port(const Shared::Port* p, const Redland::Node& id);
void serialise_port_class(const Shared::Port* p, const Redland::Node& id);
- void serialise_properties(Redland::Node subject, const GraphObject::Properties& properties);
- void serialise_variables(Redland::Node subject, const GraphObject::Properties& variables);
+ void serialise_properties(Redland::Node subject, const Properties& properties);
+ void serialise_variables(Redland::Node subject, const Properties& variables);
- Redland::Node instance_rdf_node(const Path& path);
- Redland::Node class_rdf_node(const Path& path);
+ Redland::Node instance_rdf_node(const Raul::Path& path);
+ Redland::Node class_rdf_node(const Raul::Path& path);
Raul::Path _root_path;
SharedPtr<Shared::Store> _store;
diff --git a/src/serialisation/serialisation.cpp b/src/serialisation/serialisation.cpp
index 3615d8c9..172db2a1 100644
--- a/src/serialisation/serialisation.cpp
+++ b/src/serialisation/serialisation.cpp
@@ -33,7 +33,7 @@ new_parser()
Ingen::Serialisation::Serialiser*
-new_serialiser(Ingen::Shared::World* world, SharedPtr<Store> store)
+new_serialiser(Ingen::Shared::World* world, SharedPtr<Shared::Store> store)
{
assert(world->rdf_world);
return new Serialiser(*world, store);