1 #ifndef DataFormats_Common_PtrVector_h
2 #define DataFormats_Common_PtrVector_h
27 #include "boost/static_assert.hpp"
28 #include "boost/type_traits/is_base_of.hpp"
52 class PtrVectorItr :
public std::iterator <std::random_access_iterator_tag, Ptr<T> > {
97 std::vector<void const*>::const_iterator
iter_;
101 template <
typename T>
116 template <
typename U>
124 return this->makePtr<Ptr<T> >(iIndex);
163 void fillView(std::vector<void const*>& pointers)
const;
174 Ptr<T> fromItr(std::vector<void const*>::const_iterator
const& iItr)
const {
175 return this->makePtr<Ptr<T> >(iItr);
180 template <
typename T>
183 pointers.reserve(this->
size());
186 T const* address = ref.
isNull() ? 0 : &*ref;
187 pointers.push_back(address);
192 template <
typename T>
194 std::vector<void const*>& pointers) {
198 template <
typename T>
204 template <
typename T>
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)
void fillView(AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper > const &obj, ProductID const &id, std::vector< void const * > &pointers, helper_vector &helpers)
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
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
iterator operator-(difference_type n) const
std::iterator< std::random_access_iterator_tag, Ptr< T > >::difference_type difference_type
const_iterator end() const
RefCore const & refCore() const
PtrVector(ProductID const &iId)
iterator & operator+=(difference_type n)
Ptr< T > const operator*() const
void push_back(Ptr< U > const &iPtr)
void push_back_base(RefCore const &core, key_type iKey, void const *iData)
PtrVector & operator=(PtrVector const &rhs)
PtrHolder(Ptr< T > const &iPtr)
void fillView(std::vector< void const * > &pointers) const
std::vector< void const * >::const_iterator void_end() const
PtrVectorItr< T > iterator
Ptr< T > const & operator*() const
PtrVectorItr< T > iterator
bool isNull() const
Checks for null.
bool hasProductCache() const
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
void swap(PtrVectorBase &other)
swap
Ptr< T > const operator[](difference_type n) const
bool operator>=(iterator const &rhs) const
bool operator==(iterator const &rhs) const
tuple size
Write out results.
PtrVector(PtrVector< T > const &iOther)
PtrVector(PtrVector< U > const &iOther)
bool operator!=(iterator const &rhs) const