40#define LOG(s) CLASS_EMERGENCY_LOG(program_wide_logger::get(), s)
42static bool _leave_now =
false;
56 #undef static_class_name
57 #define static_class_name() "test_break_signal"
59 LOG(
"we have hit the signal handler for break!");
61 #undef static_class_name
64int test_break_signal::execute()
76 LOG(
"starting loop--hit ctrl-C to exit or wait for timeout.");
78 while (!_leave_now && (
time_stamp() < leave_time) ) {
The application_shell is a base object for console programs.
virtual int execute()=0
< retrieves the command line from the /proc hierarchy on linux.
application_shell()
constructs an application_shell to serve as the root of the program.
Provides a dynamically resizable ASCII character string.
int convert(int default_value) const
Converts the string into a corresponding integer.
static void alert_message(const char *info, const char *title="Alert Message")
shows the message in "info", with an optional "title" on the message.
static void sleep_ms(basis::un_int msec)
a system independent name for a forced snooze measured in milliseconds.
Represents a point in time relative to the operating system startup time.
#define formal(parameter)
This macro just eats what it's passed; it marks unused formal parameters.
#define NULL_POINTER
The value representing a pointer to nothing.
#define DEFINE_CLASS_NAME(objname)
Defines the name of a class by providing a couple standard methods.
#define FUNCDEF(func_in)
FUNCDEF sets the name of a function (and plugs it into the callstack).
Provides macros that implement the 'main' program of an application.
#define HOOPLE_MAIN(obj_name, obj_args)
options that should work for most unix and linux apps.
Implements an application lock to ensure only one is running at once.
The guards collection helps in testing preconditions and reporting errors.
const int SECOND_ms
Number of milliseconds in a second.
A logger that sends to the console screen using the standard output device.
Useful support functions for unit testing, especially within hoople.
void handle_break(int formal(signal))
const int DEFAULT_PAUSE_TIME