cutelyst  3.7.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-2022 Daniel Nicoletti <dantti12@gmail.com>
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 #ifndef ASYNC_H
6 #define ASYNC_H
7 
8 #include <Cutelyst/cutelyst_global.h>
9 
10 #include <memory>
11 #include <functional>
12 
13 namespace Cutelyst {
14 
15 class Context;
16 class ASyncPrivate;
17 class CUTELYST_LIBRARY ASync
18 {
19 public:
20  ASync();
21  ASync(Context *c);
22  ASync(Context *c, std::function<void(Context *c)> cb);
23  ASync(const ASync &other);
24  ASync(ASync &&other) noexcept;
25 
26  ~ASync();
27 
28  ASync &operator =(const ASync &copy);
29 
30  ASync &operator =(ASync &&other) noexcept
31  {
32  std::swap(d, other.d);
33  return *this;
34  }
35 
36 private:
37  std::shared_ptr<ASyncPrivate> d;
38 };
39 
40 }
41 
42 #endif // ASYNC_H
The Cutelyst Context.
Definition: context.h:39
The Cutelyst namespace holds all public Cutelyst API.
Definition: Mainpage.dox:8