XrdCl::Env Class Reference

#include <XrdClEnv.hh>

Inheritance diagram for XrdCl::Env:

Inheritance graph
[legend]
Collaboration diagram for XrdCl::Env:

Collaboration graph
[legend]
List of all members.

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

Detailed Description

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.


Member Typedef Documentation

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]


Constructor & Destructor Documentation

virtual XrdCl::Env::~Env (  )  [inline, virtual]

Destructor.


Member Function Documentation

std::string XrdCl::Env::GetEnv ( const std::string &  key  )  [private]

bool XrdCl::Env::GetInt ( const std::string &  key,
int &  value 
)

Get an int associated to the given key

Returns:
true if the value was found, false otherwise

bool XrdCl::Env::GetString ( const std::string &  key,
std::string &  value 
)

Get a string associated to the given key

Returns:
true if the value was found, false otherwise

bool XrdCl::Env::ImportInt ( const std::string &  key,
const std::string &  shellKey 
)

Import an int from the shell environment

Returns:
true if the setting exists in the shell, false otherwise

bool XrdCl::Env::ImportString ( const std::string &  key,
const std::string &  shellKey 
)

Import a string from the shell environment

Returns:
true if the setting exists in the shell, false otherwise

bool XrdCl::Env::PutInt ( const std::string &  key,
int  value 
)

Associate an int with the given key

Returns:
false if there is already a shell-imported setting for this key, true otherwise

bool XrdCl::Env::PutString ( const std::string &  key,
const std::string &  value 
)

Associate a string with the given key

Returns:
false if there is already a shell-imported setting for this key, true otherwise

void XrdCl::Env::ReInitializeLock (  )  [inline]

void XrdCl::Env::UnLock (  )  [inline]

void XrdCl::Env::WriteLock (  )  [inline]


Member Data Documentation

IntMap XrdCl::Env::pIntMap [private]

XrdSysRWLock XrdCl::Env::pLock [private]

StringMap XrdCl::Env::pStringMap [private]


The documentation for this class was generated from the following file:
Generated on 16 Jan 2014 for xrootd by  doxygen 1.4.7