LeechCraft  0.6.70-18450-gabe19ee3b0
Modular cross-platform feature rich live environment.
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 {
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 }
void await_suspend(auto handle)
Definition: asdomdocument.h:29
std::source_location loc
#define UTIL_THREADS_API
Definition: threadsconfig.h:16
void TerminateLeftyCoroutine(std::coroutine_handle< Promise > handle, const auto &error)
Definition: either.h:25