summaryrefslogtreecommitdiffstats
path: root/ingen
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-01-12 23:38:03 +0000
committerDavid Robillard <d@drobilla.net>2013-01-12 23:38:03 +0000
commitdf1447c665e6c3631961297a9d3e9aff4e94c47f (patch)
treec0ff117c362e6d571f430f886ab62f372b59af08 /ingen
parentbb335dca695273622b7a4ebbefbe9e089edb9ab4 (diff)
downloadingen-df1447c665e6c3631961297a9d3e9aff4e94c47f.tar.gz
ingen-df1447c665e6c3631961297a9d3e9aff4e94c47f.tar.bz2
ingen-df1447c665e6c3631961297a9d3e9aff4e94c47f.zip
Remove Raul::SharedPtr and switch to std::shared_ptr.
Use project local short type aliases for shared_ptr and friends. Move Raul::Disposable and Raul::Manageable into Raul::Maid. Use sets to store machina nodes and edges to avoid O(n) searches. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4939 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'ingen')
-rw-r--r--ingen/Builder.hpp6
-rw-r--r--ingen/EngineBase.hpp7
-rw-r--r--ingen/Interface.hpp8
-rw-r--r--ingen/LV2Features.hpp18
-rw-r--r--ingen/Node.hpp6
-rw-r--r--ingen/Store.hpp10
-rw-r--r--ingen/URIMap.hpp12
-rw-r--r--ingen/World.hpp40
-rw-r--r--ingen/client/ArcModel.hpp12
-rw-r--r--ingen/client/BlockModel.hpp58
-rw-r--r--ingen/client/ClientStore.hpp56
-rw-r--r--ingen/client/GraphModel.hpp20
-rw-r--r--ingen/client/ObjectModel.hpp24
-rw-r--r--ingen/client/PluginModel.hpp8
-rw-r--r--ingen/client/PluginUI.hpp28
-rw-r--r--ingen/client/PortModel.hpp16
-rw-r--r--ingen/serialisation/Serialiser.hpp19
17 files changed, 177 insertions, 171 deletions
diff --git a/ingen/Builder.hpp b/ingen/Builder.hpp
index 96096b3d..728a5cb9 100644
--- a/ingen/Builder.hpp
+++ b/ingen/Builder.hpp
@@ -17,7 +17,7 @@
#ifndef INGEN_BUILDER_HPP
#define INGEN_BUILDER_HPP
-#include "raul/SharedPtr.hpp"
+#include "ingen/types.hpp"
namespace Ingen {
@@ -35,8 +35,8 @@ public:
Builder(URIs& uris, Interface& interface);
virtual ~Builder() {}
- void build(SharedPtr<const Node> object);
- void connect(SharedPtr<const Node> object);
+ void build(SPtr<const Node> object);
+ void connect(SPtr<const Node> object);
private:
URIs& _uris;
diff --git a/ingen/EngineBase.hpp b/ingen/EngineBase.hpp
index caa1cf00..311bef3a 100644
--- a/ingen/EngineBase.hpp
+++ b/ingen/EngineBase.hpp
@@ -20,7 +20,8 @@
#include <stdint.h>
#include "raul/URI.hpp"
-#include "raul/SharedPtr.hpp"
+
+#include "ingen/types.hpp"
namespace Ingen {
@@ -93,8 +94,8 @@ public:
/**
Register a client to receive updates about engine changes.
*/
- virtual void register_client(const Raul::URI& uri,
- SharedPtr<Interface> client) = 0;
+ virtual void register_client(const Raul::URI& uri,
+ SPtr<Interface> client) = 0;
/**
Unregister a client.
diff --git a/ingen/Interface.hpp b/ingen/Interface.hpp
index 7f1fe9b7..023221bd 100644
--- a/ingen/Interface.hpp
+++ b/ingen/Interface.hpp
@@ -25,7 +25,7 @@
#include "ingen/Resource.hpp"
#include "ingen/Status.hpp"
-#include "raul/SharedPtr.hpp"
+#include "ingen/types.hpp"
namespace Raul {
class Atom;
@@ -47,11 +47,11 @@ public:
virtual Raul::URI uri() const = 0;
- virtual SharedPtr<Interface> respondee() const {
- return SharedPtr<Interface>();
+ virtual SPtr<Interface> respondee() const {
+ return SPtr<Interface>();
}
- virtual void set_respondee(SharedPtr<Interface> respondee) {}
+ virtual void set_respondee(SPtr<Interface> respondee) {}
/** Begin an atomic bundle */
virtual void bundle_begin() = 0;
diff --git a/ingen/LV2Features.hpp b/ingen/LV2Features.hpp
index 214d62bb..be8f777b 100644
--- a/ingen/LV2Features.hpp
+++ b/ingen/LV2Features.hpp
@@ -20,10 +20,10 @@
#include <vector>
#include "lv2/lv2plug.in/ns/lv2core/lv2.h"
-
-#include "raul/SharedPtr.hpp"
#include "raul/Noncopyable.hpp"
+#include "ingen/types.hpp"
+
namespace Ingen {
class Node;
@@ -42,13 +42,13 @@ public:
virtual const char* uri() const = 0;
- virtual SharedPtr<LV2_Feature> feature(World* world,
- Node* block) = 0;
+ virtual SPtr<LV2_Feature> feature(World* world,
+ Node* block) = 0;
};
class FeatureArray : public Raul::Noncopyable {
public:
- typedef std::vector< SharedPtr<LV2_Feature> > FeatureVector;
+ typedef std::vector< SPtr<LV2_Feature> > FeatureVector;
explicit FeatureArray(FeatureVector& features);
@@ -61,14 +61,14 @@ public:
LV2_Feature** _array;
};
- void add_feature(SharedPtr<Feature> feature);
+ void add_feature(SPtr<Feature> feature);
bool is_supported(const std::string& uri) const;
- SharedPtr<FeatureArray> lv2_features(World* world,
- Node* block) const;
+ SPtr<FeatureArray> lv2_features(World* world,
+ Node* block) const;
private:
- typedef std::vector< SharedPtr<Feature> > Features;
+ typedef std::vector< SPtr<Feature> > Features;
Features _features;
};
diff --git a/ingen/Node.hpp b/ingen/Node.hpp
index d61732ff..2cbce01c 100644
--- a/ingen/Node.hpp
+++ b/ingen/Node.hpp
@@ -17,9 +17,9 @@
#ifndef INGEN_NODE_HPP
#define INGEN_NODE_HPP
-#include "raul/Path.hpp"
-#include "raul/SharedPtr.hpp"
#include "ingen/Resource.hpp"
+#include "ingen/types.hpp"
+#include "raul/Path.hpp"
namespace Raul {
class Atom;
@@ -55,7 +55,7 @@ public:
};
typedef std::pair<const Node*, const Node*> ArcsKey;
- typedef std::map< ArcsKey, SharedPtr<Arc> > Arcs;
+ typedef std::map< ArcsKey, SPtr<Arc> > Arcs;
// Graphs only
Arcs& arcs() { return _arcs; }
diff --git a/ingen/Store.hpp b/ingen/Store.hpp
index c176cdd3..dcab2532 100644
--- a/ingen/Store.hpp
+++ b/ingen/Store.hpp
@@ -22,10 +22,12 @@
#undef nil
#include <glibmm/thread.h>
-#include "ingen/Node.hpp"
#include "raul/Deletable.hpp"
#include "raul/Noncopyable.hpp"
+#include "ingen/Node.hpp"
+#include "ingen/types.hpp"
+
namespace Ingen {
/** Store of objects in the graph hierarchy.
@@ -33,7 +35,7 @@ namespace Ingen {
*/
class Store : public Raul::Noncopyable
, public Raul::Deletable
- , public std::map< const Raul::Path, SharedPtr<Node> > {
+ , public std::map< const Raul::Path, SPtr<Node> > {
public:
void add(Node* o);
@@ -44,12 +46,12 @@ public:
typedef std::pair<const_iterator, const_iterator> const_range;
- typedef std::map< Raul::Path, SharedPtr<Node> > Objects;
+ typedef std::map< Raul::Path, SPtr<Node> > Objects;
iterator find_descendants_end(Store::iterator parent);
const_iterator find_descendants_end(Store::const_iterator parent) const;
- const_range children_range(SharedPtr<const Node> o) const;
+ const_range children_range(SPtr<const Node> o) const;
/** Remove the object at @p top and all its children from the store.
*
diff --git a/ingen/URIMap.hpp b/ingen/URIMap.hpp
index e5ca71e3..a275fdff 100644
--- a/ingen/URIMap.hpp
+++ b/ingen/URIMap.hpp
@@ -48,8 +48,8 @@ public:
const char* uri() const { return _feature.URI; }
- SharedPtr<LV2_Feature> feature(World*, Node*) {
- return SharedPtr<LV2_Feature>(&_feature, NullDeleter<LV2_Feature>);
+ SPtr<LV2_Feature> feature(World*, Node*) {
+ return SPtr<LV2_Feature>(&_feature, NullDeleter<LV2_Feature>);
}
private:
@@ -71,12 +71,12 @@ public:
LV2_URID_Unmap urid_unmap;
};
- SharedPtr<URIDMapFeature> urid_map_feature() { return _urid_map_feature; }
- SharedPtr<URIDUnmapFeature> urid_unmap_feature() { return _urid_unmap_feature; }
+ SPtr<URIDMapFeature> urid_map_feature() { return _urid_map_feature; }
+ SPtr<URIDUnmapFeature> urid_unmap_feature() { return _urid_unmap_feature; }
private:
- SharedPtr<URIDMapFeature> _urid_map_feature;
- SharedPtr<URIDUnmapFeature> _urid_unmap_feature;
+ SPtr<URIDMapFeature> _urid_map_feature;
+ SPtr<URIDUnmapFeature> _urid_unmap_feature;
};
} // namespace Ingen
diff --git a/ingen/World.hpp b/ingen/World.hpp
index 16ad5731..fb412afc 100644
--- a/ingen/World.hpp
+++ b/ingen/World.hpp
@@ -19,10 +19,10 @@
#include <string>
-#include "lv2/lv2plug.in/ns/ext/urid/urid.h"
+#include "ingen/types.hpp"
#include "lv2/lv2plug.in/ns/ext/log/log.h"
+#include "lv2/lv2plug.in/ns/ext/urid/urid.h"
#include "raul/Noncopyable.hpp"
-#include "raul/SharedPtr.hpp"
#include "raul/URI.hpp"
typedef struct LilvWorldImpl LilvWorld;
@@ -93,10 +93,10 @@ public:
virtual bool run_module(const char* name);
/** A function to create a new remote Interface. */
- typedef SharedPtr<Interface> (*InterfaceFactory)(
- World* world,
- const Raul::URI& engine_uri,
- SharedPtr<Interface> respondee);
+ typedef SPtr<Interface> (*InterfaceFactory)(
+ World* world,
+ const Raul::URI& engine_uri,
+ SPtr<Interface> respondee);
/** Register an InterfaceFactory (for module implementations). */
virtual void add_interface_factory(const std::string& scheme,
@@ -107,25 +107,25 @@ public:
* @param respondee The Interface that will receive responses to commands
* and broadcasts, if applicable.
*/
- virtual SharedPtr<Interface> new_interface(
- const Raul::URI& engine_uri,
- SharedPtr<Interface> respondee);
+ virtual SPtr<Interface> new_interface(
+ const Raul::URI& engine_uri,
+ SPtr<Interface> respondee);
/** Run a script. */
virtual bool run(const std::string& mime_type,
const std::string& filename);
- virtual void set_engine(SharedPtr<EngineBase> e);
- virtual void set_interface(SharedPtr<Interface> e);
- virtual void set_parser(SharedPtr<Serialisation::Parser> p);
- virtual void set_serialiser(SharedPtr<Serialisation::Serialiser> s);
- virtual void set_store(SharedPtr<Store> s);
-
- virtual SharedPtr<EngineBase> engine();
- virtual SharedPtr<Interface> interface();
- virtual SharedPtr<Serialisation::Parser> parser();
- virtual SharedPtr<Serialisation::Serialiser> serialiser();
- virtual SharedPtr<Store> store();
+ virtual void set_engine(SPtr<EngineBase> e);
+ virtual void set_interface(SPtr<Interface> e);
+ virtual void set_parser(SPtr<Serialisation::Parser> p);
+ virtual void set_serialiser(SPtr<Serialisation::Serialiser> s);
+ virtual void set_store(SPtr<Store> s);
+
+ virtual SPtr<EngineBase> engine();
+ virtual SPtr<Interface> interface();
+ virtual SPtr<Serialisation::Parser> parser();
+ virtual SPtr<Serialisation::Serialiser> serialiser();
+ virtual SPtr<Store> store();
virtual int& argc();
virtual char**& argv();
diff --git a/ingen/client/ArcModel.hpp b/ingen/client/ArcModel.hpp
index 99d5afa0..4306be09 100644
--- a/ingen/client/ArcModel.hpp
+++ b/ingen/client/ArcModel.hpp
@@ -19,8 +19,8 @@
#include <cassert>
+#include "ingen/types.hpp"
#include "raul/Path.hpp"
-#include "raul/SharedPtr.hpp"
#include "ingen/Arc.hpp"
#include "ingen/client/PortModel.hpp"
@@ -37,8 +37,8 @@ class ClientStore;
class ArcModel : public Arc
{
public:
- SharedPtr<PortModel> tail() const { return _tail; }
- SharedPtr<PortModel> head() const { return _head; }
+ SPtr<PortModel> tail() const { return _tail; }
+ SPtr<PortModel> head() const { return _head; }
const Raul::Path& tail_path() const { return _tail->path(); }
const Raul::Path& head_path() const { return _head->path(); }
@@ -46,7 +46,7 @@ public:
private:
friend class ClientStore;
- ArcModel(SharedPtr<PortModel> tail, SharedPtr<PortModel> head)
+ ArcModel(SPtr<PortModel> tail, SPtr<PortModel> head)
: _tail(tail)
, _head(head)
{
@@ -57,8 +57,8 @@ private:
assert(_tail->path() != _head->path());
}
- const SharedPtr<PortModel> _tail;
- const SharedPtr<PortModel> _head;
+ const SPtr<PortModel> _tail;
+ const SPtr<PortModel> _head;
};
} // namespace Client
diff --git a/ingen/client/BlockModel.hpp b/ingen/client/BlockModel.hpp
index 3262b230..b5db2b0d 100644
--- a/ingen/client/BlockModel.hpp
+++ b/ingen/client/BlockModel.hpp
@@ -21,11 +21,11 @@
#include <string>
#include <vector>
-#include "raul/SharedPtr.hpp"
#include "ingen/Node.hpp"
#include "ingen/client/ObjectModel.hpp"
#include "ingen/client/PluginModel.hpp"
#include "ingen/client/PortModel.hpp"
+#include "ingen/types.hpp"
namespace Raul { class Path; }
@@ -50,31 +50,35 @@ public:
GraphType graph_type() const { return Node::GraphType::BLOCK; }
- typedef std::vector< SharedPtr<const PortModel> > Ports;
+ typedef std::vector< SPtr<const PortModel> > Ports;
- SharedPtr<const PortModel> get_port(const Raul::Symbol& symbol) const;
+ SPtr<const PortModel> get_port(const Raul::Symbol& symbol) const;
Node* port(uint32_t index) const;
- const Raul::URI& plugin_uri() const { return _plugin_uri; }
- const Plugin* plugin() const { return _plugin.get(); }
- Plugin* plugin() { return _plugin.get(); }
- SharedPtr<PluginModel> plugin_model() const { return _plugin; }
- uint32_t num_ports() const { return _ports.size(); }
- const Ports& ports() const { return _ports; }
+ const Raul::URI& plugin_uri() const { return _plugin_uri; }
+ const Plugin* plugin() const { return _plugin.get(); }
+ Plugin* plugin() { return _plugin.get(); }
+ SPtr<PluginModel> plugin_model() const { return _plugin; }
+ uint32_t num_ports() const { return _ports.size(); }
+ const Ports& ports() const { return _ports; }
- void default_port_value_range(SharedPtr<const PortModel> port,
- float& min, float& max, uint32_t srate=1) const;
+ void default_port_value_range(SPtr<const PortModel> port,
+ float& min,
+ float& max,
+ uint32_t srate = 1) const;
- void port_value_range(SharedPtr<const PortModel> port,
- float& min, float& max, uint32_t srate=1) const;
+ void port_value_range(SPtr<const PortModel> port,
+ float& min,
+ float& max,
+ uint32_t srate = 1) const;
std::string label() const;
- std::string port_label(SharedPtr<const PortModel> port) const;
+ std::string port_label(SPtr<const PortModel> port) const;
// Signals
- INGEN_SIGNAL(new_port, void, SharedPtr<const PortModel>);
- INGEN_SIGNAL(removed_port, void, SharedPtr<const PortModel>);
+ INGEN_SIGNAL(new_port, void, SPtr<const PortModel>);
+ INGEN_SIGNAL(removed_port, void, SPtr<const PortModel>);
protected:
friend class ClientStore;
@@ -82,23 +86,23 @@ protected:
BlockModel(URIs& uris,
const Raul::URI& plugin_uri,
const Raul::Path& path);
- BlockModel(URIs& uris,
- SharedPtr<PluginModel> plugin,
- const Raul::Path& path);
+ BlockModel(URIs& uris,
+ SPtr<PluginModel> plugin,
+ const Raul::Path& path);
explicit BlockModel(const Raul::Path& path);
- void add_child(SharedPtr<ObjectModel> c);
- bool remove_child(SharedPtr<ObjectModel> c);
- void add_port(SharedPtr<PortModel> pm);
- void remove_port(SharedPtr<PortModel> pm);
+ void add_child(SPtr<ObjectModel> c);
+ bool remove_child(SPtr<ObjectModel> c);
+ void add_port(SPtr<PortModel> pm);
+ void remove_port(SPtr<PortModel> pm);
void remove_port(const Raul::Path& port_path);
- void set(SharedPtr<ObjectModel> model);
+ void set(SPtr<ObjectModel> model);
virtual void clear();
- Ports _ports; ///< Vector of ports
- Raul::URI _plugin_uri; ///< Plugin URI (if PluginModel is unknown)
- SharedPtr<PluginModel> _plugin; ///< The plugin this block is an instance of
+ Ports _ports; ///< Vector of ports
+ Raul::URI _plugin_uri; ///< Plugin URI (if PluginModel is unknown)
+ SPtr<PluginModel> _plugin; ///< The plugin this block is an instance of
private:
mutable uint32_t _num_values; ///< Size of _min_values and _max_values
diff --git a/ingen/client/ClientStore.hpp b/ingen/client/ClientStore.hpp
index 3d7d724a..e9c85ba9 100644
--- a/ingen/client/ClientStore.hpp
+++ b/ingen/client/ClientStore.hpp
@@ -22,10 +22,10 @@
#include <string>
#include "ingen/Interface.hpp"
-#include "ingen/client/signal.hpp"
#include "ingen/Store.hpp"
+#include "ingen/client/signal.hpp"
+#include "ingen/types.hpp"
#include "raul/Path.hpp"
-#include "raul/SharedPtr.hpp"
namespace Raul { class Atom; }
@@ -53,23 +53,23 @@ class ClientStore : public Store
, public INGEN_TRACKABLE {
public:
ClientStore(
- URIs& uris,
- Log& log,
- SharedPtr<Interface> engine = SharedPtr<Interface>(),
- SharedPtr<SigClientInterface> emitter = SharedPtr<SigClientInterface>());
+ URIs& uris,
+ Log& log,
+ SPtr<Interface> engine = SPtr<Interface>(),
+ SPtr<SigClientInterface> emitter = SPtr<SigClientInterface>());
Raul::URI uri() const { return Raul::URI("ingen:/clients/store"); }
- SharedPtr<const ObjectModel> object(const Raul::Path& path) const;
- SharedPtr<const PluginModel> plugin(const Raul::URI& uri) const;
- SharedPtr<const Resource> resource(const Raul::URI& uri) const;
+ SPtr<const ObjectModel> object(const Raul::Path& path) const;
+ SPtr<const PluginModel> plugin(const Raul::URI& uri) const;
+ SPtr<const Resource> resource(const Raul::URI& uri) const;
void clear();
- typedef std::map< const Raul::URI, SharedPtr<PluginModel> > Plugins;
- SharedPtr<const Plugins> plugins() const { return _plugins; }
- SharedPtr<Plugins> plugins() { return _plugins; }
- void set_plugins(SharedPtr<Plugins> p) { _plugins = p; }
+ typedef std::map< const Raul::URI, SPtr<PluginModel> > Plugins;
+ SPtr<const Plugins> plugins() const { return _plugins; }
+ SPtr<Plugins> plugins() { return _plugins; }
+ void set_plugins(SPtr<Plugins> p) { _plugins = p; }
URIs& uris() { return _uris; }
@@ -104,21 +104,21 @@ public:
void response(int32_t id, Status status, const std::string& subject) {}
void error(const std::string& msg) {}
- INGEN_SIGNAL(new_object, void, SharedPtr<ObjectModel>);
- INGEN_SIGNAL(new_plugin, void, SharedPtr<PluginModel>);
+ INGEN_SIGNAL(new_object, void, SPtr<ObjectModel>);
+ INGEN_SIGNAL(new_plugin, void, SPtr<PluginModel>);
private:
- SharedPtr<ObjectModel> _object(const Raul::Path& path);
- SharedPtr<PluginModel> _plugin(const Raul::URI& uri);
- SharedPtr<Resource> _resource(const Raul::URI& uri);
+ SPtr<ObjectModel> _object(const Raul::Path& path);
+ SPtr<PluginModel> _plugin(const Raul::URI& uri);
+ SPtr<Resource> _resource(const Raul::URI& uri);
- void add_object(SharedPtr<ObjectModel> object);
- SharedPtr<ObjectModel> remove_object(const Raul::Path& path);
+ void add_object(SPtr<ObjectModel> object);
+ SPtr<ObjectModel> remove_object(const Raul::Path& path);
- void add_plugin(SharedPtr<PluginModel> plugin);
+ void add_plugin(SPtr<PluginModel> plugin);
- SharedPtr<GraphModel> connection_graph(const Raul::Path& tail_path,
- const Raul::Path& head_path);
+ SPtr<GraphModel> connection_graph(const Raul::Path& tail_path,
+ const Raul::Path& head_path);
void bundle_begin() {}
void bundle_end() {}
@@ -127,12 +127,12 @@ private:
bool attempt_connection(const Raul::Path& tail_path,
const Raul::Path& head_path);
- URIs& _uris;
- Log& _log;
- SharedPtr<Interface> _engine;
- SharedPtr<SigClientInterface> _emitter;
+ URIs& _uris;
+ Log& _log;
+ SPtr<Interface> _engine;
+ SPtr<SigClientInterface> _emitter;
- SharedPtr<Plugins> _plugins; ///< Map, keyed by plugin URI
+ SPtr<Plugins> _plugins; ///< Map, keyed by plugin URI
};
} // namespace Client
diff --git a/ingen/client/GraphModel.hpp b/ingen/client/GraphModel.hpp
index 996e9129..7a899ecb 100644
--- a/ingen/client/GraphModel.hpp
+++ b/ingen/client/GraphModel.hpp
@@ -18,7 +18,7 @@
#define INGEN_CLIENT_GRAPHMODEL_HPP
#include "ingen/client/BlockModel.hpp"
-#include "raul/SharedPtr.hpp"
+#include "ingen/types.hpp"
namespace Ingen {
namespace Client {
@@ -37,18 +37,18 @@ public:
GraphType graph_type() const { return Node::GraphType::GRAPH; }
- SharedPtr<ArcModel> get_arc(const Ingen::Node* tail,
- const Ingen::Node* head);
+ SPtr<ArcModel> get_arc(const Ingen::Node* tail,
+ const Ingen::Node* head);
bool enabled() const;
bool polyphonic() const;
uint32_t internal_poly() const;
// Signals
- INGEN_SIGNAL(new_block, void, SharedPtr<BlockModel>);
- INGEN_SIGNAL(removed_block, void, SharedPtr<BlockModel>);
- INGEN_SIGNAL(new_arc, void, SharedPtr<ArcModel>);
- INGEN_SIGNAL(removed_arc, void, SharedPtr<ArcModel>);
+ INGEN_SIGNAL(new_block, void, SPtr<BlockModel>);
+ INGEN_SIGNAL(removed_block, void, SPtr<BlockModel>);
+ INGEN_SIGNAL(new_arc, void, SPtr<ArcModel>);
+ INGEN_SIGNAL(removed_arc, void, SPtr<ArcModel>);
private:
friend class ClientStore;
@@ -58,10 +58,10 @@ private:
{}
void clear();
- void add_child(SharedPtr<ObjectModel> c);
- bool remove_child(SharedPtr<ObjectModel> c);
+ void add_child(SPtr<ObjectModel> c);
+ bool remove_child(SPtr<ObjectModel> c);
- void add_arc(SharedPtr<ArcModel> arc);
+ void add_arc(SPtr<ArcModel> arc);
void remove_arc(const Ingen::Node* tail,
const Ingen::Node* head);
};
diff --git a/ingen/client/ObjectModel.hpp b/ingen/client/ObjectModel.hpp
index 60e873e4..52655949 100644
--- a/ingen/client/ObjectModel.hpp
+++ b/ingen/client/ObjectModel.hpp
@@ -25,8 +25,8 @@
#include <cassert>
#include <cstdlib>
+#include "ingen/types.hpp"
#include "raul/Path.hpp"
-#include "raul/SharedPtr.hpp"
#include "raul/URI.hpp"
#include "ingen/Node.hpp"
@@ -63,16 +63,16 @@ public:
void on_property(const Raul::URI& uri, const Raul::Atom& value);
- const Raul::Path& path() const { return _path; }
- const Raul::Symbol& symbol() const { return _symbol; }
- SharedPtr<ObjectModel> parent() const { return _parent; }
- bool polyphonic() const;
+ const Raul::Path& path() const { return _path; }
+ const Raul::Symbol& symbol() const { return _symbol; }
+ SPtr<ObjectModel> parent() const { return _parent; }
+ bool polyphonic() const;
Node* graph_parent() const { return _parent.get(); }
// Signals
- INGEN_SIGNAL(new_child, void, SharedPtr<ObjectModel>);
- INGEN_SIGNAL(removed_child, void, SharedPtr<ObjectModel>);
+ INGEN_SIGNAL(new_child, void, SPtr<ObjectModel>);
+ INGEN_SIGNAL(removed_child, void, SPtr<ObjectModel>);
INGEN_SIGNAL(property, void, const Raul::URI&, const Raul::Atom&);
INGEN_SIGNAL(destroyed, void);
INGEN_SIGNAL(moved, void);
@@ -84,13 +84,13 @@ protected:
ObjectModel(const ObjectModel& copy);
virtual void set_path(const Raul::Path& p);
- virtual void set_parent(SharedPtr<ObjectModel> p);
- virtual void add_child(SharedPtr<ObjectModel> c) {}
- virtual bool remove_child(SharedPtr<ObjectModel> c) { return true; }
+ virtual void set_parent(SPtr<ObjectModel> p);
+ virtual void add_child(SPtr<ObjectModel> c) {}
+ virtual bool remove_child(SPtr<ObjectModel> c) { return true; }
- virtual void set(SharedPtr<ObjectModel> model);
+ virtual void set(SPtr<ObjectModel> model);
- SharedPtr<ObjectModel> _parent;
+ SPtr<ObjectModel> _parent;
private:
Raul::Path _path;
diff --git a/ingen/client/PluginModel.hpp b/ingen/client/PluginModel.hpp
index 4195dfe2..dea85651 100644
--- a/ingen/client/PluginModel.hpp
+++ b/ingen/client/PluginModel.hpp
@@ -26,8 +26,8 @@
#include "ingen/Resource.hpp"
#include "ingen/World.hpp"
#include "ingen/client/signal.hpp"
+#include "ingen/types.hpp"
#include "lilv/lilv.h"
-#include "raul/SharedPtr.hpp"
#include "raul/Symbol.hpp"
#include "sord/sordmm.hpp"
@@ -74,8 +74,8 @@ public:
bool has_ui() const;
- SharedPtr<PluginUI> ui(Ingen::World* world,
- SharedPtr<const BlockModel> block) const;
+ SPtr<PluginUI> ui(Ingen::World* world,
+ SPtr<const BlockModel> block) const;
const std::string& icon_path() const;
static std::string get_lv2_icon_path(const LilvPlugin* plugin);
@@ -95,7 +95,7 @@ public:
protected:
friend class ClientStore;
- void set(SharedPtr<PluginModel> p);
+ void set(SPtr<PluginModel> p);
private:
Type _type;
diff --git a/ingen/client/PluginUI.hpp b/ingen/client/PluginUI.hpp
index 60403570..b2a8bd6b 100644
--- a/ingen/client/PluginUI.hpp
+++ b/ingen/client/PluginUI.hpp
@@ -17,7 +17,7 @@
#ifndef INGEN_CLIENT_PLUGINUI_HPP
#define INGEN_CLIENT_PLUGINUI_HPP
-#include "raul/SharedPtr.hpp"
+#include "ingen/types.hpp"
#include "lilv/lilv.h"
@@ -42,9 +42,9 @@ class PluginUI {
public:
~PluginUI();
- static SharedPtr<PluginUI> create(Ingen::World* world,
- SharedPtr<const BlockModel> block,
- const LilvPlugin* plugin);
+ static SPtr<PluginUI> create(Ingen::World* world,
+ SPtr<const BlockModel> block,
+ const LilvPlugin* plugin);
SuilWidget get_widget();
@@ -55,22 +55,22 @@ public:
bool is_resizable() const;
- Ingen::World* world() const { return _world; }
- SharedPtr<const BlockModel> block() const { return _block; }
+ Ingen::World* world() const { return _world; }
+ SPtr<const BlockModel> block() const { return _block; }
private:
- PluginUI(Ingen::World* world,
- SharedPtr<const BlockModel> block,
- const LilvNode* ui_node);
+ PluginUI(Ingen::World* world,
+ SPtr<const BlockModel> block,
+ const LilvNode* ui_node);
- Ingen::World* _world;
- SharedPtr<const BlockModel> _block;
- SuilInstance* _instance;
- LilvNode* _ui_node;
+ Ingen::World* _world;
+ SPtr<const BlockModel> _block;
+ SuilInstance* _instance;
+ LilvNode* _ui_node;
static SuilHost* ui_host;
- SharedPtr<LV2Features::FeatureArray> _features;
+ SPtr<LV2Features::FeatureArray> _features;
};
} // namespace Client
diff --git a/ingen/client/PortModel.hpp b/ingen/client/PortModel.hpp
index 92379e6e..568975fc 100644
--- a/ingen/client/PortModel.hpp
+++ b/ingen/client/PortModel.hpp
@@ -20,7 +20,7 @@
#include <cstdlib>
#include <string>
-#include "raul/SharedPtr.hpp"
+#include "ingen/types.hpp"
#include "lv2/lv2plug.in/ns/ext/port-props/port-props.h"
#include "lv2/lv2plug.in/ns/lv2core/lv2.h"
@@ -71,8 +71,8 @@ public:
INGEN_SIGNAL(value_changed, void, const Raul::Atom&);
INGEN_SIGNAL(voice_changed, void, uint32_t, const Raul::Atom&);
INGEN_SIGNAL(activity, void, const Raul::Atom&);
- INGEN_SIGNAL(connection, void, SharedPtr<PortModel>);
- INGEN_SIGNAL(disconnection, void, SharedPtr<PortModel>);
+ INGEN_SIGNAL(connection, void, SPtr<PortModel>);
+ INGEN_SIGNAL(disconnection, void, SPtr<PortModel>);
private:
friend class ClientStore;
@@ -87,20 +87,20 @@ private:
, _connections(0)
{}
- void add_child(SharedPtr<ObjectModel> c) { throw; }
- bool remove_child(SharedPtr<ObjectModel> c) { throw; }
+ void add_child(SPtr<ObjectModel> c) { throw; }
+ bool remove_child(SPtr<ObjectModel> c) { throw; }
- void connected_to(SharedPtr<PortModel> p) {
+ void connected_to(SPtr<PortModel> p) {
++_connections;
_signal_connection.emit(p);
}
- void disconnected_from(SharedPtr<PortModel> p) {
+ void disconnected_from(SPtr<PortModel> p) {
--_connections;
_signal_disconnection.emit(p);
}
- void set(SharedPtr<ObjectModel> model);
+ void set(SPtr<ObjectModel> model);
uint32_t _index;
Direction _direction;
diff --git a/ingen/serialisation/Serialiser.hpp b/ingen/serialisation/Serialiser.hpp
index 979fee62..d0b65893 100644
--- a/ingen/serialisation/Serialiser.hpp
+++ b/ingen/serialisation/Serialiser.hpp
@@ -21,7 +21,6 @@
#include <string>
#include "raul/Path.hpp"
-#include "raul/SharedPtr.hpp"
#include "sord/sordmm.hpp"
@@ -49,23 +48,23 @@ public:
typedef Node::Properties Properties;
- virtual void to_file(SharedPtr<const Node> object,
- const std::string& filename);
+ virtual void to_file(SPtr<const Node> object,
+ const std::string& filename);
- virtual void write_bundle(SharedPtr<const Node> graph,
- const std::string& path);
+ virtual void write_bundle(SPtr<const Node> graph,
+ const std::string& path);
- virtual std::string to_string(SharedPtr<const Node> object,
- const std::string& base_uri);
+ virtual std::string to_string(SPtr<const Node> object,
+ const std::string& base_uri);
virtual void start_to_string(const Raul::Path& root,
const std::string& base_uri);
- virtual void serialise(SharedPtr<const Node> object)
+ virtual void serialise(SPtr<const Node> object)
throw (std::logic_error);
- virtual void serialise_arc(const Sord::Node& parent,
- SharedPtr<const Arc> arc)
+ virtual void serialise_arc(const Sord::Node& parent,
+ SPtr<const Arc> arc)
throw (std::logic_error);
virtual std::string finish();