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 (lexplt.dev@gmail.com)
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>
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:
32  VM* m_vm;
33  std::future<Value> m_value;
34  };
35 }
36 
37 #endif
Keeping track of the internal data needed by the VM.
The ArkScript virtual machine, executing ArkScript bytecode.
Definition: VM.hpp:47
ExecutionContext * m_context
Definition: Future.hpp:31
std::future< Value > m_value
Definition: Future.hpp:33
Future(ExecutionContext *context, VM *vm, std::vector< Value > &args)
Definition: Future.cpp:7