1 #ifndef DataFormats_Common_RefVector_h 2 #define DataFormats_Common_RefVector_h 45 typedef std::vector<key_type>
KeyVec;
88 value_type
const at(size_type
idx)
const {
116 const_iterator
begin()
const;
119 const_iterator
end()
const;
144 iterator
erase(iterator
const&
pos);
156 std::vector<void const*>& pointers,
167 template<typename
C, typename T, typename F>
171 refVector_.
swap(other.refVector_);
174 template<
typename C,
typename T,
typename F>
183 template<
typename C,
typename T,
typename F>
190 template<
typename C,
typename T,
typename F>
193 std::vector<void const*>& pointers,
196 pointers.reserve(this->
size());
197 helpers.reserve(this->
size());
201 member_type
const* address =
i->isNull() ?
nullptr : &**
i;
202 pointers.push_back(address);
203 helpers.emplace_back(
i->id(),
i->key());
207 template<
typename C,
typename T,
typename F>
212 std::vector<void const*>& pointers,
214 obj.fillView(
id, pointers, helpers);
217 template<
typename C,
typename T,
typename F>
222 template<
typename C,
typename T,
typename F>
226 return lhs.refVector() == rhs.refVector();
229 template<
typename C,
typename T,
typename F>
233 return !(lhs == rhs);
236 template<
typename C,
typename T,
typename F>
241 typename contents_type::keys_type::iterator newPos =
247 template<
typename C,
typename T,
typename F>
252 template<
typename C,
typename T,
typename F>
257 template<
typename C,
typename T,
typename F>
273 for(size_type
i = 0;
i <
size(); ++
i) {
274 if(!(*
this)[
i].isAvailable()) {
281 template<
typename C,
typename T,
typename F>
283 operator<<(std::ostream& os, RefVector<C,T,F>
const&
r) {
299 template<
typename C,
typename T,
typename F>
303 static element_type
const*
address(iter
const&
i) {
std::remove_cv< typename std::remove_reference< argument_type >::type >::type key_type
void const * cachedMemberPointer(size_type idx) const
bool isNonnull() const
Checks for non-null.
size_type size() const
Size of vector.
void setProductPtr(void const *prodPtr) const
value_type const const_reference
value_type::key_type key_type
size_type capacity() const
Capacity of the RefVector.
void swap(RefVectorBase< KEY > &other) noexcept
swap two vectors
RefCore const & refCore() const
const_reference reference
key_type key() const
Accessor for product key.
void clear()
clear the vector
#define CMS_CLASS_VERSION(_version_)
const_iterator end() const
Termination of iteration.
bool empty() const
Is the RefVector empty.
const_iterator begin() const
Initialize an iterator over the RefVector.
KeyVec::size_type size_type
RefCore const & refCore() const
Accessor for product ID and product getter.
bool isNull() const
Checks for null.
void fillView(ProductID const &id, std::vector< void const * > &pointers, FillViewHelperVector &helpers) const
bool operator==(debugging_allocator< X > const &, debugging_allocator< Y > const &) noexcept
bool empty() const
Is vector empty?
ProductID id() const
Accessor for product ID.
RefVector(ProductID const &iId)
std::vector< key_type > KeyVec
bool isTransient() const
Checks if product collection is tansient (i.e. non persistable)
void const * productPtr() const
refhelper::RefVectorTrait< C, T, F >::iterator_type iterator
keys_type::size_type size_type
void swap(RefVector< C, T, F > &other)
Swap two vectors.
def template(fileName, svg, replaceme="REPLACEME")
RefVector(RefVector const &rh)
void reserve(size_type n)
Reserve space for RefVector.
EDProductGetter const * productGetter() const
Accessor for product getter.
bool operator!=(debugging_allocator< X > const &, debugging_allocator< Y > const &) noexcept
RefVectorBase< key_type > contents_type
void pushBack(RefCore const &product, KEY const &key)
RefVector & operator=(RefVector &&rhs)
void clear()
Clear the vector.
bool hasProductCache() const
Checks if product is in memory.
RefVector< C, T, F >::const_iterator iter
EDProductGetter const * productGetter() const
value_type const operator[](size_type idx) const
Retrieve an element of the RefVector.
value_type const at(size_type idx) const
Retrieve an element of the RefVector.
static element_type const * address(iter const &i)
keys_type const & keys() const
Accessor for vector of keys and pointers.
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
size_type size() const
Size of the RefVector.
FindUsingAdvance< C, T > value
keys_type::iterator eraseAtIndex(size_type index)
erase an element from the vector
void reserve(size_type n)
Reserve space for vector.
refhelper::RefVectorTrait< C, T, F >::ref_type value_type
RefVector & operator=(RefVector const &rhs)
contents_type const & refVector() const
Accessor for all data.
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
size_type capacity() const
Capacity of vector.
std::vector< std::pair< edm::ProductID, unsigned long > > FillViewHelperVector
bool operator!() const
Checks for null.
edm::RefVector< Container > RefVector
RefVector(RefVector &&rh)
iterator erase(iterator const &pos)
Erase an element from the vector.