summaryrefslogtreecommitdiffstats
path: root/src/server/BlockImpl.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/BlockImpl.hpp')
-rw-r--r--src/server/BlockImpl.hpp39
1 files changed, 21 insertions, 18 deletions
diff --git a/src/server/BlockImpl.hpp b/src/server/BlockImpl.hpp
index c285bdac..69564ff4 100644
--- a/src/server/BlockImpl.hpp
+++ b/src/server/BlockImpl.hpp
@@ -19,24 +19,22 @@
#include "BufferRef.hpp"
#include "NodeImpl.hpp"
-#include "PortType.hpp"
#include "State.hpp"
#include "types.hpp"
-#include "ingen/Node.hpp"
-#include "ingen/Properties.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/URI.hpp"
-#include "lilv/lilv.h"
-#include "lv2/urid/urid.h"
-#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>
-#include <boost/optional/optional.hpp>
#include <cstdint>
#include <memory>
+#include <optional>
#include <set>
namespace raul {
@@ -44,6 +42,9 @@ class Symbol;
} // namespace raul
namespace ingen {
+
+enum class PortType;
+
namespace server {
class BufferFactory;
@@ -62,7 +63,7 @@ class Worker;
* \ingroup engine
*/
class BlockImpl : public NodeImpl
- , public boost::intrusive::slist_base_hook<> // In GraphImpl
+ , public boost::intrusive::slist_base_hook<> // In GraphImpl
{
public:
using Ports = raul::Array<PortImpl*>;
@@ -115,14 +116,16 @@ public:
{}
/** Save current state as preset. */
- virtual boost::optional<Resource>
- save_preset(const URI& bundle,
- const Properties& props) { return boost::optional<Resource>(); }
+ virtual std::optional<Resource>
+ save_preset(const URI& bundle, const Properties& props)
+ {
+ return std::nullopt;
+ }
/** 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()). */
@@ -208,10 +211,10 @@ protected:
uint32_t _polyphony;
std::set<BlockImpl*> _providers; ///< Blocks connected to this one's input ports
std::set<BlockImpl*> _dependants; ///< Blocks this one's output ports are connected to
- Mark _mark; ///< Mark for graph compilation algorithm
+ Mark _mark{Mark::UNVISITED}; ///< Mark for graph walks
bool _polyphonic;
- bool _activated;
- bool _enabled;
+ bool _activated{false};
+ bool _enabled{true};
};
} // namespace server