AsyncFw
1.2
Async Framework is c++ runtime with timers, poll notifiers, sockets, coroutines, etc.
Loading...
Searching...
No Matches
AnyData.h
1
/*
2
Copyright (c) 2026 Alexandr Kuzmuk
3
4
This file is part of the AsyncFw project. Licensed under the MIT License.
5
See {Link: LICENSE file https://mit-license.org} in the project root for full license information.
6
*/
7
8
#pragma once
9
10
#include <any>
11
12
namespace
AsyncFw {
14
struct
AnyData {
15
template
<
typename
T>
16
T data()
const
{
17
return
std::any_cast<T>(data_);
18
}
19
AnyData(
const
std::any &);
20
AnyData();
21
~AnyData();
22
std::any &data()
const
{
return
data_; }
23
void
setData(
const
std::any &data)
const
{ data_ = data; };
24
25
protected
:
26
mutable
std::any data_;
27
};
28
}
// namespace AsyncFw
core
AnyData.h
Generated by
1.13.2