40#define LOG(to_print) CLASS_EMERGENCY_LOG(program_wide_logger().get(), astring(to_print))
48 application_example();
49 ~application_example();
53 bool already_running();
56 virtual void handle_timer();
59 virtual void handle_startup();
62 virtual void handle_shutdown();
77application_example::application_example()
82application_example::~application_example()
85int application_example::print_instructions()
88 LOG(
"no instructions at this time.");
92void application_example::handle_startup()
95 LOG(
"starting up now.");
98void application_example::handle_shutdown()
101 LOG(
"shutting down now.");
104void application_example::handle_timer()
110bool application_example::already_running()
111{
return _app_lock.already_running(); }
113int application_example::execute()
121 if (already_running()) {
129 "simple application name check");
131 return final_report();
int print_instructions(bool good, const astring &program_name)
The application_shell is a base object for console programs.
virtual int execute()=0
< retrieves the command line from the /proc hierarchy on linux.
Provides a dynamically resizable ASCII character string.
#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).
const int CHECKING_INTERVAL
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.
A dynamic container class that holds any kind of object via pointers.
Useful support functions for unit testing, especially within hoople.
#define ASSERT_EQUAL(a, b, test_name)
#define static_class_name()