cutelyst 4.3.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);
29 ASync(Context *c, std::function<void(Context *c)> cb);
30 ASync(const ASync &other);
31 ASync(ASync &&other) noexcept;
32
34
35 ASync &operator=(const ASync &copy);
36
37 ASync &operator=(ASync &&other) noexcept
38 {
39 std::swap(d, other.d);
40 return *this;
41 }
42
43private:
44 std::shared_ptr<ASyncPrivate> d;
45};
46
47} // namespace Cutelyst
Helper class for asynchronous processing.
Definition async.h:16
ASync() noexcept
The Cutelyst Context.
Definition context.h:42
The Cutelyst namespace holds all public Cutelyst API.