1 #ifndef SHUTDOWN_ALERTER_CLASS
2 #define SHUTDOWN_ALERTER_CLASS
85 int timer_period = 0);
118 static bool &_saw_interrupt();
120 static bool &_defunct();
121 static int &_timer_period();
123 virtual void handle_timer_callback();
Provides a dynamically resizable ASCII character string.
A platform-independent way to alert a program that it should shut down immediately.
static bool is_defunct()
returns true if the object has been marked as defunct.
static void set_defunct()
used by the derived class to mark that this object is about to exit.
virtual void handle_timer()
called periodically if a timer period was specified.
DEFINE_CLASS_NAME("shutdown_alerter")
bool setup(const basis::astring &app_name, int timer_period=0)
constructs a shutdown_alerter for the "app_name" specified.
static void handle_OS_signal(int sig_id)
processes the signal from the OS when its time to shut down.
static void close_this_program()
causes this particular application to begin shutting down.
bool saw_interrupt()
reports whether the process saw an interrupt from the user.
shutdown_alerter()
constructor does very little; setup() is what begins operation.
static bool launch_console(shutdown_alerter &alert, const basis::astring &app_name, int timer_period=0)
this is used to begin execution of a console mode application.
virtual void handle_startup()
this function is called once the program has begun operation.
virtual void handle_shutdown()
called during the program's shutdown process.
virtual ~shutdown_alerter()
static bool close_application(const basis::astring &app_name)
attempts to close the application named "app_name".
timeable is the base for objects that can be hooked into timer events.
Constants and objects used throughout HOOPLE.