1 #ifndef HOOPLE_SERVICE_CLASS
2 #define HOOPLE_SERVICE_CLASS
89 int timer_period = 0);
122 static bool &_saw_interrupt();
124 static bool &_defunct();
125 static int &_timer_period();
127 virtual void handle_timer_callback();
A platform-independent way to alert a program that it should shut down immediately.
virtual void handle_startup()
this function is called once the program has begun operation.
hoople_service()
constructor does very little; setup() is what begins operation.
static void make_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("hoople_service")
static void handle_OS_signal(int sig_id)
processes the signal from the OS when its time to shut down.
bool saw_interrupt()
reports whether the process saw an interrupt from the user.
static bool launch_console(hoople_service &alert, const basis::astring &app_name, int timer_period=0)
this is used to begin execution of a console mode application.
static bool is_defunct()
returns true if the object has been marked as defunct.
bool setup(const basis::astring &app_name, int timer_period=0)
constructs a hoople_service for the "app_name" specified.
static void close_this_program()
causes this particular application to begin shutting down.
virtual ~hoople_service()
virtual void handle_shutdown()
called during the program's shutdown process.
static bool close_application(const basis::astring &app_name)
attempts to close the application named "app_name".
Provides a dynamically resizable ASCII character string.
timeable is the base for objects that can be hooked into timer events.
Constants and objects used throughout HOOPLE.
Implements an application lock to ensure only one is running at once.