diff options
author | David Robillard <d@drobilla.net> | 2017-12-24 09:20:16 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-12-24 09:20:16 -0500 |
commit | d744e4d421c313a3b4d786e11a311f73da19fc41 (patch) | |
tree | b6bd398d35329dfa7264d9b8dade856fc5d46329 /ingen | |
parent | cbb864b0ff951f75d826d97009681b30cce4da22 (diff) | |
download | ingen-d744e4d421c313a3b4d786e11a311f73da19fc41.tar.gz ingen-d744e4d421c313a3b4d786e11a311f73da19fc41.tar.bz2 ingen-d744e4d421c313a3b4d786e11a311f73da19fc41.zip |
Clean up includes in public headers
Diffstat (limited to 'ingen')
34 files changed, 154 insertions, 69 deletions
diff --git a/ingen/Atom.hpp b/ingen/Atom.hpp index 4015e59e..27b17fa2 100644 --- a/ingen/Atom.hpp +++ b/ingen/Atom.hpp @@ -19,9 +19,9 @@ #include <algorithm> #include <cassert> +#include <cstdint> #include <cstdlib> #include <cstring> -#include <string> #include "ingen/ingen.h" #include "lv2/lv2plug.in/ns/ext/atom/atom.h" @@ -29,8 +29,6 @@ namespace Ingen { -class Forge; - /** A generic typed data container. @@ -156,8 +154,6 @@ public: } private: - friend class Forge; - /** Free dynamically allocated value, if applicable. */ inline void dealloc() { if (is_reference()) { diff --git a/ingen/AtomForgeSink.hpp b/ingen/AtomForgeSink.hpp index 5520906c..66ccafe3 100644 --- a/ingen/AtomForgeSink.hpp +++ b/ingen/AtomForgeSink.hpp @@ -17,9 +17,14 @@ #ifndef INGEN_ATOMFORGESINK_HPP #define INGEN_ATOMFORGESINK_HPP +#include <cassert> +#include <cstdint> #include <cstdlib> +#include <cstring> +#include "lv2/lv2plug.in/ns/ext/atom/atom.h" #include "lv2/lv2plug.in/ns/ext/atom/forge.h" +#include "lv2/lv2plug.in/ns/ext/atom/util.h" namespace Ingen { diff --git a/ingen/AtomReader.hpp b/ingen/AtomReader.hpp index bcfe9ab5..a482627b 100644 --- a/ingen/AtomReader.hpp +++ b/ingen/AtomReader.hpp @@ -17,18 +17,28 @@ #ifndef INGEN_ATOMREADER_HPP #define INGEN_ATOMREADER_HPP -#include <boost/optional.hpp> +#include <cstdint> + +#include <boost/optional/optional.hpp> -#include "ingen/Interface.hpp" #include "ingen/AtomSink.hpp" -#include "ingen/URIs.hpp" +#include "ingen/Resource.hpp" #include "ingen/ingen.h" +#include "lv2/lv2plug.in/ns/ext/atom/atom.h" + +namespace Raul { +class Path; +class URI; +} namespace Ingen { -class AtomSink; +class Atom; +class Interface; class Log; +class Properties; class URIMap; +class URIs; /** An AtomSink that calls methods on an Interface. * @ingroup IngenShared diff --git a/ingen/AtomSink.hpp b/ingen/AtomSink.hpp index d5fe775c..73ea2423 100644 --- a/ingen/AtomSink.hpp +++ b/ingen/AtomSink.hpp @@ -17,6 +17,8 @@ #ifndef INGEN_ATOMSINK_HPP #define INGEN_ATOMSINK_HPP +#include <cstdint> + #include "ingen/ingen.h" #include "lv2/lv2plug.in/ns/ext/atom/atom.h" diff --git a/ingen/AtomWriter.hpp b/ingen/AtomWriter.hpp index 2366df05..1022dfcb 100644 --- a/ingen/AtomWriter.hpp +++ b/ingen/AtomWriter.hpp @@ -17,18 +17,25 @@ #ifndef INGEN_ATOMWRITER_HPP #define INGEN_ATOMWRITER_HPP -#include <string> +#include <cstdint> #include "ingen/AtomForgeSink.hpp" #include "ingen/Interface.hpp" -#include "ingen/URIs.hpp" +#include "ingen/Message.hpp" +#include "ingen/Properties.hpp" +#include "ingen/Resource.hpp" #include "ingen/ingen.h" #include "lv2/lv2plug.in/ns/ext/atom/forge.h" +#include "lv2/lv2plug.in/ns/ext/urid/urid.h" +#include "raul/URI.hpp" + +namespace Raul { class Path; } namespace Ingen { class AtomSink; class URIMap; +class URIs; /** An Interface that writes LV2 atoms to an AtomSink. */ class INGEN_API AtomWriter : public Interface diff --git a/ingen/ClashAvoider.hpp b/ingen/ClashAvoider.hpp index 1a674329..78cda050 100644 --- a/ingen/ClashAvoider.hpp +++ b/ingen/ClashAvoider.hpp @@ -17,8 +17,6 @@ #ifndef INGEN_CLASHAVOIDER_HPP #define INGEN_CLASHAVOIDER_HPP -#include <inttypes.h> - #include <map> #include "ingen/ingen.h" diff --git a/ingen/Clock.hpp b/ingen/Clock.hpp index 8071ee1f..69d5eb17 100644 --- a/ingen/Clock.hpp +++ b/ingen/Clock.hpp @@ -17,9 +17,14 @@ #ifndef INGEN_ENGINE_CLOCK_HPP #define INGEN_ENGINE_CLOCK_HPP +#include <cstdint> + #ifdef __MACH__ # include <mach/mach.h> # include <mach/mach_time.h> +#else +# include <time.h> +# include <sys/time.h> #endif namespace Ingen { diff --git a/ingen/Configuration.hpp b/ingen/Configuration.hpp index e069220d..ae5e4909 100644 --- a/ingen/Configuration.hpp +++ b/ingen/Configuration.hpp @@ -17,23 +17,22 @@ #ifndef INGEN_CONFIGURATION_HPP #define INGEN_CONFIGURATION_HPP -#include <stdint.h> -#include <stdlib.h> -#include <string.h> - +#include <cstdlib> #include <list> #include <map> #include <ostream> #include <string> #include "ingen/Atom.hpp" -#include "ingen/Forge.hpp" -#include "ingen/URIMap.hpp" #include "ingen/ingen.h" +#include "lv2/lv2plug.in/ns/ext/urid/urid.h" #include "raul/Exception.hpp" namespace Ingen { +class Forge; +class URIMap; + /** Ingen configuration (command line options and/or configuration file). * @ingroup IngenShared */ diff --git a/ingen/DataAccess.hpp b/ingen/DataAccess.hpp index 149daec9..88655817 100644 --- a/ingen/DataAccess.hpp +++ b/ingen/DataAccess.hpp @@ -17,10 +17,17 @@ #ifndef INGEN_ENGINE_DATAACCESS_HPP #define INGEN_ENGINE_DATAACCESS_HPP +#include <cstdlib> +#include <utility> + #include "ingen/LV2Features.hpp" +#include "ingen/Node.hpp" #include "ingen/Store.hpp" #include "ingen/World.hpp" +#include "ingen/types.hpp" +#include "lilv/lilv.h" +#include "lv2/lv2plug.in/ns/lv2core/lv2.h" #include "lv2/lv2plug.in/ns/ext/data-access/data-access.h" namespace Ingen { diff --git a/ingen/Forge.hpp b/ingen/Forge.hpp index 9b45bde1..3dd7bfa3 100644 --- a/ingen/Forge.hpp +++ b/ingen/Forge.hpp @@ -17,12 +17,15 @@ #ifndef INGEN_FORGE_HPP #define INGEN_FORGE_HPP +#include <cstdint> +#include <cstring> #include <string> #include "ingen/Atom.hpp" #include "ingen/ingen.h" #include "lv2/lv2plug.in/ns/ext/atom/forge.h" -#include "raul/URI.hpp" + +namespace Raul { class URI; } namespace Ingen { diff --git a/ingen/InstanceAccess.hpp b/ingen/InstanceAccess.hpp index 443f5f55..c1d9dcbe 100644 --- a/ingen/InstanceAccess.hpp +++ b/ingen/InstanceAccess.hpp @@ -17,9 +17,16 @@ #ifndef INGEN_ENGINE_INSTANCEACCESS_HPP #define INGEN_ENGINE_INSTANCEACCESS_HPP +#include <utility> + #include "ingen/LV2Features.hpp" +#include "ingen/Node.hpp" #include "ingen/Store.hpp" #include "ingen/World.hpp" +#include "ingen/types.hpp" +#include "lilv/lilv.h" + +#include "lv2/lv2plug.in/ns/lv2core/lv2.h" namespace Ingen { diff --git a/ingen/Interface.hpp b/ingen/Interface.hpp index 3b33f813..e22add9a 100644 --- a/ingen/Interface.hpp +++ b/ingen/Interface.hpp @@ -25,19 +25,21 @@ #include <string> #include "ingen/Message.hpp" +#include "ingen/Properties.hpp" #include "ingen/Resource.hpp" #include "ingen/Status.hpp" #include "ingen/ingen.h" #include "ingen/types.hpp" namespace Raul { -class Atom; class Path; class URI; } namespace Ingen { +class Atom; + /** Abstract interface for Ingen servers and clients. * * @ingroup Ingen diff --git a/ingen/LV2Features.hpp b/ingen/LV2Features.hpp index 5c1a0240..91fd3822 100644 --- a/ingen/LV2Features.hpp +++ b/ingen/LV2Features.hpp @@ -18,6 +18,7 @@ #define INGEN_LV2FEATURES_HPP #include <string> +#include <utility> #include <vector> #include "ingen/ingen.h" diff --git a/ingen/Log.hpp b/ingen/Log.hpp index 8063d4e5..c797e00d 100644 --- a/ingen/Log.hpp +++ b/ingen/Log.hpp @@ -17,6 +17,8 @@ #ifndef INGEN_LOG_HPP #define INGEN_LOG_HPP +#include <cstdarg> +#include <cstdio> #include <functional> #include <string> @@ -25,12 +27,16 @@ #include "ingen/LV2Features.hpp" #include "ingen/ingen.h" #include "lv2/lv2plug.in/ns/ext/log/log.h" +#include "lv2/lv2plug.in/ns/ext/urid/urid.h" +#include "lv2/lv2plug.in/ns/lv2core/lv2.h" namespace Ingen { typedef boost::basic_format<char> fmt; +class Node; class URIs; +class World; class INGEN_API Log { public: diff --git a/ingen/Message.hpp b/ingen/Message.hpp index fd5231ad..83608dae 100644 --- a/ingen/Message.hpp +++ b/ingen/Message.hpp @@ -17,21 +17,17 @@ #ifndef INGEN_MESSAGE_HPP #define INGEN_MESSAGE_HPP +#include <cstdint> #include <string> -#include <boost/variant.hpp> +#include <boost/variant/variant.hpp> +#include "ingen/Atom.hpp" +#include "ingen/Properties.hpp" #include "ingen/Resource.hpp" #include "ingen/Status.hpp" -#include "ingen/ingen.h" -#include "ingen/types.hpp" #include "raul/Path.hpp" - -namespace Raul { -class Atom; -class Path; -class URI; -} +#include "raul/URI.hpp" namespace Ingen { diff --git a/ingen/Module.hpp b/ingen/Module.hpp index ef3b1f63..c21bf25e 100644 --- a/ingen/Module.hpp +++ b/ingen/Module.hpp @@ -17,10 +17,10 @@ #ifndef INGEN_MODULE_HPP #define INGEN_MODULE_HPP -#include <glibmm/module.h> - #include "ingen/ingen.h" +namespace Glib { class Module; } + namespace Ingen { class World; @@ -32,7 +32,7 @@ class World; */ class INGEN_API Module { public: - Module() : library(NULL) {} + Module() : library(nullptr) {} virtual ~Module() {} virtual void load(Ingen::World* world) = 0; diff --git a/ingen/Node.hpp b/ingen/Node.hpp index a585d03a..5b2a5ee5 100644 --- a/ingen/Node.hpp +++ b/ingen/Node.hpp @@ -17,15 +17,19 @@ #ifndef INGEN_NODE_HPP #define INGEN_NODE_HPP +#include <cstdint> +#include <map> +#include <string> +#include <utility> + #include "ingen/Resource.hpp" #include "ingen/ingen.h" #include "ingen/paths.hpp" #include "ingen/types.hpp" #include "lilv/lilv.h" -#include "raul/Path.hpp" +#include "raul/URI.hpp" namespace Raul { -class Atom; class Path; class Symbol; } @@ -34,6 +38,7 @@ namespace Ingen { class Arc; class Store; +class URIs; /** A node in the audio graph. * @@ -65,11 +70,11 @@ public: // Blocks and graphs only virtual uint32_t num_ports() const { return 0; } - virtual Node* port(uint32_t index) const { return NULL; } - virtual const Resource* plugin() const { return NULL; } + virtual Node* port(uint32_t index) const { return nullptr; } + virtual const Resource* plugin() const { return nullptr; } // Plugin blocks only - virtual LilvInstance* instance() { return NULL; } + virtual LilvInstance* instance() { return nullptr; } virtual bool save_state(const std::string& dir) const { return false; } // All objects diff --git a/ingen/Parser.hpp b/ingen/Parser.hpp index dd3bfb46..e87f34e7 100644 --- a/ingen/Parser.hpp +++ b/ingen/Parser.hpp @@ -20,13 +20,15 @@ #include <string> #include <set> -#include <boost/optional.hpp> +#include <boost/optional/optional.hpp> -#include "ingen/Node.hpp" +#include "ingen/Properties.hpp" #include "ingen/ingen.h" #include "raul/Path.hpp" -#include "raul/URI.hpp" -#include "sord/sordmm.hpp" +#include "raul/Symbol.hpp" + +namespace Raul { class URI; } +namespace Sord { class World; } namespace Ingen { diff --git a/ingen/Properties.hpp b/ingen/Properties.hpp index 437db874..ef914e68 100644 --- a/ingen/Properties.hpp +++ b/ingen/Properties.hpp @@ -17,7 +17,9 @@ #ifndef INGEN_PROPERTIES_HPP #define INGEN_PROPERTIES_HPP +#include <initializer_list> #include <map> +#include <utility> #include "ingen/Atom.hpp" #include "ingen/URIs.hpp" diff --git a/ingen/Resource.hpp b/ingen/Resource.hpp index fe3d94fa..967c3804 100644 --- a/ingen/Resource.hpp +++ b/ingen/Resource.hpp @@ -17,10 +17,9 @@ #ifndef INGEN_RESOURCE_HPP #define INGEN_RESOURCE_HPP -#include <map> +#include <cassert> #include <string> -#include "ingen/Atom.hpp" #include "ingen/Properties.hpp" #include "ingen/URIs.hpp" #include "ingen/ingen.h" @@ -29,6 +28,8 @@ namespace Ingen { +class Atom; + /** A resource with a URI described by properties. * * This is the base class for most things in Ingen, including graphs, blocks, diff --git a/ingen/Serialiser.hpp b/ingen/Serialiser.hpp index e1a62f6e..c7a71627 100644 --- a/ingen/Serialiser.hpp +++ b/ingen/Serialiser.hpp @@ -20,16 +20,16 @@ #include <stdexcept> #include <string> -#include "ingen/Node.hpp" #include "ingen/ingen.h" -#include "raul/Path.hpp" +#include "ingen/types.hpp" #include "sord/sordmm.hpp" +namespace Raul { class Path; } + namespace Ingen { class Arc; class Node; -class Store; class World; /** diff --git a/ingen/SocketReader.hpp b/ingen/SocketReader.hpp index 4baf4696..37ec8567 100644 --- a/ingen/SocketReader.hpp +++ b/ingen/SocketReader.hpp @@ -20,9 +20,12 @@ #include <thread> #include "ingen/ingen.h" -#include "raul/Socket.hpp" +#include "ingen/types.hpp" +#include "serd/serd.h" #include "sord/sord.h" +namespace Raul { class Socket; } + namespace Ingen { class Interface; diff --git a/ingen/SocketWriter.hpp b/ingen/SocketWriter.hpp index e8b522f6..7523cd22 100644 --- a/ingen/SocketWriter.hpp +++ b/ingen/SocketWriter.hpp @@ -17,13 +17,22 @@ #ifndef INGEN_SOCKET_WRITER_HPP #define INGEN_SOCKET_WRITER_HPP -#include <stdint.h> +#include <cstddef> +#include <cstdint> #include "ingen/TurtleWriter.hpp" -#include "raul/Socket.hpp" +#include "ingen/ingen.h" + +namespace Raul { +class Socket; +class URI; +} namespace Ingen { +class URIMap; +class URIs; + /** An Interface that writes Turtle messages to a socket. */ class INGEN_API SocketWriter : public TurtleWriter diff --git a/ingen/Store.hpp b/ingen/Store.hpp index d9a52102..f439c523 100644 --- a/ingen/Store.hpp +++ b/ingen/Store.hpp @@ -17,17 +17,23 @@ #ifndef INGEN_STORE_HPP #define INGEN_STORE_HPP +#include <cstddef> #include <map> #include <mutex> +#include <utility> -#include "ingen/Node.hpp" #include "ingen/ingen.h" #include "ingen/types.hpp" #include "raul/Deletable.hpp" #include "raul/Noncopyable.hpp" +#include "raul/Path.hpp" + +namespace Raul { class Symbol; } namespace Ingen { +class Node; + /** Store of objects in the graph hierarchy. * @ingroup IngenShared */ diff --git a/ingen/StreamWriter.hpp b/ingen/StreamWriter.hpp index cefd51cc..1fd21b0a 100644 --- a/ingen/StreamWriter.hpp +++ b/ingen/StreamWriter.hpp @@ -19,11 +19,17 @@ #include <cstdio> +#include "ingen/ingen.h" #include "ingen/ColorContext.hpp" #include "ingen/TurtleWriter.hpp" +namespace Raul { class URI; } + namespace Ingen { +class URIMap; +class URIs; + /** An Interface that writes Turtle messages to a stream. */ class INGEN_API StreamWriter : public TurtleWriter diff --git a/ingen/Tee.hpp b/ingen/Tee.hpp index 543dfa28..b739e134 100644 --- a/ingen/Tee.hpp +++ b/ingen/Tee.hpp @@ -17,12 +17,15 @@ #ifndef INGEN_ENGINE_TEE_HPP #define INGEN_ENGINE_TEE_HPP +#include <cstddef> #include <mutex> #include <set> #include <utility> #include "ingen/Interface.hpp" +#include "ingen/Message.hpp" #include "ingen/types.hpp" +#include "raul/URI.hpp" namespace Ingen { diff --git a/ingen/TurtleWriter.hpp b/ingen/TurtleWriter.hpp index 3a439b98..830b941c 100644 --- a/ingen/TurtleWriter.hpp +++ b/ingen/TurtleWriter.hpp @@ -17,18 +17,22 @@ #ifndef INGEN_TURTLE_WRITER_HPP #define INGEN_TURTLE_WRITER_HPP -#include <stdint.h> +#include <cstddef> +#include <cstdint> #include "ingen/AtomSink.hpp" #include "ingen/AtomWriter.hpp" -#include "ingen/Interface.hpp" -#include "ingen/types.hpp" #include "ingen/ingen.h" +#include "lv2/lv2plug.in/ns/ext/atom/atom.h" #include "raul/URI.hpp" +#include "serd/serd.h" #include "sratom/sratom.h" namespace Ingen { +class URIMap; +class URIs; + /** An Interface that writes Turtle messages to a sink method. * * Derived classes must implement text_sink() to do something with the diff --git a/ingen/URIMap.hpp b/ingen/URIMap.hpp index 53968e62..448e5c3f 100644 --- a/ingen/URIMap.hpp +++ b/ingen/URIMap.hpp @@ -17,18 +17,23 @@ #ifndef INGEN_URIMAP_HPP #define INGEN_URIMAP_HPP -#include <map> +#include <cstdint> +#include <string> #include <utility> #include "ingen/LV2Features.hpp" -#include "ingen/Log.hpp" #include "ingen/ingen.h" +#include "ingen/types.hpp" #include "lv2/lv2plug.in/ns/ext/urid/urid.h" +#include "lv2/lv2plug.in/ns/lv2core/lv2.h" #include "raul/Noncopyable.hpp" -#include "raul/URI.hpp" namespace Ingen { +class Log; +class Node; +class World; + /** URI to integer map and implementation of LV2 URID extension. * @ingroup IngenShared */ diff --git a/ingen/URIs.hpp b/ingen/URIs.hpp index b05f6270..c718322d 100644 --- a/ingen/URIs.hpp +++ b/ingen/URIs.hpp @@ -18,19 +18,15 @@ #define INGEN_URIS_HPP #include "ingen/Atom.hpp" -#include "ingen/Forge.hpp" #include "ingen/ingen.h" #include "lilv/lilv.h" #include "lv2/lv2plug.in/ns/ext/urid/urid.h" #include "raul/Noncopyable.hpp" #include "raul/URI.hpp" -namespace Raul { -class Forge; -} - namespace Ingen { +class Forge; class URIMap; /** Frequently used interned URIs. diff --git a/ingen/World.hpp b/ingen/World.hpp index b0e09b34..30f71a61 100644 --- a/ingen/World.hpp +++ b/ingen/World.hpp @@ -25,10 +25,10 @@ #include "lv2/lv2plug.in/ns/ext/log/log.h" #include "lv2/lv2plug.in/ns/ext/urid/urid.h" #include "raul/Noncopyable.hpp" -#include "raul/URI.hpp" typedef struct LilvWorldImpl LilvWorld; +namespace Raul { class URI; } namespace Sord { class World; } namespace Ingen { diff --git a/ingen/client/PluginModel.hpp b/ingen/client/PluginModel.hpp index 6883596a..d6b253f3 100644 --- a/ingen/client/PluginModel.hpp +++ b/ingen/client/PluginModel.hpp @@ -22,6 +22,7 @@ #include <string> #include <utility> +#include "ingen/Forge.hpp" #include "ingen/Resource.hpp" #include "ingen/World.hpp" #include "ingen/client/signal.hpp" diff --git a/ingen/client/SocketClient.hpp b/ingen/client/SocketClient.hpp index d1b19a68..cceba9a3 100644 --- a/ingen/client/SocketClient.hpp +++ b/ingen/client/SocketClient.hpp @@ -20,6 +20,7 @@ #include "ingen/SocketReader.hpp" #include "ingen/SocketWriter.hpp" #include "ingen/ingen.h" +#include "raul/Socket.hpp" namespace Ingen { namespace Client { diff --git a/ingen/paths.hpp b/ingen/paths.hpp index 4924a148..3269a2ab 100644 --- a/ingen/paths.hpp +++ b/ingen/paths.hpp @@ -17,6 +17,9 @@ #ifndef INGEN_PATHS_HPP #define INGEN_PATHS_HPP +#include <cstddef> +#include <string> + #include "raul/URI.hpp" #include "raul/Path.hpp" diff --git a/ingen/types.hpp b/ingen/types.hpp index d1055e22..b0d73194 100644 --- a/ingen/types.hpp +++ b/ingen/types.hpp @@ -23,7 +23,6 @@ namespace Ingen { -#if __cplusplus >= 201103L template <class T> using SPtr = std::shared_ptr<T>; @@ -32,11 +31,6 @@ using WPtr = std::weak_ptr<T>; template <class T> using MPtr = Raul::managed_ptr<T>; -#else -#define SPtr std::shared_ptr -#define WPtr std::weak_ptr -#define MPtr Raul::managed_ptr -#endif template <class T> void NullDeleter(T* ptr) {} |