feisty meow concerns codebase  2.140
application_configuration.h
Go to the documentation of this file.
1 #ifndef APPLICATION_CONFIGURATION_GROUP
2 #define APPLICATION_CONFIGURATION_GROUP
3 
16 #include <basis/astring.h>
17 #include <basis/definitions.h>
19 
20 namespace configuration {
21 
23 
24 class application_configuration : public virtual basis::root_object
25 {
26 public:
28 
29  // these methods are mainly about the application itself.
30 
33 
36 
37  static basis::un_int process_id();
39 
40  // these interface with the operating system.
41 
44 
49 
50  // the following are more about the installation than this application...
51 
52  static const char *software_product_name();
54 
55 // static basis::astring installation_root();
57 
61  static const char *APPLICATION_CONFIGURATION_FILENAME();
63 
69 
75 
78 
82  static const basis::astring &virtual_unix_root();
84 
89  // the following are key names within the main configuration file.
90  // not generally for external use.
91 
92  static const basis::astring &GLOBAL_SECTION_NAME();
94 
100  static const basis::astring &LOGGING_FOLDER_NAME();
102 
105 
113  // helper methods.
114 
115  static basis::astring read_item(const basis::astring &key_name);
117 
123 
130 #if defined(__UNIX__) || defined(__GNU_WINDOWS__)
131  #ifdef __APPLE__
132  static basis::astring get_cmdline_for_apple();
133  #endif
138 #endif
139 };
140 
141 } // namespace.
142 
143 #endif
144 
Provides a dynamically resizable ASCII character string.
Definition: astring.h:35
Defines installation-specific locations in the file system.
static const basis::astring & LOGGING_FOLDER_NAME()
the tag used for finding our logging path in the paths config file.
static basis::astring get_logging_directory()
< retrieves the core binary directory location from paths.ini.
static basis::astring make_logfile_name(const basis::astring &base_name)
generates an installation appropriate log file name from "base_name".
static basis::astring query_for_process_info()
seeks out process info for a particular process.
static basis::astring application_name()
returns the full name of the current application.
static const basis::astring & virtual_unix_root()
returns the path to the unix root, which may be simulated.
static basis::un_int process_id()
returns the process id for this task, if that's relevant on the OS.
static const basis::astring & GLOBAL_SECTION_NAME()
the root section name for our configuration items in the main ini file.
static basis::astring current_directory()
returns the current directory as reported by the operating system.
static const basis::astring & DEFAULT_VIRTUAL_UNIX_ROOT()
default value if we don't find our setting for virtual root.
static basis::astring application_configuration_file()
the fully specified path to the main path configuration file.
static basis::astring application_directory()
returns the directory name where this application is running from.
static basis::astring get_cmdline_from_proc()
retrieves the command line from the /proc hierarchy on linux.
static const char * APPLICATION_CONFIGURATION_FILENAME()
< returns the top-level directory of this installation.
static const char * software_product_name()
This global function is available to the system at large for branding info.
static structures::version get_OS_version()
returns the operating system's version information.
static basis::astring read_item(const basis::astring &key_name)
returns the entry listed under the "key_name".
Holds a file's version identifier.
char * base_name(register char *file)
Definition: makedep.cpp:653
Constants and objects used throughout HOOPLE.
unsigned int un_int
Abbreviated name for unsigned integers.
Definition: definitions.h:62