feisty meow concerns codebase
2.140
|
The application_shell is a base object for console programs. More...
#include <application_shell.h>
Inherits application::base_application.
Inherited by application_example [virtual]
, application_example [virtual]
, await_app_exit, bundle_creator, create_guid, dirtree, find_missing, ini_editor, link_parser, marks_checker, marks_maker, marks_maker_javascript, marks_sorter, mdate_app, splitter_app, synch_files_tentacle, t_amorph [virtual]
, test_address [virtual]
, test_angle [virtual]
, test_array, test_bcast_spocket [virtual]
, test_bin, test_bit_vector [virtual]
, test_blowfish [virtual]
, test_boilerplate [virtual]
, test_byte_filer [virtual]
, test_byte_format [virtual]
, test_ccri_angle_average [virtual]
, test_chaos [virtual]
, test_directory [virtual]
, test_directory_tree [virtual]
, test_double_plus [virtual]
, test_doubly_linked_list [virtual]
, test_earth_time [virtual]
, test_ellipse [virtual]
, test_entity_data_bin_threaded, test_enum_adapaters [virtual]
, test_file_info, test_file_time, test_filename [virtual]
, test_geometric [virtual]
, test_hash_table [virtual]
, test_huge_file [virtual]
, test_int_hash [virtual]
, test_math_ops [virtual]
, test_matrix [virtual]
, test_memory_limiter [virtual]
, test_mutex [virtual]
, test_node [virtual]
, test_object_packing [virtual]
, test_packable_tree, test_parsing_csv [virtual]
, test_point [virtual]
, test_rectangle_warper [virtual]
, test_rsa [virtual]
, test_section_manager [virtual]
, test_sequence_tracker [virtual]
, test_set [virtual]
, test_singly_linked_list [virtual]
, test_sorts [virtual]
, test_span_manager [virtual]
, test_splitter [virtual]
, test_spocket [virtual]
, test_stack [virtual]
, test_stopwatch, test_string, test_string_table [virtual]
, test_symbol_table [virtual]
, test_symbol_tree, test_system_preconditions [virtual]
, test_tokenizer [virtual]
, test_tree [virtual]
, test_ucast_spocket [virtual]
, test_unique_id [virtual]
, test_version [virtual]
, test_xml_generator [virtual]
, time_running_app, time_set_effective_id, transporter, unpacker_stub, value_tagger, version_stamper, vsts_version_fixer, and write_build_config.
Public Member Functions | |
application_shell () | |
constructs an application_shell to serve as the root of the program. More... | |
virtual | ~application_shell () |
virtual int | execute_application () |
runs the base class's execute() method and catches any exceptions due to it. More... | |
int | exit_value () const |
once the application has finished executing, this will contain the exit value. More... | |
const mathematics::chaos & | randomizer () const |
provides access to the random number generator owned by this app. More... | |
virtual basis::outcome | log (const basis::base_string &to_print, int filter=basis::ALWAYS_PRINT) |
< returns the full name of the current application. More... | |
Public Member Functions inherited from application::base_application | |
virtual const char * | class_name () const =0 |
Returns the bare name of this class as a constant character pointer. More... | |
Static Public Member Functions | |
static application_shell * | single_instance () |
in a program with a single application_shell extant, this gives out the instance. More... | |
Protected Member Functions | |
virtual int | execute ()=0 |
< retrieves the command line from the /proc hierarchy on linux. More... | |
The application_shell is a base object for console programs.
It is generally used in that context (console mode), but can be employed as the root of windowed programs also. The application_shell provides a few features, such as logging functionality, that make it a bit easier than starting up a program from scratch every time.
Definition at line 32 of file application_shell.h.
application_shell::application_shell | ( | ) |
constructs an application_shell to serve as the root of the program.
Definition at line 49 of file application_shell.cpp.
References application::not_so_hidden_pointer, and SETUP_COMBO_LOGGER.
|
virtual |
Definition at line 58 of file application_shell.cpp.
References application::not_so_hidden_pointer.
|
protectedpure virtual |
< retrieves the command line from the /proc hierarchy on linux.
< seeks out process info for a particular process. forwards base_application responsibility upwards to derived objects. this should not be invoked by anyone in general; it is automatically called from the constructor of this class.
Implements application::base_application.
Implemented in write_build_config.
Referenced by execute_application().
|
virtual |
runs the base class's execute() method and catches any exceptions due to it.
you can override this method, but generally should never need to. the derived class's method should catch exceptions and deal with them meaningfully also.
Definition at line 75 of file application_shell.cpp.
References execute().
|
inline |
once the application has finished executing, this will contain the exit value.
Definition at line 55 of file application_shell.h.
|
virtual |
< returns the full name of the current application.
< returns the process id for this task, if that's relevant on the OS. < returns the current directory as reported by the operating system. as above, logs a line "to_print" but only if the "filter" is enabled. the second version uses the filter value to assess whether to print the string or not. the string will not print if that filter is not enabled for the program wide logger.
Definition at line 63 of file application_shell.cpp.
References basis::astring::insert(), and basis::astring::length().
|
inline |
provides access to the random number generator owned by this app.
Definition at line 58 of file application_shell.h.
|
static |
in a program with a single application_shell extant, this gives out the instance.
if there are more than one application_shells floating around a program, then this will only give out the most recently registered. note that this pointer is not the slightest bit thread safe if it's changing after the application shell has been constructed, and that it cannot be relied upon until that's happened either. be careful. do not use it in any function that might be invoked during program shutdown.
Definition at line 47 of file application_shell.cpp.
References application::not_so_hidden_pointer.