Go to the documentation of this file. 1 #ifndef DataFormats_Common_PtrVector_h
2 #define DataFormats_Common_PtrVector_h
28 #include <type_traits>
51 class PtrVectorItr :
public std::iterator<std::random_access_iterator_tag, Ptr<T> > {
117 std::vector<void const*>::const_iterator
iter_;
121 template <
typename T>
135 template <
typename U>
142 Ptr<T> operator[](
unsigned long const iIndex)
const {
return this->makePtr<Ptr<T> >(iIndex); }
154 template <
typename U>
158 "Ptr used in push_back can not be converted to type used by PtrVector.");
181 Ptr<T> fromItr(std::vector<void const*>::const_iterator
const& iItr)
const {
return this->makePtr<Ptr<T> >(iItr); }
184 template <
typename T>
186 pointers.reserve(this->
size());
189 T const* address = ref.
isNull() ? nullptr : &*ref;
190 pointers.push_back(address);
195 template <
typename T>
198 std::vector<void const*>& pointers,
203 template <
typename T>
209 template <
typename T>
std::vector< std::pair< edm::ProductID, unsigned long > > FillViewHelperVector
iterator & operator+=(difference_type n)
PtrVectorItr(std::vector< void const * >::const_iterator const &iItr, PtrVector< T > const *iBase)
iterator operator-(difference_type n) const
bool hasProductCache() const
void push_back_base(RefCore const &core, key_type iKey, void const *iData)
RefCore const & refCore() const
void fillView(std::vector< void const * > &pointers, FillViewHelperVector &helpers) const
iterator operator+(difference_type n) const
void swap(Association< C > &lhs, Association< C > &rhs)
const_iterator begin() const
PtrHolder(Ptr< T > const &iPtr)
Ptr< T > operator[](unsigned long const iIndex) const
PtrHolder< T > operator->() const
Ptr< T > fromItr(std::vector< void const * >::const_iterator const &iItr) const
PtrVector(ProductID const &iId)
bool operator>=(iterator const &rhs) const
PtrVector & operator=(PtrVector const &rhs)
bool operator>(iterator const &rhs) const
PtrVector(PtrVector< U > const &iOther)
PtrVectorItr< T > iterator
#define CMS_CLASS_VERSION(_version_)
bool operator<=(iterator const &rhs) const
difference_type operator-(iterator const &rhs) const
PtrVectorItr< T > const_iterator
void push_back(Ptr< T > const &iPtr)
void swap(PtrVector &other)
ProductID id() const
Accessor for product ID.
Ptr< T > const * operator->() const
bool operator!=(iterator const &rhs) const
const Ptr< T > operator[](difference_type n) const
PtrVector(PtrVector< T > const &iOther)
Ptr< T > const & operator*() const
const_iterator end() const
Container::value_type value_type
std::vector< void const * >::const_iterator void_end() const
const Ptr< T > operator*() const
std::vector< void const * >::const_iterator iter_
std::vector< void const * >::const_iterator void_begin() const
bool operator<(iterator const &rhs) const
bool operator==(iterator const &rhs) const
void push_back(Ptr< U > const &iPtr)
PtrVectorItr< T > iterator
iterator & operator-=(difference_type n)
void fillView(AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper > const &obj, ProductID const &id, std::vector< void const * > &pointers, FillViewHelperVector &helpers)
std::type_info const & typeInfo() const override
std::iterator< std::random_access_iterator_tag, Ptr< T > >::difference_type difference_type
bool isNull() const
Checks for null.
PtrVector< T > const * base_
void swap(PtrVectorBase &other)
swap