NCBI C++ ToolKit
Public Member Functions | Private Attributes | List of all members
CAutoEnvironmentVariable Class Reference

Search Toolkit Book for CAutoEnvironmentVariable

CAutoEnvironmentVariable –. More...

#include <corelib/ncbienv.hpp>

+ Collaboration diagram for CAutoEnvironmentVariable:

Public Member Functions

 CAutoEnvironmentVariable (const CTempString &var_name, const CTempString &value="1", CNcbiEnvironment *env=NULL)
 Initializes the environment variable passed as an argument to the corresponding value ("1" by default) More...
 
 ~CAutoEnvironmentVariable ()
 Destructor which restores the modifications made in the environment by this class. More...
 

Private Attributes

AutoPtr< CNcbiEnvironmentm_Env
 Affected CNcbiEnvironment instance. More...
 
string m_VariableName
 Name of the environment variable manipulated. More...
 
string m_PrevValue
 Previous value of the environment variable manipulated. More...
 
bool m_WasSet
 Was the variable originally set at all? More...
 

Detailed Description

CAutoEnvironmentVariable –.

Establish an environment setting for a limited time.

CAutoEnvironmentVariable establishes an environment variable setting for the lifetime of the instance (which may be associated with a unit test case), restoring the previous value (if any) when destroyed.

Definition at line 178 of file ncbienv.hpp.


The documentation for this class was generated from the following files:
Modified on Wed May 15 15:07:08 2024 by modify_doxy.py rev. 669887