summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-08-02 15:39:43 +0200
committerDavid Robillard <d@drobilla.net>2020-08-02 15:39:43 +0200
commitb979d48b8570610db121cabc6352a47145922f27 (patch)
tree859803be21f10398bd9cf06d04426bacc5c2ac73 /src/server
parentbdbdf42f3fe990c713c5437724db39274c387eee (diff)
downloadingen-b979d48b8570610db121cabc6352a47145922f27.tar.gz
ingen-b979d48b8570610db121cabc6352a47145922f27.tar.bz2
ingen-b979d48b8570610db121cabc6352a47145922f27.zip
Remove Raul::managed_ptr alias
Diffstat (limited to 'src/server')
-rw-r--r--src/server/BlockImpl.hpp20
-rw-r--r--src/server/CompiledGraph.cpp4
-rw-r--r--src/server/CompiledGraph.hpp6
-rw-r--r--src/server/DuplexPort.cpp12
-rw-r--r--src/server/DuplexPort.hpp12
-rw-r--r--src/server/GraphImpl.cpp9
-rw-r--r--src/server/GraphImpl.hpp25
-rw-r--r--src/server/InputPort.cpp18
-rw-r--r--src/server/InputPort.hpp17
-rw-r--r--src/server/LV2Block.hpp7
-rw-r--r--src/server/PortImpl.cpp11
-rw-r--r--src/server/PortImpl.hpp66
-rw-r--r--src/server/PreProcessContext.hpp6
-rw-r--r--src/server/events/Connect.hpp22
-rw-r--r--src/server/events/Copy.hpp12
-rw-r--r--src/server/events/CreateBlock.hpp14
-rw-r--r--src/server/events/CreateGraph.hpp4
-rw-r--r--src/server/events/CreatePort.cpp4
-rw-r--r--src/server/events/CreatePort.hpp22
-rw-r--r--src/server/events/Delete.hpp22
-rw-r--r--src/server/events/Delta.hpp32
-rw-r--r--src/server/events/Disconnect.hpp21
-rw-r--r--src/server/events/DisconnectAll.hpp16
-rw-r--r--src/server/events/Mark.cpp4
-rw-r--r--src/server/events/Mark.hpp5
-rw-r--r--src/server/internals/Note.hpp6
26 files changed, 199 insertions, 198 deletions
diff --git a/src/server/BlockImpl.hpp b/src/server/BlockImpl.hpp
index 9e9a09ad..674675a5 100644
--- a/src/server/BlockImpl.hpp
+++ b/src/server/BlockImpl.hpp
@@ -26,10 +26,10 @@
#include "ingen/Properties.hpp"
#include "ingen/Resource.hpp"
#include "ingen/URI.hpp"
-#include "ingen/memory.hpp"
#include "lilv/lilv.h"
#include "lv2/urid/urid.h"
#include "raul/Array.hpp"
+#include "raul/Maid.hpp"
#include <boost/intrusive/slist_hook.hpp>
#include <boost/optional/optional.hpp>
@@ -202,15 +202,15 @@ public:
protected:
PortImpl* nth_port_by_type(uint32_t n, bool input, PortType type);
- PluginImpl* _plugin;
- MPtr<Ports> _ports; ///< Access in audio thread only
- uint32_t _polyphony;
- std::set<BlockImpl*> _providers; ///< Blocks connected to this one's input ports
- std::set<BlockImpl*> _dependants; ///< Blocks this one's output ports are connected to
- Mark _mark; ///< Mark for graph compilation algorithm
- bool _polyphonic;
- bool _activated;
- bool _enabled;
+ PluginImpl* _plugin;
+ Raul::managed_ptr<Ports> _ports; ///< Access in audio thread only
+ uint32_t _polyphony;
+ std::set<BlockImpl*> _providers; ///< Blocks connected to this one's input ports
+ std::set<BlockImpl*> _dependants; ///< Blocks this one's output ports are connected to
+ Mark _mark; ///< Mark for graph compilation algorithm
+ bool _polyphonic;
+ bool _activated;
+ bool _enabled;
};
} // namespace server
diff --git a/src/server/CompiledGraph.cpp b/src/server/CompiledGraph.cpp
index 20bae0a5..75cdf0a8 100644
--- a/src/server/CompiledGraph.cpp
+++ b/src/server/CompiledGraph.cpp
@@ -25,7 +25,7 @@
#include "ingen/Configuration.hpp"
#include "ingen/Log.hpp"
#include "ingen/World.hpp"
-#include "ingen/memory.hpp"
+#include "raul/Maid.hpp"
#include <algorithm>
#include <cassert>
@@ -70,7 +70,7 @@ CompiledGraph::CompiledGraph(GraphImpl* graph)
compile_graph(graph);
}
-MPtr<CompiledGraph>
+Raul::managed_ptr<CompiledGraph>
CompiledGraph::compile(Raul::Maid& maid, GraphImpl& graph)
{
try {
diff --git a/src/server/CompiledGraph.hpp b/src/server/CompiledGraph.hpp
index 52178462..8642866a 100644
--- a/src/server/CompiledGraph.hpp
+++ b/src/server/CompiledGraph.hpp
@@ -19,7 +19,6 @@
#include "Task.hpp"
-#include "ingen/memory.hpp"
#include "raul/Maid.hpp"
#include "raul/Noncopyable.hpp"
@@ -45,7 +44,7 @@ class CompiledGraph : public Raul::Maid::Disposable
, public Raul::Noncopyable
{
public:
- static MPtr<CompiledGraph> compile(Raul::Maid& maid, GraphImpl& graph);
+ static Raul::managed_ptr<CompiledGraph> compile(Raul::Maid& maid, GraphImpl& graph);
void run(RunContext& ctx);
@@ -74,7 +73,8 @@ private:
std::unique_ptr<Task> _master;
};
-inline MPtr<CompiledGraph> compile(Raul::Maid& maid, GraphImpl& graph)
+inline Raul::managed_ptr<CompiledGraph>
+compile(Raul::Maid& maid, GraphImpl& graph)
{
return CompiledGraph::compile(maid, graph);
}
diff --git a/src/server/DuplexPort.cpp b/src/server/DuplexPort.cpp
index ec33459b..f7dd321b 100644
--- a/src/server/DuplexPort.cpp
+++ b/src/server/DuplexPort.cpp
@@ -29,8 +29,8 @@
#include "ingen/Node.hpp"
#include "ingen/Properties.hpp"
#include "ingen/URIs.hpp"
-#include "ingen/memory.hpp"
#include "raul/Array.hpp"
+#include "raul/Maid.hpp"
#include <algorithm>
#include <map>
@@ -144,11 +144,11 @@ DuplexPort::on_property(const URI& uri, const Atom& value)
}
bool
-DuplexPort::get_buffers(BufferFactory& bufs,
- PortImpl::GetFn get,
- const MPtr<Voices>& voices,
- uint32_t poly,
- size_t num_in_arcs) const
+DuplexPort::get_buffers(BufferFactory& bufs,
+ PortImpl::GetFn get,
+ const Raul::managed_ptr<Voices>& voices,
+ uint32_t poly,
+ size_t num_in_arcs) const
{
if (!_is_driver_port && is_output()) {
return InputPort::get_buffers(bufs, get, voices, poly, num_in_arcs);
diff --git a/src/server/DuplexPort.hpp b/src/server/DuplexPort.hpp
index 5dca573d..c7099d0f 100644
--- a/src/server/DuplexPort.hpp
+++ b/src/server/DuplexPort.hpp
@@ -23,8 +23,8 @@
#include "types.hpp"
#include "ingen/URI.hpp"
-#include "ingen/memory.hpp"
#include "lv2/urid/urid.h"
+#include "raul/Maid.hpp"
#include <boost/intrusive/slist_hook.hpp>
@@ -89,11 +89,11 @@ public:
bool apply_poly(RunContext& ctx, uint32_t poly) override;
- bool get_buffers(BufferFactory& bufs,
- PortImpl::GetFn get,
- const MPtr<Voices>& voices,
- uint32_t poly,
- size_t num_in_arcs) const override;
+ bool get_buffers(BufferFactory& bufs,
+ PortImpl::GetFn get,
+ const Raul::managed_ptr<Voices>& voices,
+ uint32_t poly,
+ size_t num_in_arcs) const override;
void set_is_driver_port(BufferFactory& bufs) override;
diff --git a/src/server/GraphImpl.cpp b/src/server/GraphImpl.cpp
index fca0ec4f..728337cd 100644
--- a/src/server/GraphImpl.cpp
+++ b/src/server/GraphImpl.cpp
@@ -29,7 +29,6 @@
#include "ingen/Forge.hpp"
#include "ingen/URIs.hpp"
#include "ingen/World.hpp"
-#include "ingen/memory.hpp"
#include "raul/Maid.hpp"
#include <cassert>
@@ -306,7 +305,7 @@ GraphImpl::has_arc(const PortImpl* tail, const PortImpl* dst_port) const
}
void
-GraphImpl::set_compiled_graph(MPtr<CompiledGraph>&& cg)
+GraphImpl::set_compiled_graph(Raul::managed_ptr<CompiledGraph>&& cg)
{
if (_compiled_graph && _compiled_graph != cg) {
_engine.reset_load();
@@ -359,13 +358,13 @@ GraphImpl::clear_ports()
_outputs.clear();
}
-MPtr<BlockImpl::Ports>
+Raul::managed_ptr<BlockImpl::Ports>
GraphImpl::build_ports_array(Raul::Maid& maid)
{
ThreadManager::assert_thread(THREAD_PRE_PROCESS);
- const size_t n = _inputs.size() + _outputs.size();
- MPtr<Ports> result = maid.make_managed<Ports>(n);
+ const size_t n = _inputs.size() + _outputs.size();
+ Raul::managed_ptr<Ports> result = maid.make_managed<Ports>(n);
std::map<size_t, DuplexPort*> ports;
for (auto& p : _inputs) {
diff --git a/src/server/GraphImpl.hpp b/src/server/GraphImpl.hpp
index 2ff4cdff..468cc865 100644
--- a/src/server/GraphImpl.hpp
+++ b/src/server/GraphImpl.hpp
@@ -22,6 +22,7 @@
#include "ThreadManager.hpp"
#include "lv2/urid/urid.h"
+#include "raul/Maid.hpp"
#include <cassert>
#include <cstdint>
@@ -167,13 +168,13 @@ public:
bool has_arc(const PortImpl* tail, const PortImpl* dst_port) const;
/** Set a new compiled graph to run, and return the old one. */
- void set_compiled_graph(MPtr<CompiledGraph>&& cg);
+ void set_compiled_graph(Raul::managed_ptr<CompiledGraph>&& cg);
- const MPtr<Ports>& external_ports() { return _ports; }
+ const Raul::managed_ptr<Ports>& external_ports() { return _ports; }
- void set_external_ports(MPtr<Ports>&& pa) { _ports = std::move(pa); }
+ void set_external_ports(Raul::managed_ptr<Ports>&& pa) { _ports = std::move(pa); }
- MPtr<Ports> build_ports_array(Raul::Maid& maid);
+ Raul::managed_ptr<Ports> build_ports_array(Raul::Maid& maid);
/** Whether to run this graph's DSP bits in the audio thread */
bool enabled() const { return _process; }
@@ -186,14 +187,14 @@ public:
Engine& engine() { return _engine; }
private:
- Engine& _engine;
- uint32_t _poly_pre; ///< Pre-process thread only
- uint32_t _poly_process; ///< Process thread only
- MPtr<CompiledGraph> _compiled_graph; ///< Process thread only
- PortList _inputs; ///< Pre-process thread only
- PortList _outputs; ///< Pre-process thread only
- Blocks _blocks; ///< Pre-process thread only
- bool _process; ///< True iff graph is enabled
+ Engine& _engine;
+ uint32_t _poly_pre; ///< Pre-process thread only
+ uint32_t _poly_process; ///< Process thread only
+ Raul::managed_ptr<CompiledGraph> _compiled_graph; ///< Process thread only
+ PortList _inputs; ///< Pre-process thread only
+ PortList _outputs; ///< Pre-process thread only
+ Blocks _blocks; ///< Pre-process thread only
+ bool _process; ///< True iff graph is enabled
};
} // namespace server
diff --git a/src/server/InputPort.cpp b/src/server/InputPort.cpp
index ab951aca..b66bc61d 100644
--- a/src/server/InputPort.cpp
+++ b/src/server/InputPort.cpp
@@ -29,8 +29,8 @@
#include "ingen/Atom.hpp"
#include "ingen/Node.hpp"
#include "ingen/URIs.hpp"
-#include "ingen/memory.hpp"
#include "raul/Array.hpp"
+#include "raul/Maid.hpp"
#include <cassert>
#include <cstdlib>
@@ -69,11 +69,11 @@ InputPort::apply_poly(RunContext& ctx, const uint32_t poly)
}
bool
-InputPort::get_buffers(BufferFactory& bufs,
- PortImpl::GetFn get,
- const MPtr<Voices>& voices,
- uint32_t poly,
- size_t num_in_arcs) const
+InputPort::get_buffers(BufferFactory& bufs,
+ PortImpl::GetFn get,
+ const Raul::managed_ptr<Voices>& voices,
+ uint32_t poly,
+ size_t num_in_arcs) const
{
if (is_a(PortType::ATOM) && !_value.is_valid()) {
poly = 1;
@@ -101,9 +101,9 @@ InputPort::get_buffers(BufferFactory& bufs,
}
bool
-InputPort::pre_get_buffers(BufferFactory& bufs,
- MPtr<Voices>& voices,
- uint32_t poly) const
+InputPort::pre_get_buffers(BufferFactory& bufs,
+ Raul::managed_ptr<Voices>& voices,
+ uint32_t poly) const
{
return get_buffers(bufs, &BufferFactory::get_buffer, voices, poly, _num_arcs);
}
diff --git a/src/server/InputPort.hpp b/src/server/InputPort.hpp
index 1bb29b9c..20fa84e2 100644
--- a/src/server/InputPort.hpp
+++ b/src/server/InputPort.hpp
@@ -23,6 +23,7 @@
#include "types.hpp"
#include "lv2/urid/urid.h"
+#include "raul/Maid.hpp"
#include <boost/intrusive/options.hpp>
#include <boost/intrusive/slist.hpp>
@@ -97,9 +98,9 @@ public:
* pre-process thread to allocate buffers for application of a
* connection/disconnection/etc in the next process cycle.
*/
- bool pre_get_buffers(BufferFactory& bufs,
- MPtr<Voices>& voices,
- uint32_t poly) const;
+ bool pre_get_buffers(BufferFactory& bufs,
+ Raul::managed_ptr<Voices>& voices,
+ uint32_t poly) const;
bool
setup_buffers(RunContext& ctx, BufferFactory& bufs, uint32_t poly) override;
@@ -123,11 +124,11 @@ public:
bool direct_connect() const;
protected:
- bool get_buffers(BufferFactory& bufs,
- PortImpl::GetFn get,
- const MPtr<Voices>& voices,
- uint32_t poly,
- size_t num_in_arcs) const override;
+ bool get_buffers(BufferFactory& bufs,
+ PortImpl::GetFn get,
+ const Raul::managed_ptr<Voices>& voices,
+ uint32_t poly,
+ size_t num_in_arcs) const override;
size_t _num_arcs; ///< Pre-process thread
Arcs _arcs; ///< Audio thread
diff --git a/src/server/LV2Block.hpp b/src/server/LV2Block.hpp
index 66bf8517..3cd6b056 100644
--- a/src/server/LV2Block.hpp
+++ b/src/server/LV2Block.hpp
@@ -22,7 +22,6 @@
#include "types.hpp"
#include "ingen/LV2Features.hpp"
-#include "ingen/memory.hpp"
#include "lilv/lilv.h"
#include "lv2/worker/worker.h"
#include "raul/Array.hpp"
@@ -113,7 +112,7 @@ protected:
using Instances = Raul::Array<std::shared_ptr<Instance>>;
- static void drop_instances(const MPtr<Instances>& instances) {
+ static void drop_instances(const Raul::managed_ptr<Instances>& instances) {
if (instances) {
for (size_t i = 0; i < instances->size(); ++i) {
(*instances)[i].reset();
@@ -149,8 +148,8 @@ protected:
LV2_Worker_Respond_Handle handle, uint32_t size, const void* data);
LV2Plugin* _lv2_plugin;
- MPtr<Instances> _instances;
- MPtr<Instances> _prepared_instances;
+ Raul::managed_ptr<Instances> _instances;
+ Raul::managed_ptr<Instances> _prepared_instances;
const LV2_Worker_Interface* _worker_iface;
std::mutex _work_mutex;
Responses _responses;
diff --git a/src/server/PortImpl.cpp b/src/server/PortImpl.cpp
index a6d2ff26..a7c7ae02 100644
--- a/src/server/PortImpl.cpp
+++ b/src/server/PortImpl.cpp
@@ -26,7 +26,6 @@
#include "ingen/Forge.hpp"
#include "ingen/URIs.hpp"
#include "ingen/World.hpp"
-#include "ingen/memory.hpp"
#include "lv2/atom/util.h"
#include "raul/Array.hpp"
#include "raul/Maid.hpp"
@@ -113,10 +112,10 @@ PortImpl::PortImpl(BufferFactory& bufs,
}
bool
-PortImpl::get_buffers(BufferFactory& bufs,
- GetFn get,
- const MPtr<Voices>& voices,
- uint32_t poly,
+PortImpl::get_buffers(BufferFactory& bufs,
+ GetFn get,
+ const Raul::managed_ptr<Voices>& voices,
+ uint32_t poly,
size_t) const
{
for (uint32_t v = 0; v < poly; ++v) {
@@ -213,7 +212,7 @@ PortImpl::deactivate()
}
void
-PortImpl::set_voices(RunContext&, MPtr<Voices>&& voices)
+PortImpl::set_voices(RunContext&, Raul::managed_ptr<Voices>&& voices)
{
_voices = std::move(voices);
connect_buffers();
diff --git a/src/server/PortImpl.hpp b/src/server/PortImpl.hpp
index 0c12f85d..0c21cd21 100644
--- a/src/server/PortImpl.hpp
+++ b/src/server/PortImpl.hpp
@@ -24,8 +24,8 @@
#include "types.hpp"
#include "ingen/Atom.hpp"
-#include "ingen/memory.hpp"
#include "raul/Array.hpp"
+#include "raul/Maid.hpp"
#include <atomic>
#include <cstdint>
@@ -104,7 +104,7 @@ public:
BlockImpl* parent_block() const { return reinterpret_cast<BlockImpl*>(_parent); }
/** Set the the voices (buffers) for this port in the audio thread. */
- void set_voices(RunContext& ctx, MPtr<Voices>&& voices);
+ void set_voices(RunContext& ctx, Raul::managed_ptr<Voices>&& voices);
/** Prepare for a new (external) polyphony value.
*
@@ -277,37 +277,37 @@ protected:
*
* @return true iff buffers are locally owned by the port
*/
- virtual bool get_buffers(BufferFactory& bufs,
- GetFn get,
- const MPtr<Voices>& voices,
- uint32_t poly,
- size_t num_in_arcs) const;
-
- BufferFactory& _bufs;
- uint32_t _index;
- uint32_t _poly;
- uint32_t _buffer_size;
- uint32_t _frames_since_monitor;
- float _monitor_value;
- float _peak;
- PortType _type;
- LV2_URID _buffer_type;
- Atom _value;
- Atom _min;
- Atom _max;
- MPtr<Voices> _voices;
- MPtr<Voices> _prepared_voices;
- BufferRef _user_buffer;
- std::atomic_flag _connected_flag;
- bool _monitored;
- bool _force_monitor_update;
- bool _is_morph;
- bool _is_auto_morph;
- bool _is_logarithmic;
- bool _is_sample_rate;
- bool _is_toggled;
- bool _is_driver_port;
- bool _is_output;
+ virtual bool get_buffers(BufferFactory& bufs,
+ GetFn get,
+ const Raul::managed_ptr<Voices>& voices,
+ uint32_t poly,
+ size_t num_in_arcs) const;
+
+ BufferFactory& _bufs;
+ uint32_t _index;
+ uint32_t _poly;
+ uint32_t _buffer_size;
+ uint32_t _frames_since_monitor;
+ float _monitor_value;
+ float _peak;
+ PortType _type;
+ LV2_URID _buffer_type;
+ Atom _value;
+ Atom _min;
+ Atom _max;
+ Raul::managed_ptr<Voices> _voices;
+ Raul::managed_ptr<Voices> _prepared_voices;
+ BufferRef _user_buffer;
+ std::atomic_flag _connected_flag;
+ bool _monitored;
+ bool _force_monitor_update;
+ bool _is_morph;
+ bool _is_auto_morph;
+ bool _is_logarithmic;
+ bool _is_sample_rate;
+ bool _is_toggled;
+ bool _is_driver_port;
+ bool _is_output;
};
} // namespace server
diff --git a/src/server/PreProcessContext.hpp b/src/server/PreProcessContext.hpp
index 558349f8..2e717c55 100644
--- a/src/server/PreProcessContext.hpp
+++ b/src/server/PreProcessContext.hpp
@@ -20,7 +20,7 @@
#include "CompiledGraph.hpp"
#include "GraphImpl.hpp"
-#include "ingen/memory.hpp"
+#include "raul/Maid.hpp"
#include <unordered_set>
@@ -65,7 +65,9 @@ public:
* This may return null when an atomic bundle is deferring compilation, in
* which case the graph is flagged as dirty for later compilation.
*/
- MPtr<CompiledGraph> maybe_compile(Raul::Maid& maid, GraphImpl& graph) {
+ Raul::managed_ptr<CompiledGraph>
+ maybe_compile(Raul::Maid& maid, GraphImpl& graph)
+ {
if (must_compile(graph)) {
return compile(maid, graph);
}
diff --git a/src/server/events/Connect.hpp b/src/server/events/Connect.hpp
index 217860ac..80b8563c 100644
--- a/src/server/events/Connect.hpp
+++ b/src/server/events/Connect.hpp
@@ -22,7 +22,7 @@
#include "PortImpl.hpp"
#include "types.hpp"
-#include "ingen/memory.hpp"
+#include "raul/Maid.hpp"
#include <memory>
@@ -53,16 +53,16 @@ public:
void undo(Interface& target) override;
private:
- const ingen::Connect _msg;
- GraphImpl* _graph;
- InputPort* _head;
- MPtr<CompiledGraph> _compiled_graph;
- std::shared_ptr<ArcImpl> _arc;
- MPtr<PortImpl::Voices> _voices;
- Properties _tail_remove;
- Properties _tail_add;
- Properties _head_remove;
- Properties _head_add;
+ const ingen::Connect _msg;
+ GraphImpl* _graph;
+ InputPort* _head;
+ Raul::managed_ptr<CompiledGraph> _compiled_graph;
+ std::shared_ptr<ArcImpl> _arc;
+ Raul::managed_ptr<PortImpl::Voices> _voices;
+ Properties _tail_remove;
+ Properties _tail_add;
+ Properties _head_remove;
+ Properties _head_add;
};
} // namespace events
diff --git a/src/server/events/Copy.hpp b/src/server/events/Copy.hpp
index fb788873..dbe6a29b 100644
--- a/src/server/events/Copy.hpp
+++ b/src/server/events/Copy.hpp
@@ -20,7 +20,7 @@
#include "CompiledGraph.hpp"
#include "Event.hpp"
-#include "ingen/memory.hpp"
+#include "raul/Maid.hpp"
#include <memory>
@@ -54,11 +54,11 @@ private:
bool engine_to_filesystem(PreProcessContext& ctx);
bool filesystem_to_engine(PreProcessContext& ctx);
- const ingen::Copy _msg;
- std::shared_ptr<BlockImpl> _old_block;
- GraphImpl* _parent;
- BlockImpl* _block;
- MPtr<CompiledGraph> _compiled_graph;
+ const ingen::Copy _msg;
+ std::shared_ptr<BlockImpl> _old_block;
+ GraphImpl* _parent;
+ BlockImpl* _block;
+ Raul::managed_ptr<CompiledGraph> _compiled_graph;
};
} // namespace events
diff --git a/src/server/events/CreateBlock.hpp b/src/server/events/CreateBlock.hpp
index dc2efa58..91ccee1b 100644
--- a/src/server/events/CreateBlock.hpp
+++ b/src/server/events/CreateBlock.hpp
@@ -21,7 +21,7 @@
#include "CompiledGraph.hpp"
#include "Event.hpp"
-#include "ingen/memory.hpp"
+#include "raul/Maid.hpp"
#include <cstdint>
#include <memory>
@@ -54,12 +54,12 @@ public:
void undo(Interface& target) override;
private:
- Raul::Path _path;
- Properties& _properties;
- ClientUpdate _update;
- GraphImpl* _graph;
- BlockImpl* _block;
- MPtr<CompiledGraph> _compiled_graph;
+ Raul::Path _path;
+ Properties& _properties;
+ ClientUpdate _update;
+ GraphImpl* _graph;
+ BlockImpl* _block;
+ Raul::managed_ptr<CompiledGraph> _compiled_graph;
};
} // namespace events
diff --git a/src/server/events/CreateGraph.hpp b/src/server/events/CreateGraph.hpp
index ea24891d..0643d8be 100644
--- a/src/server/events/CreateGraph.hpp
+++ b/src/server/events/CreateGraph.hpp
@@ -21,7 +21,7 @@
#include "CompiledGraph.hpp"
#include "Event.hpp"
-#include "ingen/memory.hpp"
+#include "raul/Maid.hpp"
#include <cstdint>
#include <list>
@@ -63,7 +63,7 @@ private:
ClientUpdate _update;
GraphImpl* _graph;
GraphImpl* _parent;
- MPtr<CompiledGraph> _compiled_graph;
+ Raul::managed_ptr<CompiledGraph> _compiled_graph;
std::list<std::unique_ptr<Event>> _child_events;
};
diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp
index 2cf66386..d164b541 100644
--- a/src/server/events/CreatePort.cpp
+++ b/src/server/events/CreatePort.cpp
@@ -30,8 +30,8 @@
#include "ingen/URIMap.hpp"
#include "ingen/URIs.hpp"
#include "ingen/World.hpp"
-#include "ingen/memory.hpp"
#include "raul/Array.hpp"
+#include "raul/Maid.hpp"
#include "raul/Path.hpp"
#include <cassert>
@@ -185,7 +185,7 @@ void
CreatePort::execute(RunContext& ctx)
{
if (_status == Status::SUCCESS) {
- const MPtr<GraphImpl::Ports>& old_ports = _graph->external_ports();
+ const auto& old_ports = _graph->external_ports();
if (old_ports) {
for (uint32_t i = 0; i < old_ports->size(); ++i) {
const auto* const old_port = (*old_ports)[i];
diff --git a/src/server/events/CreatePort.hpp b/src/server/events/CreatePort.hpp
index c0f57655..f1b278d5 100644
--- a/src/server/events/CreatePort.hpp
+++ b/src/server/events/CreatePort.hpp
@@ -21,8 +21,8 @@
#include "Event.hpp"
#include "PortType.hpp"
-#include "ingen/memory.hpp"
#include "lv2/urid/urid.h"
+#include "raul/Maid.hpp"
#include "raul/Path.hpp"
#include <boost/optional/optional.hpp>
@@ -64,16 +64,16 @@ private:
OUTPUT
};
- Raul::Path _path;
- PortType _port_type;
- LV2_URID _buf_type;
- GraphImpl* _graph;
- DuplexPort* _graph_port;
- MPtr<BlockImpl::Ports> _ports_array; ///< New external port array for Graph
- EnginePort* _engine_port; ///< Driver port if on the root
- Properties _properties;
- Properties _update;
- boost::optional<Flow> _flow;
+ Raul::Path _path;
+ PortType _port_type;
+ LV2_URID _buf_type;
+ GraphImpl* _graph;
+ DuplexPort* _graph_port;
+ Raul::managed_ptr<BlockImpl::Ports> _ports_array; ///< New external port array for Graph
+ EnginePort* _engine_port; ///< Driver port if on the root
+ Properties _properties;
+ Properties _update;
+ boost::optional<Flow> _flow;
};
} // namespace events
diff --git a/src/server/events/Delete.hpp b/src/server/events/Delete.hpp
index bda7a784..40972d42 100644
--- a/src/server/events/Delete.hpp
+++ b/src/server/events/Delete.hpp
@@ -22,7 +22,7 @@
#include "GraphImpl.hpp"
#include "ingen/Store.hpp"
-#include "ingen/memory.hpp"
+#include "raul/Maid.hpp"
#include <cstdint>
#include <map>
@@ -63,16 +63,16 @@ private:
using IndexChange = std::pair<uint32_t, uint32_t>;
using IndexChanges = std::map<Raul::Path, IndexChange>;
- const ingen::Del _msg;
- Raul::Path _path;
- std::shared_ptr<BlockImpl> _block; ///< Non-null iff a block
- std::shared_ptr<DuplexPort> _port; ///< Non-null iff a port
- EnginePort* _engine_port;
- MPtr<GraphImpl::Ports> _ports_array; ///< New (external) ports for Graph
- MPtr<CompiledGraph> _compiled_graph; ///< Graph's new process order
- std::unique_ptr<DisconnectAll> _disconnect_event;
- Store::Objects _removed_objects;
- IndexChanges _port_index_changes;
+ const ingen::Del _msg;
+ Raul::Path _path;
+ std::shared_ptr<BlockImpl> _block; ///< Non-null iff a block
+ std::shared_ptr<DuplexPort> _port; ///< Non-null iff a port
+ EnginePort* _engine_port;
+ Raul::managed_ptr<GraphImpl::Ports> _ports_array; ///< New (external) ports for Graph
+ Raul::managed_ptr<CompiledGraph> _compiled_graph; ///< Graph's new process order
+ std::unique_ptr<DisconnectAll> _disconnect_event;
+ Store::Objects _removed_objects;
+ IndexChanges _port_index_changes;
std::vector<ControlBindings::Binding*> _removed_bindings;
};
diff --git a/src/server/events/Delta.hpp b/src/server/events/Delta.hpp
index 40c3cc27..1a7c2005 100644
--- a/src/server/events/Delta.hpp
+++ b/src/server/events/Delta.hpp
@@ -21,8 +21,8 @@
#include "ControlBindings.hpp"
#include "Event.hpp"
-#include "ingen/memory.hpp"
#include "lilv/lilv.h"
+#include "raul/Maid.hpp"
#include <boost/optional/optional.hpp>
@@ -97,21 +97,21 @@ private:
void init();
- std::unique_ptr<Event> _create_event;
- SetEvents _set_events;
- std::vector<SpecialType> _types;
- std::vector<SpecialType> _remove_types;
- URI _subject;
- Properties _properties;
- Properties _remove;
- ClientUpdate _update;
- ingen::Resource* _object;
- GraphImpl* _graph;
- MPtr<CompiledGraph> _compiled_graph;
- ControlBindings::Binding* _binding;
- LilvState* _state;
- Resource::Graph _context;
- Type _type;
+ std::unique_ptr<Event> _create_event;
+ SetEvents _set_events;
+ std::vector<SpecialType> _types;
+ std::vector<SpecialType> _remove_types;
+ URI _subject;
+ Properties _properties;
+ Properties _remove;
+ ClientUpdate _update;
+ ingen::Resource* _object;
+ GraphImpl* _graph;
+ Raul::managed_ptr<CompiledGraph> _compiled_graph;
+ ControlBindings::Binding* _binding;
+ LilvState* _state;
+ Resource::Graph _context;
+ Type _type;
Properties _added;
Properties _removed;
diff --git a/src/server/events/Disconnect.hpp b/src/server/events/Disconnect.hpp
index 8b43d0d0..c4cd32c4 100644
--- a/src/server/events/Disconnect.hpp
+++ b/src/server/events/Disconnect.hpp
@@ -20,9 +20,10 @@
#include "CompiledGraph.hpp"
#include "Event.hpp"
#include "PortImpl.hpp"
-#include "ingen/memory.hpp"
#include "types.hpp"
+#include "raul/Maid.hpp"
+
#include <memory>
namespace ingen {
@@ -60,18 +61,18 @@ public:
inline InputPort* head() { return _head; }
private:
- Engine& _engine;
- PortImpl* _tail;
- InputPort* _head;
- std::shared_ptr<ArcImpl> _arc;
- MPtr<PortImpl::Voices> _voices;
+ Engine& _engine;
+ PortImpl* _tail;
+ InputPort* _head;
+ std::shared_ptr<ArcImpl> _arc;
+ Raul::managed_ptr<PortImpl::Voices> _voices;
};
private:
- const ingen::Disconnect _msg;
- GraphImpl* _graph;
- std::unique_ptr<Impl> _impl;
- MPtr<CompiledGraph> _compiled_graph;
+ const ingen::Disconnect _msg;
+ GraphImpl* _graph;
+ std::unique_ptr<Impl> _impl;
+ Raul::managed_ptr<CompiledGraph> _compiled_graph;
};
} // namespace events
diff --git a/src/server/events/DisconnectAll.hpp b/src/server/events/DisconnectAll.hpp
index 9080d3e7..2b5bc589 100644
--- a/src/server/events/DisconnectAll.hpp
+++ b/src/server/events/DisconnectAll.hpp
@@ -21,7 +21,7 @@
#include "Disconnect.hpp"
#include "Event.hpp"
-#include "ingen/memory.hpp"
+#include "raul/Maid.hpp"
#include "raul/Path.hpp"
#include <list>
@@ -64,13 +64,13 @@ public:
private:
using Impls = std::list<Disconnect::Impl*>;
- const ingen::DisconnectAll _msg;
- GraphImpl* _parent;
- BlockImpl* _block;
- PortImpl* _port;
- Impls _impls;
- MPtr<CompiledGraph> _compiled_graph;
- bool _deleting;
+ const ingen::DisconnectAll _msg;
+ GraphImpl* _parent;
+ BlockImpl* _block;
+ PortImpl* _port;
+ Impls _impls;
+ Raul::managed_ptr<CompiledGraph> _compiled_graph;
+ bool _deleting;
};
} // namespace events
diff --git a/src/server/events/Mark.cpp b/src/server/events/Mark.cpp
index 8db6335c..5006c035 100644
--- a/src/server/events/Mark.cpp
+++ b/src/server/events/Mark.cpp
@@ -20,8 +20,6 @@
#include "PreProcessContext.hpp"
#include "UndoStack.hpp"
-#include "ingen/memory.hpp"
-
#include <memory>
#include <utility>
@@ -79,7 +77,7 @@ Mark::pre_process(PreProcessContext& ctx)
ctx.set_in_bundle(false);
if (!ctx.dirty_graphs().empty()) {
for (GraphImpl* g : ctx.dirty_graphs()) {
- MPtr<CompiledGraph> cg = compile(*_engine.maid(), *g);
+ auto cg = compile(*_engine.maid(), *g);
if (cg) {
_compiled_graphs.emplace(g, std::move(cg));
}
diff --git a/src/server/events/Mark.hpp b/src/server/events/Mark.hpp
index b6279f0c..46587b76 100644
--- a/src/server/events/Mark.hpp
+++ b/src/server/events/Mark.hpp
@@ -19,7 +19,7 @@
#include "Event.hpp"
-#include "ingen/memory.hpp"
+#include "raul/Maid.hpp"
#include <map>
#include <memory>
@@ -63,7 +63,8 @@ public:
private:
enum class Type { BUNDLE_BEGIN, BUNDLE_END };
- using CompiledGraphs = std::map<GraphImpl*, MPtr<CompiledGraph>>;
+ using CompiledGraphs =
+ std::map<GraphImpl*, Raul::managed_ptr<CompiledGraph>>;
CompiledGraphs _compiled_graphs;
Type _type;
diff --git a/src/server/internals/Note.hpp b/src/server/internals/Note.hpp
index f101d466..cb41c37c 100644
--- a/src/server/internals/Note.hpp
+++ b/src/server/internals/Note.hpp
@@ -20,7 +20,7 @@
#include "InternalBlock.hpp"
#include "types.hpp"
-#include "ingen/memory.hpp"
+#include "raul/Maid.hpp"
#include <cstdint>
#include <memory>
@@ -91,8 +91,8 @@ private:
void free_voice(RunContext& ctx, uint32_t voice, FrameTime time);
- MPtr<Voices> _voices;
- MPtr<Voices> _prepared_voices;
+ Raul::managed_ptr<Voices> _voices;
+ Raul::managed_ptr<Voices> _prepared_voices;
Key _keys[128];
bool _sustain; ///< Whether or not hold pedal is depressed