3#include "../../_cexports/c_code_reader.h"
4#include "../../shims/stdoptional.hpp"
16 inline HandleGuard<CodeReader::ResultHandle>::HandleGuard(
void *handle) noexcept
17 : HandleGuard<CodeReader::ResultHandle>(handle, [](
void *handle) { CVB_CALL_CAPI(
ReleaseObject(handle)); })
23 class ResultHandle final
26 friend class Result2D;
34 ResultHandle(ResultHandle &&other)
noexcept =
default;
37 ResultHandle(
const ResultHandle &other) =
delete;
38 ResultHandle &operator=(
const ResultHandle &other) =
delete;
39 explicit ResultHandle(HandleGuard<ResultHandle> &&guard, PrivateTag) noexcept
40 : handle_(std::move(guard))
43 virtual ~ResultHandle() =
default;
45 static std::unique_ptr<ResultHandle> FromHandle(HandleGuard<ResultHandle> &&guard)
48 throw std::runtime_error(
"ResultHandle must not be null");
50 return std::make_unique<ResultHandle>(std::move(guard), PrivateTag{});
53 void *Handle() const noexcept
55 return handle_.Handle();
59 HandleGuard<ResultHandle> handle_;
60 Cvb::optional<Result2D> TryCreateResult2D(
size_t i)
const;
61 std::vector<Result> CreateResultVector()
const;
cvbbool_t ReleaseObject(OBJ &Object)
Namespace for all decoding functionalities.
Definition decl_config_2d_codes.hpp:10
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17