CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
edm::reftobase::RefVectorHolderBase::const_iterator Struct Reference

#include <RefVectorHolderBase.h>

Inheritance diagram for edm::reftobase::RefVectorHolderBase::const_iterator:

Public Types

typedef std::ptrdiff_t difference_type
 
typedef std::shared_ptr< RefHolderBasevalue_type
 

Public Member Functions

 const_iterator ()
 
 const_iterator (const_iterator_imp *it)
 
 const_iterator (const_iterator const &it)
 
bool isInvalid () const
 
bool isValid () const
 
bool operator!= (const const_iterator &ci) const
 
value_type operator* () const
 
const_iterator operator+ (difference_type n) const
 
const_iteratoroperator++ ()
 
const_iterator operator++ (int)
 
const_iteratoroperator+= (difference_type d)
 
difference_type operator- (const_iterator const &o) const
 
const_iterator operator- (difference_type n) const
 
const_iteratoroperator-- ()
 
const_iterator operator-- (int)
 
const_iteratoroperator-= (difference_type d)
 
bool operator< (const_iterator const &o) const
 
const_iteratoroperator= (const_iterator const &it)
 
bool operator== (const const_iterator &ci) const
 
 ~const_iterator ()
 

Private Attributes

const_iterator_impi
 

Detailed Description

Definition at line 46 of file RefVectorHolderBase.h.

Member Typedef Documentation

Definition at line 48 of file RefVectorHolderBase.h.

Definition at line 47 of file RefVectorHolderBase.h.

Constructor & Destructor Documentation

edm::reftobase::RefVectorHolderBase::const_iterator::const_iterator ( )
inline

Definition at line 49 of file RefVectorHolderBase.h.

49 : i(nullptr) { }
edm::reftobase::RefVectorHolderBase::const_iterator::const_iterator ( const_iterator_imp it)
inline

Definition at line 50 of file RefVectorHolderBase.h.

edm::reftobase::RefVectorHolderBase::const_iterator::const_iterator ( const_iterator const &  it)
inline

Definition at line 51 of file RefVectorHolderBase.h.

51 : i(it.isValid() ? it.i->clone() : nullptr) { }
edm::reftobase::RefVectorHolderBase::const_iterator::~const_iterator ( )
inline

Definition at line 52 of file RefVectorHolderBase.h.

References mps_fire::i.

Member Function Documentation

bool edm::reftobase::RefVectorHolderBase::const_iterator::isInvalid ( ) const
inline

Definition at line 149 of file RefVectorHolderBase.h.

References mps_fire::i.

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

149 { return i == nullptr; }
bool edm::reftobase::RefVectorHolderBase::const_iterator::isValid ( void  ) const
inline
bool edm::reftobase::RefVectorHolderBase::const_iterator::operator!= ( const const_iterator ci) const
inline

Definition at line 123 of file RefVectorHolderBase.h.

References i, mps_fire::i, and isInvalid().

123  {
124  if(isInvalid() && ci.isInvalid()) return false;
125  if(isInvalid() || ci.isInvalid()) return true;
126  return ! i->equal_to(ci.i);
127  }
virtual bool equal_to(const_iterator_imp const *) const =0
value_type edm::reftobase::RefVectorHolderBase::const_iterator::operator* ( ) const
inline

Definition at line 128 of file RefVectorHolderBase.h.

References mps_fire::i, edm::errors::InvalidReference, and edm::Exception::throwThis().

128  {
129  if(isInvalid())
131  "Trying to dereference an inavlid RefToBaseVector<T>::const_iterator\n");
132  return i->deref();
133  }
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
Definition: EDMException.cc:83
virtual std::shared_ptr< RefHolderBase > deref() const =0
const_iterator edm::reftobase::RefVectorHolderBase::const_iterator::operator+ ( difference_type  n) const
inline

Definition at line 95 of file RefVectorHolderBase.h.

References mps_fire::i, cuy::ii, edm::reftobase::RefVectorHolderBase::const_iterator_imp::increase(), edm::errors::InvalidReference, and edm::Exception::throwThis().

95  {
96  if(isInvalid())
98  "Trying to compute sum with an inavlid RefToBaseVector<T>::const_iterator\n");
99  const_iterator_imp* ii = i->clone();
100  ii->increase(n);
101  return const_iterator(ii);
102  }
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
Definition: EDMException.cc:83
ii
Definition: cuy.py:590
virtual const_iterator_imp * clone() const =0
const_iterator& edm::reftobase::RefVectorHolderBase::const_iterator::operator++ ( )
inline

Definition at line 58 of file RefVectorHolderBase.h.

References mps_fire::i, edm::errors::InvalidReference, and edm::Exception::throwThis().

58  {
59  if(isInvalid())
61  "Trying to increment an inavlid RefToBaseVector<T>::const_iterator\n");
62  i->increase();
63  return *this;
64  }
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
Definition: EDMException.cc:83
const_iterator edm::reftobase::RefVectorHolderBase::const_iterator::operator++ ( int  )
inline

Definition at line 65 of file RefVectorHolderBase.h.

References mps_fire::i, edm::errors::InvalidReference, and edm::Exception::throwThis().

