summaryrefslogtreecommitdiffstats
path: root/bindings/cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-03-23 12:42:43 -0400
committerDavid Robillard <d@drobilla.net>2021-03-23 12:42:43 -0400
commit91945867cfee9e92df50149311d98eda41b16a60 (patch)
tree5e7d89d9762f7272cc910b8a94fbcf74bf81332e /bindings/cpp
parentea02e3d48e3ff4ce6bea8de559efbec64da9b161 (diff)
downloadsratom-91945867cfee9e92df50149311d98eda41b16a60.tar.gz
sratom-91945867cfee9e92df50149311d98eda41b16a60.tar.bz2
sratom-91945867cfee9e92df50149311d98eda41b16a60.zip
WIP
Diffstat (limited to 'bindings/cpp')
-rw-r--r--bindings/cpp/include/sratom/sratom.hpp44
-rw-r--r--bindings/cpp/meson.build16
2 files changed, 31 insertions, 29 deletions
diff --git a/bindings/cpp/include/sratom/sratom.hpp b/bindings/cpp/include/sratom/sratom.hpp
index b12d5e1..8be6644 100644
--- a/bindings/cpp/include/sratom/sratom.hpp
+++ b/bindings/cpp/include/sratom/sratom.hpp
@@ -79,21 +79,21 @@ public:
: BasicWrapper(sratom_dumper_new(world.cobj(), &map, &unmap))
{}
- int write(const serd::Env& env,
- serd::SinkView sink,
- const LV2_Atom& atom,
- const Flags flags)
+ SratomStatus write(const serd::Env& env,
+ serd::SinkView sink,
+ const LV2_Atom& atom,
+ const Flags flags)
{
return sratom_dump_atom(
cobj(), env.cobj(), sink.cobj(), nullptr, nullptr, &atom, flags);
}
- int write(const serd::Env& env,
- serd::SinkView sink,
- const serd::Node& subject,
- const serd::Node& predicate,
- const LV2_Atom& atom,
- const Flags flags)
+ SratomStatus write(const serd::Env& env,
+ serd::SinkView sink,
+ const serd::Node& subject,
+ const serd::Node& predicate,
+ const LV2_Atom& atom,
+ const Flags flags)
{
return sratom_dump_atom(cobj(),
env.cobj(),
@@ -104,14 +104,14 @@ public:
flags);
}
- int write(const serd::Env& env,
- serd::SinkView sink,
- const serd::Node& subject,
- const serd::Node& predicate,
- LV2_URID type,
- uint32_t size,
- const void* body,
- const Flags flags)
+ SratomStatus write(const serd::Env& env,
+ serd::SinkView sink,
+ const serd::Node& subject,
+ const serd::Node& predicate,
+ LV2_URID type,
+ uint32_t size,
+ const void* body,
+ const Flags flags)
{
return sratom_dump(cobj(),
env.cobj(),
@@ -153,10 +153,10 @@ public:
: BasicWrapper(sratom_loader_new(world.cobj(), &map))
{}
- int load(const serd::Optional<serd::Node>& base_uri,
- LV2_Atom_Forge& forge,
- const serd::Model& model,
- const serd::Node& node)
+ SratomStatus load(const serd::Optional<serd::Node>& base_uri,
+ LV2_Atom_Forge& forge,
+ const serd::Model& model,
+ const serd::Node& node)
{
return sratom_load(
cobj(), base_uri.cobj(), &forge, model.cobj(), node.cobj());
diff --git a/bindings/cpp/meson.build b/bindings/cpp/meson.build
index ee1dc4f..02f4d53 100644
--- a/bindings/cpp/meson.build
+++ b/bindings/cpp/meson.build
@@ -67,10 +67,12 @@ install_headers(cpp_headers, subdir: versioned_cpp_name / 'sratom')
cpp_test_args = cpp.get_supported_arguments(['-Wno-float-equal'])
-test('bindings',
- executable('test_sratom_hpp',
- 'test/test_sratom_hpp.cpp',
- include_directories: include_directories(['include']),
- cpp_args: exess_cpp_args + cpp_test_args,
- dependencies: [sratom_dep, serdpp_dep, sratompp_dep]),
- suite: 'cpp')
+test(
+ 'bindings',
+ executable(
+ 'test_sratom_hpp',
+ 'test/test_sratom_hpp.cpp',
+ include_directories: include_directories(['include', '../../test']),
+ cpp_args: exess_cpp_args + cpp_test_args,
+ dependencies: [sratom_dep, serdpp_dep, sratompp_dep]),
+ suite: 'cpp')