|
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) |
| void | WriteLock () |
| void | UnLock () |
| void | ReInitializeLock () |
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 | 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.
typedef std::map<std::string, std::pair<int, bool> > XrdCl::Env::IntMap [private] |
typedef std::map<std::string, std::pair<std::string, bool> > XrdCl::Env::StringMap [private] |
| virtual XrdCl::Env::~Env | ( | ) | [inline, virtual] |
Destructor.
| std::string XrdCl::Env::GetEnv | ( | const std::string & | key | ) | [private] |
Referenced by ImportInt(), and ImportString().
| bool XrdCl::Env::GetInt | ( | const std::string & | key, |
| int & | value | ||
| ) |
Get an int associated to the given key
References XrdCl::Log::Debug(), XrdCl::DefaultEnv::GetLog(), pIntMap, pLock, and XrdCl::UtilityMsg.
Referenced by XrdCl::AsyncSocketHandler::AsyncSocketHandler(), XrdCl::Channel::Channel(), XrdCl::XRootDTransport::InitializeChannel(), XrdCl::PostMaster::PostMaster(), XrdCl::MessageUtils::ProcessSendParams(), XrdCl::FileTimer::Run(), and XrdCl::Stream::Stream().
| bool XrdCl::Env::GetString | ( | const std::string & | key, |
| std::string & | value | ||
| ) |
Get a string associated to the given key
References XrdCl::Log::Debug(), XrdCl::DefaultEnv::GetLog(), pLock, pStringMap, and XrdCl::UtilityMsg.
Referenced by BuildPath(), BuildPrompt(), DoLS(), XrdCl::DefaultEnv::GetMonitor(), and XrdCl::PostMaster::Initialize().
| bool XrdCl::Env::ImportInt | ( | const std::string & | key, |
| const std::string & | shellKey | ||
| ) |
Import an int from the shell environment
References XrdCl::Log::Error(), GetEnv(), XrdCl::DefaultEnv::GetLog(), XrdCl::Log::Info(), pIntMap, pLock, and XrdCl::UtilityMsg.
Referenced by XrdCl::DefaultEnv::DefaultEnv().
| bool XrdCl::Env::ImportString | ( | const std::string & | key, |
| const std::string & | shellKey | ||
| ) |
Import a string from the shell environment
References GetEnv(), XrdCl::DefaultEnv::GetLog(), XrdCl::Log::Info(), pLock, pStringMap, and XrdCl::UtilityMsg.
Referenced by XrdCl::DefaultEnv::DefaultEnv(), and XrdClTests::TestEnv::TestEnv().
| bool XrdCl::Env::PutInt | ( | const std::string & | key, |
| int | value | ||
| ) |
Associate an int with the given key
References XrdCl::Log::Debug(), XrdCl::DefaultEnv::GetLog(), pIntMap, pLock, and XrdCl::UtilityMsg.
Referenced by XrdCl::DefaultEnv::DefaultEnv(), FileCopyTest::MultiStreamDownloadTest(), ThreadingTest::MultiStreamReadForkTest(), ThreadingTest::MultiStreamReadMonitorTest(), ThreadingTest::MultiStreamReadTest(), FileCopyTest::MultiStreamUploadTest(), ProcessCommandLineEnv(), and ThreadingTest::ReadForkTest().
| bool XrdCl::Env::PutString | ( | const std::string & | key, |
| const std::string & | value | ||
| ) |
Associate a string with the given key
References XrdCl::Log::Debug(), XrdCl::DefaultEnv::GetLog(), pLock, pStringMap, and XrdCl::UtilityMsg.
Referenced by CreateExecutor(), XrdCl::DefaultEnv::DefaultEnv(), DoCD(), ThreadingTest::MultiStreamReadMonitorTest(), ProcessCommandLineEnv(), and XrdClTests::TestEnv::TestEnv().
| void XrdCl::Env::ReInitializeLock | ( | ) | [inline] |
References pLock, XrdSysRWLock::ReInitialize(), and XrdSysRWLock::UnLock().
| void XrdCl::Env::UnLock | ( | ) | [inline] |
References pLock, and XrdSysRWLock::UnLock().
| void XrdCl::Env::WriteLock | ( | ) | [inline] |
References pLock, and XrdSysRWLock::WriteLock().
IntMap XrdCl::Env::pIntMap [private] |
Referenced by GetInt(), ImportInt(), and PutInt().
XrdSysRWLock XrdCl::Env::pLock [private] |
Referenced by GetInt(), GetString(), ImportInt(), ImportString(), PutInt(), PutString(), ReInitializeLock(), UnLock(), and WriteLock().
StringMap XrdCl::Env::pStringMap [private] |
Referenced by GetString(), ImportString(), and PutString().
1.7.6.1