Panda3D
|
Encapsulates access to the environment variables and command-line arguments at the time of execution. More...
Static Public Member Functions | |
static | clearShadow (string var) |
Removes a value set by a previous call to shadow_environment_variable(), and lets the actual value of the variable show again. | |
static string | expandString (string str) |
static string | getArg (int n) |
Returns the nth command-line argument. | |
static string | getBinaryName () |
Returns the name of the binary executable that started this program, if it can be determined. | |
static Filename | getCwd () |
static string | getDtoolName () |
Returns the name of the libdtool DLL that is used in this program, if it can be determined. | |
static string | getEnvironmentVariable (string var) |
Returns the definition of the indicated environment variable, or the empty string if the variable is undefined. | |
static int | getNumArgs () |
Returns the number of command-line arguments available, not counting arg 0, the binary name. | |
static bool | hasEnvironmentVariable (string var) |
Returns true if the indicated environment variable is defined. | |
static | setEnvironmentVariable (string var, string value) |
Changes the definition of the indicated environment variable. | |
static | shadowEnvironmentVariable (string var, string value) |
Changes the apparent definition of the indicated environment variable by masking it within this class with a new value. |
Encapsulates access to the environment variables and command-line arguments at the time of execution.
This is encapsulated to support accessing these things during static init time, which seems to be risky at best.
static clearShadow | ( | string | var | ) | [static] |
Removes a value set by a previous call to shadow_environment_variable(), and lets the actual value of the variable show again.
static string expandString | ( | string | str | ) | [static] |
static string getArg | ( | int | n | ) | [static] |
Returns the nth command-line argument.
The index n must be in the range [0 .. get_num_args()). The first parameter, n == 0, is the first actual parameter, not the binary name.
static string getBinaryName | ( | ) | [static] |
Returns the name of the binary executable that started this program, if it can be determined.
static Filename getCwd | ( | ) | [static] |
static string getDtoolName | ( | ) | [static] |
Returns the name of the libdtool DLL that is used in this program, if it can be determined.
static string getEnvironmentVariable | ( | string | var | ) | [static] |
Returns the definition of the indicated environment variable, or the empty string if the variable is undefined.
static int getNumArgs | ( | ) | [static] |
Returns the number of command-line arguments available, not counting arg 0, the binary name.
static bool hasEnvironmentVariable | ( | string | var | ) | [static] |
Returns true if the indicated environment variable is defined.
static setEnvironmentVariable | ( | string | var, |
string | value | ||
) | [static] |
Changes the definition of the indicated environment variable.
static shadowEnvironmentVariable | ( | string | var, |
string | value | ||
) | [static] |
Changes the apparent definition of the indicated environment variable by masking it within this class with a new value.
This does not change the actual environment variable, but future calls to get_environment_variable() will return this new value.