ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
EnvironmentVariables Struct Reference

Description:


Simple struct providing one static method that reads an environment variable into an ALib string type.

While under posix compatible operating systems, environment variable names are case sensitive, under Microsoft windows they are not.

Definition at line 31 of file environment.hpp.

#include <environment.hpp>

Public Static Method Index:

static ALIB_API bool Get (const CString &varName, AString &target, lang::CurrentData targetData=lang::CurrentData::Clear)
 

Method Details:

◆ Get()

bool Get ( const CString & varName,
AString & target,
lang::CurrentData targetData = lang::CurrentData::Clear )
static

Reads an environment variable into an ALib string.

Attention
  1. While under posix compatible operating systems, environment variable names are case sensitive, under Microsoft windows they are not.
  1. As documented with std::getenv , the operation is not thread safe against changes of the environment in parallel threads.
Parameters
varNameThe name of the variable to be retrieved.
targetAn AString to write the result to.
targetDataIf CurrentData::Keep, the parameter target is not cleared before the result is written. Defaults to CurrentData::Clear.
Returns
true if variable was found.

Definition at line 30 of file environment.cpp.

Here is the call graph for this function:

The documentation for this struct was generated from the following files: