9#include "libmicroemu/types.h"
24 : status_code(status_code), program_exit_code(program_exit_code) {}
87 const int program_exit_code;
bool IsMaxInstructionsReached() const noexcept
Checks if the maximum number of instructions has been reached.
Definition exec_result.h:62
u32 GetProgramExitCode() const noexcept
Gets the program exit code.
Definition exec_result.h:83
bool IsErr() const noexcept
Checks if the execution result is an error.
Definition exec_result.h:56
ExecResult(const ExecResult &r) noexcept=default
Copy Constructor.
std::string_view ToString() const noexcept
Converts the contained status code to a string.
Definition exec_result.h:70
ExecResult(ExecResult &&r) noexcept=default
Move Constructor.
ExecResult & operator=(const ExecResult &r)=delete
Copy Assignment.
StatusCode GetStatusCode() const noexcept
Gets the status code of the execution result.
Definition exec_result.h:77
bool IsOk() const noexcept
Checks if the execution result is a success.
Definition exec_result.h:50
ExecResult(StatusCode status_code, int program_exit_code) noexcept
Constructs a new ExecResult object.
Definition exec_result.h:23
ExecResult & operator=(ExecResult &&r)=delete
Move Assignment.
The libmicroemu namespace contains all classes and functions of the libmicroemu which are public.
Definition bkpt_flags.h:6
static std::string_view StatusCodeToString(const StatusCode &status_code) noexcept
Converts a status code to a string.
Definition status_code.h:108
StatusCode
Enum representing various status codes used throughout the system.
Definition status_code.h:17
@ kMaxInstructionsReached
Maximum instruction count reached.
Definition status_code.h:100
@ kSuccess
Operation succeeded successfully.
Definition status_code.h:20
File contains enum class for status codes.