xrootd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Attributes | List of all members
XrdCl::PropertyList Class Reference

A key-value pair map storing both keys and values as strings. More...

#include <XrdClPropertyList.hh>

Public Types

typedef std::map< std::string,
std::string > 
PropertyMap
 

Public Member Functions

template<typename Item >
void Set (const std::string &name, const Item &value)
 
template<typename Item >
bool Get (const std::string &name, Item &item) const
 
template<typename Item >
Item Get (const std::string &name) const
 
template<typename Item >
void Set (const std::string &name, uint32_t index, const Item &value)
 
template<typename Item >
bool Get (const std::string &name, uint32_t index, Item &item) const
 
template<typename Item >
Item Get (const std::string &name, uint32_t index) const
 
bool HasProperty (const std::string &name) const
 Check if we now about the given name. More...
 
bool HasProperty (const std::string &name, uint32_t index) const
 Check if we know about the given name and index. More...
 
PropertyMap::const_iterator begin () const
 Get the begin iterator. More...
 
PropertyMap::const_iterator end () const
 Get the end iterator. More...
 
void Clear ()
 Clear the property list. More...
 
template<>
void Set (const std::string &name, const XRootDStatus &item)
 
template<>
bool Get (const std::string &name, XRootDStatus &item) const
 
template<>
XRootDStatus Get (const std::string &name) const
 
template<>
void Set (const std::string &name, const URL &item)
 
template<>
bool Get (const std::string &name, URL &item) const
 

Private Attributes

PropertyMap pProperties
 

Detailed Description

A key-value pair map storing both keys and values as strings.

Member Typedef Documentation

typedef std::map<std::string, std::string> XrdCl::PropertyList::PropertyMap

Member Function Documentation

PropertyMap::const_iterator XrdCl::PropertyList::begin ( ) const
inline

Get the begin iterator.

References pProperties.

void XrdCl::PropertyList::Clear ( )
inline

Clear the property list.

References pProperties.

PropertyMap::const_iterator XrdCl::PropertyList::end ( ) const
inline

Get the end iterator.

References pProperties.

template<typename Item >
bool XrdCl::PropertyList::Get ( const std::string &  name,
Item &  item 
) const
inline

Get the value associated with a name

Returns
true if the name was found, false otherwise

References pProperties.

Referenced by Get(), XrdCl::CopyJob::Init(), and XrdCl::CopyProcess::MarkTPC().

template<typename Item >
Item XrdCl::PropertyList::Get ( const std::string &  name) const
inline

Get the value associated with a name

Returns
the value or Item() if the key does not exist

References pProperties.

template<typename Item >
bool XrdCl::PropertyList::Get ( const std::string &  name,
uint32_t  index,
Item &  item 
) const
inline

Get the value associated with a key and an index

Returns
true if the key and index were found, false otherwise

References Get().

template<typename Item >
Item XrdCl::PropertyList::Get ( const std::string &  name,
uint32_t  index 
) const
inline

Get the value associated with a key and an index

Returns
the value or Item() if the key does not exist
template<>
bool XrdCl::PropertyList::Get ( const std::string &  name,
XRootDStatus item 
) const
inline
template<>
XRootDStatus XrdCl::PropertyList::Get ( const std::string &  name) const
inline
template<>
bool XrdCl::PropertyList::Get ( const std::string &  name,
URL item 
) const
inline
bool XrdCl::PropertyList::HasProperty ( const std::string &  name) const
inline

Check if we now about the given name.

References pProperties.

Referenced by HasProperty().

bool XrdCl::PropertyList::HasProperty ( const std::string &  name,
uint32_t  index 
) const
inline

Check if we know about the given name and index.

References HasProperty().

template<typename Item >
void XrdCl::PropertyList::Set ( const std::string &  name,
const Item &  value 
)
inline

Associate a value with a key

Parameters
namemust not contain spaces
valueneeds to be convertible to std::string

References pProperties.

Referenced by XrdCl::CopyProcess::MarkTPC(), and Set().

template<typename Item >
void XrdCl::PropertyList::Set ( const std::string &  name,
uint32_t  index,
const Item &  value 
)
inline

Set a value with a name and an index

Parameters
namemust not contain spaces
index
valuemust be convertible to std::string

References Set().

template<>
void XrdCl::PropertyList::Set ( const std::string &  name,
const XRootDStatus item 
)
inline
template<>
void XrdCl::PropertyList::Set ( const std::string &  name,
const URL item 
)
inline

Member Data Documentation

PropertyMap XrdCl::PropertyList::pProperties
private

Referenced by begin(), Clear(), end(), Get(), HasProperty(), and Set().


The documentation for this class was generated from the following file: