cpp-terminal 1.0.0
Small C++ library for writing multiplatform terminal applications
Loading...
Searching...
No Matches
signals.hpp
Go to the documentation of this file.
1/*
2* cpp-terminal
3* C++ library for writing multi-platform terminal applications.
4*
5* SPDX-FileCopyrightText: 2019-2024 cpp-terminal
6*
7* SPDX-License-Identifier: MIT
8*/
9
10#pragma once
11#include <cstddef>
12#include <vector>
13
14using sighandler_t = void (*)(int);
15
16namespace Term
17{
18class Terminal;
19namespace Private
20{
22{
23public:
24 Signals(std::vector<sighandler_t>& m_han) noexcept;
25 ~Signals() noexcept {}
26 void setHandler(const sighandler_t& handler) noexcept;
27 static void reset_and_raise(int sign, std::vector<sighandler_t>& m_han, Term::Terminal&) noexcept;
28
29private:
30 const static std::size_t m_signals_number;
31};
32} // namespace Private
33} // namespace Term
static const std::size_t m_signals_number
Definition signals.hpp:21
Signals(std::vector< sighandler_t > &m_han) noexcept
Definition signals.cpp:28
static void reset_and_raise(int sign, std::vector< sighandler_t > &m_han, Term::Terminal &) noexcept
Definition signals.cpp:64
void setHandler(const sighandler_t &handler) noexcept
Definition signals.cpp:23
Definition args.cpp:13
void(*)(int) sighandler_t
Definition signals.hpp:14