summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.clang-tidy15
-rw-r--r--.includes.imp2
-rw-r--r--.suppress.cppcheck16
-rw-r--r--bundles/ingen.lv2/style.css3
-rw-r--r--doc/reference.doxygen.in2394
-rw-r--r--doc/style.css1145
-rw-r--r--icons/meson.build9
-rw-r--r--include/ingen/Arc.hpp4
-rw-r--r--include/ingen/Atom.hpp6
-rw-r--r--include/ingen/AtomForge.hpp88
-rw-r--r--include/ingen/AtomReader.hpp8
-rw-r--r--include/ingen/AtomSink.hpp4
-rw-r--r--include/ingen/AtomWriter.hpp18
-rw-r--r--include/ingen/ClashAvoider.hpp10
-rw-r--r--include/ingen/Clock.hpp6
-rw-r--r--include/ingen/ColorContext.hpp2
-rw-r--r--include/ingen/Configuration.hpp12
-rw-r--r--include/ingen/DataAccess.hpp14
-rw-r--r--include/ingen/EngineBase.hpp4
-rw-r--r--include/ingen/Forge.hpp6
-rw-r--r--include/ingen/InstanceAccess.hpp12
-rw-r--r--include/ingen/Interface.hpp10
-rw-r--r--include/ingen/LV2Features.hpp6
-rw-r--r--include/ingen/Library.hpp8
-rw-r--r--include/ingen/Log.hpp20
-rw-r--r--include/ingen/Message.hpp12
-rw-r--r--include/ingen/Module.hpp8
-rw-r--r--include/ingen/Node.hpp10
-rw-r--r--include/ingen/Parser.hpp12
-rw-r--r--include/ingen/Properties.hpp6
-rw-r--r--include/ingen/QueuedInterface.hpp6
-rw-r--r--include/ingen/Resource.hpp14
-rw-r--r--include/ingen/Serialiser.hpp16
-rw-r--r--include/ingen/SocketReader.hpp6
-rw-r--r--include/ingen/SocketWriter.hpp6
-rw-r--r--include/ingen/Store.hpp8
-rw-r--r--include/ingen/StreamWriter.hpp6
-rw-r--r--include/ingen/Tee.hpp6
-rw-r--r--include/ingen/TurtleWriter.hpp14
-rw-r--r--include/ingen/URI.hpp12
-rw-r--r--include/ingen/URIMap.hpp14
-rw-r--r--include/ingen/URIs.hpp12
-rw-r--r--include/ingen/World.hpp8
-rw-r--r--include/ingen/client/ArcModel.hpp8
-rw-r--r--include/ingen/client/BlockModel.hpp14
-rw-r--r--include/ingen/client/ClientStore.hpp12
-rw-r--r--include/ingen/client/GraphModel.hpp19
-rw-r--r--include/ingen/client/ObjectModel.hpp14
-rw-r--r--include/ingen/client/PluginModel.hpp20
-rw-r--r--include/ingen/client/PluginUI.hpp12
-rw-r--r--include/ingen/client/PortModel.hpp18
-rw-r--r--include/ingen/client/SigClientInterface.hpp12
-rw-r--r--include/ingen/client/SocketClient.hpp14
-rw-r--r--include/ingen/fmt.hpp2
-rw-r--r--include/ingen/paths.hpp4
-rw-r--r--include/ingen/runtime_paths.hpp4
-rw-r--r--meson.build192
-rw-r--r--meson/suppressions/meson.build121
-rw-r--r--meson_options.txt13
-rw-r--r--src/.clang-tidy8
-rw-r--r--src/AtomForge.cpp130
-rw-r--r--src/AtomReader.cpp30
-rw-r--r--src/AtomWriter.cpp40
-rw-r--r--src/ClashAvoider.cpp28
-rw-r--r--src/ColorContext.cpp3
-rw-r--r--src/Configuration.cpp54
-rw-r--r--src/Forge.cpp13
-rw-r--r--src/LV2Features.cpp16
-rw-r--r--src/Library.cpp3
-rw-r--r--src/Log.cpp58
-rw-r--r--src/Parser.cpp70
-rw-r--r--src/Resource.cpp26
-rw-r--r--src/Serialiser.cpp54
-rw-r--r--src/SocketReader.cpp25
-rw-r--r--src/SocketWriter.cpp8
-rw-r--r--src/Store.cpp8
-rw-r--r--src/StreamWriter.cpp6
-rw-r--r--src/TurtleWriter.cpp15
-rw-r--r--src/URI.cpp12
-rw-r--r--src/URIMap.cpp8
-rw-r--r--src/URIs.cpp39
-rw-r--r--src/World.cpp46
-rw-r--r--src/client/BlockModel.cpp56
-rw-r--r--src/client/ClientStore.cpp40
-rw-r--r--src/client/GraphModel.cpp36
-rw-r--r--src/client/ObjectModel.cpp21
-rw-r--r--src/client/PluginModel.cpp22
-rw-r--r--src/client/PluginUI.cpp34
-rw-r--r--src/client/PortModel.cpp44
-rw-r--r--src/client/ingen_client.cpp11
-rw-r--r--src/gui/.clang-tidy1
-rw-r--r--src/gui/App.cpp48
-rw-r--r--src/gui/App.hpp19
-rw-r--r--src/gui/Arc.cpp11
-rw-r--r--src/gui/Arc.hpp2
-rw-r--r--src/gui/BreadCrumbs.cpp58
-rw-r--r--src/gui/BreadCrumbs.hpp15
-rw-r--r--src/gui/ConnectWindow.cpp72
-rw-r--r--src/gui/ConnectWindow.hpp4
-rw-r--r--src/gui/GraphBox.cpp81
-rw-r--r--src/gui/GraphBox.hpp2
-rw-r--r--src/gui/GraphCanvas.cpp97
-rw-r--r--src/gui/GraphCanvas.hpp12
-rw-r--r--src/gui/GraphPortModule.cpp23
-rw-r--r--src/gui/GraphPortModule.hpp4
-rw-r--r--src/gui/GraphTreeWindow.cpp25
-rw-r--r--src/gui/GraphTreeWindow.hpp2
-rw-r--r--src/gui/GraphView.cpp17
-rw-r--r--src/gui/GraphView.hpp2
-rw-r--r--src/gui/GraphWindow.hpp2
-rw-r--r--src/gui/LoadGraphWindow.cpp28
-rw-r--r--src/gui/LoadGraphWindow.hpp4
-rw-r--r--src/gui/LoadPluginWindow.cpp27
-rw-r--r--src/gui/LoadPluginWindow.hpp6
-rw-r--r--src/gui/MessagesWindow.cpp6
-rw-r--r--src/gui/MessagesWindow.hpp4
-rw-r--r--src/gui/NewSubgraphWindow.cpp26
-rw-r--r--src/gui/NewSubgraphWindow.hpp2
-rw-r--r--src/gui/NodeMenu.cpp42
-rw-r--r--src/gui/NodeMenu.hpp2
-rw-r--r--src/gui/NodeModule.cpp40
-rw-r--r--src/gui/NodeModule.hpp4
-rw-r--r--src/gui/ObjectMenu.cpp16
-rw-r--r--src/gui/ObjectMenu.hpp2
-rw-r--r--src/gui/PluginMenu.cpp10
-rw-r--r--src/gui/PluginMenu.hpp4
-rw-r--r--src/gui/Port.cpp43
-rw-r--r--src/gui/Port.hpp2
-rw-r--r--src/gui/PortMenu.cpp29
-rw-r--r--src/gui/PropertiesWindow.cpp28
-rw-r--r--src/gui/PropertiesWindow.hpp6
-rw-r--r--src/gui/RDFS.cpp17
-rw-r--r--src/gui/RDFS.hpp4
-rw-r--r--src/gui/RenameWindow.cpp19
-rw-r--r--src/gui/Style.cpp4
-rw-r--r--src/gui/SubgraphModule.cpp15
-rw-r--r--src/gui/ThreadedLoader.cpp19
-rw-r--r--src/gui/ThreadedLoader.hpp8
-rw-r--r--src/gui/URIEntry.cpp5
-rw-r--r--src/gui/URIEntry.hpp4
-rw-r--r--src/gui/WidgetFactory.cpp2
-rw-r--r--src/gui/WidgetFactory.hpp2
-rw-r--r--src/gui/WindowFactory.cpp29
-rw-r--r--src/gui/WindowFactory.hpp5
-rw-r--r--src/gui/ingen_gui.cpp17
-rw-r--r--src/gui/ingen_gui_lv2.cpp44
-rw-r--r--src/gui/meson.build96
-rw-r--r--src/gui/rgba.hpp2
-rw-r--r--src/ingen/ingen.cpp34
-rw-r--r--src/meson.build10
-rw-r--r--src/runtime_paths.cpp8
-rw-r--r--src/server/.clang-tidy3
-rw-r--r--src/server/ArcImpl.cpp42
-rw-r--r--src/server/ArcImpl.hpp10
-rw-r--r--src/server/BlockFactory.cpp44
-rw-r--r--src/server/BlockFactory.hpp4
-rw-r--r--src/server/BlockImpl.cpp21
-rw-r--r--src/server/BlockImpl.hpp20
-rw-r--r--src/server/Broadcaster.cpp2
-rw-r--r--src/server/Broadcaster.hpp8
-rw-r--r--src/server/Buffer.cpp35
-rw-r--r--src/server/Buffer.hpp9
-rw-r--r--src/server/BufferFactory.cpp12
-rw-r--r--src/server/BufferFactory.hpp10
-rw-r--r--src/server/ClientUpdate.cpp12
-rw-r--r--src/server/ClientUpdate.hpp8
-rw-r--r--src/server/CompiledGraph.cpp39
-rw-r--r--src/server/CompiledGraph.hpp4
-rw-r--r--src/server/ControlBindings.cpp39
-rw-r--r--src/server/ControlBindings.hpp17
-rw-r--r--src/server/DirectDriver.hpp9
-rw-r--r--src/server/Driver.hpp6
-rw-r--r--src/server/DuplexPort.cpp22
-rw-r--r--src/server/DuplexPort.hpp10
-rw-r--r--src/server/Engine.cpp74
-rw-r--r--src/server/Engine.hpp19
-rw-r--r--src/server/EnginePort.hpp4
-rw-r--r--src/server/Event.hpp12
-rw-r--r--src/server/EventWriter.cpp21
-rw-r--r--src/server/EventWriter.hpp6
-rw-r--r--src/server/FrameTimer.hpp6
-rw-r--r--src/server/GraphImpl.cpp21
-rw-r--r--src/server/GraphImpl.hpp22
-rw-r--r--src/server/GraphPlugin.hpp8
-rw-r--r--src/server/InputPort.cpp20
-rw-r--r--src/server/InputPort.hpp18
-rw-r--r--src/server/InternalBlock.cpp5
-rw-r--r--src/server/InternalBlock.hpp2
-rw-r--r--src/server/InternalPlugin.cpp7
-rw-r--r--src/server/InternalPlugin.hpp11
-rw-r--r--src/server/JackDriver.cpp58
-rw-r--r--src/server/JackDriver.hpp71
-rw-r--r--src/server/LV2Block.cpp49
-rw-r--r--src/server/LV2Block.hpp34
-rw-r--r--src/server/LV2Options.hpp8
-rw-r--r--src/server/LV2Plugin.cpp19
-rw-r--r--src/server/LV2Plugin.hpp10
-rw-r--r--src/server/LV2ResizeFeature.hpp4
-rw-r--r--src/server/Load.hpp4
-rw-r--r--src/server/NodeImpl.cpp7
-rw-r--r--src/server/NodeImpl.hpp10
-rw-r--r--src/server/OutputPort.hpp2
-rw-r--r--src/server/PluginImpl.hpp10
-rw-r--r--src/server/PortAudioDriver.cpp11
-rw-r--r--src/server/PortAudioDriver.hpp41
-rw-r--r--src/server/PortImpl.cpp37
-rw-r--r--src/server/PortImpl.hpp13
-rw-r--r--src/server/PortType.hpp113
-rw-r--r--src/server/PostProcessor.cpp2
-rw-r--r--src/server/PreProcessor.cpp17
-rw-r--r--src/server/PreProcessor.hpp2
-rw-r--r--src/server/RunContext.cpp18
-rw-r--r--src/server/RunContext.hpp4
-rw-r--r--src/server/SocketListener.cpp13
-rw-r--r--src/server/SocketListener.hpp4
-rw-r--r--src/server/SocketServer.hpp22
-rw-r--r--src/server/State.hpp2
-rw-r--r--src/server/Task.cpp2
-rw-r--r--src/server/Task.hpp5
-rw-r--r--src/server/ThreadManager.hpp4
-rw-r--r--src/server/UndoStack.cpp16
-rw-r--r--src/server/UndoStack.hpp18
-rw-r--r--src/server/Worker.cpp21
-rw-r--r--src/server/Worker.hpp14
-rw-r--r--src/server/events.hpp28
-rw-r--r--src/server/events/Connect.cpp16
-rw-r--r--src/server/events/Connect.hpp8
-rw-r--r--src/server/events/Copy.cpp28
-rw-r--r--src/server/events/Copy.hpp3
-rw-r--r--src/server/events/CreateBlock.cpp38
-rw-r--r--src/server/events/CreateBlock.hpp4
-rw-r--r--src/server/events/CreateGraph.cpp30
-rw-r--r--src/server/events/CreateGraph.hpp6
-rw-r--r--src/server/events/CreatePort.cpp38
-rw-r--r--src/server/events/CreatePort.hpp12
-rw-r--r--src/server/events/Delete.cpp35
-rw-r--r--src/server/events/Delete.hpp12
-rw-r--r--src/server/events/Delta.cpp45
-rw-r--r--src/server/events/Delta.hpp13
-rw-r--r--src/server/events/Disconnect.cpp21
-rw-r--r--src/server/events/Disconnect.hpp5
-rw-r--r--src/server/events/DisconnectAll.cpp55
-rw-r--r--src/server/events/DisconnectAll.hpp4
-rw-r--r--src/server/events/Get.cpp28
-rw-r--r--src/server/events/Get.hpp4
-rw-r--r--src/server/events/Mark.cpp8
-rw-r--r--src/server/events/Mark.hpp6
-rw-r--r--src/server/events/Move.cpp11
-rw-r--r--src/server/events/Move.hpp4
-rw-r--r--src/server/events/SetPortValue.cpp11
-rw-r--r--src/server/events/SetPortValue.hpp3
-rw-r--r--src/server/events/Undo.cpp10
-rw-r--r--src/server/events/Undo.hpp2
-rw-r--r--src/server/ingen_engine.cpp6
-rw-r--r--src/server/ingen_jack.cpp10
-rw-r--r--src/server/ingen_lv2.cpp147
-rw-r--r--src/server/ingen_portaudio.cpp8
-rw-r--r--src/server/internals/BlockDelay.cpp23
-rw-r--r--src/server/internals/BlockDelay.hpp1
-rw-r--r--src/server/internals/Controller.cpp25
-rw-r--r--src/server/internals/Note.cpp22
-rw-r--r--src/server/internals/Note.hpp4
-rw-r--r--src/server/internals/Time.cpp18
-rw-r--r--src/server/internals/Time.hpp1
-rw-r--r--src/server/internals/Trigger.cpp22
-rw-r--r--src/server/meson.build38
-rw-r--r--src/server/mix.cpp4
-rw-r--r--src/server/util.hpp4
-rw-r--r--tests/.clang-tidy1
-rw-r--r--tests/TestClient.hpp10
-rw-r--r--tests/ingen_bench.cpp32
-rw-r--r--tests/ingen_test.cpp70
-rw-r--r--tests/lint/meson.build24
-rw-r--r--tests/meson.build37
-rw-r--r--tests/test_utils.hpp4
275 files changed, 2752 insertions, 6167 deletions
diff --git a/.clang-tidy b/.clang-tidy
index 50ea64cd..d4cd324f 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -7,6 +7,10 @@ Checks: >
-abseil-*,
-altera-*,
-bugprone-assignment-in-if-condition,
+ -bugprone-reserved-identifier,
+ -bugprone-switch-missing-default-case,
+ -cert-dcl37-c,
+ -cert-dcl51-cpp,
-cppcoreguidelines-avoid-const-or-ref-data-members,
-cppcoreguidelines-avoid-do-while,
-cppcoreguidelines-macro-usage,
@@ -19,17 +23,24 @@ Checks: >
-hicpp-explicit-conversions,
-hicpp-signed-bitwise,
-llvmlibc-*,
+ -misc-include-cleaner,
-misc-unused-parameters,
-misc-use-anonymous-namespace,
-modernize-use-nodiscard,
-modernize-use-trailing-return-type,
+ -performance-enum-size,
+ -readability-avoid-nested-conditional-operator,
-readability-identifier-length,
-readability-implicit-bool-conversion,
CheckOptions:
- - key: modernize-use-override.AllowOverrideAndFinal
- value: 'true'
- key: cppcoreguidelines-explicit-virtual-functions.AllowOverrideAndFinal
value: 'true'
+ - key: hicpp-uppercase-literal-suffix.NewSuffixes
+ value: 'L;U;UL;ULL'
+ - key: modernize-use-override.AllowOverrideAndFinal
+ value: 'true'
+ - key: readability-uppercase-literal-suffix.NewSuffixes
+ value: 'L;U;UL;ULL'
WarningsAsErrors: '*'
HeaderFilterRegex: '.*'
FormatStyle: file
diff --git a/.includes.imp b/.includes.imp
index f3618b9d..247f2908 100644
--- a/.includes.imp
+++ b/.includes.imp
@@ -1,6 +1,6 @@
[
{ "symbol": [ "GdkEvent", "private", "<gdk/gdk.h>", "public" ] },
- { "symbol": [ "LilvWorld", "private", "\"lilv/lilv.h\"", "public" ] },
+ { "symbol": [ "LilvWorld", "private", "<lilv/lilv.h>", "public" ] },
{ "symbol": [ "clockid_t", "private", "<sys/types.h>", "public" ] },
{ "symbol": [ "clockid_t", "private", "<time.h>", "public" ] },
{ "symbol": [ "fmt::format", "private", "<fmt/core.h>", "public" ] },
diff --git a/.suppress.cppcheck b/.suppress.cppcheck
new file mode 100644
index 00000000..4ba574b1
--- /dev/null
+++ b/.suppress.cppcheck
@@ -0,0 +1,16 @@
+constParameterPointer
+constParameterReference
+constVariablePointer
+constVariableReference
+cstyleCast
+duplInheritedMember
+duplicateExpression
+knownConditionTrueFalse
+missingReturn
+noExplicitConstructor
+normalCheckLevelMaxBranches
+shadowFunction
+unsafeClassCanLeak
+useStlAlgorithm
+uselessOverride
+virtualCallInConstructor
diff --git a/bundles/ingen.lv2/style.css b/bundles/ingen.lv2/style.css
index fca399e3..174d889c 100644
--- a/bundles/ingen.lv2/style.css
+++ b/bundles/ingen.lv2/style.css
@@ -1,4 +1,4 @@
-@import "./pygments.css";
+@import url("./pygments.css");
/* Generic page style */
@@ -136,7 +136,6 @@ table {
border-collapse: collapse;
border-spacing: 1em 1em;
border-style: hidden;
- border: 0;
margin: 0;
}
diff --git a/doc/reference.doxygen.in b/doc/reference.doxygen.in
deleted file mode 100644
index 3262d934..00000000
--- a/doc/reference.doxygen.in
+++ /dev/null
@@ -1,2394 +0,0 @@
-# Doxyfile 1.8.12
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project.
-#
-# All text after a double hash (##) is considered a comment and is placed in
-# front of the TAG it is preceding.
-#
-# All text after a single hash (#) is considered a comment and will be ignored.
-# The format is:
-# TAG = value [value, ...]
-# For lists, items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (\" \").
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all text
-# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
-# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
-# for the list of possible encodings.
-# The default value is: UTF-8.
-
-DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
-# double-quotes, unless you are using Doxywizard) that should identify the
-# project for which the documentation is generated. This name is used in the
-# title of most generated pages and in a few other places.
-# The default value is: My Project.
-
-PROJECT_NAME = Ingen
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
-# could be handy for archiving the generated documentation or if some version
-# control system is used.
-
-PROJECT_NUMBER = @INGEN_VERSION@
-
-# Using the PROJECT_BRIEF tag one can provide an optional one line description
-# for a project that appears at the top of each page and should give viewer a
-# quick idea about the purpose of the project. Keep the description short.
-
-PROJECT_BRIEF =
-
-# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
-# in the documentation. The maximum height of the logo should not exceed 55
-# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
-# the logo to the output directory.
-
-PROJECT_LOGO =
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
-# into which the generated documentation will be written. If a relative path is
-# entered, it will be relative to the location where doxygen was started. If
-# left blank the current directory will be used.
-
-OUTPUT_DIRECTORY = .
-
-# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
-# directories (in 2 levels) under the output directory of each output format and
-# will distribute the generated files over these directories. Enabling this
-# option can be useful when feeding doxygen a huge amount of source files, where
-# putting all generated files in the same directory would otherwise causes
-# performance problems for the file system.
-# The default value is: NO.
-
-CREATE_SUBDIRS = NO
-
-# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
-# characters to appear in the names of generated files. If set to NO, non-ASCII
-# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
-# U+3044.
-# The default value is: NO.
-
-ALLOW_UNICODE_NAMES = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
-# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
-# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
-# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
-# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
-# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
-# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
-# Ukrainian and Vietnamese.
-# The default value is: English.
-
-OUTPUT_LANGUAGE = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
-# descriptions after the members that are listed in the file and class
-# documentation (similar to Javadoc). Set to NO to disable this.
-# The default value is: YES.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
-# description of a member or function before the detailed description
-#
-# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-# The default value is: YES.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator that is
-# used to form the text in various listings. Each string in this list, if found
-# as the leading text of the brief description, will be stripped from the text
-# and the result, after processing the whole list, is used as the annotated
-# text. Otherwise, the brief description is used as-is. If left blank, the
-# following values are used ($name is automatically replaced with the name of
-# the entity):The $name class, The $name widget, The $name file, is, provides,
-# specifies, contains, represents, a, an and the.
-
-ABBREVIATE_BRIEF =
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# doxygen will generate a detailed section even if there is only a brief
-# description.
-# The default value is: NO.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-# The default value is: NO.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
-# before files name in the file list and in the header files. If set to NO the
-# shortest path that makes the file name unique will be used
-# The default value is: YES.
-
-FULL_PATH_NAMES = NO
-
-# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
-# Stripping is only done if one of the specified strings matches the left-hand
-# part of the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the path to
-# strip.
-#
-# Note that you can specify absolute paths here, but also relative paths, which
-# will be relative from the directory where doxygen is started.
-# This tag requires that the tag FULL_PATH_NAMES is set to YES.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
-# path mentioned in the documentation of a class, which tells the reader which
-# header file to include in order to use a class. If left blank only the name of
-# the header file containing the class definition is used. Otherwise one should
-# specify the list of include paths that are normally passed to the compiler
-# using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
-# less readable) file names. This can be useful is your file systems doesn't
-# support long names like on DOS, Mac, or CD-ROM.
-# The default value is: NO.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
-# first line (until the first dot) of a Javadoc-style comment as the brief
-# description. If set to NO, the Javadoc-style will behave just like regular Qt-
-# style comments (thus requiring an explicit @brief command for a brief
-# description.)
-# The default value is: NO.
-
-JAVADOC_AUTOBRIEF = YES
-
-# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
-# line (until the first dot) of a Qt-style comment as the brief description. If
-# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
-# requiring an explicit \brief command for a brief description.)
-# The default value is: NO.
-
-QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
-# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
-# a brief description. This used to be the default behavior. The new default is
-# to treat a multi-line C++ comment block as a detailed description. Set this
-# tag to YES if you prefer the old behavior instead.
-#
-# Note that setting this tag to YES also means that rational rose comments are
-# not recognized any more.
-# The default value is: NO.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
-# documentation from any documented member that it re-implements.
-# The default value is: YES.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
-# page for each member. If set to NO, the documentation of a member will be part
-# of the file/class/namespace that contains it.
-# The default value is: NO.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
-# uses this value to replace tabs by spaces in code fragments.
-# Minimum value: 1, maximum value: 16, default value: 4.
-
-TAB_SIZE = 4
-
-# This tag can be used to specify a number of aliases that act as commands in
-# the documentation. An alias has the form:
-# name=value
-# For example adding
-# "sideeffect=@par Side Effects:\n"
-# will allow you to put the command \sideeffect (or @sideeffect) in the
-# documentation, which will result in a user-defined paragraph with heading
-# "Side Effects:". You can put \n's in the value part of an alias to insert
-# newlines.
-
-ALIASES =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
-# only. Doxygen will then generate output that is more tailored for C. For
-# instance, some of the names that are used will be different. The list of all
-# members will be omitted, etc.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_FOR_C = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
-# Python sources only. Doxygen will then generate output that is more tailored
-# for that language. For instance, namespaces will be presented as packages,
-# qualified scopes will look different, etc.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources. Doxygen will then generate output that is tailored for Fortran.
-# The default value is: NO.
-
-OPTIMIZE_FOR_FORTRAN = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for VHDL.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_VHDL = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given
-# extension. Doxygen has a built-in mapping, but you can override or extend it
-# using this tag. The format is ext=language, where ext is a file extension, and
-# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
-# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
-# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
-# Fortran. In the later case the parser tries to guess whether the code is fixed
-# or free formatted code, this is the default for Fortran type files), VHDL. For
-# instance to make doxygen treat .inc files as Fortran files (default is PHP),
-# and .f files as C (default is Fortran), use: inc=Fortran f=C.
-#
-# Note: For files without extension you can use no_extension as a placeholder.
-#
-# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
-# the files are not read by doxygen.
-
-EXTENSION_MAPPING =
-
-# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
-# according to the Markdown format, which allows for more readable
-# documentation. See http://daringfireball.net/projects/markdown/ for details.
-# The output of markdown processing is further processed by doxygen, so you can
-# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
-# case of backward compatibilities issues.
-# The default value is: YES.
-
-MARKDOWN_SUPPORT = YES
-
-# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
-# to that level are automatically included in the table of contents, even if
-# they do not have an id attribute.
-# Note: This feature currently applies only to Markdown headings.
-# Minimum value: 0, maximum value: 99, default value: 0.
-# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
-
-TOC_INCLUDE_HEADINGS = 0
-
-# When enabled doxygen tries to link words that correspond to documented
-# classes, or namespaces to their corresponding documentation. Such a link can
-# be prevented in individual cases by putting a % sign in front of the word or
-# globally by setting AUTOLINK_SUPPORT to NO.
-# The default value is: YES.
-
-AUTOLINK_SUPPORT = YES
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should set this
-# tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string);
-# versus func(std::string) {}). This also make the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-# The default value is: NO.
-
-BUILTIN_STL_SUPPORT = YES
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-# The default value is: NO.
-
-CPP_CLI_SUPPORT = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
-# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
-# will parse them like normal C++ but will assume all classes use public instead
-# of private inheritance when no explicit protection keyword is present.
-# The default value is: NO.
-
-SIP_SUPPORT = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate
-# getter and setter methods for a property. Setting this option to YES will make
-# doxygen to replace the get and set methods by a property in the documentation.
-# This will only work if the methods are indeed getting or setting a simple
-# type. If this is not the case, or you want to show the methods anyway, you
-# should set this option to NO.
-# The default value is: YES.
-
-IDL_PROPERTY_SUPPORT = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-# The default value is: NO.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# If one adds a struct or class to a group and this option is enabled, then also
-# any nested class or struct is added to the same group. By default this option
-# is disabled and one has to add nested compounds explicitly via \ingroup.
-# The default value is: NO.
-
-GROUP_NESTED_COMPOUNDS = NO
-
-# Set the SUBGROUPING tag to YES to allow class member groups of the same type
-# (for instance a group of public functions) to be put as a subgroup of that
-# type (e.g. under the Public Functions section). Set it to NO to prevent
-# subgrouping. Alternatively, this can be done per class using the
-# \nosubgrouping command.
-# The default value is: YES.
-
-SUBGROUPING = YES
-
-# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
-# are shown inside the group in which they are included (e.g. using \ingroup)
-# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
-# and RTF).
-#
-# Note that this feature does not work in combination with
-# SEPARATE_MEMBER_PAGES.
-# The default value is: NO.
-
-INLINE_GROUPED_CLASSES = NO
-
-# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
-# with only public data fields or simple typedef fields will be shown inline in
-# the documentation of the scope in which they are defined (i.e. file,
-# namespace, or group documentation), provided this scope is documented. If set
-# to NO, structs, classes, and unions are shown on a separate page (for HTML and
-# Man pages) or section (for LaTeX and RTF).
-# The default value is: NO.
-
-INLINE_SIMPLE_STRUCTS = YES
-
-# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
-# enum is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically be
-# useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-# The default value is: NO.
-
-TYPEDEF_HIDES_STRUCT = NO
-
-# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
-# cache is used to resolve symbols given their name and scope. Since this can be
-# an expensive process and often the same symbol appears multiple times in the
-# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
-# doxygen will become slower. If the cache is too large, memory is wasted. The
-# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
-# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
-# symbols. At the end of a run doxygen will report the cache usage and suggest
-# the optimal cache size from a speed point of view.
-# Minimum value: 0, maximum value: 9, default value: 0.
-
-LOOKUP_CACHE_SIZE = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
-# documentation are documented, even if no documentation was available. Private
-# class members and static file members will be hidden unless the
-# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
-# Note: This will also disable the warnings about undocumented members that are
-# normally produced when WARNINGS is set to YES.
-# The default value is: NO.
-
-EXTRACT_ALL = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
-# be included in the documentation.
-# The default value is: NO.
-
-EXTRACT_PRIVATE = NO
-
-# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
-# scope will be included in the documentation.
-# The default value is: NO.
-
-EXTRACT_PACKAGE = NO
-
-# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
-# included in the documentation.
-# The default value is: NO.
-
-EXTRACT_STATIC = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
-# locally in source files will be included in the documentation. If set to NO,
-# only classes defined in header files are included. Does not have any effect
-# for Java sources.
-# The default value is: YES.
-
-EXTRACT_LOCAL_CLASSES = NO
-
-# This flag is only useful for Objective-C code. If set to YES, local methods,
-# which are defined in the implementation section but not in the interface are
-# included in the documentation. If set to NO, only methods in the interface are
-# included.
-# The default value is: NO.
-
-EXTRACT_LOCAL_METHODS = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base name of
-# the file that contains the anonymous namespace. By default anonymous namespace
-# are hidden.
-# The default value is: NO.
-
-EXTRACT_ANON_NSPACES = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
-# undocumented members inside documented classes or files. If set to NO these
-# members will be included in the various overviews, but no documentation
-# section is generated. This option has no effect if EXTRACT_ALL is enabled.
-# The default value is: NO.
-
-HIDE_UNDOC_MEMBERS = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy. If set
-# to NO, these classes will be included in the various overviews. This option
-# has no effect if EXTRACT_ALL is enabled.
-# The default value is: NO.
-
-HIDE_UNDOC_CLASSES = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
-# (class|struct|union) declarations. If set to NO, these declarations will be
-# included in the documentation.
-# The default value is: NO.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
-# documentation blocks found inside the body of a function. If set to NO, these
-# blocks will be appended to the function's detailed documentation block.
-# The default value is: NO.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation that is typed after a
-# \internal command is included. If the tag is set to NO then the documentation
-# will be excluded. Set it to YES to include the internal documentation.
-# The default value is: NO.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
-# names in lower-case letters. If set to YES, upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-# The default value is: system dependent.
-
-CASE_SENSE_NAMES = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
-# their full class and namespace scopes in the documentation. If set to YES, the
-# scope will be hidden.
-# The default value is: NO.
-
-HIDE_SCOPE_NAMES = NO
-
-# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
-# append additional text to a page's title, such as Class Reference. If set to
-# YES the compound reference will be hidden.
-# The default value is: NO.
-
-HIDE_COMPOUND_REFERENCE= NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
-# the files that are included by a file in the documentation of that file.
-# The default value is: YES.
-
-SHOW_INCLUDE_FILES = YES
-
-# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
-# grouped member an include statement to the documentation, telling the reader
-# which file to include in order to use the member.
-# The default value is: NO.
-
-SHOW_GROUPED_MEMB_INC = NO
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
-# files with double quotes in the documentation rather than with sharp brackets.
-# The default value is: NO.
-
-FORCE_LOCAL_INCLUDES = NO
-
-# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
-# documentation for inline members.
-# The default value is: YES.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
-# (detailed) documentation of file and class members alphabetically by member
-# name. If set to NO, the members will appear in declaration order.
-# The default value is: YES.
-
-SORT_MEMBER_DOCS = NO
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
-# descriptions of file, namespace and class members alphabetically by member
-# name. If set to NO, the members will appear in declaration order. Note that
-# this will also influence the order of the classes in the class list.
-# The default value is: NO.
-
-SORT_BRIEF_DOCS = NO
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
-# (brief and detailed) documentation of class members so that constructors and
-# destructors are listed first. If set to NO the constructors will appear in the
-# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
-# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
-# member documentation.
-# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
-# detailed member documentation.
-# The default value is: NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
-# of group names into alphabetical order. If set to NO the group names will
-# appear in their defined order.
-# The default value is: NO.
-
-SORT_GROUP_NAMES = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
-# fully-qualified names, including namespaces. If set to NO, the class list will
-# be sorted only by class name, not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the alphabetical
-# list.
-# The default value is: NO.
-
-SORT_BY_SCOPE_NAME = YES
-
-# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
-# type resolution of all parameters of a function it will reject a match between
-# the prototype and the implementation of a member function even if there is
-# only one candidate or it is obvious which candidate to choose by doing a
-# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
-# accept a match between prototype and implementation in such cases.
-# The default value is: NO.
-
-STRICT_PROTO_MATCHING = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
-# list. This list is created by putting \todo commands in the documentation.
-# The default value is: YES.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
-# list. This list is created by putting \test commands in the documentation.
-# The default value is: YES.
-
-GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
-# list. This list is created by putting \bug commands in the documentation.
-# The default value is: YES.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
-# the deprecated list. This list is created by putting \deprecated commands in
-# the documentation.
-# The default value is: YES.
-
-GENERATE_DEPRECATEDLIST= NO
-
-# The ENABLED_SECTIONS tag can be used to enable conditional documentation
-# sections, marked by \if <section_label> ... \endif and \cond <section_label>
-# ... \endcond blocks.
-
-ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
-# initial value of a variable or macro / define can have for it to appear in the
-# documentation. If the initializer consists of more lines than specified here
-# it will be hidden. Use a value of 0 to hide initializers completely. The
-# appearance of the value of individual variables and macros / defines can be
-# controlled using \showinitializer or \hideinitializer command in the
-# documentation regardless of this setting.
-# Minimum value: 0, maximum value: 10000, default value: 30.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
-# the bottom of the documentation of classes and structs. If set to YES, the
-# list will mention the files that were used to generate the documentation.
-# The default value is: YES.
-
-SHOW_USED_FILES = YES
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
-# will remove the Files entry from the Quick Index and from the Folder Tree View
-# (if specified).
-# The default value is: YES.
-
-SHOW_FILES = NO
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
-# page. This will remove the Namespaces entry from the Quick Index and from the
-# Folder Tree View (if specified).
-# The default value is: YES.
-
-SHOW_NAMESPACES = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command command input-file, where command is the value of the
-# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
-# by doxygen. Whatever the program writes to standard output is used as the file
-# version. For an example see the documentation.
-
-FILE_VERSION_FILTER =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. To create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option. You can
-# optionally specify a file name after the option, if omitted DoxygenLayout.xml
-# will be used as the name of the layout file.
-#
-# Note that if you run doxygen from a directory containing a file called
-# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
-# tag is left empty.
-
-LAYOUT_FILE =
-
-# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
-# the reference definitions. This must be a list of .bib files. The .bib
-# extension is automatically appended if omitted. This requires the bibtex tool
-# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
-# For LaTeX the style of the bibliography can be controlled using
-# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
-# search path. See also \cite for info how to create references.
-
-CITE_BIB_FILES =
-
-#---------------------------------------------------------------------------
-# Configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated to
-# standard output by doxygen. If QUIET is set to YES this implies that the
-# messages are off.
-# The default value is: NO.
-
-QUIET = YES
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
-# this implies that the warnings are on.
-#
-# Tip: Turn warnings on while writing the documentation.
-# The default value is: YES.
-
-WARNINGS = NO
-
-# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
-# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
-# will automatically be disabled.
-# The default value is: YES.
-
-WARN_IF_UNDOCUMENTED = NO
-
-# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some parameters
-# in a documented function, or documenting parameters that don't exist or using
-# markup commands wrongly.
-# The default value is: YES.
-
-WARN_IF_DOC_ERROR = YES
-
-# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
-# are documented, but have no documentation for their parameters or return
-# value. If set to NO, doxygen will only warn about wrong or incomplete
-# parameter documentation, but not about the absence of documentation.
-# The default value is: NO.
-
-WARN_NO_PARAMDOC = NO
-
-# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
-# a warning is encountered.
-# The default value is: NO.
-
-WARN_AS_ERROR = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that doxygen
-# can produce. The string should contain the $file, $line, and $text tags, which
-# will be replaced by the file and line number from which the warning originated
-# and the warning text. Optionally the format may contain $version, which will
-# be replaced by the version of the file (if it could be obtained via
-# FILE_VERSION_FILTER)
-# The default value is: $file:$line: $text.
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning and error
-# messages should be written. If left blank the output is written to standard
-# error (stderr).
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag is used to specify the files and/or directories that contain
-# documented source files. You may enter file names like myfile.cpp or
-# directories like /usr/src/myproject. Separate the files or directories with
-# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
-# Note: If this tag is empty the current directory is searched.
-
-INPUT = @INGEN_SRCDIR@/include
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
-# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
-# documentation (see: http://www.gnu.org/software/libiconv) for the list of
-# possible encodings.
-# The default value is: UTF-8.
-
-INPUT_ENCODING = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
-# *.h) to filter out the source-files in the directories.
-#
-# Note that for custom extensions or not directly supported extensions you also
-# need to set EXTENSION_MAPPING for the extension otherwise the files are not
-# read by doxygen.
-#
-# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
-# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
-# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
-# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
-# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf.
-
-FILE_PATTERNS =
-
-# The RECURSIVE tag can be used to specify whether or not subdirectories should
-# be searched for input files as well.
-# The default value is: NO.
-
-RECURSIVE = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should be
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-#
-# Note that relative paths are relative to the directory from which doxygen is
-# run.
-
-EXCLUDE =
-
-# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
-# directories that are symbolic links (a Unix file system feature) are excluded
-# from the input.
-# The default value is: NO.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories.
-#
-# Note that the wildcards are matched against the file with absolute path, so to
-# exclude all test directories for example use the pattern */test/*
-
-EXCLUDE_PATTERNS =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-#
-# Note that the wildcards are matched against the file with absolute path, so to
-# exclude all test directories use the pattern */test/*
-
-EXCLUDE_SYMBOLS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or directories
-# that contain example code fragments that are included (see the \include
-# command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
-# *.h) to filter out the source-files in the directories. If left blank all
-# files are included.
-
-EXAMPLE_PATTERNS =
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude commands
-# irrespective of the value of the RECURSIVE tag.
-# The default value is: NO.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or directories
-# that contain images that are to be included in the documentation (see the
-# \image command).
-
-IMAGE_PATH =
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command:
-#
-# <filter> <input-file>
-#
-# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
-# name of an input file. Doxygen will then use the output that the filter
-# program writes to standard output. If FILTER_PATTERNS is specified, this tag
-# will be ignored.
-#
-# Note that the filter must not add or remove lines; it is applied before the
-# code is scanned, but not when the output code is generated. If lines are added
-# or removed, the anchors will not be placed correctly.
-#
-# Note that for custom extensions or not directly supported extensions you also
-# need to set EXTENSION_MAPPING for the extension otherwise the files are not
-# properly processed by doxygen.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form: pattern=filter
-# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
-# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
-# patterns match the file name, INPUT_FILTER is applied.
-#
-# Note that for custom extensions or not directly supported extensions you also
-# need to set EXTENSION_MAPPING for the extension otherwise the files are not
-# properly processed by doxygen.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will also be used to filter the input files that are used for
-# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
-# The default value is: NO.
-
-FILTER_SOURCE_FILES = NO
-
-# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
-# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
-# it is also possible to disable source filtering for a specific pattern using
-# *.ext= (so without naming a filter).
-# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-
-FILTER_SOURCE_PATTERNS =
-
-# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
-# is part of the input, its contents will be placed on the main page
-# (index.html). This can be useful if you have a project on for instance GitHub
-# and want to reuse the introduction page also for the doxygen output.
-
-USE_MDFILE_AS_MAINPAGE =
-
-#---------------------------------------------------------------------------
-# Configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
-# generated. Documented entities will be cross-referenced with these sources.
-#
-# Note: To get rid of all source code in the generated output, make sure that
-# also VERBATIM_HEADERS is set to NO.
-# The default value is: NO.
-
-SOURCE_BROWSER = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body of functions,
-# classes and enums directly into the documentation.
-# The default value is: NO.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
-# special comment blocks from generated source code fragments. Normal C, C++ and
-# Fortran comments will always remain visible.
-# The default value is: YES.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
-# function all documented functions referencing it will be listed.
-# The default value is: NO.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES then for each documented function
-# all documented entities called/used by that function will be listed.
-# The default value is: NO.
-
-REFERENCES_RELATION = YES
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
-# to YES then the hyperlinks from functions in REFERENCES_RELATION and
-# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
-# link to the documentation.
-# The default value is: YES.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
-# source code will show a tooltip with additional information such as prototype,
-# brief description and links to the definition and documentation. Since this
-# will make the HTML file larger and loading of large files a bit slower, you
-# can opt to disable this feature.
-# The default value is: YES.
-# This tag requires that the tag SOURCE_BROWSER is set to YES.
-
-SOURCE_TOOLTIPS = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code will
-# point to the HTML generated by the htags(1) tool instead of doxygen built-in
-# source browser. The htags tool is part of GNU's global source tagging system
-# (see http://www.gnu.org/software/global/global.html). You will need version
-# 4.8.6 or higher.
-#
-# To use it do the following:
-# - Install the latest version of global
-# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
-# - Make sure the INPUT points to the root of the source tree
-# - Run doxygen as normal
-#
-# Doxygen will invoke htags (and that will in turn invoke gtags), so these
-# tools must be available from the command line (i.e. in the search path).
-#
-# The result: instead of the source browser generated by doxygen, the links to
-# source code will now point to the output of htags.
-# The default value is: NO.
-# This tag requires that the tag SOURCE_BROWSER is set to YES.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
-# verbatim copy of the header file for each class for which an include is
-# specified. Set to NO to disable this.
-# See also: Section \class.
-# The default value is: YES.
-
-VERBATIM_HEADERS = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
-# compounds will be generated. Enable this if the project contains a lot of
-# classes, structs, unions or interfaces.
-# The default value is: YES.
-
-ALPHABETICAL_INDEX = NO
-
-# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
-# which the alphabetical index list will be split.
-# Minimum value: 1, maximum value: 20, default value: 5.
-# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-
-COLS_IN_ALPHA_INDEX = 1
-
-# In case all classes in a project start with a common prefix, all classes will
-# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
-# can be used to specify a prefix (or a list of prefixes) that should be ignored
-# while generating the index headers.
-# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
-# The default value is: YES.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: html.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_OUTPUT = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
-# generated HTML page (for example: .htm, .php, .asp).
-# The default value is: .html.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
-# each generated HTML page. If the tag is left blank doxygen will generate a
-# standard header.
-#
-# To get valid HTML the header file that includes any scripts and style sheets
-# that doxygen needs, which is dependent on the configuration options used (e.g.
-# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
-# default header using
-# doxygen -w html new_header.html new_footer.html new_stylesheet.css
-# YourConfigFile
-# and then modify the file new_header.html. See also section "Doxygen usage"
-# for information on how to generate the default header that doxygen normally
-# uses.
-# Note: The header is subject to change so you typically have to regenerate the
-# default header when upgrading to a newer version of doxygen. For a description
-# of the possible markers and block names see the documentation.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_HEADER =
-
-# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
-# generated HTML page. If the tag is left blank doxygen will generate a standard
-# footer. See HTML_HEADER for more information on how to generate a default
-# footer and what special commands can be used inside the footer. See also
-# section "Doxygen usage" for information on how to generate the default footer
-# that doxygen normally uses.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_FOOTER =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
-# sheet that is used by each HTML page. It can be used to fine-tune the look of
-# the HTML output. If left blank doxygen will generate a default style sheet.
-# See also section "Doxygen usage" for information on how to generate the style
-# sheet that doxygen normally uses.
-# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
-# it is more robust and this tag (HTML_STYLESHEET) will in the future become
-# obsolete.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_STYLESHEET = @INGEN_SRCDIR@/doc/style.css
-
-# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
-# cascading style sheets that are included after the standard style sheets
-# created by doxygen. Using this option one can overrule certain style aspects.
-# This is preferred over using HTML_STYLESHEET since it does not replace the
-# standard style sheet and is therefore more robust against future updates.
-# Doxygen will copy the style sheet files to the output directory.
-# Note: The order of the extra style sheet files is of importance (e.g. the last
-# style sheet in the list overrules the setting of the previous ones in the
-# list). For an example see the documentation.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_EXTRA_STYLESHEET =
-
-# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the HTML output directory. Note
-# that these files will be copied to the base HTML output directory. Use the
-# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
-# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
-# files will be copied as-is; there are no commands or markers available.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_EXTRA_FILES =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
-# will adjust the colors in the style sheet and background images according to
-# this color. Hue is specified as an angle on a colorwheel, see
-# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
-# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
-# purple, and 360 is red again.
-# Minimum value: 0, maximum value: 359, default value: 220.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_HUE = 160
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
-# in the HTML output. For a value of 0 the output will use grayscales only. A
-# value of 255 will produce the most vivid colors.
-# Minimum value: 0, maximum value: 255, default value: 100.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_SAT = 40
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
-# luminance component of the colors in the HTML output. Values below 100
-# gradually make the output lighter, whereas values above 100 make the output
-# darker. The value divided by 100 is the actual gamma applied, so 80 represents
-# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
-# change the gamma.
-# Minimum value: 40, maximum value: 240, default value: 80.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_GAMMA = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting this
-# to YES can help to show when doxygen was last run and thus if the
-# documentation is up to date.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_TIMESTAMP = NO
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_DYNAMIC_SECTIONS = YES
-
-# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
-# shown in the various tree structured indices initially; the user can expand
-# and collapse entries dynamically later on. Doxygen will expand the tree to
-# such a level that at most the specified number of entries are visible (unless
-# a fully collapsed tree already exceeds this amount). So setting the number of
-# entries 1 will produce a full collapsed tree by default. 0 is a special value
-# representing an infinite number of entries and will result in a full expanded
-# tree by default.
-# Minimum value: 0, maximum value: 9999, default value: 100.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_INDEX_NUM_ENTRIES = 100
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files will be
-# generated that can be used as input for Apple's Xcode 3 integrated development
-# environment (see: http://developer.apple.com/tools/xcode/), introduced with
-# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
-# Makefile in the HTML output directory. Running make will produce the docset in
-# that directory and running make install will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
-# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_DOCSET = NO
-
-# This tag determines the name of the docset feed. A documentation feed provides
-# an umbrella under which multiple documentation sets from a single provider
-# (such as a company or product suite) can be grouped.
-# The default value is: Doxygen generated docs.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_FEEDNAME = "Doxygen generated docs"
-
-# This tag specifies a string that should uniquely identify the documentation
-# set bundle. This should be a reverse domain-name style string, e.g.
-# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_BUNDLE_ID = org.doxygen.Project
-
-# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-# The default value is: org.doxygen.Publisher.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-
-# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
-# The default value is: Publisher.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_PUBLISHER_NAME = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
-# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
-# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
-# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
-# Windows.
-#
-# The HTML Help Workshop contains a compiler that can convert all HTML output
-# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
-# files are now used as the Windows 98 help format, and will replace the old
-# Windows help format (.hlp) on all Windows platforms in the future. Compressed
-# HTML files also contain an index, a table of contents, and you can search for
-# words in the documentation. The HTML workshop also contains a viewer for
-# compressed HTML files.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_HTMLHELP = NO
-
-# The CHM_FILE tag can be used to specify the file name of the resulting .chm
-# file. You can add a path in front of the file if the result should not be
-# written to the html output directory.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-CHM_FILE =
-
-# The HHC_LOCATION tag can be used to specify the location (absolute path
-# including file name) of the HTML help compiler (hhc.exe). If non-empty,
-# doxygen will try to run the HTML help compiler on the generated index.hhp.
-# The file has to be specified with full path.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-HHC_LOCATION =
-
-# The GENERATE_CHI flag controls if a separate .chi index file is generated
-# (YES) or that it should be included in the master .chm file (NO).
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-GENERATE_CHI = NO
-
-# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
-# and project file content.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-CHM_INDEX_ENCODING =
-
-# The BINARY_TOC flag controls whether a binary table of contents is generated
-# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
-# enables the Previous and Next buttons.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members to
-# the table of contents of the HTML help documentation and to the tree view.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-TOC_EXPAND = YES
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
-# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
-# (.qch) of the generated HTML documentation.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_QHP = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
-# the file name of the resulting .qch file. The path specified is relative to
-# the HTML output folder.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QCH_FILE =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
-# Project output. For more information please see Qt Help Project / Namespace
-# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_NAMESPACE =
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
-# Help Project output. For more information please see Qt Help Project / Virtual
-# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
-# folders).
-# The default value is: doc.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_VIRTUAL_FOLDER = doc
-
-# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
-# filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
-# filters).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_CUST_FILTER_NAME =
-
-# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
-# filters).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_CUST_FILTER_ATTRS =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's filter section matches. Qt Help Project / Filter Attributes (see:
-# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_SECT_FILTER_ATTRS =
-
-# The QHG_LOCATION tag can be used to specify the location of Qt's
-# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
-# generated .qhp file.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHG_LOCATION =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
-# generated, together with the HTML files, they form an Eclipse help plugin. To
-# install this plugin and make it available under the help contents menu in
-# Eclipse, the contents of the directory containing the HTML and XML files needs
-# to be copied into the plugins directory of eclipse. The name of the directory
-# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
-# After copying Eclipse needs to be restarted before the help appears.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_ECLIPSEHELP = NO
-
-# A unique identifier for the Eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have this
-# name. Each documentation set should have its own identifier.
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
-
-ECLIPSE_DOC_ID = org.doxygen.Project
-
-# If you want full control over the layout of the generated HTML pages it might
-# be necessary to disable the index and replace it with your own. The
-# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
-# of each HTML page. A value of NO enables the index and the value YES disables
-# it. Since the tabs in the index contain the same information as the navigation
-# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-DISABLE_INDEX = NO
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information. If the tag
-# value is set to YES, a side panel will be generated containing a tree-like
-# index structure (just like the one that is generated for HTML Help). For this
-# to work a browser that supports JavaScript, DHTML, CSS and frames is required
-# (i.e. any modern browser). Windows users are probably better off using the
-# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
-# further fine-tune the look of the index. As an example, the default style
-# sheet generated by doxygen has an example that shows how to put an image at
-# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
-# the same information as the tab index, you could consider setting
-# DISABLE_INDEX to YES when enabling this option.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_TREEVIEW = NO
-
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
-# doxygen will group on one line in the generated HTML documentation.
-#
-# Note that a value of 0 will completely suppress the enum values from appearing
-# in the overview section.
-# Minimum value: 0, maximum value: 20, default value: 4.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-ENUM_VALUES_PER_LINE = 1
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
-# to set the initial width (in pixels) of the frame in which the tree is shown.
-# Minimum value: 0, maximum value: 1500, default value: 250.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-TREEVIEW_WIDTH = 250
-
-# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
-# external symbols imported via tag files in a separate window.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-EXT_LINKS_IN_WINDOW = NO
-
-# Use this tag to change the font size of LaTeX formulas included as images in
-# the HTML documentation. When you change the font size after a successful
-# doxygen run you need to manually remove any form_*.png images from the HTML
-# output directory to force them to be regenerated.
-# Minimum value: 8, maximum value: 50, default value: 10.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-FORMULA_FONTSIZE = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are not
-# supported properly for IE 6.0, but are supported on all modern browsers.
-#
-# Note that when changing this option you need to delete any form_*.png files in
-# the HTML output directory before the changes have effect.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-FORMULA_TRANSPARENT = YES
-
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
-# http://www.mathjax.org) which uses client side Javascript for the rendering
-# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
-# installed or if you want to formulas look prettier in the HTML output. When
-# enabled you may also need to install MathJax separately and configure the path
-# to it using the MATHJAX_RELPATH option.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-USE_MATHJAX = NO
-
-# When MathJax is enabled you can set the default output format to be used for
-# the MathJax output. See the MathJax site (see:
-# http://docs.mathjax.org/en/latest/output.html) for more details.
-# Possible values are: HTML-CSS (which is slower, but has the best
-# compatibility), NativeMML (i.e. MathML) and SVG.
-# The default value is: HTML-CSS.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_FORMAT = HTML-CSS
-
-# When MathJax is enabled you need to specify the location relative to the HTML
-# output directory using the MATHJAX_RELPATH option. The destination directory
-# should contain the MathJax.js script. For instance, if the mathjax directory
-# is located at the same level as the HTML output directory, then
-# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
-# Content Delivery Network so you can quickly see the result without installing
-# MathJax. However, it is strongly recommended to install a local copy of
-# MathJax from http://www.mathjax.org before deployment.
-# The default value is: http://cdn.mathjax.org/mathjax/latest.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
-
-# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
-# extension names that should be enabled during MathJax rendering. For example
-# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_EXTENSIONS =
-
-# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
-# of code that will be used on startup of the MathJax code. See the MathJax site
-# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
-# example see the documentation.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_CODEFILE =
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
-# the HTML output. The underlying search engine uses javascript and DHTML and
-# should work on any modern browser. Note that when using HTML help
-# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
-# there is already a search function so this one should typically be disabled.
-# For large projects the javascript based search engine can be slow, then
-# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
-# search using the keyboard; to jump to the search box use <access key> + S
-# (what the <access key> is depends on the OS and browser, but it is typically
-# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
-# key> to jump into the search results window, the results can be navigated
-# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
-# the search. The filter options can be selected when the cursor is inside the
-# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
-# to select a filter and <Enter> or <escape> to activate or cancel the filter
-# option.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-SEARCHENGINE = NO
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a web server instead of a web client using Javascript. There
-# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
-# setting. When disabled, doxygen will generate a PHP script for searching and
-# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
-# and searching needs to be provided by external tools. See the section
-# "External Indexing and Searching" for details.
-# The default value is: NO.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-SERVER_BASED_SEARCH = NO
-
-# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
-# script for searching. Instead the search results are written to an XML file
-# which needs to be processed by an external indexer. Doxygen will invoke an
-# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
-# search results.
-#
-# Doxygen ships with an example indexer (doxyindexer) and search engine
-# (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: http://xapian.org/).
-#
-# See the section "External Indexing and Searching" for details.
-# The default value is: NO.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-EXTERNAL_SEARCH = NO
-
-# The SEARCHENGINE_URL should point to a search engine hosted by a web server
-# which will return the search results when EXTERNAL_SEARCH is enabled.
-#
-# Doxygen ships with an example indexer (doxyindexer) and search engine
-# (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: http://xapian.org/). See the section "External Indexing and
-# Searching" for details.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-SEARCHENGINE_URL =
-
-# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
-# search data is written to a file for indexing by an external tool. With the
-# SEARCHDATA_FILE tag the name of this file can be specified.
-# The default file is: searchdata.xml.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-SEARCHDATA_FILE = searchdata.xml
-
-# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
-# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
-# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
-# projects and redirect the results back to the right project.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-EXTERNAL_SEARCH_ID =
-
-# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
-# projects other than the one defined by this configuration file, but that are
-# all added to the same external search index. Each project needs to have a
-# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
-# to a relative location where the documentation can be found. The format is:
-# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-EXTRA_SEARCH_MAPPINGS =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
-# The default value is: YES.
-
-GENERATE_LATEX = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: latex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked.
-#
-# Note that when enabling USE_PDFLATEX this option is only used for generating
-# bitmaps for formulas in the HTML output, but not in the Makefile that is
-# written to the output directory.
-# The default file is: latex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
-# index for LaTeX.
-# The default file is: makeindex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
-# documents. This may be useful for small projects and may help to save some
-# trees in general.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-COMPACT_LATEX = YES
-
-# The PAPER_TYPE tag can be used to set the paper type that is used by the
-# printer.
-# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
-# 14 inches) and executive (7.25 x 10.5 inches).
-# The default value is: a4.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-PAPER_TYPE = a4
-
-# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
-# that should be included in the LaTeX output. The package can be specified just
-# by its name or with the correct syntax as to be used with the LaTeX
-# \usepackage command. To get the times font for instance you can specify :
-# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
-# To use the option intlimits with the amsmath package you can specify:
-# EXTRA_PACKAGES=[intlimits]{amsmath}
-# If left blank no extra packages will be included.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
-# generated LaTeX document. The header should contain everything until the first
-# chapter. If it is left blank doxygen will generate a standard header. See
-# section "Doxygen usage" for information on how to let doxygen write the
-# default header to a separate file.
-#
-# Note: Only use a user-defined header if you know what you are doing! The
-# following commands have a special meaning inside the header: $title,
-# $datetime, $date, $doxygenversion, $projectname, $projectnumber,
-# $projectbrief, $projectlogo. Doxygen will replace $title with the empty
-# string, for the replacement values of the other commands the user is referred
-# to HTML_HEADER.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_HEADER =
-
-# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
-# generated LaTeX document. The footer should contain everything after the last
-# chapter. If it is left blank doxygen will generate a standard footer. See
-# LATEX_HEADER for more information on how to generate a default footer and what
-# special commands can be used inside the footer.
-#
-# Note: Only use a user-defined footer if you know what you are doing!
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_FOOTER =
-
-# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
-# LaTeX style sheets that are included after the standard style sheets created
-# by doxygen. Using this option one can overrule certain style aspects. Doxygen
-# will copy the style sheet files to the output directory.
-# Note: The order of the extra style sheet files is of importance (e.g. the last
-# style sheet in the list overrules the setting of the previous ones in the
-# list).
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_EXTRA_STYLESHEET =
-
-# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the LATEX_OUTPUT output
-# directory. Note that the files will be copied as-is; there are no commands or
-# markers available.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_EXTRA_FILES =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
-# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
-# contain links (just like the HTML output) instead of page references. This
-# makes the output suitable for online browsing using a PDF viewer.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-PDF_HYPERLINKS = YES
-
-# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
-# the PDF file directly from the LaTeX files. Set this option to YES, to get a
-# higher quality PDF documentation.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-USE_PDFLATEX = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
-# command to the generated LaTeX files. This will instruct LaTeX to keep running
-# if errors occur, instead of asking the user for help. This option is also used
-# when generating formulas in HTML.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_BATCHMODE = NO
-
-# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
-# index chapters (such as File Index, Compound Index, etc.) in the output.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_HIDE_INDICES = YES
-
-# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
-# code with syntax highlighting in the LaTeX output.
-#
-# Note that which sources are shown also depends on other settings such as
-# SOURCE_BROWSER.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_SOURCE_CODE = NO
-
-# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
-# bibliography, e.g. plainnat, or ieeetr. See
-# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
-# The default value is: plain.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_BIB_STYLE = plain
-
-# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
-# page will contain the date and time when the page was generated. Setting this
-# to NO can help when comparing the output of multiple runs.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_TIMESTAMP = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
-# RTF output is optimized for Word 97 and may not look too pretty with other RTF
-# readers/editors.
-# The default value is: NO.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: rtf.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
-# documents. This may be useful for small projects and may help to save some
-# trees in general.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
-# contain hyperlink fields. The RTF file will contain links (just like the HTML
-# output) instead of page references. This makes the output suitable for online
-# browsing using Word or some other Word compatible readers that support those
-# fields.
-#
-# Note: WordPad (write) and others do not support links.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's config
-# file, i.e. a series of assignments. You only have to provide replacements,
-# missing definitions are set to their default value.
-#
-# See also section "Doxygen usage" for information on how to generate the
-# default style sheet that doxygen normally uses.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an RTF document. Syntax is
-# similar to doxygen's config file. A template extensions file can be generated
-# using doxygen -e rtf extensionFile.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_EXTENSIONS_FILE =
-
-# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
-# with syntax highlighting in the RTF output.
-#
-# Note that which sources are shown also depends on other settings such as
-# SOURCE_BROWSER.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_SOURCE_CODE = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
-# classes and files.
-# The default value is: NO.
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it. A directory man3 will be created inside the directory specified by
-# MAN_OUTPUT.
-# The default directory is: man.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to the generated
-# man pages. In case the manual section does not start with a number, the number
-# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
-# optional.
-# The default value is: .3.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_EXTENSION = .3
-
-# The MAN_SUBDIR tag determines the name of the directory created within
-# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
-# MAN_EXTENSION with the initial . removed.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_SUBDIR =
-
-# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
-# will generate one additional man file for each entity documented in the real
-# man page(s). These additional files only source the real man page, but without
-# them the man command would be unable to find the correct page.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
-# captures the structure of the code including all documentation.
-# The default value is: NO.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: xml.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_OUTPUT = xml
-
-# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
-# listings (including syntax highlighting and cross-referencing information) to
-# the XML output. Note that enabling this will significantly increase the size
-# of the XML output.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# Configuration options related to the DOCBOOK output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
-# that can be used to generate PDF.
-# The default value is: NO.
-
-GENERATE_DOCBOOK = NO
-
-# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
-# front of it.
-# The default directory is: docbook.
-# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
-
-DOCBOOK_OUTPUT = docbook
-
-# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
-# program listings (including syntax highlighting and cross-referencing
-# information) to the DOCBOOK output. Note that enabling this will significantly
-# increase the size of the DOCBOOK output.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
-
-DOCBOOK_PROGRAMLISTING = NO
-
-#---------------------------------------------------------------------------
-# Configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
-# AutoGen Definitions (see http://autogen.sf.net) file that captures the
-# structure of the code including all documentation. Note that this feature is
-# still experimental and incomplete at the moment.
-# The default value is: NO.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
-# file that captures the structure of the code including all documentation.
-#
-# Note that this feature is still experimental and incomplete at the moment.
-# The default value is: NO.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
-# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
-# output from the Perl module output.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
-# formatted so it can be parsed by a human reader. This is useful if you want to
-# understand what is going on. On the other hand, if this tag is set to NO, the
-# size of the Perl module output will be much smaller and Perl will parse it
-# just the same.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file are
-# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
-# so different doxyrules.make files included by the same Makefile don't
-# overwrite each other's variables.
-# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
-# C-preprocessor directives found in the sources and include files.
-# The default value is: YES.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
-# in the source code. If set to NO, only conditional compilation will be
-# performed. Macro expansion can be done in a controlled way by setting
-# EXPAND_ONLY_PREDEF to YES.
-# The default value is: NO.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-MACRO_EXPANSION = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
-# the macro expansion is limited to the macros specified with the PREDEFINED and
-# EXPAND_AS_DEFINED tags.
-# The default value is: NO.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-EXPAND_ONLY_PREDEF = NO
-
-# If the SEARCH_INCLUDES tag is set to YES, the include files in the
-# INCLUDE_PATH will be searched if a #include is found.
-# The default value is: YES.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by the
-# preprocessor.
-# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-
-INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will be
-# used.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that are
-# defined before the preprocessor is started (similar to the -D option of e.g.
-# gcc). The argument of the tag is a list of macros of the form: name or
-# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
-# is assumed. To prevent a macro definition from being undefined via #undef or
-# recursively expanded use the := operator instead of the = operator.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-PREDEFINED =
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
-# tag can be used to specify a list of macro names that should be expanded. The
-# macro definition that is found in the sources will be used. Use the PREDEFINED
-# tag if you want to use a different macro definition that overrules the
-# definition found in the source code.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
-# remove all references to function-like macros that are alone on a line, have
-# an all uppercase name, and do not end with a semicolon. Such function macros
-# are typically used for boiler-plate code, and will confuse the parser if not
-# removed.
-# The default value is: YES.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration options related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES tag can be used to specify one or more tag files. For each tag
-# file the location of the external documentation should be added. The format of
-# a tag file without this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where loc1 and loc2 can be relative or absolute paths or URLs. See the
-# section "Linking to external documentation" for more information about the use
-# of tag files.
-# Note: Each tag file must have a unique name (where the name does NOT include
-# the path). If a tag file is not located in the directory in which doxygen is
-# run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
-# tag file that is based on the input files it reads. See section "Linking to
-# external documentation" for more information about the usage of tag files.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
-# the class index. If set to NO, only the inherited external classes will be
-# listed.
-# The default value is: NO.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will be
-# listed.
-# The default value is: YES.
-
-EXTERNAL_GROUPS = YES
-
-# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
-# the related pages index. If set to NO, only the current project's pages will
-# be listed.
-# The default value is: YES.
-
-EXTERNAL_PAGES = YES
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
-# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
-# NO turns the diagrams off. Note that this option also works with HAVE_DOT
-# disabled, but it is recommended to install and use dot, since it yields more
-# powerful graphs.
-# The default value is: YES.
-
-CLASS_DIAGRAMS = YES
-
-# You can include diagrams made with dia in doxygen documentation. Doxygen will
-# then run dia to produce the diagram and insert it in the documentation. The
-# DIA_PATH tag allows you to specify the directory where the dia binary resides.
-# If left empty dia is assumed to be found in the default search path.
-
-DIA_PATH =
-
-# If set to YES the inheritance and collaboration graphs will hide inheritance
-# and usage relations if the target is undocumented or is not a class.
-# The default value is: YES.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz (see:
-# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
-# Bell Labs. The other options in this section have no effect if this option is
-# set to NO
-# The default value is: NO.
-
-HAVE_DOT = YES
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
-# to run in parallel. When set to 0 doxygen will base this on the number of
-# processors available in the system. You can set it explicitly to a value
-# larger than 0 to get control over the balance between CPU load and processing
-# speed.
-# Minimum value: 0, maximum value: 32, default value: 0.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_NUM_THREADS = 0
-
-# When you want a differently looking font in the dot files that doxygen
-# generates you can specify the font name using DOT_FONTNAME. You need to make
-# sure dot is able to find the font, which can be done by putting it in a
-# standard location or by setting the DOTFONTPATH environment variable or by
-# setting DOT_FONTPATH to the directory containing the font.
-# The default value is: Helvetica.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_FONTNAME =
-
-# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
-# dot graphs.
-# Minimum value: 4, maximum value: 24, default value: 10.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_FONTSIZE = 10
-
-# By default doxygen will tell dot to use the default font as specified with
-# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
-# the path where dot can find it using this tag.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_FONTPATH =
-
-# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
-# each documented class showing the direct and indirect inheritance relations.
-# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
-# graph for each documented class showing the direct and indirect implementation
-# dependencies (inheritance, containment, and class references variables) of the
-# class with other documented classes.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
-# groups, showing the direct groups dependencies.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-UML_LOOK = NO
-
-# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
-# class node. If there are many fields or methods and many nodes the graph may
-# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
-# number of items for each type to make the size more manageable. Set this to 0
-# for no limit. Note that the threshold may be exceeded by 50% before the limit
-# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
-# but if the number exceeds 15, the total amount of fields shown is limited to
-# 10.
-# Minimum value: 0, maximum value: 100, default value: 10.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-UML_LIMIT_NUM_FIELDS = 10
-
-# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
-# collaboration graphs will show the relations between templates and their
-# instances.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-TEMPLATE_RELATIONS = NO
-
-# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
-# YES then doxygen will generate a graph for each documented file showing the
-# direct and indirect include dependencies of the file with other documented
-# files.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-INCLUDE_GRAPH = YES
-
-# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
-# set to YES then doxygen will generate a graph for each documented file showing
-# the direct and indirect include dependencies of the file with other documented
-# files.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
-# dependency graph for every global function or class method.
-#
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable call graphs for selected
-# functions only using the \callgraph command. Disabling a call graph can be
-# accomplished by means of the command \hidecallgraph.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-CALL_GRAPH = NO
-
-# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
-# dependency graph for every global function or class method.
-#
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable caller graphs for selected
-# functions only using the \callergraph command. Disabling a caller graph can be
-# accomplished by means of the command \hidecallergraph.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-CALLER_GRAPH = NO
-
-# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
-# hierarchy of all classes instead of a textual one.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
-# dependencies a directory has on other directories in a graphical way. The
-# dependency relations are determined by the #include relations between the
-# files in the directories.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. For an explanation of the image formats see the section
-# output formats in the documentation of the dot tool (Graphviz (see:
-# http://www.graphviz.org/)).
-# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
-# to make the SVG files visible in IE 9+ (other browsers do not have this
-# requirement).
-# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo,
-# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
-# png:gdiplus:gdiplus.
-# The default value is: png.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_IMAGE_FORMAT = png
-
-# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
-# enable generation of interactive SVG images that allow zooming and panning.
-#
-# Note that this requires a modern browser other than Internet Explorer. Tested
-# and working are Firefox, Chrome, Safari, and Opera.
-# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
-# the SVG files visible. Older versions of IE do not have SVG support.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-INTERACTIVE_SVG = NO
-
-# The DOT_PATH tag can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the \dotfile
-# command).
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOTFILE_DIRS =
-
-# The MSCFILE_DIRS tag can be used to specify one or more directories that
-# contain msc files that are included in the documentation (see the \mscfile
-# command).
-
-MSCFILE_DIRS =
-
-# The DIAFILE_DIRS tag can be used to specify one or more directories that
-# contain dia files that are included in the documentation (see the \diafile
-# command).
-
-DIAFILE_DIRS =
-
-# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
-# path where java can find the plantuml.jar file. If left blank, it is assumed
-# PlantUML is not used or called during a preprocessing step. Doxygen will
-# generate a warning when it encounters a \startuml command in this case and
-# will not generate output for the diagram.
-
-PLANTUML_JAR_PATH =
-
-# When using plantuml, the specified paths are searched for files specified by
-# the !include statement in a plantuml block.
-
-PLANTUML_INCLUDE_PATH =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
-# that will be shown in the graph. If the number of nodes in a graph becomes
-# larger than this value, doxygen will truncate the graph, which is visualized
-# by representing a node as a red box. Note that doxygen if the number of direct
-# children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
-# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-# Minimum value: 0, maximum value: 10000, default value: 50.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_GRAPH_MAX_NODES = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
-# generated by dot. A depth value of 3 means that only nodes reachable from the
-# root by following a path via at most 3 edges will be shown. Nodes that lay
-# further from the root node will be omitted. Note that setting this option to 1
-# or 2 may greatly reduce the computation time needed for large code bases. Also
-# note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-# Minimum value: 0, maximum value: 1000, default value: 0.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not seem
-# to support this out of the box.
-#
-# Warning: Depending on the platform used, enabling this option may lead to
-# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
-# read).
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_TRANSPARENT = YES
-
-# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10) support
-# this, this feature is disabled by default.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_MULTI_TARGETS = NO
-
-# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
-# explaining the meaning of the various boxes and arrows in the dot generated
-# graphs.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
-# files that are used to generate the various graphs.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_CLEANUP = YES
diff --git a/doc/style.css b/doc/style.css
deleted file mode 100644
index 172be516..00000000
--- a/doc/style.css
+++ /dev/null
@@ -1,1145 +0,0 @@
-body {
- max-width: 80em;
- margin: 0;
- margin-left: auto;
- margin-right: auto;
- background: #FFF;
- color: #000;
-}
-
-#titlearea {
- display: none;
-}
-
-h1 {
- font-size: 180%;
- font-weight: 900;
-}
-
-h2 {
- font-size: 140%;
- font-weight: 700;
-}
-
-h3 {
- font-size: 120%;
- font-weight: 700;
-}
-
-h4 {
- font-size: 110%;
- font-weight: 700;
-}
-
-h5 {
- font-size: 100%;
- font-weight: 700;
-}
-
-h6 {
- font-size: 100%;
- font-weight: 600;
-}
-
-p {
- margin: 0 0 1em 0;
-}
-
-dt {
- font-weight: 700;
-}
-
-p.startli,p.startdd,p.starttd {
- margin-top: 2px;
-}
-
-p.endli {
- margin-bottom: 0;
-}
-
-p.enddd {
- margin-bottom: 4px;
-}
-
-p.endtd {
- margin-bottom: 2px;
-}
-
-caption {
- font-weight: 700;
-}
-
-span.legend {
- font-size: 70%;
- text-align: center;
-}
-
-h3.version {
- font-size: 90%;
- text-align: center;
-}
-
-div.qindex,div.navtab {
- background-color: #EBEFF6;
- border: 1px solid #A3B4D7;
- text-align: center;
- margin: 2px;
- padding: 2px;
-}
-
-div.navtab {
- margin-right: 15px;
-}
-
-/* @group Link Styling */
-a {
- color: #546E00;
- text-decoration: none;
-}
-
-.contents a:visited {
- color: #344E00;
-}
-
-a:hover {
- text-decoration: underline;
-}
-
-a.qindexHL {
- background-color: #9CAFD4;
- color: #FFF;
- border: 1px double #869DCA;
-}
-
-code {
- color: #444;
-}
-
-a.code {
- color: #4665A2;
-}
-
-a.codeRef {
- color: #4665A2;
-}
-
-/* @end */
-dl.el {
- margin-left: -1cm;
-}
-
-.fragment {
- font-family: monospace, fixed;
- font-size: 105%;
- padding-bottom: 1em;
-}
-
-pre.fragment {
- border: 1px solid #C4C4C4;
- background-color: #F9F9F9;
- padding: 4px 6px;
- margin: 4px 8px 4px 2px;
- overflow: auto;
- font-size: 9pt;
- line-height: 125%;
-}
-
-div.ah {
- background-color: #000;
- font-weight: 700;
- color: #FFF;
- margin-bottom: 3px;
- margin-top: 3px;
- padding: .2em;
- border: thin solid #333;
-}
-
-div.groupHeader {
- margin-left: 16px;
- margin-top: 12px;
- margin-bottom: 6px;
- font-weight: 700;
-}
-
-a + h2.groupheader {
- display: none;
-}
-
-div.groupText {
- margin-left: 16px;
- font-style: italic;
-}
-
-div.contents {
- margin-top: 10px;
- margin-left: 10px;
- margin-right: 10px;
-}
-
-td.indexkey {
- background-color: #EBEFF6;
- font-weight: 700;
- border: 1px solid #C4CFE5;
- margin: 2px 0;
- padding: 2px 10px;
-}
-
-td.indexvalue {
- background-color: #EBEFF6;
- border: 1px solid #C4CFE5;
- padding: 2px 10px;
- margin: 2px 0;
-}
-
-tr.memlist {
- background-color: #EEF1F7;
-}
-
-p.formulaDsp {
- text-align: center;
-}
-
-img.formulaInl {
- vertical-align: middle;
-}
-
-div.center {
- text-align: center;
- margin-top: 0;
- margin-bottom: 0;
- padding: 0;
-}
-
-div.center img {
- border: 0;
-}
-
-address.footer {
- text-align: right;
- padding-right: 12px;
-}
-
-img.footer {
- border: 0;
- vertical-align: middle;
-}
-
-/* @group Code Colorization */
-span.keyword {
- color: green;
-}
-
-span.keywordtype {
- color: #3E873E;
-}
-
-span.keywordflow {
- color: #e08000;
-}
-
-span.comment {
- color: maroon;
-}
-
-span.preprocessor {
- color: #806020;
-}
-
-span.stringliteral {
- color: #002080;
-}
-
-span.charliteral {
- color: teal;
-}
-
-span.vhdldigit {
- color: #F0F;
-}
-
-span.vhdlkeyword {
- color: #700070;
-}
-
-span.vhdllogic {
- color: red;
-}
-
-/* @end */
-td.tiny {
- font-size: 75%;
-}
-
-.dirtab {
- padding: 4px;
- border-collapse: collapse;
- border: 1px solid #A3B4D7;
-}
-
-th.dirtab {
- background: #EBEFF6;
- font-weight: 700;
-}
-
-hr {
- height: 0;
- border: none;
- border-top: 1px solid #DDD;
- margin: 2em 0 1em;
-}
-
-hr.footer {
- height: 1px;
-}
-
-/* @group Member Descriptions */
-table.memberdecls {
- border-spacing: 0.125em;
-}
-
-h2.groupheader {
- margin: 1em 0 0.5em 0;
-}
-
-.mdescLeft,.mdescRight,.memItemLeft,.memItemRight,.memTemplItemLeft,.memTemplItemRight,.memTemplParams {
- margin: 0;
- padding: 0;
-}
-
-.mdescLeft,.mdescRight {
- color: #555;
-}
-
-.memItemLeft,.memItemRight,.memTemplParams {
- border: 0;
- font-family: monospace, fixed;
- font-size: 90%;
-}
-
-.memItemLeft,.memTemplItemLeft {
- white-space: nowrap;
- padding-left: 2em;
- padding-right: 1em;
-}
-
-.memItemLeft a.el {
- font-weight: bold;
-}
-
-.memTemplParams {
- color: #464646;
- white-space: nowrap;
-}
-
-td.memSeparator {
- display: none;
-}
-
-td.mlabels-right {
- vertical-align: top;
- padding-top: 4px;
- color: #AA6;
-}
-
-.memtitle {
- display: none;
-}
-
-/* @end */
-/* @group Member Details */
-/* Styles for detailed member documentation */
-.memtemplate {
- font-size: 80%;
- color: #4665A2;
- font-weight: bold;
-}
-
-.memnav {
- background-color: #EBEFF6;
- border: 1px solid #A3B4D7;
- text-align: center;
- margin: 2px;
- margin-right: 15px;
- padding: 2px;
-}
-
-.memitem {
- padding: 0;
- margin: 1em 0 1em 0;
-}
-
-.memproto {
- padding: 0;
- font-size: 110%;
- font-weight: bold;
- color: #000;
-}
-
-.memproto .paramname {
- color: #444;
- font-style: normal;
-}
-
-.memdoc {
- padding: 0 0 0.5em 2em;
-}
-
-.paramkey {
- text-align: right;
-}
-
-.paramtype {
- color: #3E873E;
- white-space: nowrap;
-}
-
-.paramname {
- color: #444;
- white-space: nowrap;
- font-weight: bold;
-}
-
-td.paramname {
- vertical-align: top;
-}
-
-.fieldname {
- color: #000;
-}
-
-td.fieldname {
- padding-right: 1em;
- vertical-align: top;
-}
-
-td.fieldtype {
- vertical-align: top;
- color: #444;
-}
-
-td.fielddoc p {
- margin: 0;
-}
-
-/* @end */
-/* @group Directory (tree) */
-/* for the tree view */
-.ftvtree {
- font-family: sans-serif;
- margin: 0;
-}
-
-/* these are for tree view when used as main index */
-.directory {
- font-size: small;
- margin: 0.5em;
-}
-
-.directory h3 {
- margin: 0;
- margin-top: 1em;
- font-size: 11pt;
-}
-
-.directory > h3 {
- margin-top: 0;
-}
-
-.directory p {
- margin: 0;
- white-space: nowrap;
-}
-
-.directory div {
- display: none;
- margin: 0;
-}
-
-.directory img {
- vertical-align: -30%;
-}
-
-/* these are for tree view when not used as main index */
-.directory-alt {
- font-size: 100%;
- font-weight: bold;
-}
-
-.directory-alt h3 {
- margin: 0;
- margin-top: 1em;
- font-size: 11pt;
-}
-
-.directory-alt > h3 {
- margin-top: 0;
-}
-
-.directory-alt p {
- margin: 0;
- white-space: nowrap;
-}
-
-.directory-alt div {
- display: none;
- margin: 0;
-}
-
-.directory-alt img {
- vertical-align: -30%;
-}
-
-/* @end */
-div.dynheader {
- margin-top: 8px;
-}
-
-address {
- font-style: normal;
- color: #2A3D61;
-}
-
-table.doxtable {
- border-collapse: collapse;
- margin: 0.5em;
-}
-
-table.doxtable td,table.doxtable th {
- border: 1px solid #DDD;
- padding: 3px 7px 2px;
-}
-
-table.doxtable th {
- background-color: #F3F3F3;
- color: #000;
- padding-bottom: 4px;
- padding-top: 5px;
- text-align: left;
- font-weight: bold;
-}
-
-.tabsearch {
- top: 0;
- left: 10px;
- height: 36px;
- z-index: 101;
- overflow: hidden;
- font-size: 13px;
-}
-
-div.navpath {
- padding: 0.25em;
-}
-
-.navpath ul {
- font-size: x-small;
- color: #8AA0CC;
- overflow: hidden;
- margin: 0;
- padding: 0;
-}
-
-.navpath li {
- list-style-type: none;
- float: left;
- padding-left: 10px;
- padding-right: 15px;
- color: #364D7C;
-}
-
-.navpath a {
- display: block;
- text-decoration: none;
- outline: none;
-}
-
-.navpath a:hover {
- color: #6884BD;
-}
-
-div.summary {
- float: right;
- font-size: x-small;
- padding: 0.25em 0.5em 0 0;
- width: 50%;
- text-align: right;
-}
-
-div.summary a {
- white-space: nowrap;
-}
-
-div.header {
- background-color: #F3F3F3;
- margin: 0;
- border: 0;
-}
-
-div.headertitle {
- font-size: 180%;
- font-weight: bold;
- color: #FFF;
- padding: 0.125em 0.25em 0.125em 0.25em;
- background-color: #333;
- background: linear-gradient(to bottom, #333 0%, #111 100%);
- border: solid 1px #444;
- border-top: 0;
- border-radius: 0 0 6px 6px;
-}
-
-div.line {
- font-family: monospace, fixed;
- font-size: 13px;
- min-height: 13px;
- line-height: 1.0;
- text-wrap: avoid;
- white-space: pre-wrap;
- text-indent: -53px;
- padding-left: 53px;
- padding-bottom: 0;
- margin: 0;
-}
-
-.glow {
- background-color: cyan;
- box-shadow: 0 0 10px cyan;
-}
-
-span.lineno {
- padding-right: 4px;
- text-align: right;
- border-right: 2px solid #0F0;
- background-color: #E8E8E8;
- white-space: pre;
-}
-span.lineno a {
- background-color: #D8D8D8;
-}
-
-span.lineno a:hover {
- background-color: #C8C8C8;
-}
-
-.tabs, .tabs2, .navpath {
- background-image: none;
- background-color: #333;
- background: linear-gradient(to bottom, #333 0%, #111 100%);
- border: 0;
- border-bottom: solid 2px #000;
- padding: 0;
- padding-top: 2px;
- font-size: small;
-}
-
-#navrow1 {
- border: 0;
-}
-
-th {
- text-align: left;
-}
-
-.mlabel {
- padding: 0.125em;
-}
-
-/* tabs*/
-
-.tablist {
- margin: 0;
- padding: 0;
- display: table;
-}
-
-.tablist li {
- display: table-cell;
- line-height: 2em;
- list-style: none;
- background-color: #333;
- background: linear-gradient(to bottom, #444 0%, #222 100%);
- border: 1px solid #222;
- border-bottom: 0;
- border-radius: 6px 6px 0 0;
- color: #DDD;
-}
-
-.tablist a {
- display: block;
- padding: 0 20px;
- font-weight: bold;
- color: #859900;
- text-decoration: none;
- outline: none;
-}
-
-.header a {
- color: #859900;
-}
-
-.tabs3 .tablist a {
- padding: 0 10px;
-}
-
-.tablist a:hover {
- color: #fff;
- text-decoration: none;
-}
-
-.tablist li.current a {
- color: #fff;
-}
-
-span.icon {
- display: none;
-}
-
-/* nav bar */
-
-.sm {
- position: relative;
- z-index: 9999;
-}
-
-.sm,.sm ul,.sm li {
- display: block;
- list-style: none;
- margin: 0;
- padding: 0;
- line-height: normal;
- direction: ltr;
- text-align: left;
- -webkit-tap-highlight-color: rgba(0,0,0,0);
-}
-
-.sm-rtl,.sm-rtl ul,.sm-rtl li {
- direction: rtl;
- text-align: right;
-}
-
-.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6 {
- margin: 0;
- padding: 0;
-}
-
-.sm ul {
- display: none;
-}
-
-.sm li,.sm a {
- position: relative;
-}
-
-.sm a {
- display: block;
-}
-
-.sm a.disabled {
- cursor: not-allowed;
-}
-
-.sm:after {
- content: "\00a0";
- display: block;
- height: 0;
- font: 0/0 serif;
- clear: both;
- visibility: hidden;
- overflow: hidden;
-}
-
-.sm,.sm *,.sm :before,.sm :after {
- -moz-box-sizing: border-box;
- -webkit-box-sizing: border-box;
- box-sizing: border-box;
-}
-
-#doc-content {
- overflow: auto;
- display: block;
- padding: 0;
- margin: 0;
- -webkit-overflow-scrolling: touch;
-}
-
-.sm-dox {
- background-image: none;
- background-color: #333;
- background: linear-gradient(to bottom, #333 0%, #111 100%);
- color: #fff;
-}
-
-.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active {
- padding: 0 12px;
- padding-right: 43px;
- font-size: small;
- font-weight: 600;
- line-height: auto;
- text-decoration: none;
- text-shadow: none;
- color: inherit;
- outline: 0;
-}
-
-.sm-dox a:hover {
- background-image: none;
- background-repeat: repeat-x;
- color: inherit;
- text-shadow: 0 1px 1px #000;
-}
-
-.sm-dox a.current {
- color: #d23600;
-}
-
-.sm-dox a.disabled {
- color: #bbb;
-}
-
-.sm-dox a span.sub-arrow {
- position: absolute;
- top: 50%;
- margin-top: -14px;
- left: auto;
- right: 3px;
- width: 28px;
- height: 28px;
- overflow: hidden;
- font: bold 12px/28px monospace !important;
- text-align: center;
- text-shadow: none;
- background: rgba(255,255,255,0.5);
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
-}
-
-.sm-dox a.highlighted span.sub-arrow:before {
- display: block;
- content: '-';
-}
-
-.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a {
- -moz-border-radius: 5px 5px 0 0;
- -webkit-border-radius: 5px;
- border-radius: 5px 5px 0 0;
-}
-
-.sm-dox>li:last-child>a,.sm-dox>li:last-child>:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul {
- -moz-border-radius: 0 0 5px 5px;
- -webkit-border-radius: 0;
- border-radius: 0 0 5px 5px;
-}
-
-.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>:not(ul) a.highlighted {
- -moz-border-radius: 0;
- -webkit-border-radius: 0;
- border-radius: 0;
-}
-
-.sm-dox ul {
- background: rgba(162,162,162,0.1);
-}
-
-.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active {
- font-size: 12px;
- border-left: 8px solid transparent;
- line-height: auto;
- text-shadow: none;
- background-color: #fff;
- background-image: none;
-}
-
-.sm-dox ul a:hover {
- background-image: none;
- background-repeat: repeat-x;
- color: inherit;
- text-shadow: 0 1px 1px #000;
-}
-
-.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active {
- border-left: 16px solid transparent;
-}
-
-.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active {
- border-left: 24px solid transparent;
-}
-
-.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active {
- border-left: 32px solid transparent;
-}
-
-.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active {
- border-left: 40px solid transparent;
-}
-
-@media(min-width:768px) {
- .sm-dox ul {
- position: absolute;
- width: 12em;
- }
-
- .sm-dox li {
- float: left;
- }
-
- .sm-dox.sm-rtl li {
- float: right;
- }
-
- .sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li {
- float: none;
- }
-
- .sm-dox a {
- white-space: nowrap;
- }
-
- .sm-dox ul a,.sm-dox.sm-vertical a {
- white-space: normal;
- }
-
- .sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a {
- white-space: nowrap;
- }
-
- .sm-dox {
- padding: 0 10px;
- background-image: none;
- background-color: #000;
- line-height: normal;
- background-image: none;
- background-color: #333;
- background: linear-gradient(to bottom, #333 0%, #111 100%);
- color: #ddd;
- }
-
- .sm-dox a span.sub-arrow {
- top: 50%;
- margin-top: -2px;
- right: 12px;
- width: 0;
- height: 0;
- border-width: 4px;
- border-style: solid dashed dashed;
- border-color: #ddd transparent transparent;
- background: transparent;
- -moz-border-radius: 0;
- -webkit-border-radius: 0;
- border-radius: 0;
- }
-
- .sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted {
- padding: 0 1em 0 0;
- background-image: none;
- background-repeat: no-repeat;
- background-position: right;
- -moz-border-radius: 0 !important;
- -webkit-border-radius: 0;
- border-radius: 0 !important;
- }
-
- .sm-dox a:hover {
- background-image: none;
- background-repeat: repeat-x;
- color: #fff;
- text-shadow: 0 1px 1px #000;
- }
-
- .sm-dox a:hover span.sub-arrow {
- border-color: #fff transparent transparent;
- }
-
- .sm-dox a.has-submenu {
- padding-right: 24px;
- }
-
- .sm-dox li {
- border-top: 0;
- }
-
- .sm-dox>li>ul:before,.sm-dox>li>ul:after {
- content: '';
- position: absolute;
- top: -18px;
- left: 30px;
- width: 0;
- height: 0;
- overflow: hidden;
- border-width: 9px;
- border-style: dashed dashed solid;
- border-color: transparent transparent #bbb;
- }
-
- .sm-dox>li>ul:after {
- top: -16px;
- left: 31px;
- border-width: 8px;
- border-color: transparent transparent #fff;
- }
-
- .sm-dox ul {
- border: 1px solid #bbb;
- padding: 5px 0;
- background: initial;
- -moz-border-radius: 5px !important;
- -webkit-border-radius: 5px;
- border-radius: 5px !important;
- -moz-box-shadow: 0 5px 9px rgba(0,0,0,0.2);
- -webkit-box-shadow: 0 5px 9px rgba(0,0,0,0.2);
- box-shadow: 0 5px 9px rgba(0,0,0,0.2);
- }
-
- .sm-dox ul a span.sub-arrow {
- right: 8px;
- top: 50%;
- margin-top: -5px;
- border-width: 5px;
- border-color: transparent transparent transparent #555;
- border-style: dashed dashed dashed solid;
- }
-
- .sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted {
- color: #555;
- background-image: none;
- border: 0 !important;
- color: #555;
- background-image: none;
- }
-
- .sm-dox ul a:hover {
- background-image: none;
- background-repeat: repeat-x;
- color: #fff;
- text-shadow: 0 1px 1px #000;
- }
-
- .sm-dox ul a:hover span.sub-arrow {
- border-color: transparent transparent transparent #fff;
- }
-
- .sm-dox span.scroll-up,.sm-dox span.scroll-down {
- position: absolute;
- display: none;
- visibility: hidden;
- overflow: hidden;
- background: initial;
- height: 36px;
- }
-
- .sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover {
- background: #eee;
- }
-
- .sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow {
- border-color: transparent transparent #d23600;
- }
-
- .sm-dox span.scroll-down:hover span.scroll-down-arrow {
- border-color: #d23600 transparent transparent;
- }
-
- .sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow {
- position: absolute;
- top: 0;
- left: 50%;
- margin-left: -6px;
- width: 0;
- height: 0;
- overflow: hidden;
- border-width: 6px;
- border-style: dashed dashed solid;
- border-color: transparent transparent #555;
- }
-
- .sm-dox span.scroll-down-arrow {
- top: 8px;
- border-style: solid dashed dashed;
- border-color: #555 transparent transparent;
- }
-
- .sm-dox.sm-rtl a.has-submenu {
- padding-right: 12px;
- padding-left: 24px;
- }
-
- .sm-dox.sm-rtl a span.sub-arrow {
- right: auto;
- left: 12px;
- }
-
- .sm-dox.sm-rtl.sm-vertical a.has-submenu {
- padding: 10px 20px;
- }
-
- .sm-dox.sm-rtl.sm-vertical a span.sub-arrow {
- right: auto;
- left: 8px;
- border-style: dashed solid dashed dashed;
- border-color: transparent #555 transparent transparent;
- }
-
- .sm-dox.sm-rtl>li>ul:before {
- left: auto;
- right: 30px;
- }
-
- .sm-dox.sm-rtl>li>ul:after {
- left: auto;
- right: 31px;
- }
-
- .sm-dox.sm-rtl ul a.has-submenu {
- padding: 10px 20px !important;
- }
-
- .sm-dox.sm-rtl ul a span.sub-arrow {
- right: auto;
- left: 8px;
- border-style: dashed solid dashed dashed;
- border-color: transparent #555 transparent transparent;
- }
-
- .sm-dox.sm-vertical {
- padding: 10px 0;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- }
-
- .sm-dox.sm-vertical a {
- padding: 10px 20px;
- }
-
- .sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted {
- background: initial;
- }
-
- .sm-dox.sm-vertical a.disabled {
- background-image: none;
- }
-
- .sm-dox.sm-vertical a span.sub-arrow {
- right: 8px;
- top: 50%;
- margin-top: -5px;
- border-width: 5px;
- border-style: dashed dashed dashed solid;
- border-color: transparent transparent transparent #555;
- }
-
- .sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after {
- display: none;
- }
-
- .sm-dox.sm-vertical ul a {
- padding: 10px 20px;
- }
-
- .sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted {
- background: #eee;
- }
-
- .sm-dox.sm-vertical ul a.disabled {
- background: initial;
- }
-}
diff --git a/icons/meson.build b/icons/meson.build
index 57bc5e2f..74a2038f 100644
--- a/icons/meson.build
+++ b/icons/meson.build
@@ -14,10 +14,11 @@ png_icon_sizes = [
icons_dir = get_option('prefix') / get_option('datadir') / 'icons' / 'hicolor'
-install_data('scalable/ingen.svg',
- install_dir: icons_dir / 'scalable' / 'apps')
+install_data('scalable/ingen.svg', install_dir: icons_dir / 'scalable' / 'apps')
foreach size : png_icon_sizes
- install_data(files(size / 'ingen.png'),
- install_dir: icons_dir / size / 'apps')
+ install_data(
+ files(size / 'ingen.png'),
+ install_dir: icons_dir / size / 'apps',
+ )
endforeach
diff --git a/include/ingen/Arc.hpp b/include/ingen/Arc.hpp
index b254e3f3..d456edfb 100644
--- a/include/ingen/Arc.hpp
+++ b/include/ingen/Arc.hpp
@@ -17,8 +17,8 @@
#ifndef INGEN_ARC_HPP
#define INGEN_ARC_HPP
-#include "ingen/ingen.h"
-#include "raul/Deletable.hpp"
+#include <ingen/ingen.h>
+#include <raul/Deletable.hpp>
namespace raul {
class Path;
diff --git a/include/ingen/Atom.hpp b/include/ingen/Atom.hpp
index 0c4ac8c5..8d9cbe7f 100644
--- a/include/ingen/Atom.hpp
+++ b/include/ingen/Atom.hpp
@@ -17,9 +17,9 @@
#ifndef INGEN_ATOM_HPP
#define INGEN_ATOM_HPP
-#include "ingen/ingen.h"
-#include "lv2/atom/atom.h"
-#include "lv2/urid/urid.h"
+#include <ingen/ingen.h>
+#include <lv2/atom/atom.h>
+#include <lv2/urid/urid.h>
#include <algorithm>
#include <cassert>
diff --git a/include/ingen/AtomForge.hpp b/include/ingen/AtomForge.hpp
index cf5a759d..5d696923 100644
--- a/include/ingen/AtomForge.hpp
+++ b/include/ingen/AtomForge.hpp
@@ -17,55 +17,41 @@
#ifndef INGEN_ATOMFORGE_HPP
#define INGEN_ATOMFORGE_HPP
-#include "ingen/memory.hpp"
-#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"
-
-#include <cassert>
+#include <ingen/ingen.h>
+#include <ingen/memory.hpp>
+#include <lv2/atom/atom.h>
+#include <lv2/atom/forge.h>
+#include <lv2/urid/urid.h>
+#include <sord/sord.h>
+#include <sratom/sratom.h>
+
#include <cstdint>
#include <cstdlib>
-#include <cstring>
#include <memory>
+namespace Sord {
+class World;
+} // namespace Sord
+
namespace ingen {
/// An atom forge that writes to an automatically-resized memory buffer
-class AtomForge : public LV2_Atom_Forge
+class INGEN_API AtomForge : public LV2_Atom_Forge
{
public:
- explicit AtomForge(LV2_URID_Map& map)
- : LV2_Atom_Forge{}
- , _sratom{sratom_new(&map)}
- , _buf{static_cast<LV2_Atom*>(calloc(8, sizeof(LV2_Atom)))}
- {
- lv2_atom_forge_init(this, &map);
- lv2_atom_forge_set_sink(this, c_append, c_deref, this);
- }
+ explicit AtomForge(LV2_URID_Map& map);
/// Forge an atom from `node` in `model`
- void read(Sord::World& world, SordModel* model, const SordNode* node)
- {
- sratom_read(_sratom.get(), this, world.c_obj(), model, node);
- }
+ void read(Sord::World& world, SordModel* model, const SordNode* node);
/// Return the top-level atom that has been forged
- const LV2_Atom* atom() const { return _buf.get(); }
+ const LV2_Atom* atom() const;
/// Clear the atom buffer and reset the forge
- void clear()
- {
- lv2_atom_forge_set_sink(this, c_append, c_deref, this);
- _size = 0;
- *_buf = {0U, 0U};
- }
+ void clear();
/// Return the internal atom serialiser
- Sratom& sratom() { return *_sratom; }
+ Sratom& sratom();
private:
struct SratomDeleter { void operator()(Sratom* s) { sratom_free(s); } };
@@ -74,46 +60,16 @@ private:
using SratomPtr = std::unique_ptr<Sratom, SratomDeleter>;
/// Append some data and return a reference to its start
- intptr_t append(const void* data, uint32_t len) {
- // Record offset of the start of this write (+1 to avoid null)
- const auto ref = static_cast<intptr_t>(_size + 1U);
-
- // 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)),
- FreeDeleter<LV2_Atom>{}};
- }
-
- // Append new data
- memcpy(reinterpret_cast<uint8_t*>(_buf.get()) + _size, data, len);
- _size += len;
- return ref;
- }
+ intptr_t append(const void* data, uint32_t len);
/// Dereference a reference previously returned by append()
- LV2_Atom* deref(intptr_t ref) {
- /* Make some assumptions and do unnecessary math to appease
- -Wcast-align. This is questionable at best, though the forge should
- only dereference references to aligned atoms. */
- assert((ref - 1) % sizeof(LV2_Atom) == 0);
- return static_cast<LV2_Atom*>(_buf.get() + (ref - 1) / sizeof(LV2_Atom));
-
- // Alternatively:
- // return (LV2_Atom*)((uint8_t*)_buf + ref - 1);
- }
+ LV2_Atom* deref(intptr_t ref);
static LV2_Atom_Forge_Ref
- c_append(void* self, const void* data, uint32_t len) {
- return static_cast<AtomForge*>(self)->append(data, len);
- }
+ c_append(void* self, const void* data, uint32_t len);
static LV2_Atom*
- c_deref(void* self, LV2_Atom_Forge_Ref ref) {
- return static_cast<AtomForge*>(self)->deref(ref);
- }
+ c_deref(void* self, LV2_Atom_Forge_Ref ref);
size_t _size{0}; ///< Current atom size
size_t _capacity{8 * sizeof(LV2_Atom)}; ///< Allocated size of buffer
diff --git a/include/ingen/AtomReader.hpp b/include/ingen/AtomReader.hpp
index 6e5d83fd..b0fe5906 100644
--- a/include/ingen/AtomReader.hpp
+++ b/include/ingen/AtomReader.hpp
@@ -17,10 +17,10 @@
#ifndef INGEN_ATOMREADER_HPP
#define INGEN_ATOMREADER_HPP
-#include "ingen/AtomSink.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/ingen.h"
-#include "lv2/atom/atom.h"
+#include <ingen/AtomSink.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/ingen.h>
+#include <lv2/atom/atom.h>
#include <cstdint>
#include <optional>
diff --git a/include/ingen/AtomSink.hpp b/include/ingen/AtomSink.hpp
index abe1c196..4c759695 100644
--- a/include/ingen/AtomSink.hpp
+++ b/include/ingen/AtomSink.hpp
@@ -17,8 +17,8 @@
#ifndef INGEN_ATOMSINK_HPP
#define INGEN_ATOMSINK_HPP
-#include "ingen/ingen.h"
-#include "lv2/atom/atom.h"
+#include <ingen/ingen.h>
+#include <lv2/atom/atom.h>
#include <cstdint>
diff --git a/include/ingen/AtomWriter.hpp b/include/ingen/AtomWriter.hpp
index 43ee08b1..e391870d 100644
--- a/include/ingen/AtomWriter.hpp
+++ b/include/ingen/AtomWriter.hpp
@@ -17,15 +17,15 @@
#ifndef INGEN_ATOMWRITER_HPP
#define INGEN_ATOMWRITER_HPP
-#include "ingen/AtomForge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Message.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/ingen.h"
-#include "lv2/atom/forge.h"
-#include "lv2/urid/urid.h"
+#include <ingen/AtomForge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Message.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/ingen.h>
+#include <lv2/atom/forge.h>
+#include <lv2/urid/urid.h>
#include <cstdint>
diff --git a/include/ingen/ClashAvoider.hpp b/include/ingen/ClashAvoider.hpp
index c1d62754..bf6533ae 100644
--- a/include/ingen/ClashAvoider.hpp
+++ b/include/ingen/ClashAvoider.hpp
@@ -17,8 +17,8 @@
#ifndef INGEN_CLASHAVOIDER_HPP
#define INGEN_CLASHAVOIDER_HPP
-#include "ingen/ingen.h"
-#include "raul/Path.hpp"
+#include <ingen/ingen.h>
+#include <raul/Path.hpp>
#include <map>
#include <string>
@@ -48,9 +48,9 @@ public:
* @param new_path The new path that `old_path` was mapped to
* @param name The old name.
*/
- static std::string adjust_name(const raul::Path& old_path,
- const raul::Path& new_path,
- std::string name);
+ static std::string adjust_name(const raul::Path& old_path,
+ const raul::Path& new_path,
+ const std::string& name);
private:
using Offsets = std::map<raul::Path, unsigned>;
diff --git a/include/ingen/Clock.hpp b/include/ingen/Clock.hpp
index 75575aa5..9e20a031 100644
--- a/include/ingen/Clock.hpp
+++ b/include/ingen/Clock.hpp
@@ -37,7 +37,7 @@ public:
uint64_t now_microseconds() const {
const uint64_t now = mach_absolute_time();
- return now * _timebase.numer / _timebase.denom / 1e3;
+ return now * _timebase.numer / _timebase.denom / 1000U;
}
private:
@@ -48,8 +48,8 @@ private:
uint64_t now_microseconds() const {
struct timespec time{};
clock_gettime(_clock, &time);
- return static_cast<uint64_t>(time.tv_sec) * 1000000U +
- static_cast<uint64_t>(time.tv_nsec) / 100U;
+ return (static_cast<uint64_t>(time.tv_sec) * 1000000U) +
+ (static_cast<uint64_t>(time.tv_nsec) / 1000U);
}
private:
diff --git a/include/ingen/ColorContext.hpp b/include/ingen/ColorContext.hpp
index c1486b5c..666a044e 100644
--- a/include/ingen/ColorContext.hpp
+++ b/include/ingen/ColorContext.hpp
@@ -17,7 +17,7 @@
#ifndef INGEN_COLORCONTEXT_HPP
#define INGEN_COLORCONTEXT_HPP
-#include "ingen/ingen.h"
+#include <ingen/ingen.h>
#include <cstdio>
diff --git a/include/ingen/Configuration.hpp b/include/ingen/Configuration.hpp
index ba68950c..5c4d2841 100644
--- a/include/ingen/Configuration.hpp
+++ b/include/ingen/Configuration.hpp
@@ -17,11 +17,11 @@
#ifndef INGEN_CONFIGURATION_HPP
#define INGEN_CONFIGURATION_HPP
-#include "ingen/Atom.hpp"
-#include "ingen/FilePath.hpp"
-#include "ingen/ingen.h"
-#include "lv2/urid/urid.h"
-#include "raul/Exception.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/FilePath.hpp>
+#include <ingen/ingen.h>
+#include <lv2/urid/urid.h>
+#include <raul/Exception.hpp>
#include <cstdio>
#include <list>
@@ -82,7 +82,7 @@ public:
/** Parse a command line.
*
- * @throw OptionError
+ * @throw OptionError An option is unknown or an option value is invalid.
*/
void parse(int argc, char **argv);
diff --git a/include/ingen/DataAccess.hpp b/include/ingen/DataAccess.hpp
index 59bd80f9..c18c74f3 100644
--- a/include/ingen/DataAccess.hpp
+++ b/include/ingen/DataAccess.hpp
@@ -17,13 +17,13 @@
#ifndef INGEN_DATAACCESS_HPP
#define INGEN_DATAACCESS_HPP
-#include "ingen/LV2Features.hpp"
-#include "ingen/Node.hpp"
-#include "ingen/Store.hpp"
-#include "ingen/World.hpp"
-#include "lilv/lilv.h"
-#include "lv2/core/lv2.h"
-#include "lv2/data-access/data-access.h"
+#include <ingen/LV2Features.hpp>
+#include <ingen/Node.hpp>
+#include <ingen/Store.hpp>
+#include <ingen/World.hpp>
+#include <lilv/lilv.h>
+#include <lv2/core/lv2.h>
+#include <lv2/data-access/data-access.h>
#include <cstdlib>
#include <memory>
diff --git a/include/ingen/EngineBase.hpp b/include/ingen/EngineBase.hpp
index 1b6b105a..35115ad4 100644
--- a/include/ingen/EngineBase.hpp
+++ b/include/ingen/EngineBase.hpp
@@ -17,7 +17,7 @@
#ifndef INGEN_ENGINEBASE_HPP
#define INGEN_ENGINEBASE_HPP
-#include "ingen/ingen.h"
+#include <ingen/ingen.h>
#include <chrono>
#include <cstddef>
@@ -46,7 +46,7 @@ public:
*/
virtual void init(double sample_rate,
uint32_t block_length,
- size_t seq_size) = 0;
+ uint32_t seq_size) = 0;
/**
Return true iff the engine and driver supports dynamic ports.
diff --git a/include/ingen/Forge.hpp b/include/ingen/Forge.hpp
index fdd53276..dd7ec130 100644
--- a/include/ingen/Forge.hpp
+++ b/include/ingen/Forge.hpp
@@ -17,9 +17,9 @@
#ifndef INGEN_FORGE_HPP
#define INGEN_FORGE_HPP
-#include "ingen/Atom.hpp"
-#include "ingen/ingen.h"
-#include "lv2/atom/forge.h"
+#include <ingen/Atom.hpp>
+#include <ingen/ingen.h>
+#include <lv2/atom/forge.h>
#include <cstdint>
#include <cstring>
diff --git a/include/ingen/InstanceAccess.hpp b/include/ingen/InstanceAccess.hpp
index b3fcff35..66a2b5c3 100644
--- a/include/ingen/InstanceAccess.hpp
+++ b/include/ingen/InstanceAccess.hpp
@@ -17,12 +17,12 @@
#ifndef INGEN_INSTANCEACCESS_HPP
#define INGEN_INSTANCEACCESS_HPP
-#include "ingen/LV2Features.hpp"
-#include "ingen/Node.hpp"
-#include "ingen/Store.hpp"
-#include "ingen/World.hpp"
-#include "lilv/lilv.h"
-#include "lv2/core/lv2.h"
+#include <ingen/LV2Features.hpp>
+#include <ingen/Node.hpp>
+#include <ingen/Store.hpp>
+#include <ingen/World.hpp>
+#include <lilv/lilv.h>
+#include <lv2/core/lv2.h>
#include <memory>
diff --git a/include/ingen/Interface.hpp b/include/ingen/Interface.hpp
index 79cfad63..329dab2c 100644
--- a/include/ingen/Interface.hpp
+++ b/include/ingen/Interface.hpp
@@ -21,11 +21,11 @@
#ifndef INGEN_INTERFACE_HPP
#define INGEN_INTERFACE_HPP
-#include "ingen/Message.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/Status.hpp"
-#include "ingen/ingen.h"
+#include <ingen/Message.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/Status.hpp>
+#include <ingen/ingen.h>
#include <cstdint>
#include <memory>
diff --git a/include/ingen/LV2Features.hpp b/include/ingen/LV2Features.hpp
index 5726feb9..41bdf848 100644
--- a/include/ingen/LV2Features.hpp
+++ b/include/ingen/LV2Features.hpp
@@ -17,9 +17,9 @@
#ifndef INGEN_LV2FEATURES_HPP
#define INGEN_LV2FEATURES_HPP
-#include "ingen/ingen.h"
-#include "lv2/core/lv2.h"
-#include "raul/Noncopyable.hpp"
+#include <ingen/ingen.h>
+#include <lv2/core/lv2.h>
+#include <raul/Noncopyable.hpp>
#include <memory>
#include <string>
diff --git a/include/ingen/Library.hpp b/include/ingen/Library.hpp
index 4cee985f..99dfff4c 100644
--- a/include/ingen/Library.hpp
+++ b/include/ingen/Library.hpp
@@ -17,8 +17,8 @@
#ifndef INGEN_LIBRARY_HPP
#define INGEN_LIBRARY_HPP
-#include "ingen/FilePath.hpp"
-#include "ingen/ingen.h"
+#include <ingen/FilePath.hpp>
+#include <ingen/ingen.h>
namespace ingen {
@@ -26,7 +26,7 @@ namespace ingen {
class INGEN_API Library
{
public:
- Library(const FilePath& path);
+ explicit Library(const FilePath& path);
~Library();
Library(const Library&) = delete;
@@ -40,7 +40,7 @@ public:
static const char* get_last_error();
- operator bool() const { return _lib; }
+ explicit operator bool() const { return _lib; }
private:
void* _lib;
diff --git a/include/ingen/Log.hpp b/include/ingen/Log.hpp
index 8d1b420c..afde276a 100644
--- a/include/ingen/Log.hpp
+++ b/include/ingen/Log.hpp
@@ -1,6 +1,6 @@
/*
This file is part of Ingen.
- Copyright 2007-2016 David Robillard <http://drobilla.net/>
+ Copyright 2007-2024 David Robillard <http://drobilla.net/>
Ingen is free software: you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free
@@ -17,17 +17,15 @@
#ifndef INGEN_LOG_HPP
#define INGEN_LOG_HPP
-#include "ingen/LV2Features.hpp"
-#include "ingen/fmt.hpp" // IWYU pragma: export
-#include "ingen/ingen.h"
-#include "lv2/core/lv2.h"
-#include "lv2/log/log.h"
-#include "lv2/urid/urid.h"
+#include <ingen/LV2Features.hpp>
+#include <ingen/fmt.hpp>
+#include <ingen/ingen.h>
+#include <lv2/core/lv2.h>
+#include <lv2/log/log.h>
+#include <lv2/urid/urid.h>
#include <cstdarg>
-#include <cstdio>
#include <functional>
-#include <memory>
#include <string>
#include <utility>
@@ -35,7 +33,6 @@ namespace ingen {
class Node;
class URIs;
-class World;
class INGEN_API Log
{
@@ -89,14 +86,13 @@ public:
}
int vtprintf(LV2_URID type, const char* fmt, va_list args);
+ int tprintf(LV2_URID type, const char* fmt, ...);
void set_flush(bool f) { _flush = f; }
void set_trace(bool f) { _trace = f; }
void set_sink(Sink s) { _sink = std::move(s); }
private:
- void print(FILE* stream, const std::string& msg) const;
-
LV2_Log_Log* _log;
URIs& _uris;
Sink _sink;
diff --git a/include/ingen/Message.hpp b/include/ingen/Message.hpp
index de62f459..be0b5d00 100644
--- a/include/ingen/Message.hpp
+++ b/include/ingen/Message.hpp
@@ -17,12 +17,12 @@
#ifndef INGEN_MESSAGE_HPP
#define INGEN_MESSAGE_HPP
-#include "ingen/Atom.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/Status.hpp"
-#include "ingen/URI.hpp"
-#include "raul/Path.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/Status.hpp>
+#include <ingen/URI.hpp>
+#include <raul/Path.hpp>
#include <cstdint>
#include <string>
diff --git a/include/ingen/Module.hpp b/include/ingen/Module.hpp
index 90f2f930..1a12a036 100644
--- a/include/ingen/Module.hpp
+++ b/include/ingen/Module.hpp
@@ -17,8 +17,8 @@
#ifndef INGEN_MODULE_HPP
#define INGEN_MODULE_HPP
-#include "ingen/Library.hpp"
-#include "ingen/ingen.h"
+#include <ingen/Library.hpp>
+#include <ingen/ingen.h>
#include <memory>
@@ -46,8 +46,8 @@ public:
/** Library implementing this module.
*
- * This is managed by the World and not this class, since closing the library
- * in this destructor could possibly reference code from the library
+ * This is managed by the World and not this class, since closing the
+ * library in this destructor could possibly reference code from the library
* afterwards and cause a segfault on exit.
*/
std::unique_ptr<Library> library;
diff --git a/include/ingen/Node.hpp b/include/ingen/Node.hpp
index 3e07df2f..2370cfe7 100644
--- a/include/ingen/Node.hpp
+++ b/include/ingen/Node.hpp
@@ -17,11 +17,11 @@
#ifndef INGEN_NODE_HPP
#define INGEN_NODE_HPP
-#include "ingen/Resource.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/ingen.h"
-#include "ingen/paths.hpp"
-#include "lilv/lilv.h"
+#include <ingen/Resource.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/ingen.h>
+#include <ingen/paths.hpp>
+#include <lilv/lilv.h>
#include <cstdint>
#include <filesystem>
diff --git a/include/ingen/Parser.hpp b/include/ingen/Parser.hpp
index 16ee4070..8db64104 100644
--- a/include/ingen/Parser.hpp
+++ b/include/ingen/Parser.hpp
@@ -17,12 +17,12 @@
#ifndef INGEN_PARSER_HPP
#define INGEN_PARSER_HPP
-#include "ingen/FilePath.hpp"
-#include "ingen/Properties.hpp" // IWYU pragma: keep
-#include "ingen/URI.hpp"
-#include "ingen/ingen.h"
-#include "raul/Path.hpp" // IWYU pragma: keep
-#include "raul/Symbol.hpp" // IWYU pragma: keep
+#include <ingen/FilePath.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/ingen.h>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
#include <optional>
#include <set>
diff --git a/include/ingen/Properties.hpp b/include/ingen/Properties.hpp
index 9151372b..5f953902 100644
--- a/include/ingen/Properties.hpp
+++ b/include/ingen/Properties.hpp
@@ -17,9 +17,9 @@
#ifndef INGEN_PROPERTIES_HPP
#define INGEN_PROPERTIES_HPP
-#include "ingen/Atom.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
#include <initializer_list>
#include <map>
diff --git a/include/ingen/QueuedInterface.hpp b/include/ingen/QueuedInterface.hpp
index 4bb6baea..ab2c2532 100644
--- a/include/ingen/QueuedInterface.hpp
+++ b/include/ingen/QueuedInterface.hpp
@@ -17,9 +17,9 @@
#ifndef INGEN_QUEUEDINTERFACE_HPP
#define INGEN_QUEUEDINTERFACE_HPP
-#include "ingen/Interface.hpp"
-#include "ingen/Message.hpp"
-#include "ingen/URI.hpp"
+#include <ingen/Interface.hpp>
+#include <ingen/Message.hpp>
+#include <ingen/URI.hpp>
#include <memory>
#include <mutex>
diff --git a/include/ingen/Resource.hpp b/include/ingen/Resource.hpp
index 8b96a27b..f6a12bad 100644
--- a/include/ingen/Resource.hpp
+++ b/include/ingen/Resource.hpp
@@ -17,11 +17,11 @@
#ifndef INGEN_RESOURCE_HPP
#define INGEN_RESOURCE_HPP
-#include "ingen/Properties.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/ingen.h"
-#include "raul/Deletable.hpp"
+#include <ingen/Properties.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/ingen.h>
+#include <raul/Deletable.hpp>
#include <cassert>
#include <utility>
@@ -175,8 +175,8 @@ public:
/** Get the ingen type from a set of Properties.
*
- * If some coherent ingen type is found, true is returned and the appropriate
- * output parameter set to true. Otherwise false is returned.
+ * If some coherent ingen type is found, true is returned and the
+ * appropriate output parameter set to true. Otherwise false is returned.
*/
static bool type(const URIs& uris,
const Properties& properties,
diff --git a/include/ingen/Serialiser.hpp b/include/ingen/Serialiser.hpp
index f7f04317..6e9d6ad4 100644
--- a/include/ingen/Serialiser.hpp
+++ b/include/ingen/Serialiser.hpp
@@ -17,10 +17,10 @@
#ifndef INGEN_SERIALISER_HPP
#define INGEN_SERIALISER_HPP
-#include "ingen/FilePath.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/ingen.h"
-#include "sord/sordmm.hpp"
+#include <ingen/FilePath.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/ingen.h>
+#include <sord/sordmm.hpp>
#include <memory>
#include <string>
@@ -56,8 +56,8 @@ public:
*
* This must be called before any serializing methods.
*
- * The results of the serialization will be returned by the finish() method after
- * the desired objects have been serialised.
+ * The results of the serialization will be returned by the finish() method
+ * after the desired objects have been serialised.
*
* All serialized paths will have the root path chopped from their prefix
* (therefore all serialized paths must be descendants of the root)
@@ -77,14 +77,14 @@ public:
/** Serialize an object (graph, block, or port).
*
- * @throw std::logic_error
+ * @throw std::logic_error A serialization hasn't been started.
*/
virtual void serialise(const std::shared_ptr<const Node>& object,
Property::Graph context = Property::Graph::DEFAULT);
/** Serialize an arc.
*
- * @throw std::logic_error
+ * @throw std::logic_error A serialization hasn't been started.
*/
virtual void serialise_arc(const Sord::Node& parent,
const std::shared_ptr<const Arc>& arc);
diff --git a/include/ingen/SocketReader.hpp b/include/ingen/SocketReader.hpp
index 5e7bc373..d0d62747 100644
--- a/include/ingen/SocketReader.hpp
+++ b/include/ingen/SocketReader.hpp
@@ -17,9 +17,9 @@
#ifndef INGEN_SOCKETREADER_HPP
#define INGEN_SOCKETREADER_HPP
-#include "ingen/ingen.h"
-#include "serd/serd.h"
-#include "sord/sord.h"
+#include <ingen/ingen.h>
+#include <serd/serd.h>
+#include <sord/sord.h>
#include <cstddef>
#include <memory>
diff --git a/include/ingen/SocketWriter.hpp b/include/ingen/SocketWriter.hpp
index 7edaa13c..e564b524 100644
--- a/include/ingen/SocketWriter.hpp
+++ b/include/ingen/SocketWriter.hpp
@@ -17,9 +17,9 @@
#ifndef INGEN_SOCKETWRITER_HPP
#define INGEN_SOCKETWRITER_HPP
-#include "ingen/Message.hpp"
-#include "ingen/TurtleWriter.hpp"
-#include "ingen/ingen.h"
+#include <ingen/Message.hpp>
+#include <ingen/TurtleWriter.hpp>
+#include <ingen/ingen.h>
#include <cstddef>
#include <memory>
diff --git a/include/ingen/Store.hpp b/include/ingen/Store.hpp
index a7a1ec28..d18858fb 100644
--- a/include/ingen/Store.hpp
+++ b/include/ingen/Store.hpp
@@ -17,10 +17,10 @@
#ifndef INGEN_STORE_HPP
#define INGEN_STORE_HPP
-#include "ingen/ingen.h"
-#include "raul/Deletable.hpp"
-#include "raul/Noncopyable.hpp"
-#include "raul/Path.hpp"
+#include <ingen/ingen.h>
+#include <raul/Deletable.hpp>
+#include <raul/Noncopyable.hpp>
+#include <raul/Path.hpp>
#include <map>
#include <memory>
diff --git a/include/ingen/StreamWriter.hpp b/include/ingen/StreamWriter.hpp
index 9fafe571..5ed260ea 100644
--- a/include/ingen/StreamWriter.hpp
+++ b/include/ingen/StreamWriter.hpp
@@ -17,9 +17,9 @@
#ifndef INGEN_STREAMWRITER_HPP
#define INGEN_STREAMWRITER_HPP
-#include "ingen/ColorContext.hpp"
-#include "ingen/TurtleWriter.hpp"
-#include "ingen/ingen.h"
+#include <ingen/ColorContext.hpp>
+#include <ingen/TurtleWriter.hpp>
+#include <ingen/ingen.h>
#include <cstdio>
diff --git a/include/ingen/Tee.hpp b/include/ingen/Tee.hpp
index 562ff298..c1ac0d31 100644
--- a/include/ingen/Tee.hpp
+++ b/include/ingen/Tee.hpp
@@ -17,9 +17,9 @@
#ifndef INGEN_TEE_HPP
#define INGEN_TEE_HPP
-#include "ingen/Interface.hpp"
-#include "ingen/Message.hpp"
-#include "ingen/URI.hpp"
+#include <ingen/Interface.hpp>
+#include <ingen/Message.hpp>
+#include <ingen/URI.hpp>
#include <memory>
#include <mutex>
diff --git a/include/ingen/TurtleWriter.hpp b/include/ingen/TurtleWriter.hpp
index 780d9f7b..07d4e249 100644
--- a/include/ingen/TurtleWriter.hpp
+++ b/include/ingen/TurtleWriter.hpp
@@ -17,13 +17,13 @@
#ifndef INGEN_TURTLEWRITER_HPP
#define INGEN_TURTLEWRITER_HPP
-#include "ingen/AtomSink.hpp"
-#include "ingen/AtomWriter.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/ingen.h"
-#include "lv2/atom/atom.h"
-#include "serd/serd.h"
-#include "sratom/sratom.h"
+#include <ingen/AtomSink.hpp>
+#include <ingen/AtomWriter.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/ingen.h>
+#include <lv2/atom/atom.h>
+#include <serd/serd.h>
+#include <sratom/sratom.h>
#include <cstddef>
#include <cstdint>
diff --git a/include/ingen/URI.hpp b/include/ingen/URI.hpp
index a45fb268..53812c4b 100644
--- a/include/ingen/URI.hpp
+++ b/include/ingen/URI.hpp
@@ -17,10 +17,10 @@
#ifndef INGEN_URI_HPP
#define INGEN_URI_HPP
-#include "ingen/FilePath.hpp"
-#include "ingen/ingen.h"
-#include "serd/serd.h"
-#include "sord/sordmm.hpp"
+#include <ingen/FilePath.hpp>
+#include <ingen/ingen.h>
+#include <serd/serd.h>
+#include <sord/sordmm.hpp>
#include <cstddef>
#include <cstdint>
@@ -40,7 +40,7 @@ public:
explicit URI(const char* str);
URI(const std::string& str, const URI& base);
URI(const Sord::Node& node);
- URI(SerdNode node);
+ URI(const SerdNode& node);
explicit URI(const FilePath& path);
URI(const URI& uri);
@@ -98,7 +98,7 @@ public:
}
private:
- URI(SerdNode node, SerdURI uri);
+ URI(const SerdNode& node, const SerdURI& uri);
static Chunk make_chunk(const SerdChunk& chunk) {
return {reinterpret_cast<const char*>(chunk.buf), chunk.len};
diff --git a/include/ingen/URIMap.hpp b/include/ingen/URIMap.hpp
index de137af2..fbb0523c 100644
--- a/include/ingen/URIMap.hpp
+++ b/include/ingen/URIMap.hpp
@@ -17,12 +17,12 @@
#ifndef INGEN_URIMAP_HPP
#define INGEN_URIMAP_HPP
-#include "ingen/LV2Features.hpp"
-#include "ingen/ingen.h"
-#include "ingen/memory.hpp"
-#include "lv2/core/lv2.h"
-#include "lv2/urid/urid.h"
-#include "raul/Noncopyable.hpp"
+#include <ingen/LV2Features.hpp>
+#include <ingen/ingen.h>
+#include <ingen/memory.hpp>
+#include <lv2/core/lv2.h>
+#include <lv2/urid/urid.h>
+#include <raul/Noncopyable.hpp>
#include <cstdint>
#include <memory>
@@ -34,8 +34,6 @@
namespace ingen {
class Log;
-class Node;
-class World;
/** URI to integer map and implementation of LV2 URID extension.
* @ingroup IngenShared
diff --git a/include/ingen/URIs.hpp b/include/ingen/URIs.hpp
index 1b29bcd5..b3a4124f 100644
--- a/include/ingen/URIs.hpp
+++ b/include/ingen/URIs.hpp
@@ -17,12 +17,12 @@
#ifndef INGEN_URIS_HPP
#define INGEN_URIS_HPP
-#include "ingen/Atom.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/ingen.h"
-#include "lilv/lilv.h"
-#include "lv2/urid/urid.h"
-#include "raul/Noncopyable.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/ingen.h>
+#include <lilv/lilv.h>
+#include <lv2/urid/urid.h>
+#include <raul/Noncopyable.hpp>
namespace ingen {
diff --git a/include/ingen/World.hpp b/include/ingen/World.hpp
index 0b8690ad..738012cd 100644
--- a/include/ingen/World.hpp
+++ b/include/ingen/World.hpp
@@ -17,10 +17,10 @@
#ifndef INGEN_WORLD_HPP
#define INGEN_WORLD_HPP
-#include "ingen/ingen.h"
-#include "lv2/log/log.h"
-#include "lv2/urid/urid.h"
-#include "raul/Noncopyable.hpp"
+#include <ingen/ingen.h>
+#include <lv2/log/log.h>
+#include <lv2/urid/urid.h>
+#include <raul/Noncopyable.hpp>
#include <memory>
#include <mutex>
diff --git a/include/ingen/client/ArcModel.hpp b/include/ingen/client/ArcModel.hpp
index 8104b188..21238831 100644
--- a/include/ingen/client/ArcModel.hpp
+++ b/include/ingen/client/ArcModel.hpp
@@ -17,10 +17,10 @@
#ifndef INGEN_CLIENT_ARCMODEL_HPP
#define INGEN_CLIENT_ARCMODEL_HPP
-#include "ingen/Arc.hpp"
-#include "ingen/client/PortModel.hpp"
-#include "ingen/ingen.h"
-#include "raul/Path.hpp"
+#include <ingen/Arc.hpp>
+#include <ingen/client/PortModel.hpp>
+#include <ingen/ingen.h>
+#include <raul/Path.hpp>
#include <cassert>
#include <memory>
diff --git a/include/ingen/client/BlockModel.hpp b/include/ingen/client/BlockModel.hpp
index d2641f77..db41f4ef 100644
--- a/include/ingen/client/BlockModel.hpp
+++ b/include/ingen/client/BlockModel.hpp
@@ -17,20 +17,18 @@
#ifndef INGEN_CLIENT_BLOCKMODEL_HPP
#define INGEN_CLIENT_BLOCKMODEL_HPP
-#include "ingen/Node.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/client/ObjectModel.hpp"
-#include "ingen/client/PluginModel.hpp" // IWYU pragma: keep
-#include "ingen/client/signal.hpp"
-#include "ingen/ingen.h"
+#include <ingen/Node.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/client/ObjectModel.hpp>
+#include <ingen/client/PluginModel.hpp>
+#include <ingen/client/signal.hpp>
+#include <ingen/ingen.h>
#include <cstdint>
#include <memory>
#include <string>
#include <vector>
-// IWYU pragma: no_include <algorithm>
-
namespace raul {
class Path;
class Symbol;
diff --git a/include/ingen/client/ClientStore.hpp b/include/ingen/client/ClientStore.hpp
index 83cce726..c649aab3 100644
--- a/include/ingen/client/ClientStore.hpp
+++ b/include/ingen/client/ClientStore.hpp
@@ -17,12 +17,12 @@
#ifndef INGEN_CLIENT_CLIENTSTORE_HPP
#define INGEN_CLIENT_CLIENTSTORE_HPP
-#include "ingen/Interface.hpp"
-#include "ingen/Message.hpp"
-#include "ingen/Store.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/client/signal.hpp"
-#include "ingen/ingen.h"
+#include <ingen/Interface.hpp>
+#include <ingen/Message.hpp>
+#include <ingen/Store.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/client/signal.hpp>
+#include <ingen/ingen.h>
#include <map>
#include <memory>
diff --git a/include/ingen/client/GraphModel.hpp b/include/ingen/client/GraphModel.hpp
index 0ae756d8..837a28a5 100644
--- a/include/ingen/client/GraphModel.hpp
+++ b/include/ingen/client/GraphModel.hpp
@@ -17,11 +17,10 @@
#ifndef INGEN_CLIENT_GRAPHMODEL_HPP
#define INGEN_CLIENT_GRAPHMODEL_HPP
-#include "ingen/Node.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/client/BlockModel.hpp"
-#include "ingen/client/signal.hpp"
-#include "ingen/ingen.h"
+#include <ingen/Node.hpp>
+#include <ingen/client/BlockModel.hpp>
+#include <ingen/client/signal.hpp>
+#include <ingen/ingen.h>
#include <cstdint>
#include <memory>
@@ -32,12 +31,11 @@ class Path;
namespace ingen {
-class URI;
+class URIs;
namespace client {
class ArcModel;
-class ObjectModel;
class PortModel;
/** Client's model of a graph.
@@ -55,7 +53,6 @@ public:
get_arc(const ingen::Node* tail, const ingen::Node* head);
bool enabled() const;
- bool polyphonic() const;
uint32_t internal_poly() const;
// Signals
@@ -67,11 +64,7 @@ public:
private:
friend class ClientStore;
- GraphModel(URIs& uris, const raul::Path& graph_path)
- : BlockModel(uris,
- static_cast<const URI&>(uris.ingen_Graph),
- graph_path)
- {}
+ GraphModel(URIs& uris, const raul::Path& graph_path);
void clear() override;
void add_child(const std::shared_ptr<ObjectModel>& c) override;
diff --git a/include/ingen/client/ObjectModel.hpp b/include/ingen/client/ObjectModel.hpp
index e92618f8..f9f0e041 100644
--- a/include/ingen/client/ObjectModel.hpp
+++ b/include/ingen/client/ObjectModel.hpp
@@ -21,19 +21,19 @@
#ifndef INGEN_CLIENT_OBJECTMODEL_HPP
#define INGEN_CLIENT_OBJECTMODEL_HPP
-#include "ingen/Node.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/client/signal.hpp"
-#include "ingen/ingen.h"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/Node.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/client/signal.hpp>
+#include <ingen/ingen.h>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
#include <memory>
namespace ingen {
class Atom;
+class URI;
namespace client {
diff --git a/include/ingen/client/PluginModel.hpp b/include/ingen/client/PluginModel.hpp
index 7f86f680..37b71d0d 100644
--- a/include/ingen/client/PluginModel.hpp
+++ b/include/ingen/client/PluginModel.hpp
@@ -17,16 +17,16 @@
#ifndef INGEN_CLIENT_PLUGINMODEL_HPP
#define INGEN_CLIENT_PLUGINMODEL_HPP
-#include "ingen/Atom.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/client/signal.hpp"
-#include "ingen/ingen.h"
-#include "lilv/lilv.h"
-#include "raul/Symbol.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/client/signal.hpp>
+#include <ingen/ingen.h>
+#include <lilv/lilv.h>
+#include <raul/Symbol.hpp>
#include <cstdint>
#include <map>
diff --git a/include/ingen/client/PluginUI.hpp b/include/ingen/client/PluginUI.hpp
index b291d521..6ecaed89 100644
--- a/include/ingen/client/PluginUI.hpp
+++ b/include/ingen/client/PluginUI.hpp
@@ -19,11 +19,11 @@
#include "signal.hpp"
-#include "ingen/LV2Features.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/ingen.h"
-#include "lilv/lilv.h"
-#include "suil/suil.h"
+#include <ingen/LV2Features.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/ingen.h>
+#include <lilv/lilv.h>
+#include <suil/suil.h>
#include <cstdint>
#include <memory>
@@ -61,7 +61,7 @@ public:
/** Instantiate the UI.
*
- * If true is returned, instantiation was successfull and the widget can be
+ * If true is returned, instantiation was successful and the widget can be
* obtained with get_widget(). Otherwise, instantiation failed, so there is
* no widget and the UI can not be used.
*/
diff --git a/include/ingen/client/PortModel.hpp b/include/ingen/client/PortModel.hpp
index 903a435d..c87f2f03 100644
--- a/include/ingen/client/PortModel.hpp
+++ b/include/ingen/client/PortModel.hpp
@@ -17,16 +17,14 @@
#ifndef INGEN_CLIENT_PORTMODEL_HPP
#define INGEN_CLIENT_PORTMODEL_HPP
-#include "ingen/Node.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/client/ObjectModel.hpp"
-#include "ingen/client/signal.hpp"
-#include "ingen/ingen.h"
-#include "raul/Path.hpp"
+#include <ingen/Node.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/client/ObjectModel.hpp>
+#include <ingen/client/signal.hpp>
+#include <ingen/ingen.h>
+#include <raul/Path.hpp>
#include <cstdint>
-#include <memory>
#include <string>
namespace ingen {
@@ -86,8 +84,8 @@ private:
, _direction(dir)
{}
- void add_child(const std::shared_ptr<ObjectModel>& c) override { throw; }
- bool remove_child(const std::shared_ptr<ObjectModel>& c) override { throw; }
+ void add_child(const std::shared_ptr<ObjectModel>& c) override;
+ bool remove_child(const std::shared_ptr<ObjectModel>& c) override;
void set(const std::shared_ptr<ObjectModel>& model) override;
diff --git a/include/ingen/client/SigClientInterface.hpp b/include/ingen/client/SigClientInterface.hpp
index 6bff2e33..52bceacc 100644
--- a/include/ingen/client/SigClientInterface.hpp
+++ b/include/ingen/client/SigClientInterface.hpp
@@ -17,11 +17,11 @@
#ifndef INGEN_CLIENT_SIGCLIENTINTERFACE_HPP
#define INGEN_CLIENT_SIGCLIENTINTERFACE_HPP
-#include "ingen/Interface.hpp"
-#include "ingen/Message.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/client/signal.hpp"
-#include "ingen/ingen.h"
+#include <ingen/Interface.hpp>
+#include <ingen/Message.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/client/signal.hpp>
+#include <ingen/ingen.h>
namespace ingen::client {
@@ -45,7 +45,7 @@ public:
INGEN_SIGNAL(message, void, Message)
- /** Fire pending signals. Only does anything on derived classes (that may queue) */
+ /** Fire pending signals (for derived classes that may queue). */
virtual bool emit_signals() { return false; }
protected:
diff --git a/include/ingen/client/SocketClient.hpp b/include/ingen/client/SocketClient.hpp
index 7434da90..23f8a3ff 100644
--- a/include/ingen/client/SocketClient.hpp
+++ b/include/ingen/client/SocketClient.hpp
@@ -17,13 +17,13 @@
#ifndef INGEN_CLIENT_SOCKETCLIENT_HPP
#define INGEN_CLIENT_SOCKETCLIENT_HPP
-#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 <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>
diff --git a/include/ingen/fmt.hpp b/include/ingen/fmt.hpp
index 7ca5de9f..bfc339e5 100644
--- a/include/ingen/fmt.hpp
+++ b/include/ingen/fmt.hpp
@@ -29,7 +29,7 @@ fmt(const char* fmt, Args&&... args)
{
boost::format f{fmt}; // NOLINT(misc-const-correctness)
const std::initializer_list<char> l{
- (static_cast<void>(f % args), char{})...};
+ (static_cast<void>(f % std::forward<Args>(args)), char{})...};
(void)l;
return boost::str(f);
diff --git a/include/ingen/paths.hpp b/include/ingen/paths.hpp
index ad079390..bf8d8ecc 100644
--- a/include/ingen/paths.hpp
+++ b/include/ingen/paths.hpp
@@ -17,8 +17,8 @@
#ifndef INGEN_PATHS_HPP
#define INGEN_PATHS_HPP
-#include "ingen/URI.hpp"
-#include "raul/Path.hpp"
+#include <ingen/URI.hpp>
+#include <raul/Path.hpp>
#include <cstddef>
#include <string>
diff --git a/include/ingen/runtime_paths.hpp b/include/ingen/runtime_paths.hpp
index 30e877fb..54bda90e 100644
--- a/include/ingen/runtime_paths.hpp
+++ b/include/ingen/runtime_paths.hpp
@@ -17,8 +17,8 @@
#ifndef INGEN_RUNTIME_PATHS_HPP
#define INGEN_RUNTIME_PATHS_HPP
-#include "ingen/FilePath.hpp"
-#include "ingen/ingen.h"
+#include <ingen/FilePath.hpp>
+#include <ingen/ingen.h>
#include <string>
#include <vector>
diff --git a/meson.build b/meson.build
index 0c5e5280..3510d895 100644
--- a/meson.build
+++ b/meson.build
@@ -1,15 +1,18 @@
# Copyright 2020-2023 David Robillard <d@drobilla.net>
# SPDX-License-Identifier: 0BSD OR GPL-3.0-or-later
-project('ingen', 'cpp',
- version: '0.5.1',
- license: 'GPLv3+',
- meson_version: '>= 0.56.0',
- default_options: [
- 'b_ndebug=if-release',
- 'buildtype=release',
- 'cpp_std=c++17',
- ])
+project(
+ 'ingen',
+ 'cpp',
+ default_options: [
+ 'b_ndebug=if-release',
+ 'buildtype=release',
+ 'cpp_std=c++17',
+ ],
+ license: 'GPLv3+',
+ meson_version: '>= 0.56.0',
+ version: '0.5.1',
+)
ingen_src_root = meson.current_source_dir()
ingen_build_root = meson.current_build_dir()
@@ -24,16 +27,126 @@ versioned_name = '@0@-@1@'.format(meson.project_name(), major_version)
cpp = meson.get_compiler('cpp')
# Set global warning suppressions
-subdir('meson/suppressions')
-add_project_arguments(cpp_suppressions, language: ['cpp'])
+warning_level = get_option('warning_level')
+cpp_suppressions = []
+if cpp.get_id() == 'clang'
+ if warning_level == 'everything'
+ cpp_suppressions = [
+ '-Wno-c++17-extensions',
+ '-Wno-c++98-compat',
+ '-Wno-c++98-compat-pedantic',
+ '-Wno-cast-align',
+ '-Wno-cast-function-type-strict',
+ '-Wno-cast-qual',
+ '-Wno-documentation-unknown-command',
+ '-Wno-exit-time-destructors',
+ '-Wno-float-conversion',
+ '-Wno-float-equal',
+ '-Wno-format-nonliteral',
+ '-Wno-global-constructors',
+ '-Wno-implicit-float-conversion',
+ '-Wno-padded',
+ '-Wno-reserved-id-macro',
+ '-Wno-shorten-64-to-32',
+ '-Wno-sign-conversion',
+ '-Wno-switch-default',
+ '-Wno-switch-enum',
+ '-Wno-unreachable-code',
+ '-Wno-unsafe-buffer-usage',
+ '-Wno-vla',
+ '-Wno-weak-vtables',
+ ]
+
+ if not meson.is_cross_build()
+ cpp_suppressions += [
+ '-Wno-poison-system-directories',
+ ]
+ endif
+
+ if host_machine.system() in ['darwin', 'freebsd']
+ cpp_suppressions += [
+ '-Wno-comma', # boost
+ '-Wno-deprecated-copy', # boost
+ '-Wno-disabled-macro-expansion', # boost
+ '-Wno-documentation', # JACK
+ '-Wno-documentation-deprecated-sync', # JACK
+ '-Wno-extra-semi-stmt', # boost
+ '-Wno-old-style-cast', # boost
+ '-Wno-redundant-parens', # boost
+ '-Wno-suggest-destructor-override', # boost
+ '-Wno-suggest-override', # boost
+ '-Wno-unused-template', # boost
+ '-Wno-zero-as-null-pointer-constant', # boost
+ ]
+ endif
+ endif
+
+ if warning_level in ['everything', '3']
+ cpp_suppressions += [
+ '-Wno-unused-parameter',
+ '-Wno-vla-extension',
+ '-Wno-nullability-extension',
+ ]
+ endif
+
+elif cpp.get_id() == 'gcc'
+ if warning_level == 'everything'
+ cpp_suppressions = [
+ '-Wno-abi-tag',
+ '-Wno-alloc-zero',
+ '-Wno-cast-align',
+ '-Wno-cast-qual',
+ '-Wno-conditionally-supported',
+ '-Wno-conversion',
+ '-Wno-effc++',
+ '-Wno-float-conversion',
+ '-Wno-float-equal',
+ '-Wno-format',
+ '-Wno-format-nonliteral',
+ '-Wno-format-truncation',
+ '-Wno-inline',
+ '-Wno-multiple-inheritance',
+ '-Wno-null-dereference',
+ '-Wno-old-style-cast',
+ '-Wno-padded',
+ '-Wno-redundant-tags',
+ '-Wno-sign-conversion',
+ '-Wno-stack-protector',
+ '-Wno-strict-overflow',
+ '-Wno-suggest-attribute=cold',
+ '-Wno-suggest-attribute=const',
+ '-Wno-suggest-attribute=format',
+ '-Wno-suggest-attribute=noreturn',
+ '-Wno-suggest-attribute=pure',
+ '-Wno-suggest-final-methods',
+ '-Wno-suggest-final-types',
+ '-Wno-suggest-override',
+ '-Wno-switch-default',
+ '-Wno-switch-enum',
+ '-Wno-unreachable-code',
+ '-Wno-unused-const-variable',
+ '-Wno-useless-cast',
+ ]
+ endif
+
+ if warning_level in ['everything', '3']
+ cpp_suppressions += ['-Wno-vla']
+ endif
+
+ if warning_level in ['everything', '3', '2']
+ cpp_suppressions += ['-Wno-unused-parameter']
+ endif
+endif
+
+cpp_suppressions = cpp.get_supported_arguments(cpp_suppressions)
##########################
# LV2 Path Configuration #
##########################
lv2dir = get_option('lv2dir')
+prefix = get_option('prefix')
if lv2dir == ''
- prefix = get_option('prefix')
if target_machine.system() == 'darwin' and prefix == '/'
lv2dir = '/Library/Audio/Plug-Ins/LV2'
elif target_machine.system() == 'haiku' and prefix == '/'
@@ -50,8 +163,12 @@ endif
##########################
# TODO: Distinguish modules from libraries and move modules to a subdirectory
-ingen_data_dir = get_option('prefix') / get_option('datadir') / 'ingen' # / versioned_name
-ingen_module_dir = get_option('prefix') / get_option('libdir') # / versioned_name
+ingen_data_dir = (
+ prefix / get_option('datadir') / 'ingen' # / versioned_name
+)
+ingen_module_dir = (
+ prefix / get_option('libdir') # / versioned_name
+)
# Use versioned name everywhere to support parallel major version installations
if host_machine.system() == 'windows'
@@ -88,9 +205,7 @@ endif
socket_code = '''#include <sys/socket.h>
int main(void) { return socket(AF_UNIX, SOCK_STREAM, 0); }'''
-have_socket = cpp.compiles(socket_code,
- args: platform_defines,
- name: 'socket')
+have_socket = cpp.compiles(socket_code, args: platform_defines, name: 'socket')
platform_defines += ['-DHAVE_SOCKET=@0@'.format(have_socket.to_int())]
@@ -103,45 +218,43 @@ thread_dep = dependency('threads')
serd_dep = dependency(
'serd-0',
- fallback: ['serd', 'serd_dep'],
+ include_type: 'system',
version: '>= 0.30.4',
)
sord_dep = dependency(
'sord-0',
- fallback: ['sord', 'sord_dep'],
include_type: 'system',
version: '>= 0.16.15',
)
sratom_dep = dependency(
'sratom-0',
- fallback: ['sratom', 'sratom_dep'],
+ include_type: 'system',
version: '>= 0.6.0',
)
suil_dep = dependency(
'suil-0',
+ include_type: 'system',
version: '>= 0.10.0',
- fallback: ['suil', 'suil_dep'],
)
lv2_dep = dependency(
'lv2',
- fallback: ['lv2', 'lv2_dep'],
include_type: 'system',
version: '>= 1.18.0',
)
lilv_dep = dependency(
'lilv-0',
- fallback: ['lilv', 'lilv_dep'],
+ include_type: 'system',
version: '>= 0.24.21',
)
raul_dep = dependency(
'raul-2',
- fallback: ['raul', 'raul_dep'],
+ include_type: 'system',
version: '>= 2.0.0',
)
@@ -149,24 +262,31 @@ raul_dep = dependency(
# Driver Dependencies #
#######################
-portaudio_dep = dependency('portaudio-2.0',
- version: '>= 2.0.0',
- include_type: 'system',
- required: get_option('portaudio'))
+portaudio_dep = dependency(
+ 'portaudio-2.0',
+ include_type: 'system',
+ required: get_option('portaudio'),
+ version: '>= 2.0.0',
+)
-jack_dep = dependency('jack',
- version: '>= 0.120.0',
- include_type: 'system',
- required: get_option('jack'))
+jack_dep = dependency(
+ 'jack',
+ include_type: 'system',
+ required: get_option('jack'),
+ version: '>= 0.120.0',
+)
jack_port_rename_code = '''#include <jack/jack.h>
int main(void) { return !!&jack_port_rename; }'''
platform_defines += '-DHAVE_JACK_PORT_RENAME=@0@'.format(
- cpp.compiles(jack_port_rename_code,
- args: platform_defines,
- dependencies: [jack_dep],
- name: 'jack_port_rename').to_int())
+ cpp.compiles(
+ jack_port_rename_code,
+ args: platform_defines,
+ dependencies: [jack_dep],
+ name: 'jack_port_rename',
+ ).to_int(),
+)
#############
# Libraries #
diff --git a/meson/suppressions/meson.build b/meson/suppressions/meson.build
deleted file mode 100644
index 4fb07820..00000000
--- a/meson/suppressions/meson.build
+++ /dev/null
@@ -1,121 +0,0 @@
-# Copyright 2020-2023 David Robillard <d@drobilla.net>
-# SPDX-License-Identifier: 0BSD OR GPL-3.0-or-later
-
-# Project-specific warning suppressions
-
-warning_level = get_option('warning_level')
-
-#######
-# C++ #
-#######
-
-if is_variable('cpp')
- cpp_suppressions = []
-
- if cpp.get_id() == 'clang'
- if warning_level == 'everything'
- cpp_suppressions = [
- '-Wno-c++17-extensions',
- '-Wno-c++98-compat',
- '-Wno-c++98-compat-pedantic',
- '-Wno-cast-align',
- '-Wno-cast-function-type-strict',
- '-Wno-cast-qual',
- '-Wno-documentation-unknown-command',
- '-Wno-exit-time-destructors',
- '-Wno-float-conversion',
- '-Wno-float-equal',
- '-Wno-format-nonliteral',
- '-Wno-global-constructors',
- '-Wno-implicit-float-conversion',
- '-Wno-padded',
- '-Wno-reserved-id-macro',
- '-Wno-shorten-64-to-32',
- '-Wno-sign-conversion',
- '-Wno-switch-enum',
- '-Wno-unreachable-code',
- '-Wno-unsafe-buffer-usage',
- '-Wno-vla',
- '-Wno-weak-vtables',
- ]
-
- if not meson.is_cross_build()
- cpp_suppressions += [
- '-Wno-poison-system-directories',
- ]
- endif
-
- if host_machine.system() in ['darwin', 'freebsd']
- cpp_suppressions += [
- '-Wno-comma', # boost
- '-Wno-deprecated-copy', # boost
- '-Wno-disabled-macro-expansion', # boost
- '-Wno-documentation', # JACK
- '-Wno-documentation-deprecated-sync', # JACK
- '-Wno-extra-semi-stmt', # boost
- '-Wno-old-style-cast', # boost
- '-Wno-redundant-parens', # boost
- '-Wno-suggest-destructor-override', # boost
- '-Wno-suggest-override', # boost
- '-Wno-unused-template', # boost
- '-Wno-zero-as-null-pointer-constant', # boost
- ]
- endif
- endif
-
- if warning_level in ['everything', '3']
- cpp_suppressions += [
- '-Wno-unused-parameter',
- '-Wno-vla-extension',
- '-Wno-nullability-extension',
- ]
- endif
-
- elif cpp.get_id() == 'gcc'
- if warning_level == 'everything'
- cpp_suppressions = [
- '-Wno-abi-tag',
- '-Wno-alloc-zero',
- '-Wno-cast-align',
- '-Wno-cast-qual',
- '-Wno-conditionally-supported',
- '-Wno-conversion',
- '-Wno-effc++',
- '-Wno-float-conversion',
- '-Wno-float-equal',
- '-Wno-format',
- '-Wno-format-nonliteral',
- '-Wno-format-truncation',
- '-Wno-inline',
- '-Wno-multiple-inheritance',
- '-Wno-null-dereference',
- '-Wno-old-style-cast',
- '-Wno-padded',
- '-Wno-redundant-tags',
- '-Wno-sign-conversion',
- '-Wno-stack-protector',
- '-Wno-strict-overflow',
- '-Wno-suggest-attribute=const',
- '-Wno-suggest-attribute=format',
- '-Wno-suggest-attribute=pure',
- '-Wno-suggest-final-methods',
- '-Wno-suggest-final-types',
- '-Wno-suggest-override',
- '-Wno-switch-default',
- '-Wno-switch-enum',
- '-Wno-unreachable-code',
- '-Wno-unused-const-variable',
- '-Wno-useless-cast',
- ]
- endif
-
- if warning_level in ['everything', '3']
- cpp_suppressions += [
- '-Wno-unused-parameter',
- '-Wno-vla',
- ]
- endif
- endif
-
- cpp_suppressions = cpp.get_supported_arguments(cpp_suppressions)
-endif
diff --git a/meson_options.txt b/meson_options.txt
index 686898a9..a838a29c 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,25 +1,28 @@
# Copyright 2020-2023 David Robillard <d@drobilla.net>
# SPDX-License-Identifier: 0BSD OR GPL-3.0-or-later
-option('bindings_py', type: 'feature', value: 'auto', yield: true,
+option('bindings_py', type: 'feature', yield: true,
description: 'Build Python bindings')
option('checks', type: 'boolean', value: true, yield: true,
description: 'Check for features with the build system')
-option('docs', type: 'feature', value: 'auto', yield: true,
+option('docs', type: 'feature', yield: true,
description: 'Build documentation')
-option('gui', type: 'feature', value: 'auto', yield: true,
+option('gui', type: 'feature', yield: true,
description: 'Build GUI')
-option('jack', type: 'feature', value: 'auto', yield: true,
+option('jack', type: 'feature', yield: true,
description: 'Build JACK audio and MIDI support')
+option('lint', type: 'boolean', value: false, yield: true,
+ description: 'Run code quality checks')
+
option('lv2dir', type: 'string', value: '', yield: true,
description: 'LV2 bundle installation directory')
-option('portaudio', type: 'feature', value: 'auto', yield: true,
+option('portaudio', type: 'feature', yield: true,
description: 'Build PortAudio driver')
option('title', type: 'string', value: 'Ingen',
diff --git a/src/.clang-tidy b/src/.clang-tidy
index 7b04d6c4..83a09b52 100644
--- a/src/.clang-tidy
+++ b/src/.clang-tidy
@@ -1,13 +1,16 @@
Checks: >
-*-avoid-c-arrays,
- -*-uppercase-literal-suffix,
+ -*-macro-to-enum,
-*-vararg,
-android-cloexec-*,
+ -boost-use-ranges,
-bugprone-easily-swappable-parameters,
+ -bugprone-multi-level-implicit-pointer-conversion,
-bugprone-unchecked-optional-access,
-cert-dcl50-cpp,
-cert-err33-c,
-cert-err34-c,
+ -clang-analyzer-optin.core.EnumCastOutOfRange,
-clang-analyzer-optin.cplusplus.VirtualCall,
-clang-analyzer-valist.Uninitialized,
-concurrency-mt-unsafe,
@@ -20,11 +23,10 @@ Checks: >
-cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-pro-type-union-access,
-fuchsia-statically-constructed-objects,
- -google-readability-casting,
-hicpp-no-array-decay,
-hicpp-no-malloc,
-misc-no-recursion,
-misc-unused-parameters,
-readability-function-cognitive-complexity,
- -readability-use-anyofallof,
+ -readability-static-accessed-through-instance,
InheritParentConfig: true
diff --git a/src/AtomForge.cpp b/src/AtomForge.cpp
new file mode 100644
index 00000000..727bd64e
--- /dev/null
+++ b/src/AtomForge.cpp
@@ -0,0 +1,130 @@
+/*
+ This file is part of Ingen.
+ Copyright 2007-2024 David Robillard <http://drobilla.net/>
+
+ Ingen is free software: you can redistribute it and/or modify it under the
+ terms of the GNU Affero General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or any later version.
+
+ Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU Affero General Public License for details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with Ingen. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <ingen/AtomForge.hpp>
+#include <ingen/memory.hpp>
+
+#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>
+
+#include <cassert>
+#include <cstring>
+#include <utility>
+
+namespace ingen {
+
+AtomForge::AtomForge(LV2_URID_Map& map)
+ : LV2_Atom_Forge{}
+ , _sratom{sratom_new(&map)}
+ , _buf{static_cast<LV2_Atom*>(calloc(8, sizeof(LV2_Atom)))}
+{
+ lv2_atom_forge_init(this, &map);
+ lv2_atom_forge_set_sink(this, c_append, c_deref, this);
+}
+
+void
+AtomForge::read(Sord::World& world,
+ SordModel* const model,
+ const SordNode* const node)
+{
+ sratom_read(_sratom.get(), this, world.c_obj(), model, node);
+}
+
+const LV2_Atom*
+AtomForge::atom() const
+{
+ return _buf.get();
+}
+
+void
+AtomForge::clear()
+{
+ lv2_atom_forge_set_sink(this, c_append, c_deref, this);
+ _size = 0;
+ *_buf = {0U, 0U};
+}
+
+Sratom&
+AtomForge::sratom()
+{
+ return *_sratom;
+}
+
+intptr_t
+AtomForge::append(const void* const data, const uint32_t len)
+{
+ // Record offset of the start of this write (+1 to avoid null)
+ const auto ref = static_cast<intptr_t>(_size + 1U);
+
+ // Update size and reallocate if necessary
+ if (lv2_atom_pad_size(_size + len) > _capacity) {
+ const size_t new_size = lv2_atom_pad_size(_size + len);
+
+ // Release buffer and try to realloc it
+ auto* const old = _buf.release();
+ auto* const new_buf = static_cast<LV2_Atom*>(realloc(old, new_size));
+ if (!new_buf) {
+ // Failure, reclaim old buffer and signal error to caller
+ _buf = AtomPtr{old, FreeDeleter<LV2_Atom>{}};
+ return 0;
+ }
+
+ // Adopt new buffer and update capacity to make room for the new data
+ std::unique_ptr<LV2_Atom, FreeDeleter<LV2_Atom>> ptr{new_buf};
+ _capacity = new_size;
+ _buf = std::move(ptr);
+ }
+
+ // Append new data
+ memcpy(reinterpret_cast<uint8_t*>(_buf.get()) + _size, data, len);
+ _size += len;
+ return ref;
+}
+
+LV2_Atom*
+AtomForge::deref(const intptr_t ref)
+{
+ /* Make some assumptions and do unnecessary math to appease
+ -Wcast-align. This is questionable at best, though the forge should
+ only dereference references to aligned atoms. */
+ LV2_Atom* const ptr = _buf.get();
+ assert((ref - 1) % sizeof(LV2_Atom) == 0);
+ return static_cast<LV2_Atom*>(ptr + ((ref - 1) / sizeof(LV2_Atom)));
+
+ // Alternatively:
+ // return (LV2_Atom*)((uint8_t*)_buf.get() + ref - 1);
+}
+
+LV2_Atom_Forge_Ref
+AtomForge::c_append(void* const self,
+ const void* const data,
+ const uint32_t len)
+{
+ return static_cast<AtomForge*>(self)->append(data, len);
+}
+
+LV2_Atom*
+AtomForge::c_deref(void* const self, const LV2_Atom_Forge_Ref ref)
+{
+ return static_cast<AtomForge*>(self)->deref(ref);
+}
+
+} // namespace ingen
diff --git a/src/AtomReader.cpp b/src/AtomReader.cpp
index df9a8e4b..21cb9e40 100644
--- a/src/AtomReader.cpp
+++ b/src/AtomReader.cpp
@@ -14,21 +14,21 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/AtomReader.hpp"
-
-#include "ingen/Atom.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/Message.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIMap.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/paths.hpp"
-#include "lv2/atom/atom.h"
-#include "lv2/atom/util.h"
-#include "raul/Path.hpp"
+#include <ingen/AtomReader.hpp>
+
+#include <ingen/Atom.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/Message.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIMap.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/paths.hpp>
+#include <lv2/atom/atom.h>
+#include <lv2/atom/util.h>
+#include <raul/Path.hpp>
#include <cstdint>
#include <cstring>
diff --git a/src/AtomWriter.cpp b/src/AtomWriter.cpp
index e18b48b8..5200cfde 100644
--- a/src/AtomWriter.cpp
+++ b/src/AtomWriter.cpp
@@ -47,26 +47,27 @@
* manipulating data in this model which resemble HTTP methods.
*/
-#include "ingen/AtomWriter.hpp"
-
-#include "ingen/Atom.hpp"
-#include "ingen/AtomForge.hpp"
-#include "ingen/AtomSink.hpp"
-#include "ingen/Message.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIMap.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/paths.hpp"
-#include "lv2/atom/forge.h"
-#include "lv2/urid/urid.h"
-#include "raul/Path.hpp"
-#include "serd/serd.h"
+#include <ingen/AtomWriter.hpp>
+
+#include <ingen/Atom.hpp>
+#include <ingen/AtomForge.hpp>
+#include <ingen/AtomSink.hpp>
+#include <ingen/Message.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIMap.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/paths.hpp>
+#include <lv2/atom/forge.h>
+#include <lv2/urid/urid.h>
+#include <raul/Path.hpp>
+#include <serd/serd.h>
#include <cassert>
#include <cstdint>
#include <map>
+#include <string>
#include <utility>
#include <variant>
@@ -293,8 +294,8 @@ AtomWriter::operator()(const Delta& message)
* Send a [Copy](http://lv2plug.in/ns/ext/copy#Copy) to copy an object from
* its current location (subject) to another (destination).
*
- * If both the subject and destination are inside Ingen, like block paths, then the old object
- * is copied by, for example, creating a new plugin instance.
+ * If both the subject and destination are inside Ingen, like block paths, then
+ * the old object is copied by, for example, creating a new plugin instance.
*
* If the subject is a filename (file URI or atom:Path) and the destination is
* inside Ingen, then the subject must be an Ingen graph file or bundle, which
@@ -434,7 +435,8 @@ AtomWriter::operator()(const Undo& message)
/** @page protocol
* @subsection Undo
*
- * Use [ingen:Redo](http://drobilla.net/ns/ingen#Redo) to redo the last undone change.
+ * Use [ingen:Redo](http://drobilla.net/ns/ingen#Redo) to redo the last undone
+ * change.
*
* @code{.ttl}
* [] a ingen:Redo .
diff --git a/src/ClashAvoider.cpp b/src/ClashAvoider.cpp
index b782bcc7..ed4dc91a 100644
--- a/src/ClashAvoider.cpp
+++ b/src/ClashAvoider.cpp
@@ -14,12 +14,12 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/ClashAvoider.hpp"
-#include "ingen/Store.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/paths.hpp"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/ClashAvoider.hpp>
+#include <ingen/Store.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/paths.hpp>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
#include <cassert>
#include <cctype>
@@ -62,7 +62,7 @@ ClashAvoider::map_path(const raul::Path& in)
// Path without _n suffix
std::string base_path_str = in;
if (has_offset) {
- base_path_str = base_path_str.substr(0, base_path_str.find_last_of('_'));
+ base_path_str.resize(base_path_str.find_last_of('_'));
}
raul::Path base_path(base_path_str);
@@ -98,12 +98,6 @@ ClashAvoider::map_path(const raul::Path& in)
auto o = _offsets.find(base_path);
if (o != _offsets.end()) {
offset = ++o->second;
- } else {
- std::string parent_str = in.parent().base();
- parent_str = parent_str.substr(0, parent_str.find_last_of('/'));
- if (parent_str.empty()) {
- parent_str = "/";
- }
}
if (offset == 0) {
@@ -158,13 +152,13 @@ numeric_suffix_start(const std::string& str)
}
std::string
-ClashAvoider::adjust_name(const raul::Path& old_path,
- const raul::Path& new_path,
- std::string name)
+ClashAvoider::adjust_name(const raul::Path& old_path,
+ const raul::Path& new_path,
+ const std::string& name)
{
const auto name_suffix_start = numeric_suffix_start(name);
if (!name_suffix_start) {
- return name; // No numeric suffix, just re-use old label
+ return name; // No numeric suffix, just reuse old label
}
const auto name_suffix = atoi(name.c_str() + *name_suffix_start);
diff --git a/src/ColorContext.cpp b/src/ColorContext.cpp
index a4e60ca5..9706cb81 100644
--- a/src/ColorContext.cpp
+++ b/src/ColorContext.cpp
@@ -14,7 +14,8 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/ColorContext.hpp"
+#include <ingen/ColorContext.hpp>
+
#include "ingen_config.h"
#if USE_ISATTY
diff --git a/src/Configuration.cpp b/src/Configuration.cpp
index 99675c7b..9abdc288 100644
--- a/src/Configuration.cpp
+++ b/src/Configuration.cpp
@@ -14,26 +14,34 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/Configuration.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/URIMap.hpp"
-#include "ingen/fmt.hpp"
-#include "ingen/ingen.h"
-#include "ingen/runtime_paths.hpp"
-#include "lv2/urid/urid.h"
-#include "serd/serd.h"
-#include "sord/sord.h"
-#include "sord/sordmm.hpp"
-#include "sratom/sratom.h"
+#include <ingen/Atom.hpp>
+#include <ingen/Configuration.hpp>
+#include <ingen/FilePath.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/URIMap.hpp>
+#include <ingen/fmt.hpp>
+#include <ingen/ingen.h>
+#include <ingen/runtime_paths.hpp>
+#include <lv2/urid/urid.h>
+#include <serd/serd.h>
+#include <sord/sord.h>
+#include <sord/sordmm.hpp>
+#include <sratom/sratom.h>
#include <algorithm>
#include <cassert>
#include <cerrno>
#include <cstdint>
+#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <filesystem>
+#include <list>
+#include <map>
#include <memory>
+#include <ostream>
+#include <string>
+#include <system_error>
#include <thread>
#include <utility>
#include <vector>
@@ -55,6 +63,8 @@ Configuration::Configuration(Forge& forge)
" ingen -eg # Run engine and GUI in one process\n"
" ingen -eg foo.ingen # Run engine and GUI and load a graph")
{
+ static const auto default_n_threads = static_cast<int32_t>(std::max(std::thread::hardware_concurrency(), 1U));
+
add("atomicBundles", "atomic-bundles", 'a', "Execute bundles atomically", GLOBAL, forge.Bool, forge.make(false));
add("bufferSize", "buffer-size", 'b', "Buffer size in samples", GLOBAL, forge.Int, forge.make(1024));
add("clientPort", "client-port", 'C', "Client port", GLOBAL, forge.Int, Atom());
@@ -77,7 +87,7 @@ Configuration::Configuration(Forge& forge)
add("flushLog", "flush-log", 'f', "Flush logs after every entry", GLOBAL, forge.Bool, forge.make(false));
add("dump", "dump", 'd', "Print debug output", SESSION, forge.Bool, forge.make(false));
add("trace", "trace", 't', "Show LV2 plugin trace messages", SESSION, forge.Bool, forge.make(false));
- add("threads", "threads", 'p', "Number of processing threads", GLOBAL, forge.Int, forge.make(int32_t(std::max(std::thread::hardware_concurrency(), 1U))));
+ add("threads", "threads", 'p', "Number of processing threads", GLOBAL, forge.Int, forge.make(default_n_threads));
add("humanNames", "human-names", 0, "Show human names in GUI", GUI, forge.Bool, forge.make(true));
add("portLabels", "port-labels", 0, "Show port labels in GUI", GUI, forge.Bool, forge.make(true));
add("graphDirectory", "graph-directory", 0, "Default directory for opening graphs", GUI, forge.String, Atom());
@@ -121,10 +131,10 @@ Configuration::variable_string(LV2_URID type) const
void
Configuration::print_usage(const std::string& program, std::ostream& os)
{
- os << "Usage: " << program << " [OPTION]... [GRAPH]" << std::endl;
- os << _shortdesc << std::endl << std::endl;
- os << _desc << std::endl << std::endl;
- os << "Options:" << std::endl;
+ os << "Usage: " << program << " [OPTION]... [GRAPH]\n";
+ os << _shortdesc << "\n\n";
+ os << _desc << "\n\n";
+ os << "Options:\n";
for (const auto& o : _options) {
const Option& option = o.second;
os << " ";
@@ -136,7 +146,7 @@ Configuration::print_usage(const std::string& program, std::ostream& os)
os.width(static_cast<std::streamsize>(_max_name_length + 11));
os << std::left;
os << (std::string("--") + o.first + variable_string(option.type));
- os << option.desc << std::endl;
+ os << option.desc << "\n";
}
}
@@ -157,7 +167,7 @@ Configuration::set_value_from_string(Configuration::Option& option,
option.value = _forge.alloc(value.c_str());
assert(option.value.type() == _forge.String);
} else if (option.type == _forge.Bool) {
- option.value = _forge.make(bool(!strcmp(value.c_str(), "true")));
+ option.value = _forge.make(!strcmp(value.c_str(), "true"));
assert(option.value.type() == _forge.Bool);
} else {
throw OptionError(fmt("Bad option type `%1%'", option.name));
@@ -183,7 +193,7 @@ Configuration::parse(int argc, char** argv)
std::string name = std::string(argv[i]).substr(2);
const char* equals = strchr(argv[i], '=');
if (equals) {
- name = name.substr(0, name.find('='));
+ name.resize(name.find('='));
}
const auto o = _options.find(name);
@@ -282,8 +292,10 @@ Configuration::save(URIMap& uri_map,
}
// Create parent directories if necessary
- const FilePath dir = path.parent_path();
- if (!std::filesystem::create_directories(dir)) {
+ const FilePath dir = path.parent_path();
+ std::error_code ec;
+ std::filesystem::create_directories(dir, ec);
+ if (ec) {
throw FileError(fmt("Error creating directory %1% (%2%)",
dir, strerror(errno)));
}
diff --git a/src/Forge.cpp b/src/Forge.cpp
index abce74f2..8b222c64 100644
--- a/src/Forge.cpp
+++ b/src/Forge.cpp
@@ -14,13 +14,16 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/Forge.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIMap.hpp"
-#include "lv2/atom/forge.h"
-#include "lv2/urid/urid.h"
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIMap.hpp>
+#include <lv2/atom/forge.h>
+#include <lv2/urid/urid.h>
+#include <cstdint>
#include <sstream>
+#include <string>
namespace ingen {
diff --git a/src/LV2Features.cpp b/src/LV2Features.cpp
index 7d9003c0..c33ba4c4 100644
--- a/src/LV2Features.cpp
+++ b/src/LV2Features.cpp
@@ -1,6 +1,6 @@
/*
This file is part of Ingen.
- Copyright 2007-2015 David Robillard <http://drobilla.net/>
+ Copyright 2007-2024 David Robillard <http://drobilla.net/>
Ingen is free software: you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free
@@ -14,10 +14,11 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/LV2Features.hpp"
+#include <ingen/LV2Features.hpp>
-#include "lv2/core/lv2.h"
+#include <lv2/core/lv2.h>
+#include <algorithm>
#include <cstdlib>
#include <memory>
@@ -58,12 +59,9 @@ LV2Features::is_supported(const std::string& uri) const
return true;
}
- for (const auto& f : _features) {
- if (f->uri() == uri) {
- return true;
- }
- }
- return false;
+ return std::any_of(_features.begin(),
+ _features.end(),
+ [&uri](const auto& f) { return f->uri() == uri; });
}
std::shared_ptr<LV2Features::FeatureArray>
diff --git a/src/Library.cpp b/src/Library.cpp
index a8a7107e..4add6577 100644
--- a/src/Library.cpp
+++ b/src/Library.cpp
@@ -14,7 +14,8 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/Library.hpp"
+#include <ingen/FilePath.hpp>
+#include <ingen/Library.hpp>
#ifdef _WIN32
# include <windows.h>
diff --git a/src/Log.cpp b/src/Log.cpp
index e17e1555..fbcaeca1 100644
--- a/src/Log.cpp
+++ b/src/Log.cpp
@@ -1,6 +1,6 @@
/*
This file is part of Ingen.
- Copyright 2007-2016 David Robillard <http://drobilla.net/>
+ Copyright 2007-2024 David Robillard <http://drobilla.net/>
Ingen is free software: you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free
@@ -14,19 +14,20 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/Log.hpp"
+#include <ingen/Log.hpp>
-#include "ingen/ColorContext.hpp"
-#include "ingen/Node.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "lv2/core/lv2.h"
-#include "lv2/log/log.h"
-#include "lv2/urid/urid.h"
-#include "raul/Path.hpp"
+#include <ingen/ColorContext.hpp>
+#include <ingen/Node.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <lv2/core/lv2.h>
+#include <lv2/log/log.h>
+#include <lv2/urid/urid.h>
+#include <raul/Path.hpp>
#include <cstdio>
#include <cstdlib>
+#include <memory>
namespace ingen {
@@ -39,46 +40,44 @@ void
Log::rt_error(const char* msg)
{
#ifndef NDEBUG
- va_list args;
- vtprintf(_uris.log_Error, msg, args);
+ tprintf(_uris.log_Error, msg);
#endif
}
void
Log::error(const std::string& msg)
{
- va_list args;
- vtprintf(_uris.log_Error, msg.c_str(), args);
+ tprintf(_uris.log_Error, msg.c_str());
}
void
Log::warn(const std::string& msg)
{
- va_list args;
- vtprintf(_uris.log_Warning, msg.c_str(), args);
+ tprintf(_uris.log_Warning, msg.c_str());
}
void
Log::info(const std::string& msg)
{
- va_list args;
- vtprintf(_uris.log_Note, msg.c_str(), args);
+ tprintf(_uris.log_Note, msg.c_str());
}
void
Log::trace(const std::string& msg)
{
- va_list args;
- vtprintf(_uris.log_Trace, msg.c_str(), args);
+ tprintf(_uris.log_Trace, msg.c_str());
}
-void
-Log::print(FILE* stream, const std::string& msg) const
+int
+Log::tprintf(LV2_URID type, const char* fmt, ...)
{
- fprintf(stream, "%s", msg.c_str());
- if (_flush) {
- fflush(stdout);
- }
+ va_list args;
+ va_start(args, fmt);
+
+ const int ret = vtprintf(type, fmt, args);
+
+ va_end(args);
+ return ret;
}
int
@@ -120,11 +119,10 @@ Log::vtprintf(LV2_URID type, const char* fmt, va_list args)
static int
log_vprintf(LV2_Log_Handle handle, LV2_URID type, const char* fmt, va_list args)
{
- auto* f = static_cast<Log::Feature::Handle*>(handle);
- va_list noargs = {};
+ auto* const f = static_cast<Log::Feature::Handle*>(handle);
- int ret = f->log->vtprintf(type, f->node->path().c_str(), noargs);
- ret += f->log->vtprintf(type, ": ", noargs);
+ int ret = f->log->tprintf(type, f->node->path().c_str());
+ ret += f->log->tprintf(type, ": ");
ret += f->log->vtprintf(type, fmt, args);
return ret;
diff --git a/src/Parser.cpp b/src/Parser.cpp
index 2a22c31b..c03f0abf 100644
--- a/src/Parser.cpp
+++ b/src/Parser.cpp
@@ -14,28 +14,31 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/Parser.hpp"
-
-#include "ingen/Atom.hpp"
-#include "ingen/AtomForge.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIMap.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "ingen/paths.hpp"
-#include "lv2/atom/atom.h"
-#include "lv2/core/lv2.h"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
-#include "serd/serd.h"
-#include "sord/sord.h"
-#include "sord/sordmm.hpp"
-
+#include <ingen/Parser.hpp>
+
+#include <ingen/Atom.hpp>
+#include <ingen/AtomForge.hpp>
+#include <ingen/FilePath.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIMap.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <ingen/ingen.h>
+#include <ingen/paths.hpp>
+#include <lv2/atom/atom.h>
+#include <lv2/core/lv2.h>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
+#include <serd/serd.h>
+#include <sord/sord.h>
+#include <sord/sordmm.hpp>
+
+#include <algorithm>
#include <cassert>
#include <cstdint>
#include <cstring>
@@ -633,19 +636,18 @@ Parser::parse_file(ingen::World& world,
return false;
}
- /* Choose the graph to load. If this is a manifest, then there should only
- be one, but if this is a graph file, subgraphs will be returned as well.
- In this case, choose the one with the file URI. */
- URI uri;
- for (const ResourceRecord& r : resources) {
- if (r.uri == URI(manifest_path)) {
- uri = r.uri;
- file_path = r.filename;
- break;
- }
- }
+ // Try to find the graph with the manifest path for a URI
+ const auto m = std::find_if(resources.begin(),
+ resources.end(),
+ [manifest_path](const auto& r) {
+ return r.uri == URI(manifest_path);
+ });
- if (uri.empty()) {
+ URI uri;
+ if (m != resources.end()) {
+ uri = m->uri;
+ file_path = m->filename;
+ } else {
// Didn't find a graph with the same URI as the file, use the first
uri = (*resources.begin()).uri;
file_path = (*resources.begin()).filename;
diff --git a/src/Resource.cpp b/src/Resource.cpp
index 2171c438..29a82772 100644
--- a/src/Resource.cpp
+++ b/src/Resource.cpp
@@ -14,11 +14,13 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/Resource.hpp"
+#include <ingen/Resource.hpp>
-#include "ingen/Atom.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/URIs.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
#include <map>
#include <utility>
@@ -51,6 +53,8 @@ Resource::add_property(const URI& uri, const Atom& value, Graph ctx)
const Atom&
Resource::set_property(const URI& uri, const Atom& value, Resource::Graph ctx)
{
+ assert(uri != _uris.ingen_activity); // Always ephemeral
+
// Erase existing property in this context
for (auto i = _properties.find(uri);
(i != _properties.end()) && (i->first == uri);) {
@@ -64,16 +68,10 @@ Resource::set_property(const URI& uri, const Atom& value, Resource::Graph ctx)
i = next;
}
- if (uri != _uris.ingen_activity) {
- // Insert new property
- const Atom& v = _properties.emplace(uri, Property(value, ctx))->second;
- on_property(uri, v);
- return v;
- }
-
- // Announce ephemeral activity, but do not store
- on_property(uri, value);
- return value;
+ // Insert new property
+ const Atom& v = _properties.emplace(uri, Property(value, ctx))->second;
+ on_property(uri, v);
+ return v;
}
const Atom&
diff --git a/src/Serialiser.cpp b/src/Serialiser.cpp
index e5d3cb15..785e12ba 100644
--- a/src/Serialiser.cpp
+++ b/src/Serialiser.cpp
@@ -14,31 +14,32 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/Serialiser.hpp"
-
-#include "ingen/Arc.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/FilePath.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/Node.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/Store.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIMap.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "ingen/runtime_paths.hpp"
-#include "lv2/core/lv2.h"
-#include "lv2/state/state.h"
-#include "lv2/ui/ui.h"
-#include "lv2/urid/urid.h"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
-#include "serd/serd.h"
-#include "sord/sord.h"
-#include "sord/sordmm.hpp"
-#include "sratom/sratom.h"
+#include <ingen/Serialiser.hpp>
+
+#include <ingen/Arc.hpp>
+#include <ingen/Atom.hpp>
+#include <ingen/FilePath.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/Node.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/Store.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIMap.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <ingen/ingen.h>
+#include <lv2/core/lv2.h>
+#include <lv2/state/state.h>
+#include <lv2/ui/ui.h>
+#include <lv2/urid/urid.h>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
+#include <serd/serd.h>
+#include <sord/sord.h>
+#include <sord/sordmm.hpp>
+#include <sratom/sratom.h>
#include <cassert>
#include <cstdint>
@@ -118,7 +119,6 @@ Serialiser::Impl::write_manifest(const FilePath& bundle_path,
const std::shared_ptr<const Node>&)
{
const FilePath manifest_path(bundle_path / "manifest.ttl");
- const FilePath binary_path(ingen_module_path("lv2"));
start_to_file(raul::Path("/"), manifest_path);
@@ -515,7 +515,7 @@ void
Serialiser::serialise_arc(const Sord::Node& parent,
const std::shared_ptr<const Arc>& arc)
{
- return me->serialise_arc(parent, arc);
+ me->serialise_arc(parent, arc);
}
void
diff --git a/src/SocketReader.cpp b/src/SocketReader.cpp
index 93677c6c..5499fb66 100644
--- a/src/SocketReader.cpp
+++ b/src/SocketReader.cpp
@@ -14,18 +14,18 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/SocketReader.hpp"
-
-#include "ingen/AtomForge.hpp"
-#include "ingen/AtomReader.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/URIMap.hpp"
-#include "ingen/World.hpp"
-#include "lv2/urid/urid.h"
-#include "raul/Socket.hpp"
-#include "serd/serd.h"
-#include "sord/sord.h"
-#include "sord/sordmm.hpp"
+#include <ingen/SocketReader.hpp>
+
+#include <ingen/AtomForge.hpp>
+#include <ingen/AtomReader.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/URIMap.hpp>
+#include <ingen/World.hpp>
+#include <lv2/urid/urid.h>
+#include <raul/Socket.hpp>
+#include <serd/serd.h>
+#include <sord/sord.h>
+#include <sord/sordmm.hpp>
#include <cerrno>
#include <cstdint>
@@ -33,6 +33,7 @@
#include <mutex>
#include <poll.h>
#include <sys/socket.h>
+#include <sys/types.h>
#include <utility>
namespace ingen {
diff --git a/src/SocketWriter.cpp b/src/SocketWriter.cpp
index e736eec8..7512ecbd 100644
--- a/src/SocketWriter.cpp
+++ b/src/SocketWriter.cpp
@@ -14,12 +14,16 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/SocketWriter.hpp"
+#include <ingen/SocketWriter.hpp>
-#include "raul/Socket.hpp"
+#include <ingen/Message.hpp>
+#include <ingen/TurtleWriter.hpp>
+#include <ingen/URI.hpp>
+#include <raul/Socket.hpp>
#include <memory>
#include <sys/socket.h>
+#include <sys/types.h>
#include <utility>
#include <variant>
diff --git a/src/Store.cpp b/src/Store.cpp
index d85d5932..ab8425cb 100644
--- a/src/Store.cpp
+++ b/src/Store.cpp
@@ -14,11 +14,11 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/Store.hpp"
+#include <ingen/Store.hpp>
-#include "ingen/Node.hpp"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/Node.hpp>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
#include <cassert>
#include <cstdint>
diff --git a/src/StreamWriter.cpp b/src/StreamWriter.cpp
index f23a6205..c40389e4 100644
--- a/src/StreamWriter.cpp
+++ b/src/StreamWriter.cpp
@@ -14,9 +14,11 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/StreamWriter.hpp"
+#include <ingen/StreamWriter.hpp>
-#include "ingen/ColorContext.hpp"
+#include <ingen/ColorContext.hpp>
+#include <ingen/TurtleWriter.hpp>
+#include <ingen/URI.hpp>
namespace ingen {
diff --git a/src/TurtleWriter.cpp b/src/TurtleWriter.cpp
index 61f8b543..e19c14e2 100644
--- a/src/TurtleWriter.cpp
+++ b/src/TurtleWriter.cpp
@@ -14,12 +14,15 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/TurtleWriter.hpp"
-
-#include "ingen/URIMap.hpp"
-#include "lv2/atom/atom.h"
-#include "serd/serd.h"
-#include "sratom/sratom.h"
+#include <ingen/TurtleWriter.hpp>
+
+#include <ingen/AtomWriter.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIMap.hpp>
+#include <ingen/ingen.h>
+#include <lv2/atom/atom.h>
+#include <serd/serd.h>
+#include <sratom/sratom.h>
#include <utility>
diff --git a/src/URI.cpp b/src/URI.cpp
index c4020c4d..3161b7d2 100644
--- a/src/URI.cpp
+++ b/src/URI.cpp
@@ -14,11 +14,11 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/URI.hpp"
+#include <ingen/URI.hpp>
-#include "ingen/FilePath.hpp"
-#include "serd/serd.h"
-#include "sord/sordmm.hpp"
+#include <ingen/FilePath.hpp>
+#include <serd/serd.h>
+#include <sord/sordmm.hpp>
#include <cassert>
@@ -52,14 +52,14 @@ URI::URI(const std::string& str, const URI& base)
{
}
-URI::URI(SerdNode node)
+URI::URI(const SerdNode& node)
: _uri(SERD_URI_NULL)
, _node(serd_node_new_uri_from_node(&node, nullptr, &_uri))
{
assert(node.type == SERD_URI);
}
-URI::URI(SerdNode node, SerdURI uri) : _uri(uri), _node(node)
+URI::URI(const SerdNode& node, const SerdURI& uri) : _uri(uri), _node(node)
{
assert(node.type == SERD_URI);
}
diff --git a/src/URIMap.cpp b/src/URIMap.cpp
index bb484529..25764762 100644
--- a/src/URIMap.cpp
+++ b/src/URIMap.cpp
@@ -14,11 +14,11 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/URIMap.hpp"
+#include <ingen/URIMap.hpp>
-#include "ingen/Log.hpp"
-#include "ingen/URI.hpp"
-#include "lv2/urid/urid.h"
+#include <ingen/Log.hpp>
+#include <ingen/URI.hpp>
+#include <lv2/urid/urid.h>
#include <cassert>
#include <cstdint>
diff --git a/src/URIs.cpp b/src/URIs.cpp
index 27e2e8f1..49eb1707 100644
--- a/src/URIs.cpp
+++ b/src/URIs.cpp
@@ -14,26 +14,27 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/URIs.hpp"
+#include <ingen/URIs.hpp>
-#include "ingen/Forge.hpp"
-#include "ingen/ingen.h"
-#include "lilv/lilv.h"
-#include "lv2/atom/atom.h"
-#include "lv2/buf-size/buf-size.h"
-#include "lv2/core/lv2.h"
-#include "lv2/log/log.h"
-#include "lv2/midi/midi.h"
-#include "lv2/morph/morph.h"
-#include "lv2/options/options.h"
-#include "lv2/parameters/parameters.h"
-#include "lv2/patch/patch.h"
-#include "lv2/port-props/port-props.h"
-#include "lv2/presets/presets.h"
-#include "lv2/resize-port/resize-port.h"
-#include "lv2/state/state.h"
-#include "lv2/time/time.h"
-#include "lv2/worker/worker.h"
+#include <ingen/Forge.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/ingen.h>
+#include <lilv/lilv.h>
+#include <lv2/atom/atom.h>
+#include <lv2/buf-size/buf-size.h>
+#include <lv2/core/lv2.h>
+#include <lv2/log/log.h>
+#include <lv2/midi/midi.h>
+#include <lv2/morph/morph.h>
+#include <lv2/options/options.h>
+#include <lv2/parameters/parameters.h>
+#include <lv2/patch/patch.h>
+#include <lv2/port-props/port-props.h>
+#include <lv2/presets/presets.h>
+#include <lv2/resize-port/resize-port.h>
+#include <lv2/state/state.h>
+#include <lv2/time/time.h>
+#include <lv2/worker/worker.h>
namespace ingen {
diff --git a/src/World.cpp b/src/World.cpp
index 03a47773..7e643002 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -14,29 +14,29 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/World.hpp"
-
-#include "ingen/Atom.hpp"
-#include "ingen/Configuration.hpp"
-#include "ingen/DataAccess.hpp"
-#include "ingen/EngineBase.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/InstanceAccess.hpp"
-#include "ingen/LV2Features.hpp"
-#include "ingen/Library.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/Module.hpp"
-#include "ingen/Parser.hpp"
-#include "ingen/Serialiser.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIMap.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/ingen.h"
-#include "ingen/runtime_paths.hpp"
-#include "lilv/lilv.h"
-#include "lv2/log/log.h"
-#include "lv2/urid/urid.h"
-#include "sord/sordmm.hpp"
+#include <ingen/World.hpp>
+
+#include <ingen/Atom.hpp>
+#include <ingen/Configuration.hpp>
+#include <ingen/DataAccess.hpp>
+#include <ingen/EngineBase.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/InstanceAccess.hpp>
+#include <ingen/LV2Features.hpp>
+#include <ingen/Library.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/Module.hpp>
+#include <ingen/Parser.hpp>
+#include <ingen/Serialiser.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIMap.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/ingen.h>
+#include <ingen/runtime_paths.hpp>
+#include <lilv/lilv.h>
+#include <lv2/log/log.h>
+#include <lv2/urid/urid.h>
+#include <sord/sordmm.hpp>
#include <cstdint>
#include <filesystem>
diff --git a/src/client/BlockModel.cpp b/src/client/BlockModel.cpp
index 998c118d..beef0117 100644
--- a/src/client/BlockModel.cpp
+++ b/src/client/BlockModel.cpp
@@ -14,18 +14,23 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/client/BlockModel.hpp"
-
-#include "ingen/Atom.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/client/PluginModel.hpp"
-#include "ingen/client/PortModel.hpp"
-#include "lilv/lilv.h"
-#include "lv2/core/lv2.h"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
-
+#include <ingen/client/BlockModel.hpp>
+
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/client/ObjectModel.hpp>
+#include <ingen/client/PluginModel.hpp>
+#include <ingen/client/PortModel.hpp>
+#include <lilv/lilv.h>
+#include <lv2/core/lv2.h>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
+
+#include <sigc++/signal.h>
+
+#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdlib>
@@ -74,23 +79,26 @@ BlockModel::~BlockModel()
void
BlockModel::remove_port(const std::shared_ptr<PortModel>& port)
{
- for (auto i = _ports.begin(); i != _ports.end(); ++i) {
- if ((*i) == port) {
- _ports.erase(i);
- break;
- }
+ const auto i = std::find_if(_ports.begin(),
+ _ports.end(),
+ [&port](const auto& p) { return p == port; });
+
+ if (i != _ports.end()) {
+ _ports.erase(i);
+ _signal_removed_port.emit(port);
}
- _signal_removed_port.emit(port);
}
void
BlockModel::remove_port(const raul::Path& port_path)
{
- for (auto i = _ports.begin(); i != _ports.end(); ++i) {
- if ((*i)->path() == port_path) {
- _ports.erase(i);
- break;
- }
+ const auto i =
+ std::find_if(_ports.begin(), _ports.end(), [&port_path](const auto& p) {
+ return p->path() == port_path;
+ });
+
+ if (i != _ports.end()) {
+ _ports.erase(i);
}
}
@@ -218,7 +226,7 @@ BlockModel::port_value_range(const std::shared_ptr<const PortModel>& port,
default_port_value_range(port, min, max);
- // Possibly overriden
+ // Possibly overridden
const Atom& min_atom = port->get_property(_uris.lv2_minimum);
const Atom& max_atom = port->get_property(_uris.lv2_maximum);
if (min_atom.type() == _uris.forge.Float) {
diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp
index 7cfd439d..9f224db3 100644
--- a/src/client/ClientStore.cpp
+++ b/src/client/ClientStore.cpp
@@ -14,23 +14,27 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/client/ClientStore.hpp"
-
-#include "ingen/Atom.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/client/ArcModel.hpp"
-#include "ingen/client/BlockModel.hpp"
-#include "ingen/client/GraphModel.hpp"
-#include "ingen/client/ObjectModel.hpp"
-#include "ingen/client/PluginModel.hpp"
-#include "ingen/client/PortModel.hpp"
-#include "ingen/client/SigClientInterface.hpp"
-#include "ingen/paths.hpp"
-#include "raul/Path.hpp"
+#include <ingen/client/ClientStore.hpp>
+
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/Message.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/Store.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/client/ArcModel.hpp>
+#include <ingen/client/BlockModel.hpp>
+#include <ingen/client/GraphModel.hpp>
+#include <ingen/client/ObjectModel.hpp>
+#include <ingen/client/PluginModel.hpp>
+#include <ingen/client/PortModel.hpp>
+#include <ingen/client/SigClientInterface.hpp>
+#include <ingen/paths.hpp>
+#include <raul/Path.hpp>
+#include <sigc++/signal.h>
#include <sigc++/functors/mem_fun.h>
@@ -79,7 +83,7 @@ ClientStore::add_object(const std::shared_ptr<ObjectModel>& object)
assert(object->path().is_child_of(parent->path()));
object->set_parent(parent);
parent->add_child(object);
- assert(parent && (object->parent() == parent));
+ assert(object->parent() == parent);
(*this)[object->path()] = object;
_signal_new_object.emit(object);
diff --git a/src/client/GraphModel.cpp b/src/client/GraphModel.cpp
index 45d0eb31..fe119361 100644
--- a/src/client/GraphModel.cpp
+++ b/src/client/GraphModel.cpp
@@ -14,15 +14,17 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/client/GraphModel.hpp"
-
-#include "ingen/Atom.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/client/ArcModel.hpp"
-#include "ingen/client/BlockModel.hpp"
-#include "ingen/client/ObjectModel.hpp"
-#include "ingen/client/PortModel.hpp"
-#include "raul/Path.hpp"
+#include <ingen/client/GraphModel.hpp>
+
+#include <ingen/Atom.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/client/ArcModel.hpp>
+#include <ingen/client/BlockModel.hpp>
+#include <ingen/client/ObjectModel.hpp>
+#include <ingen/client/PortModel.hpp>
+#include <raul/Path.hpp>
+#include <sigc++/signal.h>
#include <cassert>
#include <map>
@@ -30,8 +32,17 @@
#include <string>
#include <utility>
+namespace ingen {
+class Node;
+} // namespace ingen
+
namespace ingen::client {
+GraphModel::GraphModel(URIs& uris, const raul::Path& graph_path)
+ : BlockModel{uris, static_cast<const URI&>(uris.ingen_Graph), graph_path}
+{
+}
+
void
GraphModel::add_child(const std::shared_ptr<ObjectModel>& c)
{
@@ -173,11 +184,4 @@ GraphModel::internal_poly() const
return poly.is_valid() ? poly.get<int32_t>() : 1;
}
-bool
-GraphModel::polyphonic() const
-{
- const Atom& poly = get_property(_uris.ingen_polyphonic);
- return poly.is_valid() && poly.get<int32_t>();
-}
-
} // namespace ingen::client
diff --git a/src/client/ObjectModel.cpp b/src/client/ObjectModel.cpp
index 0c3bf517..4baa895c 100644
--- a/src/client/ObjectModel.cpp
+++ b/src/client/ObjectModel.cpp
@@ -14,16 +14,17 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/client/ObjectModel.hpp"
-
-#include "ingen/Atom.hpp"
-#include "ingen/Node.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/paths.hpp"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/client/ObjectModel.hpp>
+
+#include <ingen/Atom.hpp>
+#include <ingen/Node.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/paths.hpp>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
+#include <sigc++/signal.h>
#include <cassert>
#include <cstdint>
diff --git a/src/client/PluginModel.cpp b/src/client/PluginModel.cpp
index 333bf568..f4dfccd2 100644
--- a/src/client/PluginModel.cpp
+++ b/src/client/PluginModel.cpp
@@ -14,13 +14,19 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/client/PluginModel.hpp"
-
-#include "ingen/Atom.hpp"
-#include "ingen/client/PluginUI.hpp"
-#include "lilv/lilv.h"
-#include "lv2/core/lv2.h"
-#include "raul/Symbol.hpp"
+#include <ingen/client/PluginModel.hpp>
+
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/client/PluginUI.hpp>
+#include <lilv/lilv.h>
+#include <lv2/core/lv2.h>
+#include <raul/Symbol.hpp>
+#include <sigc++/signal.h>
#include <cctype>
#include <cstring>
@@ -103,7 +109,7 @@ PluginModel::get_property(const URI& key) const
size_t last_delim = last_uri_delim(str);
while (last_delim != string::npos &&
!contains_alpha_after(str, last_delim)) {
- str = str.substr(0, last_delim);
+ str.resize(last_delim);
last_delim = last_uri_delim(str);
}
str = str.substr(last_delim + 1);
diff --git a/src/client/PluginUI.cpp b/src/client/PluginUI.cpp
index 61813cab..c4aa748f 100644
--- a/src/client/PluginUI.cpp
+++ b/src/client/PluginUI.cpp
@@ -14,22 +14,24 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/client/PluginUI.hpp"
-
-#include "ingen/Atom.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "ingen/client/BlockModel.hpp"
-#include "ingen/client/PortModel.hpp"
-#include "lilv/lilv.h"
-#include "lv2/atom/atom.h"
-#include "lv2/core/lv2.h"
-#include "lv2/ui/ui.h"
-#include "raul/Symbol.hpp"
-#include "suil/suil.h"
+#include <ingen/client/PluginUI.hpp>
+
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/LV2Features.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <ingen/client/BlockModel.hpp>
+#include <ingen/client/PortModel.hpp>
+#include <lilv/lilv.h>
+#include <lv2/atom/atom.h>
+#include <lv2/core/lv2.h>
+#include <lv2/ui/ui.h>
+#include <raul/Symbol.hpp>
+#include <suil/suil.h>
#include <sigc++/signal.h>
diff --git a/src/client/PortModel.cpp b/src/client/PortModel.cpp
index 73f273c7..14a5297e 100644
--- a/src/client/PortModel.cpp
+++ b/src/client/PortModel.cpp
@@ -1,6 +1,6 @@
/*
This file is part of Ingen.
- Copyright 2007-2015 David Robillard <http://drobilla.net/>
+ Copyright 2007-2024 David Robillard <http://drobilla.net/>
Ingen is free software: you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free
@@ -14,18 +14,20 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/client/PortModel.hpp"
+#include <ingen/client/PortModel.hpp>
-#include "ingen/Properties.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/client/ObjectModel.hpp"
-#include "lv2/urid/urid.h"
+#include <ingen/Properties.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/client/ObjectModel.hpp>
+#include <lv2/urid/urid.h>
+#include <sigc++/signal.h>
+#include <algorithm>
#include <cstdint>
+#include <exception>
#include <map>
#include <memory>
-#include <utility>
namespace ingen::client {
@@ -60,14 +62,24 @@ PortModel::port_property(const URIs::Quark& uri) const
bool
PortModel::is_uri() const
{
- // FIXME: Resource::has_property doesn't work, URI != URID
- for (const auto& p : properties()) {
- if (p.second.type() == _uris.atom_URID &&
- static_cast<LV2_URID>(p.second.get<int32_t>()) == _uris.atom_URID) {
- return true;
- }
- }
- return false;
+ return std::any_of(
+ properties().begin(), properties().end(), [this](const auto& p) {
+ return (p.second.type() == _uris.atom_URID &&
+ static_cast<LV2_URID>(p.second.template get<int32_t>()) ==
+ _uris.atom_URID);
+ });
+}
+
+void
+PortModel::add_child(const std::shared_ptr<ObjectModel>&)
+{
+ std::terminate();
+}
+
+bool
+PortModel::remove_child(const std::shared_ptr<ObjectModel>&)
+{
+ std::terminate();
}
void
diff --git a/src/client/ingen_client.cpp b/src/client/ingen_client.cpp
index 63705ebc..88619115 100644
--- a/src/client/ingen_client.cpp
+++ b/src/client/ingen_client.cpp
@@ -14,20 +14,15 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/Module.hpp"
+#include <ingen/Module.hpp>
-namespace ingen {
-
-class World;
-
-namespace client {
+namespace ingen::client {
struct ClientModule : public ingen::Module {
void load(ingen::World& world) override {}
};
-} // namespace client
-} // namespace ingen
+} // namespace ingen::client
extern "C" {
diff --git a/src/gui/.clang-tidy b/src/gui/.clang-tidy
index 4dc4facc..99bd2aba 100644
--- a/src/gui/.clang-tidy
+++ b/src/gui/.clang-tidy
@@ -15,7 +15,6 @@ Checks: >
-clang-analyzer-core.CallAndMessage,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-pro-bounds-constant-array-index,
- -cppcoreguidelines-pro-type-cstyle-cast,
-cppcoreguidelines-pro-type-static-cast-downcast,
-cppcoreguidelines-pro-type-vararg,
-cppcoreguidelines-slicing,
diff --git a/src/gui/App.cpp b/src/gui/App.cpp
index 5ae1c8d9..260afdba 100644
--- a/src/gui/App.cpp
+++ b/src/gui/App.cpp
@@ -27,31 +27,37 @@
#include "WindowFactory.hpp"
#include "rgba.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/ColorContext.hpp"
-#include "ingen/Configuration.hpp"
-#include "ingen/EngineBase.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/QueuedInterface.hpp"
-#include "ingen/Status.hpp"
-#include "ingen/StreamWriter.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "ingen/client/ClientStore.hpp"
-#include "ingen/client/PluginModel.hpp"
-#include "ingen/client/PortModel.hpp"
-#include "ingen/client/SigClientInterface.hpp"
-#include "ingen/runtime_paths.hpp"
-#include "lilv/lilv.h"
-#include "lv2/urid/urid.h"
-#include "suil/suil.h"
+#include <ingen/Atom.hpp>
+#include <ingen/ColorContext.hpp>
+#include <ingen/Configuration.hpp>
+#include <ingen/EngineBase.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/Message.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/QueuedInterface.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/Status.hpp>
+#include <ingen/StreamWriter.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <ingen/client/ClientStore.hpp>
+#include <ingen/client/PluginModel.hpp>
+#include <ingen/client/PortModel.hpp>
+#include <ingen/client/SigClientInterface.hpp>
+#include <ingen/fmt.hpp>
+#include <ingen/runtime_paths.hpp>
+#include <lilv/lilv.h>
+#include <lv2/urid/urid.h>
+#include <suil/suil.h>
#include <glib.h>
#include <glibmm/main.h>
#include <glibmm/miscutils.h>
#include <glibmm/propertyproxy.h>
+#include <glibmm/ustring.h>
#include <gtk/gtk.h>
#include <gtkmm/aboutdialog.h>
#include <gtkmm/dialog.h>
@@ -62,9 +68,11 @@
#include <gtkmm/stock.h>
#include <gtkmm/widget.h>
#include <sigc++/functors/mem_fun.h>
+#include <sigc++/functors/slot.h>
#include <algorithm>
#include <cassert>
+#include <cstdarg>
#include <cstdio>
#include <exception>
#include <iostream>
diff --git a/src/gui/App.hpp b/src/gui/App.hpp
index d7776896..0138f25a 100644
--- a/src/gui/App.hpp
+++ b/src/gui/App.hpp
@@ -17,13 +17,13 @@
#ifndef INGEN_GUI_APP_HPP
#define INGEN_GUI_APP_HPP
-#include "ingen/Message.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/World.hpp"
-#include "ingen/ingen.h"
-#include "lilv/lilv.h"
+#include <ingen/Message.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/World.hpp>
+#include <ingen/ingen.h>
+#include <lilv/lilv.h>
#include <sigc++/signal.h>
@@ -77,6 +77,11 @@ class INGEN_API App
public:
~App();
+ App(const App&) = delete;
+ App& operator=(const App&) = delete;
+ App(App&&) = delete;
+ App& operator=(App&&) = delete;
+
void error_message(const std::string& str);
void attach(const std::shared_ptr<ingen::Interface>& client);
diff --git a/src/gui/Arc.cpp b/src/gui/Arc.cpp
index 17cd57df..c13cf4a7 100644
--- a/src/gui/Arc.cpp
+++ b/src/gui/Arc.cpp
@@ -16,11 +16,12 @@
#include "Arc.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/client/ArcModel.hpp"
-#include "ingen/client/BlockModel.hpp"
-#include "ingen/client/ObjectModel.hpp"
-#include "ingen/client/PortModel.hpp"
+#include <ganv/Edge.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/client/ArcModel.hpp>
+#include <ingen/client/BlockModel.hpp>
+#include <ingen/client/ObjectModel.hpp>
+#include <ingen/client/PortModel.hpp>
#include <glib-object.h>
diff --git a/src/gui/Arc.hpp b/src/gui/Arc.hpp
index 82467a5a..ad1bc6f2 100644
--- a/src/gui/Arc.hpp
+++ b/src/gui/Arc.hpp
@@ -17,7 +17,7 @@
#ifndef INGEN_GUI_ARC_HPP
#define INGEN_GUI_ARC_HPP
-#include "ganv/Edge.hpp"
+#include <ganv/Edge.hpp>
#include <memory>
diff --git a/src/gui/BreadCrumbs.cpp b/src/gui/BreadCrumbs.cpp
index 076a259f..5bd4d30a 100644
--- a/src/gui/BreadCrumbs.cpp
+++ b/src/gui/BreadCrumbs.cpp
@@ -19,14 +19,17 @@
#include "App.hpp"
#include "GraphView.hpp"
-#include "ingen/client/SigClientInterface.hpp"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/Message.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/client/GraphModel.hpp>
+#include <ingen/client/SigClientInterface.hpp>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
-#include <glibmm/signalproxy.h>
#include <sigc++/adaptors/bind.h>
#include <sigc++/functors/mem_fun.h>
+#include <algorithm>
#include <string>
#include <variant>
@@ -47,13 +50,13 @@ BreadCrumbs::BreadCrumbs(App& app)
std::shared_ptr<GraphView>
BreadCrumbs::view(const raul::Path& path)
{
- for (const auto& b : _breadcrumbs) {
- if (b->path() == path) {
- return b->view();
- }
- }
+ const auto b = std::find_if(_breadcrumbs.begin(),
+ _breadcrumbs.end(),
+ [&path](const auto* crumb) {
+ return crumb->path() == path;
+ });
- return nullptr;
+ return b == _breadcrumbs.end() ? nullptr : (*b)->view();
}
/** Sets up the crumbs to display `path`.
@@ -70,7 +73,7 @@ BreadCrumbs::build(const raul::Path& path,
if (!_breadcrumbs.empty() && (path.is_parent_of(_full_path) || path == _full_path)) {
// Moving to a path we already contain, just switch the active button
- for (const auto& b : _breadcrumbs) {
+ for (auto* b : _breadcrumbs) {
if (b->path() == path) {
b->set_active(true);
if (!b->view()) {
@@ -86,13 +89,12 @@ BreadCrumbs::build(const raul::Path& path,
}
_active_path = path;
- _enable_signal = old_enable_signal;
} else if (!_breadcrumbs.empty() && path.is_child_of(_full_path)) {
// Moving to a child of the full path, append crumbs (preserve cache)
string suffix = path.substr(_full_path.length());
- while (suffix.length() > 0) {
+ while (!suffix.empty()) {
if (suffix[0] == '/') {
suffix = suffix.substr(1);
}
@@ -109,7 +111,7 @@ BreadCrumbs::build(const raul::Path& path,
suffix = suffix.substr(suffix.find('/') + 1);
}
- for (const auto& b : _breadcrumbs) {
+ for (auto* b : _breadcrumbs) {
b->set_active(false);
}
_breadcrumbs.back()->set_active(true);
@@ -122,7 +124,7 @@ BreadCrumbs::build(const raul::Path& path,
_active_path = path;
// Empty existing breadcrumbs
- for (const auto& b : _breadcrumbs) {
+ for (auto* b : _breadcrumbs) {
remove(*b);
}
_breadcrumbs.clear();
@@ -135,7 +137,7 @@ BreadCrumbs::build(const raul::Path& path,
raul::Path working_path("/");
string suffix = path.substr(1);
- while (suffix.length() > 0) {
+ while (!suffix.empty()) {
if (suffix[0] == '/') {
suffix = suffix.substr(1);
}
@@ -204,15 +206,19 @@ BreadCrumbs::message(const Message& msg)
void
BreadCrumbs::object_destroyed(const URI& uri)
{
- for (auto i = _breadcrumbs.begin(); i != _breadcrumbs.end(); ++i) {
- if ((*i)->path() == uri.c_str()) {
- // Remove all crumbs after the removed one (inclusive)
- for (auto j = i; j != _breadcrumbs.end(); ) {
- BreadCrumb* bc = *j;
- j = _breadcrumbs.erase(j);
- remove(*bc);
- }
- break;
+ const auto i = std::find_if(_breadcrumbs.begin(),
+ _breadcrumbs.end(),
+ [&uri](const auto& b) {
+ return b->path() == uri.c_str();
+ });
+
+ if (i != _breadcrumbs.end()) {
+ // Remove all crumbs after the removed one (inclusive)
+ for (auto j = i; j != _breadcrumbs.end();) {
+ BreadCrumb* const bc = *j;
+
+ j = _breadcrumbs.erase(j);
+ remove(*bc);
}
}
}
@@ -220,7 +226,7 @@ BreadCrumbs::object_destroyed(const URI& uri)
void
BreadCrumbs::object_moved(const raul::Path& old_path, const raul::Path& new_path)
{
- for (const auto& b : _breadcrumbs) {
+ for (auto* b : _breadcrumbs) {
if (b->path() == old_path) {
b->set_path(new_path);
}
diff --git a/src/gui/BreadCrumbs.hpp b/src/gui/BreadCrumbs.hpp
index e7fffc18..89a339f2 100644
--- a/src/gui/BreadCrumbs.hpp
+++ b/src/gui/BreadCrumbs.hpp
@@ -19,11 +19,12 @@
#include "GraphView.hpp"
-#include "ingen/Message.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/client/GraphModel.hpp"
-#include "raul/Path.hpp"
+#include <ingen/Message.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/client/GraphModel.hpp>
+#include <raul/Path.hpp>
+#include <glibmm/ustring.h>
#include <gtkmm/box.h>
#include <gtkmm/label.h>
#include <gtkmm/object.h>
@@ -70,7 +71,7 @@ private:
{
public:
BreadCrumb(const raul::Path& path,
- const std::shared_ptr<GraphView>& view = nullptr)
+ const std::shared_ptr<GraphView>& view)
: _path(path), _view(view)
{
assert(!view || view->graph()->path() == path);
@@ -80,6 +81,10 @@ private:
show_all();
}
+ explicit BreadCrumb(const raul::Path& path)
+ : BreadCrumb{path, nullptr}
+ {}
+
void set_view(const std::shared_ptr<GraphView>& view) {
assert(!view || view->graph()->path() == _path);
_view = view;
diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp
index f49b8788..edafdfa4 100644
--- a/src/gui/ConnectWindow.cpp
+++ b/src/gui/ConnectWindow.cpp
@@ -20,27 +20,29 @@
#include "Window.hpp"
#include "WindowFactory.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Configuration.hpp"
-#include "ingen/EngineBase.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/QueuedInterface.hpp"
-#include "ingen/Status.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "ingen/client/ClientStore.hpp"
-#include "ingen/client/GraphModel.hpp" // IWYU pragma: keep
-#include "ingen/client/SigClientInterface.hpp"
-#include "ingen/client/SocketClient.hpp"
-#include "ingen/paths.hpp"
-#include "raul/Path.hpp"
-#include "raul/Process.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Configuration.hpp>
+#include <ingen/EngineBase.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/Message.hpp>
+#include <ingen/QueuedInterface.hpp>
+#include <ingen/Status.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <ingen/client/ClientStore.hpp>
+#include <ingen/client/GraphModel.hpp>
+#include <ingen/client/SigClientInterface.hpp>
+#include <ingen/client/SocketClient.hpp>
+#include <ingen/fmt.hpp>
+#include <ingen/paths.hpp>
+#include <raul/Path.hpp>
+#include <raul/Process.hpp>
#include <glib.h>
#include <glibmm/main.h>
-#include <glibmm/signalproxy.h>
#include <glibmm/ustring.h>
#include <gtkmm/builder.h>
#include <gtkmm/button.h>
@@ -56,6 +58,7 @@
#include <gtkmm/stock.h>
#include <sigc++/adaptors/bind.h>
#include <sigc++/functors/mem_fun.h>
+#include <sigc++/functors/slot.h>
#include <sigc++/signal.h>
#include <limits>
@@ -110,7 +113,7 @@ ConnectWindow::start(App& app, ingen::World& world)
}
set_connected_to(world.interface());
- connect(bool(world.interface()));
+ connect(!!world.interface());
}
void
@@ -440,18 +443,17 @@ ConnectWindow::internal_toggled()
void
ConnectWindow::next_stage()
{
- static const char* labels[] = {
- "Connecting...",
- "Pinging engine...",
- "Attaching to engine...",
- "Requesting root graph...",
- "Waiting for root graph...",
- "Connected"
- };
-
-
++_connect_stage;
if (_widgets_loaded) {
+ static const char* labels[] = {
+ "Connecting...",
+ "Pinging engine...",
+ "Attaching to engine...",
+ "Requesting root graph...",
+ "Waiting for root graph...",
+ "Connected"
+ };
+
_progress_label->set_text(labels[_connect_stage]);
}
}
@@ -474,8 +476,8 @@ ConnectWindow::gtk_callback()
// Show if attempted connection goes on for a noticeable amount of time
if (!is_visible()) {
- const float ms_since_start = (now.tv_sec - start.tv_sec) * 1000.0f +
- (now.tv_usec - start.tv_usec) * 0.001f;
+ const float ms_since_start = ((now.tv_sec - start.tv_sec) * 1000.0f) +
+ ((now.tv_usec - start.tv_usec) * 0.001f);
if (ms_since_start > 500) {
present();
set_connecting_widget_states();
@@ -483,8 +485,8 @@ ConnectWindow::gtk_callback()
}
if (_connect_stage == 0) {
- const float ms_since_last = (now.tv_sec - last.tv_sec) * 1000.0f +
- (now.tv_usec - last.tv_usec) * 0.001f;
+ const float ms_since_last = ((now.tv_sec - last.tv_sec) * 1000.0f) +
+ ((now.tv_usec - last.tv_usec) * 0.001f);
if (ms_since_last >= 250) {
last = now;
if (_mode == Mode::INTERNAL) {
@@ -513,8 +515,8 @@ ConnectWindow::gtk_callback()
if (_attached) {
next_stage();
} else {
- const float ms_since_last = (now.tv_sec - last.tv_sec) * 1000.0f +
- (now.tv_usec - last.tv_usec) * 0.001f;
+ const float ms_since_last = ((now.tv_sec - last.tv_sec) * 1000.0f) +
+ ((now.tv_usec - last.tv_usec) * 0.001f);
if (attempts > 10) {
error("Failed to ping engine");
_connect_stage = -1;
diff --git a/src/gui/ConnectWindow.hpp b/src/gui/ConnectWindow.hpp
index 269a4d76..cd9059e1 100644
--- a/src/gui/ConnectWindow.hpp
+++ b/src/gui/ConnectWindow.hpp
@@ -19,8 +19,8 @@
#include "Window.hpp"
-#include "ingen/Message.hpp"
-#include "ingen/URI.hpp"
+#include <ingen/Message.hpp>
+#include <ingen/URI.hpp>
#include <glibmm/refptr.h>
#include <gtkmm/builder.h>
diff --git a/src/gui/GraphBox.cpp b/src/gui/GraphBox.cpp
index 9efba2ee..47c567e3 100644
--- a/src/gui/GraphBox.cpp
+++ b/src/gui/GraphBox.cpp
@@ -1,6 +1,6 @@
/*
This file is part of Ingen.
- Copyright 2007-2017 David Robillard <http://drobilla.net/>
+ Copyright 2007-2024 David Robillard <http://drobilla.net/>
Ingen is free software: you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free
@@ -29,34 +29,34 @@
#include "WindowFactory.hpp"
#include "ingen_config.h"
-#include "ganv/canvas.h"
-#include "ingen/Atom.hpp"
-#include "ingen/Configuration.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "ingen/client/BlockModel.hpp"
-#include "ingen/client/ClientStore.hpp"
-#include "ingen/client/GraphModel.hpp"
-#include "ingen/client/ObjectModel.hpp"
-#include "ingen/client/PluginModel.hpp"
-#include "ingen/client/PortModel.hpp"
-#include "ingen/fmt.hpp"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
+#include <ganv/canvas.h>
+#include <ingen/Atom.hpp>
+#include <ingen/Configuration.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <ingen/client/BlockModel.hpp>
+#include <ingen/client/ClientStore.hpp>
+#include <ingen/client/GraphModel.hpp>
+#include <ingen/client/ObjectModel.hpp>
+#include <ingen/client/PluginModel.hpp>
+#include <ingen/client/PortModel.hpp>
+#include <ingen/fmt.hpp>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
#include <gdk/gdk.h>
+#include <glib.h>
#include <glib/gstdio.h>
#include <glibmm/convert.h>
#include <glibmm/fileutils.h>
#include <glibmm/miscutils.h>
#include <glibmm/propertyproxy.h>
#include <glibmm/refptr.h>
-#include <glibmm/signalproxy.h>
#include <glibmm/ustring.h>
#include <gtkmm/alignment.h>
#include <gtkmm/box.h>
@@ -92,6 +92,7 @@
# include <webkit/webkit.h>
#endif
+#include <algorithm>
#include <cassert>
#include <cstdint>
#include <cstdio>
@@ -101,7 +102,6 @@
#include <sstream>
#include <string>
#include <utility>
-#include <vector>
namespace ingen {
@@ -383,14 +383,14 @@ GraphBox::set_graph(const std::shared_ptr<const GraphModel>& graph,
_menu_view_control_window->property_sensitive() = false;
- for (const auto& p : graph->ports()) {
- if (_app->can_control(p.get())) {
- _menu_view_control_window->property_sensitive() = true;
- break;
- }
- }
+ _menu_view_control_window->property_sensitive() =
+ std::any_of(graph->ports().begin(),
+ graph->ports().end(),
+ [this](const auto& p) {
+ return _app->can_control(p.get());
+ });
- _menu_parent->property_sensitive() = bool(graph->parent());
+ _menu_parent->property_sensitive() = !!graph->parent();
new_port_connection = graph->signal_new_port().connect(
sigc::mem_fun(this, &GraphBox::graph_port_added));
@@ -426,14 +426,12 @@ GraphBox::graph_port_removed(const std::shared_ptr<const PortModel>& port)
return;
}
- for (const auto& p : _graph->ports()) {
- if (p->is_input() && _app->can_control(p.get())) {
- _menu_view_control_window->property_sensitive() = true;
- return;
- }
- }
-
- _menu_view_control_window->property_sensitive() = false;
+ _menu_view_control_window->property_sensitive() =
+ std::any_of(_graph->ports().begin(),
+ _graph->ports().end(),
+ [this](const auto& p) {
+ return p->is_input() && _app->can_control(p.get());
+ });
}
void
@@ -886,10 +884,10 @@ GraphBox::event_refresh_activated()
void
GraphBox::event_fullscreen_toggled()
{
- // FIXME: ugh, use GTK signals to track state and know for sure
- static bool is_fullscreen = false;
-
if (_window) {
+ // FIXME: ugh, use GTK signals to track state and know for sure
+ static bool is_fullscreen = false;
+
if (!is_fullscreen) {
_window->fullscreen();
is_fullscreen = true;
@@ -931,8 +929,7 @@ GraphBox::event_animate_signals_toggled()
_app->interface()->set_property(
URI("ingen:/clients/this"),
_app->uris().ingen_broadcast,
- _app->forge().make(
- static_cast<bool>(_menu_animate_signals->get_active())));
+ _app->forge().make(_menu_animate_signals->get_active()));
}
void
diff --git a/src/gui/GraphBox.hpp b/src/gui/GraphBox.hpp
index cfc4a67f..07962a3d 100644
--- a/src/gui/GraphBox.hpp
+++ b/src/gui/GraphBox.hpp
@@ -17,7 +17,7 @@
#ifndef INGEN_GUI_GRAPH_BOX_HPP
#define INGEN_GUI_GRAPH_BOX_HPP
-#include "ingen/ingen.h"
+#include <ingen/ingen.h>
#include <gdk/gdk.h>
#include <glibmm/ustring.h>
diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp
index 896cbf1f..3090186a 100644
--- a/src/gui/GraphCanvas.cpp
+++ b/src/gui/GraphCanvas.cpp
@@ -28,46 +28,48 @@
#include "WidgetFactory.hpp"
#include "WindowFactory.hpp"
-#include "ganv/Canvas.hpp"
-#include "ganv/Edge.hpp"
-#include "ganv/Module.hpp"
-#include "ganv/Node.hpp"
-#include "ganv/Port.hpp"
-#include "ganv/canvas.h"
-#include "ganv/edge.h"
-#include "ganv/module.h"
-#include "ganv/types.h"
-#include "ingen/Arc.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/ClashAvoider.hpp"
-#include "ingen/Configuration.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/Node.hpp"
-#include "ingen/Parser.hpp"
-#include "ingen/Serialiser.hpp"
-#include "ingen/Store.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "ingen/client/ArcModel.hpp"
-#include "ingen/client/BlockModel.hpp"
-#include "ingen/client/ClientStore.hpp"
-#include "ingen/client/GraphModel.hpp"
-#include "ingen/client/ObjectModel.hpp"
-#include "ingen/client/PluginModel.hpp"
-#include "ingen/client/PortModel.hpp"
-#include "ingen/paths.hpp"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
-#include "sord/sordmm.hpp"
+#include <ganv/Canvas.hpp>
+#include <ganv/Edge.hpp>
+#include <ganv/Module.hpp>
+#include <ganv/Node.hpp>
+#include <ganv/Port.hpp>
+#include <ganv/canvas.h>
+#include <ganv/edge.h>
+#include <ganv/module.h>
+#include <ganv/types.h>
+#include <ingen/Arc.hpp>
+#include <ingen/Atom.hpp>
+#include <ingen/ClashAvoider.hpp>
+#include <ingen/Configuration.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/Node.hpp>
+#include <ingen/Parser.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/Serialiser.hpp>
+#include <ingen/Store.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <ingen/client/ArcModel.hpp>
+#include <ingen/client/BlockModel.hpp>
+#include <ingen/client/ClientStore.hpp>
+#include <ingen/client/GraphModel.hpp>
+#include <ingen/client/ObjectModel.hpp>
+#include <ingen/client/PluginModel.hpp>
+#include <ingen/client/PortModel.hpp>
+#include <ingen/paths.hpp>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
+#include <sord/sordmm.hpp>
#include <gdk/gdk.h>
#include <gdk/gdkkeysyms-compat.h>
#include <gdkmm/window.h>
#include <glib.h>
#include <glibmm/refptr.h>
-#include <glibmm/signalproxy.h>
#include <glibmm/ustring.h>
#include <gtkmm/builder.h>
#include <gtkmm/checkmenuitem.h>
@@ -80,6 +82,7 @@
#include <gtkmm/menuitem.h>
#include <gtkmm/object.h>
#include <gtkmm/stock.h>
+#include <gtkmm/stockid.h>
#include <sigc++/adaptors/bind.h>
#include <sigc++/functors/mem_fun.h>
#include <sigc++/signal.h>
@@ -250,7 +253,7 @@ GraphCanvas::build_menus()
_menu->reorder_child(*internal_menu_item, 4);
}
- // Build skeleton LV2 plugin class heirarchy for 'Plugin' menu
+ // Build skeleton LV2 plugin class hierarchy for 'Plugin' menu
if (_plugin_menu) {
_plugin_menu->clear();
} else {
@@ -266,7 +269,7 @@ GraphCanvas::build_menus()
sigc::mem_fun(this, &GraphCanvas::load_plugin));
}
- // Add known plugins to menu heirarchy
+ // Add known plugins to menu hierarchy
auto plugins = _app.store()->plugins();
for (const auto& p : *plugins) {
add_plugin(p.second);
@@ -611,14 +614,14 @@ destroy_node(GanvNode* node, void* data)
return;
}
- App* app = static_cast<App*>(data);
+ const App* app = static_cast<App*>(data);
Ganv::Module* module = Glib::wrap(GANV_MODULE(node));
- auto* node_module = dynamic_cast<NodeModule*>(module);
+ const auto* node_module = dynamic_cast<NodeModule*>(module);
if (node_module) {
app->interface()->del(node_module->block()->uri());
} else {
- auto* port_module = dynamic_cast<GraphPortModule*>(module);
+ const auto* port_module = dynamic_cast<GraphPortModule*>(module);
if (port_module &&
strcmp(port_module->port()->path().symbol(), "control") &&
strcmp(port_module->port()->path().symbol(), "notify")) {
@@ -630,11 +633,11 @@ destroy_node(GanvNode* node, void* data)
static void
destroy_arc(GanvEdge* arc, void* data)
{
- App* app = static_cast<App*>(data);
+ const App* app = static_cast<App*>(data);
Ganv::Edge* arcmm = Glib::wrap(arc);
- Port* tail = dynamic_cast<Port*>(arcmm->get_tail());
- Port* head = dynamic_cast<Port*>(arcmm->get_head());
+ const Port* tail = dynamic_cast<Port*>(arcmm->get_tail());
+ const Port* head = dynamic_cast<Port*>(arcmm->get_head());
app->interface()->disconnect(tail->model()->path(), head->model()->path());
}
@@ -659,12 +662,12 @@ serialise_node(GanvNode* node, void* data)
}
Ganv::Module* module = Glib::wrap(GANV_MODULE(node));
- auto* node_module = dynamic_cast<NodeModule*>(module);
+ const auto* node_module = dynamic_cast<NodeModule*>(module);
if (node_module) {
serialiser->serialise(node_module->block());
} else {
- auto* port_module = dynamic_cast<GraphPortModule*>(module);
+ const auto* port_module = dynamic_cast<GraphPortModule*>(module);
if (port_module) {
serialiser->serialise(port_module->port());
}
@@ -679,7 +682,7 @@ serialise_arc(GanvEdge* arc, void* data)
return;
}
- auto* garc = dynamic_cast<gui::Arc*>(Glib::wrap(GANV_EDGE(arc)));
+ const auto* garc = dynamic_cast<gui::Arc*>(Glib::wrap(GANV_EDGE(arc)));
if (garc) {
serialiser->serialise_arc(Sord::Node(), garc->model());
}
@@ -735,7 +738,7 @@ GraphCanvas::paste()
if (base_uri) {
std::string base = *base_uri;
if (base[base.size() - 1] == '/') {
- base = base.substr(0, base.size() - 1);
+ base.resize(base.size() - 1);
}
copy_root = uri_to_path(URI(base));
}
@@ -875,7 +878,7 @@ GraphCanvas::menu_add_port(const string& sym_base,
uris.rdf_type,
Property(is_output ? uris.lv2_OutputPort : uris.lv2_InputPort));
props.emplace(uris.lv2_index,
- _app.forge().make(int32_t(_graph->num_ports())));
+ _app.forge().make(static_cast<int32_t>(_graph->num_ports())));
props.emplace(uris.lv2_name, _app.forge().alloc(name.c_str()));
_app.interface()->put(path_to_uri(path), props);
}
diff --git a/src/gui/GraphCanvas.hpp b/src/gui/GraphCanvas.hpp
index 3ebd61df..38f3ab08 100644
--- a/src/gui/GraphCanvas.hpp
+++ b/src/gui/GraphCanvas.hpp
@@ -17,12 +17,12 @@
#ifndef INGEN_GUI_GRAPHCANVAS_HPP
#define INGEN_GUI_GRAPHCANVAS_HPP
-#include "ganv/Canvas.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/URI.hpp"
-#include "lilv/lilv.h"
-#include "raul/Path.hpp"
+#include <ganv/Canvas.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/URI.hpp>
+#include <lilv/lilv.h>
+#include <raul/Path.hpp>
#include <gdk/gdk.h>
diff --git a/src/gui/GraphPortModule.cpp b/src/gui/GraphPortModule.cpp
index ccbfbebf..cd471d97 100644
--- a/src/gui/GraphPortModule.cpp
+++ b/src/gui/GraphPortModule.cpp
@@ -20,17 +20,18 @@
#include "GraphCanvas.hpp"
#include "Port.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "raul/Symbol.hpp"
-
-#include "ingen/Configuration.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/client/GraphModel.hpp" // IWYU pragma: keep
-#include "ingen/client/PortModel.hpp"
+#include <ganv/Module.hpp>
+#include <ingen/Atom.hpp>
+#include <ingen/Configuration.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <ingen/client/GraphModel.hpp>
+#include <ingen/client/PortModel.hpp>
+#include <raul/Symbol.hpp>
#include <sigc++/functors/mem_fun.h>
#include <sigc++/signal.h>
diff --git a/src/gui/GraphPortModule.hpp b/src/gui/GraphPortModule.hpp
index 56b4521a..a8091f38 100644
--- a/src/gui/GraphPortModule.hpp
+++ b/src/gui/GraphPortModule.hpp
@@ -17,8 +17,8 @@
#ifndef INGEN_GUI_GRAPHPORTMODULE_HPP
#define INGEN_GUI_GRAPHPORTMODULE_HPP
-#include "ganv/Module.hpp"
-#include "ingen/URI.hpp"
+#include <ganv/Module.hpp>
+#include <ingen/URI.hpp>
#include <gdk/gdk.h>
#include <glib.h>
diff --git a/src/gui/GraphTreeWindow.cpp b/src/gui/GraphTreeWindow.cpp
index b6c55b24..1d141271 100644
--- a/src/gui/GraphTreeWindow.cpp
+++ b/src/gui/GraphTreeWindow.cpp
@@ -20,19 +20,19 @@
#include "Window.hpp"
#include "WindowFactory.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/client/ClientStore.hpp"
-#include "ingen/client/GraphModel.hpp"
-#include "ingen/client/ObjectModel.hpp"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/client/ClientStore.hpp>
+#include <ingen/client/GraphModel.hpp>
+#include <ingen/client/ObjectModel.hpp>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
#include <glibmm/propertyproxy.h>
-#include <glibmm/signalproxy.h>
#include <gtkmm/builder.h>
#include <gtkmm/cellrenderer.h>
#include <gtkmm/cellrenderertoggle.h>
@@ -47,6 +47,7 @@
#include <cassert>
#include <cstdint>
#include <memory>
+#include <string>
namespace ingen {
@@ -217,7 +218,7 @@ GraphTreeWindow::event_graph_enabled_toggled(const Glib::ustring& path_str)
if (_enable_signal) {
_app->set_property(pm->uri(),
_app->uris().ingen_enabled,
- _app->forge().make(static_cast<bool>(!pm->enabled())));
+ _app->forge().make(!pm->enabled()));
}
}
diff --git a/src/gui/GraphTreeWindow.hpp b/src/gui/GraphTreeWindow.hpp
index 16eb4647..6f33f258 100644
--- a/src/gui/GraphTreeWindow.hpp
+++ b/src/gui/GraphTreeWindow.hpp
@@ -19,7 +19,7 @@
#include "Window.hpp"
-#include "ingen/URI.hpp"
+#include <ingen/URI.hpp>
#include <gdk/gdk.h>
#include <glibmm/refptr.h>
diff --git a/src/gui/GraphView.cpp b/src/gui/GraphView.cpp
index 969e0add..8d1e1777 100644
--- a/src/gui/GraphView.cpp
+++ b/src/gui/GraphView.cpp
@@ -20,16 +20,15 @@
#include "GraphCanvas.hpp"
#include "WidgetFactory.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/client/GraphModel.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/client/GraphModel.hpp>
#include <glibmm/propertyproxy.h>
#include <glibmm/refptr.h>
-#include <glibmm/signalproxy.h>
#include <gtkmm/adjustment.h>
#include <gtkmm/builder.h>
#include <gtkmm/enums.h>
@@ -46,6 +45,7 @@
#include <cstdint>
#include <map>
#include <memory>
+#include <string>
#include <utility>
namespace ingen {
@@ -143,8 +143,7 @@ GraphView::process_toggled()
_app->set_property(_graph->uri(),
_app->uris().ingen_enabled,
- _app->forge().make(
- static_cast<bool>(_process_but->get_active())));
+ _app->forge().make(_process_but->get_active()));
}
void
diff --git a/src/gui/GraphView.hpp b/src/gui/GraphView.hpp
index 0b6aee1e..812f2cbc 100644
--- a/src/gui/GraphView.hpp
+++ b/src/gui/GraphView.hpp
@@ -48,7 +48,7 @@ namespace gui {
class App;
class GraphCanvas;
-/** The graph specific contents of a GraphWindow (ie the canvas and whatever else).
+/** The graph specific contents of a GraphWindow (the canvas and whatever else).
*
* \ingroup GUI
*/
diff --git a/src/gui/GraphWindow.hpp b/src/gui/GraphWindow.hpp
index 05c555a5..9936b5df 100644
--- a/src/gui/GraphWindow.hpp
+++ b/src/gui/GraphWindow.hpp
@@ -44,8 +44,6 @@ class PortModel;
namespace gui {
-class App;
-
/** A window for a graph.
*
* \ingroup GUI
diff --git a/src/gui/LoadGraphWindow.cpp b/src/gui/LoadGraphWindow.cpp
index c9c18ae9..5124face 100644
--- a/src/gui/LoadGraphWindow.cpp
+++ b/src/gui/LoadGraphWindow.cpp
@@ -19,24 +19,24 @@
#include "App.hpp"
#include "ThreadedLoader.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Configuration.hpp"
-#include "ingen/FilePath.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "ingen/client/ClientStore.hpp"
-#include "ingen/client/GraphModel.hpp"
-#include "ingen/runtime_paths.hpp"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Configuration.hpp>
+#include <ingen/FilePath.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <ingen/client/ClientStore.hpp>
+#include <ingen/client/GraphModel.hpp>
+#include <ingen/runtime_paths.hpp>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
#include <glibmm/fileutils.h>
#include <glibmm/miscutils.h>
#include <glibmm/propertyproxy.h>
#include <glibmm/refptr.h>
-#include <glibmm/signalproxy.h>
#include <glibmm/slisthandle.h>
#include <gtkmm/builder.h>
#include <gtkmm/button.h>
@@ -238,7 +238,7 @@ raul::Symbol
LoadGraphWindow::symbol_from_filename(const Glib::ustring& filename)
{
std::string symbol_str = Glib::path_get_basename(get_filename());
- symbol_str = symbol_str.substr(0, symbol_str.find('.'));
+ symbol_str.resize(symbol_str.find('.'));
return raul::Symbol::symbolify(symbol_str);
}
diff --git a/src/gui/LoadGraphWindow.hpp b/src/gui/LoadGraphWindow.hpp
index adb6bce1..bfa2590e 100644
--- a/src/gui/LoadGraphWindow.hpp
+++ b/src/gui/LoadGraphWindow.hpp
@@ -17,8 +17,8 @@
#ifndef INGEN_GUI_LOADGRAPHWINDOW_HPP
#define INGEN_GUI_LOADGRAPHWINDOW_HPP
-#include "ingen/Properties.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/Properties.hpp>
+#include <raul/Symbol.hpp>
#include <glibmm/ustring.h>
#include <gtkmm/filechooserdialog.h>
diff --git a/src/gui/LoadPluginWindow.cpp b/src/gui/LoadPluginWindow.cpp
index 6a4d998c..3d8b2cd5 100644
--- a/src/gui/LoadPluginWindow.cpp
+++ b/src/gui/LoadPluginWindow.cpp
@@ -19,22 +19,23 @@
#include "App.hpp"
#include "Window.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/client/ClientStore.hpp"
-#include "ingen/client/GraphModel.hpp"
-#include "ingen/client/PluginModel.hpp"
-#include "ingen/paths.hpp"
-#include "lilv/lilv.h"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/client/ClientStore.hpp>
+#include <ingen/client/GraphModel.hpp>
+#include <ingen/client/PluginModel.hpp>
+#include <ingen/paths.hpp>
+#include <lilv/lilv.h>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
#include <gdk/gdkkeysyms-compat.h>
#include <glibmm/listhandle.h>
#include <glibmm/propertyproxy.h>
-#include <glibmm/signalproxy.h>
#include <glibmm/ustring.h>
#include <gtkmm/builder.h>
#include <gtkmm/button.h>
@@ -42,7 +43,9 @@
#include <gtkmm/combobox.h>
#include <gtkmm/enums.h>
#include <gtkmm/messagedialog.h>
+#include <gtkmm/object.h>
#include <gtkmm/treeiter.h>
+#include <gtkmm/treepath.h>
#include <gtkmm/treeview.h>
#include <gtkmm/treeviewcolumn.h>
#include <gtkmm/window.h>
diff --git a/src/gui/LoadPluginWindow.hpp b/src/gui/LoadPluginWindow.hpp
index 2f98b3ae..eab48913 100644
--- a/src/gui/LoadPluginWindow.hpp
+++ b/src/gui/LoadPluginWindow.hpp
@@ -19,9 +19,9 @@
#include "Window.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/client/ClientStore.hpp"
+#include <ingen/Properties.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/client/ClientStore.hpp>
#include <gdk/gdk.h>
#include <glibmm/refptr.h>
diff --git a/src/gui/MessagesWindow.cpp b/src/gui/MessagesWindow.cpp
index db32af91..993fbb33 100644
--- a/src/gui/MessagesWindow.cpp
+++ b/src/gui/MessagesWindow.cpp
@@ -20,12 +20,12 @@
#include "Window.hpp"
#include "ingen_config.h"
-#include "ingen/URIs.hpp"
-#include "lv2/urid/urid.h"
+#include <ingen/URIs.hpp>
+#include <lv2/urid/urid.h>
#include <gdkmm/color.h>
#include <glibmm/propertyproxy.h>
-#include <glibmm/signalproxy.h>
+#include <glibmm/ustring.h>
#include <gtkmm/builder.h>
#include <gtkmm/button.h>
#include <gtkmm/enums.h>
diff --git a/src/gui/MessagesWindow.hpp b/src/gui/MessagesWindow.hpp
index 27b6a417..0a70e76c 100644
--- a/src/gui/MessagesWindow.hpp
+++ b/src/gui/MessagesWindow.hpp
@@ -19,7 +19,7 @@
#include "Window.hpp"
-#include "lv2/urid/urid.h"
+#include <lv2/urid/urid.h>
#include <glibmm/refptr.h>
#include <gtkmm/texttag.h>
@@ -38,8 +38,6 @@ class TextView;
namespace ingen::gui {
-class App;
-
/** Messages Window.
*
* Loaded from XML as a derived object.
diff --git a/src/gui/NewSubgraphWindow.cpp b/src/gui/NewSubgraphWindow.cpp
index f10f8049..3d6bf019 100644
--- a/src/gui/NewSubgraphWindow.cpp
+++ b/src/gui/NewSubgraphWindow.cpp
@@ -19,20 +19,20 @@
#include "App.hpp"
#include "Window.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/client/ClientStore.hpp"
-#include "ingen/client/GraphModel.hpp"
-#include "ingen/paths.hpp"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/client/ClientStore.hpp>
+#include <ingen/client/GraphModel.hpp>
+#include <ingen/paths.hpp>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
#include <glibmm/propertyproxy.h>
#include <glibmm/refptr.h>
-#include <glibmm/signalproxy.h>
#include <glibmm/ustring.h>
#include <gtkmm/adjustment.h>
#include <gtkmm/builder.h>
@@ -118,8 +118,8 @@ NewSubgraphWindow::ok_clicked()
// Create graph
Properties props;
props.emplace(_app->uris().rdf_type, Property(_app->uris().ingen_Graph));
- props.emplace(_app->uris().ingen_polyphony, _app->forge().make(int32_t(poly)));
- props.emplace(_app->uris().ingen_enabled, _app->forge().make(bool(true)));
+ props.emplace(_app->uris().ingen_polyphony, _app->forge().make(static_cast<int32_t>(poly)));
+ props.emplace(_app->uris().ingen_enabled, _app->forge().make(true));
_app->interface()->put(
path_to_uri(path), props, Resource::Graph::INTERNAL);
diff --git a/src/gui/NewSubgraphWindow.hpp b/src/gui/NewSubgraphWindow.hpp
index acb6c977..b0fb24d2 100644
--- a/src/gui/NewSubgraphWindow.hpp
+++ b/src/gui/NewSubgraphWindow.hpp
@@ -19,7 +19,7 @@
#include "Window.hpp"
-#include "ingen/Properties.hpp"
+#include <ingen/Properties.hpp>
#include <memory>
diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp
index 0b511fc1..2815194c 100644
--- a/src/gui/NodeMenu.cpp
+++ b/src/gui/NodeMenu.cpp
@@ -1,6 +1,6 @@
/*
This file is part of Ingen.
- Copyright 2007-2015 David Robillard <http://drobilla.net/>
+ Copyright 2007-2024 David Robillard <http://drobilla.net/>
Ingen is free software: you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free
@@ -19,22 +19,22 @@
#include "App.hpp"
#include "ObjectMenu.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/client/BlockModel.hpp"
-#include "ingen/client/ObjectModel.hpp"
-#include "ingen/client/PluginModel.hpp"
-#include "ingen/client/PortModel.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/client/BlockModel.hpp>
+#include <ingen/client/ObjectModel.hpp>
+#include <ingen/client/PluginModel.hpp>
+#include <ingen/client/PortModel.hpp>
+#include <raul/Symbol.hpp>
#include <glib.h>
#include <glibmm/convert.h>
#include <glibmm/miscutils.h>
#include <glibmm/refptr.h>
-#include <glibmm/signalproxy.h>
#include <glibmm/ustring.h>
#include <gtkmm/box.h>
#include <gtkmm/builder.h>
@@ -52,9 +52,11 @@
#include <gtkmm/object.h>
#include <gtkmm/separatormenuitem.h>
#include <gtkmm/stock.h>
+#include <gtkmm/stockid.h>
#include <sigc++/adaptors/bind.h>
#include <sigc++/functors/mem_fun.h>
+#include <algorithm>
#include <cstdint>
#include <map>
#include <memory>
@@ -189,7 +191,7 @@ NodeMenu::on_menu_enabled()
{
_app->set_property(_object->uri(),
_app->uris().ingen_enabled,
- _app->forge().make(bool(_enabled_menuitem->get_active())));
+ _app->forge().make(_enabled_menuitem->get_active()));
}
void
@@ -205,7 +207,7 @@ NodeMenu::on_menu_randomize()
bm->port_value_range(p, min, max, _app->sample_rate());
const auto r = static_cast<float>(g_random_double_range(0.0, 1.0));
- const float val = r * (max - min) + min;
+ const float val = (r * (max - min)) + min;
_app->set_property(p->uri(),
_app->uris().ingen_value,
_app->forge().make(val));
@@ -273,13 +275,11 @@ NodeMenu::on_preset_activated(const std::string& uri)
bool
NodeMenu::has_control_inputs()
{
- for (const auto& p : block()->ports()) {
- if (p->is_input() && p->is_numeric()) {
- return true;
- }
- }
-
- return false;
+ return std::any_of(block()->ports().begin(),
+ block()->ports().end(),
+ [](const auto& p) {
+ return p->is_input() && p->is_numeric();
+ });
}
} // namespace ingen::gui
diff --git a/src/gui/NodeMenu.hpp b/src/gui/NodeMenu.hpp
index 7168bc7a..0427672c 100644
--- a/src/gui/NodeMenu.hpp
+++ b/src/gui/NodeMenu.hpp
@@ -19,7 +19,7 @@
#include "ObjectMenu.hpp"
-#include "ingen/URI.hpp"
+#include <ingen/URI.hpp>
#include <sigc++/connection.h>
#include <sigc++/signal.h>
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index 223c0832..deb8fe52 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -27,27 +27,28 @@
#include "WindowFactory.hpp"
#include "ingen_config.h"
-#include "ganv/Port.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Configuration.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "ingen/client/BlockModel.hpp"
-#include "ingen/client/GraphModel.hpp" // IWYU pragma: keep
-#include "ingen/client/PluginModel.hpp"
-#include "ingen/client/PluginUI.hpp"
-#include "ingen/client/PortModel.hpp"
-#include "lv2/atom/util.h"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
+#include <ganv/Module.hpp>
+#include <ganv/Port.hpp>
+#include <ingen/Atom.hpp>
+#include <ingen/Configuration.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <ingen/client/BlockModel.hpp>
+#include <ingen/client/GraphModel.hpp>
+#include <ingen/client/PluginModel.hpp>
+#include <ingen/client/PluginUI.hpp>
+#include <ingen/client/PortModel.hpp>
+#include <lv2/atom/util.h>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
#include <glibmm/main.h>
-#include <glibmm/signalproxy.h>
#include <glibmm/ustring.h>
#include <gtkmm/container.h>
#include <gtkmm/eventbox.h>
@@ -56,6 +57,7 @@
#include <sigc++/adaptors/bind.h>
#include <sigc++/adaptors/retype_return.h>
#include <sigc++/functors/mem_fun.h>
+#include <sigc++/functors/slot.h>
#include <sigc++/signal.h>
#include <cassert>
diff --git a/src/gui/NodeModule.hpp b/src/gui/NodeModule.hpp
index 226dccd1..64ad8f66 100644
--- a/src/gui/NodeModule.hpp
+++ b/src/gui/NodeModule.hpp
@@ -17,8 +17,8 @@
#ifndef INGEN_GUI_NODEMODULE_HPP
#define INGEN_GUI_NODEMODULE_HPP
-#include "ganv/Module.hpp"
-#include "ingen/URI.hpp"
+#include <ganv/Module.hpp>
+#include <ingen/URI.hpp>
#include <gdk/gdk.h>
#include <glib.h>
diff --git a/src/gui/ObjectMenu.cpp b/src/gui/ObjectMenu.cpp
index 56055d1c..8c41ff10 100644
--- a/src/gui/ObjectMenu.cpp
+++ b/src/gui/ObjectMenu.cpp
@@ -19,15 +19,15 @@
#include "App.hpp"
#include "WindowFactory.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/client/ObjectModel.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/client/ObjectModel.hpp>
#include <glibmm/refptr.h>
-#include <glibmm/signalproxy.h>
#include <gtkmm/builder.h>
#include <gtkmm/checkmenuitem.h>
#include <gtkmm/menuitem.h>
@@ -118,7 +118,7 @@ ObjectMenu::on_menu_polyphonic()
_app->set_property(
_object->uri(),
_app->uris().ingen_polyphonic,
- _app->forge().make(bool(_polyphonic_menuitem->get_active())));
+ _app->forge().make(_polyphonic_menuitem->get_active()));
}
}
diff --git a/src/gui/ObjectMenu.hpp b/src/gui/ObjectMenu.hpp
index de105364..5a4c83f4 100644
--- a/src/gui/ObjectMenu.hpp
+++ b/src/gui/ObjectMenu.hpp
@@ -17,7 +17,7 @@
#ifndef INGEN_GUI_OBJECTMENU_HPP
#define INGEN_GUI_OBJECTMENU_HPP
-#include "ingen/URI.hpp"
+#include <ingen/URI.hpp>
#include <gtkmm/menu.h>
diff --git a/src/gui/PluginMenu.cpp b/src/gui/PluginMenu.cpp
index 53917b1e..26bbed08 100644
--- a/src/gui/PluginMenu.cpp
+++ b/src/gui/PluginMenu.cpp
@@ -16,11 +16,11 @@
#include "PluginMenu.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "ingen/client/PluginModel.hpp"
-#include "lilv/lilv.h"
+#include <ingen/Log.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <ingen/client/PluginModel.hpp>
+#include <lilv/lilv.h>
#include <glibmm/ustring.h>
#include <gtkmm/menu_elems.h>
diff --git a/src/gui/PluginMenu.hpp b/src/gui/PluginMenu.hpp
index b2c75ffe..eb0a565a 100644
--- a/src/gui/PluginMenu.hpp
+++ b/src/gui/PluginMenu.hpp
@@ -17,7 +17,7 @@
#ifndef INGEN_GUI_PLUGINMENU_HPP
#define INGEN_GUI_PLUGINMENU_HPP
-#include "lilv/lilv.h"
+#include <lilv/lilv.h>
#include <gtkmm/menu.h>
#include <sigc++/signal.h>
@@ -50,7 +50,7 @@ namespace gui {
class PluginMenu : public Gtk::Menu
{
public:
- PluginMenu(ingen::World& world);
+ explicit PluginMenu(ingen::World& world);
void clear();
void add_plugin(const std::shared_ptr<client::PluginModel>& p);
diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp
index 7b5988b7..4d11e309 100644
--- a/src/gui/Port.cpp
+++ b/src/gui/Port.cpp
@@ -27,26 +27,27 @@
#include "ingen_config.h"
#include "rgba.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Configuration.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIMap.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "ingen/client/BlockModel.hpp"
-#include "ingen/client/GraphModel.hpp" // IWYU pragma: keep
-#include "ingen/client/ObjectModel.hpp"
-#include "ingen/client/PluginModel.hpp"
-#include "ingen/client/PortModel.hpp"
-#include "lilv/lilv.h"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
-#include "sord/sordmm.hpp"
-
-#include <glibmm/signalproxy.h>
+#include <ganv/Port.hpp>
+#include <ingen/Atom.hpp>
+#include <ingen/Configuration.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIMap.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <ingen/client/BlockModel.hpp>
+#include <ingen/client/GraphModel.hpp>
+#include <ingen/client/ObjectModel.hpp>
+#include <ingen/client/PluginModel.hpp>
+#include <ingen/client/PortModel.hpp>
+#include <lilv/lilv.h>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
+#include <sord/sordmm.hpp>
+
+#include <glibmm/ustring.h>
#include <gtkmm/menu.h>
#include <gtkmm/menu_elems.h>
#include <gtkmm/menuitem.h>
@@ -229,7 +230,7 @@ Port::on_value_changed(double value)
return; // No change
}
- const Atom atom = _app.forge().make(float(value));
+ const Atom atom = _app.forge().make(static_cast<float>(value));
_app.set_property(model()->uri(),
_app.world().uris().ingen_value,
atom);
diff --git a/src/gui/Port.hpp b/src/gui/Port.hpp
index 8e8077bc..bfd8e15d 100644
--- a/src/gui/Port.hpp
+++ b/src/gui/Port.hpp
@@ -17,7 +17,7 @@
#ifndef INGEN_GUI_PORT_HPP
#define INGEN_GUI_PORT_HPP
-#include "ganv/Port.hpp"
+#include <ganv/Port.hpp>
#include <gdk/gdk.h>
#include <glib.h>
diff --git a/src/gui/PortMenu.cpp b/src/gui/PortMenu.cpp
index 95ba88dc..373425cf 100644
--- a/src/gui/PortMenu.cpp
+++ b/src/gui/PortMenu.cpp
@@ -19,23 +19,22 @@
#include "App.hpp"
#include "ObjectMenu.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/client/BlockModel.hpp"
-#include "ingen/client/GraphModel.hpp" // IWYU pragma: keep
-#include "ingen/client/ObjectModel.hpp"
-#include "ingen/client/PortModel.hpp"
-#include "ingen/paths.hpp"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/client/BlockModel.hpp>
+#include <ingen/client/GraphModel.hpp>
+#include <ingen/client/ObjectModel.hpp>
+#include <ingen/client/PortModel.hpp>
+#include <ingen/paths.hpp>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
#include <glibmm/refptr.h>
-#include <glibmm/signalproxy.h>
#include <gtkmm/builder.h>
#include <gtkmm/checkmenuitem.h>
#include <gtkmm/menu.h>
diff --git a/src/gui/PropertiesWindow.cpp b/src/gui/PropertiesWindow.cpp
index 958a73c9..0dde0ab2 100644
--- a/src/gui/PropertiesWindow.cpp
+++ b/src/gui/PropertiesWindow.cpp
@@ -21,23 +21,25 @@
#include "URIEntry.hpp"
#include "Window.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/URIMap.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "ingen/client/ObjectModel.hpp"
-#include "lilv/lilv.h"
-#include "lv2/urid/urid.h"
-#include "raul/Path.hpp"
-#include "sord/sordmm.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIMap.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <ingen/client/ObjectModel.hpp>
+#include <lilv/lilv.h>
+#include <lv2/urid/urid.h>
+#include <raul/Path.hpp>
+#include <sord/sordmm.hpp>
#include <glibmm/containers.h>
#include <glibmm/propertyproxy.h>
-#include <glibmm/signalproxy.h>
#include <glibmm/ustring.h>
+#include <gtk/gtk.h>
#include <gtkmm/alignment.h>
#include <gtkmm/bin.h>
#include <gtkmm/box.h>
diff --git a/src/gui/PropertiesWindow.hpp b/src/gui/PropertiesWindow.hpp
index 3210ceaa..e788d140 100644
--- a/src/gui/PropertiesWindow.hpp
+++ b/src/gui/PropertiesWindow.hpp
@@ -19,9 +19,9 @@
#include "Window.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/URI.hpp"
-#include "lv2/urid/urid.h"
+#include <ingen/Atom.hpp>
+#include <ingen/URI.hpp>
+#include <lv2/urid/urid.h>
#include <glibmm/refptr.h>
#include <gtkmm/liststore.h>
diff --git a/src/gui/RDFS.cpp b/src/gui/RDFS.cpp
index 64aa893b..09af81af 100644
--- a/src/gui/RDFS.cpp
+++ b/src/gui/RDFS.cpp
@@ -14,16 +14,17 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/Forge.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "ingen/client/ObjectModel.hpp"
-#include "lilv/lilv.h"
-
#include "RDFS.hpp"
+#include <ingen/Forge.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <ingen/client/ObjectModel.hpp>
+#include <lilv/lilv.h>
+
#include <utility>
namespace ingen::gui::rdfs {
diff --git a/src/gui/RDFS.hpp b/src/gui/RDFS.hpp
index ad4e22e8..e4c2b673 100644
--- a/src/gui/RDFS.hpp
+++ b/src/gui/RDFS.hpp
@@ -17,8 +17,8 @@
#ifndef INGEN_GUI_RDF_HPP
#define INGEN_GUI_RDF_HPP
-#include "ingen/URI.hpp"
-#include "lilv/lilv.h"
+#include <ingen/URI.hpp>
+#include <lilv/lilv.h>
#include <map>
#include <memory>
diff --git a/src/gui/RenameWindow.cpp b/src/gui/RenameWindow.cpp
index 66d8e918..569baea8 100644
--- a/src/gui/RenameWindow.cpp
+++ b/src/gui/RenameWindow.cpp
@@ -19,19 +19,18 @@
#include "App.hpp"
#include "Window.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/client/ClientStore.hpp"
-#include "ingen/client/ObjectModel.hpp"
-#include "ingen/paths.hpp"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/client/ClientStore.hpp>
+#include <ingen/client/ObjectModel.hpp>
+#include <ingen/paths.hpp>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
#include <glibmm/propertyproxy.h>
#include <glibmm/refptr.h>
-#include <glibmm/signalproxy.h>
#include <glibmm/ustring.h>
#include <gtkmm/builder.h>
#include <gtkmm/button.h>
diff --git a/src/gui/Style.cpp b/src/gui/Style.cpp
index 9a9e7478..f1f1b12b 100644
--- a/src/gui/Style.cpp
+++ b/src/gui/Style.cpp
@@ -18,8 +18,8 @@
#include "App.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/client/PortModel.hpp"
+#include <ingen/URIs.hpp>
+#include <ingen/client/PortModel.hpp>
#include <string>
diff --git a/src/gui/SubgraphModule.cpp b/src/gui/SubgraphModule.cpp
index fee602b5..a1b14bb6 100644
--- a/src/gui/SubgraphModule.cpp
+++ b/src/gui/SubgraphModule.cpp
@@ -20,16 +20,17 @@
#include "NodeModule.hpp"
#include "WindowFactory.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/client/BlockModel.hpp"
-#include "ingen/client/GraphModel.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/client/BlockModel.hpp>
+#include <ingen/client/GraphModel.hpp>
#include <cassert>
#include <memory>
+#include <utility>
namespace ingen {
diff --git a/src/gui/ThreadedLoader.cpp b/src/gui/ThreadedLoader.cpp
index 4cd382a0..abbedbaf 100644
--- a/src/gui/ThreadedLoader.cpp
+++ b/src/gui/ThreadedLoader.cpp
@@ -18,14 +18,17 @@
#include "App.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/Parser.hpp"
-#include "ingen/Serialiser.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/World.hpp"
-#include "ingen/client/GraphModel.hpp"
-#include "raul/Path.hpp"
-#include "raul/Semaphore.hpp"
+#include <ingen/FilePath.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/Parser.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Serialiser.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/World.hpp>
+#include <ingen/client/GraphModel.hpp>
+#include <raul/Path.hpp>
+#include <raul/Semaphore.hpp>
+#include <raul/Symbol.hpp>
#include <glibmm/ustring.h>
#include <sigc++/adaptors/bind.h>
diff --git a/src/gui/ThreadedLoader.hpp b/src/gui/ThreadedLoader.hpp
index 83860461..27ba7c8c 100644
--- a/src/gui/ThreadedLoader.hpp
+++ b/src/gui/ThreadedLoader.hpp
@@ -17,8 +17,8 @@
#ifndef INGEN_GUI_THREADEDLOADER_HPP
#define INGEN_GUI_THREADEDLOADER_HPP
-#include "ingen/FilePath.hpp"
-#include "raul/Semaphore.hpp"
+#include <ingen/FilePath.hpp>
+#include <raul/Semaphore.hpp>
#include <sigc++/functors/slot.h>
@@ -50,7 +50,7 @@ class App;
/** Thread for loading graph files.
*
- * This is a seperate thread so it can send all the loading message without
+ * This is a separate thread so it can send all the loading message without
* blocking everything else, so the app can respond to the incoming events
* caused as a result of the graph loading, while the graph loads.
*
@@ -88,7 +88,7 @@ private:
save_graph_event(const std::shared_ptr<const client::GraphModel>& model,
const URI& uri);
- /** Returns nothing and takes no parameters (because they have all been bound) */
+ /// Returns nothing and takes no parameters (because they're all bound)
using Closure = sigc::slot<void>;
void run();
diff --git a/src/gui/URIEntry.cpp b/src/gui/URIEntry.cpp
index fa03a05b..92320009 100644
--- a/src/gui/URIEntry.cpp
+++ b/src/gui/URIEntry.cpp
@@ -19,8 +19,9 @@
#include "App.hpp"
#include "RDFS.hpp"
-#include "ingen/World.hpp"
-#include "lilv/lilv.h"
+#include <ingen/URI.hpp>
+#include <ingen/World.hpp>
+#include <lilv/lilv.h>
#include <gdk/gdk.h>
#include <gtkmm/button.h>
diff --git a/src/gui/URIEntry.hpp b/src/gui/URIEntry.hpp
index 52c9db66..45fa6894 100644
--- a/src/gui/URIEntry.hpp
+++ b/src/gui/URIEntry.hpp
@@ -17,8 +17,8 @@
#ifndef INGEN_GUI_URI_ENTRY_HPP
#define INGEN_GUI_URI_ENTRY_HPP
-#include "ingen/URI.hpp"
-#include "lilv/lilv.h"
+#include <ingen/URI.hpp>
+#include <lilv/lilv.h>
#include <gdk/gdk.h>
#include <glibmm/signalproxy.h>
diff --git a/src/gui/WidgetFactory.cpp b/src/gui/WidgetFactory.cpp
index b2d27e90..33660d77 100644
--- a/src/gui/WidgetFactory.cpp
+++ b/src/gui/WidgetFactory.cpp
@@ -16,7 +16,7 @@
#include "WidgetFactory.hpp"
-#include "ingen/runtime_paths.hpp"
+#include <ingen/runtime_paths.hpp>
#include <cstdlib>
#include <fstream>
diff --git a/src/gui/WidgetFactory.hpp b/src/gui/WidgetFactory.hpp
index 474071ec..d10a5e1a 100644
--- a/src/gui/WidgetFactory.hpp
+++ b/src/gui/WidgetFactory.hpp
@@ -19,7 +19,7 @@
#include <glibmm/refptr.h>
#include <glibmm/ustring.h>
-#include <gtkmm/builder.h> // IWYU pragma: keep
+#include <gtkmm/builder.h>
#include <string>
diff --git a/src/gui/WindowFactory.cpp b/src/gui/WindowFactory.cpp
index 010ef704..78acf4fb 100644
--- a/src/gui/WindowFactory.cpp
+++ b/src/gui/WindowFactory.cpp
@@ -1,6 +1,6 @@
/*
This file is part of Ingen.
- Copyright 2007-2015 David Robillard <http://drobilla.net/>
+ Copyright 2007-2024 David Robillard <http://drobilla.net/>
Ingen is free software: you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free
@@ -26,17 +26,17 @@
#include "RenameWindow.hpp"
#include "WidgetFactory.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/client/BlockModel.hpp"
-#include "ingen/client/GraphModel.hpp"
-#include "ingen/client/ObjectModel.hpp"
-#include "raul/Path.hpp"
+#include <ingen/Log.hpp>
+#include <ingen/client/BlockModel.hpp>
+#include <ingen/client/GraphModel.hpp>
+#include <ingen/client/ObjectModel.hpp>
+#include <raul/Path.hpp>
#include <gdkmm/window.h>
-#include <glibmm/signalproxy.h>
#include <sigc++/adaptors/bind.h>
#include <sigc++/functors/mem_fun.h>
+#include <algorithm>
#include <cassert>
#include <memory>
#include <stdexcept>
@@ -45,6 +45,8 @@
namespace ingen {
+class Properties;
+
using client::BlockModel;
using client::GraphModel;
using client::ObjectModel;
@@ -94,14 +96,9 @@ WindowFactory::clear()
size_t
WindowFactory::num_open_graph_windows()
{
- size_t ret = 0;
- for (const auto& w : _graph_windows) {
- if (w.second->is_visible()) {
- ++ret;
- }
- }
-
- return ret;
+ return std::count_if(_graph_windows.begin(),
+ _graph_windows.end(),
+ [](const auto& w) { return w.second->is_visible(); });
}
GraphBox*
@@ -227,7 +224,7 @@ WindowFactory::present_load_plugin(
int width = 0;
int height = 0;
w->second->get_size(width, height);
- _load_plugin_win->set_default_size(width - width / 8, height / 2);
+ _load_plugin_win->set_default_size(width - (width / 8), height / 2);
}
_load_plugin_win->set_title(
std::string("Load Plugin - ") + graph->path() + " - Ingen");
diff --git a/src/gui/WindowFactory.hpp b/src/gui/WindowFactory.hpp
index 4ef79239..e643505a 100644
--- a/src/gui/WindowFactory.hpp
+++ b/src/gui/WindowFactory.hpp
@@ -17,15 +17,14 @@
#ifndef INGEN_GUI_WINDOWFACTORY_HPP
#define INGEN_GUI_WINDOWFACTORY_HPP
-#include "ingen/Properties.hpp"
-#include "raul/Path.hpp"
+#include <ingen/Properties.hpp>
+#include <raul/Path.hpp>
#include <gdk/gdk.h>
#include <cstddef>
#include <map>
#include <memory>
-#include <string>
namespace ingen {
diff --git a/src/gui/ingen_gui.cpp b/src/gui/ingen_gui.cpp
index 8ddacb04..7fba2d50 100644
--- a/src/gui/ingen_gui.cpp
+++ b/src/gui/ingen_gui.cpp
@@ -16,18 +16,19 @@
#include "App.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Configuration.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Module.hpp"
-#include "ingen/QueuedInterface.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/World.hpp"
-#include "ingen/client/SigClientInterface.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Configuration.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Module.hpp>
+#include <ingen/QueuedInterface.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/World.hpp>
+#include <ingen/client/SigClientInterface.hpp>
#include <glibmm/thread.h>
#include <memory>
+#include <string>
namespace ingen::gui {
diff --git a/src/gui/ingen_gui_lv2.cpp b/src/gui/ingen_gui_lv2.cpp
index 31ec22c5..67290c76 100644
--- a/src/gui/ingen_gui_lv2.cpp
+++ b/src/gui/ingen_gui_lv2.cpp
@@ -17,28 +17,28 @@
#include "App.hpp"
#include "GraphBox.hpp"
-#include "ingen/AtomReader.hpp"
-#include "ingen/AtomSink.hpp"
-#include "ingen/AtomWriter.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "ingen/client/ClientStore.hpp"
-#include "ingen/client/GraphModel.hpp" // IWYU pragma: keep
-#include "ingen/client/SigClientInterface.hpp"
-#include "ingen/ingen.h"
-#include "ingen/paths.hpp"
-#include "ingen/runtime_paths.hpp"
-#include "lv2/atom/atom.h"
-#include "lv2/atom/util.h"
-#include "lv2/core/lv2.h"
-#include "lv2/log/log.h"
-#include "lv2/ui/ui.h"
-#include "lv2/urid/urid.h"
-#include "raul/Path.hpp"
+#include <ingen/AtomReader.hpp>
+#include <ingen/AtomSink.hpp>
+#include <ingen/AtomWriter.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <ingen/client/ClientStore.hpp>
+#include <ingen/client/GraphModel.hpp>
+#include <ingen/client/SigClientInterface.hpp>
+#include <ingen/ingen.h>
+#include <ingen/paths.hpp>
+#include <ingen/runtime_paths.hpp>
+#include <lv2/atom/atom.h>
+#include <lv2/atom/util.h>
+#include <lv2/core/lv2.h>
+#include <lv2/log/log.h>
+#include <lv2/ui/ui.h>
+#include <lv2/urid/urid.h>
+#include <raul/Path.hpp>
#include <cstdint>
#include <cstring>
diff --git a/src/gui/meson.build b/src/gui/meson.build
index 67914cca..810c7829 100644
--- a/src/gui/meson.build
+++ b/src/gui/meson.build
@@ -7,35 +7,47 @@
gui_defines = platform_defines
-glibmm_dep = dependency('glibmm-2.4',
- version: '>= 2.14.0',
- include_type: 'system',
- required: get_option('gui'))
-
-gthread_dep = dependency('gthread-2.0',
- version: '>= 2.14.0',
- include_type: 'system',
- required: get_option('gui'))
-
-gtkmm_dep = dependency('gtkmm-2.4',
- version: '>= 2.14.0',
- include_type: 'system',
- required: get_option('gui'))
-
-ganv_dep = dependency('ganv-1',
- version: '>= 1.5.2',
- fallback: ['ganv', 'ganv_dep'],
- required: get_option('gui'))
-
-webkit_dep = dependency('webkit-1.0',
- version: '>= 1.4.0',
- include_type: 'system',
- required: false)
-
-build_gui = (glibmm_dep.found() and
- gthread_dep.found() and
- gtkmm_dep.found() and
- ganv_dep.found())
+glibmm_dep = dependency(
+ 'glibmm-2.4',
+ include_type: 'system',
+ required: get_option('gui'),
+ version: '>= 2.14.0',
+)
+
+gthread_dep = dependency(
+ 'gthread-2.0',
+ include_type: 'system',
+ required: get_option('gui'),
+ version: '>= 2.14.0',
+)
+
+gtkmm_dep = dependency(
+ 'gtkmm-2.4',
+ include_type: 'system',
+ required: get_option('gui'),
+ version: '>= 2.14.0',
+)
+
+ganv_dep = dependency(
+ 'ganv-1',
+ include_type: 'system',
+ required: get_option('gui'),
+ version: '>= 1.5.2',
+)
+
+webkit_dep = dependency(
+ 'webkit-1.0',
+ include_type: 'system',
+ required: false,
+ version: '>= 1.4.0',
+)
+
+build_gui = (
+ glibmm_dep.found()
+ and gthread_dep.found()
+ and gtkmm_dep.found()
+ and ganv_dep.found()
+)
if webkit_dep.found()
gui_defines += ['-DHAVE_WEBKIT=1']
@@ -149,15 +161,19 @@ if build_gui
config = configuration_data()
config.set('INGEN_VERSION', meson.project_version())
- configure_file(configuration: config,
- input: files('ingen_gui.ui.in'),
- output: 'ingen_gui.ui',
- install: true,
- install_dir: ingen_data_dir)
-
- configure_file(copy: true,
- input: files('ingen_style.rc'),
- output: '@PLAINNAME@',
- install: true,
- install_dir: ingen_data_dir)
+ configure_file(
+ configuration: config,
+ input: files('ingen_gui.ui.in'),
+ install: true,
+ install_dir: ingen_data_dir,
+ output: 'ingen_gui.ui',
+ )
+
+ configure_file(
+ copy: true,
+ input: files('ingen_style.rc'),
+ install: true,
+ install_dir: ingen_data_dir,
+ output: '@PLAINNAME@',
+ )
endif
diff --git a/src/gui/rgba.hpp b/src/gui/rgba.hpp
index bb53205e..e01a069d 100644
--- a/src/gui/rgba.hpp
+++ b/src/gui/rgba.hpp
@@ -34,7 +34,7 @@ rgba_to_uint(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
inline uint8_t
mono_interpolate(uint8_t v1, uint8_t v2, float f)
{
- return static_cast<uint8_t>(rintf((v2) * (f) + (v1) * (1 - (f))));
+ return static_cast<uint8_t>(rintf((v2 * f) + (v1 * (1.0f - f))));
}
#define RGBA_R(x) (static_cast<uint32_t>(x) >> 24)
diff --git a/src/ingen/ingen.cpp b/src/ingen/ingen.cpp
index 6917c9b7..7f1a587e 100644
--- a/src/ingen/ingen.cpp
+++ b/src/ingen/ingen.cpp
@@ -14,21 +14,21 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/Atom.hpp"
-#include "ingen/Configuration.hpp"
-#include "ingen/EngineBase.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Message.hpp"
-#include "ingen/Parser.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/World.hpp"
-#include "ingen/fmt.hpp"
-#include "ingen/paths.hpp"
-#include "ingen/runtime_paths.hpp"
-#include "ingen_config.h"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
-#include "serd/serd.h"
+#include <ingen/Atom.hpp>
+#include <ingen/Configuration.hpp>
+#include <ingen/EngineBase.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Message.hpp>
+#include <ingen/Parser.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/World.hpp>
+#include <ingen/fmt.hpp>
+#include <ingen/paths.hpp>
+#include <ingen/runtime_paths.hpp>
+#include <ingen_config.h>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
+#include <serd/serd.h>
#if USE_SOCKET
#include "ingen/client/SocketClient.hpp"
@@ -131,7 +131,7 @@ run(int argc, char** argv)
ingen_try(world->load_module("server"), "Failed to load server module");
- ingen_try(bool(world->engine()), "Unable to create engine");
+ ingen_try(!!world->engine(), "Unable to create engine");
world->engine()->listen();
}
@@ -195,7 +195,7 @@ run(int argc, char** argv)
}
}
- ingen_try(bool(world->parser()), "Failed to create parser");
+ ingen_try(!!world->parser(), "Failed to create parser");
const std::string graph = conf.option("load").ptr<char>();
diff --git a/src/meson.build b/src/meson.build
index 56c7fc86..bbd4bb5f 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -2,6 +2,7 @@
# SPDX-License-Identifier: 0BSD OR GPL-3.0-or-later
sources = files(
+ 'AtomForge.cpp',
'AtomReader.cpp',
'AtomWriter.cpp',
'ClashAvoider.cpp',
@@ -21,7 +22,7 @@ sources = files(
'URIMap.cpp',
'URIs.cpp',
'World.cpp',
- 'runtime_paths.cpp'
+ 'runtime_paths.cpp',
)
if have_socket
@@ -30,13 +31,15 @@ endif
ingen_deps = [
boost_dep,
- lilv_dep,
lv2_dep,
raul_dep,
serd_dep,
+ thread_dep,
+
sord_dep,
+
+ lilv_dep,
sratom_dep,
- thread_dep,
]
ingen_include_dirs = include_directories('../include', 'include')
@@ -45,6 +48,7 @@ libingen = shared_library(
versioned_name,
sources,
cpp_args: cpp_suppressions + platform_defines,
+ darwin_versions: [major_version + '.0.0', meson.project_version()],
dependencies: ingen_deps,
gnu_symbol_visibility: 'hidden',
implicit_include_directories: false,
diff --git a/src/runtime_paths.cpp b/src/runtime_paths.cpp
index b876ebd4..17167e9a 100644
--- a/src/runtime_paths.cpp
+++ b/src/runtime_paths.cpp
@@ -14,9 +14,10 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/runtime_paths.hpp"
+#include <ingen/runtime_paths.hpp>
+
+#include <ingen/FilePath.hpp>
-#include "ingen/FilePath.hpp"
#include "ingen_config.h"
#include <cstdlib>
@@ -44,7 +45,8 @@ static const char* const library_suffix = ".so";
#endif
static std::vector<FilePath>
-parse_search_path(const char* search_path, std::vector<FilePath> defaults)
+parse_search_path(const char* search_path,
+ const std::vector<FilePath>& defaults)
{
if (!search_path) {
return defaults;
diff --git a/src/server/.clang-tidy b/src/server/.clang-tidy
index 8bb1a979..a580cc7e 100644
--- a/src/server/.clang-tidy
+++ b/src/server/.clang-tidy
@@ -2,17 +2,14 @@ Checks: >
-*-avoid-c-arrays,
-*-narrowing-conversions,
-*-non-private-member-variables-in-classes,
- -*-uppercase-literal-suffix,
-*-vararg,
-bugprone-branch-clone,
-bugprone-parent-virtual-call,
-bugprone-reserved-identifier,
- -bugprone-suspicious-realloc-usage,
-bugprone-suspicious-string-compare,
-cert-dcl37-c,
-cert-dcl51-cpp,
-cppcoreguidelines-pro-bounds-constant-array-index,
- -cppcoreguidelines-pro-type-cstyle-cast,
-cppcoreguidelines-pro-type-static-cast-downcast,
-google-readability-todo,
-google-runtime-int,
diff --git a/src/server/ArcImpl.cpp b/src/server/ArcImpl.cpp
index 0b503534..2c5b4ee1 100644
--- a/src/server/ArcImpl.cpp
+++ b/src/server/ArcImpl.cpp
@@ -22,8 +22,8 @@
#include "PortImpl.hpp"
#include "PortType.hpp"
-#include "ingen/URIs.hpp"
-#include "raul/Path.hpp"
+#include <ingen/URIs.hpp>
+#include <raul/Path.hpp>
#include <algorithm>
#include <cassert>
@@ -84,32 +84,30 @@ ArcImpl::can_connect(const PortImpl* src, const InputPort* dst)
{
const ingen::URIs& uris = src->bufs().uris();
return (
- // (Audio | Control | CV) => (Audio | Control | CV)
- ( (src->is_a(PortType::ID::CONTROL) ||
- src->is_a(PortType::ID::AUDIO) ||
- src->is_a(PortType::ID::CV))
- && (dst->is_a(PortType::ID::CONTROL)
- || dst->is_a(PortType::ID::AUDIO)
- || dst->is_a(PortType::ID::CV)))
+ // (Audio | Control | CV) => (Audio | Control | CV)
+ ((src->is_a(PortType::CONTROL) || src->is_a(PortType::AUDIO) ||
+ src->is_a(PortType::CV)) &&
+ (dst->is_a(PortType::CONTROL) || dst->is_a(PortType::AUDIO) ||
+ dst->is_a(PortType::CV)))
- // Equal types
- || (src->type() == dst->type() &&
- src->buffer_type() == dst->buffer_type())
+ // Equal types
+ ||
+ (src->type() == dst->type() && src->buffer_type() == dst->buffer_type())
- // Control => atom:Float Value
- || (src->is_a(PortType::ID::CONTROL) && dst->supports(uris.atom_Float))
+ // Control => atom:Float Value
+ || (src->is_a(PortType::CONTROL) && dst->supports(uris.atom_Float))
- // Audio => atom:Sound Value
- || (src->is_a(PortType::ID::AUDIO) && dst->supports(uris.atom_Sound))
+ // Audio => atom:Sound Value
+ || (src->is_a(PortType::AUDIO) && dst->supports(uris.atom_Sound))
- // atom:Float Value => Control
- || (src->supports(uris.atom_Float) && dst->is_a(PortType::ID::CONTROL))
+ // atom:Float Value => Control
+ || (src->supports(uris.atom_Float) && dst->is_a(PortType::CONTROL))
- // atom:Float Value => CV
- || (src->supports(uris.atom_Float) && dst->is_a(PortType::ID::CV))
+ // atom:Float Value => CV
+ || (src->supports(uris.atom_Float) && dst->is_a(PortType::CV))
- // atom:Sound Value => Audio
- || (src->supports(uris.atom_Sound) && dst->is_a(PortType::ID::AUDIO)));
+ // atom:Sound Value => Audio
+ || (src->supports(uris.atom_Sound) && dst->is_a(PortType::AUDIO)));
}
} // namespace ingen::server
diff --git a/src/server/ArcImpl.hpp b/src/server/ArcImpl.hpp
index b1565390..5be51187 100644
--- a/src/server/ArcImpl.hpp
+++ b/src/server/ArcImpl.hpp
@@ -19,19 +19,13 @@
#include "BufferRef.hpp"
-#include "ingen/Arc.hpp"
-#include "raul/Noncopyable.hpp"
+#include <ingen/Arc.hpp>
+#include <raul/Noncopyable.hpp>
#include <boost/intrusive/slist_hook.hpp>
#include <cstdint>
-// IWYU pragma: no_include "raul/Path.hpp"
-
-namespace raul {
-class Path; // IWYU pragma: keep
-} // namespace raul
-
namespace ingen::server {
class InputPort;
diff --git a/src/server/BlockFactory.cpp b/src/server/BlockFactory.cpp
index 4c8dd1d7..a70de0b6 100644
--- a/src/server/BlockFactory.cpp
+++ b/src/server/BlockFactory.cpp
@@ -1,6 +1,6 @@
/*
This file is part of Ingen.
- Copyright 2007-2015 David Robillard <http://drobilla.net/>
+ Copyright 2007-2024 David Robillard <http://drobilla.net/>
Ingen is free software: you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free
@@ -22,21 +22,23 @@
#include "PortType.hpp"
#include "ThreadManager.hpp"
-#include "ingen/LV2Features.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "internals/BlockDelay.hpp"
-#include "internals/Controller.hpp"
-#include "internals/Note.hpp"
-#include "internals/Time.hpp"
-#include "internals/Trigger.hpp"
-#include "lilv/lilv.h"
+#include <ingen/LV2Features.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <internals/BlockDelay.hpp>
+#include <internals/Controller.hpp>
+#include <internals/Note.hpp>
+#include <internals/Time.hpp>
+#include <internals/Trigger.hpp>
+#include <lilv/lilv.h>
#include <algorithm>
#include <cstdint>
#include <iterator>
#include <memory>
+#include <string>
#include <utility>
#include <vector>
@@ -148,8 +150,10 @@ BlockFactory::load_lv2_plugins()
// Build an array of port type nodes for checking compatibility
using Types = std::vector<std::shared_ptr<LilvNode>>;
Types types;
- for (unsigned t = PortType::ID::AUDIO; t <= PortType::ID::ATOM; ++t) {
- const URI uri{PortType(static_cast<PortType::ID>(t)).uri()};
+ for (auto t = static_cast<unsigned>(PortType::AUDIO);
+ t <= static_cast<unsigned>(PortType::ATOM);
+ ++t) {
+ const URI uri = port_type_uri(static_cast<PortType>(t));
types.push_back(std::shared_ptr<LilvNode>(
lilv_new_uri(_world.lilv_world(), uri.c_str()), lilv_node_free));
}
@@ -186,13 +190,13 @@ BlockFactory::load_lv2_plugins()
const uint32_t n_ports = lilv_plugin_get_num_ports(lv2_plug);
for (uint32_t p = 0; p < n_ports; ++p) {
const LilvPort* port = lilv_plugin_get_port_by_index(lv2_plug, p);
- supported = false;
- for (const auto& t : types) {
- if (lilv_port_is_a(lv2_plug, port, t.get())) {
- supported = true;
- break;
- }
- }
+ supported =
+ std::any_of(types.begin(),
+ types.end(),
+ [&lv2_plug, &port](const auto& t) {
+ return lilv_port_is_a(lv2_plug, port, t.get());
+ });
+
if (!supported &&
!lilv_port_has_property(lv2_plug,
port,
diff --git a/src/server/BlockFactory.hpp b/src/server/BlockFactory.hpp
index 17c11bb4..68699d8a 100644
--- a/src/server/BlockFactory.hpp
+++ b/src/server/BlockFactory.hpp
@@ -17,8 +17,8 @@
#ifndef INGEN_ENGINE_BLOCKFACTORY_HPP
#define INGEN_ENGINE_BLOCKFACTORY_HPP
-#include "ingen/URI.hpp"
-#include "raul/Noncopyable.hpp"
+#include <ingen/URI.hpp>
+#include <raul/Noncopyable.hpp>
#include <map>
#include <memory>
diff --git a/src/server/BlockImpl.cpp b/src/server/BlockImpl.cpp
index d4285832..b4f407c3 100644
--- a/src/server/BlockImpl.cpp
+++ b/src/server/BlockImpl.cpp
@@ -20,14 +20,15 @@
#include "GraphImpl.hpp"
#include "PluginImpl.hpp"
#include "PortImpl.hpp"
+#include "PortType.hpp"
#include "RunContext.hpp"
#include "ThreadManager.hpp"
-#include "lv2/urid/urid.h"
-#include "raul/Array.hpp"
-#include "raul/Maid.hpp"
-#include "raul/Symbol.hpp"
+#include <lv2/urid/urid.h>
+#include <raul/Array.hpp>
+#include <raul/Symbol.hpp>
+#include <algorithm>
#include <cassert>
#include <cstdint>
#include <initializer_list>
@@ -203,8 +204,8 @@ BlockImpl::bypass(RunContext& ctx)
// Dumb bypass
for (const PortType t : { PortType::AUDIO, PortType::CV, PortType::ATOM }) {
for (uint32_t i = 0;; ++i) {
- PortImpl* in = nth_port_by_type(i, true, t);
- PortImpl* out = nth_port_by_type(i, false, t);
+ const PortImpl* in = nth_port_by_type(i, true, t);
+ const PortImpl* out = nth_port_by_type(i, false, t);
if (!out) {
break; // Finished writing all outputs
}
@@ -241,13 +242,11 @@ BlockImpl::process(RunContext& ctx)
// Find earliest offset of a value change
SampleCount chunk_end = ctx.nframes();
for (uint32_t i = 0; _ports && i < _ports->size(); ++i) {
- PortImpl* const port = _ports->at(i);
+ const PortImpl* const port = _ports->at(i);
if (port->type() == PortType::CONTROL && port->is_input()) {
const SampleCount o = port->next_value_offset(
offset, ctx.nframes());
- if (o < chunk_end) {
- chunk_end = o;
- }
+ chunk_end = std::min(o, chunk_end);
}
}
@@ -265,7 +264,7 @@ BlockImpl::process(RunContext& ctx)
// Emit control port outputs as events
for (uint32_t i = 0; _ports && i < _ports->size(); ++i) {
- PortImpl* const port = _ports->at(i);
+ const PortImpl* const port = _ports->at(i);
if (port->type() == PortType::CONTROL && port->is_output()) {
// TODO: Only emit events when value has actually changed?
for (uint32_t v = 0; v < _polyphony; ++v) {
diff --git a/src/server/BlockImpl.hpp b/src/server/BlockImpl.hpp
index ef76e9bf..69564ff4 100644
--- a/src/server/BlockImpl.hpp
+++ b/src/server/BlockImpl.hpp
@@ -19,17 +19,16 @@
#include "BufferRef.hpp"
#include "NodeImpl.hpp"
-#include "PortType.hpp"
#include "State.hpp"
#include "types.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/URI.hpp"
-#include "lilv/lilv.h"
-#include "lv2/urid/urid.h"
-#include "raul/Array.hpp"
-#include "raul/Maid.hpp"
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/URI.hpp>
+#include <lilv/lilv.h>
+#include <lv2/urid/urid.h>
+#include <raul/Array.hpp>
+#include <raul/Maid.hpp>
#include <boost/intrusive/slist_hook.hpp>
@@ -43,7 +42,8 @@ class Symbol;
} // namespace raul
namespace ingen {
-class Node;
+
+enum class PortType;
namespace server {
@@ -125,7 +125,7 @@ public:
/** Learn the next incoming MIDI event (for internals) */
virtual void learn() {}
- /** Do whatever needs doing in the process thread before process() is called */
+ /** Do any necessary preparation in the process thread before process(). */
virtual void pre_process(RunContext& ctx);
/** Run block for an entire process cycle (calls run()). */
diff --git a/src/server/Broadcaster.cpp b/src/server/Broadcaster.cpp
index e7406dc6..76b21fc6 100644
--- a/src/server/Broadcaster.cpp
+++ b/src/server/Broadcaster.cpp
@@ -19,7 +19,7 @@
#include "BlockFactory.hpp"
#include "PluginImpl.hpp"
-#include "ingen/Interface.hpp"
+#include <ingen/Interface.hpp>
#include <cstddef>
#include <memory>
diff --git a/src/server/Broadcaster.hpp b/src/server/Broadcaster.hpp
index 9bae44b1..4cdf65ca 100644
--- a/src/server/Broadcaster.hpp
+++ b/src/server/Broadcaster.hpp
@@ -19,10 +19,10 @@
#include "BlockFactory.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Message.hpp"
-#include "ingen/URI.hpp"
-#include "raul/Noncopyable.hpp"
+#include <ingen/Interface.hpp>
+#include <ingen/Message.hpp>
+#include <ingen/URI.hpp>
+#include <raul/Noncopyable.hpp>
#include <atomic>
#include <memory>
diff --git a/src/server/Buffer.cpp b/src/server/Buffer.cpp
index 394d3323..0c4c0951 100644
--- a/src/server/Buffer.cpp
+++ b/src/server/Buffer.cpp
@@ -18,15 +18,16 @@
#include "BufferFactory.hpp"
#include "Engine.hpp"
+#include "PortType.hpp"
#include "RunContext.hpp"
#include "ingen_config.h"
-#include "ingen/Atom.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/URIs.hpp"
-#include "lv2/atom/atom.h"
-#include "lv2/atom/util.h"
-#include "lv2/urid/urid.h"
+#include <ingen/Atom.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/URIs.hpp>
+#include <lv2/atom/atom.h>
+#include <lv2/atom/util.h>
+#include <lv2/urid/urid.h>
#include <algorithm>
#include <cstdint>
@@ -171,7 +172,12 @@ void
Buffer::resize(uint32_t capacity)
{
if (!_external) {
- _buf = realloc(_buf, capacity);
+ void* const new_buf = realloc(_buf, capacity);
+ if (!new_buf) {
+ throw std::bad_alloc{};
+ }
+
+ _buf = new_buf;
_capacity = capacity;
clear();
} else {
@@ -182,18 +188,18 @@ Buffer::resize(uint32_t capacity)
void*
Buffer::port_data(PortType port_type, SampleCount offset)
{
- switch (port_type.id()) {
- case PortType::ID::CONTROL:
+ switch (port_type) {
+ case PortType::CONTROL:
return &_value_buffer->get<LV2_Atom_Float>()->body;
- case PortType::ID::CV:
- case PortType::ID::AUDIO:
+ case PortType::CV:
+ case PortType::AUDIO:
if (_type == _factory.uris().atom_Float) {
return &get<LV2_Atom_Float>()->body;
} else if (_type == _factory.uris().atom_Sound) {
return static_cast<Sample*>(_buf) + offset;
}
break;
- case PortType::ID::ATOM:
+ case PortType::ATOM:
if (_type != _factory.uris().atom_Sound) {
return _buf;
}
@@ -207,8 +213,7 @@ Buffer::port_data(PortType port_type, SampleCount offset)
const void*
Buffer::port_data(PortType port_type, SampleCount offset) const
{
- return const_cast<void*>(
- const_cast<Buffer*>(this)->port_data(port_type, offset));
+ return const_cast<Buffer*>(this)->port_data(port_type, offset);
}
#ifdef __SSE__
@@ -435,7 +440,7 @@ void* Buffer::aligned_alloc(size_t size)
{
#if USE_POSIX_MEMALIGN
void* buf = nullptr;
- if (!posix_memalign(static_cast<void**>(&buf), 16, size)) {
+ if (!posix_memalign(&buf, 16, size)) {
memset(buf, 0, size);
return buf;
}
diff --git a/src/server/Buffer.hpp b/src/server/Buffer.hpp
index 8a64e621..2c32076b 100644
--- a/src/server/Buffer.hpp
+++ b/src/server/Buffer.hpp
@@ -19,13 +19,12 @@
#include "BufferFactory.hpp"
#include "BufferRef.hpp"
-#include "PortType.hpp"
#include "server.h"
#include "types.hpp"
-#include "ingen/URIs.hpp"
-#include "lv2/atom/atom.h"
-#include "lv2/urid/urid.h"
+#include <ingen/URIs.hpp>
+#include <lv2/atom/atom.h>
+#include <lv2/urid/urid.h>
#include <atomic>
#include <cassert>
@@ -34,6 +33,8 @@
namespace ingen {
+enum class PortType;
+
class Atom;
namespace server {
diff --git a/src/server/BufferFactory.cpp b/src/server/BufferFactory.cpp
index 1afbf93f..b8f6ee35 100644
--- a/src/server/BufferFactory.cpp
+++ b/src/server/BufferFactory.cpp
@@ -19,11 +19,11 @@
#include "Buffer.hpp"
#include "Engine.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "lv2/atom/atom.h"
-#include "lv2/urid/urid.h"
+#include <ingen/Log.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <lv2/atom/atom.h>
+#include <lv2/urid/urid.h>
#include <algorithm>
#include <memory>
@@ -109,7 +109,7 @@ BufferFactory::default_size(LV2_URID type) const
}
if (type == _uris.atom_Sequence) {
- if (_seq_size == 0) {
+ if (_seq_size == 0U) {
return _engine.sequence_size();
}
diff --git a/src/server/BufferFactory.hpp b/src/server/BufferFactory.hpp
index 657ce7d2..dbadaede 100644
--- a/src/server/BufferFactory.hpp
+++ b/src/server/BufferFactory.hpp
@@ -17,13 +17,13 @@
#ifndef INGEN_ENGINE_BUFFERFACTORY_HPP
#define INGEN_ENGINE_BUFFERFACTORY_HPP
-#include "ingen/URIs.hpp"
-#include "lv2/urid/urid.h"
-#include "server.h"
-
#include "BufferRef.hpp"
+#include "server.h"
#include "types.hpp"
+#include <ingen/URIs.hpp>
+#include <lv2/urid/urid.h>
+
#include <atomic>
#include <cstdint>
#include <mutex>
@@ -111,7 +111,7 @@ private:
std::mutex _mutex;
Engine& _engine;
URIs& _uris;
- uint32_t _seq_size{0};
+ uint32_t _seq_size{0U};
BufferRef _silent_buffer;
};
diff --git a/src/server/ClientUpdate.cpp b/src/server/ClientUpdate.cpp
index c69f5b49..008e9843 100644
--- a/src/server/ClientUpdate.cpp
+++ b/src/server/ClientUpdate.cpp
@@ -23,10 +23,14 @@
#include "PortImpl.hpp"
#include "PortType.hpp"
-#include "ingen/Arc.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/URIs.hpp"
+#include <ingen/Arc.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <raul/Path.hpp>
#include <boost/intrusive/slist.hpp>
diff --git a/src/server/ClientUpdate.hpp b/src/server/ClientUpdate.hpp
index 9fadae90..1d16e6d6 100644
--- a/src/server/ClientUpdate.hpp
+++ b/src/server/ClientUpdate.hpp
@@ -17,10 +17,10 @@
#ifndef INGEN_ENGINE_CLIENTUPDATE_HPP
#define INGEN_ENGINE_CLIENTUPDATE_HPP
-#include "ingen/Properties.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/URI.hpp"
-#include "raul/Path.hpp"
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/URI.hpp>
+#include <raul/Path.hpp>
#include <string>
#include <vector>
diff --git a/src/server/CompiledGraph.cpp b/src/server/CompiledGraph.cpp
index 08e558a8..89fc8843 100644
--- a/src/server/CompiledGraph.cpp
+++ b/src/server/CompiledGraph.cpp
@@ -1,6 +1,6 @@
/*
This file is part of Ingen.
- Copyright 2015-2017 David Robillard <http://drobilla.net/>
+ Copyright 2015-2024 David Robillard <http://drobilla.net/>
Ingen is free software: you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free
@@ -21,12 +21,12 @@
#include "GraphImpl.hpp"
#include "ThreadManager.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/ColorContext.hpp"
-#include "ingen/Configuration.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/World.hpp"
-#include "raul/Path.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/ColorContext.hpp>
+#include <ingen/Configuration.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/World.hpp>
+#include <raul/Path.hpp>
#include <boost/intrusive/slist.hpp>
@@ -35,6 +35,7 @@
#include <cstdint>
#include <cstdio>
#include <exception>
+#include <functional>
#include <limits>
#include <memory>
#include <utility>
@@ -60,13 +61,11 @@ public:
static bool
has_provider_with_many_dependants(const BlockImpl* n)
{
- for (const auto* p : n->providers()) {
- if (p->dependants().size() > 1) {
- return true;
- }
- }
-
- return false;
+ return std::any_of(n->providers().begin(),
+ n->providers().end(),
+ [](const auto* p) {
+ return p->dependants().size() > 1;
+ });
}
CompiledGraph::CompiledGraph(GraphImpl* graph)
@@ -95,13 +94,11 @@ CompiledGraph::compile(GraphImpl& graph)
static size_t
num_unvisited_dependants(const BlockImpl* block)
{
- size_t count = 0;
- for (const BlockImpl* b : block->dependants()) {
- if (b->get_mark() == BlockImpl::Mark::UNVISITED) {
- ++count;
- }
- }
- return count;
+ return std::count_if(block->dependants().begin(),
+ block->dependants().end(),
+ [](const auto* b) {
+ return b->get_mark() == BlockImpl::Mark::UNVISITED;
+ });
}
static size_t
diff --git a/src/server/CompiledGraph.hpp b/src/server/CompiledGraph.hpp
index 89aab289..1949563d 100644
--- a/src/server/CompiledGraph.hpp
+++ b/src/server/CompiledGraph.hpp
@@ -19,7 +19,7 @@
#include "Task.hpp"
-#include "raul/Noncopyable.hpp"
+#include <raul/Noncopyable.hpp>
#include <cstddef>
#include <memory>
@@ -46,7 +46,7 @@ public:
void run(RunContext& ctx);
private:
- CompiledGraph(GraphImpl* graph);
+ explicit CompiledGraph(GraphImpl* graph);
using BlockSet = std::set<BlockImpl*>;
diff --git a/src/server/ControlBindings.cpp b/src/server/ControlBindings.cpp
index e8dd3554..489d5384 100644
--- a/src/server/ControlBindings.cpp
+++ b/src/server/ControlBindings.cpp
@@ -23,21 +23,22 @@
#include "RunContext.hpp"
#include "ThreadManager.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/URIMap.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "lv2/atom/atom.h"
-#include "lv2/atom/forge.h"
-#include "lv2/atom/util.h"
-#include "lv2/midi/midi.h"
-#include "lv2/urid/urid.h"
-#include "raul/Path.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/URIMap.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <lv2/atom/atom.h>
+#include <lv2/atom/forge.h>
+#include <lv2/atom/util.h>
+#include <lv2/midi/midi.h>
+#include <lv2/urid/urid.h>
+#include <raul/Path.hpp>
#include <boost/intrusive/bstree.hpp>
+#include <algorithm>
#include <cmath>
#include <cstring>
#include <string>
@@ -249,7 +250,7 @@ ControlBindings::start_learn(PortImpl* port)
ThreadManager::assert_thread(THREAD_PRE_PROCESS);
Binding* b = _learn_binding.load();
if (!b) {
- _learn_binding = new Binding(Type::NULL_CONTROL, port);
+ _learn_binding = new Binding();
} else {
b->port = port;
}
@@ -296,7 +297,7 @@ ControlBindings::control_to_port_value(RunContext& ctx,
float max = 1.0f;
get_range(ctx, port, &min, &max);
- return normal * (max - min) + min;
+ return (normal * (max - min)) + min;
}
int16_t
@@ -316,16 +317,10 @@ ControlBindings::port_value_to_control(RunContext& ctx,
const float value = value_atom.get<float>();
float normal = (value - min) / (max - min);
- if (normal < 0.0f) {
- normal = 0.0f;
- }
-
- if (normal > 1.0f) {
- normal = 1.0f;
- }
+ normal = std::max(0.0f, std::min(1.0f, normal));
if (port->is_logarithmic()) {
- normal = logf(normal * (static_cast<float>(M_E) - 1.0f) + 1.0f);
+ normal = logf((normal * (static_cast<float>(M_E) - 1.0f)) + 1.0f);
}
switch (type) {
diff --git a/src/server/ControlBindings.hpp b/src/server/ControlBindings.hpp
index 9a7f66a2..0e6dbf63 100644
--- a/src/server/ControlBindings.hpp
+++ b/src/server/ControlBindings.hpp
@@ -19,9 +19,10 @@
#include "BufferRef.hpp"
-#include "lv2/atom/forge.h"
-#include "raul/Maid.hpp"
+#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>
@@ -34,10 +35,6 @@ namespace raul {
class Path;
} // namespace raul
-namespace boost::intrusive {
-template <class Compare> struct compare;
-} // namespace boost::intrusive
-
namespace ingen {
class Atom;
@@ -63,9 +60,8 @@ public:
};
struct Key {
- Key(Type t = Type::NULL_CONTROL, int16_t n = 0) noexcept
- : type(t), num(n)
- {}
+ Key(Type t, int16_t n) noexcept : type{t}, num{n} {}
+ Key() noexcept : Key{Type::NULL_CONTROL, 0U} {}
bool operator<(const Key& other) const {
return ((type < other.type) ||
@@ -85,7 +81,8 @@ public:
/** One binding of a controller to a port. */
struct Binding : public boost::intrusive::set_base_hook<>,
public raul::Maid::Disposable {
- Binding(Key k=Key(), PortImpl* p=nullptr) : key(k), port(p) {}
+ Binding(Key k, PortImpl* p) noexcept : key{k}, port{p} {}
+ Binding() noexcept : Binding{Key{}, nullptr} {}
bool operator<(const Binding& rhs) const { return key < rhs.key; }
diff --git a/src/server/DirectDriver.hpp b/src/server/DirectDriver.hpp
index 2361034c..bc52fc3a 100644
--- a/src/server/DirectDriver.hpp
+++ b/src/server/DirectDriver.hpp
@@ -24,11 +24,12 @@
#include "RunContext.hpp"
#include "types.hpp"
-#include "raul/Path.hpp"
+#include <raul/Path.hpp>
#include <boost/intrusive/slist.hpp>
#include <cstddef>
+#include <cstdint>
#include <string>
namespace boost::intrusive {
@@ -53,7 +54,7 @@ public:
DirectDriver(Engine& engine,
double sample_rate,
SampleCount block_length,
- size_t seq_size)
+ uint32_t seq_size)
: _engine(engine)
, _sample_rate(sample_rate)
, _block_length(block_length)
@@ -100,7 +101,7 @@ public:
SampleCount block_length() const override { return _block_length; }
- size_t seq_size() const override { return _seq_size; }
+ uint32_t seq_size() const override { return _seq_size; }
SampleCount sample_rate() const override { return _sample_rate; }
@@ -120,7 +121,7 @@ private:
Ports _ports;
SampleCount _sample_rate;
SampleCount _block_length;
- size_t _seq_size;
+ uint32_t _seq_size;
};
} // namespace server
diff --git a/src/server/Driver.hpp b/src/server/Driver.hpp
index 83436389..112fb8ba 100644
--- a/src/server/Driver.hpp
+++ b/src/server/Driver.hpp
@@ -19,8 +19,8 @@
#include "types.hpp"
-#include "ingen/URI.hpp"
-#include "raul/Noncopyable.hpp"
+#include <ingen/URI.hpp>
+#include <raul/Noncopyable.hpp>
#include <cstddef>
@@ -98,7 +98,7 @@ public:
virtual SampleCount block_length() const = 0;
/** Return the event buffer size in bytes */
- virtual size_t seq_size() const = 0;
+ virtual uint32_t seq_size() const = 0;
/** Return the sample rate in Hz */
virtual SampleRate sample_rate() const = 0;
diff --git a/src/server/DuplexPort.cpp b/src/server/DuplexPort.cpp
index 941beb10..1e07afd2 100644
--- a/src/server/DuplexPort.cpp
+++ b/src/server/DuplexPort.cpp
@@ -23,15 +23,17 @@
#include "Engine.hpp"
#include "GraphImpl.hpp"
#include "NodeImpl.hpp"
-
-#include "ingen/Atom.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Node.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/URIs.hpp"
-#include "lv2/urid/urid.h"
-#include "raul/Array.hpp"
-#include "raul/Maid.hpp"
+#include "PortType.hpp"
+
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Node.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <lv2/urid/urid.h>
+#include <raul/Array.hpp>
+#include <raul/Maid.hpp>
#include <algorithm>
#include <map>
@@ -95,7 +97,7 @@ DuplexPort::duplicate(Engine& engine,
GraphImpl* parent)
{
BufferFactory& bufs = *engine.buffer_factory();
- const Atom polyphonic = get_property(bufs.uris().ingen_polyphonic);
+ const Atom& polyphonic = get_property(bufs.uris().ingen_polyphonic);
auto* dup = new DuplexPort(
bufs, parent, symbol, _index,
diff --git a/src/server/DuplexPort.hpp b/src/server/DuplexPort.hpp
index 3cc0efba..fb3eb74e 100644
--- a/src/server/DuplexPort.hpp
+++ b/src/server/DuplexPort.hpp
@@ -19,13 +19,11 @@
#include "InputPort.hpp"
#include "PortImpl.hpp"
-#include "PortType.hpp"
#include "server.h"
#include "types.hpp"
-#include "ingen/URI.hpp"
-#include "lv2/urid/urid.h"
-#include "raul/Maid.hpp"
+#include <lv2/urid/urid.h>
+#include <raul/Maid.hpp>
#include <boost/intrusive/slist_hook.hpp>
@@ -38,15 +36,15 @@ class Symbol;
namespace ingen {
+enum class PortType;
+
class Atom;
-class Properties;
namespace server {
class BufferFactory;
class Engine;
class GraphImpl;
-class RunContext;
/** A duplex Port (both an input and output port on a Graph)
*
diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp
index c4c492b7..4d753bbc 100644
--- a/src/server/Engine.cpp
+++ b/src/server/Engine.cpp
@@ -1,6 +1,6 @@
/*
This file is part of Ingen.
- Copyright 2007-2017 David Robillard <http://drobilla.net/>
+ Copyright 2007-2024 David Robillard <http://drobilla.net/>
Ingen is free software: you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free
@@ -42,26 +42,28 @@
#include "SocketListener.hpp"
#endif
-#include "ingen/Atom.hpp"
-#include "ingen/AtomReader.hpp"
-#include "ingen/ColorContext.hpp"
-#include "ingen/Configuration.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/LV2Features.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/Store.hpp"
-#include "ingen/StreamWriter.hpp"
-#include "ingen/Tee.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "lv2/buf-size/buf-size.h"
-#include "lv2/state/state.h"
-#include "raul/Maid.hpp"
-#include "raul/Path.hpp"
-#include "raul/RingBuffer.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/AtomReader.hpp>
+#include <ingen/Clock.hpp>
+#include <ingen/ColorContext.hpp>
+#include <ingen/Configuration.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/LV2Features.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/Store.hpp>
+#include <ingen/StreamWriter.hpp>
+#include <ingen/Tee.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <lv2/buf-size/buf-size.h>
+#include <lv2/state/state.h>
+#include <raul/Maid.hpp>
+#include <raul/Path.hpp>
+#include <raul/RingBuffer.hpp>
#include <algorithm>
#include <cmath>
@@ -70,6 +72,7 @@
#include <limits>
#include <map>
#include <memory>
+#include <string>
#include <thread>
#include <utility>
@@ -104,11 +107,14 @@ Engine::Engine(ingen::World& world)
}
for (int i = 0; i < world.conf().option("threads").get<int32_t>(); ++i) {
+ const bool is_threaded = (i > 0);
_notifications.emplace_back(
- std::make_unique<raul::RingBuffer>(uint32_t(24 * event_queue_size())));
+ std::make_unique<raul::RingBuffer>(24U * event_queue_size()));
_run_contexts.emplace_back(
- std::make_unique<RunContext>(
- *this, _notifications.back().get(), unsigned(i), i > 0));
+ std::make_unique<RunContext>(*this,
+ _notifications.back().get(),
+ static_cast<unsigned>(i),
+ is_threaded));
}
_world.lv2_features().add_feature(_worker->schedule_feature());
@@ -236,12 +242,11 @@ Engine::emit_notifications(FrameTime end)
bool
Engine::pending_notifications()
{
- for (const auto& ctx : _run_contexts) {
- if (ctx->pending_notifications()) {
- return true;
- }
- }
- return false;
+ return std::any_of(_run_contexts.begin(),
+ _run_contexts.end(),
+ [](const auto& ctx) {
+ return ctx->pending_notifications();
+ });
}
bool
@@ -295,16 +300,17 @@ Engine::block_length() const
return _driver->block_length();
}
-size_t
+uint32_t
Engine::sequence_size() const
{
return _driver->seq_size();
}
-size_t
+uint32_t
Engine::event_queue_size() const
{
- return _world.conf().option("queue-size").get<int32_t>();
+ return static_cast<uint32_t>(
+ std::max(0, _world.conf().option("queue-size").get<int32_t>()));
}
void
@@ -378,7 +384,7 @@ Engine::reset_load()
}
void
-Engine::init(double sample_rate, uint32_t block_length, size_t seq_size)
+Engine::init(double sample_rate, uint32_t block_length, uint32_t seq_size)
{
set_driver(std::make_shared<DirectDriver>(
*this, sample_rate, block_length, seq_size));
diff --git a/src/server/Engine.hpp b/src/server/Engine.hpp
index f0f19740..8fa1d169 100644
--- a/src/server/Engine.hpp
+++ b/src/server/Engine.hpp
@@ -22,9 +22,9 @@
#include "server.h"
#include "types.hpp"
-#include "ingen/Clock.hpp"
-#include "ingen/EngineBase.hpp"
-#include "ingen/Properties.hpp"
+#include <ingen/Clock.hpp>
+#include <ingen/EngineBase.hpp>
+#include <ingen/Properties.hpp>
#include <chrono>
#include <condition_variable>
@@ -35,12 +35,9 @@
#include <random>
#include <vector>
-// IWYU pragma: no_include "RunContext.hpp"
-// IWYU pragma: no_include "raul/RingBuffer.hpp"
-
namespace raul {
class Maid;
-class RingBuffer; // IWYU pragma: keep
+class RingBuffer;
} // namespace raul
namespace ingen {
@@ -63,7 +60,7 @@ class GraphImpl;
class LV2Options;
class PostProcessor;
class PreProcessor;
-class RunContext; // IWYU pragma: keep
+class RunContext;
class SocketListener;
class Task;
class UndoStack;
@@ -88,7 +85,7 @@ public:
Engine& operator=(const Engine&) = delete;
// EngineBase methods
- void init(double sample_rate, uint32_t block_length, size_t seq_size) override;
+ void init(double sample_rate, uint32_t block_length, uint32_t seq_size) override;
bool supports_dynamic_ports() const override;
bool activate() override;
void deactivate() override;
@@ -173,8 +170,8 @@ public:
SampleRate sample_rate() const;
SampleCount block_length() const;
- size_t sequence_size() const;
- size_t event_queue_size() const;
+ uint32_t sequence_size() const;
+ uint32_t event_queue_size() const;
size_t n_threads() const { return _run_contexts.size(); }
bool atomic_bundles() const { return _atomic_bundles; }
diff --git a/src/server/EnginePort.hpp b/src/server/EnginePort.hpp
index 7a25bda5..d7e73f63 100644
--- a/src/server/EnginePort.hpp
+++ b/src/server/EnginePort.hpp
@@ -19,8 +19,8 @@
#include "DuplexPort.hpp"
-#include "raul/Deletable.hpp"
-#include "raul/Noncopyable.hpp"
+#include <raul/Deletable.hpp>
+#include <raul/Noncopyable.hpp>
#include <boost/intrusive/slist_hook.hpp>
diff --git a/src/server/Event.hpp b/src/server/Event.hpp
index de1f2384..3c9c5c26 100644
--- a/src/server/Event.hpp
+++ b/src/server/Event.hpp
@@ -19,12 +19,12 @@
#include "types.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Status.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/paths.hpp"
-#include "raul/Deletable.hpp"
-#include "raul/Noncopyable.hpp"
+#include <ingen/Interface.hpp>
+#include <ingen/Status.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/paths.hpp>
+#include <raul/Deletable.hpp>
+#include <raul/Noncopyable.hpp>
#include <atomic>
#include <cstdint>
diff --git a/src/server/EventWriter.cpp b/src/server/EventWriter.cpp
index 2feef347..fff9226a 100644
--- a/src/server/EventWriter.cpp
+++ b/src/server/EventWriter.cpp
@@ -18,16 +18,17 @@
#include "Engine.hpp"
-#include "events/Connect.hpp"
-#include "events/Copy.hpp"
-#include "events/Delete.hpp"
-#include "events/Delta.hpp"
-#include "events/Disconnect.hpp"
-#include "events/DisconnectAll.hpp"
-#include "events/Get.hpp"
-#include "events/Mark.hpp"
-#include "events/Move.hpp"
-#include "events/Undo.hpp"
+#include <events/Connect.hpp>
+#include <events/Copy.hpp>
+#include <events/Delete.hpp>
+#include <events/Delta.hpp>
+#include <events/Disconnect.hpp>
+#include <events/DisconnectAll.hpp>
+#include <events/Get.hpp>
+#include <events/Mark.hpp>
+#include <events/Move.hpp>
+#include <events/Undo.hpp>
+#include <ingen/Message.hpp>
#include <variant>
diff --git a/src/server/EventWriter.hpp b/src/server/EventWriter.hpp
index ea35ceea..55ee1158 100644
--- a/src/server/EventWriter.hpp
+++ b/src/server/EventWriter.hpp
@@ -20,9 +20,9 @@
#include "Event.hpp"
#include "types.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Message.hpp"
-#include "ingen/URI.hpp"
+#include <ingen/Interface.hpp>
+#include <ingen/Message.hpp>
+#include <ingen/URI.hpp>
#include <memory>
diff --git a/src/server/FrameTimer.hpp b/src/server/FrameTimer.hpp
index 1f653f67..0078f99c 100644
--- a/src/server/FrameTimer.hpp
+++ b/src/server/FrameTimer.hpp
@@ -94,12 +94,12 @@ private:
const double b;
const double c;
- uint64_t nper = 0u;
+ uint64_t nper = 0U;
double e2 = 0.0;
double t0 = 0.0;
double t1 = 0.0;
- uint64_t n0 = 0u;
- uint64_t n1 = 0u;
+ uint64_t n0 = 0U;
+ uint64_t n1 = 0U;
bool initialized = false;
};
diff --git a/src/server/GraphImpl.cpp b/src/server/GraphImpl.cpp
index 0d3c5234..9e44a4d4 100644
--- a/src/server/GraphImpl.cpp
+++ b/src/server/GraphImpl.cpp
@@ -28,20 +28,21 @@
#include "PortImpl.hpp"
#include "ThreadManager.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "lv2/urid/urid.h"
-#include "raul/Array.hpp"
-#include "raul/Maid.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/Forge.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <lv2/urid/urid.h>
+#include <raul/Array.hpp>
+#include <raul/Maid.hpp>
+#include <raul/Symbol.hpp>
#include <cassert>
#include <cstddef>
#include <map>
#include <memory>
+#include <string>
#include <unordered_map>
namespace ingen::server {
@@ -331,7 +332,7 @@ bool
GraphImpl::has_port_with_index(uint32_t index) const
{
BufferFactory& bufs = *_engine.buffer_factory();
- const auto index_atom = bufs.forge().make(int32_t(index));
+ const auto index_atom = bufs.forge().make(static_cast<int32_t>(index));
for (const auto& p : _inputs) {
if (p.has_property(bufs.uris().lv2_index, index_atom)) {
diff --git a/src/server/GraphImpl.hpp b/src/server/GraphImpl.hpp
index c5f978fb..6c852106 100644
--- a/src/server/GraphImpl.hpp
+++ b/src/server/GraphImpl.hpp
@@ -23,9 +23,10 @@
#include "server.h"
#include "types.hpp"
-#include "lv2/urid/urid.h"
-#include "raul/Maid.hpp"
+#include <lv2/urid/urid.h>
+#include <raul/Maid.hpp>
+#include <boost/intrusive/options.hpp>
#include <boost/intrusive/slist.hpp>
#include <cassert>
@@ -33,21 +34,15 @@
#include <memory>
#include <utility>
-// IWYU pragma: no_include "CompiledGraph.hpp"
-
namespace raul {
class Symbol;
} // namespace raul
-namespace boost::intrusive {
-template <bool Enabled> struct constant_time_size;
-} // namespace boost::intrusive
-
namespace ingen::server {
class ArcImpl;
class BufferFactory;
-class CompiledGraph; // IWYU pragma: keep
+class CompiledGraph;
class Engine;
class PortImpl;
class RunContext;
@@ -102,9 +97,14 @@ public:
* Audio thread.
*
* \param ctx Process context
+ *
* \param bufs New set of buffers
- * \param poly Must be < the most recent value passed to prepare_internal_poly.
- * \param maid Any objects no longer needed will be pushed to this
+ *
+ * \param poly Must be < the most recent value passed to
+ * prepare_internal_poly.
+ *
+ * \param maid Any objects no longer needed will be
+ * pushed to this
*/
bool apply_internal_poly(RunContext& ctx,
BufferFactory& bufs,
diff --git a/src/server/GraphPlugin.hpp b/src/server/GraphPlugin.hpp
index ac89c7a9..302141e7 100644
--- a/src/server/GraphPlugin.hpp
+++ b/src/server/GraphPlugin.hpp
@@ -19,10 +19,10 @@
#include "PluginImpl.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "lilv/lilv.h"
-#include "raul/Symbol.hpp"
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <lilv/lilv.h>
+#include <raul/Symbol.hpp>
#include <string>
diff --git a/src/server/InputPort.cpp b/src/server/InputPort.cpp
index 4a464ea8..01622209 100644
--- a/src/server/InputPort.cpp
+++ b/src/server/InputPort.cpp
@@ -23,16 +23,18 @@
#include "BufferRef.hpp"
#include "GraphImpl.hpp"
#include "NodeImpl.hpp"
+#include "PortType.hpp"
#include "RunContext.hpp"
#include "mix.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Node.hpp"
-#include "ingen/URIs.hpp"
-#include "lv2/urid/urid.h"
-#include "raul/Array.hpp"
-#include "raul/Maid.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Node.hpp>
+#include <ingen/URIs.hpp>
+#include <lv2/urid/urid.h>
+#include <raul/Array.hpp>
+#include <raul/Maid.hpp>
+#include <algorithm>
#include <cassert>
#include <cstdlib>
#include <memory>
@@ -176,7 +178,7 @@ InputPort::pre_run(RunContext& ctx)
{
if ((_user_buffer || !_arcs.empty()) && !direct_connect()) {
const uint32_t src_poly = max_tail_poly(ctx);
- const uint32_t max_n_srcs = _arcs.size() * src_poly + 1;
+ const uint32_t max_n_srcs = (_arcs.size() * src_poly) + 1;
for (uint32_t v = 0; v < _poly; ++v) {
if (!buffer(v)->get<void>()) {
@@ -230,9 +232,7 @@ InputPort::next_value_offset(SampleCount offset, SampleCount end) const
for (const auto& arc : _arcs) {
const SampleCount o = arc.tail()->next_value_offset(offset, end);
- if (o < earliest) {
- earliest = o;
- }
+ earliest = std::min(o, earliest);
}
return earliest;
diff --git a/src/server/InputPort.hpp b/src/server/InputPort.hpp
index 834a6d8a..f3c6e553 100644
--- a/src/server/InputPort.hpp
+++ b/src/server/InputPort.hpp
@@ -17,14 +17,14 @@
#ifndef INGEN_ENGINE_INPUTPORT_HPP
#define INGEN_ENGINE_INPUTPORT_HPP
-#include "ArcImpl.hpp" // IWYU pragma: keep
+#include "ArcImpl.hpp"
#include "PortImpl.hpp"
-#include "PortType.hpp"
#include "types.hpp"
-#include "lv2/urid/urid.h"
-#include "raul/Maid.hpp"
+#include <lv2/urid/urid.h>
+#include <raul/Maid.hpp>
+#include <boost/intrusive/options.hpp>
#include <boost/intrusive/slist.hpp>
#include <cstdint>
@@ -34,14 +34,10 @@ namespace raul {
class Symbol;
} // namespace raul
-namespace boost::intrusive {
-
-template <bool Enabled> struct constant_time_size;
-
-} // namespace boost::intrusive
-
namespace ingen {
+enum class PortType;
+
class Atom;
namespace server {
@@ -100,7 +96,7 @@ public:
/** Like `get_buffers`, but for the pre-process thread.
*
- * This uses the "current" number of arcs fromthe perspective of the
+ * This uses the "current" number of arcs from the perspective of the
* pre-process thread to allocate buffers for application of a
* connection/disconnection/etc in the next process cycle.
*/
diff --git a/src/server/InternalBlock.cpp b/src/server/InternalBlock.cpp
index 68e1f3e8..2eb0d411 100644
--- a/src/server/InternalBlock.cpp
+++ b/src/server/InternalBlock.cpp
@@ -23,8 +23,8 @@
#include "PluginImpl.hpp"
#include "PortImpl.hpp"
-#include "ingen/URIs.hpp"
-#include "raul/Array.hpp"
+#include <ingen/URIs.hpp>
+#include <raul/Array.hpp>
#include <boost/smart_ptr/intrusive_ptr.hpp>
@@ -43,7 +43,6 @@ class Atom;
namespace server {
class GraphImpl;
-class RunContext;
InternalBlock::InternalBlock(PluginImpl* plugin,
const raul::Symbol& symbol,
diff --git a/src/server/InternalBlock.hpp b/src/server/InternalBlock.hpp
index 9db7325a..9eca9716 100644
--- a/src/server/InternalBlock.hpp
+++ b/src/server/InternalBlock.hpp
@@ -26,10 +26,8 @@ class Symbol;
namespace ingen::server {
-class Engine;
class GraphImpl;
class PluginImpl;
-class RunContext;
/** An internal Block implemented inside Ingen.
*
diff --git a/src/server/InternalPlugin.cpp b/src/server/InternalPlugin.cpp
index b2f2bae7..7670c931 100644
--- a/src/server/InternalPlugin.cpp
+++ b/src/server/InternalPlugin.cpp
@@ -24,9 +24,10 @@
#include "internals/Trigger.hpp"
#include "types.hpp"
-#include "ingen/URIs.hpp"
-#include "lilv/lilv.h"
-#include "raul/Symbol.hpp"
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <lilv/lilv.h>
+#include <raul/Symbol.hpp>
#include <utility>
diff --git a/src/server/InternalPlugin.hpp b/src/server/InternalPlugin.hpp
index 9dfabc5f..4d715491 100644
--- a/src/server/InternalPlugin.hpp
+++ b/src/server/InternalPlugin.hpp
@@ -19,9 +19,9 @@
#include "PluginImpl.hpp"
-#include "ingen/URI.hpp"
-#include "lilv/lilv.h"
-#include "raul/Symbol.hpp"
+#include <ingen/URI.hpp>
+#include <lilv/lilv.h>
+#include <raul/Symbol.hpp>
#define NS_INTERNALS "http://drobilla.net/ns/ingen-internals#"
@@ -31,11 +31,6 @@ class URIs;
namespace server {
-class BlockImpl;
-class BufferFactory;
-class Engine;
-class GraphImpl;
-
/** Implementation of an Internal plugin.
*/
class InternalPlugin : public PluginImpl
diff --git a/src/server/JackDriver.cpp b/src/server/JackDriver.cpp
index d991879e..e508c850 100644
--- a/src/server/JackDriver.cpp
+++ b/src/server/JackDriver.cpp
@@ -21,6 +21,7 @@
#include "BufferRef.hpp"
#include "DuplexPort.hpp"
#include "Engine.hpp"
+#include "FrameTimer.hpp"
#include "GraphImpl.hpp"
#include "PortType.hpp"
#include "RunContext.hpp"
@@ -28,20 +29,21 @@
#include "ingen_config.h"
#include "util.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Configuration.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIMap.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "lv2/atom/atom.h"
-#include "lv2/atom/forge.h"
-#include "lv2/atom/util.h"
-#include "raul/Path.hpp"
-#include "raul/Semaphore.hpp"
-
+#include <ingen/Atom.hpp>
+#include <ingen/Configuration.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIMap.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <lv2/atom/atom.h>
+#include <lv2/atom/forge.h>
+#include <lv2/atom/util.h>
+#include <raul/Path.hpp>
+#include <raul/Semaphore.hpp>
+
+#include <jack/jack.h>
#include <jack/midiport.h>
#include <jack/transport.h>
@@ -52,6 +54,7 @@
#include <cassert>
#include <chrono>
+#include <cstdint>
#include <map>
#include <string>
#include <utility>
@@ -109,7 +112,8 @@ JackDriver::attach(const std::string& server_name,
_sample_rate = jack_get_sample_rate(_client);
_block_length = jack_get_buffer_size(_client);
- _seq_size = jack_port_type_get_buffer_size(_client, JACK_DEFAULT_MIDI_TYPE);
+ _seq_size = static_cast<uint32_t>(
+ jack_port_type_get_buffer_size(_client, JACK_DEFAULT_MIDI_TYPE));
_fallback_buffer = AudioBufPtr(
static_cast<float*>(
@@ -124,6 +128,8 @@ JackDriver::attach(const std::string& server_name,
register_port(p);
}
+ _timer = std::make_unique<FrameTimer>(_block_length, _sample_rate);
+
return true;
}
@@ -257,14 +263,14 @@ void
JackDriver::rename_port(const raul::Path& old_path,
const raul::Path& new_path)
{
- EnginePort* eport = get_port(old_path);
+ const EnginePort* eport = get_port(old_path);
if (eport) {
#if USE_JACK_PORT_RENAME
jack_port_rename(_client,
static_cast<jack_port_t*>(eport->handle()),
new_path.substr(1).c_str());
#else
- jack_port_set_name((jack_port_t*)eport->handle(),
+ jack_port_set_name(static_cast<jack_port_t*>(eport->handle()),
new_path.substr(1).c_str());
#endif
}
@@ -457,6 +463,12 @@ JackDriver::append_time_events(RunContext& ctx, Buffer& buffer)
static_cast<const uint8_t*>(LV2_ATOM_BODY_CONST(lpos)));
}
+SampleCount
+JackDriver::frame_time() const
+{
+ return _timer->frame_time(_engine.current_time()) + _engine.block_length();
+}
+
/**** Jack Callbacks ****/
/** Jack process callback, drives entire audio thread.
@@ -479,6 +491,7 @@ JackDriver::_process_cb(jack_nframes_t nframes)
_transport_state = jack_transport_query(_client, &_position);
+ _timer->update(_engine.current_time(), start_of_current_cycle - _engine.block_length());
_engine.locate(start_of_current_cycle, nframes);
// Read input
@@ -520,14 +533,19 @@ JackDriver::_shutdown_cb()
int
JackDriver::_block_length_cb(jack_nframes_t nframes)
{
+ const URIs& uris = _engine.world().uris();
+
if (_engine.root_graph()) {
_block_length = nframes;
- _seq_size = jack_port_type_get_buffer_size(_client, JACK_DEFAULT_MIDI_TYPE);
+ _seq_size = static_cast<uint32_t>(
+ jack_port_type_get_buffer_size(_client, JACK_DEFAULT_MIDI_TYPE));
_engine.root_graph()->set_buffer_size(
- _engine.run_context(), *_engine.buffer_factory(), PortType::AUDIO,
+ _engine.run_context(), *_engine.buffer_factory(),
+ uris.atom_Sound,
_engine.buffer_factory()->audio_buffer_size(nframes));
_engine.root_graph()->set_buffer_size(
- _engine.run_context(), *_engine.buffer_factory(), PortType::ATOM,
+ _engine.run_context(), *_engine.buffer_factory(),
+ uris.atom_Sequence,
_seq_size);
}
return 0;
diff --git a/src/server/JackDriver.hpp b/src/server/JackDriver.hpp
index 8bb7cff3..4c8e779e 100644
--- a/src/server/JackDriver.hpp
+++ b/src/server/JackDriver.hpp
@@ -18,43 +18,35 @@
#define INGEN_ENGINE_JACKAUDIODRIVER_HPP
#include "Driver.hpp"
-#include "EnginePort.hpp" // IWYU pragma: keep
+#include "EnginePort.hpp"
#include "types.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/memory.hpp" // IWYU pragma: keep
-#include "lv2/atom/forge.h"
-#include "raul/Semaphore.hpp"
+#include <ingen/URI.hpp>
+#include <ingen/memory.hpp>
+#include <lv2/atom/forge.h>
+#include <raul/Semaphore.hpp>
+#include <boost/intrusive/options.hpp>
#include <boost/intrusive/slist.hpp>
-#include <jack/jack.h>
-#include <jack/thread.h>
+#include <jack/transport.h> // IWYU pragma: keep
#include <jack/types.h>
+#include <jack/thread.h>
+
#include <atomic>
-#include <cstddef>
#include <cstdint>
#include <exception>
#include <memory>
#include <string>
-namespace raul {
-class Path;
-} // namespace raul
-
-namespace boost::intrusive {
-template <bool Enabled> struct cache_last;
-} // namespace boost::intrusive
-
namespace ingen {
class Atom;
namespace server {
-class Buffer;
-class DuplexPort;
class Engine;
+class FrameTimer;
class RunContext;
/** The Jack Driver.
@@ -103,12 +95,10 @@ public:
jack_client_t* jack_client() const { return _client; }
SampleCount block_length() const override { return _block_length; }
- size_t seq_size() const override { return _seq_size; }
+ uint32_t seq_size() const override { return _seq_size; }
SampleCount sample_rate() const override { return _sample_rate; }
- SampleCount frame_time() const override {
- return _client ? jack_frame_time(_client) : 0;
- }
+ SampleCount frame_time() const override;
class PortRegistrationFailedException : public std::exception
{};
@@ -121,7 +111,7 @@ private:
// Static JACK callbacks which call the non-static callbacks (methods)
static void shutdown_cb(void* const jack_driver) {
- return static_cast<JackDriver*>(jack_driver)->_shutdown_cb();
+ static_cast<JackDriver*>(jack_driver)->_shutdown_cb();
}
static int process_cb(jack_nframes_t nframes, void* const jack_driver) {
@@ -152,23 +142,24 @@ protected:
using AudioBufPtr = std::unique_ptr<float, FreeDeleter<float>>;
- Engine& _engine;
- Ports _ports;
- AudioBufPtr _fallback_buffer;
- LV2_Atom_Forge _forge;
- raul::Semaphore _sem{0};
- std::atomic<bool> _flag{false};
- jack_client_t* _client{nullptr};
- jack_nframes_t _block_length{0};
- size_t _seq_size{0};
- jack_nframes_t _sample_rate{0};
- uint32_t _midi_event_type;
- bool _is_activated{false};
- jack_position_t _position{};
- jack_transport_state_t _transport_state{};
- double _old_bpm{120.0};
- jack_nframes_t _old_frame{0};
- bool _old_rolling{false};
+ Engine& _engine;
+ Ports _ports;
+ AudioBufPtr _fallback_buffer;
+ LV2_Atom_Forge _forge;
+ raul::Semaphore _sem{0};
+ std::unique_ptr<FrameTimer> _timer;
+ std::atomic<bool> _flag{false};
+ jack_client_t* _client{nullptr};
+ jack_nframes_t _block_length{0};
+ uint32_t _seq_size{0};
+ jack_nframes_t _sample_rate{0};
+ uint32_t _midi_event_type;
+ bool _is_activated{false};
+ jack_position_t _position{};
+ jack_transport_state_t _transport_state{};
+ double _old_bpm{120.0};
+ jack_nframes_t _old_frame{0};
+ bool _old_rolling{false};
};
} // namespace server
diff --git a/src/server/LV2Block.cpp b/src/server/LV2Block.cpp
index c5cd73dc..ad7b28ae 100644
--- a/src/server/LV2Block.cpp
+++ b/src/server/LV2Block.cpp
@@ -28,25 +28,27 @@
#include "RunContext.hpp"
#include "Worker.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/FilePath.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIMap.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "lilv/lilv.h"
-#include "lv2/core/lv2.h"
-#include "lv2/options/options.h"
-#include "lv2/state/state.h"
-#include "lv2/urid/urid.h"
-#include "lv2/worker/worker.h"
-#include "raul/Array.hpp"
-#include "raul/Maid.hpp"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/FilePath.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/LV2Features.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIMap.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <lilv/lilv.h>
+#include <lv2/core/lv2.h>
+#include <lv2/options/options.h>
+#include <lv2/state/state.h>
+#include <lv2/urid/urid.h>
+#include <lv2/worker/worker.h>
+#include <raul/Array.hpp>
+#include <raul/Maid.hpp>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
#include <algorithm>
#include <cassert>
@@ -54,6 +56,7 @@
#include <cstdint>
#include <map>
#include <memory>
+#include <optional>
#include <string>
#include <utility>
@@ -110,7 +113,7 @@ LV2Block::make_instance(URIs& uris,
}
for (uint32_t p = 0; p < num_ports(); ++p) {
- PortImpl* const port = _ports->at(p);
+ const PortImpl* const port = _ports->at(p);
Buffer* const buffer = (preparing)
? port->prepared_buffer(voice).get()
: port->buffer(voice).get();
@@ -223,7 +226,7 @@ LV2Block::apply_poly(RunContext& ctx, uint32_t poly)
/** Instantiate self from LV2 plugin descriptor.
*
- * Implemented as a seperate function (rather than in the constructor) to
+ * Implemented as a separate function (rather than in the constructor) to
* allow graceful error-catching of broken plugins.
*
* Returns whether or not plugin was successfully instantiated. If return
@@ -693,8 +696,8 @@ get_port_value(const char* port_symbol,
uint32_t* size,
uint32_t* type)
{
- auto* const block = static_cast<LV2Block*>(user_data);
- auto* const port = block->port_by_symbol(port_symbol);
+ auto* const block = static_cast<LV2Block*>(user_data);
+ const auto* const port = block->port_by_symbol(port_symbol);
if (port && port->is_input() && port->value().is_valid()) {
*size = port->value().size();
diff --git a/src/server/LV2Block.hpp b/src/server/LV2Block.hpp
index fd446106..78b5ffac 100644
--- a/src/server/LV2Block.hpp
+++ b/src/server/LV2Block.hpp
@@ -22,15 +22,14 @@
#include "State.hpp"
#include "types.hpp"
-#include "ingen/LV2Features.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/URI.hpp"
-#include "lilv/lilv.h"
-#include "lv2/worker/worker.h"
-#include "raul/Array.hpp"
-#include "raul/Maid.hpp"
-#include "raul/Noncopyable.hpp"
-
+#include <ingen/LV2Features.hpp>
+#include <lilv/lilv.h>
+#include <lv2/worker/worker.h>
+#include <raul/Array.hpp>
+#include <raul/Maid.hpp>
+#include <raul/Noncopyable.hpp>
+
+#include <boost/intrusive/options.hpp>
#include <boost/intrusive/slist.hpp>
#include <boost/intrusive/slist_hook.hpp>
@@ -40,36 +39,21 @@
#include <filesystem>
#include <memory>
#include <mutex>
-#include <optional>
namespace raul {
class Symbol;
} // namespace raul
-namespace boost::intrusive {
-
-template <bool Enabled>
-struct cache_last;
-
-template <bool Enabled>
-struct constant_time_size;
-
-} // namespace boost::intrusive
-
namespace ingen {
-class Resource;
class URIs;
class World;
namespace server {
class BufferFactory;
-class Engine;
class GraphImpl;
class LV2Plugin;
-class RunContext;
-class Worker;
/** An instance of a LV2 plugin.
*
@@ -133,7 +117,7 @@ protected:
std::shared_ptr<Instance>
make_instance(URIs& uris, SampleRate rate, uint32_t voice, bool preparing);
- inline LilvInstance* instance(uint32_t voice) {
+ LilvInstance* instance(uint32_t voice) {
return static_cast<LilvInstance*>((*_instances)[voice]->instance);
}
diff --git a/src/server/LV2Options.hpp b/src/server/LV2Options.hpp
index 02824be6..b1b57429 100644
--- a/src/server/LV2Options.hpp
+++ b/src/server/LV2Options.hpp
@@ -17,10 +17,10 @@
#ifndef INGEN_ENGINE_LV2OPTIONS_HPP
#define INGEN_ENGINE_LV2OPTIONS_HPP
-#include "ingen/LV2Features.hpp"
-#include "ingen/URIs.hpp"
-#include "lv2/core/lv2.h"
-#include "lv2/options/options.h"
+#include <ingen/LV2Features.hpp>
+#include <ingen/URIs.hpp>
+#include <lv2/core/lv2.h>
+#include <lv2/options/options.h>
#include <cstdint>
#include <cstdlib>
diff --git a/src/server/LV2Plugin.cpp b/src/server/LV2Plugin.cpp
index 1e88952e..87072ab0 100644
--- a/src/server/LV2Plugin.cpp
+++ b/src/server/LV2Plugin.cpp
@@ -19,12 +19,13 @@
#include "Engine.hpp"
#include "LV2Block.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "lilv/lilv.h"
-#include "raul/Symbol.hpp"
+#include <ingen/Forge.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <lilv/lilv.h>
+#include <raul/Symbol.hpp>
#include <cstdlib>
#include <string>
@@ -71,10 +72,10 @@ LV2Plugin::symbol() const
{
std::string working = uri();
if (working.back() == '/') {
- working = working.substr(0, working.length() - 1);
+ working.resize(working.length() - 1);
}
- while (working.length() > 0) {
+ while (!working.empty()) {
const size_t last_slash = working.find_last_of('/');
const std::string symbol = working.substr(last_slash+1);
if ( (symbol[0] >= 'a' && symbol[0] <= 'z')
@@ -82,7 +83,7 @@ LV2Plugin::symbol() const
return raul::Symbol::symbolify(symbol);
}
- working = working.substr(0, last_slash);
+ working.resize(last_slash);
}
return raul::Symbol("lv2_symbol");
diff --git a/src/server/LV2Plugin.hpp b/src/server/LV2Plugin.hpp
index fa007327..c94e88f7 100644
--- a/src/server/LV2Plugin.hpp
+++ b/src/server/LV2Plugin.hpp
@@ -19,9 +19,8 @@
#include "PluginImpl.hpp"
-#include "ingen/URI.hpp"
-#include "lilv/lilv.h"
-#include "raul/Symbol.hpp"
+#include <ingen/URI.hpp>
+#include <lilv/lilv.h>
namespace ingen {
@@ -29,11 +28,6 @@ class World;
namespace server {
-class BlockImpl;
-class BufferFactory;
-class Engine;
-class GraphImpl;
-
/** Implementation of an LV2 plugin (loaded shared library).
*/
class LV2Plugin : public PluginImpl
diff --git a/src/server/LV2ResizeFeature.hpp b/src/server/LV2ResizeFeature.hpp
index 485695d7..66720e0d 100644
--- a/src/server/LV2ResizeFeature.hpp
+++ b/src/server/LV2ResizeFeature.hpp
@@ -21,8 +21,8 @@
#include "Buffer.hpp"
#include "PortImpl.hpp"
-#include "ingen/LV2Features.hpp"
-#include "lv2/resize-port/resize-port.h"
+#include <ingen/LV2Features.hpp>
+#include <lv2/resize-port/resize-port.h>
#include <memory>
diff --git a/src/server/Load.hpp b/src/server/Load.hpp
index c2f1f3df..a5216f7e 100644
--- a/src/server/Load.hpp
+++ b/src/server/Load.hpp
@@ -38,8 +38,8 @@ struct Load {
mean = load;
changed = true;
} else {
- const float a = mean + (static_cast<float>(load) - mean) /
- static_cast<float>(++n);
+ const float a = mean + ((static_cast<float>(load) - mean) /
+ static_cast<float>(++n));
if (a != mean) {
changed = floorf(a) != floorf(mean);
diff --git a/src/server/NodeImpl.cpp b/src/server/NodeImpl.cpp
index c76c66d4..e820a44e 100644
--- a/src/server/NodeImpl.cpp
+++ b/src/server/NodeImpl.cpp
@@ -20,9 +20,10 @@
#include "GraphImpl.hpp"
#include "ThreadManager.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Properties.hpp"
-#include "raul/Path.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Node.hpp>
+#include <ingen/Properties.hpp>
+#include <raul/Path.hpp>
#include <map>
#include <utility>
diff --git a/src/server/NodeImpl.hpp b/src/server/NodeImpl.hpp
index 8acce161..fcf2f57f 100644
--- a/src/server/NodeImpl.hpp
+++ b/src/server/NodeImpl.hpp
@@ -17,17 +17,15 @@
#ifndef INGEN_ENGINE_NODEIMPL_HPP
#define INGEN_ENGINE_NODEIMPL_HPP
-#include "ingen/Node.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/paths.hpp"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/Node.hpp>
+#include <ingen/paths.hpp>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
#include <cstdint>
namespace ingen {
-class Atom;
class URIs;
namespace server {
diff --git a/src/server/OutputPort.hpp b/src/server/OutputPort.hpp
index 61fb44f5..b19cd361 100644
--- a/src/server/OutputPort.hpp
+++ b/src/server/OutputPort.hpp
@@ -20,7 +20,7 @@
#include "PortImpl.hpp"
#include "PortType.hpp"
-#include "lv2/urid/urid.h"
+#include <lv2/urid/urid.h>
#include <cstddef>
#include <cstdint>
diff --git a/src/server/PluginImpl.hpp b/src/server/PluginImpl.hpp
index 3184be11..8e3642c0 100644
--- a/src/server/PluginImpl.hpp
+++ b/src/server/PluginImpl.hpp
@@ -17,11 +17,11 @@
#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 <ingen/Atom.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/URI.hpp>
+#include <lilv/lilv.h>
+#include <raul/Symbol.hpp>
#include <map>
#include <string>
diff --git a/src/server/PortAudioDriver.cpp b/src/server/PortAudioDriver.cpp
index 11bca592..ef893478 100644
--- a/src/server/PortAudioDriver.cpp
+++ b/src/server/PortAudioDriver.cpp
@@ -21,11 +21,12 @@
#include "FrameTimer.hpp"
#include "PortType.hpp"
#include "RunContext.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Configuration.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "raul/Path.hpp"
+
+#include <ingen/Atom.hpp>
+#include <ingen/Configuration.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <raul/Path.hpp>
#include <portaudio.h>
diff --git a/src/server/PortAudioDriver.hpp b/src/server/PortAudioDriver.hpp
index 9f17a100..6c7bfb9e 100644
--- a/src/server/PortAudioDriver.hpp
+++ b/src/server/PortAudioDriver.hpp
@@ -18,39 +18,21 @@
#define INGEN_ENGINE_PORTAUDIODRIVER_HPP
#include "Driver.hpp"
-#include "EnginePort.hpp" // IWYU pragma: keep
+#include "EnginePort.hpp"
#include "types.hpp"
-#include "ingen/URI.hpp"
-#include "raul/Semaphore.hpp"
+#include <raul/Semaphore.hpp>
+#include <boost/intrusive/options.hpp>
#include <boost/intrusive/slist.hpp>
#include <portaudio.h>
#include <atomic>
-#include <cstddef>
#include <cstdint>
#include <memory>
-namespace raul {
-class Path;
-} // namespace raul
+namespace ingen::server {
-namespace boost::intrusive {
-
-template <bool Enabled>
-struct cache_last;
-
-} // namespace boost::intrusive
-
-namespace ingen {
-
-class Atom;
-
-namespace server {
-
-class Buffer;
-class DuplexPort;
class Engine;
class FrameTimer;
class RunContext;
@@ -83,7 +65,7 @@ public:
int real_time_priority() override { return 80; }
SampleCount block_length() const override { return _block_length; }
- size_t seq_size() const override { return _seq_size; }
+ uint32_t seq_size() const override { return _seq_size; }
SampleCount sample_rate() const override { return _sample_rate; }
private:
@@ -124,19 +106,18 @@ protected:
Ports _ports;
PaStreamParameters _inputParameters;
PaStreamParameters _outputParameters;
- raul::Semaphore _sem{0};
+ raul::Semaphore _sem{0U};
std::unique_ptr<FrameTimer> _timer;
PaStream* _stream{nullptr};
- size_t _seq_size{4096};
+ uint32_t _seq_size{4096U};
uint32_t _block_length;
- uint32_t _sample_rate{48000};
- uint32_t _n_inputs{0};
- uint32_t _n_outputs{0};
+ uint32_t _sample_rate{48000U};
+ uint32_t _n_inputs{0U};
+ uint32_t _n_outputs{0U};
std::atomic<bool> _flag{false};
bool _is_activated{false};
};
-} // namespace server
-} // namespace ingen
+} // namespace ingen::server
#endif // INGEN_ENGINE_PORTAUDIODRIVER_HPP
diff --git a/src/server/PortImpl.cpp b/src/server/PortImpl.cpp
index c7b20f2b..f6eed11f 100644
--- a/src/server/PortImpl.cpp
+++ b/src/server/PortImpl.cpp
@@ -23,16 +23,17 @@
#include "PortType.hpp"
#include "ThreadManager.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Node.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "lv2/atom/atom.h"
-#include "lv2/atom/util.h"
-#include "lv2/urid/urid.h"
-#include "raul/Array.hpp"
-#include "raul/Maid.hpp"
-#include "raul/Path.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Node.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <lv2/atom/atom.h>
+#include <lv2/atom/util.h>
+#include <lv2/urid/urid.h>
+#include <raul/Array.hpp>
+#include <raul/Maid.hpp>
+#include <raul/Path.hpp>
#include <algorithm>
#include <cassert>
@@ -136,13 +137,13 @@ PortImpl::set_type(PortType port_type, LV2_URID buffer_type)
remove_property(uris.rdf_type, uris.lv2_CVPort);
remove_property(uris.rdf_type, uris.lv2_ControlPort);
remove_property(uris.rdf_type, uris.atom_AtomPort);
- add_property(uris.rdf_type, world.forge().make_urid(port_type.uri()));
+ add_property(uris.rdf_type, world.forge().make_urid(port_type_uri(port_type)));
// Update audio thread types
_type = port_type;
_buffer_type = buffer_type;
if (!_buffer_type) {
- switch (_type.id()) {
+ switch (_type) {
case PortType::CONTROL:
_buffer_type = uris.atom_Float;
break;
@@ -238,7 +239,7 @@ PortImpl::set_voice_value(const RunContext& ctx,
FrameTime time,
Sample value)
{
- switch (_type.id()) {
+ switch (_type) {
case PortType::CONTROL:
if (buffer(voice)->value()) {
const_cast<LV2_Atom_Float*>(
@@ -420,7 +421,7 @@ PortImpl::set_is_driver_port(BufferFactory&)
void
PortImpl::clear_buffers(const RunContext& ctx)
{
- switch (_type.id()) {
+ switch (_type) {
case PortType::AUDIO:
default:
for (uint32_t v = 0; v < _poly; ++v) {
@@ -453,7 +454,7 @@ PortImpl::monitor(RunContext& ctx, bool send_now)
_frames_since_monitor += ctx.nframes();
const bool time_to_send = send_now || _frames_since_monitor >= period;
- const bool is_sequence = (_type.id() == PortType::ATOM &&
+ const bool is_sequence = (_type == PortType::ATOM &&
_buffer_type == _bufs.uris().atom_Sequence);
if (!time_to_send && !(is_sequence && _monitored) && (!is_sequence && buffer(0)->value())) {
return;
@@ -463,7 +464,7 @@ PortImpl::monitor(RunContext& ctx, bool send_now)
const URIs& uris = ctx.engine().world().uris();
LV2_URID key = 0;
float val = 0.0f;
- switch (_type.id()) {
+ switch (_type) {
case PortType::UNKNOWN:
break;
case PortType::AUDIO:
@@ -536,9 +537,7 @@ PortImpl::next_value_offset(SampleCount offset, SampleCount end) const
SampleCount earliest = end;
for (uint32_t v = 0; v < _poly; ++v) {
const SampleCount o = _voices->at(v).buffer->next_value_offset(offset, end);
- if (o < earliest) {
- earliest = o;
- }
+ earliest = std::min(o, earliest);
}
return earliest;
}
diff --git a/src/server/PortImpl.hpp b/src/server/PortImpl.hpp
index 64c3322f..c202d4a0 100644
--- a/src/server/PortImpl.hpp
+++ b/src/server/PortImpl.hpp
@@ -20,16 +20,15 @@
#include "BufferFactory.hpp"
#include "BufferRef.hpp"
#include "NodeImpl.hpp"
-#include "PortType.hpp"
#include "RunContext.hpp"
#include "server.h"
#include "types.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/URIs.hpp"
-#include "lv2/urid/urid.h"
-#include "raul/Array.hpp"
-#include "raul/Maid.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/URIs.hpp>
+#include <lv2/urid/urid.h>
+#include <raul/Array.hpp>
+#include <raul/Maid.hpp>
#include <atomic>
#include <cstdint>
@@ -42,6 +41,8 @@ class Symbol;
namespace ingen {
+enum class PortType;
+
class Properties;
namespace server {
diff --git a/src/server/PortType.hpp b/src/server/PortType.hpp
index 65f87d02..294c056a 100644
--- a/src/server/PortType.hpp
+++ b/src/server/PortType.hpp
@@ -14,81 +14,60 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef INGEN_INTERFACE_PORTTYPE_HPP
-#define INGEN_INTERFACE_PORTTYPE_HPP
+#ifndef INGEN_ENGINE_PORTTYPE_HPP
+#define INGEN_ENGINE_PORTTYPE_HPP
-#include "ingen/URI.hpp"
-
-#include "lv2/atom/atom.h"
-#include "lv2/core/lv2.h"
-
-#include <cassert>
+#include <ingen/URI.hpp>
+#include <lv2/atom/atom.h>
+#include <lv2/core/lv2.h>
namespace ingen {
-/** The type of a port.
- *
- * This type refers to the type of the port itself (not necessarily the type
- * of its contents). Ports with different types can contain the same type of
- * data, but may e.g. have different access semantics.
- */
-class PortType
-{
-public:
- enum ID {
- UNKNOWN = 0,
- AUDIO = 1,
- CONTROL = 2,
- CV = 3,
- ATOM = 4
- };
+/// The type of a port
+enum class PortType {
+ UNKNOWN,
+ AUDIO,
+ CONTROL,
+ CV,
+ ATOM,
+};
- explicit PortType(const URI& uri)
- : _id(UNKNOWN)
- {
- if (uri == type_uri(AUDIO)) {
- _id = AUDIO;
- } else if (uri == type_uri(CONTROL)) {
- _id = CONTROL;
- } else if (uri == type_uri(CV)) {
- _id = CV;
- } else if (uri == type_uri(ATOM)) {
- _id = ATOM;
- }
+/// Return the URI for `port_type`
+inline URI
+port_type_uri(const PortType port_type)
+{
+ switch (port_type) {
+ case PortType::UNKNOWN:
+ break;
+ case PortType::AUDIO:
+ return URI{LV2_CORE__AudioPort};
+ case PortType::CONTROL:
+ return URI{LV2_CORE__ControlPort};
+ case PortType::CV:
+ return URI{LV2_CORE__CVPort};
+ case PortType::ATOM:
+ return URI{LV2_ATOM__AtomPort};
}
- PortType(ID id) noexcept : _id(id) {}
-
- const URI& uri() const { return type_uri(_id); }
- ID id() const { return _id; }
+ return URI{"http://www.w3.org/2002/07/owl#Nothing"};
+}
- bool operator==(const ID& id) const { return (_id == id); }
- bool operator!=(const ID& id) const { return (_id != id); }
- bool operator==(const PortType& type) const { return (_id == type._id); }
- bool operator!=(const PortType& type) const { return (_id != type._id); }
- bool operator<(const PortType& type) const { return (_id < type._id); }
-
- bool is_audio() { return _id == AUDIO; }
- bool is_control() { return _id == CONTROL; }
- bool is_cv() { return _id == CV; }
- bool is_atom() { return _id == ATOM; }
-
-private:
- static const URI& type_uri(unsigned id_num) {
- assert(id_num <= ATOM);
- static const URI uris[] = {
- URI("http://www.w3.org/2002/07/owl#Nothing"),
- URI(LV2_CORE__AudioPort),
- URI(LV2_CORE__ControlPort),
- URI(LV2_CORE__CVPort),
- URI(LV2_ATOM__AtomPort)
- };
- return uris[id_num];
- }
-
- ID _id;
-};
+/// Return the type with the given `uri`, or #PortType::UNKNOWN
+inline PortType
+port_type_from_uri(const URI& uri)
+{
+ static const URI lv2_AudioPort = URI{LV2_CORE__AudioPort};
+ static const URI lv2_ControlPort = URI{LV2_CORE__ControlPort};
+ static const URI lv2_CVPort = URI{LV2_CORE__CVPort};
+ static const URI atom_AtomPort = URI{LV2_ATOM__AtomPort};
+
+ return (uri == lv2_AudioPort) ? PortType::AUDIO
+ : (uri == lv2_ControlPort) ? PortType::CONTROL
+ : (uri == lv2_CVPort) ? PortType::CV
+ : (uri == atom_AtomPort) ? PortType::ATOM
+ : PortType::UNKNOWN;
+}
} // namespace ingen
-#endif // INGEN_INTERFACE_PORTTYPE_HPP
+#endif // INGEN_ENGINE_PORTTYPE_HPP
diff --git a/src/server/PostProcessor.cpp b/src/server/PostProcessor.cpp
index a97fc451..4c071ecd 100644
--- a/src/server/PostProcessor.cpp
+++ b/src/server/PostProcessor.cpp
@@ -23,8 +23,6 @@
namespace ingen::server {
-class PreProcessContext;
-
class Sentinel : public Event
{
public:
diff --git a/src/server/PreProcessor.cpp b/src/server/PreProcessor.cpp
index f9d7ecb3..b3bad0b2 100644
--- a/src/server/PreProcessor.cpp
+++ b/src/server/PreProcessor.cpp
@@ -24,16 +24,17 @@
#include "ThreadManager.hpp"
#include "UndoStack.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/AtomWriter.hpp"
-#include "ingen/Configuration.hpp"
-#include "ingen/World.hpp"
-#include "raul/Semaphore.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/AtomWriter.hpp>
+#include <ingen/Configuration.hpp>
+#include <ingen/World.hpp>
+#include <raul/Semaphore.hpp>
#include <cassert>
#include <cstdint>
#include <cstdio>
#include <memory>
+#include <string>
namespace ingen::server {
@@ -64,7 +65,7 @@ PreProcessor::event(Event* const ev, Event::Mode mode)
/* Note that tail is only used here, not in process(). The head must be
checked first here, since if it is null the tail pointer is junk. */
- Event* const head = _head.load();
+ const Event* const head = _head.load();
if (!head) {
_head = ev;
_tail = ev;
@@ -150,7 +151,7 @@ PreProcessor::process(RunContext& ctx, PostProcessor& dest, size_t limit)
}
#endif
- auto* next = static_cast<Event*>(last->next());
+ auto* next = last->next();
last->next(nullptr);
dest.append(ctx, head, last);
@@ -242,7 +243,7 @@ PreProcessor::run()
wait_for_block_state(BlockState::UNBLOCKED);
}
- back = static_cast<Event*>(ev->next());
+ back = ev->next();
}
}
diff --git a/src/server/PreProcessor.hpp b/src/server/PreProcessor.hpp
index e0b0cc4a..03ba5dd7 100644
--- a/src/server/PreProcessor.hpp
+++ b/src/server/PreProcessor.hpp
@@ -19,7 +19,7 @@
#include "Event.hpp"
-#include "raul/Semaphore.hpp"
+#include <raul/Semaphore.hpp>
#include <atomic>
#include <chrono>
diff --git a/src/server/RunContext.cpp b/src/server/RunContext.cpp
index 95d68f57..29985ccf 100644
--- a/src/server/RunContext.cpp
+++ b/src/server/RunContext.cpp
@@ -22,15 +22,15 @@
#include "PortImpl.hpp"
#include "Task.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIMap.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "lv2/urid/urid.h"
-#include "raul/RingBuffer.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIMap.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <lv2/urid/urid.h>
+#include <raul/RingBuffer.hpp>
#include <cerrno>
#include <cstring>
diff --git a/src/server/RunContext.hpp b/src/server/RunContext.hpp
index a91a3e17..44304c5e 100644
--- a/src/server/RunContext.hpp
+++ b/src/server/RunContext.hpp
@@ -19,8 +19,8 @@
#include "types.hpp"
-#include "lv2/urid/urid.h"
-#include "raul/RingBuffer.hpp"
+#include <lv2/urid/urid.h>
+#include <raul/RingBuffer.hpp>
#include <cstdint>
#include <memory>
diff --git a/src/server/SocketListener.cpp b/src/server/SocketListener.cpp
index 075d78cc..fb961ee2 100644
--- a/src/server/SocketListener.cpp
+++ b/src/server/SocketListener.cpp
@@ -19,15 +19,16 @@
#include "Engine.hpp"
#include "SocketServer.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Configuration.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/World.hpp"
-#include "raul/Socket.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Configuration.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/World.hpp>
+#include <raul/Socket.hpp>
#include <poll.h>
#include <sys/stat.h>
+#include <sys/types.h>
#include <unistd.h>
#include <cerrno>
diff --git a/src/server/SocketListener.hpp b/src/server/SocketListener.hpp
index 65df5af5..a96105ef 100644
--- a/src/server/SocketListener.hpp
+++ b/src/server/SocketListener.hpp
@@ -14,7 +14,7 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "raul/Socket.hpp"
+#include <raul/Socket.hpp>
#include <memory>
#include <thread>
@@ -27,7 +27,7 @@ class Engine;
class SocketListener
{
public:
- SocketListener(Engine& engine);
+ explicit SocketListener(Engine& engine);
~SocketListener();
private:
diff --git a/src/server/SocketServer.hpp b/src/server/SocketServer.hpp
index 92bab5eb..608d180d 100644
--- a/src/server/SocketServer.hpp
+++ b/src/server/SocketServer.hpp
@@ -21,17 +21,17 @@
#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 <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>
diff --git a/src/server/State.hpp b/src/server/State.hpp
index 673b175b..976cf67d 100644
--- a/src/server/State.hpp
+++ b/src/server/State.hpp
@@ -17,7 +17,7 @@
#ifndef INGEN_ENGINE_STATE_HPP
#define INGEN_ENGINE_STATE_HPP
-#include "lilv/lilv.h"
+#include <lilv/lilv.h>
#include <memory>
diff --git a/src/server/Task.cpp b/src/server/Task.cpp
index 2b8ff0cd..345a4711 100644
--- a/src/server/Task.cpp
+++ b/src/server/Task.cpp
@@ -19,7 +19,7 @@
#include "BlockImpl.hpp"
#include "RunContext.hpp"
-#include "raul/Path.hpp"
+#include <raul/Path.hpp>
#include <cstddef>
#include <memory>
diff --git a/src/server/Task.hpp b/src/server/Task.hpp
index 30941f28..f2141bd5 100644
--- a/src/server/Task.hpp
+++ b/src/server/Task.hpp
@@ -17,7 +17,6 @@
#ifndef INGEN_ENGINE_TASK_HPP
#define INGEN_ENGINE_TASK_HPP
-#include <algorithm>
#include <atomic>
#include <cassert>
#include <deque>
@@ -40,13 +39,15 @@ public:
PARALLEL ///< Elements may be run in any order in parallel
};
- Task(Mode mode, BlockImpl* block = nullptr)
+ Task(Mode mode, BlockImpl* block)
: _block(block)
, _mode(mode)
{
assert(mode != Mode::SINGLE || block);
}
+ explicit Task(Mode mode) : Task{mode, nullptr} {}
+
Task(const Task&) = delete;
Task& operator=(const Task&) = delete;
diff --git a/src/server/ThreadManager.hpp b/src/server/ThreadManager.hpp
index 07a01c2b..2e0ad966 100644
--- a/src/server/ThreadManager.hpp
+++ b/src/server/ThreadManager.hpp
@@ -35,13 +35,13 @@ class INGEN_SERVER_API ThreadManager
public:
static void set_flag(ThreadFlag f) {
#ifndef NDEBUG
- flags = (static_cast<unsigned>(flags) | f);
+ flags |= static_cast<unsigned>(f);
#endif
}
static void unset_flag(ThreadFlag f) {
#ifndef NDEBUG
- flags = (static_cast<unsigned>(flags) & (~f));
+ flags &= ~static_cast<unsigned>(f);
#endif
}
diff --git a/src/server/UndoStack.cpp b/src/server/UndoStack.cpp
index abb9fe46..c6555123 100644
--- a/src/server/UndoStack.cpp
+++ b/src/server/UndoStack.cpp
@@ -16,14 +16,14 @@
#include "UndoStack.hpp"
-#include "ingen/URIMap.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/ingen.h"
-#include "lv2/atom/atom.h"
-#include "lv2/atom/util.h"
-#include "lv2/patch/patch.h"
-#include "serd/serd.h"
-#include "sratom/sratom.h"
+#include <ingen/URIMap.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/ingen.h>
+#include <lv2/atom/atom.h>
+#include <lv2/atom/util.h>
+#include <lv2/patch/patch.h>
+#include <serd/serd.h>
+#include <sratom/sratom.h>
#include <ctime>
#include <iterator>
diff --git a/src/server/UndoStack.hpp b/src/server/UndoStack.hpp
index 8195920a..443497cc 100644
--- a/src/server/UndoStack.hpp
+++ b/src/server/UndoStack.hpp
@@ -17,14 +17,13 @@
#ifndef INGEN_ENGINE_UNDOSTACK_HPP
#define INGEN_ENGINE_UNDOSTACK_HPP
-#include "ingen/AtomSink.hpp"
-#include "lv2/atom/atom.h"
-#include "lv2/atom/util.h"
-#include "serd/serd.h"
-#include "server.h"
-#include "sratom/sratom.h"
-
-#include <algorithm>
+#include <ingen/AtomSink.hpp>
+#include <lv2/atom/atom.h>
+#include <lv2/atom/util.h>
+#include <serd/serd.h>
+#include <server.h>
+#include <sratom/sratom.h>
+
#include <cstdint>
#include <cstdio>
#include <cstdlib>
@@ -43,7 +42,8 @@ class INGEN_SERVER_API UndoStack : public AtomSink
{
public:
struct Entry {
- Entry(time_t t = 0) noexcept : time(t) {}
+ explicit Entry(time_t t) noexcept : time{t} {}
+ Entry() noexcept : Entry{0} {}
Entry(const Entry& copy)
: time(copy.time)
diff --git a/src/server/Worker.cpp b/src/server/Worker.cpp
index cf252d37..1c04bb36 100644
--- a/src/server/Worker.cpp
+++ b/src/server/Worker.cpp
@@ -20,21 +20,17 @@
#include "GraphImpl.hpp"
#include "LV2Block.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/Node.hpp"
-#include "lv2/core/lv2.h"
-#include "lv2/worker/worker.h"
-#include "raul/RingBuffer.hpp"
-#include "raul/Semaphore.hpp"
+#include <ingen/Log.hpp>
+#include <ingen/Node.hpp>
+#include <lv2/core/lv2.h>
+#include <lv2/worker/worker.h>
+#include <raul/RingBuffer.hpp>
+#include <raul/Semaphore.hpp>
#include <cstdlib>
#include <memory>
-namespace ingen {
-
-class World;
-
-namespace server {
+namespace ingen::server {
/// A message in the Worker::_requests ring
struct MessageHeader {
@@ -166,5 +162,4 @@ Worker::run()
}
}
-} // namespace server
-} // namespace ingen
+} // namespace ingen::server
diff --git a/src/server/Worker.hpp b/src/server/Worker.hpp
index 540347df..08b75509 100644
--- a/src/server/Worker.hpp
+++ b/src/server/Worker.hpp
@@ -17,11 +17,11 @@
#ifndef INGEN_ENGINE_WORKER_HPP
#define INGEN_ENGINE_WORKER_HPP
-#include "ingen/LV2Features.hpp"
-#include "lv2/core/lv2.h"
-#include "lv2/worker/worker.h"
-#include "raul/RingBuffer.hpp"
-#include "raul/Semaphore.hpp"
+#include <ingen/LV2Features.hpp>
+#include <lv2/core/lv2.h>
+#include <lv2/worker/worker.h>
+#include <raul/RingBuffer.hpp>
+#include <raul/Semaphore.hpp>
#include <cstdint>
#include <memory>
@@ -30,8 +30,6 @@
namespace ingen {
class Log;
-class Node;
-class World;
namespace server {
@@ -44,7 +42,7 @@ public:
~Worker();
struct Schedule : public LV2Features::Feature {
- Schedule(bool sync) noexcept : synchronous(sync) {}
+ explicit Schedule(bool sync) noexcept : synchronous(sync) {}
const char* uri() const override { return LV2_WORKER__schedule; }
diff --git a/src/server/events.hpp b/src/server/events.hpp
index 5f77b431..7ab20ca7 100644
--- a/src/server/events.hpp
+++ b/src/server/events.hpp
@@ -17,19 +17,19 @@
#ifndef INGEN_ENGINE_EVENTS_HPP
#define INGEN_ENGINE_EVENTS_HPP
-#include "events/Connect.hpp"
-#include "events/Copy.hpp"
-#include "events/CreateBlock.hpp"
-#include "events/CreateGraph.hpp"
-#include "events/CreatePort.hpp"
-#include "events/Delete.hpp"
-#include "events/Delta.hpp"
-#include "events/Disconnect.hpp"
-#include "events/DisconnectAll.hpp"
-#include "events/Get.hpp"
-#include "events/Mark.hpp"
-#include "events/Move.hpp"
-#include "events/SetPortValue.hpp"
-#include "events/Undo.hpp"
+#include <events/Connect.hpp>
+#include <events/Copy.hpp>
+#include <events/CreateBlock.hpp>
+#include <events/CreateGraph.hpp>
+#include <events/CreatePort.hpp>
+#include <events/Delete.hpp>
+#include <events/Delta.hpp>
+#include <events/Disconnect.hpp>
+#include <events/DisconnectAll.hpp>
+#include <events/Get.hpp>
+#include <events/Mark.hpp>
+#include <events/Move.hpp>
+#include <events/SetPortValue.hpp>
+#include <events/Undo.hpp>
#endif // INGEN_ENGINE_EVENTS_HPP
diff --git a/src/server/events/Connect.cpp b/src/server/events/Connect.cpp
index e1854ef2..6e20be8f 100644
--- a/src/server/events/Connect.cpp
+++ b/src/server/events/Connect.cpp
@@ -16,6 +16,7 @@
#include "Connect.hpp"
+#include "../internals/BlockDelay.hpp"
#include "ArcImpl.hpp"
#include "BlockImpl.hpp"
#include "Broadcaster.hpp"
@@ -26,15 +27,16 @@
#include "InputPort.hpp"
#include "PortImpl.hpp"
#include "PreProcessContext.hpp"
-#include "internals/BlockDelay.hpp"
#include "types.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Node.hpp"
-#include "ingen/Status.hpp"
-#include "ingen/Store.hpp"
-#include "ingen/paths.hpp"
-#include "raul/Maid.hpp"
+#include <ingen/Interface.hpp>
+#include <ingen/Message.hpp>
+#include <ingen/Node.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Status.hpp>
+#include <ingen/Store.hpp>
+#include <ingen/paths.hpp>
+#include <raul/Maid.hpp>
#include <cassert>
#include <memory>
diff --git a/src/server/events/Connect.hpp b/src/server/events/Connect.hpp
index 4224f109..458df0ef 100644
--- a/src/server/events/Connect.hpp
+++ b/src/server/events/Connect.hpp
@@ -21,9 +21,9 @@
#include "PortImpl.hpp"
#include "types.hpp"
-#include "ingen/Message.hpp"
-#include "ingen/Properties.hpp"
-#include "raul/Maid.hpp"
+#include <ingen/Message.hpp>
+#include <ingen/Properties.hpp>
+#include <raul/Maid.hpp>
#include <memory>
@@ -38,8 +38,6 @@ class CompiledGraph;
class Engine;
class GraphImpl;
class InputPort;
-class PreProcessContext;
-class RunContext;
namespace events {
diff --git a/src/server/events/Copy.cpp b/src/server/events/Copy.cpp
index f6529da3..e75bf1c5 100644
--- a/src/server/events/Copy.cpp
+++ b/src/server/events/Copy.cpp
@@ -14,7 +14,7 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "events/Copy.hpp"
+#include "Copy.hpp"
#include "BlockImpl.hpp"
#include "Broadcaster.hpp"
@@ -23,17 +23,18 @@
#include "GraphImpl.hpp"
#include "PreProcessContext.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Node.hpp"
-#include "ingen/Parser.hpp"
-#include "ingen/Serialiser.hpp"
-#include "ingen/Status.hpp"
-#include "ingen/Store.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/World.hpp"
-#include "ingen/paths.hpp"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/Interface.hpp>
+#include <ingen/Message.hpp>
+#include <ingen/Node.hpp>
+#include <ingen/Parser.hpp>
+#include <ingen/Serialiser.hpp>
+#include <ingen/Status.hpp>
+#include <ingen/Store.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/World.hpp>
+#include <ingen/paths.hpp>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
#include <map>
#include <memory>
@@ -125,8 +126,7 @@ Copy::engine_to_engine(PreProcessContext& ctx)
}
// Create new block
- if (!(_block = dynamic_cast<BlockImpl*>(
- _old_block->duplicate(_engine, raul::Symbol(new_path.symbol()), _parent)))) {
+ if (!(_block = _old_block->duplicate(_engine, raul::Symbol(new_path.symbol()), _parent))) {
return Event::pre_process_done(Status::INTERNAL_ERROR);
}
diff --git a/src/server/events/Copy.hpp b/src/server/events/Copy.hpp
index 744a61c2..8031bb42 100644
--- a/src/server/events/Copy.hpp
+++ b/src/server/events/Copy.hpp
@@ -20,7 +20,7 @@
#include "Event.hpp"
#include "types.hpp"
-#include "ingen/Message.hpp"
+#include <ingen/Message.hpp>
#include <memory>
@@ -35,7 +35,6 @@ class CompiledGraph;
class Engine;
class GraphImpl;
class PreProcessContext;
-class RunContext;
namespace events {
diff --git a/src/server/events/CreateBlock.cpp b/src/server/events/CreateBlock.cpp
index 7f50411c..55c9b782 100644
--- a/src/server/events/CreateBlock.cpp
+++ b/src/server/events/CreateBlock.cpp
@@ -28,30 +28,27 @@
#include "State.hpp"
#include "types.hpp"
-#include "ingen/FilePath.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Node.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/Status.hpp"
-#include "ingen/Store.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "ingen/paths.hpp"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/FilePath.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Node.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/Status.hpp>
+#include <ingen/Store.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <ingen/paths.hpp>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
#include <map>
#include <memory>
+#include <string>
#include <utility>
-namespace ingen::server {
-
-class RunContext;
-
-namespace events {
+namespace ingen::server::events {
CreateBlock::CreateBlock(Engine& engine,
const std::shared_ptr<Interface>& client,
@@ -199,5 +196,4 @@ CreateBlock::undo(Interface& target)
target.del(_block->uri());
}
-} // namespace events
-} // namespace ingen::server
+} // namespace ingen::server::events
diff --git a/src/server/events/CreateBlock.hpp b/src/server/events/CreateBlock.hpp
index e8a49ea0..0ee6e36f 100644
--- a/src/server/events/CreateBlock.hpp
+++ b/src/server/events/CreateBlock.hpp
@@ -21,7 +21,7 @@
#include "Event.hpp"
#include "types.hpp"
-#include "raul/Path.hpp"
+#include <raul/Path.hpp>
#include <cstdint>
#include <memory>
@@ -37,8 +37,6 @@ class BlockImpl;
class CompiledGraph;
class Engine;
class GraphImpl;
-class PreProcessContext;
-class RunContext;
namespace events {
diff --git a/src/server/events/CreateGraph.cpp b/src/server/events/CreateGraph.cpp
index 7a8a973d..5df28afa 100644
--- a/src/server/events/CreateGraph.cpp
+++ b/src/server/events/CreateGraph.cpp
@@ -14,34 +14,36 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "events/CreateGraph.hpp"
+#include "CreateGraph.hpp"
#include "BlockImpl.hpp"
#include "Broadcaster.hpp"
#include "CompiledGraph.hpp"
+#include "CreatePort.hpp"
#include "Engine.hpp"
#include "GraphImpl.hpp"
#include "PreProcessContext.hpp"
-#include "events/CreatePort.hpp"
#include "types.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Node.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/Status.hpp"
-#include "ingen/Store.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "ingen/paths.hpp"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Node.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/Status.hpp>
+#include <ingen/Store.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <ingen/paths.hpp>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
#include <boost/intrusive/slist.hpp>
#include <map>
#include <memory>
+#include <string>
#include <utility>
namespace ingen::server::events {
diff --git a/src/server/events/CreateGraph.hpp b/src/server/events/CreateGraph.hpp
index b083ae8c..1d7f04a5 100644
--- a/src/server/events/CreateGraph.hpp
+++ b/src/server/events/CreateGraph.hpp
@@ -21,8 +21,8 @@
#include "Event.hpp"
#include "types.hpp"
-#include "ingen/Properties.hpp"
-#include "raul/Path.hpp"
+#include <ingen/Properties.hpp>
+#include <raul/Path.hpp>
#include <cstdint>
#include <list>
@@ -37,8 +37,6 @@ namespace server {
class CompiledGraph;
class Engine;
class GraphImpl;
-class PreProcessContext;
-class RunContext;
namespace events {
diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp
index 937842a7..b42542f8 100644
--- a/src/server/events/CreatePort.cpp
+++ b/src/server/events/CreatePort.cpp
@@ -23,26 +23,29 @@
#include "Engine.hpp"
#include "GraphImpl.hpp"
#include "PortImpl.hpp"
-
-#include "ingen/Atom.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Node.hpp"
-#include "ingen/Status.hpp"
-#include "ingen/Store.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIMap.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "ingen/paths.hpp"
-#include "raul/Array.hpp"
-#include "raul/Maid.hpp"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
+#include "PortType.hpp"
+
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Node.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Status.hpp>
+#include <ingen/Store.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIMap.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <ingen/paths.hpp>
+#include <raul/Array.hpp>
+#include <raul/Maid.hpp>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
#include <cassert>
#include <map>
#include <memory>
+#include <string>
#include <utility>
namespace ingen::server::events {
@@ -55,7 +58,6 @@ CreatePort::CreatePort(Engine& engine,
const Properties& properties)
: Event(engine, client, id, timestamp)
, _path(std::move(path))
- , _port_type(PortType::UNKNOWN)
, _properties(properties)
{
const ingen::URIs& uris = _engine.world().uris();
@@ -179,7 +181,7 @@ CreatePort::pre_process(PreProcessContext&)
_update = _graph_port->properties();
assert(_graph_port->index() == static_cast<uint32_t>(index_i->second.get<int32_t>()));
- assert(_graph->num_ports_non_rt() == static_cast<uint32_t>(old_n_ports) + 1u);
+ assert(_graph->num_ports_non_rt() == static_cast<uint32_t>(old_n_ports) + 1U);
assert(_ports_array->size() == _graph->num_ports_non_rt());
assert(_graph_port->index() < _ports_array->size());
return Event::pre_process_done(Status::SUCCESS);
diff --git a/src/server/events/CreatePort.hpp b/src/server/events/CreatePort.hpp
index 6d3e9ca2..151bf82f 100644
--- a/src/server/events/CreatePort.hpp
+++ b/src/server/events/CreatePort.hpp
@@ -22,10 +22,10 @@
#include "PortType.hpp"
#include "types.hpp"
-#include "ingen/Properties.hpp"
-#include "lv2/urid/urid.h"
-#include "raul/Maid.hpp"
-#include "raul/Path.hpp"
+#include <ingen/Properties.hpp>
+#include <lv2/urid/urid.h>
+#include <raul/Maid.hpp>
+#include <raul/Path.hpp>
#include <cstdint>
#include <memory>
@@ -41,8 +41,6 @@ class DuplexPort;
class Engine;
class EnginePort;
class GraphImpl;
-class PreProcessContext;
-class RunContext;
namespace events {
@@ -72,7 +70,7 @@ private:
};
raul::Path _path;
- PortType _port_type;
+ PortType _port_type{PortType::UNKNOWN};
LV2_URID _buf_type{0};
GraphImpl* _graph{nullptr};
DuplexPort* _graph_port{nullptr};
diff --git a/src/server/events/Delete.cpp b/src/server/events/Delete.cpp
index 62653752..9e940ea7 100644
--- a/src/server/events/Delete.cpp
+++ b/src/server/events/Delete.cpp
@@ -30,18 +30,18 @@
#include "PortImpl.hpp"
#include "PreProcessContext.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Node.hpp"
-#include "ingen/Status.hpp"
-#include "ingen/Store.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "ingen/paths.hpp"
-#include "raul/Array.hpp"
-#include "raul/Maid.hpp"
-#include "raul/Path.hpp"
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Message.hpp>
+#include <ingen/Node.hpp>
+#include <ingen/Status.hpp>
+#include <ingen/Store.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <ingen/paths.hpp>
+#include <raul/Array.hpp>
+#include <raul/Path.hpp>
#include <cassert>
#include <cstddef>
@@ -50,11 +50,7 @@
#include <string>
#include <string_view>
-namespace ingen::server {
-
-class RunContext;
-
-namespace events {
+namespace ingen::server::events {
Delete::Delete(Engine& engine,
const std::shared_ptr<Interface>& client,
@@ -225,11 +221,10 @@ Delete::undo(Interface& target)
if (c.first != _msg.uri.path()) {
target.set_property(path_to_uri(c.first),
uris.lv2_index,
- forge.make(int32_t(c.second.first)));
+ forge.make(static_cast<int32_t>(c.second.first)));
}
}
}
}
-} // namespace events
-} // namespace ingen::server
+} // namespace ingen::server::events
diff --git a/src/server/events/Delete.hpp b/src/server/events/Delete.hpp
index 87cde2c7..7e901f4b 100644
--- a/src/server/events/Delete.hpp
+++ b/src/server/events/Delete.hpp
@@ -22,10 +22,10 @@
#include "GraphImpl.hpp"
#include "types.hpp"
-#include "ingen/Message.hpp"
-#include "ingen/Store.hpp"
-#include "raul/Maid.hpp"
-#include "raul/Path.hpp"
+#include <ingen/Message.hpp>
+#include <ingen/Store.hpp>
+#include <raul/Maid.hpp>
+#include <raul/Path.hpp>
#include <cstdint>
#include <map>
@@ -34,6 +34,8 @@
#include <utility>
#include <vector>
+// IWYU pragma: no_include <iterator>
+
namespace ingen {
class Interface;
@@ -45,8 +47,6 @@ class CompiledGraph;
class DuplexPort;
class Engine;
class EnginePort;
-class PreProcessContext;
-class RunContext;
namespace events {
diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp
index 11a0b0ff..cba21214 100644
--- a/src/server/events/Delta.cpp
+++ b/src/server/events/Delta.cpp
@@ -32,22 +32,24 @@
#include "PortType.hpp"
#include "SetPortValue.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/FilePath.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/Message.hpp"
-#include "ingen/Node.hpp"
-#include "ingen/Status.hpp"
-#include "ingen/Store.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "ingen/paths.hpp"
-#include "lilv/lilv.h"
-#include "raul/Path.hpp"
-
-#include <algorithm>
+#include <ingen/Atom.hpp>
+#include <ingen/FilePath.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/Message.hpp>
+#include <ingen/Node.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/Status.hpp>
+#include <ingen/Store.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <ingen/paths.hpp>
+#include <lilv/lilv.h>
+#include <raul/Path.hpp>
+
#include <memory>
#include <mutex>
#include <set>
@@ -56,11 +58,7 @@
#include <utility>
#include <vector>
-namespace ingen::server {
-
-class PreProcessContext;
-
-namespace events {
+namespace ingen::server::events {
Delta::Delta(Engine& engine,
const std::shared_ptr<Interface>& client,
@@ -317,8 +315,8 @@ Delta::pre_process(PreProcessContext& ctx)
const Property& value = p.second;
SpecialType op = SpecialType::NONE;
if (obj) {
- Resource& resource = *obj;
if (value != uris.patch_wildcard) {
+ Resource& resource = *obj;
if (resource.add_property(key, value, value.context())) {
_added.emplace(key, value);
}
@@ -672,5 +670,4 @@ Delta::get_execution() const
return _block ? Execution::ATOMIC : Execution::NORMAL;
}
-} // namespace events
-} // namespace ingen::server
+} // namespace ingen::server::events
diff --git a/src/server/events/Delta.hpp b/src/server/events/Delta.hpp
index ed04f8c9..befbdcc7 100644
--- a/src/server/events/Delta.hpp
+++ b/src/server/events/Delta.hpp
@@ -18,24 +18,22 @@
#define INGEN_EVENTS_DELTA_HPP
#include "ClientUpdate.hpp"
+#include "CompiledGraph.hpp"
#include "ControlBindings.hpp"
#include "Event.hpp"
#include "SetPortValue.hpp"
#include "State.hpp"
#include "types.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/URI.hpp"
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/URI.hpp>
#include <cstdint>
#include <memory>
#include <optional>
#include <vector>
-// IWYU pragma: no_include "CompiledGraph.hpp"
-// IWYU pragma: no_include <algorithm>
-
namespace ingen {
class Interface;
@@ -45,11 +43,8 @@ struct SetProperty;
namespace server {
-class CompiledGraph; // IWYU pragma: keep
class Engine;
class GraphImpl;
-class PreProcessContext;
-class RunContext;
namespace events {
diff --git a/src/server/events/Disconnect.cpp b/src/server/events/Disconnect.cpp
index e0db262a..7189fdd0 100644
--- a/src/server/events/Disconnect.cpp
+++ b/src/server/events/Disconnect.cpp
@@ -14,7 +14,7 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "events/Disconnect.hpp"
+#include "Disconnect.hpp"
#include "BlockImpl.hpp"
#include "Broadcaster.hpp"
@@ -30,14 +30,15 @@
#include "PreProcessContext.hpp"
#include "ThreadManager.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Node.hpp"
-#include "ingen/Status.hpp"
-#include "ingen/Store.hpp"
-#include "raul/Array.hpp"
-#include "raul/Maid.hpp"
-#include "raul/Path.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Message.hpp>
+#include <ingen/Node.hpp>
+#include <ingen/Status.hpp>
+#include <ingen/Store.hpp>
+#include <raul/Array.hpp>
+#include <raul/Maid.hpp>
+#include <raul/Path.hpp>
#include <cassert>
#include <cstdint>
@@ -168,7 +169,7 @@ Disconnect::pre_process(PreProcessContext& ctx)
_impl = std::make_unique<Impl>(_engine,
_graph,
- dynamic_cast<PortImpl*>(tail),
+ tail,
dynamic_cast<InputPort*>(head));
_compiled_graph = ctx.maybe_compile(*_graph);
diff --git a/src/server/events/Disconnect.hpp b/src/server/events/Disconnect.hpp
index ad3d07b0..92dd81d3 100644
--- a/src/server/events/Disconnect.hpp
+++ b/src/server/events/Disconnect.hpp
@@ -21,8 +21,8 @@
#include "PortImpl.hpp"
#include "types.hpp"
-#include "ingen/Message.hpp"
-#include "raul/Maid.hpp"
+#include <ingen/Message.hpp>
+#include <raul/Maid.hpp>
#include <memory>
@@ -37,7 +37,6 @@ class CompiledGraph;
class Engine;
class GraphImpl;
class InputPort;
-class PreProcessContext;
class RunContext;
namespace events {
diff --git a/src/server/events/DisconnectAll.cpp b/src/server/events/DisconnectAll.cpp
index 5f0e9a5e..8e7bfbbe 100644
--- a/src/server/events/DisconnectAll.cpp
+++ b/src/server/events/DisconnectAll.cpp
@@ -14,25 +14,29 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "events/DisconnectAll.hpp"
+#include "DisconnectAll.hpp"
#include "ArcImpl.hpp"
#include "BlockImpl.hpp"
#include "Broadcaster.hpp"
#include "CompiledGraph.hpp"
+#include "Disconnect.hpp"
#include "Engine.hpp"
#include "GraphImpl.hpp"
#include "InputPort.hpp"
#include "NodeImpl.hpp"
#include "PortImpl.hpp"
#include "PreProcessContext.hpp"
-#include "events/Disconnect.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Node.hpp"
-#include "ingen/Status.hpp"
-#include "ingen/Store.hpp"
+#include <ingen/Interface.hpp>
+#include <ingen/Message.hpp>
+#include <ingen/Node.hpp>
+#include <ingen/Status.hpp>
+#include <ingen/Store.hpp>
+#include <raul/Path.hpp>
+#include <algorithm>
+#include <iterator>
#include <memory>
#include <mutex>
#include <set>
@@ -67,7 +71,7 @@ DisconnectAll::DisconnectAll(Engine& engine,
DisconnectAll::~DisconnectAll()
{
- for (auto& i : _impls) {
+ for (auto* i : _impls) {
delete i;
}
}
@@ -108,24 +112,31 @@ DisconnectAll::pre_process(PreProcessContext& ctx)
}
// Create disconnect events to erase adjacent arcs in parent
- for (const auto& a : adjacent_arcs(_parent)) {
- _impls.push_back(
- new Disconnect::Impl(_engine,
- _parent,
- dynamic_cast<PortImpl*>(a->tail()),
- dynamic_cast<InputPort*>(a->head())));
- }
+ const auto& arcs = adjacent_arcs(_parent);
+ std::transform(arcs.begin(),
+ arcs.end(),
+ std::back_inserter(_impls),
+ [this](const auto& a) {
+ return new Disconnect::Impl(_engine,
+ _parent,
+ a->tail(),
+ dynamic_cast<InputPort*>(a->head()));
+ });
// Create disconnect events to erase adjacent arcs in parent's parent
if (_port && _parent->parent()) {
- auto* const parent_parent = dynamic_cast<GraphImpl*>(_parent->parent());
- for (const auto& a : adjacent_arcs(parent_parent)) {
- _impls.push_back(
- new Disconnect::Impl(_engine,
- parent_parent,
- dynamic_cast<PortImpl*>(a->tail()),
- dynamic_cast<InputPort*>(a->head())));
- }
+ auto* const grandparent = dynamic_cast<GraphImpl*>(_parent->parent());
+ const auto& parent_arcs = adjacent_arcs(grandparent);
+
+ std::transform(parent_arcs.begin(),
+ parent_arcs.end(),
+ std::back_inserter(_impls),
+ [this, grandparent](const auto& a) {
+ return new Disconnect::Impl(_engine,
+ grandparent,
+ a->tail(),
+ dynamic_cast<InputPort*>(a->head()));
+ });
}
if (!_deleting && ctx.must_compile(*_parent)) {
diff --git a/src/server/events/DisconnectAll.hpp b/src/server/events/DisconnectAll.hpp
index aeb180de..0eeda6f8 100644
--- a/src/server/events/DisconnectAll.hpp
+++ b/src/server/events/DisconnectAll.hpp
@@ -21,7 +21,7 @@
#include "Event.hpp"
#include "types.hpp"
-#include "ingen/Message.hpp"
+#include <ingen/Message.hpp>
#include <list>
#include <memory>
@@ -40,8 +40,6 @@ class CompiledGraph;
class Engine;
class GraphImpl;
class PortImpl;
-class PreProcessContext;
-class RunContext;
namespace events {
diff --git a/src/server/events/Get.cpp b/src/server/events/Get.cpp
index 9efef123..45e7ea94 100644
--- a/src/server/events/Get.cpp
+++ b/src/server/events/Get.cpp
@@ -22,20 +22,22 @@
#include "GraphImpl.hpp"
#include "PortImpl.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Node.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/Status.hpp"
-#include "ingen/Store.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "ingen/paths.hpp"
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Message.hpp>
+#include <ingen/Node.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Status.hpp>
+#include <ingen/Store.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <ingen/paths.hpp>
#include <cstdint>
#include <memory>
#include <mutex>
+#include <utility>
namespace ingen::server::events {
@@ -105,11 +107,11 @@ Get::post_process()
URIs& uris = _engine.world().uris();
Properties props = {
{ uris.param_sampleRate,
- uris.forge.make(int32_t(_engine.sample_rate())) },
+ uris.forge.make(static_cast<int32_t>(_engine.sample_rate())) },
{ uris.bufsz_maxBlockLength,
- uris.forge.make(int32_t(_engine.block_length())) },
+ uris.forge.make(static_cast<int32_t>(_engine.block_length())) },
{ uris.ingen_numThreads,
- uris.forge.make(int32_t(_engine.n_threads())) } };
+ uris.forge.make(static_cast<int32_t>(_engine.n_threads())) } };
const Properties load_props = _engine.load_properties();
props.insert(load_props.begin(), load_props.end());
diff --git a/src/server/events/Get.hpp b/src/server/events/Get.hpp
index 1ec49bfa..0f5ed235 100644
--- a/src/server/events/Get.hpp
+++ b/src/server/events/Get.hpp
@@ -17,7 +17,7 @@
#ifndef INGEN_EVENTS_GET_HPP
#define INGEN_EVENTS_GET_HPP
-#include "ingen/Message.hpp"
+#include <ingen/Message.hpp>
#include "BlockFactory.hpp"
#include "ClientUpdate.hpp"
@@ -35,8 +35,6 @@ namespace server {
class Engine;
class PluginImpl;
-class PreProcessContext;
-class RunContext;
namespace events {
diff --git a/src/server/events/Mark.cpp b/src/server/events/Mark.cpp
index 87bc1035..b60b0432 100644
--- a/src/server/events/Mark.cpp
+++ b/src/server/events/Mark.cpp
@@ -14,10 +14,7 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "events/Mark.hpp"
-
-#include "ingen/Message.hpp"
-#include "ingen/Status.hpp"
+#include "Mark.hpp"
#include "CompiledGraph.hpp"
#include "Engine.hpp"
@@ -25,6 +22,9 @@
#include "PreProcessContext.hpp"
#include "UndoStack.hpp"
+#include <ingen/Message.hpp>
+#include <ingen/Status.hpp>
+
#include <cassert>
#include <memory>
#include <unordered_set>
diff --git a/src/server/events/Mark.hpp b/src/server/events/Mark.hpp
index eb99c5a9..e7180764 100644
--- a/src/server/events/Mark.hpp
+++ b/src/server/events/Mark.hpp
@@ -17,14 +17,13 @@
#ifndef INGEN_EVENTS_MARK_HPP
#define INGEN_EVENTS_MARK_HPP
+#include "CompiledGraph.hpp"
#include "Event.hpp"
#include "types.hpp"
#include <map>
#include <memory>
-// IWYU pragma: no_include "CompiledGraph.hpp"
-
namespace ingen {
class Interface;
@@ -33,11 +32,8 @@ struct BundleEnd;
namespace server {
-class CompiledGraph; // IWYU pragma: keep
class Engine;
class GraphImpl;
-class PreProcessContext;
-class RunContext;
namespace events {
diff --git a/src/server/events/Move.cpp b/src/server/events/Move.cpp
index 3af0ce6c..80ae5a11 100644
--- a/src/server/events/Move.cpp
+++ b/src/server/events/Move.cpp
@@ -14,16 +14,17 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "events/Move.hpp"
+#include "Move.hpp"
#include "Broadcaster.hpp"
#include "Driver.hpp"
#include "Engine.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Status.hpp"
-#include "ingen/Store.hpp"
-#include "raul/Path.hpp"
+#include <ingen/Interface.hpp>
+#include <ingen/Message.hpp>
+#include <ingen/Status.hpp>
+#include <ingen/Store.hpp>
+#include <raul/Path.hpp>
#include <map>
#include <memory>
diff --git a/src/server/events/Move.hpp b/src/server/events/Move.hpp
index 3940e825..cca4d310 100644
--- a/src/server/events/Move.hpp
+++ b/src/server/events/Move.hpp
@@ -20,7 +20,7 @@
#include "Event.hpp"
#include "types.hpp"
-#include "ingen/Message.hpp"
+#include <ingen/Message.hpp>
#include <memory>
@@ -31,8 +31,6 @@ class Interface;
namespace server {
class Engine;
-class PreProcessContext;
-class RunContext;
namespace events {
diff --git a/src/server/events/SetPortValue.cpp b/src/server/events/SetPortValue.cpp
index 04da7338..ba6859dd 100644
--- a/src/server/events/SetPortValue.cpp
+++ b/src/server/events/SetPortValue.cpp
@@ -24,11 +24,12 @@
#include "PortImpl.hpp"
#include "RunContext.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Status.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "lv2/atom/atom.h"
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Status.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <lv2/atom/atom.h>
#include <cassert>
#include <memory>
diff --git a/src/server/events/SetPortValue.hpp b/src/server/events/SetPortValue.hpp
index 69d742b8..32a8b761 100644
--- a/src/server/events/SetPortValue.hpp
+++ b/src/server/events/SetPortValue.hpp
@@ -22,7 +22,7 @@
#include "Event.hpp"
#include "types.hpp"
-#include "ingen/Atom.hpp"
+#include <ingen/Atom.hpp>
#include <cstdint>
#include <memory>
@@ -35,7 +35,6 @@ namespace server {
class Engine;
class PortImpl;
-class PreProcessContext;
class RunContext;
namespace events {
diff --git a/src/server/events/Undo.cpp b/src/server/events/Undo.cpp
index ea8c7d69..db7c1c86 100644
--- a/src/server/events/Undo.cpp
+++ b/src/server/events/Undo.cpp
@@ -19,11 +19,11 @@
#include "Engine.hpp"
#include "EventWriter.hpp"
-#include "ingen/AtomReader.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Message.hpp"
-#include "ingen/Status.hpp"
-#include "lv2/atom/atom.h"
+#include <ingen/AtomReader.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Message.hpp>
+#include <ingen/Status.hpp>
+#include <lv2/atom/atom.h>
#include <deque>
#include <memory>
diff --git a/src/server/events/Undo.hpp b/src/server/events/Undo.hpp
index eb9cb70a..818dc754 100644
--- a/src/server/events/Undo.hpp
+++ b/src/server/events/Undo.hpp
@@ -32,8 +32,6 @@ struct Undo;
namespace server {
class Engine;
-class PreProcessContext;
-class RunContext;
namespace events {
diff --git a/src/server/ingen_engine.cpp b/src/server/ingen_engine.cpp
index db1794de..48955143 100644
--- a/src/server/ingen_engine.cpp
+++ b/src/server/ingen_engine.cpp
@@ -17,13 +17,11 @@
#include "Engine.hpp"
#include "util.hpp"
-#include "ingen/Module.hpp"
-#include "ingen/World.hpp"
+#include <ingen/Module.hpp>
+#include <ingen/World.hpp>
#include <memory>
-// IWYU pragma: no_include "ingen/Atom.hpp"
-
namespace ingen {
struct EngineModule : public Module {
diff --git a/src/server/ingen_jack.cpp b/src/server/ingen_jack.cpp
index 9aedacad..16369d0c 100644
--- a/src/server/ingen_jack.cpp
+++ b/src/server/ingen_jack.cpp
@@ -17,11 +17,11 @@
#include "Engine.hpp"
#include "JackDriver.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Configuration.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/Module.hpp"
-#include "ingen/World.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Configuration.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/Module.hpp>
+#include <ingen/World.hpp>
#include <memory>
#include <string>
diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp
index 45a193c1..658f759b 100644
--- a/src/server/ingen_lv2.cpp
+++ b/src/server/ingen_lv2.cpp
@@ -25,46 +25,47 @@
#include "ThreadManager.hpp"
#include "types.hpp"
-#include "ingen/AtomReader.hpp"
-#include "ingen/AtomSink.hpp"
-#include "ingen/AtomWriter.hpp"
-#include "ingen/Configuration.hpp"
-#include "ingen/EngineBase.hpp"
-#include "ingen/FilePath.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/Node.hpp"
-#include "ingen/Parser.hpp"
-#include "ingen/Serialiser.hpp"
-#include "ingen/Store.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "ingen/ingen.h"
-#include "ingen/memory.hpp"
-#include "ingen/runtime_paths.hpp"
-#include "lv2/atom/atom.h"
-#include "lv2/atom/util.h"
-#include "lv2/buf-size/buf-size.h"
-#include "lv2/core/lv2.h"
-#include "lv2/log/log.h"
-#include "lv2/log/logger.h"
-#include "lv2/options/options.h"
-#include "lv2/state/state.h"
-#include "lv2/urid/urid.h"
-#include "raul/Maid.hpp"
-#include "raul/Path.hpp"
-#include "raul/RingBuffer.hpp"
-#include "raul/Semaphore.hpp"
-#include "raul/Symbol.hpp"
-#include "serd/serd.h"
-#include "sord/sordmm.hpp"
+#include <ingen/AtomReader.hpp>
+#include <ingen/AtomSink.hpp>
+#include <ingen/AtomWriter.hpp>
+#include <ingen/Configuration.hpp>
+#include <ingen/EngineBase.hpp>
+#include <ingen/FilePath.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/Node.hpp>
+#include <ingen/Parser.hpp>
+#include <ingen/Serialiser.hpp>
+#include <ingen/Store.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <ingen/ingen.h>
+#include <ingen/memory.hpp>
+#include <ingen/runtime_paths.hpp>
+#include <lv2/atom/atom.h>
+#include <lv2/atom/util.h>
+#include <lv2/buf-size/buf-size.h>
+#include <lv2/core/lv2.h>
+#include <lv2/log/log.h>
+#include <lv2/log/logger.h>
+#include <lv2/options/options.h>
+#include <lv2/state/state.h>
+#include <lv2/urid/urid.h>
+#include <raul/Maid.hpp>
+#include <raul/Path.hpp>
+#include <raul/RingBuffer.hpp>
+#include <raul/Semaphore.hpp>
+#include <raul/Symbol.hpp>
+#include <serd/serd.h>
+#include <sord/sordmm.hpp>
#include <algorithm>
#include <cstdint>
#include <cstdlib>
#include <cstring>
+#include <iterator>
#include <memory>
#include <mutex>
#include <set>
@@ -73,11 +74,9 @@
#include <utility>
#include <vector>
-namespace ingen {
+// #define CLEAR_GRAPH_ON_RESTORE 1
-class Atom;
-
-namespace server {
+namespace ingen::server {
class GraphImpl;
@@ -99,19 +98,23 @@ public:
Graphs graphs;
};
+namespace {
+
inline size_t
ui_ring_size(SampleCount block_length)
{
- return std::max(static_cast<size_t>(8192u),
- static_cast<size_t>(block_length) * 16u);
+ return std::max(static_cast<size_t>(8192U),
+ static_cast<size_t>(block_length) * 16U);
}
+} // namespace
+
class LV2Driver : public Driver, public ingen::AtomSink
{
public:
LV2Driver(Engine& engine,
SampleCount block_length,
- size_t seq_size,
+ uint32_t seq_size,
SampleCount sample_rate)
: _engine(engine)
, _main_sem(0)
@@ -214,13 +217,12 @@ public:
virtual GraphImpl* root_graph() { return _root_graph; }
EnginePort* get_port(const raul::Path& path) override {
- for (auto& p : _ports) {
- if (p->graph_port()->path() == path) {
- return p;
- }
- }
+ const auto i =
+ std::find_if(_ports.begin(), _ports.end(), [&path](const auto& p) {
+ return p->graph_port()->path() == path;
+ });
- return nullptr;
+ return i == _ports.end() ? nullptr : *i;
}
/** Add a port. Called only during init or restore. */
@@ -316,7 +318,13 @@ public:
break;
}
- buf = realloc(buf, sizeof(LV2_Atom) + atom.size);
+ void* const new_buf = realloc(buf, sizeof(LV2_Atom) + atom.size);
+ if (!new_buf) {
+ _engine.log().rt_error("Failed to allocate for from-UI ring\n");
+ break;
+ }
+
+ buf = new_buf;
memcpy(buf, &atom, sizeof(LV2_Atom));
if (!_from_ui.read(atom.size,
@@ -386,7 +394,7 @@ public:
}
SampleCount block_length() const override { return _block_length; }
- size_t seq_size() const override { return _seq_size; }
+ uint32_t seq_size() const override { return _seq_size; }
SampleCount sample_rate() const override { return _sample_rate; }
SampleCount frame_time() const override { return _frame_time; }
@@ -410,7 +418,7 @@ private:
GraphImpl* _root_graph{nullptr};
uint32_t _notify_capacity{0};
SampleCount _block_length;
- size_t _seq_size;
+ uint32_t _seq_size;
SampleCount _sample_rate;
SampleCount _frame_time{0};
raul::Semaphore _to_ui_overflow_sem{0};
@@ -459,9 +467,10 @@ find_graphs(const URI& manifest_uri)
URI(INGEN__Graph));
Lib::Graphs graphs;
- for (const auto& r : resources) {
- graphs.push_back(std::make_shared<LV2Graph>(r));
- }
+ std::transform(resources.begin(),
+ resources.end(),
+ std::back_inserter(graphs),
+ [](const auto& r) { return std::make_shared<LV2Graph>(r); });
return graphs;
}
@@ -514,13 +523,13 @@ ingen_instantiate(const LV2_Descriptor* descriptor,
const Lib::Graphs graphs = find_graphs(URI(reinterpret_cast<const char*>(manifest_node.buf)));
serd_node_free(&manifest_node);
- const LV2Graph* graph = nullptr;
- for (const auto& g : graphs) {
- if (g->uri == descriptor->URI) {
- graph = g.get();
- break;
- }
- }
+ const auto g = std::find_if(graphs.begin(),
+ graphs.end(),
+ [&descriptor](const auto& graph) {
+ return graph->uri == descriptor->URI;
+ });
+
+ const LV2Graph* const graph = g == graphs.end() ? nullptr : g->get();
if (!graph) {
lv2_log_error(&logger, "could not find graph <%s>\n", descriptor->URI);
@@ -550,7 +559,7 @@ ingen_instantiate(const LV2_Descriptor* descriptor,
block_length = 4096;
plugin->world->log().warn("No maximum block length given\n");
}
- if (seq_size == 0) {
+ if (seq_size < 1) {
seq_size = 16384;
plugin->world->log().warn("No maximum sequence size given\n");
}
@@ -573,7 +582,8 @@ ingen_instantiate(const LV2_Descriptor* descriptor,
ThreadManager::set_flag(THREAD_PRE_PROCESS);
ThreadManager::single_threaded = true;
- auto* driver = new LV2Driver(*engine, block_length, seq_size, rate);
+ auto* driver = new LV2Driver(
+ *engine, block_length, static_cast<uint32_t>(seq_size), rate);
engine->set_driver(std::shared_ptr<Driver>(driver));
engine->activate();
@@ -612,8 +622,8 @@ 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);
- Engine* engine = static_cast<Engine*>(me->world->engine().get());
+ auto* me = static_cast<IngenPlugin*>(instance);
+ const 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);
@@ -669,6 +679,7 @@ ingen_cleanup(LV2_Handle instance)
auto world = std::move(me->world);
delete me;
+ world.reset();
}
static void
@@ -766,7 +777,7 @@ ingen_restore(LV2_Handle instance,
return LV2_STATE_ERR_UNKNOWN;
}
-#if 0
+#ifdef CLEAR_GRAPH_ON_RESTORE
// Remove existing root graph contents
std::shared_ptr<Engine> engine = plugin->engine;
for (const auto& b : engine->root_graph()->blocks()) {
@@ -846,8 +857,8 @@ lib_get_plugin(LV2_Lib_Handle handle, uint32_t index)
}
} // extern "C"
-} // namespace server
-} // namespace ingen
+
+} // namespace ingen::server
extern "C" {
diff --git a/src/server/ingen_portaudio.cpp b/src/server/ingen_portaudio.cpp
index 6de5a40c..68b1b0bc 100644
--- a/src/server/ingen_portaudio.cpp
+++ b/src/server/ingen_portaudio.cpp
@@ -17,14 +17,12 @@
#include "Engine.hpp"
#include "PortAudioDriver.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/Module.hpp"
-#include "ingen/World.hpp"
+#include <ingen/Log.hpp>
+#include <ingen/Module.hpp>
+#include <ingen/World.hpp>
#include <memory>
-// IWYU pragma: no_include "ingen/FilePath.hpp"
-
namespace ingen::server {
class Driver;
diff --git a/src/server/internals/BlockDelay.cpp b/src/server/internals/BlockDelay.cpp
index 516b7cf4..acc68851 100644
--- a/src/server/internals/BlockDelay.cpp
+++ b/src/server/internals/BlockDelay.cpp
@@ -14,7 +14,7 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "internals/BlockDelay.hpp"
+#include "BlockDelay.hpp"
#include "BlockImpl.hpp"
#include "Buffer.hpp"
@@ -24,20 +24,16 @@
#include "OutputPort.hpp"
#include "PortType.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "raul/Array.hpp"
-#include "raul/Maid.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/Forge.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <raul/Array.hpp>
+#include <raul/Maid.hpp>
+#include <raul/Symbol.hpp>
#include <memory>
-namespace ingen::server {
-
-class RunContext;
-
-namespace internals {
+namespace ingen::server::internals {
InternalPlugin* BlockDelayNode::internal_plugin(URIs& uris) {
return new InternalPlugin(
@@ -90,5 +86,4 @@ BlockDelayNode::run(RunContext& ctx)
_buffer->copy(ctx, _in_port->buffer(0).get());
}
-} // namespace internals
-} // namespace ingen::server
+} // namespace ingen::server::internals
diff --git a/src/server/internals/BlockDelay.hpp b/src/server/internals/BlockDelay.hpp
index 78a03c28..a9667fa0 100644
--- a/src/server/internals/BlockDelay.hpp
+++ b/src/server/internals/BlockDelay.hpp
@@ -36,7 +36,6 @@ class GraphImpl;
class InputPort;
class InternalPlugin;
class OutputPort;
-class RunContext;
namespace internals {
diff --git a/src/server/internals/Controller.cpp b/src/server/internals/Controller.cpp
index ec400075..9103649e 100644
--- a/src/server/internals/Controller.cpp
+++ b/src/server/internals/Controller.cpp
@@ -14,6 +14,8 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "Controller.hpp"
+
#include "Buffer.hpp"
#include "BufferFactory.hpp"
#include "BufferRef.hpp"
@@ -23,17 +25,16 @@
#include "PortType.hpp"
#include "RunContext.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "internals/Controller.hpp"
-#include "lv2/atom/atom.h"
-#include "lv2/atom/util.h"
-#include "lv2/midi/midi.h"
-#include "raul/Array.hpp"
-#include "raul/Maid.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <lv2/atom/atom.h>
+#include <lv2/atom/util.h>
+#include <lv2/midi/midi.h>
+#include <raul/Array.hpp>
+#include <raul/Maid.hpp>
+#include <raul/Symbol.hpp>
#include <cassert>
#include <cmath>
@@ -171,7 +172,7 @@ ControllerNode::control(RunContext& ctx, uint8_t control_num, uint8_t val, Frame
}
const Sample min = logf(min_port_val + 1 + log_offset);
const Sample max = logf(max_port_val + 1 + log_offset);
- scaled_value = expf(nval * (max - min) + min) - 1 - log_offset;
+ scaled_value = expf((nval * (max - min)) + min) - 1 - log_offset;
} else {
scaled_value = ((nval) * (max_port_val - min_port_val)) + min_port_val;
}
diff --git a/src/server/internals/Note.cpp b/src/server/internals/Note.cpp
index 94598fb7..960bca85 100644
--- a/src/server/internals/Note.cpp
+++ b/src/server/internals/Note.cpp
@@ -14,7 +14,7 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "internals/Note.hpp"
+#include "Note.hpp"
#include "BlockImpl.hpp"
#include "Buffer.hpp"
@@ -25,16 +25,16 @@
#include "PortType.hpp"
#include "RunContext.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "lv2/atom/atom.h"
-#include "lv2/atom/util.h"
-#include "lv2/midi/midi.h"
-#include "raul/Array.hpp"
-#include "raul/Maid.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <lv2/atom/atom.h>
+#include <lv2/atom/util.h>
+#include <lv2/midi/midi.h>
+#include <raul/Array.hpp>
+#include <raul/Maid.hpp>
+#include <raul/Symbol.hpp>
#include <cassert>
#include <cmath>
diff --git a/src/server/internals/Note.hpp b/src/server/internals/Note.hpp
index 3aa3217e..2cf6c1e2 100644
--- a/src/server/internals/Note.hpp
+++ b/src/server/internals/Note.hpp
@@ -20,8 +20,8 @@
#include "InternalBlock.hpp"
#include "types.hpp"
-#include "raul/Array.hpp"
-#include "raul/Maid.hpp"
+#include <raul/Array.hpp>
+#include <raul/Maid.hpp>
#include <cstdint>
diff --git a/src/server/internals/Time.cpp b/src/server/internals/Time.cpp
index d8f1ddef..2ea09b0b 100644
--- a/src/server/internals/Time.cpp
+++ b/src/server/internals/Time.cpp
@@ -14,7 +14,7 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "internals/Time.hpp"
+#include "Time.hpp"
#include "Buffer.hpp"
#include "BufferFactory.hpp"
@@ -26,14 +26,14 @@
#include "PortType.hpp"
#include "RunContext.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "lv2/atom/atom.h"
-#include "raul/Array.hpp"
-#include "raul/Maid.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <lv2/atom/atom.h>
+#include <raul/Array.hpp>
+#include <raul/Maid.hpp>
+#include <raul/Symbol.hpp>
#include <memory>
diff --git a/src/server/internals/Time.hpp b/src/server/internals/Time.hpp
index fa3e90e5..228e67a8 100644
--- a/src/server/internals/Time.hpp
+++ b/src/server/internals/Time.hpp
@@ -34,7 +34,6 @@ class BufferFactory;
class GraphImpl;
class InternalPlugin;
class OutputPort;
-class RunContext;
namespace internals {
diff --git a/src/server/internals/Trigger.cpp b/src/server/internals/Trigger.cpp
index 9b3b8f98..f033a345 100644
--- a/src/server/internals/Trigger.cpp
+++ b/src/server/internals/Trigger.cpp
@@ -14,7 +14,7 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "internals/Trigger.hpp"
+#include "Trigger.hpp"
#include "Buffer.hpp"
#include "BufferFactory.hpp"
@@ -25,16 +25,16 @@
#include "PortType.hpp"
#include "RunContext.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "lv2/atom/atom.h"
-#include "lv2/atom/util.h"
-#include "lv2/midi/midi.h"
-#include "raul/Array.hpp"
-#include "raul/Maid.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <lv2/atom/atom.h>
+#include <lv2/atom/util.h>
+#include <lv2/midi/midi.h>
+#include <raul/Array.hpp>
+#include <raul/Maid.hpp>
+#include <raul/Symbol.hpp>
#include <cassert>
#include <cmath>
diff --git a/src/server/meson.build b/src/server/meson.build
index c2e5b761..c1fccf5e 100644
--- a/src/server/meson.build
+++ b/src/server/meson.build
@@ -6,6 +6,25 @@
##########
server_sources = files(
+ 'events/Connect.cpp',
+ 'events/Copy.cpp',
+ 'events/CreateBlock.cpp',
+ 'events/CreateGraph.cpp',
+ 'events/CreatePort.cpp',
+ 'events/Delete.cpp',
+ 'events/Delta.cpp',
+ 'events/Disconnect.cpp',
+ 'events/DisconnectAll.cpp',
+ 'events/Get.cpp',
+ 'events/Mark.cpp',
+ 'events/Move.cpp',
+ 'events/SetPortValue.cpp',
+ 'events/Undo.cpp',
+ 'internals/BlockDelay.cpp',
+ 'internals/Controller.cpp',
+ 'internals/Note.cpp',
+ 'internals/Time.cpp',
+ 'internals/Trigger.cpp',
'ArcImpl.cpp',
'BlockFactory.cpp',
'BlockImpl.cpp',
@@ -33,26 +52,7 @@ server_sources = files(
'Task.cpp',
'UndoStack.cpp',
'Worker.cpp',
- 'events/Connect.cpp',
- 'events/Copy.cpp',
- 'events/CreateBlock.cpp',
- 'events/CreateGraph.cpp',
- 'events/CreatePort.cpp',
- 'events/Delete.cpp',
- 'events/Delta.cpp',
- 'events/Disconnect.cpp',
- 'events/DisconnectAll.cpp',
- 'events/Get.cpp',
- 'events/Mark.cpp',
- 'events/Move.cpp',
- 'events/SetPortValue.cpp',
- 'events/Undo.cpp',
'ingen_engine.cpp',
- 'internals/BlockDelay.cpp',
- 'internals/Controller.cpp',
- 'internals/Note.cpp',
- 'internals/Time.cpp',
- 'internals/Trigger.cpp',
'mix.cpp',
)
diff --git a/src/server/mix.cpp b/src/server/mix.cpp
index db491e28..32500f97 100644
--- a/src/server/mix.cpp
+++ b/src/server/mix.cpp
@@ -20,8 +20,8 @@
#include "RunContext.hpp"
#include "types.hpp"
-#include "lv2/atom/atom.h"
-#include "lv2/atom/util.h"
+#include <lv2/atom/atom.h>
+#include <lv2/atom/util.h>
namespace ingen::server {
diff --git a/src/server/util.hpp b/src/server/util.hpp
index 2076aa62..abfa06b6 100644
--- a/src/server/util.hpp
+++ b/src/server/util.hpp
@@ -17,10 +17,10 @@
#ifndef INGEN_ENGINE_UTIL_HPP
#define INGEN_ENGINE_UTIL_HPP
-#include "ingen/Log.hpp"
+#include <ingen/Log.hpp>
#ifdef __SSE__
-#include <xmmintrin.h> // IWYU pragma: keep
+#include <xmmintrin.h>
#endif
#ifdef __clang__
diff --git a/tests/.clang-tidy b/tests/.clang-tidy
index 7e189145..6c26f23c 100644
--- a/tests/.clang-tidy
+++ b/tests/.clang-tidy
@@ -10,7 +10,6 @@ Checks: >
-cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-pro-type-union-access,
-fuchsia-statically-constructed-objects,
- -google-readability-casting,
-google-readability-todo,
-llvm-header-guard,
-readability-function-cognitive-complexity,
diff --git a/tests/TestClient.hpp b/tests/TestClient.hpp
index b864928e..72265b14 100644
--- a/tests/TestClient.hpp
+++ b/tests/TestClient.hpp
@@ -17,11 +17,11 @@
#ifndef INGEN_TESTCLIENT_HPP
#define INGEN_TESTCLIENT_HPP
-#include "ingen/Interface.hpp"
-#include "ingen/Log.hpp"
-#include "ingen/Message.hpp"
-#include "ingen/Status.hpp"
-#include "ingen/URI.hpp"
+#include <ingen/Interface.hpp>
+#include <ingen/Log.hpp>
+#include <ingen/Message.hpp>
+#include <ingen/Status.hpp>
+#include <ingen/URI.hpp>
#include <variant>
diff --git a/tests/ingen_bench.cpp b/tests/ingen_bench.cpp
index 82fae78d..ee890401 100644
--- a/tests/ingen_bench.cpp
+++ b/tests/ingen_bench.cpp
@@ -14,14 +14,14 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/Atom.hpp"
-#include "ingen/Clock.hpp"
-#include "ingen/Configuration.hpp"
-#include "ingen/EngineBase.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Parser.hpp"
-#include "ingen/World.hpp"
-#include "ingen/runtime_paths.hpp"
+#include <ingen/Atom.hpp>
+#include <ingen/Clock.hpp>
+#include <ingen/Configuration.hpp>
+#include <ingen/EngineBase.hpp>
+#include <ingen/Forge.hpp>
+#include <ingen/Parser.hpp>
+#include <ingen/World.hpp>
+#include <ingen/runtime_paths.hpp>
#include <chrono>
#include <cstdint>
@@ -41,7 +41,7 @@ void
ingen_try(bool cond, const char* msg)
{
if (!cond) {
- std::cerr << "ingen: Error: " << msg << std::endl;
+ std::cerr << "ingen: Error: " << msg << "\n";
world.reset();
exit(EXIT_FAILURE);
}
@@ -68,7 +68,7 @@ run(int argc, char** argv)
ingen::Configuration::SESSION, world->forge().String, Atom());
world->load_configuration(argc, argv);
} catch (std::exception& e) {
- std::cout << "ingen: " << e.what() << std::endl;
+ std::cout << "ingen: " << e.what() << "\n";
return EXIT_FAILURE;
}
@@ -76,9 +76,7 @@ run(int argc, char** argv)
const Atom& load = world->conf().option("load");
const Atom& out = world->conf().option("output");
if (!load.is_valid() || !out.is_valid()) {
- std::cerr << "Usage: ingen_bench --load START_GRAPH --output OUT_FILE"
- << std::endl;
-
+ std::cerr << "Usage: ingen_bench --load START_GRAPH --output OUT_FILE\n";
return EXIT_FAILURE;
}
@@ -90,7 +88,7 @@ run(int argc, char** argv)
if (start_graph.empty()) {
std::cerr << "error: initial graph '"
<< static_cast<const char*>(load.get_body())
- << "' does not exist" << std::endl;
+ << "' does not exist\n";
return EXIT_FAILURE;
}
@@ -99,7 +97,7 @@ run(int argc, char** argv)
"Unable to load server module");
// Initialise engine
- ingen_try(bool(world->engine()),
+ ingen_try(!!world->engine(),
"Unable to create engine");
world->engine()->init(48000.0, 4096, 4096);
world->engine()->activate();
@@ -107,7 +105,7 @@ run(int argc, char** argv)
// Load graph
if (!world->parser()->parse_file(*world, *world->interface(), start_graph)) {
std::cerr << "error: failed to load initial graph " << start_graph
- << std::endl;
+ << "\n";
return EXIT_FAILURE;
}
@@ -132,7 +130,7 @@ run(int argc, char** argv)
if (ftell(log.get()) == 0) {
fprintf(log.get(), "# n_threads\trun_time\treal_time\n");
}
- fprintf(log.get(), "%u\t%f\t%f\n",
+ fprintf(log.get(), "%d\t%f\t%f\n",
world->conf().option("threads").get<int32_t>(),
static_cast<double>(t_end - t_start) / 1000000.0,
(n_test_frames / 48000.0));
diff --git a/tests/ingen_test.cpp b/tests/ingen_test.cpp
index b1705dfa..215d20a1 100644
--- a/tests/ingen_test.cpp
+++ b/tests/ingen_test.cpp
@@ -16,26 +16,26 @@
#include "TestClient.hpp"
-#include "ingen/Atom.hpp"
-#include "ingen/AtomForge.hpp"
-#include "ingen/AtomReader.hpp"
-#include "ingen/Configuration.hpp"
-#include "ingen/EngineBase.hpp"
-#include "ingen/FilePath.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Parser.hpp"
-#include "ingen/Serialiser.hpp"
-#include "ingen/Store.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIMap.hpp"
-#include "ingen/World.hpp"
-#include "ingen/fmt.hpp"
-#include "ingen/memory.hpp"
-#include "ingen/runtime_paths.hpp"
-#include "raul/Path.hpp"
-#include "serd/serd.h"
-#include "sord/sordmm.hpp"
-#include "sratom/sratom.h"
+#include <ingen/Atom.hpp>
+#include <ingen/AtomForge.hpp>
+#include <ingen/AtomReader.hpp>
+#include <ingen/Configuration.hpp>
+#include <ingen/EngineBase.hpp>
+#include <ingen/FilePath.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Parser.hpp>
+#include <ingen/Serialiser.hpp>
+#include <ingen/Store.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIMap.hpp>
+#include <ingen/World.hpp>
+#include <ingen/fmt.hpp>
+#include <ingen/memory.hpp>
+#include <ingen/runtime_paths.hpp>
+#include <raul/Path.hpp>
+#include <serd/serd.h>
+#include <sord/sordmm.hpp>
+#include <sratom/sratom.h>
#include <chrono>
#include <cstdint>
@@ -48,6 +48,8 @@
#include <string>
#include <utility>
+// #define DUMP_EVENTS 1
+
namespace ingen::test {
namespace {
@@ -57,7 +59,7 @@ void
ingen_try(bool cond, const char* msg)
{
if (!cond) {
- std::cerr << "ingen: Error: " << msg << std::endl;
+ std::cerr << "ingen: Error: " << msg << "\n";
world.reset();
exit(EXIT_FAILURE);
}
@@ -80,7 +82,7 @@ run(int argc, char** argv)
world = std::make_unique<World>(nullptr, nullptr, nullptr);
world->load_configuration(argc, argv);
} catch (const std::exception& e) {
- std::cerr << "ingen: " << e.what() << std::endl;
+ std::cerr << "ingen: " << e.what() << "\n";
return EXIT_FAILURE;
}
@@ -89,8 +91,7 @@ run(int argc, char** argv)
const Atom& execute = world->conf().option("execute");
if (!load.is_valid() || !execute.is_valid()) {
std::cerr
- << "Usage: ingen_test --load START_GRAPH --execute COMMANDS_FILE"
- << std::endl;
+ << "Usage: ingen_test --load START_GRAPH --execute COMMANDS_FILE\n";
return EXIT_FAILURE;
}
@@ -100,16 +101,12 @@ run(int argc, char** argv)
const FilePath run_path = real_file_path(static_cast<const char*>(execute.get_body()));
if (load_path.empty()) {
- std::cerr << "error: initial graph '" << load_path << "' does not exist"
- << std::endl;
-
+ std::cerr << "error: initial graph '" << load_path << "' does not exist\n";
return EXIT_FAILURE;
}
if (run_path.empty()) {
- std::cerr << "error: command file '" << run_path << "' does not exist"
- << std::endl;
-
+ std::cerr << "error: command file '" << run_path << "' does not exist\n";
return EXIT_FAILURE;
}
@@ -118,16 +115,14 @@ run(int argc, char** argv)
"Unable to load server module");
// Initialise engine
- ingen_try(bool(world->engine()),
+ ingen_try(!!world->engine(),
"Unable to create engine");
world->engine()->init(48000.0, 4096, 4096);
world->engine()->activate();
// Load graph
if (!world->parser()->parse_file(*world, *world->interface(), load_path)) {
- std::cerr << "error: failed to load initial graph " << load_path
- << std::endl;
-
+ std::cerr << "error: failed to load initial graph " << load_path << "\n";
return EXIT_FAILURE;
}
world->engine()->flush_events(std::chrono::milliseconds(20));
@@ -178,9 +173,9 @@ run(int argc, char** argv)
forge.clear();
forge.read(*world->rdf_world(), cmds->c_obj(), subject.c_obj());
-#if 0
+#ifdef DUMP_EVENTS
const LV2_Atom* atom = forge.atom();
- cerr << "READ " << atom->size << " BYTES" << endl;
+ cerr << "READ " << atom->size << " BYTES\n";
cerr << sratom_to_turtle(
sratom,
&world->uri_map().urid_unmap_feature()->urid_unmap,
@@ -189,6 +184,7 @@ run(int argc, char** argv)
#endif
if (!atom_reader.write(forge.atom(), n_events + 1)) {
+ delete cmds;
return EXIT_FAILURE;
}
@@ -249,7 +245,7 @@ main(int argc, char** argv)
return ingen::test::run(argc, argv);
} catch (const std::exception& e) {
- std::cerr << "ingen: " << e.what() << std::endl;
+ std::cerr << "ingen: " << e.what() << "\n";
return EXIT_FAILURE;
}
}
diff --git a/tests/lint/meson.build b/tests/lint/meson.build
new file mode 100644
index 00000000..c641cbaa
--- /dev/null
+++ b/tests/lint/meson.build
@@ -0,0 +1,24 @@
+# Copyright 2019-2024 David Robillard <d@drobilla.net>
+# SPDX-License-Identifier: 0BSD OR GPL-3.0-or-later
+
+if not meson.is_subproject()
+ # Check code with cppcheck
+ cppcheck = find_program('cppcheck', required: false)
+ if cppcheck.found()
+ compdb_path = join_paths(ingen_build_root, 'compile_commands.json')
+ suppress_path = join_paths(ingen_src_root, '.suppress.cppcheck')
+ test(
+ 'cppcheck',
+ cppcheck,
+ args: [
+ '--cppcheck-build-dir=' + meson.current_build_dir(),
+ '--enable=warning,style,performance,portability',
+ '--error-exitcode=1',
+ '--project=' + compdb_path,
+ '--suppressions-list=' + suppress_path,
+ '-q',
+ ],
+ suite: 'code',
+ )
+ endif
+endif
diff --git a/tests/meson.build b/tests/meson.build
index 50b78624..1637230b 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,26 +1,6 @@
# Copyright 2019-2022 David Robillard <d@drobilla.net>
# SPDX-License-Identifier: 0BSD OR GPL-3.0-or-later
-##############
-# Unit Tests #
-##############
-
-unit_tests = [
-]
-
-foreach test : unit_tests
- test(
- test,
- executable(
- test,
- files('tst_@0@.cpp'.format(test)),
- cpp_args: cpp_suppressions + platform_defines,
- dependencies: [ingen_dep],
- ),
- suite: 'unit',
- )
-endforeach
-
#####################
# Integration Tests #
#####################
@@ -93,10 +73,11 @@ test_env = environment(
default_value: lv2dir,
internal: 'plugindir',
pkgconfig: 'plugindir',
- )
+ ),
],
),
- })
+ },
+)
foreach test : integration_tests
test(
@@ -104,8 +85,16 @@ foreach test : integration_tests
ingen_test,
env: test_env,
args: [
- '--load', empty_manifest,
- '--execute', files(test + '.ttl'),
+ ['--load', empty_manifest],
+ ['--execute', files(test + '.ttl')],
],
)
endforeach
+
+########
+# Lint #
+########
+
+if get_option('lint')
+ subdir('lint')
+endif
diff --git a/tests/test_utils.hpp b/tests/test_utils.hpp
index e595b7c8..4c358739 100644
--- a/tests/test_utils.hpp
+++ b/tests/test_utils.hpp
@@ -14,13 +14,11 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ingen/fmt.hpp"
+#include <ingen/fmt.hpp>
#include <iostream>
#include <string>
-// IWYU pragma: no_include "ingen/FilePath.hpp"
-
#define EXPECT_TRUE(value) \
do { \
if (!(value)) { \