This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-Qt/example/doric/async/DoricAsyncResult.h
2021-07-21 19:03:29 +08:00

31 lines
494 B
C++

#ifndef ASYNCRESULT_H
#define ASYNCRESULT_H
#include <QString>
#include "DoricExport.h"
class DORIC_EXPORT DoricAsyncResult {
private:
QString result;
public:
std::function<void()> resultCallback = [] {};
std::function<void()> exceptionCallback;
std::function<void()> finishCallback;
DoricAsyncResult();
void setResult(QString result);
void setError(QString exception);
bool hasResult();
QString getResult();
QString waitUntilResult();
};
#endif // ASYNCRESULT_H