CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
envSwitch Class Reference

#include <envUtil.h>

Public Member Functions

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

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.

41  : envName_(envName),
42  it(::getenv(envName)!=0) {}
std::string envName_
Definition: envUtil.h:91
bool it
Definition: envUtil.h:92

Member Function Documentation

const bool& envSwitch::getEnv ( ) const
inline

return the value

Definition at line 85 of file envUtil.h.

References it.

85 { return it;}
bool it
Definition: envUtil.h:92
const std::string& envSwitch::name ( void  ) const
inline

Definition at line 87 of file envUtil.h.

References envName_.

87 { return envName_;}
std::string envName_
Definition: envUtil.h:91
envSwitch::operator const bool & ( ) const
inline

return the value

Definition at line 82 of file envUtil.h.

References it.

82 { return it;}
bool it
Definition: envUtil.h:92
envSwitch& envSwitch::operator= ( bool  b)
inline

assignement operator (change the value...)

Definition at line 78 of file envUtil.h.

References b, and it.

78 { it=b; return *this;}
bool it
Definition: envUtil.h:92
double b
Definition: hdecay.h:120

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=().