![]() |
NDEVR
API Documentation
|
Forward declaration of InfoPipe. More...
Public Member Functions | |
| EnvironmentalVariable (const StringView &variable) | |
| AllocConsole initializes standard input, standard output, and standard error handles for the new console. | |
| ~EnvironmentalVariable () | |
| Destructor. | |
| const String & | get () |
| Gets the current value of the environmental variable, fetching it from the OS if needed. | |
| Resource< String > & | resource () |
| Returns a reference to the underlying Resource that mirrors the environmental variable. | |
Static Public Member Functions | |
| static String | GetEnvironmentalVariable (const StringView &label) |
| Gets an environmental variable from the OS. | |
| static String | ResolveEnvironmentalVariables (const StringView &string) |
| Returns a string where all environmental variables have been resolved. | |
| static void | SetProgramEnvironmentalVariable (const StringView &label, const StringView &value) |
| Sets an environmental variable to the OS, in a seperate thread if possible. | |
| static void | SetSystemEnvironmentalVariable (const StringView &label, const StringView &value, bool blocking=false, LogPtr log=LogPtr()) |
| Sets an environmental variable to the OS, in a seperate thread if possible. | |
| static void | SetUserEnvironmentalVariable (const StringView &label, const StringView &value, bool blocking=false, LogPtr log=LogPtr()) |
| Sets an environmental variable to the OS, in a seperate thread if possible. | |
Private Member Functions | |
| void | onValueChanged () final override |
| Called when the Resource value changes, propagating the new value to the OS environmental variable. | |
Forward declaration of InfoPipe.
A class that wraps an OS environmental variable with a Resource value. Any calls to set for this resource will also set the environmental variable via ApplicationResource::SetUserEnvironmentalVariable
Definition at line 17 of file EnvironmentalVariable.h.
| EnvironmentalVariable::EnvironmentalVariable | ( | const StringView & | variable | ) |
AllocConsole initializes standard input, standard output, and standard error handles for the new console.
The standard input handle is a handle to the console's input buffer, and the standard output and standard error handles are handles to the console's screen buffer. To retrieve these handles, use the GetStdHandle function.
| EnvironmentalVariable::~EnvironmentalVariable | ( | ) |
Destructor.
Cleans up the environmental variable wrapper.
| const String & EnvironmentalVariable::get | ( | ) |
Gets the current value of the environmental variable, fetching it from the OS if needed.
|
static |
Gets an environmental variable from the OS.
|
static |
Returns a string where all environmental variables have been resolved.
Returns a reference to the underlying Resource that mirrors the environmental variable.
|
static |
Sets an environmental variable to the OS, in a seperate thread if possible.
Program environmental variable
|
static |
Sets an environmental variable to the OS, in a seperate thread if possible.
Program environmental variable
|
static |
Sets an environmental variable to the OS, in a seperate thread if possible.
Program environmental variable