CMS 3D CMS Logo

edm::RefVectorBase< KEY > Class Template Reference

#include <DataFormats/Common/interface/RefVectorBase.h>

List of all members.

Public Types

typedef KEY key_type
typedef std::vector< RefItem
< KEY > > 
RefItems
typedef RefItems::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?
RefItems::iterator eraseAtIndex (size_type index)
 erase an element from the vector
RefItems const & items () const
 Accessor for vector of keys and pointers.
RefVectorBaseoperator= (RefVectorBase const &rhs)
 Copy assignment.
void pushBack (RefCore const &product, RefItem< KEY > const &item_)
RefCore const & refCore () const
 Accessor for product ID and product getter.
 RefVectorBase (ProductID const &productID, void const *prodPtr=0, EDProductGetter const *prodGetter=0)
 RefVectorBase ()
 Default constructor needed for reading from persistent store. Not for direct use.
void reserve (size_type n)
 Reserve space for vector.
size_type size () const
 Size of vector.
void swap (RefVectorBase< KEY > &other)
 swap two vectors
 ~RefVectorBase ()
 Destructor.

Private Attributes

RefItems items_
RefCore product_


Detailed Description

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

Definition at line 20 of file RefVectorBase.h.


Member Typedef Documentation

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

Definition at line 23 of file RefVectorBase.h.

template<typename KEY>
typedef std::vector<RefItem<KEY> > edm::RefVectorBase< KEY >::RefItems

Definition at line 22 of file RefVectorBase.h.

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

Definition at line 24 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 26 of file RefVectorBase.h.

00026 : product_(), items_() {}

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

Definition at line 28 of file RefVectorBase.h.

00029                                                                   :
00030       product_(productID, prodPtr, prodGetter, false), items_() {}

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

Destructor.

Definition at line 33 of file RefVectorBase.h.

00033 {}


Member Function Documentation

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

Capacity of vector.

Definition at line 53 of file RefVectorBase.h.

References edm::RefVectorBase< KEY >::items_.

Referenced by edm::RefVector< std::vector< Track > >::capacity().

00053 {return items_.capacity();}

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

clear the vector

Definition at line 64 of file RefVectorBase.h.

References edm::RefVectorBase< KEY >::items_, and edm::RefVectorBase< KEY >::product_.

Referenced by edm::RefVector< std::vector< Track > >::clear().

00064                  {
00065       items_.clear();
00066       product_ = RefCore();
00067     }

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

Is vector empty?

Definition at line 42 of file RefVectorBase.h.

References edm::RefVectorBase< KEY >::items_.

Referenced by edm::RefVector< std::vector< Track > >::empty().

00042 {return items_.empty();}

template<typename KEY>
RefItems::iterator edm::RefVectorBase< KEY >::eraseAtIndex ( size_type  index  )  [inline]

erase an element from the vector

Definition at line 59 of file RefVectorBase.h.

References edm::RefVectorBase< KEY >::items_.

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

00059                                                             {
00060       return items_.erase(items_.begin() + index);
00061     }

template<typename KEY>
RefItems const& edm::RefVectorBase< KEY >::items (  )  const [inline]

Accessor for vector of keys and pointers.

Definition at line 39 of file RefVectorBase.h.

References edm::RefVectorBase< KEY >::items_.

Referenced by edm::RefVector< std::vector< Track > >::at(), edm::RefVector< C, T, F >::begin(), edm::RefVector< C, T, F >::end(), edm::operator==(), and edm::RefVector< std::vector< Track > >::operator[]().

00039 {return items_;}

template<typename KEY>
RefVectorBase& edm::RefVectorBase< KEY >::operator= ( RefVectorBase< KEY > const &  rhs  )  [inline]

Copy assignment.

Definition at line 76 of file RefVectorBase.h.

References edm::RefVectorBase< KEY >::swap(), and pyDBSRunClass::temp.

00076                                                        {
00077       RefVectorBase temp(rhs);
00078       this->swap(temp);
00079       return *this;
00080     }

template<typename KEY>
void edm::RefVectorBase< KEY >::pushBack ( RefCore const &  product,
RefItem< KEY > const &  item_ 
) [inline]

Definition at line 47 of file RefVectorBase.h.

References edm::RefVectorBase< KEY >::items_, edm::RefVectorBase< KEY >::product_, and edm::RefCore::pushBackItem().

Referenced by edm::RefVector< std::vector< Track > >::push_back().

00047                                                                      {
00048       product_.pushBackItem(product, true);
00049       items_.push_back(item_);
00050     }

template<typename KEY>
RefCore const& edm::RefVectorBase< KEY >::refCore (  )  const [inline]

Accessor for product ID and product getter.

Definition at line 36 of file RefVectorBase.h.

References edm::RefVectorBase< KEY >::product_.

Referenced by edm::RefVector< std::vector< Track > >::at(), edm::RefVector< C, T, F >::begin(), edm::RefVector< C, T, F >::end(), edm::RefVector< C, T, F >::erase(), edm::RefVector< std::vector< Track > >::hasProductCache(), edm::RefVector< std::vector< Track > >::id(), edm::RefVector< std::vector< Track > >::isAvailable(), edm::RefVector< std::vector< Track > >::isTransient(), edm::operator==(), edm::RefVector< std::vector< Track > >::operator[](), edm::RefVector< C, T, F >::product(), and edm::RefVector< std::vector< Track > >::productGetter().

00036 {return product_;}

template<typename KEY>
void edm::RefVectorBase< KEY >::reserve ( size_type  n  )  [inline]

Reserve space for vector.

Definition at line 56 of file RefVectorBase.h.

References edm::RefVectorBase< KEY >::items_.

Referenced by edm::RefVector< std::vector< Track > >::reserve().

00056 {items_.reserve(n);}

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

Size of vector.

Definition at line 45 of file RefVectorBase.h.

References edm::RefVectorBase< KEY >::items_.

Referenced by edm::RefVector< std::vector< Track > >::size().

00045 {return items_.size();}

template<typename KEY>
void edm::RefVectorBase< KEY >::swap ( RefVectorBase< KEY > &  other  )  [inline]

swap two vectors

Definition at line 70 of file RefVectorBase.h.

References edm::RefVectorBase< KEY >::items_, edm::RefVectorBase< KEY >::product_, and edm::RefCore::swap().

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

00070                                           {
00071       product_.swap(other.product_);
00072       items_.swap(other.items_);
00073     }


Member Data Documentation

template<typename KEY>
RefItems edm::RefVectorBase< KEY >::items_ [private]

Definition at line 84 of file RefVectorBase.h.

Referenced by edm::RefVectorBase< KEY >::capacity(), edm::RefVectorBase< KEY >::clear(), edm::RefVectorBase< KEY >::empty(), edm::RefVectorBase< KEY >::eraseAtIndex(), edm::RefVectorBase< KEY >::items(), edm::RefVectorBase< KEY >::pushBack(), edm::RefVectorBase< KEY >::reserve(), edm::RefVectorBase< KEY >::size(), and edm::RefVectorBase< KEY >::swap().

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

Definition at line 83 of file RefVectorBase.h.

Referenced by edm::RefVectorBase< KEY >::clear(), edm::RefVectorBase< KEY >::pushBack(), edm::RefVectorBase< KEY >::refCore(), and edm::RefVectorBase< KEY >::swap().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:43:55 2009 for CMSSW by  doxygen 1.5.4