feisty meow concerns codebase  2.140
environment.h
Go to the documentation of this file.
1 #ifndef ENVIRONMENT_CLASS
2 #define ENVIRONMENT_CLASS
3 
5 // Name : environment
6 // Author : Chris Koeritz
8 // Copyright (c) 1994-$now By Author. This program is free software; you can
9 // redistribute it and/or modify it under the terms of the GNU General Public
10 // License as published by the Free Software Foundation:
11 // http://www.gnu.org/licenses/gpl.html
12 // or under the terms of the GNU Library license:
13 // http://www.gnu.org/licenses/lgpl.html
14 // at your preference. Those licenses describe your legal rights to this
15 // software, and no other rights or warranties apply.
16 // Please send updates for this code to: fred@gruntose.com -- Thanks, fred.
18 
19 #include "astring.h"
20 #include "definitions.h"
21 
22 namespace basis {
23 
25 
26 class environment : public virtual root_object
27 {
28 public:
29  static astring TMP();
31 
35  static astring get(const astring &variable_name);
37 
42  static bool set(const astring &variable_name, const astring &value);
44 
49 };
50 
51 } //namespace.
52 
53 #endif
54 
Provides a dynamically resizable ASCII character string.
Definition: astring.h:35
Provides access to the system's environment variables.
Definition: environment.h:27
static astring TMP()
provides a single place to get the temporary directory.
Definition: environment.cpp:39
static astring get(const astring &variable_name)
looks up the "variable_name" in the current environment variables.
Definition: environment.cpp:57
static bool set(const astring &variable_name, const astring &value)
adds or creates "variable_name" in the environment.
Definition: environment.cpp:72
static basis::un_int system_uptime()
gives the operating system's uptime in a small form that rolls over.
Definition: environment.cpp:84
Constants and objects used throughout HOOPLE.
The guards collection helps in testing preconditions and reporting errors.
Definition: array.h:30
unsigned int un_int
Abbreviated name for unsigned integers.
Definition: definitions.h:62