ProcessEnvironmentΒΆ

Inherited: None

DescriptionΒΆ

Public MethodsΒΆ

const std::map<TString, TString> &

envVars () const

void

insert (const TString & key, const TString & variable)

TString

value (const TString & key) const

ProcessEnvironment &

operator= (const ProcessEnvironment & copy)

Static MethodsΒΆ

Methods DescriptionΒΆ

const std::map<TString, TString> & ProcessEnvironment::envVars () const

Access the underlying map of environment variables.


void ProcessEnvironment::insert (TString & key, TString & variable)

Insert or update an environment variable.

On Windows the key is normalized to upper-case prior to insertion.


ProcessEnvironment ProcessEnvironment::systemEnvironment ()

Create a ProcessEnvironment populated from the current system environment.

On Windows reads the wide-character environment block returned by GetEnvironmentStringsW(). On POSIX platforms it reads entries from the global environ pointer.


TString ProcessEnvironment::value (TString & key) const

Return the value for key or an empty string if not found.


ProcessEnvironment & ProcessEnvironment::operator= (ProcessEnvironment & copy)

Copy-assign environment variables from another instance.

Performs a deep copy of the internal environment variable map.