Qyoto
4.0.5
Qyoto is a C# language binding for Qt
|
The QProcessEnvironment class holds the environment variables that can be passed to a program. More...
Public Member Functions | |
override bool | Equals (object o) |
override int | GetHashCode () |
QProcessEnvironment () | |
| |
QProcessEnvironment (QProcessEnvironment other) | |
| |
virtual void | CreateProxy () |
new void | Clear () |
| |
new bool | Contains (string name) |
| |
new void | Insert (QProcessEnvironment e) |
| |
new void | Insert (string name, string value) |
| |
new bool | IsEmpty () |
| |
new System.Collections.Generic.List < string > | Keys () |
| |
new void | Remove (string name) |
| |
new System.Collections.Generic.List < string > | ToStringList () |
| |
new string | Value (string name, string defaultValue="") |
| |
new void | Dispose () |
Static Public Member Functions | |
static bool | operator!= (QProcessEnvironment arg1, QProcessEnvironment arg2) |
| |
static bool | operator== (QProcessEnvironment arg1, QProcessEnvironment arg2) |
| |
static QProcessEnvironment | SystemEnvironment () |
| |
Protected Member Functions | |
QProcessEnvironment (System.Type dummy) | |
Protected Attributes | |
SmokeInvocation | interceptor |
Properties | |
virtual System.IntPtr | SmokeObject [get, set] |
The QProcessEnvironment class holds the environment variables that can be passed to a program.
A process's environment is composed of a set of key=value pairs known as environment variables. The QProcessEnvironment class wraps that concept and allows easy manipulation of those variables. It's meant to be used along with QProcess, to set the environment for child processes. It cannot be used to change the current process's environment.
The environment of the calling process can be obtained using QProcessEnvironment::systemEnvironment().
On Unix systems, the variable names are case-sensitive. For that reason, this class will not touch the names of the variables. Note as well that Unix environment allows both variable names and contents to contain arbitrary binary data (except for the NUL character), but this is not supported by QProcessEnvironment. This class only supports names and values that are encodable by the current locale settings (see QTextCodec::codecForLocale).
On Windows, the variable names are case-insensitive. Therefore, QProcessEnvironment will always uppercase the names and do case-insensitive comparisons.
On Windows CE, the concept of environment does not exist. This class will keep the values set for compatibility with other platforms, but the values set will have no effect on the processes being created.
See also QProcess, QProcess::systemEnvironment(), and QProcess::setProcessEnvironment().
|
protected |
QtCore.QProcessEnvironment.QProcessEnvironment | ( | ) |
Creates a new QProcessEnvironment object. This constructor creates an empty environment. If set on a QProcess, this will cause the current environment variables to be removed.
QtCore.QProcessEnvironment.QProcessEnvironment | ( | QProcessEnvironment | other | ) |
Creates a QProcessEnvironment object that is a copy of other.
new void QtCore.QProcessEnvironment.Clear | ( | ) |
Removes all key=value pairs from this QProcessEnvironment object, making it empty.
See also isEmpty() and systemEnvironment().
new bool QtCore.QProcessEnvironment.Contains | ( | string | name | ) |
Returns true if the environment variable of name name is found in this QProcessEnvironment object.
On Windows, variable names are case-insensitive, so the key is converted to uppercase before searching. On other systems, names are case-sensitive so no trasformation is applied.
See also insert() and value().
|
virtual |
new void QtCore.QProcessEnvironment.Dispose | ( | ) |
override bool QtCore.QProcessEnvironment.Equals | ( | object | o | ) |
override int QtCore.QProcessEnvironment.GetHashCode | ( | ) |
new void QtCore.QProcessEnvironment.Insert | ( | QProcessEnvironment | e | ) |
This is an overloaded function.
Inserts the contents of e in this QProcessEnvironment object. Variables in this object that also exist in e will be overwritten.
This function was introduced in Qt 4.8.
new void QtCore.QProcessEnvironment.Insert | ( | string | name, |
string | value | ||
) |
Inserts the environment variable of name name and contents value into this QProcessEnvironment object. If that variable already existed, it is replaced by the new value.
On Windows, variable names are case-insensitive, so this function always uppercases the variable name before inserting. On other systems, names are case-sensitive, so no transformation is applied.
On most systems, inserting a variable with no contents will have the same effect for applications as if the variable had not been set at all. However, to guarantee that there are no incompatibilities, to remove a variable, please use the remove() function.
See also contains(), remove(), and value().
new bool QtCore.QProcessEnvironment.IsEmpty | ( | ) |
Returns true if this QProcessEnvironment object is empty: that is there are no key=value pairs set.
See also clear(), systemEnvironment(), and insert().
new System.Collections.Generic.List<string> QtCore.QProcessEnvironment.Keys | ( | ) |
Returns a list containing all the variable names in this QProcessEnvironment object.
This function was introduced in Qt 4.8.
|
static |
Returns true if this and the other QProcessEnvironment objects are different.
See also operator==().
|
static |
Returns true if this and the other QProcessEnvironment objects are equal.
Two QProcessEnvironment objects are considered equal if they have the same set of key=value pairs. The comparison of keys is done case-sensitive on platforms where the environment is case-sensitive.
See also operator!=() and contains().
new void QtCore.QProcessEnvironment.Remove | ( | string | name | ) |
Removes the environment variable identified by name from this QProcessEnvironment object. If that variable did not exist before, nothing happens.
On Windows, variable names are case-insensitive, so the key is converted to uppercase before searching. On other systems, names are case-sensitive so no trasformation is applied.
See also contains(), insert(), and value().
|
static |
The systemEnvironment function returns the environment of the calling process.
It is returned as a QProcessEnvironment. This function does not cache the system environment. Therefore, it's possible to obtain an updated version of the environment if low-level C library functions like setenv ot putenv have been called.
However, note that repeated calls to this function will recreate the QProcessEnvironment object, which is a non-trivial operation.
This function was introduced in Qt 4.6.
See also QProcess::systemEnvironment().
new System.Collections.Generic.List<string> QtCore.QProcessEnvironment.ToStringList | ( | ) |
Converts this QProcessEnvironment object into a list of strings, one for each environment variable that is set. The environment variable's name and its value are separated by an equal character ('=').
The QStringList contents returned by this function are suitable for use with the QProcess::setEnvironment function. However, it is recommended to use QProcess::setProcessEnvironment instead since that will avoid unnecessary copying of the data.
See also systemEnvironment(), QProcess::systemEnvironment(), QProcess::environment(), and QProcess::setEnvironment().
new string QtCore.QProcessEnvironment.Value | ( | string | name, |
string | defaultValue = "" |
||
) |
Searches this QProcessEnvironment object for a variable identified by name and returns its value. If the variable is not found in this object, then defaultValue is returned instead.
On Windows, variable names are case-insensitive, so the key is converted to uppercase before searching. On other systems, names are case-sensitive so no trasformation is applied.
See also contains(), insert(), and remove().
|
protected |
|
getset |