65  {
66  if(isInvalid())
68  "Trying to postincrement an inavlid RefToBaseVector<T>::const_iterator\n");
69  const_iterator ci = *this;
70  i->increase();
71  return ci;
72  }
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
Definition: EDMException.cc:83
const_iterator& edm::reftobase::RefVectorHolderBase::const_iterator::operator+= ( difference_type  d)
inline

Definition at line 141 of file RefVectorHolderBase.h.

References mps_fire::i, edm::errors::InvalidReference, and edm::Exception::throwThis().

141  {
142  if(isInvalid())
144  "Trying to increment an inavlid RefToBaseVector<T>::const_iterator\n");
145  i->increase(d);
146  return *this;
147  }
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
Definition: EDMException.cc:83
difference_type edm::reftobase::RefVectorHolderBase::const_iterator::operator- ( const_iterator const &  o) const
inline

Definition at line 88 of file RefVectorHolderBase.h.

References i, mps_fire::i, edm::errors::InvalidReference, isInvalid(), and edm::Exception::throwThis().

88  {
89  if(isInvalid() && o.isInvalid()) return 0;
90  if(isInvalid() || o.isInvalid())
92  "Trying to compute difference with an inavlid RefToBaseVector<T>::const_iterator\n");
93  return i->difference(o.i);
94  }
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
Definition: EDMException.cc:83
virtual difference_type difference(const_iterator_imp const *) const =0
const_iterator edm::reftobase::RefVectorHolderBase::const_iterator::operator- ( difference_type  n) const
inline

Definition at line 103 of file RefVectorHolderBase.h.

References edm::reftobase::RefVectorHolderBase::const_iterator_imp::decrease(), mps_fire::i, cuy::ii, edm::errors::InvalidReference, and edm::Exception::throwThis().

103  {
104  if(isInvalid())
106  "Trying to compute difference with an inavlid RefToBaseVector<T>::const_iterator\n");
107  const_iterator_imp* ii = i->clone();
108  ii->decrease(n);
109  return const_iterator(ii);
110  }
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
Definition: EDMException.cc:83
ii
Definition: cuy.py:590
virtual const_iterator_imp * clone() const =0
const_iterator& edm::reftobase::RefVectorHolderBase::const_iterator::operator-- ( )
inline

Definition at line 73 of file RefVectorHolderBase.h.

References mps_fire::i, edm::errors::InvalidReference, and edm::Exception::throwThis().

73  {
74  if(isInvalid())
76  "Trying to decrement an inavlid RefToBaseVector<T>::const_iterator\n");
77  i->decrease();
78  return *this;
79  }
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
Definition: EDMException.cc:83
const_iterator edm::reftobase::RefVectorHolderBase::const_iterator::operator-- ( int  )
inline

Definition at line 80 of file RefVectorHolderBase.h.

References mps_fire::i, edm::errors::InvalidReference, and edm::Exception::throwThis().

80  {
81  if(isInvalid())
83  "Trying to postdecrement an inavlid RefToBaseVector<T>::const_iterator\n");
84  const_iterator ci = *this;
85  i->decrease();
86  return ci;
87  }
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
Definition: EDMException.cc:83
const_iterator& edm::reftobase::RefVectorHolderBase::const_iterator::operator-= ( difference_type  d)
inline

Definition at line 134 of file RefVectorHolderBase.h.

References mps_fire::i, edm::errors::InvalidReference, and edm::Exception::throwThis().

134  {
135  if(isInvalid())
137  "Trying to decrement an inavlid RefToBaseVector<T>::const_iterator\n");
138  i->decrease(d);
139  return *this;
140  }
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
Definition: EDMException.cc:83
bool edm::reftobase::RefVectorHolderBase::const_iterator::operator< ( const_iterator const &  o) const
inline

Definition at line 111 of file RefVectorHolderBase.h.

References i, mps_fire::i, edm::errors::InvalidReference, isInvalid(), and edm::Exception::throwThis().

111  {
112  if(isInvalid() && o.isInvalid()) return false;
113  if(isInvalid() || o.isInvalid())
115  "Trying to compute < operator with an inavlid RefToBaseVector<T>::const_iterator\n");
116  return i->less_than(o.i);
117  }
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
Definition: EDMException.cc:83
virtual bool less_than(const_iterator_imp const *) const =0
const_iterator& edm::reftobase::RefVectorHolderBase::const_iterator::operator= ( const_iterator const &  it)
inline

Definition at line 53 of file RefVectorHolderBase.h.

References i, and mps_fire::i.

53  {
54  if(isInvalid()) i = it.i;
55  else i->assign(it.i);
56  return *this;
57  }
virtual void assign(const_iterator_imp const *)=0
bool edm::reftobase::RefVectorHolderBase::const_iterator::operator== ( const const_iterator ci) const
inline

Definition at line 118 of file RefVectorHolderBase.h.

References i, mps_fire::i, and isInvalid().

118  {
119  if(isInvalid() && ci.isInvalid()) return true;
120  if(isInvalid() || ci.isInvalid()) return false;
121  return i->equal_to(ci.i);
122  }
virtual bool equal_to(const_iterator_imp const *) const =0

Member Data Documentation

const_iterator_imp* edm::reftobase::RefVectorHolderBase::const_iterator::i
private

Definition at line 152 of file RefVectorHolderBase.h.

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