https://github.com/TakehideSoh/SAF
Tip revision: d26cc9f94a4f79c046ee0cdd3a127a44f7b443b6 authored by TakehideSoh on 23 June 2023, 07:02:26 UTC
Merge pull request #2 from TakehideSoh/dev
Merge pull request #2 from TakehideSoh/dev
Tip revision: d26cc9f
signal.hpp
#ifndef _signal_hpp_INCLUDED
#define _signal_hpp_INCLUDED
namespace CaDiCaL {
// Helper class for handling signals in applications.
class Handler {
public:
Handler () { }
virtual ~Handler () { }
virtual void catch_signal (int sig) = 0;
#ifndef __WIN32
virtual void catch_alarm ();
#endif
};
class Signal {
public:
static void set (Handler *);
static void reset ();
#ifndef __WIN32
static void alarm (int seconds);
static void reset_alarm ();
#endif
static const char * name (int sig);
};
}
#endif
