EstervQrCode 2.0.0
Library for qr code manipulation
Loading...
Searching...
No Matches
async_promise.hpp
1// This file is part of OpenCV project.
2// It is subject to the license terms in the LICENSE file found in the top-level directory
3// of this distribution and at http://opencv.org/license.html.
4
5#ifndef OPENCV_CORE_ASYNC_PROMISE_HPP
6#define OPENCV_CORE_ASYNC_PROMISE_HPP
7
8#include "../async.hpp"
9
10#include "exception_ptr.hpp"
11
12namespace cv {
13
23{
24public:
29 void release() CV_NOEXCEPT;
30
34 AsyncArray getArrayResult();
35
39 void setValue(InputArray value);
40
41 // TODO "move" setters
42
43#if CV__EXCEPTION_PTR
48#endif
49
53 void setException(const cv::Exception& exception);
54
55 explicit AsyncPromise(AsyncPromise&& o) { p = o.p; o.p = NULL; }
56 AsyncPromise& operator=(AsyncPromise&& o) CV_NOEXCEPT { std::swap(p, o.p); return *this; }
57
58
59 // PImpl
60 typedef struct AsyncArray::Impl Impl; friend struct AsyncArray::Impl;
61 inline void* _getImpl() const CV_NOEXCEPT { return p; }
62protected:
64};
65
66
68} // namespace
69#endif // OPENCV_CORE_ASYNC_PROMISE_HPP
Returns result of asynchronous operations.
Definition async.hpp:30
Provides result of asynchronous operations.
Definition async_promise.hpp:23
void setException(const cv::Exception &exception)
void setException(std::exception_ptr exception)
struct AsyncArray::Impl Impl
Definition async_promise.hpp:60
AsyncPromise & operator=(AsyncPromise &&o) CV_NOEXCEPT
Definition async_promise.hpp:56
void * _getImpl() const CV_NOEXCEPT
Definition async_promise.hpp:61
~AsyncPromise() CV_NOEXCEPT
Impl * p
Definition async_promise.hpp:63
AsyncPromise(AsyncPromise &&o)
Definition async_promise.hpp:55
Class passed to an error.
Definition core.hpp:115
int CvScalar value
Definition core_c.h:720
#define CV_EXPORTS
Definition cvdef.h:435
#define CV_NOEXCEPT
Definition cvdef.h:800
"black box" representation of the file storage associated with a file on disk.
Definition calib3d.hpp:441
T swap(T... args)