xtd 0.2.0
Loading...
Searching...
No Matches
signal.h
Go to the documentation of this file.
1
4#pragma once
5#include "enum.h"
6#include <csignal>
7
9namespace xtd {
18 enum class signal {
20 abnormal_termination = SIGABRT,
24 illegal_instruction = SIGILL,
26 interrupt = SIGINT,
28 segmentation_violation = SIGSEGV,
30 software_termination = SIGTERM,
31 };
32}
33
35template<> struct xtd::enum_register<xtd::signal> {
36 explicit operator auto() const noexcept {return xtd::enum_collection<xtd::signal> {{xtd::signal::abnormal_termination, "abnormal_termination"}, {xtd::signal::floating_point_exception, "floating_point_exception"}, {xtd::signal::illegal_instruction, "illegal_instruction"}, {xtd::signal::interrupt, "interrupt"}, {xtd::signal::segmentation_violation, "segmentation_violation"}, {xtd::signal::software_termination, "software_termination"}};}
37};
Contains enum_ and enum_ut_ keywords.
signal
Specifies signals that can interrupt the current process.
Definition signal.h:18
std::vector< xtd::collections::generic::key_value_pair< enum_t, xtd::string > > enum_collection
Represents a pair of an enum_t value and a string of an enum of type enum_t.
Definition enum_collection.h:22
@ floating_point_exception
Erroneous arithmetic operation such as divide by zero. Is equal to SIGFPE.
@ segmentation_violation
Invalid memory access (segmentation fault). Is equal to SIGSEGV.
@ interrupt
external interrupt, usually initiated by the user. Is equal to SIGINT.
@ abnormal_termination
Abnormal termination triggered by abort call. Is equal to SIGABRT.
@ software_termination
Termination request, sent to the program. Is equal to SIGTERM.
@ illegal_instruction
Invalid program image, such as invalid instruction. Is equal to SIGILL.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Provides the registration struct for enumerations.
Definition enum_register.h:38