CMS 3D CMS Logo

Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes

edm::Vector< T > Class Template Reference

#include <Vector.h>

List of all members.

Public Types

typedef base::const_iterator const_iterator
typedef base::const_reference const_reference
typedef base::iterator iterator
typedef base::pointer pointer
typedef base::reference reference
typedef base::size_type size_type
typedef base::value_type value_type

Public Member Functions

reference back ()
const_reference back () const
iterator begin ()
const_iterator begin () const
void clear ()
const basedata () const
bool empty () const
const_iterator end () const
iterator end ()
iterator erase (iterator pos)
iterator erase (iterator first, iterator last)
void fillView (ProductID const &id, std::vector< void const * > &pointers, helper_vector &helpers) const
reference front ()
const_reference front () const
Vector< T > & operator= (const Vector< T > &)
reference operator[] (size_type)
const_reference operator[] (size_type) const
void pop_back ()
void push_back (const value_type &)
void reserve (size_t)
size_type size () const
void swap (Vector< T > &other)
 Vector ()
 Vector (size_type)
 Vector (const Vector &)
 ~Vector ()

Private Types

typedef std::vector< T > base

Private Member Functions

void fixup () const
void touch ()

Private Attributes

base data_
helpers::PostReadFixupTrait< T >
::type 
fixup_

Detailed Description

template<typename T>
class edm::Vector< T >

Definition at line 21 of file Vector.h.


Member Typedef Documentation

template<typename T>
typedef std::vector<T> edm::Vector< T >::base [private]

Definition at line 26 of file Vector.h.

template<typename T>
typedef base::const_iterator edm::Vector< T >::const_iterator

Definition at line 37 of file Vector.h.

template<typename T>
typedef base::const_reference edm::Vector< T >::const_reference

Definition at line 34 of file Vector.h.

template<typename T>
typedef base::iterator edm::Vector< T >::iterator

Definition at line 36 of file Vector.h.

template<typename T>
typedef base::pointer edm::Vector< T >::pointer

Definition at line 32 of file Vector.h.

template<typename T>
typedef base::reference edm::Vector< T >::reference

Definition at line 33 of file Vector.h.

template<typename T>
typedef base::size_type edm::Vector< T >::size_type

Definition at line 30 of file Vector.h.

template<typename T>
typedef base::value_type edm::Vector< T >::value_type

Definition at line 31 of file Vector.h.


Constructor & Destructor Documentation

template<typename T >
edm::Vector< T >::Vector ( ) [inline]

Definition at line 78 of file Vector.h.

                           : data_() { 
  }
template<typename T >
edm::Vector< T >::Vector ( size_type  n) [inline]

Definition at line 82 of file Vector.h.

                                      : data_(n) { 
  }
template<typename T >
edm::Vector< T >::Vector ( const Vector< T > &  o) [inline]

Definition at line 86 of file Vector.h.

                                              : data_(o.data_) {
  }
template<typename T >
edm::Vector< T >::~Vector ( ) [inline]

Definition at line 90 of file Vector.h.

                            { 
  }

Member Function Documentation

template<typename T >
Vector< T >::reference edm::Vector< T >::back ( ) [inline]

Definition at line 167 of file Vector.h.

                                                     {
    fixup();
    touch();
    return data_.back();
  }
template<typename T >
Vector< T >::const_reference edm::Vector< T >::back ( ) const [inline]

Definition at line 174 of file Vector.h.

                                                                 {
    fixup();
    return data_.back();
  }
template<typename T >
Vector< T >::const_iterator edm::Vector< T >::begin ( void  ) const [inline]

Definition at line 114 of file Vector.h.

                                                                 {
    fixup();
    return const_iterator(data_.begin());
  }
template<typename T >
Vector< T >::iterator edm::Vector< T >::begin ( void  ) [inline]

Definition at line 100 of file Vector.h.

                                                     {
    fixup();
    touch();
    return iterator(data_.begin());
  }
template<typename T >
void edm::Vector< T >::clear ( void  ) [inline]

Definition at line 199 of file Vector.h.

                               {
    data_.clear();
  }
template<typename T >
const Vector< T >::base & edm::Vector< T >::data ( ) const [inline]

Definition at line 193 of file Vector.h.

                                                              {
    fixup();
    return data_;
  }
template<typename T >
bool edm::Vector< T >::empty ( ) const [inline]

Definition at line 131 of file Vector.h.

                                     {
    return data_.empty();
  }
template<typename T >
Vector< T >::const_iterator edm::Vector< T >::end ( void  ) const [inline]

Definition at line 120 of file Vector.h.

                                                               {
    fixup();
    return const_iterator(data_.end());
  }
