1 #ifndef DataFormats_Common_PtrVector_h
2 #define DataFormats_Common_PtrVector_h
28 #include "boost/static_assert.hpp"
29 #include "boost/type_traits/is_base_of.hpp"
54 class PtrVectorItr :
public std::iterator <std::random_access_iterator_tag, Ptr<T> > {
99 std::vector<void const*>::const_iterator
iter_;
103 template <
typename T>
119 template <
typename U>
127 return this->makePtr<Ptr<T> >(iIndex);
166 void fillView(std::vector<void const*>& pointers,
178 Ptr<T> fromItr(std::vector<void const*>::const_iterator
const& iItr)
const {
179 return this->makePtr<Ptr<T> >(iItr);
184 template <
typename T>
188 pointers.reserve(this->
size());
191 T const* address = ref.
isNull() ? 0 : &*ref;
192 pointers.push_back(address);
197 template <
typename T>
200 std::vector<void const*>& pointers,
205 template <
typename T>
211 template <
typename T>
void push_back_base(RefCore const &core, key_type iKey, void const *iData)
Ptr< T > fromItr(std::vector< void const * >::const_iterator const &iItr) const
iterator operator+(difference_type n) const
std::vector< void const * >::const_iterator iter_
difference_type operator-(iterator const &rhs) const
void swap(PtrVector &other)
std::vector< void const * >::const_iterator void_begin() const
void push_back(Ptr< T > const &iPtr)
PtrVectorItr< T > const_iterator
bool operator<=(iterator const &rhs) const
void swap(PtrVectorBase &other)
swap
PtrVectorItr(std::vector< void const * >::const_iterator const &iItr, PtrVector< T > const *iBase)
std::type_info const & typeInfo() const
PtrVector< T > const * base_
iterator & operator-=(difference_type n)
#define CMS_CLASS_VERSION(_version_)
PtrHolder< T > operator->() const
void swap(Association< C > &lhs, Association< C > &rhs)
const_iterator begin() const
void fillView(std::vector< void const * > &pointers, FillViewHelperVector &helpers) const
iterator operator-(difference_type n) const
std::iterator< std::random_access_iterator_tag, Ptr< T > >::difference_type difference_type
void fillView(AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper > const &obj, ProductID const &id, std::vector< void const * > &pointers, FillViewHelperVector &helpers)
bool isNull() const
Checks for null.
RefCore const & refCore() const
const_iterator end() const
PtrVector(ProductID const &iId)
Container::value_type value_type
iterator & operator+=(difference_type n)
Ptr< T > const operator*() const
void push_back(Ptr< U > const &iPtr)
PtrVector & operator=(PtrVector const &rhs)
PtrHolder(Ptr< T > const &iPtr)
bool hasProductCache() const
std::vector< void const * >::const_iterator void_end() const
PtrVectorItr< T > iterator
Ptr< T > const & operator*() const
ProductID id() const
Accessor for product ID.
PtrVectorItr< T > iterator
bool operator>(iterator const &rhs) const
Ptr< T > const * operator->() const
Ptr< T > operator[](unsigned long const iIndex) const
bool operator<(iterator const &rhs) const
Ptr< T > const operator[](difference_type n) const
bool operator>=(iterator const &rhs) const
bool operator==(iterator const &rhs) const
std::vector< std::pair< edm::ProductID, unsigned long > > FillViewHelperVector
tuple size
Write out results.
PtrVector(PtrVector< T > const &iOther)
PtrVector(PtrVector< U > const &iOther)
bool operator!=(iterator const &rhs) const