1 #ifndef FWCore_Utilities_ThreadSafeIndexedRegistry_h
2 #define FWCore_Utilities_ThreadSafeIndexedRegistry_h
5 #include "boost/thread.hpp"
18 #pragma GCC visibility push(default)
23 template <
typename T,
typename E=Empty>
65 void print(std::ostream& os)
const;
92 template <
typename T,
typename E>
95 operator<< (std::ostream& os, ThreadSafeIndexedRegistry<T, E>
const& reg) {
100 template <
typename T,
typename E>
103 for (
typename collection_type::const_iterator it = c.begin(), itEnd = c.end(); it != itEnd; ++it) {
108 template <
typename T,
typename E>
112 return data_.empty();
115 template <
typename T,
typename E>
122 template <
typename T,
typename E>
129 template <
typename T,
typename E>
133 return data_.begin();
136 template <
typename T,
typename E>
143 template <
typename T,
typename E>
146 os <<
"Registry with " <<
size() <<
" entries\n";
148 os <<
i -
begin() <<
" " <<
i <<
'\n';
152 template <
typename T,
typename E>
159 template <
typename T,
typename E>
166 template <
typename T,
typename E>
173 template <
typename T,
typename E>
180 template <
typename T,
typename E>
186 template <
typename T,
typename E>
192 #pragma GCC visibility pop
194 #endif // FWCore_Utilities_ThreadSafeIndexedRegistry_h
const_iterator begin() const
ThreadSafeIndexedRegistry()
size_type size() const
Return the number of contained value_type objects.
collection_type::const_iterator const_iterator
collection_type::size_type size_type
static ThreadSafeIndexedRegistry * instance()
bool insertMapped(value_type const &v)
bool notEmpty() const
Return true if there are any contained value_type objects.
ThreadSafeIndexedRegistry< T, E > & operator=(ThreadSafeIndexedRegistry< T, E > const &)
const_iterator end() const
collection_type & data()
Provide access to the contained collection.
~ThreadSafeIndexedRegistry()
std::vector< value_type > collection_type
void getMapped(size_type index, value_type &result) const
bool empty() const
Return true if there are no contained value_type objects.
tuple size
Write out results.
void insertCollection(collection_type const &c)
void print(std::ostream &os) const
Print the contents of this registry to the given ostream.