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  DEFINE_CLASS_NAME("application_configuration");
30 
31  // these methods are mainly about the application itself.
32 
35 
38 
39  static basis::un_int process_id();
41 
42  // these interface with the operating system.
43 
46 
51 
52  // the following are more about the installation than this application...
53 
54  static const char *software_product_name();
56 
57 // static basis::astring installation_root();
59 
63  static const char *APPLICATION_CONFIGURATION_FILENAME();
65 
71 
77 
80 
84  static const basis::astring &virtual_unix_root();
86 
91  // the following are key names within the main configuration file.
92  // not generally for external use.
93 
94  static const basis::astring &GLOBAL_SECTION_NAME();
96 
102  static const basis::astring &LOGGING_FOLDER_NAME();
104 
107 
115  // helper methods.
116 
117  static basis::astring read_item(const basis::astring &key_name);
119 
125 
132 #if defined(__UNIX__) || defined(__GNU_WINDOWS__)
133  #ifdef __APPLE__
134  static basis::astring get_cmdline_for_apple();
135  #endif
140 #endif
141 };
142 
143 } // namespace.
144 
145 #endif
146 
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.
DEFINE_CLASS_NAME("application_configuration")
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(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