1 #ifndef DataFormats_Common_VectorHolder_h 2 #define DataFormats_Common_VectorHolder_h 12 class RefVectorHolderBase;
14 template <
class T,
class REFV>
15 class VectorHolder :
public BaseVectorHolder<T> {
26 #if defined(__GXX_EXPERIMENTAL_CXX0X__) 52 #if defined(__GXX_EXPERIMENTAL_CXX0X__) 54 base_type::operator=(std::forward(rhs));
60 const_iterator
begin()
const override {
63 const_iterator
end()
const override {
68 const holder_type *
h =
dynamic_cast<const holder_type *
>(
r );
71 "In VectorHolder<T, REFV> trying to push_back wrong reference type");
74 std::unique_ptr<RefVectorHolderBase>
vectorHolder()
const override {
103 bool equal_to(
const const_iterator_imp *
o )
const override {
return i == dc( o ); }
104 bool less_than(
const const_iterator_imp *
o )
const override {
return i < dc( o ); }
105 void assign(
const const_iterator_imp *
o )
override {
i = dc( o ); }
107 difference_type
difference(
const const_iterator_imp *
o )
const override {
return i - dc( o ); }
109 const typename ref_vector_type::const_iterator &
dc(
const const_iterator_imp *
o )
const {
112 "In RefToBaseVector<T> trying to dereference a null pointer");
116 "In RefToBaseVector<T> trying to cast iterator to wrong type ");
119 typename ref_vector_type::const_iterator
i;
124 template <
typename T,
typename REFV>
base_type::element_type element_type
difference_type difference(const const_iterator_imp *o) const override
bool less_than(const const_iterator_imp *o) const override
const_iterator begin() const override
EDProductGetter const * productGetter() const override
void push_back(const BaseHolder< T > *r) override
base_ref_type deref() const override
VectorHolder(VectorHolder const &rh)
BaseVectorHolder< T > base_type
base_type::const_iterator const_iterator
#define CMS_CLASS_VERSION(_version_)
ptrdiff_t difference_type
base_type::const_iterator_imp const_iterator_imp
void assign(const const_iterator_imp *o) override
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
base_type * cloneEmpty() const override
base_type::base_ref_type base_ref_type
VectorHolder(const ref_vector_type &iRefVector)
const_iterator_imp_specific()
void decrease(difference_type d) override
ref_vector_type::const_iterator i
bool empty() const override
ProductID id() const override
std::unique_ptr< RefVectorHolderBase > vectorHolder() const override
bool isAvailable() const override
VectorHolder & operator=(VectorHolder const &rhs)
const_iterator_imp_specific * clone() const override
size_type size() const override
base_type::size_type size_type
bool equal_to(const const_iterator_imp *o) const override
void swap(VectorHolder &other)
const ref_vector_type::const_iterator & dc(const const_iterator_imp *o) const
void increase(difference_type d) override
const_iterator end() const override
VectorHolder(const ProductID &iId)
ref_vector_type refVector_
void swap(BaseVectorHolder &)
base_type * clone() const override
base_ref_type const at(size_type idx) const override
const_iterator_imp_specific(const typename REFV::const_iterator &it)
~const_iterator_imp_specific() override