1 #ifndef DataFormats_Common_RefVectorHolder_h 2 #define DataFormats_Common_RefVectorHolder_h 12 template <
typename REF>
class RefHolder;
14 template<
typename REFV>
26 bool empty()
const override;
28 void clear()
override;
55 bool equal_to(const_iterator_imp
const*
o)
const override {
return i == dc(o); }
56 bool less_than(const_iterator_imp
const*
o)
const override {
return i < dc(o); }
57 void assign(const_iterator_imp
const*
o)
override {
i = dc(o); }
58 std::shared_ptr<RefHolderBase> deref()
const override;
59 difference_type
difference(const_iterator_imp
const*
o)
const override {
return i - dc(o); }
61 typename REFV::const_iterator
const&
dc(const_iterator_imp
const*
o)
const {
64 "In RefVectorHolder trying to dereference a null pointer\n");
69 "In RefVectorHolder trying to cast iterator to wrong type\n");
73 typename REFV::const_iterator
i;
78 const_iterator
begin()
const override {
81 const_iterator
end()
const override {
90 std::shared_ptr<reftobase::RefHolderBase>
refBase(
size_t idx)
const override;
98 template <
typename REFV>
105 template <
typename REFV>
113 template<
typename REFV>
116 return refs_.empty();
119 template<
typename REFV>
125 template<
typename REFV>
128 return refs_.clear();
131 template<
typename REFV>
138 template<
typename REFV>
144 template<
typename REFV>
147 return refs_.productGetter();
150 template<
typename REFV>
156 template<
typename REFV>
162 template<
typename REFV>
168 template <
typename REFV>
175 template <
typename REFV>
187 namespace reftobase {
189 template<
typename REFV>
195 "RefVectorHolder: attempting to cast a RefHolderBase " 196 "to an invalid type.\nExpected: ",
203 template <
typename REFV>
204 std::shared_ptr<RefHolderBase>
206 return std::shared_ptr<RefHolderBase>(std::make_shared<RefHolder<typename REFV::value_type> >(
refs_[
idx]));
209 template<
typename REFV>
210 std::shared_ptr<RefHolderBase>
212 return std::shared_ptr<RefHolderBase>(std::make_shared<RefHolder<typename REFV::value_type> >(*i));
RefVectorHolderBase::const_iterator const_iterator
bool empty() const override
void assign(const_iterator_imp const *o) override
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
void swap(RefVectorHolderBase &)
REF const & getRef() const
const_iterator end() const override
~const_iterator_imp_specific() override
RefVectorHolder & operator=(RefVectorHolder const &rhs)
size_type size() const override
difference_type difference(const_iterator_imp const *o) const override
#define CMS_CLASS_VERSION(_version_)
void reserve(size_type n) override
bool equal_to(const_iterator_imp const *o) const override
RefVectorHolder< REFV > * clone() const override
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
RefVectorHolder< REFV > * cloneEmpty() const override
void setRefs(REFV const &refs)
const_iterator_imp_specific * clone() const override
Container::value_type value_type
~RefVectorHolder() override
ptrdiff_t difference_type
size_t keyForIndex(size_t idx) const override
EDProductGetter const * productGetter() const override
const_iterator_imp_specific()
bool less_than(const_iterator_imp const *o) const override
std::shared_ptr< reftobase::RefHolderBase > refBase(size_t idx) const override
RefVectorHolder(ProductID const &iId)
bool isAvailable() const override
RefVectorHolder(REFV const &refs)
std::shared_ptr< RefHolderBase > deref() const override
const_iterator_imp_specific(typename REFV::const_iterator const &it)
void swap(RefVectorHolder &other)
REFV::const_iterator const & dc(const_iterator_imp const *o) const
void increase(difference_type d) override
void push_back(RefHolderBase const *r) override
void decrease(difference_type d) override
ProductID id() const override
const_iterator begin() const override