#include <ThreadSafeRegistry.h>
Public Types | |
typedef std::map< key_type, value_type > | collection_type |
typedef collection_type::const_iterator | const_iterator |
typedef E | extra_type |
typedef KEY | key_type |
typedef collection_type::size_type | size_type |
typedef T | value_type |
typedef std::vector< value_type > | vector_type |
Public Member Functions | |
const_iterator | begin () const |
collection_type const & | data () const |
collection_type & | dataForUpdate () |
Provide access to the contained collection. More... | |
bool | empty () const |
Return true if there are no contained value_type objects. More... | |
const_iterator | end () const |
extra_type const & | extra () const |
extra_type & | extraForUpdate () |
bool | getMapped (key_type const &k, value_type &result) const |
value_type const * | getMapped (key_type const &k) const |
void | insertCollection (collection_type const &c) |
void | insertCollection (vector_type const &c) |
bool | insertMapped (value_type const &v) |
bool | notEmpty () const |
Return true if there are any contained value_type objects. More... | |
void | print (std::ostream &os) const |
Print the contents of this registry to the given ostream. More... | |
size_type | size () const |
Return the number of contained value_type objects. More... | |
Static Public Member Functions | |
static ThreadSafeRegistry * | instance () |
Private Member Functions | |
ThreadSafeRegistry< KEY, T, E > & | operator= (ThreadSafeRegistry< KEY, T, E > const &) |
ThreadSafeRegistry () | |
ThreadSafeRegistry (ThreadSafeRegistry< KEY, T, E > const &) | |
~ThreadSafeRegistry () | |
Private Attributes | |
collection_type | data_ |
extra_type | extra_ |
Definition at line 34 of file ThreadSafeRegistry.h.
typedef std::map<key_type, value_type> edm::detail::ThreadSafeRegistry< KEY, T, E >::collection_type |
Definition at line 39 of file ThreadSafeRegistry.h.
typedef collection_type::const_iterator edm::detail::ThreadSafeRegistry< KEY, T, E >::const_iterator |
Definition at line 42 of file ThreadSafeRegistry.h.
typedef E edm::detail::ThreadSafeRegistry< KEY, T, E >::extra_type |
Definition at line 38 of file ThreadSafeRegistry.h.
typedef KEY edm::detail::ThreadSafeRegistry< KEY, T, E >::key_type |
Definition at line 36 of file ThreadSafeRegistry.h.
typedef collection_type::size_type edm::detail::ThreadSafeRegistry< KEY, T, E >::size_type |
Definition at line 40 of file ThreadSafeRegistry.h.
typedef T edm::detail::ThreadSafeRegistry< KEY, T, E >::value_type |
Definition at line 37 of file ThreadSafeRegistry.h.
typedef std::vector<value_type> edm::detail::ThreadSafeRegistry< KEY, T, E >::vector_type |
Definition at line 44 of file ThreadSafeRegistry.h.
|
private |
Definition at line 212 of file ThreadSafeRegistry.h.
|
private |
Definition at line 218 of file ThreadSafeRegistry.h.
|
private |
|
inline |
Allow iteration through the contents of the registry. Only const access is provided to the entries of the registry.
Definition at line 163 of file ThreadSafeRegistry.h.
|
inline |
|
inline |
|
inline |
Return true if there are no contained value_type objects.
Definition at line 142 of file ThreadSafeRegistry.h.
|
inline |
Definition at line 170 of file ThreadSafeRegistry.h.
|
inline |
Definition at line 200 of file ThreadSafeRegistry.h.
|
inline |
Provide access to the appendage "extra". The ThreadSafeRegistry doesn't know what this is for, but instantiations of the template can use it.
Definition at line 193 of file ThreadSafeRegistry.h.
Referenced by HLTConfigProvider::HLTConfigCounterSentry::HLTConfigCounterSentry(), and HLTConfigProvider::HLTConfigCounterSentry::~HLTConfigCounterSentry().
bool edm::detail::ThreadSafeRegistry< KEY, T, E >::getMapped | ( | key_type const & | k, |
value_type & | result | ||
) | const |
Retrieve the value_type object with the given key. If we return 'true', then 'result' carries the value_type object. If we return 'false, no matching key was found, and the value of 'result' is undefined.
Referenced by HLTConfigProvider::getDataFrom().
value_type const* edm::detail::ThreadSafeRegistry< KEY, T, E >::getMapped | ( | key_type const & | k | ) | const |
Retrieve a pointer to the value_type object with the given key. If there is no object associated with the given key 0 is returned.
void edm::detail::ThreadSafeRegistry< KEY, T, E >::insertCollection | ( | collection_type const & | c | ) |
put the value_type objects in the given collection into the registry.
Definition at line 125 of file ThreadSafeRegistry.h.
void edm::detail::ThreadSafeRegistry< KEY, T, E >::insertCollection | ( | vector_type const & | c | ) |
Definition at line 133 of file ThreadSafeRegistry.h.
bool edm::detail::ThreadSafeRegistry< KEY, T, E >::insertMapped | ( | value_type const & | v | ) |
Insert the given value_type object into the registry. If there was already a value_type object with the same key, we don't change it. This should be OK, since it should have the same contents if the key is the same. Return 'true' if we really added the new value_type object, and 'false' if the value_type object was already present.
Referenced by HLTConfigProvider::getDataFrom().
|
static |
|
inline |
Return true if there are any contained value_type objects.
Definition at line 149 of file ThreadSafeRegistry.h.
References relativeConstraints::empty.
|
private |
void edm::detail::ThreadSafeRegistry< KEY, T, E >::print | ( | std::ostream & | os | ) | const |
Print the contents of this registry to the given ostream.
Definition at line 176 of file ThreadSafeRegistry.h.
References begin, alignCSCRings::e, end, i, and findQualityFiles::size.
|
inline |
Return the number of contained value_type objects.
Definition at line 156 of file ThreadSafeRegistry.h.
|
private |
Definition at line 111 of file ThreadSafeRegistry.h.
|
private |
Definition at line 112 of file ThreadSafeRegistry.h.