LeechCraft 0.6.70-17609-g3dde4097dd
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
asdomdocument.h
Go to the documentation of this file.
1/**********************************************************************
2 * LeechCraft - modular cross-platform feature rich internet client.
3 * Copyright (C) 2006-2014 Georg Rudoy
4 *
5 * Distributed under the Boost Software License, Version 1.0.
6 * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7 **********************************************************************/
8
9#pragma once
10
11#include <source_location>
12#include <QDomDocument>
13#include "either.h"
14#include "../threadsconfig.h"
15
16namespace LC::Util
17{
19 {
20 QDomDocument Doc_;
21 QString ErrorMessage_;
22 public:
23 AsDomDocument (const QByteArray& data,
24 const QString& errorMessage,
25 const std::source_location& loc = std::source_location::current ());
26
27 bool await_ready () const;
28
29 void await_suspend (auto handle)
30 {
31 detail::TerminateLeftyCoroutine (handle, ErrorMessage_);
32 }
33
34 QDomDocument await_resume () const;
35 };
36}
AsDomDocument(const QByteArray &data, const QString &errorMessage, const std::source_location &loc=std::source_location::current())
void await_suspend(auto handle)
void TerminateLeftyCoroutine(std::coroutine_handle< Promise > handle, const auto &error)
Definition either.h:22
#define UTIL_THREADS_API