ALib C++ Library
Library Version: 2312 R0
Documentation generated by doxygen
Public Static Methods | List of all members
EnvironmentVariables Struct Reference

#include <environment.hpp>

Class 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 30 of file environment.hpp.

Public Static Methods

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

Member Function Documentation

◆ Get()

bool Get ( const CString varName,
AString target,
CurrentData  targetData = 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: