31 #define LOG(s) CLASS_EMERGENCY_LOG(program_wide_logger::get(), s)
33 using namespace basis;
49 application_shell::application_shell()
65 outcome to_return = common::OKAY;
66 if (program_wide_logger::get().member(filter)) {
69 temp_log.
insert(0, time_stamp::notarize(
true));
70 to_return = program_wide_logger::get().log(temp_log, filter);
79 }
catch (
const char *message) {
80 printf(
"caught exception:\n%s\n", message);
82 printf(
"caught exception:\n%s\n", message.s());
84 printf(
"caught exception: unknown type!\n");
The application_shell is a base object for console programs.
virtual basis::outcome log(const basis::base_string &to_print, int filter=basis::ALWAYS_PRINT)
< returns the full name of the current application.
virtual int execute()=0
< retrieves the command line from the /proc hierarchy on linux.
virtual ~application_shell()
virtual int execute_application()
runs the base class's execute() method and catches any exceptions due to it.
Provides a dynamically resizable ASCII character string.
void insert(int position, const astring &to_insert)
Copies "to_insert" into "this" at the "position".
int length() const
Returns the current length of the string.
Defines the base class for all string processing objects in hoople.
Outcomes describe the state of completion for an operation.
#define SETUP_COMBO_LOGGER
a macro that retasks the program-wide logger as a combo_logger.
Implements an application lock to ensure only one is running at once.
application_shell * not_so_hidden_pointer
const int MAXIMUM_COMMAND_LINE
The guards collection helps in testing preconditions and reporting errors.
const int KILOBYTE
Number of bytes in a kilobyte.
A logger that sends to the console screen using the standard output device.
An extension to floating point primitives providing approximate equality.