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
16
namespace
LC::Util
17
{
18
class
UTIL_THREADS_API
AsDomDocument
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
}
LC::Util::AsDomDocument::AsDomDocument
AsDomDocument(const QByteArray &data, const QString &errorMessage, const std::source_location &loc=std::source_location::current())
Definition
asdomdocument.cpp:14
LC::Util::AsDomDocument::await_suspend
void await_suspend(auto handle)
Definition
asdomdocument.h:29
LC::Util::AsDomDocument::await_ready
bool await_ready() const
Definition
asdomdocument.cpp:21
LC::Util::detail::TerminateLeftyCoroutine
void TerminateLeftyCoroutine(std::coroutine_handle< Promise > handle, const auto &error)
Definition
either.h:22
LC::Util
Definition
icoreproxy.h:34
either.h
threadsconfig.h
UTIL_THREADS_API
#define UTIL_THREADS_API
Definition
threadsconfig.h:16
src
util
threads
coro
asdomdocument.h
Generated by
1.14.0