From efe47ea54e71b359dde85c0f272e7fc3934b85e3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 21 Oct 2011 16:30:17 +0000 Subject: Move World.hpp and Module.hpp to public include directory. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3560 a436a847-0d15-0410-975c-d299462d15a1 --- src/shared/Module.hpp | 46 ------------------- src/shared/World.cpp | 4 +- src/shared/World.hpp | 120 -------------------------------------------------- 3 files changed, 2 insertions(+), 168 deletions(-) delete mode 100644 src/shared/Module.hpp delete mode 100644 src/shared/World.hpp (limited to 'src/shared') diff --git a/src/shared/Module.hpp b/src/shared/Module.hpp deleted file mode 100644 index f972a999..00000000 --- a/src/shared/Module.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/* This file is part of Ingen. - * Copyright 2007-2011 David Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) 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 General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef INGEN_SHARED_MODULE_HPP -#define INGEN_SHARED_MODULE_HPP - -#include - -#include "raul/SharedPtr.hpp" - -namespace Ingen { -namespace Shared { - -class World; - -/** A dynamically loaded Ingen module. - * - * All components of Ingen reside in one of these. - */ -struct Module { - virtual ~Module(); - - virtual void load(Ingen::Shared::World* world) = 0; - virtual void run(Ingen::Shared::World* world) {} - - SharedPtr library; -}; - -} // namespace Shared -} // namespace Ingen - -#endif // INGEN_SHARED_MODULE_HPP diff --git a/src/shared/World.cpp b/src/shared/World.cpp index 19e85a15..92d7a03f 100644 --- a/src/shared/World.cpp +++ b/src/shared/World.cpp @@ -26,11 +26,11 @@ #include "sord/sordmm.hpp" #include "ingen/EngineBase.hpp" +#include "ingen/shared/Module.hpp" +#include "ingen/shared/World.hpp" #include "ingen/shared/runtime_paths.hpp" #include "shared/LV2Features.hpp" #include "shared/LV2URIMap.hpp" -#include "World.hpp" -#include "Module.hpp" #define LOG(s) s << "[Module] " diff --git a/src/shared/World.hpp b/src/shared/World.hpp deleted file mode 100644 index 4f0a00c2..00000000 --- a/src/shared/World.hpp +++ /dev/null @@ -1,120 +0,0 @@ -/* This file is part of Ingen. - * Copyright 2007-2011 David Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) 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 General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef INGEN_MODULE_WORLD_HPP -#define INGEN_MODULE_WORLD_HPP - -#include - -#include -#include - -#include "raul/Configuration.hpp" -#include "raul/SharedPtr.hpp" - -typedef struct LilvWorldImpl LilvWorld; - -namespace Sord { class World; } - -namespace Ingen { - -class EngineBase; -class ClientInterface; -class ServerInterface; - -namespace Serialisation { class Serialiser; class Parser; } - -namespace Shared { - -class LV2Features; -class LV2URIMap; -class Store; - -/** The "world" all Ingen modules may share. - * - * All loaded components of Ingen, as well as things requiring shared access - * and/or locking (e.g. Sord, Lilv). - * - * Ingen modules are shared libraries which modify the World when loaded - * using World::load, e.g. loading the "ingen_serialisation" module will - * set World::serialiser and World::parser to valid objects. - */ -class World : public boost::noncopyable { -public: - World(Raul::Configuration* conf, int& argc, char**& argv); - virtual ~World(); - - virtual bool load_module(const char* name); - virtual bool run_module(const char* name); - - virtual void unload_modules(); - - typedef SharedPtr (*InterfaceFactory)( - World* world, - const std::string& engine_url, - SharedPtr respond_to); - - virtual void add_interface_factory(const std::string& scheme, - InterfaceFactory factory); - - virtual SharedPtr interface( - const std::string& engine_url, - SharedPtr respond_to); - - virtual bool run(const std::string& mime_type, - const std::string& filename); - - virtual void set_local_engine(SharedPtr e); - virtual void set_engine(SharedPtr e); - virtual void set_serialiser(SharedPtr s); - virtual void set_parser(SharedPtr p); - virtual void set_store(SharedPtr s); - virtual void set_client(SharedPtr c); - - virtual SharedPtr local_engine(); - virtual SharedPtr engine(); - virtual SharedPtr serialiser(); - virtual SharedPtr parser(); - virtual SharedPtr store(); - virtual SharedPtr client(); - - virtual Sord::World* rdf_world(); - virtual SharedPtr uris(); - - virtual int& argc(); - virtual char**& argv(); - - virtual Raul::Configuration* conf(); - virtual void set_conf(Raul::Configuration* c); - - virtual LV2Features* lv2_features(); - - virtual LilvWorld* lilv_world(); - - virtual void set_jack_uuid(const std::string& uuid); - virtual std::string jack_uuid(); - -private: - class Pimpl; - - Pimpl* _impl; -}; - -} // namespace Shared -} // namespace Ingen - -#endif // INGEN_MODULE_WORLD_HPP -- cgit v1.2.1