CMS 3D CMS Logo

envSwitch Class Reference

a bool controlled by envvar More...

#include <Utilities/General/interface/envUtil.h>

List of all members.

Public Member Functions

 envSwitch (const char *envName)
 constructor from env var name
const boolgetEnv () const
 return the value
const std::string & name () const
 operator const bool & () const
 return the value
envSwitchoperator= (bool b)
 assignement operator (change the value...)

Private Attributes

std::string envName_
bool it


Detailed Description

a bool controlled by envvar

Definition at line 71 of file envUtil.h.


Constructor & Destructor Documentation

envSwitch::envSwitch ( const char *  envName  ) 

constructor from env var name

Definition at line 41 of file envUtil.cc.

00041                                          :  envName_(envName),
00042                                               it(::getenv(envName)!=0) {}


Member Function Documentation

const bool& envSwitch::getEnv (  )  const [inline]

return the value

Definition at line 85 of file envUtil.h.

References it.

00085 { return it;}

const std::string& envSwitch::name ( void   )  const [inline]

Definition at line 87 of file envUtil.h.

References envName_.

00087 { return envName_;}

envSwitch::operator const bool & (  )  const [inline]

return the value

Definition at line 82 of file envUtil.h.

References it.

00082 { return it;}

envSwitch& envSwitch::operator= ( bool  b  )  [inline]

assignement operator (change the value...)

Definition at line 78 of file envUtil.h.

References it.

00078 { it=b; return *this;}


Member Data Documentation

std::string envSwitch::envName_ [private]

Definition at line 91 of file envUtil.h.

Referenced by name().

bool envSwitch::it [private]

Definition at line 92 of file envUtil.h.

Referenced by getEnv(), operator const bool &(), and operator=().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:20:24 2009 for CMSSW by  doxygen 1.5.4