#include <Iguana/Framework/interface/IgEnvsElement.h>
Public Member Functions | |
bool | getEnv (const std::string &name, double &value) const |
bool | getEnv (const std::string &name, float &value) const |
bool | getEnv (const std::string &name, unsigned long &value) const |
bool | getEnv (const std::string &name, unsigned int &value) const |
bool | getEnv (const std::string &name, long &value) const |
bool | getEnv (const std::string &name, int &value) const |
bool | getEnv (const std::string &name, std::vector< std::string > &value, char separator= ':') const |
bool | getEnv (const std::string &name, std::string &value) const |
IgEnvsElement (IgState *state) | |
Private Member Functions | |
IG_DECLARE_STATE_ELEMENT (IgEnvsElement) | |
Private Attributes | |
IgState * | m_state |
Definition at line 17 of file IgEnvsElement.h.
IgEnvsElement::IgEnvsElement | ( | IgState * | state | ) |
bool IgEnvsElement::getEnv | ( | const std::string & | name, | |
double & | value | |||
) | const |
Definition at line 121 of file IgEnvsElement.cc.
References python::cmstools::all(), getEnv(), and NULL.
00122 { 00123 std::string all; 00124 if (getEnv(name, all)) 00125 { 00126 value = strtod(all.c_str(), (char**)NULL); 00127 return true; 00128 } 00129 return false; 00130 }
bool IgEnvsElement::getEnv | ( | const std::string & | name, | |
float & | value | |||
) | const |
Definition at line 109 of file IgEnvsElement.cc.
References python::cmstools::all(), and getEnv().
00110 { 00111 std::string all; 00112 if (getEnv(name, all)) 00113 { 00114 value = atof(all.c_str()); 00115 return true; 00116 } 00117 return false; 00118 }
bool IgEnvsElement::getEnv | ( | const std::string & | name, | |
unsigned long & | value | |||
) | const |
Definition at line 97 of file IgEnvsElement.cc.
References python::cmstools::all(), getEnv(), and NULL.
00098 { 00099 std::string all; 00100 if (getEnv(name, all)) 00101 { 00102 value = strtoul(all.c_str(), (char**)NULL, 10); 00103 return true; 00104 } 00105 return false; 00106 }
bool IgEnvsElement::getEnv | ( | const std::string & | name, | |
long & | value | |||
) | const |
Definition at line 73 of file IgEnvsElement.cc.
References python::cmstools::all(), and getEnv().
00074 { 00075 std::string all; 00076 if (getEnv(name, all)) 00077 { 00078 value = atol(all.c_str()); 00079 return true; 00080 } 00081 return false; 00082 }
Definition at line 61 of file IgEnvsElement.cc.
References python::cmstools::all(), and getEnv().
00062 { 00063 std::string all; 00064 if (getEnv(name, all)) 00065 { 00066 value = atoi(all.c_str()); 00067 return true; 00068 } 00069 return false; 00070 }
bool IgEnvsElement::getEnv | ( | const std::string & | name, | |
std::vector< std::string > & | value, | |||
char | separator = ':' | |||
) | const |
Definition at line 36 of file IgEnvsElement.cc.
References python::cmstools::all(), getEnv(), i, and size.
00037 :' */) const 00038 { 00039 std::string all; 00040 if (getEnv(name, all)) 00041 { 00042 std::string item (""); 00043 size_t size = all.size(); 00044 for (size_t i=0; i<size; i++) 00045 { 00046 if (all[i] == separator) 00047 { 00048 value.push_back (item); 00049 item=""; 00050 } 00051 else 00052 item.push_back(all[i]); 00053 } 00054 value.push_back (item); 00055 return true; 00056 } 00057 return false; 00058 }
bool IgEnvsElement::getEnv | ( | const std::string & | name, | |
std::string & | value | |||
) | const |
Definition at line 24 of file IgEnvsElement.cc.
References NULL.
Referenced by IgFileManager::addPaths(), VisWebFrameworkService::doInitSession(), getEnv(), Ig3DShapeManager::Ig3DShapeManager(), IgWebService::IgWebService(), VisMainProgram::init(), IgStudioDriver::run(), and IgConfigElement::substituteValue().
00025 { 00026 char *envValue = getenv (name.c_str()); 00027 if (envValue != NULL) 00028 { 00029 value = envValue; 00030 return true; 00031 } 00032 return false; 00033 }
IgEnvsElement::IG_DECLARE_STATE_ELEMENT | ( | IgEnvsElement | ) | [private] |
IgState* IgEnvsElement::m_state [private] |