contur2
Loading...
Searching...
No Matches
i_process.h
Go to the documentation of this file.
1
7
8#pragma once
9
10#include <string_view>
11
12#include "contur/core/types.h"
13
16
17namespace contur {
18
19 struct ProcessTiming;
20
26 {
27 public:
28 virtual ~IProcess() = default;
29
32 [[nodiscard]] virtual ProcessId id() const noexcept = 0;
33
36 [[nodiscard]] virtual std::string_view name() const noexcept = 0;
37
40 [[nodiscard]] virtual ProcessState state() const noexcept = 0;
41
44 [[nodiscard]] virtual const Priority &priority() const noexcept = 0;
45
48 [[nodiscard]] virtual const ProcessTiming &timing() const noexcept = 0;
49
50 protected:
51 IProcess() = default;
52
53 // Non-copyable, non-movable (interface)
54 IProcess(const IProcess &) = default;
55 IProcess &operator=(const IProcess &) = default;
56 IProcess(IProcess &&) = default;
57 IProcess &operator=(IProcess &&) = default;
58 };
59
60} // namespace contur
virtual std::string_view name() const noexcept=0
Returns the human-readable process name.
virtual ~IProcess()=default
virtual const ProcessTiming & timing() const noexcept=0
Returns the process timing statistics.
virtual ProcessState state() const noexcept=0
Returns the current process state.
IProcess()=default
virtual ProcessId id() const noexcept=0
Returns the unique process ID.
virtual const Priority & priority() const noexcept=0
Returns the process priority descriptor.
Definition block.h:15
ProcessState
All possible states in a process lifecycle.
Definition state.h:29
std::uint32_t ProcessId
Unique identifier for a process.
Definition types.h:12
Process priority levels and the Priority struct.
ProcessState enum class and validated state transitions.
Composite priority descriptor for a process.
Definition priority.h:46
Aggregate holding process timing statistics.
Definition pcb.h:22
Common type aliases, sentinel constants, and forward declarations used throughout the Contur 2 kernel...