1 #ifndef DataFormats_Common_RefVectorBase_h
2 #define DataFormats_Common_RefVectorBase_h
20 template <
typename KEY>
29 #if defined(__GXX_EXPERIMENTAL_CXX0X__)
77 keys_.swap(other.keys_);
86 #if defined(__GXX_EXPERIMENTAL_CXX0X__)
89 keys_ =std::move(rhs.keys_);
106 return lhs.refCore() == rhs.refCore() && lhs.keys() == rhs.keys();
110 template<
typename KEY>
113 return !(lhs == rhs);
117 template<
typename KEY>
void pushBackItem(RefCore const &productToBeInserted, bool checkPointer)
RefVectorBase & operator=(RefVectorBase const &rhs)
Copy assignment.
RefVectorBase(RefVectorBase const &rhs)
bool empty() const
Is vector empty?
bool operator!=(debugging_allocator< X > const &, debugging_allocator< Y > const &)
keys_type::iterator eraseAtIndex(size_type index)
erase an element from the vector
#define CMS_CLASS_VERSION(_version_)
void pushBack(RefCore const &product, KEY const &key)
RefVectorBase()
Default constructor needed for reading from persistent store. Not for direct use. ...
void swap(RefVectorBase< KEY > &other)
swap two vectors
size_type capacity() const
Capacity of vector.
RefCore const & refCore() const
Accessor for product ID and product getter.
void clear()
clear the vector
keys_type const & keys() const
Accessor for vector of keys and pointers.
~RefVectorBase()
Destructor.
RefVectorBase(ProductID const &productID, void const *prodPtr=0, EDProductGetter const *prodGetter=0)
keys_type::size_type size_type
volatile std::atomic< bool > shutdown_flag false
size_type size() const
Size of vector.
std::vector< KEY > keys_type
void reserve(size_type n)
Reserve space for vector.