xrootd
|
#include <XrdClEnv.hh>
Public Member Functions | |
virtual | ~Env () |
Destructor. | |
bool | GetString (const std::string &key, std::string &value) |
bool | PutString (const std::string &key, const std::string &value) |
bool | GetInt (const std::string &key, int &value) |
bool | PutInt (const std::string &key, int value) |
bool | ImportInt (const std::string &key, const std::string &shellKey) |
bool | ImportString (const std::string &key, const std::string &shellKey) |
bool | GetDefaultIntValue (const std::string &key, int &value) |
bool | GetDefaultStringValue (const std::string &key, std::string &value) |
void | WriteLock () |
void | UnLock () |
void | ReInitializeLock () |
void | RecreateLock () |
Private Types | |
typedef std::map< std::string, std::pair< std::string, bool > > | StringMap |
typedef std::map< std::string, std::pair< int, bool > > | IntMap |
Private Member Functions | |
std::string | UnifyKey (std::string key) |
std::string | GetEnv (const std::string &key) |
Private Attributes | |
XrdSysRWLock | pLock |
StringMap | pStringMap |
IntMap | pIntMap |
A simple key value store intended to hold global configuration. It is able to import the settings from the shell environment, the variables imported this way supersede these provided from the C++ code.
|
private |
|
private |
|
inlinevirtual |
Destructor.
bool XrdCl::Env::GetDefaultIntValue | ( | const std::string & | key, |
int & | value | ||
) |
Get default integer value for the given key
key | : the key |
value | : output parameter, default value corresponding to the key |
bool XrdCl::Env::GetDefaultStringValue | ( | const std::string & | key, |
std::string & | value | ||
) |
Get default string value for the given key
key | : the key |
value | : output parameter, default value corresponding to the key |
|
private |
bool XrdCl::Env::GetInt | ( | const std::string & | key, |
int & | value | ||
) |
Get an int associated to the given key
Referenced by XrdCl::ZipListHandler::ZipListHandler().
bool XrdCl::Env::GetString | ( | const std::string & | key, |
std::string & | value | ||
) |
Get a string associated to the given key
bool XrdCl::Env::ImportInt | ( | const std::string & | key, |
const std::string & | shellKey | ||
) |
Import an int from the shell environment. Any imported setting takes precedence over the one set by other means.
bool XrdCl::Env::ImportString | ( | const std::string & | key, |
const std::string & | shellKey | ||
) |
Import a string from the shell environment. Any imported setting takes precedence over the one set by ther means.
bool XrdCl::Env::PutInt | ( | const std::string & | key, |
int | value | ||
) |
Associate an int with the given key
bool XrdCl::Env::PutString | ( | const std::string & | key, |
const std::string & | value | ||
) |
Associate a string with the given key
|
inline |
References pLock.
|
inline |
References pLock, XrdSysRWLock::ReInitialize(), and XrdSysRWLock::UnLock().
|
inlineprivate |
|
inline |
References pLock, and XrdSysRWLock::UnLock().
|
inline |
References pLock, and XrdSysRWLock::WriteLock().
|
private |
|
private |
Referenced by RecreateLock(), ReInitializeLock(), UnLock(), and WriteLock().
|
private |