31#define LOG(s) CLASS_EMERGENCY_LOG(program_wide_logger::get(), s)
65 outcome to_return = common::OKAY;
80 }
catch (
const char *message) {
81 printf(
"BOOM: caught exception:\n%s\n", message);
83 printf(
"BOOM: caught exception:\n%s\n", message.s());
85 printf(
"BOOM: caught exception: unhandled type!\n");
The application_shell is a base object for console programs.
virtual int execute()=0
< retrieves the command line from the /proc hierarchy on linux.
virtual ~application_shell()
application_shell()
constructs an application_shell to serve as the root of the program.
virtual int execute_application()
runs the base class's execute() method and catches any exceptions due to it.
virtual basis::outcome log(const basis::base_string &to_print, int filter=basis::ALWAYS_PRINT)
< returns the full name of the current application.
static application_shell * single_instance()
in a program with a single application_shell extant, this gives out the instance.
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.
virtual outcome log(const base_string &info, int filter)=0
writes the information in "info" to the logger using the "filter".
Defines the base class for all string processing objects in hoople.
Outcomes describe the state of completion for an operation.
static loggers::standard_log_base & get()
Provided by the startup code within each application for logging.
static basis::astring notarize(bool add_space=true)
a useful method for getting a textual version of the time "right now".
#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.