cutelyst 4.0.0
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
async.h
1/*
2 * SPDX-FileCopyrightText: (C) 2020-2023 Daniel Nicoletti <dantti12@gmail.com>
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5#pragma once
6
7#include <Cutelyst/cutelyst_global.h>
8#include <functional>
9#include <memory>
10
11namespace Cutelyst {
12
13class Context;
14class ASyncPrivate;
15class CUTELYST_LIBRARY ASync
16{
17public:
18 ASync() noexcept;
19 ASync(Context *c);
20 ASync(Context *c, std::function<void(Context *c)> cb);
21 ASync(const ASync &other);
22 ASync(ASync &&other) noexcept;
23
24 ~ASync();
25
26 ASync &operator=(const ASync &copy);
27
28 ASync &operator=(ASync &&other) noexcept
29 {
30 std::swap(d, other.d);
31 return *this;
32 }
33
34private:
35 std::shared_ptr<ASyncPrivate> d;
36};
37
38} // namespace Cutelyst
The Cutelyst Context.
Definition: context.h:38
The Cutelyst namespace holds all public Cutelyst API.
Definition: Mainpage.dox:8