#include <ThreadSafeRegistry.h>
Public Types | |
typedef std::map< key_type, value_type > | collection_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 | |
bool | empty () const |
Return true if there are no contained value_type objects. More... | |
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 > & | operator= (ThreadSafeRegistry< KEY, T > const &)=delete |
ThreadSafeRegistry () | |
ThreadSafeRegistry (ThreadSafeRegistry< KEY, T > const &)=delete | |
~ThreadSafeRegistry () | |
Private Attributes | |
collection_type | data_ |
std::mutex | mutex_ |
Definition at line 34 of file ThreadSafeRegistry.h.
typedef std::map<key_type, value_type> edm::detail::ThreadSafeRegistry< KEY, T >::collection_type |
Definition at line 38 of file ThreadSafeRegistry.h.
typedef KEY edm::detail::ThreadSafeRegistry< KEY, T >::key_type |
Definition at line 36 of file ThreadSafeRegistry.h.
typedef collection_type::size_type edm::detail::ThreadSafeRegistry< KEY, T >::size_type |
Definition at line 39 of file ThreadSafeRegistry.h.
typedef T edm::detail::ThreadSafeRegistry< KEY, T >::value_type |
Definition at line 37 of file ThreadSafeRegistry.h.
typedef std::vector<value_type> edm::detail::ThreadSafeRegistry< KEY, T >::vector_type |
Definition at line 41 of file ThreadSafeRegistry.h.
|
private |
Definition at line 155 of file ThreadSafeRegistry.h.
|
private |
Definition at line 161 of file ThreadSafeRegistry.h.
|
privatedelete |
|
inline |
Return true if there are no contained value_type objects.
Definition at line 124 of file ThreadSafeRegistry.h.
References edm::detail::ThreadSafeRegistry< KEY, T >::data_, and edm::detail::ThreadSafeRegistry< KEY, T >::mutex_.
Referenced by edm::detail::ThreadSafeRegistry< KEY, T >::notEmpty().
template bool edm::detail::ThreadSafeRegistry< KEY, T >::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().
template HLTConfigDataRegistry::value_type const * edm::detail::ThreadSafeRegistry< KEY, T >::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 >::insertCollection | ( | collection_type const & | c | ) |
put the value_type objects in the given collection into the registry.
Definition at line 107 of file ThreadSafeRegistry.h.
References edm::detail::ThreadSafeRegistry< KEY, T >::insertMapped().
void edm::detail::ThreadSafeRegistry< KEY, T >::insertCollection | ( | vector_type const & | c | ) |
Definition at line 115 of file ThreadSafeRegistry.h.
References edm::detail::ThreadSafeRegistry< KEY, T >::insertMapped().
template bool edm::detail::ThreadSafeRegistry< KEY, T >::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(), and edm::detail::ThreadSafeRegistry< KEY, T >::insertCollection().
|
static |
Referenced by HLTConfigProvider::getDataFrom().
|
inline |
Return true if there are any contained value_type objects.
Definition at line 132 of file ThreadSafeRegistry.h.
References edm::detail::ThreadSafeRegistry< KEY, T >::empty().
|
privatedelete |
void edm::detail::ThreadSafeRegistry< KEY, T >::print | ( | std::ostream & | os | ) | const |
Print the contents of this registry to the given ostream.
Definition at line 146 of file ThreadSafeRegistry.h.
References edm::detail::ThreadSafeRegistry< KEY, T >::data_, edm::detail::ThreadSafeRegistry< KEY, T >::mutex_, and edm::detail::ThreadSafeRegistry< KEY, T >::size().
|
inline |
Return the number of contained value_type objects.
Definition at line 139 of file ThreadSafeRegistry.h.
References edm::detail::ThreadSafeRegistry< KEY, T >::data_, and edm::detail::ThreadSafeRegistry< KEY, T >::mutex_.
Referenced by ntupleDataFormat._Collection::__iter__(), ntupleDataFormat._Collection::__len__(), and edm::detail::ThreadSafeRegistry< KEY, T >::print().
|
private |
Definition at line 94 of file ThreadSafeRegistry.h.
Referenced by edm::detail::ThreadSafeRegistry< KEY, T >::empty(), edm::detail::ThreadSafeRegistry< KEY, T >::print(), and edm::detail::ThreadSafeRegistry< KEY, T >::size().
|
mutableprivate |
Definition at line 93 of file ThreadSafeRegistry.h.
Referenced by edm::detail::ThreadSafeRegistry< KEY, T >::empty(), edm::detail::ThreadSafeRegistry< KEY, T >::print(), and edm::detail::ThreadSafeRegistry< KEY, T >::size().