contur2
Loading...
Searching...
No Matches
i_execution_engine.h
Go to the documentation of this file.
1
7
8#pragma once
9
10#include <cstddef>
11#include <string_view>
12
13#include "contur/core/types.h"
14
16
17namespace contur {
18
19 class ProcessImage;
20
34 {
35 public:
36 virtual ~IExecutionEngine() = default;
37
48 [[nodiscard]] virtual ExecutionResult execute(ProcessImage &process, std::size_t tickBudget) = 0;
49
52 virtual void halt(ProcessId pid) = 0;
53
56 [[nodiscard]] virtual std::string_view name() const noexcept = 0;
57
58 protected:
59 IExecutionEngine() = default;
61 IExecutionEngine &operator=(const IExecutionEngine &) = default;
63 IExecutionEngine &operator=(IExecutionEngine &&) = default;
64 };
65
66} // namespace contur
virtual ExecutionResult execute(ProcessImage &process, std::size_t tickBudget)=0
Executes the given process for up to tickBudget ticks.
virtual void halt(ProcessId pid)=0
Forcibly halts execution of the given process.
virtual ~IExecutionEngine()=default
virtual std::string_view name() const noexcept=0
Returns the human-readable name of this engine.
Full in-memory representation of a process.
ExecutionResult and related types for execution engine outcomes.
Definition block.h:15
std::uint32_t ProcessId
Unique identifier for a process.
Definition types.h:12
Result of an execution burst returned by IExecutionEngine::execute().
Common type aliases, sentinel constants, and forward declarations used throughout the Contur 2 kernel...