template<typename T >
Vector< T >::iterator edm::Vector< T >::end ( void  ) [inline]

Definition at line 107 of file Vector.h.

                                                   {
    fixup();
    touch();
    return iterator(data_.end());
  }
template<typename T >
Vector< T >::iterator edm::Vector< T >::erase ( iterator  pos)

Definition at line 204 of file Vector.h.

                                                          {
    fixup();
    touch();
    return data_.erase(pos);
  }
template<typename T >
Vector< T >::iterator edm::Vector< T >::erase ( iterator  first,
iterator  last 
)

Definition at line 211 of file Vector.h.

                                                                           {
    fixup();
    touch();
    return data_.erase(first, last);
  }
template<typename T >
void edm::Vector< T >::fillView ( ProductID const &  id,
std::vector< void const * > &  pointers,
helper_vector helpers 
) const

Definition at line 224 of file Vector.h.

References ExpressReco_HICollisions_FallBack::e, h, i, combine::key, edm::reftobase::RefVectorHolderBase::push_back(), edm::reftobase::RefVectorHolderBase::reserve(), and findQualityFiles::size.

Referenced by edm::fillView().

  {
    typedef Ref<Vector>      ref_type ;
    typedef reftobase::RefHolder<ref_type> holder_type;

    size_type numElements = this->size();
    pointers.reserve(numElements);
    helpers.reserve(numElements);
    size_type key = 0;
    for(typename base::const_iterator i=data_.begin(), e=data_.end(); i!=e; ++i, ++key) {

      pointers.push_back(&*i);
      holder_type h(ref_type(id, &*i, key));
      helpers.push_back(&h);
    }
  }
template<typename T>
void edm::Vector< T >::fixup ( ) const [inline, private]

Definition at line 73 of file Vector.h.

References edm::Vector< T >::data_, and edm::Vector< T >::fixup_.

{ fixup_(data_); }
template<typename T >
Vector< T >::const_reference edm::Vector< T >::front ( ) const [inline]

Definition at line 187 of file Vector.h.

                                                                  {
    fixup();
    return data_.front();
  }
template<typename T >
Vector< T >::reference edm::Vector< T >::front ( ) [inline]

Definition at line 180 of file Vector.h.

                                                      {
    fixup();
    touch();
    return data_.front();
  }
template<typename T >
Vector< T > & edm::Vector< T >::operator= ( const Vector< T > &  o) [inline]

Definition at line 94 of file Vector.h.

References edm::swap(), and cond::rpcobtemp::temp.

                                                             {
    Vector<T> temp(o);
    this->swap(temp);
    return *this;
  }
template<typename T >
Vector< T >::const_reference edm::Vector< T >::operator[] ( size_type  n) const [inline]

Definition at line 142 of file Vector.h.

References n.

                                                                                  {
    fixup();
    return data_[n];
  }
template<typename T >
Vector< T >::reference edm::Vector< T >::operator[] ( size_type  n) [inline]

Definition at line 136 of file Vector.h.

References n.

                                                                      {
    fixup();
    return data_[n];
  }
template<typename T >
void edm::Vector< T >::pop_back ( ) [inline]

Definition at line 159 of file Vector.h.

                                  {
    // We have to delete the pointed-to thing, before we squeeze it
    // out of the vector...
    data_.pop_back();
    touch();
  }
template<typename T>
void edm::Vector< T >::push_back ( const value_type )
template<typename T >
void edm::Vector< T >::reserve ( size_t  n) [inline]

Definition at line 148 of file Vector.h.

                                         {
    data_.reserve(n);
  }
template<typename T >
Vector< T >::size_type edm::Vector< T >::size ( void  ) const [inline]

Definition at line 126 of file Vector.h.

                                                           {
    return data_.size();
  }
template<typename T >
void edm::Vector< T >::swap ( Vector< T > &  other) [inline]

Definition at line 218 of file Vector.h.

References edm::Vector< T >::data_, edm::hash_detail::fixup_(), edm::Vector< T >::fixup_, and edm::swap().

Referenced by edm::swap().

                                              {
    data_.swap(other.data_);
    std::swap(fixup_, other.fixup_);
  }
template<typename T>
void edm::Vector< T >::touch ( ) [inline, private]

Definition at line 74 of file Vector.h.

References edm::Vector< T >::fixup_.

{ fixup_.touch(); }

Member Data Documentation

template<typename T>
base edm::Vector< T >::data_ [private]

Definition at line 71 of file Vector.h.

Referenced by edm::Vector< T >::fixup(), and edm::Vector< T >::swap().

template<typename T>
helpers::PostReadFixupTrait<T>::type edm::Vector< T >::fixup_ [private]