ArkScript
A small, fast, functional and scripting language for video games
Future.hpp
Go to the documentation of this file.
1
/**
2
* @file Future.hpp
3
* @author Alexandre Plateau (
[email protected]
)
4
* @brief
5
* @version 0.1
6
* @date 2022-05-28
7
*
8
* @copyright Copyright (c) 2022
9
*
10
*/
11
12
#ifndef ARK_VM_FUTURE_HPP
13
#define ARK_VM_FUTURE_HPP
14
15
#include <future>
16
#include <vector>
17
18
#include <
Ark/VM/Value.hpp
>
19
#include <
Ark/VM/ExecutionContext.hpp
>
20
21
namespace
Ark::internal
22
{
23
class
Future
24
{
25
public
:
26
Future
(
ExecutionContext
* context,
VM
* vm, std::vector<Value>& args);
27
28
Value
resolve
();
29
30
private
:
31
ExecutionContext
*
m_context
;
32
VM
*
m_vm
;
33
std::future<Value>
m_value
;
34
};
35
}
36
37
#endif
ExecutionContext.hpp
Keeping track of the internal data needed by the VM.
Value.hpp
Ark::VM
The ArkScript virtual machine, executing ArkScript bytecode.
Definition:
VM.hpp:48
Ark::Value
Definition:
Value.hpp:71
Ark::internal::Future
Definition:
Future.hpp:24
Ark::internal::Future::m_context
ExecutionContext * m_context
Definition:
Future.hpp:31
Ark::internal::Future::m_value
std::future< Value > m_value
Definition:
Future.hpp:33
Ark::internal::Future::m_vm
VM * m_vm
Definition:
Future.hpp:32
Ark::internal::Future::resolve
Value resolve()
Definition:
Future.cpp:15
Ark::internal
Definition:
Builtins.hpp:26
Ark::internal::ExecutionContext
Definition:
ExecutionContext.hpp:31
include
Ark
VM
Future.hpp
Generated on Sun Apr 23 2023 20:17:28 for ArkScript by
1.9.6