The C++ framework for developing highly scalable, high performance servers on Windows platforms.

CEnvironmentVariables Class Reference

Inheritance diagram for CEnvironmentVariables:
Collaboration diagram for CEnvironmentVariables:

List of all members.


Detailed Description

A class that wraps the operating system Environment Variable API.


Public Member Functions

 CEnvironmentVariables ()
 CEnvironmentVariables (const CEnvironmentVariables &rhs)
 ~CEnvironmentVariables () override
CEnvironmentVariablesoperator= (const CEnvironmentVariables &rhs)
const Core::StringMapGetStrings () const override
 Returns all of the strings from this environment block as a map of name/value pairs.
void GetStrings (Core::StringMap &strings) const override
 Adds all of the strings from this environment block as name/value pairs to the supplied map of strings. Merges with, and overwrites any existing name/value pairs in the supplied map.
bool IsVariableSet (const Core::_tstring &name) const override
 Returns true if the specified variable is set.
Core::_tstring GetVariable (const Core::_tstring &name) const override
 Returns the value of the specified environment variable or an empty string if the value is not set.
void SetVariable (const Core::_tstring &name, const Core::_tstring &value) override
 Sets the specified environment variable to the supplied value. Note that an empty string for a value is not acceptable; use DeleteEnvironmentVariable to remove a variable.
void DeleteVariable (const Core::_tstring &name) override
 Deletes the specified variable from the environment.
bool TryDeleteVariable (const Core::_tstring &name) override
 Deletes the specified variable from the environment if it exists and returns true, returns false if the variable doesn't exist.


Constructor & Destructor Documentation

~CEnvironmentVariables (  )  [override]


Member Function Documentation

CEnvironmentVariables& operator= ( const CEnvironmentVariables rhs  ) 

const StringMap & GetStrings (  )  const [override, virtual]

Returns all of the strings from this environment block as a map of name/value pairs.

Implements IManageEnvironmentVariables.

void GetStrings ( Core::StringMap variables  )  const [override, virtual]

Adds all of the strings from this environment block as name/value pairs to the supplied map of strings. Merges with, and overwrites any existing name/value pairs in the supplied map.

Implements IManageEnvironmentVariables.

bool IsVariableSet ( const Core::_tstring name  )  const [override, virtual]

Returns true if the specified variable is set.

Implements IManageEnvironmentVariables.

Core::_tstring GetVariable ( const Core::_tstring name  )  const [override, virtual]

Returns the value of the specified environment variable or an empty string if the value is not set.

Implements IManageEnvironmentVariables.

void SetVariable ( const Core::_tstring name,
const Core::_tstring value 
) [override, virtual]

Sets the specified environment variable to the supplied value. Note that an empty string for a value is not acceptable; use DeleteEnvironmentVariable to remove a variable.

Implements IManageEnvironmentVariables.

void DeleteVariable ( const Core::_tstring name  )  [override, virtual]

Deletes the specified variable from the environment.

Implements IManageEnvironmentVariables.

bool TryDeleteVariable ( const Core::_tstring name  )  [override, virtual]

Deletes the specified variable from the environment if it exists and returns true, returns false if the variable doesn't exist.

Implements IManageEnvironmentVariables.


Generated on Sun Sep 12 19:11:32 2021 for The Server Framework - v7.4 by doxygen 1.5.3