CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

CaloRecHitMetaCollectionV::Iterator Class Reference

#include <CaloRecHitMetaCollectionV.h>

List of all members.

Public Types

typedef int difference_type
typedef
std::random_access_iterator_tag 
iterator_category
typedef int offset_type
typedef const CaloRecHitpointer
typedef const CaloRecHitreference
typedef const CaloRecHitvalue_type

Public Member Functions

 Iterator ()
 Iterator (const Iterator &it)
 Iterator (const CaloRecHitMetaCollectionV *col, offset_type pos)
bool operator!= (const Iterator &it) const
 comparison operator
reference operator* () const
 dereference operator
Iterator operator+ (const difference_type n) const
Iteratoroperator++ ()
 Advance the iterator.
Iterator operator++ (int)
 Advance the iterator.
Iteratoroperator+= (const difference_type n)
Iterator operator- (const difference_type n) const
Iteratoroperator-- ()
 Reverse-advance the iterator.
Iterator operator-- (int)
 Reverse-advance the iterator.
Iteratoroperator-= (const difference_type n)
pointer operator-> () const
 pointer operator
bool operator< (const Iterator &i) const
Iteratoroperator= (const Iterator &it)
bool operator== (const Iterator &it) const
 comparison operator
reference operator[] (const difference_type n) const

Private Attributes

const CaloRecHitMetaCollectionVcollection_
offset_type offset_

Detailed Description

Definition at line 20 of file CaloRecHitMetaCollectionV.h.


Member Typedef Documentation

Definition at line 24 of file CaloRecHitMetaCollectionV.h.

typedef std::random_access_iterator_tag CaloRecHitMetaCollectionV::Iterator::iterator_category

Definition at line 22 of file CaloRecHitMetaCollectionV.h.

Definition at line 27 of file CaloRecHitMetaCollectionV.h.

Definition at line 26 of file CaloRecHitMetaCollectionV.h.

Definition at line 25 of file CaloRecHitMetaCollectionV.h.

Definition at line 23 of file CaloRecHitMetaCollectionV.h.


Constructor & Destructor Documentation

CaloRecHitMetaCollectionV::Iterator::Iterator ( ) [inline]

Definition at line 29 of file CaloRecHitMetaCollectionV.h.

: collection_(0), offset_(0) { }
CaloRecHitMetaCollectionV::Iterator::Iterator ( const Iterator it) [inline]

Definition at line 30 of file CaloRecHitMetaCollectionV.h.

: collection_(it.collection_), offset_(it.offset_) { }
CaloRecHitMetaCollectionV::Iterator::Iterator ( const CaloRecHitMetaCollectionV col,
offset_type  pos 
) [inline]

Definition at line 31 of file CaloRecHitMetaCollectionV.h.

: collection_(col), offset_(pos) { }

Member Function Documentation

bool CaloRecHitMetaCollectionV::Iterator::operator!= ( const Iterator it) const

comparison operator

Definition at line 26 of file CaloRecHitMetaCollectionV.cc.

References collection_, and offset_.

                                                                                                    {
  return collection_!=it.collection_ || offset_!=it.offset_;
}
const CaloRecHit & CaloRecHitMetaCollectionV::const_iterator::operator* ( void  ) const

dereference operator

Definition at line 13 of file CaloRecHitMetaCollectionV.cc.

References CaloRecHitMetaCollectionV::at(), collection_, and offset_.

                                                                           {
  return (*collection_->at(offset_));
}
CaloRecHitMetaCollectionV::Iterator CaloRecHitMetaCollectionV::Iterator::operator+ ( const difference_type  n) const

Definition at line 62 of file CaloRecHitMetaCollectionV.cc.

                                                                                                                                             {
  return Iterator(collection_,offset_+n);
}
CaloRecHitMetaCollectionV::Iterator & CaloRecHitMetaCollectionV::Iterator::operator++ ( void  )

Advance the iterator.

Definition at line 30 of file CaloRecHitMetaCollectionV.cc.

                                                                                 {
  offset_++;
  return (*this);
}
CaloRecHitMetaCollectionV::Iterator CaloRecHitMetaCollectionV::Iterator::operator++ ( int  )

Advance the iterator.

Definition at line 35 of file CaloRecHitMetaCollectionV.cc.

References tmp.

                                                                                   {
  Iterator tmp(*this);
  offset_++;
  return tmp;
}
CaloRecHitMetaCollectionV::Iterator & CaloRecHitMetaCollectionV::Iterator::operator+= ( const difference_type  n)

Definition at line 57 of file CaloRecHitMetaCollectionV.cc.

References n.

                                                                                                                                         {
  offset_+=n;
  return (*this);
}
CaloRecHitMetaCollectionV::Iterator CaloRecHitMetaCollectionV::Iterator::operator- ( const difference_type  n) const

Definition at line 71 of file CaloRecHitMetaCollectionV.cc.

                                                                                                                                             {
  return Iterator(collection_,offset_-n);
}
CaloRecHitMetaCollectionV::Iterator & CaloRecHitMetaCollectionV::Iterator::operator-- ( )

Reverse-advance the iterator.

Definition at line 41 of file CaloRecHitMetaCollectionV.cc.

                                                                                 {
  offset_--;
  return (*this);
}
CaloRecHitMetaCollectionV::Iterator CaloRecHitMetaCollectionV::Iterator::operator-- ( int  )

Reverse-advance the iterator.

Definition at line 47 of file CaloRecHitMetaCollectionV.cc.

References tmp.

                                                                                   {
  Iterator tmp(*this);
  offset_--;
  return tmp;
}
CaloRecHitMetaCollectionV::Iterator & CaloRecHitMetaCollectionV::Iterator::operator-= ( const difference_type  n)

Definition at line 66 of file CaloRecHitMetaCollectionV.cc.

References n.

                                                                                                                                         {
  offset_-=n;
  return (*this);
}
const CaloRecHit * CaloRecHitMetaCollectionV::const_iterator::operator-> ( ) const

pointer operator

Definition at line 17 of file CaloRecHitMetaCollectionV.cc.

                                                                            {
  return (collection_==0)?(0):(collection_->at(offset_));
}
bool CaloRecHitMetaCollectionV::Iterator::operator< ( const Iterator i) const

Definition at line 75 of file CaloRecHitMetaCollectionV.cc.

References offset_.

                                                                                                  {
  return offset_<i.offset_;
}
Iterator& CaloRecHitMetaCollectionV::Iterator::operator= ( const Iterator it) [inline]

Definition at line 32 of file CaloRecHitMetaCollectionV.h.

References collection_, and offset_.

{ collection_=it.collection_; offset_=it.offset_; return (*this); }
bool CaloRecHitMetaCollectionV::Iterator::operator== ( const Iterator it) const

comparison operator

Definition at line 22 of file CaloRecHitMetaCollectionV.cc.

References collection_, and offset_.

                                                                                                    {
  return collection_==it.collection_ && offset_==it.offset_;
}
CaloRecHitMetaCollectionV::Iterator::reference CaloRecHitMetaCollectionV::Iterator::operator[] ( const difference_type  n) const

Definition at line 53 of file CaloRecHitMetaCollectionV.cc.

                                                                                                                      {
  return *(collection_->at(offset_+n));
}

Member Data Documentation

Definition at line 62 of file CaloRecHitMetaCollectionV.h.

Referenced by operator!=(), operator*(), operator=(), and operator==().

Definition at line 63 of file CaloRecHitMetaCollectionV.h.

Referenced by operator!=(), operator*(), operator<(), operator=(), and operator==().