summaryrefslogtreecommitdiffstats
path: root/src/AtomReader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/AtomReader.cpp')
-rw-r--r--src/AtomReader.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/AtomReader.cpp b/src/AtomReader.cpp
index ac52082f..21cb9e40 100644
--- a/src/AtomReader.cpp
+++ b/src/AtomReader.cpp
@@ -14,31 +14,31 @@
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/Status.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 <boost/optional/optional.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>
+#include <optional>
#include <string>
namespace ingen {
+enum class Status;
+
AtomReader::AtomReader(URIMap& map, URIs& uris, Log& log, Interface& iface)
: _map(map)
, _uris(uris)
@@ -79,7 +79,7 @@ AtomReader::get_props(const LV2_Atom_Object* obj,
}
}
-boost::optional<URI>
+std::optional<URI>
AtomReader::atom_to_uri(const LV2_Atom* atom)
{
if (!atom) {
@@ -115,10 +115,10 @@ AtomReader::atom_to_uri(const LV2_Atom* atom)
return {};
}
-boost::optional<raul::Path>
+std::optional<raul::Path>
AtomReader::atom_to_path(const LV2_Atom* atom)
{
- boost::optional<URI> uri = atom_to_uri(atom);
+ std::optional<URI> uri = atom_to_uri(atom);
if (uri && uri_is_path(*uri)) {
return uri_to_path(*uri);
}
@@ -130,7 +130,7 @@ AtomReader::atom_to_context(const LV2_Atom* atom)
{
Resource::Graph ctx = Resource::Graph::DEFAULT;
if (atom) {
- boost::optional<URI> maybe_uri = atom_to_uri(atom);
+ std::optional<URI> maybe_uri = atom_to_uri(atom);
if (maybe_uri) {
ctx = Resource::uri_to_graph(*maybe_uri);
} else {
@@ -174,7 +174,7 @@ AtomReader::write(const LV2_Atom* msg, int32_t default_id)
_uris.patch_sequenceNumber.urid(), &number,
nullptr);
- const boost::optional<URI> subject_uri = atom_to_uri(subject);
+ const std::optional<URI> subject_uri = atom_to_uri(subject);
const int32_t seq = ((number && number->type == _uris.atom_Int)
? reinterpret_cast<const LV2_Atom_Int*>(number)->body
@@ -213,10 +213,10 @@ AtomReader::write(const LV2_Atom* msg, int32_t default_id)
_uris.ingen_incidentTo.urid(), &incidentTo,
nullptr);
- boost::optional<raul::Path> subject_path(atom_to_path(subject));
- boost::optional<raul::Path> tail_path(atom_to_path(tail));
- boost::optional<raul::Path> head_path(atom_to_path(head));
- boost::optional<raul::Path> other_path(atom_to_path(incidentTo));
+ std::optional<raul::Path> subject_path(atom_to_path(subject));
+ std::optional<raul::Path> tail_path(atom_to_path(tail));
+ std::optional<raul::Path> head_path(atom_to_path(head));
+ std::optional<raul::Path> other_path(atom_to_path(incidentTo));
if (tail_path && head_path) {
_iface(Disconnect{seq, *tail_path, *head_path});
} else if (subject_path && other_path) {
@@ -255,8 +255,8 @@ AtomReader::write(const LV2_Atom* msg, int32_t default_id)
return false;
}
- boost::optional<raul::Path> tail_path(atom_to_path(tail));
- boost::optional<raul::Path> head_path(atom_to_path(head));
+ std::optional<raul::Path> tail_path(atom_to_path(tail));
+ std::optional<raul::Path> head_path(atom_to_path(head));
if (tail_path && head_path) {
_iface(Connect{seq, *tail_path, *head_path});
} else {
@@ -350,7 +350,7 @@ AtomReader::write(const LV2_Atom* msg, int32_t default_id)
}
- boost::optional<URI> dest_uri(atom_to_uri(dest));
+ std::optional<URI> dest_uri(atom_to_uri(dest));
if (!dest_uri) {
_log.warn("Copy message has non-URI destination\n");
return false;
@@ -370,13 +370,13 @@ AtomReader::write(const LV2_Atom* msg, int32_t default_id)
return false;
}
- boost::optional<raul::Path> subject_path(atom_to_path(subject));
+ std::optional<raul::Path> subject_path(atom_to_path(subject));
if (!subject_path) {
_log.warn("Move message has non-path subject\n");
return false;
}
- boost::optional<raul::Path> dest_path(atom_to_path(dest));
+ std::optional<raul::Path> dest_path(atom_to_path(dest));
if (!dest_path) {
_log.warn("Move message has non-path destination\n");
return false;