CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

edm::RefVectorBase< KEY > Class Template Reference

#include <RefVectorBase.h>

List of all members.

Public Types

typedef KEY key_type
typedef std::vector< KEY > keys_type
typedef keys_type::size_type size_type

Public Member Functions

size_type capacity () const
 Capacity of vector.
void clear ()
 clear the vector
bool empty () const
 Is vector empty?
keys_type::iterator eraseAtIndex (size_type index)
 erase an element from the vector
keys_type const & keys () const
 Accessor for vector of keys and pointers.
RefVectorBaseoperator= (RefVectorBase const &rhs)
 Copy assignment.
void pushBack (RefCore const &product, KEY const &key)
RefCore const & refCore () const
 Accessor for product ID and product getter.
 RefVectorBase ()
 Default constructor needed for reading from persistent store. Not for direct use.
 RefVectorBase (RefVectorBase const &rhs)
 RefVectorBase (ProductID const &productID, void const *prodPtr=0, EDProductGetter const *prodGetter=0)
void reserve (size_type n)
 Reserve space for vector.
size_type size () const
 Size of vector.
void swap (RefVectorBase< KEY > &other) noexcept
 swap two vectors
 ~RefVectorBase () noexcept
 Destructor.

Private Attributes

keys_type keys_
RefCore product_

Detailed Description

template<typename KEY>
class edm::RefVectorBase< KEY >

Definition at line 22 of file RefVectorBase.h.


Member Typedef Documentation

template<typename KEY>
typedef KEY edm::RefVectorBase< KEY >::key_type

Definition at line 25 of file RefVectorBase.h.

template<typename KEY>
typedef std::vector<KEY > edm::RefVectorBase< KEY >::keys_type

Definition at line 24 of file RefVectorBase.h.

template<typename KEY>
typedef keys_type::size_type edm::RefVectorBase< KEY >::size_type

Definition at line 26 of file RefVectorBase.h.


Constructor & Destructor Documentation

template<typename KEY>
edm::RefVectorBase< KEY >::RefVectorBase ( ) [inline]

Default constructor needed for reading from persistent store. Not for direct use.

Definition at line 28 of file RefVectorBase.h.

: product_(), keys_() {}
template<typename KEY>
edm::RefVectorBase< KEY >::RefVectorBase ( RefVectorBase< KEY > const &  rhs) [inline]

Definition at line 29 of file RefVectorBase.h.

: product_(rhs.product_), keys_(rhs.keys_) {}
template<typename KEY>
edm::RefVectorBase< KEY >::RefVectorBase ( ProductID const &  productID,
void const *  prodPtr = 0,
EDProductGetter const *  prodGetter = 0 
) [inline, explicit]

Definition at line 34 of file RefVectorBase.h.

                                                                  :
      product_(productID, prodPtr, prodGetter, false), keys_() {}
template<typename KEY>
edm::RefVectorBase< KEY >::~RefVectorBase ( ) [inline]

Destructor.

Definition at line 39 of file RefVectorBase.h.

{}

Member Function Documentation

template<typename KEY>
size_type edm::RefVectorBase< KEY >::capacity ( ) const [inline]

Capacity of vector.

Definition at line 59 of file RefVectorBase.h.

Referenced by edm::RefVector< TrackingRecHitCollection >::capacity().

{return keys_.capacity();}
template<typename KEY>
void edm::RefVectorBase< KEY >::clear ( void  ) [inline]

clear the vector

Definition at line 70 of file RefVectorBase.h.

Referenced by edm::RefVector< TrackingRecHitCollection >::clear().

                 {
      keys_.clear();
      product_ = RefCore();
    }
template<typename KEY>
bool edm::RefVectorBase< KEY >::empty ( ) const [inline]

Is vector empty?

Definition at line 48 of file RefVectorBase.h.

Referenced by edm::RefVector< TrackingRecHitCollection >::empty().

{return keys_.empty();}
template<typename KEY>
keys_type::iterator edm::RefVectorBase< KEY >::eraseAtIndex ( size_type  index) [inline]

erase an element from the vector

Definition at line 65 of file RefVectorBase.h.

Referenced by edm::RefVector< C, T, F >::erase().

                                                             {
      return keys_.erase(keys_.begin() + index);
    }
template<typename KEY>
keys_type const& edm::RefVectorBase< KEY >::keys ( ) const [inline]
template<typename KEY>
RefVectorBase& edm::RefVectorBase< KEY >::operator= ( RefVectorBase< KEY > const &  rhs) [inline]

Copy assignment.

Definition at line 82 of file RefVectorBase.h.

                                                       {
      RefVectorBase temp(rhs);
      this->swap(temp);
      return *this;
    }
template<typename KEY>
void edm::RefVectorBase< KEY >::pushBack ( RefCore const &  product,
KEY const &  key 
) [inline]

Definition at line 53 of file RefVectorBase.h.

Referenced by edm::RefVector< TrackingRecHitCollection >::push_back().

                                                          {
      product_.pushBackItem(product, true);
      keys_.push_back(key);
    }
template<typename KEY>
RefCore const& edm::RefVectorBase< KEY >::refCore ( ) const [inline]
template<typename KEY>
void edm::RefVectorBase< KEY >::reserve ( size_type  n) [inline]

Reserve space for vector.

Definition at line 62 of file RefVectorBase.h.

Referenced by edm::RefVector< TrackingRecHitCollection >::reserve().

{keys_.reserve(n);}
template<typename KEY>
size_type edm::RefVectorBase< KEY >::size ( void  ) const [inline]

Size of vector.

Definition at line 51 of file RefVectorBase.h.

Referenced by edm::RefVector< TrackingRecHitCollection >::size().

{return keys_.size();}
template<typename KEY>
void edm::RefVectorBase< KEY >::swap ( RefVectorBase< KEY > &  other) [inline]

swap two vectors

Definition at line 76 of file RefVectorBase.h.

Referenced by edm::RefVectorBase< key_type >::operator=(), edm::swap(), and edm::RefVector< C, T, F >::swap().

                                                    {
      product_.swap(other.product_);
      keys_.swap(other.keys_);
    }

Member Data Documentation

template<typename KEY>
keys_type edm::RefVectorBase< KEY >::keys_ [private]
template<typename KEY>
RefCore edm::RefVectorBase< KEY >::product_ [private]