diff options
92 files changed, 346 insertions, 95 deletions
diff --git a/.clant.json b/.clant.json new file mode 100644 index 00000000..31430d0a --- /dev/null +++ b/.clant.json @@ -0,0 +1,8 @@ +{ + "version": "1.0.0", + "mapping_files": [ + "boost-1.64-all.imp", + "boost-1.64-all-private.imp", + ".includes.imp" + ] +} diff --git a/.includes.imp b/.includes.imp new file mode 100644 index 00000000..65bf186b --- /dev/null +++ b/.includes.imp @@ -0,0 +1,22 @@ +[ + { "symbol": [ "fmt::format", "private", "<fmt/core.h>", "public" ] }, + { "symbol": [ "std::exception", "private", "<exception>", "public" ] }, + { "symbol": [ "std::ifstream", "private", "<fstream>", "public" ] }, + { "symbol": [ "std::ostream", "private", "<ostream>", "public" ] }, + { "symbol": [ "std::ostream", "private", "<iosfwd>", "public" ] }, + { "symbol": [ "posix_memalign", "private", "<stdlib.h>", "public" ] }, + { "symbol": [ "std::stringstream", "private", "<sstream>", "public" ] }, + { "symbol": [ "sched_param", "private", "<sched.h>", "public" ] }, + { "symbol": [ "clockid_t", "private", "<time.h>", "public" ] }, + { "symbol": [ "clockid_t", "private", "<sys/types.h>", "public" ] }, + { "symbol": [ "LilvWorld", "private", "\"lilv/lilv.h\"", "public" ] }, + + { "symbol": [ "boost::intrusive::constant_time_size", "private", + "<boost/intrusive/options.hpp>", "public" ] }, + + { "symbol": [ "boost::intrusive::cache_last", "private", + "<boost/intrusive/options.hpp>", "public" ] }, + + { "include": [ "<ext/alloc_traits.h>", "private", "<string>", "public", ] }, + { "include": [ "<ext/alloc_traits.h>", "private", "<vector>", "public", ] }, +] diff --git a/include/ingen/AtomForge.hpp b/include/ingen/AtomForge.hpp index 372fd29d..bc44b698 100644 --- a/include/ingen/AtomForge.hpp +++ b/include/ingen/AtomForge.hpp @@ -21,6 +21,8 @@ #include "lv2/atom/atom.h" #include "lv2/atom/forge.h" #include "lv2/atom/util.h" +#include "lv2/urid/urid.h" +#include "sord/sord.h" #include "sord/sordmm.hpp" #include "sratom/sratom.h" @@ -81,8 +83,10 @@ private: // Update size and reallocate if necessary if (lv2_atom_pad_size(_size + len) > _capacity) { _capacity = lv2_atom_pad_size(_size + len); - _buf = AtomPtr{ - static_cast<LV2_Atom*>(realloc(_buf.release(), _capacity))}; + + _buf = AtomPtr{static_cast<LV2_Atom*>( + realloc(_buf.release(), _capacity)), + FreeDeleter<LV2_Atom>{}}; } // Append new data diff --git a/include/ingen/Clock.hpp b/include/ingen/Clock.hpp index 622dd4bf..deea0495 100644 --- a/include/ingen/Clock.hpp +++ b/include/ingen/Clock.hpp @@ -22,7 +22,6 @@ # include <mach/mach_time.h> #else # include <ctime> -# include <sys/time.h> #endif #include <cstdint> diff --git a/include/ingen/DataAccess.hpp b/include/ingen/DataAccess.hpp index 1763c54f..3ea70eff 100644 --- a/include/ingen/DataAccess.hpp +++ b/include/ingen/DataAccess.hpp @@ -27,7 +27,6 @@ #include <cstdlib> #include <memory> -#include <utility> namespace ingen { diff --git a/include/ingen/FilePath.hpp b/include/ingen/FilePath.hpp index c82b738d..3d077266 100644 --- a/include/ingen/FilePath.hpp +++ b/include/ingen/FilePath.hpp @@ -19,7 +19,7 @@ #include "ingen/ingen.h" -#include <boost/utility/string_view.hpp> +#include <boost/utility/string_view.hpp> // IWYU pragma: export #include <ostream> #include <string> diff --git a/include/ingen/InstanceAccess.hpp b/include/ingen/InstanceAccess.hpp index ef8b3be0..e108d7d5 100644 --- a/include/ingen/InstanceAccess.hpp +++ b/include/ingen/InstanceAccess.hpp @@ -25,7 +25,6 @@ #include "lv2/core/lv2.h" #include <memory> -#include <utility> namespace ingen { diff --git a/include/ingen/Log.hpp b/include/ingen/Log.hpp index ae8e7539..5310c768 100644 --- a/include/ingen/Log.hpp +++ b/include/ingen/Log.hpp @@ -18,7 +18,7 @@ #define INGEN_LOG_HPP #include "ingen/LV2Features.hpp" -#include "ingen/fmt.hpp" +#include "ingen/fmt.hpp" // IWYU pragma: export #include "ingen/ingen.h" #include "lv2/core/lv2.h" #include "lv2/log/log.h" diff --git a/include/ingen/Message.hpp b/include/ingen/Message.hpp index 09444d4a..ad524390 100644 --- a/include/ingen/Message.hpp +++ b/include/ingen/Message.hpp @@ -21,6 +21,7 @@ #include "ingen/Properties.hpp" #include "ingen/Resource.hpp" #include "ingen/Status.hpp" +#include "ingen/URI.hpp" #include "raul/Path.hpp" #include <boost/variant/variant.hpp> diff --git a/include/ingen/Module.hpp b/include/ingen/Module.hpp index 88f4afcd..b540fe7d 100644 --- a/include/ingen/Module.hpp +++ b/include/ingen/Module.hpp @@ -17,7 +17,6 @@ #ifndef INGEN_MODULE_HPP #define INGEN_MODULE_HPP -#include "ingen/FilePath.hpp" #include "ingen/Library.hpp" #include "ingen/ingen.h" diff --git a/include/ingen/Node.hpp b/include/ingen/Node.hpp index 1a6b102a..39b33596 100644 --- a/include/ingen/Node.hpp +++ b/include/ingen/Node.hpp @@ -18,6 +18,7 @@ #define INGEN_NODE_HPP #include "ingen/Resource.hpp" +#include "ingen/URI.hpp" #include "ingen/ingen.h" #include "ingen/paths.hpp" #include "lilv/lilv.h" @@ -37,7 +38,6 @@ namespace ingen { class Arc; class FilePath; -class Store; class URIs; /** A node in the audio graph. diff --git a/include/ingen/Parser.hpp b/include/ingen/Parser.hpp index 45d087cd..03175318 100644 --- a/include/ingen/Parser.hpp +++ b/include/ingen/Parser.hpp @@ -18,11 +18,11 @@ #define INGEN_PARSER_HPP #include "ingen/FilePath.hpp" -#include "ingen/Properties.hpp" +#include "ingen/Properties.hpp" // IWYU pragma: keep #include "ingen/URI.hpp" #include "ingen/ingen.h" -#include "raul/Path.hpp" -#include "raul/Symbol.hpp" +#include "raul/Path.hpp" // IWYU pragma: keep +#include "raul/Symbol.hpp" // IWYU pragma: keep #include <boost/optional/optional.hpp> diff --git a/include/ingen/Properties.hpp b/include/ingen/Properties.hpp index cd81ba59..1a80d0af 100644 --- a/include/ingen/Properties.hpp +++ b/include/ingen/Properties.hpp @@ -18,6 +18,7 @@ #define INGEN_PROPERTIES_HPP #include "ingen/Atom.hpp" +#include "ingen/URI.hpp" #include "ingen/URIs.hpp" #include <initializer_list> diff --git a/include/ingen/QueuedInterface.hpp b/include/ingen/QueuedInterface.hpp index e1818232..97fbb731 100644 --- a/include/ingen/QueuedInterface.hpp +++ b/include/ingen/QueuedInterface.hpp @@ -19,9 +19,12 @@ #include "ingen/Interface.hpp" #include "ingen/Message.hpp" +#include "ingen/URI.hpp" +#include <algorithm> #include <memory> #include <mutex> +#include <utility> #include <vector> namespace ingen { diff --git a/include/ingen/Tee.hpp b/include/ingen/Tee.hpp index 46062493..1e6805cc 100644 --- a/include/ingen/Tee.hpp +++ b/include/ingen/Tee.hpp @@ -19,8 +19,8 @@ #include "ingen/Interface.hpp" #include "ingen/Message.hpp" +#include "ingen/URI.hpp" -#include <cstddef> #include <memory> #include <mutex> #include <utility> diff --git a/include/ingen/URI.hpp b/include/ingen/URI.hpp index aec6587d..b8108224 100644 --- a/include/ingen/URI.hpp +++ b/include/ingen/URI.hpp @@ -22,8 +22,8 @@ #include "serd/serd.h" #include "sord/sordmm.hpp" -#include <boost/utility/string_view.hpp> -#include <boost/utility/string_view_fwd.hpp> +#include <boost/utility/string_view.hpp> // IWYU pragma: export +#include <boost/utility/string_view_fwd.hpp> // IWYU pragma: export #include <cstddef> #include <cstdint> diff --git a/include/ingen/World.hpp b/include/ingen/World.hpp index a138a95c..bff5f213 100644 --- a/include/ingen/World.hpp +++ b/include/ingen/World.hpp @@ -18,6 +18,7 @@ #define INGEN_WORLD_HPP #include "ingen/ingen.h" +#include "lilv/lilv.h" #include "lv2/log/log.h" #include "lv2/urid/urid.h" #include "raul/Noncopyable.hpp" diff --git a/include/ingen/client/SocketClient.hpp b/include/ingen/client/SocketClient.hpp index 9b10ac29..0e651250 100644 --- a/include/ingen/client/SocketClient.hpp +++ b/include/ingen/client/SocketClient.hpp @@ -20,12 +20,20 @@ #include "ingen/Log.hpp" #include "ingen/SocketReader.hpp" #include "ingen/SocketWriter.hpp" +#include "ingen/URI.hpp" +#include "ingen/World.hpp" #include "ingen/ingen.h" #include "raul/Socket.hpp" +#include <cerrno> +#include <cstring> #include <memory> +#include <string> namespace ingen { + +class Interface; + namespace client { /** The client side of an Ingen socket connection. */ diff --git a/include/ingen/filesystem.hpp b/include/ingen/filesystem.hpp index 44b9148e..abe7684e 100644 --- a/include/ingen/filesystem.hpp +++ b/include/ingen/filesystem.hpp @@ -27,14 +27,16 @@ # include <io.h> # define F_OK 0 # define mkdir(path, flags) _mkdir(path) +#else +# include <unistd.h> #endif +#include <sys/stat.h> + +#include <algorithm> #include <cerrno> -#include <climits> #include <cstdlib> #include <memory> -#include <sys/stat.h> -#include <sys/types.h> #include <vector> /* A minimal subset of the std::filesystem API from C++17. */ diff --git a/include/ingen/fmt.hpp b/include/ingen/fmt.hpp index 3c792d3d..b2924d29 100644 --- a/include/ingen/fmt.hpp +++ b/include/ingen/fmt.hpp @@ -17,7 +17,7 @@ #ifndef INGEN_FMT_HPP #define INGEN_FMT_HPP -#include <boost/format.hpp> +#include <boost/format.hpp> // IWYU pragma: export #include <initializer_list> #include <string> diff --git a/include/ingen/memory.hpp b/include/ingen/memory.hpp index 8b5a5140..82e98bdf 100644 --- a/include/ingen/memory.hpp +++ b/include/ingen/memory.hpp @@ -19,6 +19,7 @@ #include <cstdlib> #include <memory> +#include <utility> namespace ingen { diff --git a/src/AtomWriter.cpp b/src/AtomWriter.cpp index ded2ba2c..fe4d2326 100644 --- a/src/AtomWriter.cpp +++ b/src/AtomWriter.cpp @@ -68,6 +68,7 @@ #include <cassert> #include <cstdint> +#include <map> #include <string> #include <utility> diff --git a/src/World.cpp b/src/World.cpp index de52dfa0..eb1674fc 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -44,7 +44,6 @@ #include <list> #include <map> #include <memory> -#include <sstream> #include <string> #include <utility> diff --git a/src/ingen/ingen.cpp b/src/ingen/ingen.cpp index 74fbe73d..98fdd555 100644 --- a/src/ingen/ingen.cpp +++ b/src/ingen/ingen.cpp @@ -35,10 +35,13 @@ #include "ingen/client/SocketClient.hpp" #endif +#include <boost/optional/optional.hpp> + #include <chrono> #include <csignal> #include <cstdint> #include <cstdlib> +#include <exception> #include <iostream> #include <memory> #include <mutex> diff --git a/src/server/ArcImpl.hpp b/src/server/ArcImpl.hpp index f54e806d..3545a177 100644 --- a/src/server/ArcImpl.hpp +++ b/src/server/ArcImpl.hpp @@ -17,16 +17,21 @@ #ifndef INGEN_ENGINE_ARC_IMPL_HPP #define INGEN_ENGINE_ARC_IMPL_HPP +// IWYU pragma: no_include "raul/Path.hpp" + #include "BufferRef.hpp" #include "ingen/Arc.hpp" #include "raul/Noncopyable.hpp" -#include "raul/Path.hpp" #include <boost/intrusive/slist_hook.hpp> #include <cstdint> +namespace Raul { +class Path; // IWYU pragma: keep +} // namespace Raul + namespace ingen { namespace server { diff --git a/src/server/BlockImpl.cpp b/src/server/BlockImpl.cpp index a723547c..cea69976 100644 --- a/src/server/BlockImpl.cpp +++ b/src/server/BlockImpl.cpp @@ -33,9 +33,6 @@ #include <string> namespace ingen { - -class Resource; - namespace server { BlockImpl::BlockImpl(PluginImpl* plugin, diff --git a/src/server/BlockImpl.hpp b/src/server/BlockImpl.hpp index f6c72c8e..293c98c0 100644 --- a/src/server/BlockImpl.hpp +++ b/src/server/BlockImpl.hpp @@ -25,6 +25,7 @@ #include "ingen/Node.hpp" #include "ingen/Properties.hpp" +#include "ingen/Resource.hpp" #include "ingen/URI.hpp" #include "lilv/lilv.h" #include "lv2/urid/urid.h" @@ -43,9 +44,6 @@ class Symbol; } // namespace Raul namespace ingen { - -class Resource; - namespace server { class BufferFactory; diff --git a/src/server/Broadcaster.cpp b/src/server/Broadcaster.cpp index 04fbdba0..6d32db84 100644 --- a/src/server/Broadcaster.cpp +++ b/src/server/Broadcaster.cpp @@ -22,6 +22,7 @@ #include "ingen/Interface.hpp" #include <cstddef> +#include <map> #include <memory> #include <utility> diff --git a/src/server/BufferRef.hpp b/src/server/BufferRef.hpp index 64eab668..958fcb06 100644 --- a/src/server/BufferRef.hpp +++ b/src/server/BufferRef.hpp @@ -19,7 +19,7 @@ #include "ingen/ingen.h" -#include <boost/intrusive_ptr.hpp> +#include <boost/smart_ptr/intrusive_ptr.hpp> // IWYU pragma: export namespace ingen { namespace server { diff --git a/src/server/ClientUpdate.cpp b/src/server/ClientUpdate.cpp index 41a4cd2e..5034257b 100644 --- a/src/server/ClientUpdate.cpp +++ b/src/server/ClientUpdate.cpp @@ -29,9 +29,12 @@ #include "ingen/Node.hpp" #include "ingen/URIs.hpp" +#include <boost/intrusive/slist.hpp> + #include <algorithm> #include <cstddef> #include <cstdint> +#include <map> #include <memory> #include <utility> diff --git a/src/server/CompiledGraph.cpp b/src/server/CompiledGraph.cpp index c353859e..d80780ff 100644 --- a/src/server/CompiledGraph.cpp +++ b/src/server/CompiledGraph.cpp @@ -29,10 +29,13 @@ #include "raul/Maid.hpp" #include "raul/Path.hpp" +#include <boost/intrusive/slist.hpp> + #include <algorithm> #include <cassert> #include <cstdint> #include <cstdio> +#include <exception> #include <limits> #include <utility> diff --git a/src/server/ControlBindings.cpp b/src/server/ControlBindings.cpp index d3425534..8989c90f 100644 --- a/src/server/ControlBindings.cpp +++ b/src/server/ControlBindings.cpp @@ -36,6 +36,8 @@ #include "lv2/urid/urid.h" #include "raul/Path.hpp" +#include <boost/intrusive/bstree.hpp> + #include <algorithm> #include <cmath> #include <cstring> diff --git a/src/server/ControlBindings.hpp b/src/server/ControlBindings.hpp index 26563749..325ca20e 100644 --- a/src/server/ControlBindings.hpp +++ b/src/server/ControlBindings.hpp @@ -22,7 +22,6 @@ #include "lv2/atom/forge.h" #include "raul/Maid.hpp" -#include <boost/intrusive/options.hpp> #include <boost/intrusive/set.hpp> #include <boost/intrusive/set_hook.hpp> @@ -33,6 +32,14 @@ namespace Raul { class Path; } +namespace boost { +namespace intrusive { + +template <class Compare> struct compare; + +} // namespace intrusive +} // namespace boost + namespace ingen { class Atom; diff --git a/src/server/DirectDriver.hpp b/src/server/DirectDriver.hpp index e52b6555..c95912d0 100644 --- a/src/server/DirectDriver.hpp +++ b/src/server/DirectDriver.hpp @@ -18,13 +18,36 @@ #define INGEN_ENGINE_DIRECT_DRIVER_HPP #include "Driver.hpp" +#include "DuplexPort.hpp" #include "Engine.hpp" +#include "EnginePort.hpp" +#include "RunContext.hpp" +#include "types.hpp" + +#include "raul/Path.hpp" #include <boost/intrusive/slist.hpp> +#include <cstddef> +#include <string> + +namespace boost { +namespace intrusive { + +template <bool Enabled> struct cache_last; + +} // namespace intrusive +} // namespace boost + namespace ingen { + +class Atom; +class URI; + namespace server { +class Buffer; + /** Driver for running Ingen directly as a library. * \ingroup engine */ diff --git a/src/server/Driver.hpp b/src/server/Driver.hpp index 92867021..59720882 100644 --- a/src/server/Driver.hpp +++ b/src/server/Driver.hpp @@ -17,18 +17,25 @@ #ifndef INGEN_ENGINE_DRIVER_HPP #define INGEN_ENGINE_DRIVER_HPP -#include "DuplexPort.hpp" -#include "EnginePort.hpp" +#include "types.hpp" +#include "ingen/URI.hpp" #include "raul/Noncopyable.hpp" +#include <cstddef> + namespace Raul { class Path; } namespace ingen { + +class Atom; + namespace server { +class Buffer; class DuplexPort; class EnginePort; +class RunContext; /** Engine driver base class. * diff --git a/src/server/DuplexPort.cpp b/src/server/DuplexPort.cpp index 8c6c72c8..64160954 100644 --- a/src/server/DuplexPort.cpp +++ b/src/server/DuplexPort.cpp @@ -35,6 +35,7 @@ #include <algorithm> #include <map> +#include <memory> #include <utility> namespace ingen { diff --git a/src/server/DuplexPort.hpp b/src/server/DuplexPort.hpp index 9bd88c1e..7f39ae89 100644 --- a/src/server/DuplexPort.hpp +++ b/src/server/DuplexPort.hpp @@ -31,7 +31,6 @@ #include <cstddef> #include <cstdint> -#include <memory> namespace Raul { class Symbol; } diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp index 8cbb8bbf..46d70f25 100644 --- a/src/server/Engine.cpp +++ b/src/server/Engine.cpp @@ -70,6 +70,7 @@ #include <cstdint> #include <cstdio> #include <limits> +#include <map> #include <memory> #include <thread> #include <utility> diff --git a/src/server/EnginePort.hpp b/src/server/EnginePort.hpp index 33e0e29c..c0ec11d2 100644 --- a/src/server/EnginePort.hpp +++ b/src/server/EnginePort.hpp @@ -22,7 +22,9 @@ #include "raul/Deletable.hpp" #include "raul/Noncopyable.hpp" -#include <boost/intrusive/slist.hpp> +#include <boost/intrusive/slist_hook.hpp> + +#include <cstdint> namespace ingen { namespace server { diff --git a/src/server/Event.hpp b/src/server/Event.hpp index 89e6ec1a..d8b3de9b 100644 --- a/src/server/Event.hpp +++ b/src/server/Event.hpp @@ -20,14 +20,21 @@ #include "types.hpp" #include "ingen/Interface.hpp" -#include "ingen/Node.hpp" #include "ingen/Status.hpp" +#include "ingen/URI.hpp" +#include "ingen/paths.hpp" #include "raul/Deletable.hpp" #include "raul/Noncopyable.hpp" -#include "raul/Path.hpp" #include <atomic> +#include <cstdint> #include <memory> +#include <string> +#include <utility> + +namespace Raul { +class Path; +} // namespace Raul namespace ingen { namespace server { diff --git a/src/server/FrameTimer.hpp b/src/server/FrameTimer.hpp index d4ab91f1..8a155777 100644 --- a/src/server/FrameTimer.hpp +++ b/src/server/FrameTimer.hpp @@ -17,7 +17,6 @@ #ifndef INGEN_ENGINE_FRAMETIMER_HPP #define INGEN_ENGINE_FRAMETIMER_HPP -#include <chrono> #include <cmath> #include <cstdint> diff --git a/src/server/GraphImpl.cpp b/src/server/GraphImpl.cpp index 6281681f..15a41a9d 100644 --- a/src/server/GraphImpl.cpp +++ b/src/server/GraphImpl.cpp @@ -41,6 +41,7 @@ #include <cstddef> #include <map> #include <memory> +#include <type_traits> #include <unordered_map> namespace ingen { diff --git a/src/server/GraphImpl.hpp b/src/server/GraphImpl.hpp index 48357f97..e085155f 100644 --- a/src/server/GraphImpl.hpp +++ b/src/server/GraphImpl.hpp @@ -26,16 +26,25 @@ #include "lv2/urid/urid.h" #include "raul/Maid.hpp" +#include <boost/intrusive/slist.hpp> + #include <cassert> #include <cstdint> #include <memory> #include <utility> namespace Raul { -class Maid; class Symbol; } // namespace Raul +namespace boost { +namespace intrusive { + +template <bool Enabled> struct constant_time_size; + +} // namespace intrusive +} // namespace boost + namespace ingen { namespace server { diff --git a/src/server/GraphPlugin.hpp b/src/server/GraphPlugin.hpp index 3ac8ec30..0bd00a65 100644 --- a/src/server/GraphPlugin.hpp +++ b/src/server/GraphPlugin.hpp @@ -19,12 +19,20 @@ #include "PluginImpl.hpp" +#include "ingen/URI.hpp" +#include "ingen/URIs.hpp" +#include "lilv/lilv.h" +#include "raul/Symbol.hpp" + #include <string> namespace ingen { namespace server { class BlockImpl; +class BufferFactory; +class Engine; +class GraphImpl; /** Implementation of a Graph plugin. * diff --git a/src/server/InputPort.cpp b/src/server/InputPort.cpp index 10cc9dd4..d3a1eea1 100644 --- a/src/server/InputPort.cpp +++ b/src/server/InputPort.cpp @@ -35,6 +35,7 @@ #include <cassert> #include <cstdlib> +#include <memory> namespace ingen { namespace server { diff --git a/src/server/InputPort.hpp b/src/server/InputPort.hpp index 20fa84e2..e39c22a5 100644 --- a/src/server/InputPort.hpp +++ b/src/server/InputPort.hpp @@ -17,7 +17,7 @@ #ifndef INGEN_ENGINE_INPUTPORT_HPP #define INGEN_ENGINE_INPUTPORT_HPP -#include "ArcImpl.hpp" +#include "ArcImpl.hpp" // IWYU pragma: keep #include "PortImpl.hpp" #include "PortType.hpp" #include "types.hpp" @@ -25,15 +25,21 @@ #include "lv2/urid/urid.h" #include "raul/Maid.hpp" -#include <boost/intrusive/options.hpp> #include <boost/intrusive/slist.hpp> #include <cstdint> #include <cstdlib> -#include <memory> namespace Raul { class Symbol; } +namespace boost { +namespace intrusive { + +template <bool Enabled> struct constant_time_size; + +} // namespace intrusive +} // namespace boost + namespace ingen { class Atom; diff --git a/src/server/InternalBlock.cpp b/src/server/InternalBlock.cpp index f7072184..7afac475 100644 --- a/src/server/InternalBlock.cpp +++ b/src/server/InternalBlock.cpp @@ -26,6 +26,8 @@ #include "ingen/URIs.hpp" #include "raul/Array.hpp" +#include <boost/smart_ptr/intrusive_ptr.hpp> + #include <cstddef> #include <cstdint> #include <memory> diff --git a/src/server/JackDriver.cpp b/src/server/JackDriver.cpp index 098b0418..434b09c7 100644 --- a/src/server/JackDriver.cpp +++ b/src/server/JackDriver.cpp @@ -36,14 +36,13 @@ #include "ingen/URIMap.hpp" #include "ingen/URIs.hpp" #include "ingen/World.hpp" -#include "ingen/fmt.hpp" -#include "ingen/memory.hpp" #include "lv2/atom/atom.h" #include "lv2/atom/forge.h" #include "lv2/atom/util.h" #include "raul/Path.hpp" #include <jack/midiport.h> +#include <jack/transport.h> #ifdef HAVE_JACK_METADATA #include "jackey.h" @@ -52,18 +51,13 @@ #include <cassert> #include <chrono> -#include <cstdlib> -#include <cstring> -#include <mutex> +#include <map> #include <string> #include <utility> using jack_sample_t = jack_default_audio_sample_t; namespace ingen { - -class Node; - namespace server { JackDriver::JackDriver(Engine& engine) diff --git a/src/server/JackDriver.hpp b/src/server/JackDriver.hpp index 25b666ab..c94cb790 100644 --- a/src/server/JackDriver.hpp +++ b/src/server/JackDriver.hpp @@ -18,23 +18,23 @@ #define INGEN_ENGINE_JACKAUDIODRIVER_HPP #include "Driver.hpp" -#include "EnginePort.hpp" -#include "ingen_config.h" +#include "EnginePort.hpp" // IWYU pragma: keep #include "types.hpp" #include "ingen/URI.hpp" -#include "ingen/memory.hpp" +#include "ingen/memory.hpp" // IWYU pragma: keep #include "lv2/atom/forge.h" #include "raul/Semaphore.hpp" +#include <boost/intrusive/slist.hpp> #include <jack/jack.h> #include <jack/thread.h> -#include <jack/transport.h> #include <jack/types.h> #include <atomic> #include <cstddef> #include <cstdint> +#include <exception> #include <memory> #include <string> @@ -42,6 +42,14 @@ namespace Raul { class Path; } // namespace Raul +namespace boost { +namespace intrusive { + +template <bool Enabled> struct cache_last; + +} // namespace intrusive +} // namespace boost + namespace ingen { class Atom; diff --git a/src/server/LV2Block.cpp b/src/server/LV2Block.cpp index 787488d5..02e0a407 100644 --- a/src/server/LV2Block.cpp +++ b/src/server/LV2Block.cpp @@ -50,6 +50,7 @@ #include <cassert> #include <cmath> #include <cstdint> +#include <map> #include <memory> #include <string> #include <utility> diff --git a/src/server/LV2Block.hpp b/src/server/LV2Block.hpp index ec9c5ac3..0e3e5995 100644 --- a/src/server/LV2Block.hpp +++ b/src/server/LV2Block.hpp @@ -19,6 +19,7 @@ #include "BlockImpl.hpp" #include "BufferRef.hpp" +#include "State.hpp" #include "types.hpp" #include "ingen/LV2Features.hpp" @@ -44,6 +45,18 @@ namespace Raul { class Symbol; } // namespace Raul +namespace boost { +namespace intrusive { + +template <bool Enabled> +struct cache_last; + +template <bool Enabled> +struct constant_time_size; + +} // namespace intrusive +} // namespace boost + namespace ingen { class FilePath; diff --git a/src/server/LV2Options.hpp b/src/server/LV2Options.hpp index d7493276..2ae1c6d7 100644 --- a/src/server/LV2Options.hpp +++ b/src/server/LV2Options.hpp @@ -19,11 +19,19 @@ #include "ingen/LV2Features.hpp" #include "ingen/URIs.hpp" +#include "lv2/core/lv2.h" #include "lv2/options/options.h" +#include <cstdint> +#include <cstdlib> +#include <cstring> #include <memory> namespace ingen { + +class Node; +class World; + namespace server { class LV2Options : public ingen::LV2Features::Feature { diff --git a/src/server/OutputPort.hpp b/src/server/OutputPort.hpp index 0437c367..775e3093 100644 --- a/src/server/OutputPort.hpp +++ b/src/server/OutputPort.hpp @@ -18,10 +18,26 @@ #define INGEN_ENGINE_OUTPUTPORT_HPP #include "PortImpl.hpp" +#include "PortType.hpp" + +#include "lv2/urid/urid.h" + +#include <cstddef> +#include <cstdint> + +namespace Raul { +class Symbol; +} // namespace Raul namespace ingen { + +class Atom; + namespace server { +class BlockImpl; +class BufferFactory; + /** An output port. * * Output ports always have a locally allocated buffer, and buffer() will diff --git a/src/server/PluginImpl.hpp b/src/server/PluginImpl.hpp index e209dbc9..b9e42366 100644 --- a/src/server/PluginImpl.hpp +++ b/src/server/PluginImpl.hpp @@ -17,10 +17,15 @@ #ifndef INGEN_ENGINE_PLUGINIMPL_HPP #define INGEN_ENGINE_PLUGINIMPL_HPP +#include "ingen/Atom.hpp" #include "ingen/Resource.hpp" +#include "ingen/URI.hpp" +#include "lilv/lilv.h" #include "raul/Symbol.hpp" -#include <cstdlib> +#include <map> +#include <string> +#include <utility> namespace ingen { diff --git a/src/server/PortAudioDriver.hpp b/src/server/PortAudioDriver.hpp index 6b259703..971f022a 100644 --- a/src/server/PortAudioDriver.hpp +++ b/src/server/PortAudioDriver.hpp @@ -18,12 +18,13 @@ #define INGEN_ENGINE_PORTAUDIODRIVER_HPP #include "Driver.hpp" -#include "EnginePort.hpp" +#include "EnginePort.hpp" // IWYU pragma: keep #include "types.hpp" #include "ingen/URI.hpp" #include "raul/Semaphore.hpp" +#include <boost/intrusive/slist.hpp> #include <portaudio.h> #include <atomic> @@ -33,6 +34,15 @@ namespace Raul { class Path; } +namespace boost { +namespace intrusive { + +template <bool Enabled> +struct cache_last; + +} // namespace intrusive +} // namespace boost + namespace ingen { class Atom; diff --git a/src/server/PortImpl.cpp b/src/server/PortImpl.cpp index 6ca7b88f..987b6cf7 100644 --- a/src/server/PortImpl.cpp +++ b/src/server/PortImpl.cpp @@ -36,6 +36,7 @@ #include <algorithm> #include <cassert> #include <cstdio> +#include <memory> #include <utility> namespace ingen { diff --git a/src/server/PortImpl.hpp b/src/server/PortImpl.hpp index b5e81c5c..954db09c 100644 --- a/src/server/PortImpl.hpp +++ b/src/server/PortImpl.hpp @@ -17,6 +17,7 @@ #ifndef INGEN_ENGINE_PORTIMPL_HPP #define INGEN_ENGINE_PORTIMPL_HPP +#include "BufferFactory.hpp" #include "BufferRef.hpp" #include "NodeImpl.hpp" #include "PortType.hpp" @@ -34,7 +35,6 @@ #include <atomic> #include <cstdint> #include <cstdlib> -#include <memory> #include <utility> namespace Raul { @@ -48,7 +48,6 @@ class Properties; namespace server { class BlockImpl; -class BufferFactory; /** A port (input or output) on a Block. * diff --git a/src/server/PortType.hpp b/src/server/PortType.hpp index c711ad79..f84c271f 100644 --- a/src/server/PortType.hpp +++ b/src/server/PortType.hpp @@ -17,6 +17,8 @@ #ifndef INGEN_INTERFACE_PORTTYPE_HPP #define INGEN_INTERFACE_PORTTYPE_HPP +#include "ingen/URI.hpp" + #include "lv2/atom/atom.h" #include "lv2/core/lv2.h" diff --git a/src/server/PreProcessContext.hpp b/src/server/PreProcessContext.hpp index 2e717c55..dba6cf9d 100644 --- a/src/server/PreProcessContext.hpp +++ b/src/server/PreProcessContext.hpp @@ -24,8 +24,6 @@ #include <unordered_set> -namespace Raul { class Maid; } - namespace ingen { namespace server { @@ -65,7 +63,7 @@ public: * This may return null when an atomic bundle is deferring compilation, in * which case the graph is flagged as dirty for later compilation. */ - Raul::managed_ptr<CompiledGraph> + Raul::Maid::managed_ptr<CompiledGraph> maybe_compile(Raul::Maid& maid, GraphImpl& graph) { if (must_compile(graph)) { diff --git a/src/server/SocketServer.hpp b/src/server/SocketServer.hpp index 76cfa76a..464ef657 100644 --- a/src/server/SocketServer.hpp +++ b/src/server/SocketServer.hpp @@ -21,14 +21,20 @@ #include "Engine.hpp" +#include "ingen/Atom.hpp" +#include "ingen/ColorContext.hpp" #include "ingen/Configuration.hpp" +#include "ingen/Interface.hpp" #include "ingen/SocketReader.hpp" #include "ingen/SocketWriter.hpp" #include "ingen/StreamWriter.hpp" #include "ingen/Tee.hpp" +#include "ingen/URI.hpp" #include "ingen/World.hpp" #include "raul/Socket.hpp" +#include <cstdint> +#include <cstdio> #include <memory> namespace ingen { diff --git a/src/server/State.hpp b/src/server/State.hpp index 8fffabfc..b5a3f7c0 100644 --- a/src/server/State.hpp +++ b/src/server/State.hpp @@ -17,6 +17,10 @@ #ifndef INGEN_ENGINE_STATE_HPP #define INGEN_ENGINE_STATE_HPP +#include "lilv/lilv.h" + +#include <memory> + namespace ingen { namespace server { diff --git a/src/server/Task.hpp b/src/server/Task.hpp index c76f33da..a7657499 100644 --- a/src/server/Task.hpp +++ b/src/server/Task.hpp @@ -17,6 +17,7 @@ #ifndef INGEN_ENGINE_TASK_HPP #define INGEN_ENGINE_TASK_HPP +#include <algorithm> #include <atomic> #include <cassert> #include <deque> diff --git a/src/server/ThreadManager.hpp b/src/server/ThreadManager.hpp index 3619933f..81fb15cb 100644 --- a/src/server/ThreadManager.hpp +++ b/src/server/ThreadManager.hpp @@ -17,8 +17,6 @@ #ifndef INGEN_ENGINE_THREADMANAGER_HPP #define INGEN_ENGINE_THREADMANAGER_HPP -#include "util.hpp" - #include "ingen/ingen.h" #include <cassert> diff --git a/src/server/UndoStack.hpp b/src/server/UndoStack.hpp index 74cb6cfe..7749b8fb 100644 --- a/src/server/UndoStack.hpp +++ b/src/server/UndoStack.hpp @@ -24,6 +24,7 @@ #include "serd/serd.h" #include "sratom/sratom.h" +#include <algorithm> #include <cstdint> #include <cstdio> #include <cstdlib> diff --git a/src/server/events/Connect.cpp b/src/server/events/Connect.cpp index 60c1ce24..234bc550 100644 --- a/src/server/events/Connect.cpp +++ b/src/server/events/Connect.cpp @@ -20,6 +20,7 @@ #include "BlockImpl.hpp" #include "Broadcaster.hpp" #include "BufferFactory.hpp" +#include "CompiledGraph.hpp" #include "Engine.hpp" #include "GraphImpl.hpp" #include "InputPort.hpp" @@ -38,6 +39,7 @@ #include <cassert> #include <memory> #include <mutex> +#include <set> #include <utility> namespace ingen { @@ -55,6 +57,8 @@ Connect::Connect(Engine& engine, { } +Connect::~Connect() = default; + bool Connect::pre_process(PreProcessContext& ctx) { diff --git a/src/server/events/Connect.hpp b/src/server/events/Connect.hpp index ba53b8d3..e9eadff0 100644 --- a/src/server/events/Connect.hpp +++ b/src/server/events/Connect.hpp @@ -17,7 +17,6 @@ #ifndef INGEN_EVENTS_CONNECT_HPP #define INGEN_EVENTS_CONNECT_HPP -#include "CompiledGraph.hpp" #include "Event.hpp" #include "PortImpl.hpp" #include "types.hpp" @@ -35,6 +34,7 @@ class Interface; namespace server { class ArcImpl; +class CompiledGraph; class Engine; class GraphImpl; class InputPort; @@ -55,6 +55,8 @@ public: SampleCount timestamp, const ingen::Connect& msg); + ~Connect() override; + bool pre_process(PreProcessContext& ctx) override; void execute(RunContext& ctx) override; void post_process() override; diff --git a/src/server/events/Copy.cpp b/src/server/events/Copy.cpp index 37211ee8..3f7fa52e 100644 --- a/src/server/events/Copy.cpp +++ b/src/server/events/Copy.cpp @@ -18,6 +18,7 @@ #include "BlockImpl.hpp" #include "Broadcaster.hpp" +#include "CompiledGraph.hpp" #include "Engine.hpp" #include "GraphImpl.hpp" #include "PreProcessContext.hpp" @@ -33,6 +34,9 @@ #include "raul/Path.hpp" #include "raul/Symbol.hpp" +#include <boost/optional/optional.hpp> + +#include <map> #include <memory> #include <mutex> #include <string> @@ -53,6 +57,8 @@ Copy::Copy(Engine& engine, , _block(nullptr) {} +Copy::~Copy() = default; + bool Copy::pre_process(PreProcessContext& ctx) { diff --git a/src/server/events/Copy.hpp b/src/server/events/Copy.hpp index 5cff71c3..b133a6d6 100644 --- a/src/server/events/Copy.hpp +++ b/src/server/events/Copy.hpp @@ -17,7 +17,6 @@ #ifndef INGEN_EVENTS_COPY_HPP #define INGEN_EVENTS_COPY_HPP -#include "CompiledGraph.hpp" #include "Event.hpp" #include "types.hpp" @@ -33,6 +32,7 @@ class Interface; namespace server { class BlockImpl; +class CompiledGraph; class Engine; class GraphImpl; class PreProcessContext; @@ -51,6 +51,8 @@ public: SampleCount timestamp, const ingen::Copy& msg); + ~Copy() override; + bool pre_process(PreProcessContext& ctx) override; void execute(RunContext& ctx) override; void post_process() override; diff --git a/src/server/events/CreateBlock.cpp b/src/server/events/CreateBlock.cpp index 4dc64bdc..4c675f2f 100644 --- a/src/server/events/CreateBlock.cpp +++ b/src/server/events/CreateBlock.cpp @@ -19,11 +19,13 @@ #include "BlockFactory.hpp" #include "BlockImpl.hpp" #include "Broadcaster.hpp" +#include "CompiledGraph.hpp" #include "Engine.hpp" #include "GraphImpl.hpp" #include "LV2Block.hpp" #include "PluginImpl.hpp" #include "PreProcessContext.hpp" +#include "State.hpp" #include "types.hpp" #include "ingen/FilePath.hpp" @@ -38,11 +40,11 @@ #include "ingen/URIs.hpp" #include "ingen/World.hpp" #include "ingen/paths.hpp" -#include "lilv/lilv.h" #include "raul/Maid.hpp" #include "raul/Path.hpp" #include "raul/Symbol.hpp" +#include <map> #include <memory> #include <utility> @@ -66,6 +68,8 @@ CreateBlock::CreateBlock(Engine& engine, , _block(nullptr) {} +CreateBlock::~CreateBlock() = default; + bool CreateBlock::pre_process(PreProcessContext& ctx) { diff --git a/src/server/events/CreateBlock.hpp b/src/server/events/CreateBlock.hpp index 872e4612..3da589c7 100644 --- a/src/server/events/CreateBlock.hpp +++ b/src/server/events/CreateBlock.hpp @@ -18,7 +18,6 @@ #define INGEN_EVENTS_CREATEBLOCK_HPP #include "ClientUpdate.hpp" -#include "CompiledGraph.hpp" #include "Event.hpp" #include "types.hpp" @@ -36,6 +35,7 @@ class Properties; namespace server { class BlockImpl; +class CompiledGraph; class Engine; class GraphImpl; class PreProcessContext; @@ -57,6 +57,8 @@ public: const Raul::Path& path, Properties& properties); + ~CreateBlock() override; + bool pre_process(PreProcessContext& ctx) override; void execute(RunContext& ctx) override; void post_process() override; diff --git a/src/server/events/CreateGraph.cpp b/src/server/events/CreateGraph.cpp index db90c433..e5dbb55b 100644 --- a/src/server/events/CreateGraph.cpp +++ b/src/server/events/CreateGraph.cpp @@ -18,6 +18,7 @@ #include "BlockImpl.hpp" #include "Broadcaster.hpp" +#include "CompiledGraph.hpp" #include "Engine.hpp" #include "GraphImpl.hpp" #include "PreProcessContext.hpp" @@ -39,6 +40,9 @@ #include "raul/Path.hpp" #include "raul/Symbol.hpp" +#include <boost/intrusive/slist.hpp> + +#include <map> #include <memory> #include <utility> @@ -59,6 +63,8 @@ CreateGraph::CreateGraph(Engine& engine, , _parent(nullptr) {} +CreateGraph::~CreateGraph() = default; + void CreateGraph::build_child_events() { diff --git a/src/server/events/CreateGraph.hpp b/src/server/events/CreateGraph.hpp index 2523e4b8..6c49feda 100644 --- a/src/server/events/CreateGraph.hpp +++ b/src/server/events/CreateGraph.hpp @@ -18,7 +18,6 @@ #define INGEN_EVENTS_CREATEGRAPH_HPP #include "ClientUpdate.hpp" -#include "CompiledGraph.hpp" #include "Event.hpp" #include "types.hpp" @@ -36,6 +35,7 @@ class Interface; namespace server { +class CompiledGraph; class Engine; class GraphImpl; class PreProcessContext; @@ -57,6 +57,8 @@ public: const Raul::Path& path, const Properties& properties); + ~CreateGraph() override; + bool pre_process(PreProcessContext& ctx) override; void execute(RunContext& ctx) override; void post_process() override; diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp index 7c3b08f3..2b0c00a5 100644 --- a/src/server/events/CreatePort.cpp +++ b/src/server/events/CreatePort.cpp @@ -41,6 +41,7 @@ #include "raul/Symbol.hpp" #include <cassert> +#include <map> #include <memory> #include <utility> diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp index 911ace66..e441f2fe 100644 --- a/src/server/events/Delta.cpp +++ b/src/server/events/Delta.cpp @@ -19,6 +19,7 @@ #include "BlockFactory.hpp" #include "BlockImpl.hpp" #include "Broadcaster.hpp" +#include "CompiledGraph.hpp" #include "ControlBindings.hpp" #include "CreateBlock.hpp" #include "CreateGraph.hpp" @@ -44,9 +45,12 @@ #include "ingen/World.hpp" #include "ingen/memory.hpp" #include "ingen/paths.hpp" +#include "lilv/lilv.h" #include "raul/Maid.hpp" #include "raul/Path.hpp" +#include <algorithm> +#include <map> #include <memory> #include <mutex> #include <set> diff --git a/src/server/events/Delta.hpp b/src/server/events/Delta.hpp index fc4716f2..f28832a2 100644 --- a/src/server/events/Delta.hpp +++ b/src/server/events/Delta.hpp @@ -17,17 +17,15 @@ #ifndef INGEN_EVENTS_DELTA_HPP #define INGEN_EVENTS_DELTA_HPP -#include "BlockImpl.hpp" #include "ClientUpdate.hpp" -#include "CompiledGraph.hpp" #include "ControlBindings.hpp" #include "Event.hpp" +#include "State.hpp" #include "types.hpp" #include "ingen/Properties.hpp" #include "ingen/Resource.hpp" #include "ingen/URI.hpp" -#include "lilv/lilv.h" #include "raul/Maid.hpp" #include <boost/optional/optional.hpp> @@ -45,6 +43,7 @@ struct SetProperty; namespace server { +class CompiledGraph; class Engine; class GraphImpl; class PreProcessContext; diff --git a/src/server/events/Disconnect.cpp b/src/server/events/Disconnect.cpp index 57a20628..93e271af 100644 --- a/src/server/events/Disconnect.cpp +++ b/src/server/events/Disconnect.cpp @@ -21,6 +21,7 @@ #include "Buffer.hpp" #include "BufferFactory.hpp" #include "BufferRef.hpp" +#include "CompiledGraph.hpp" #include "Engine.hpp" #include "GraphImpl.hpp" #include "InputPort.hpp" @@ -63,6 +64,8 @@ Disconnect::Disconnect(Engine& engine, { } +Disconnect::~Disconnect() = default; + Disconnect::Impl::Impl(Engine& e, GraphImpl* graph, PortImpl* t, diff --git a/src/server/events/Disconnect.hpp b/src/server/events/Disconnect.hpp index 681f1df0..7f8a1594 100644 --- a/src/server/events/Disconnect.hpp +++ b/src/server/events/Disconnect.hpp @@ -17,7 +17,6 @@ #ifndef INGEN_EVENTS_DISCONNECT_HPP #define INGEN_EVENTS_DISCONNECT_HPP -#include "CompiledGraph.hpp" #include "Event.hpp" #include "PortImpl.hpp" #include "types.hpp" @@ -34,6 +33,7 @@ class Interface; namespace server { class ArcImpl; +class CompiledGraph; class Engine; class GraphImpl; class InputPort; @@ -54,6 +54,8 @@ public: SampleCount timestamp, const ingen::Disconnect& msg); + ~Disconnect() override; + bool pre_process(PreProcessContext& ctx) override; void execute(RunContext& ctx) override; void post_process() override; diff --git a/src/server/events/DisconnectAll.cpp b/src/server/events/DisconnectAll.cpp index 43836611..86a38d7b 100644 --- a/src/server/events/DisconnectAll.cpp +++ b/src/server/events/DisconnectAll.cpp @@ -34,6 +34,7 @@ #include "ingen/Store.hpp" #include "raul/Maid.hpp" +#include <map> #include <memory> #include <mutex> #include <set> diff --git a/src/server/events/Mark.cpp b/src/server/events/Mark.cpp index 520f57e9..27ca6630 100644 --- a/src/server/events/Mark.cpp +++ b/src/server/events/Mark.cpp @@ -27,6 +27,7 @@ #include <cassert> #include <memory> +#include <unordered_set> #include <utility> namespace ingen { @@ -51,6 +52,8 @@ Mark::Mark(Engine& engine, , _depth(-1) {} +Mark::~Mark() = default; + void Mark::mark(PreProcessContext&) { diff --git a/src/server/events/Mark.hpp b/src/server/events/Mark.hpp index ffbf9062..e651b1e7 100644 --- a/src/server/events/Mark.hpp +++ b/src/server/events/Mark.hpp @@ -61,6 +61,8 @@ public: SampleCount timestamp, const ingen::BundleEnd& msg); + ~Mark() override; + void mark(PreProcessContext& ctx) override; bool pre_process(PreProcessContext& ctx) override; void execute(RunContext& ctx) override; diff --git a/src/server/events/Move.cpp b/src/server/events/Move.cpp index b79dde2a..d85451c8 100644 --- a/src/server/events/Move.cpp +++ b/src/server/events/Move.cpp @@ -24,6 +24,7 @@ #include "ingen/Store.hpp" #include "raul/Path.hpp" +#include <map> #include <memory> #include <mutex> diff --git a/src/server/ingen_engine.cpp b/src/server/ingen_engine.cpp index dbcc2597..a5735f33 100644 --- a/src/server/ingen_engine.cpp +++ b/src/server/ingen_engine.cpp @@ -14,6 +14,8 @@ along with Ingen. If not, see <http://www.gnu.org/licenses/>. */ +// IWYU pragma: no_include "ingen/Atom.hpp" + #include "Engine.hpp" #include "util.hpp" diff --git a/src/server/ingen_jack.cpp b/src/server/ingen_jack.cpp index ebdb96ae..97d72919 100644 --- a/src/server/ingen_jack.cpp +++ b/src/server/ingen_jack.cpp @@ -14,7 +14,6 @@ along with Ingen. If not, see <http://www.gnu.org/licenses/>. */ -#include "BufferRef.hpp" #include "Engine.hpp" #include "JackDriver.hpp" diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp index faff3a1c..97b6a18c 100644 --- a/src/server/ingen_lv2.cpp +++ b/src/server/ingen_lv2.cpp @@ -75,9 +75,12 @@ #include <vector> namespace ingen { + +class Atom; + namespace server { -class LV2Driver; +class GraphImpl; /** Record of a graph in this bundle. */ struct LV2Graph : public Parser::ResourceRecord { @@ -563,7 +566,7 @@ ingen_instantiate(const LV2_Descriptor* descriptor, "queue-size", plugin->world->forge().make(std::max(block_length, seq_size) * 4)); - auto engine = std::make_shared<server::Engine>(*plugin->world); + auto engine = std::make_shared<Engine>(*plugin->world); plugin->engine = engine; plugin->world->set_engine(engine); @@ -571,14 +574,14 @@ ingen_instantiate(const LV2_Descriptor* descriptor, plugin->world->set_interface(interface); - server::ThreadManager::set_flag(server::THREAD_PRE_PROCESS); - server::ThreadManager::single_threaded = true; + ThreadManager::set_flag(THREAD_PRE_PROCESS); + ThreadManager::single_threaded = true; auto* driver = new LV2Driver(*engine, block_length, seq_size, rate); - engine->set_driver(std::shared_ptr<ingen::server::Driver>(driver)); + engine->set_driver(std::shared_ptr<Driver>(driver)); engine->activate(); - server::ThreadManager::single_threaded = true; + ThreadManager::single_threaded = true; std::lock_guard<std::mutex> lock(plugin->world->rdf_mutex()); @@ -613,9 +616,9 @@ ingen_instantiate(const LV2_Descriptor* descriptor, static void ingen_connect_port(LV2_Handle instance, uint32_t port, void* data) { - auto* me = static_cast<IngenPlugin*>(instance); - server::Engine* engine = static_cast<server::Engine*>(me->world->engine().get()); - const auto driver = std::static_pointer_cast<LV2Driver>(engine->driver()); + auto* me = static_cast<IngenPlugin*>(instance); + Engine* engine = static_cast<Engine*>(me->world->engine().get()); + const auto driver = std::static_pointer_cast<LV2Driver>(engine->driver()); if (port < driver->ports().size()) { driver->ports().at(port)->set_buffer(data); } else { @@ -627,7 +630,7 @@ static void ingen_activate(LV2_Handle instance) { auto* me = static_cast<IngenPlugin*>(instance); - auto engine = std::static_pointer_cast<server::Engine>(me->world->engine()); + auto engine = std::static_pointer_cast<Engine>(me->world->engine()); const auto driver = std::static_pointer_cast<LV2Driver>(engine->driver()); engine->activate(); me->main = make_unique<std::thread>(ingen_lv2_main, engine, driver); @@ -637,11 +640,11 @@ static void ingen_run(LV2_Handle instance, uint32_t sample_count) { auto* me = static_cast<IngenPlugin*>(instance); - auto engine = std::static_pointer_cast<server::Engine>(me->world->engine()); + auto engine = std::static_pointer_cast<Engine>(me->world->engine()); const auto driver = std::static_pointer_cast<LV2Driver>(engine->driver()); - server::ThreadManager::set_flag(ingen::server::THREAD_PROCESS); - server::ThreadManager::set_flag(ingen::server::THREAD_IS_REAL_TIME); + ThreadManager::set_flag(THREAD_PROCESS); + ThreadManager::set_flag(THREAD_IS_REAL_TIME); driver->run(sample_count); } diff --git a/src/server/ingen_portaudio.cpp b/src/server/ingen_portaudio.cpp index d27d26c3..991470e4 100644 --- a/src/server/ingen_portaudio.cpp +++ b/src/server/ingen_portaudio.cpp @@ -14,6 +14,8 @@ along with Ingen. If not, see <http://www.gnu.org/licenses/>. */ +// IWYU pragma: no_include "ingen/FilePath.hpp" + #include "PortAudioDriver.hpp" #include "Engine.hpp" diff --git a/src/server/internals/Note.cpp b/src/server/internals/Note.cpp index d2e03a56..317e7951 100644 --- a/src/server/internals/Note.cpp +++ b/src/server/internals/Note.cpp @@ -39,6 +39,7 @@ #include <cassert> #include <cmath> +#include <memory> #include <utility> // #define NOTE_DEBUG 1 diff --git a/src/server/internals/Note.hpp b/src/server/internals/Note.hpp index 945ae99c..d0e9341a 100644 --- a/src/server/internals/Note.hpp +++ b/src/server/internals/Note.hpp @@ -24,7 +24,6 @@ #include "raul/Maid.hpp" #include <cstdint> -#include <memory> namespace Raul { class Symbol; diff --git a/src/server/util.hpp b/src/server/util.hpp index 8c181023..3c8d2058 100644 --- a/src/server/util.hpp +++ b/src/server/util.hpp @@ -17,18 +17,12 @@ #ifndef INGEN_ENGINE_UTIL_HPP #define INGEN_ENGINE_UTIL_HPP -#include "ingen_config.h" - #include "ingen/Log.hpp" -#include "raul/Path.hpp" #ifdef __SSE__ -#include <xmmintrin.h> +#include <xmmintrin.h> // IWYU pragma: keep #endif -#include <cfenv> -#include <cstdlib> - #ifdef __clang__ # define REALTIME __attribute__((annotate("realtime"))) #else diff --git a/tests/TestClient.hpp b/tests/TestClient.hpp index ab69a4f9..da749660 100644 --- a/tests/TestClient.hpp +++ b/tests/TestClient.hpp @@ -19,9 +19,14 @@ #include "ingen/Interface.hpp" #include "ingen/Log.hpp" +#include "ingen/Message.hpp" +#include "ingen/Status.hpp" +#include "ingen/URI.hpp" #include <boost/variant/get.hpp> +#include <cstdlib> + namespace ingen { class TestClient : public Interface diff --git a/tests/ingen_test.cpp b/tests/ingen_test.cpp index 711a9ab7..eaa6a0ab 100644 --- a/tests/ingen_test.cpp +++ b/tests/ingen_test.cpp @@ -41,7 +41,9 @@ #include <chrono> #include <cstdint> #include <cstdlib> +#include <exception> #include <iostream> +#include <map> #include <memory> #include <string> #include <utility> @@ -65,7 +67,8 @@ ingen_try(bool cond, const char* msg) FilePath real_file_path(const char* path) { - std::unique_ptr<char, FreeDeleter<char>> real_path{realpath(path, nullptr)}; + std::unique_ptr<char, FreeDeleter<char>> real_path{realpath(path, nullptr), + FreeDeleter<char>{}}; return FilePath{real_path.get()}; } diff --git a/tests/test_utils.hpp b/tests/test_utils.hpp index 4951ade1..57446ac5 100644 --- a/tests/test_utils.hpp +++ b/tests/test_utils.hpp @@ -14,9 +14,12 @@ along with Ingen. If not, see <http://www.gnu.org/licenses/>. */ +// IWYU pragma: no_include "ingen/FilePath.hpp" + #include "ingen/fmt.hpp" #include <iostream> +#include <string> #define EXPECT_TRUE(value) \ do { \ @@ -39,6 +42,6 @@ if (!((value) == (expected))) { \ std::cerr << fmt("error: %1%:%2%: %3% != %4%\n", \ __FILE__, __LINE__, (#value), (#expected)); \ - std::cerr << "note: actual value: " << value << std::endl; \ + std::cerr << "note: actual value: " << (value) << std::endl; \ } \ } while (0) diff --git a/tests/tst_FilePath.cpp b/tests/tst_FilePath.cpp index 34ff09da..75744f46 100644 --- a/tests/tst_FilePath.cpp +++ b/tests/tst_FilePath.cpp @@ -19,7 +19,6 @@ #include "ingen/FilePath.hpp" #include "ingen/fmt.hpp" -#include <boost/utility/string_view.hpp> #include <boost/utility/string_view_fwd.hpp> #include <string> |