/* This file is part of Ingen. Copyright 2007-2012 David Robillard Ingen is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. Ingen is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for details. You should have received a copy of the GNU Affero General Public License along with Ingen. If not, see . */ #ifndef INGEN_SERIALISATION_SERIALISER_HPP #define INGEN_SERIALISATION_SERIALISER_HPP #include #include #include "raul/Path.hpp" #include "raul/SharedPtr.hpp" #include "sord/sordmm.hpp" #include "ingen/GraphObject.hpp" namespace Ingen { class Plugin; class GraphObject; class Patch; class Node; class Port; class Connection; namespace Shared { class World; class Store; } namespace Serialisation { /** Serialises Ingen objects (patches, nodes, etc) to RDF. * * \ingroup IngenSerialisation */ class Serialiser { public: Serialiser(Shared::World& world); virtual ~Serialiser(); typedef GraphObject::Properties Properties; virtual void to_file(SharedPtr object, const std::string& filename); virtual void write_bundle(SharedPtr patch, const std::string& path); virtual std::string to_string(SharedPtr object, const std::string& base_uri); virtual void start_to_string(const Raul::Path& root, const std::string& base_uri); virtual void serialise(SharedPtr object) throw (std::logic_error); virtual void serialise_connection(const Sord::Node& parent, SharedPtr c) throw (std::logic_error); virtual std::string finish(); private: struct Impl; Impl* me; }; } // namespace Serialisation } // namespace Ingen #endif // INGEN_SERIALISATION_SERIALISER_HPP