#include <DetDesc/ParamList.h>
Inheritance diagram for ParamList:
Public Types | |
typedef M | map_type |
typedef std::string | key_type |
typedef BasicParam * | mapped_type |
typedef std::string | argument_type |
typedef BasicParam * | result_type |
typedef std::pair< const std::string, BasicParam * > | value_type |
typedef map_type::size_type | size_type |
typedef map_type::iterator | iterator |
typedef map_type::const_iterator | const_iterator |
Public Member Functions | |
ParamList () | |
Standard constructor. | |
ParamList (const ParamList &pl) | |
Copy constructor. | |
virtual | ~ParamList () |
Destructor. | |
template<class T> | |
void | add (const std::string &key, const T &val) |
Add a new parameter to the list (or replace if already there). | |
void | addBasicParam (const std::string &key, const BasicParam *&p) |
virtual std::vector< std::string > | getKeys () const |
return a vector containing all the stored keys | |
ParamList & | operator= (const ParamList &pl) |
Copy a list into this one (deleting this one). | |
ParamList & | operator+= (const ParamList &pl) |
Merge two lists (overwriting objects with the same name). | |
void | clear () |
Remove all elements from the list, deleting the objects. | |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
mapped_type & | operator[] (const key_type &key) |
const mapped_type & | operator[] (const key_type &key) const |
iterator | find (const key_type &key) |
const_iterator | find (const key_type &key) const |
size_type | count (const key_type &key) const |
iterator | lower_bound (const key_type &key) |
const_iterator | lower_bound (const key_type &key) const |
iterator | upper_bound (const key_type &key) |
const_iterator | upper_bound (const key_type &key) const |
std::pair< iterator, iterator > | equal_range (const key_type &key) |
std::pair< const_iterator, const_iterator > | equal_range (const key_type &key) const |
std::pair< iterator, bool > | insert (const value_type &val) |
iterator | insert (iterator pos, const value_type &val) |
void | insert (In first, In last) |
void | erase (iterator pos) |
size_type | erase (const key_type &key) |
void | erase (iterator first, iterator last) |
size_type | size () const |
size_type | max_size () const |
bool | empty () const |
void | swap (map_type &other) |
const result_type & | operator() (const argument_type &key) const |
Map & | merge (const map_type &other) |
operator map_type & () | |
operator const map_type & () const | |
Protected Attributes | |
map_type | m_map |
Static Protected Attributes | |
static const result_type | s_null_value |
Private Types | |
typedef GaudiUtils::Map< std::string, BasicParam * > | base_type |
Private Member Functions | |
void | deleteItems () |
Definition at line 19 of file ParamList.h.
typedef GaudiUtils::Map<std::string,BasicParam *> ParamList::base_type [private] |
Definition at line 21 of file ParamList.h.
typedef M GaudiUtils::Map< std::string , BasicParam * , M >::map_type [inherited] |
typedef std::string GaudiUtils::Map< std::string , BasicParam * , M >::key_type [inherited] |
typedef BasicParam * GaudiUtils::Map< std::string , BasicParam * , M >::mapped_type [inherited] |
typedef std::string GaudiUtils::Map< std::string , BasicParam * , M >::argument_type [inherited] |
typedef BasicParam * GaudiUtils::Map< std::string , BasicParam * , M >::result_type [inherited] |
typedef std::pair< const std::string , BasicParam * > GaudiUtils::Map< std::string , BasicParam * , M >::value_type [inherited] |
typedef map_type::size_type GaudiUtils::Map< std::string , BasicParam * , M >::size_type [inherited] |
typedef map_type::iterator GaudiUtils::Map< std::string , BasicParam * , M >::iterator [inherited] |
typedef map_type::const_iterator GaudiUtils::Map< std::string , BasicParam * , M >::const_iterator [inherited] |
ParamList::ParamList | ( | ) |
Standard constructor.
ParamList::ParamList | ( | const ParamList & | pl | ) |
Copy constructor.
virtual ParamList::~ParamList | ( | ) | [virtual] |
Destructor.
void ParamList::add | ( | const std::string & | key, | |
const T & | val | |||
) | [inline] |
Add a new parameter to the list (or replace if already there).
Definition at line 35 of file ParamList.h.
00035 { 00036 iterator i = find(key); 00037 if ( i != end() ) { // key already used 00038 i->second->set(val); 00039 } else { 00040 //(*this)[key] = new Param<T>(val); 00041 insert(std::pair<std::string,Param<T>*>(key,new Param<T>(val))); 00042 } 00043 }
void ParamList::addBasicParam | ( | const std::string & | key, | |
const BasicParam *& | p | |||
) | [inline] |
Definition at line 45 of file ParamList.h.
00045 { 00046 iterator i = find(key); 00047 if ( i != end() ) { // key already used 00048 // replace with new one 00049 delete i->second; 00050 i->second = p->new_copy(); 00051 } else { 00052 //(*this)[key] = p->new_copy(); 00053 insert(std::pair<std::string,BasicParam*>(key,p->new_copy())); 00054 } 00055 }
virtual std::vector<std::string> ParamList::getKeys | ( | ) | const [virtual] |
return a vector containing all the stored keys
Copy a list into this one (deleting this one).
Merge two lists (overwriting objects with the same name).
void ParamList::clear | ( | ) |
Remove all elements from the list, deleting the objects.
Reimplemented from GaudiUtils::Map< std::string, BasicParam * >.
void ParamList::deleteItems | ( | ) | [private] |
iterator GaudiUtils::Map< std::string , BasicParam * , M >::begin | ( | ) | [inherited] |
const_iterator GaudiUtils::Map< std::string , BasicParam * , M >::begin | ( | ) | const [inherited] |
iterator GaudiUtils::Map< std::string , BasicParam * , M >::end | ( | ) | [inherited] |
const_iterator GaudiUtils::Map< std::string , BasicParam * , M >::end | ( | ) | const [inherited] |
mapped_type & GaudiUtils::Map< std::string , BasicParam * , M >::operator[] | ( | const key_type & | key | ) | [inherited] |
const mapped_type & GaudiUtils::Map< std::string , BasicParam * , M >::operator[] | ( | const key_type & | key | ) | const [inherited] |
iterator GaudiUtils::Map< std::string , BasicParam * , M >::find | ( | const key_type & | key | ) | [inherited] |
const_iterator GaudiUtils::Map< std::string , BasicParam * , M >::find | ( | const key_type & | key | ) | const [inherited] |
size_type GaudiUtils::Map< std::string , BasicParam * , M >::count | ( | const key_type & | key | ) | const [inherited] |
iterator GaudiUtils::Map< std::string , BasicParam * , M >::lower_bound | ( | const key_type & | key | ) | [inherited] |
const_iterator GaudiUtils::Map< std::string , BasicParam * , M >::lower_bound | ( | const key_type & | key | ) | const [inherited] |
iterator GaudiUtils::Map< std::string , BasicParam * , M >::upper_bound | ( | const key_type & | key | ) | [inherited] |
const_iterator GaudiUtils::Map< std::string , BasicParam * , M >::upper_bound | ( | const key_type & | key | ) | const [inherited] |
std::pair< iterator, iterator > GaudiUtils::Map< std::string , BasicParam * , M >::equal_range | ( | const key_type & | key | ) | [inherited] |
std::pair< const_iterator, const_iterator > GaudiUtils::Map< std::string , BasicParam * , M >::equal_range | ( | const key_type & | key | ) | const [inherited] |
std::pair< iterator, bool > GaudiUtils::Map< std::string , BasicParam * , M >::insert | ( | const value_type & | val | ) | [inherited] |
iterator GaudiUtils::Map< std::string , BasicParam * , M >::insert | ( | iterator | pos, | |
const value_type & | val | |||
) | [inherited] |
void GaudiUtils::Map< std::string , BasicParam * , M >::insert | ( | In | first, | |
In | last | |||
) | [inherited] |
void GaudiUtils::Map< std::string , BasicParam * , M >::erase | ( | iterator | pos | ) | [inherited] |
size_type GaudiUtils::Map< std::string , BasicParam * , M >::erase | ( | const key_type & | key | ) | [inherited] |
void GaudiUtils::Map< std::string , BasicParam * , M >::erase | ( | iterator | first, | |
iterator | last | |||
) | [inherited] |
size_type GaudiUtils::Map< std::string , BasicParam * , M >::size | ( | ) | const [inherited] |
size_type GaudiUtils::Map< std::string , BasicParam * , M >::max_size | ( | ) | const [inherited] |
bool GaudiUtils::Map< std::string , BasicParam * , M >::empty | ( | ) | const [inherited] |
void GaudiUtils::Map< std::string , BasicParam * , M >::swap | ( | map_type & | other | ) | [inherited] |
const result_type & GaudiUtils::Map< std::string , BasicParam * , M >::operator() | ( | const argument_type & | key | ) | const [inherited] |
Map & GaudiUtils::Map< std::string , BasicParam * , M >::merge | ( | const map_type & | other | ) | [inherited] |
GaudiUtils::Map< std::string , BasicParam * , M >::operator map_type & | ( | ) | [inherited] |
GaudiUtils::Map< std::string , BasicParam * , M >::operator const map_type & | ( | ) | const [inherited] |
map_type GaudiUtils::Map< std::string , BasicParam * , M >::m_map [protected, inherited] |
const result_type GaudiUtils::Map< std::string , BasicParam * , M >::s_null_value [static, protected, inherited] |