souffle  2.0.2-371-g6315b36
Public Member Functions | Private Attributes
souffle::PiggyList< T >::iterator Class Reference

#include <PiggyList.h>

Inheritance diagram for souffle::PiggyList< T >::iterator:
Inheritance graph
Collaboration diagram for souffle::PiggyList< T >::iterator:
Collaboration graph

Public Member Functions

 iterator ()=default
 
 iterator (PiggyList *bl)
 
 iterator (PiggyList *bl, size_t beginInd)
 
bool operator!= (const iterator &x) const
 
operator* ()
 
const T operator* () const
 
iterator operator++ ()
 
iteratoroperator++ (int)
 
bool operator== (const iterator &x) const
 

Private Attributes

PiggyListbl
 
size_t cIndex = 0
 

Detailed Description

template<class T>
class souffle::PiggyList< T >::iterator

Definition at line 255 of file PiggyList.h.

Constructor & Destructor Documentation

◆ iterator() [1/3]

template<class T >
souffle::PiggyList< T >::iterator::iterator ( )
default

◆ iterator() [2/3]

template<class T >
souffle::PiggyList< T >::iterator::iterator ( PiggyList bl)
inline

Definition at line 264 of file PiggyList.h.

264 : bl(bl){};

◆ iterator() [3/3]

template<class T >
souffle::PiggyList< T >::iterator::iterator ( PiggyList bl,
size_t  beginInd 
)
inline

Definition at line 266 of file PiggyList.h.

266 : cIndex(beginInd), bl(bl){};

Member Function Documentation

◆ operator!=()

template<class T >
bool souffle::PiggyList< T >::iterator::operator!= ( const iterator x) const
inline

Definition at line 290 of file PiggyList.h.

290  {
291  return !(x == *this);
292  };

◆ operator*() [1/2]

template<class T >
T souffle::PiggyList< T >::iterator::operator* ( )
inline

Definition at line 268 of file PiggyList.h.

268  {
269  return bl->get(cIndex);
270  };

References souffle::PiggyList< T >::iterator::bl, souffle::PiggyList< T >::iterator::cIndex, and souffle::PiggyList< T >::get().

Here is the call graph for this function:

◆ operator*() [2/2]

template<class T >
const T souffle::PiggyList< T >::iterator::operator* ( ) const
inline

Definition at line 271 of file PiggyList.h.

271  {
272  return bl->get(cIndex);
273  };

References souffle::PiggyList< T >::iterator::bl, souffle::PiggyList< T >::iterator::cIndex, and souffle::PiggyList< T >::get().

Here is the call graph for this function:

◆ operator++() [1/2]

template<class T >
iterator souffle::PiggyList< T >::iterator::operator++ ( )
inline

Definition at line 280 of file PiggyList.h.

280  {
281  iterator ret(*this);
282  ++cIndex;
283  return ret;
284  };

References souffle::PiggyList< T >::iterator::cIndex.

◆ operator++() [2/2]

template<class T >
iterator& souffle::PiggyList< T >::iterator::operator++ ( int  )
inline

Definition at line 275 of file PiggyList.h.

275  {
276  ++cIndex;
277  return *this;
278  };

References souffle::PiggyList< T >::iterator::cIndex.

◆ operator==()

template<class T >
bool souffle::PiggyList< T >::iterator::operator== ( const iterator x) const
inline

Definition at line 286 of file PiggyList.h.

286  {
287  return x.cIndex == this->cIndex && x.bl == this->bl;
288  };

References souffle::PiggyList< T >::iterator::bl, and souffle::PiggyList< T >::iterator::cIndex.

Field Documentation

◆ bl

template<class T >
PiggyList* souffle::PiggyList< T >::iterator::bl
private

◆ cIndex

template<class T >
size_t souffle::PiggyList< T >::iterator::cIndex = 0
private

The documentation for this class was generated from the following file:
souffle::PiggyList::get
T & get(size_t index) const
Retrieve a reference to the stored value at index.
Definition: PiggyList.h:235
souffle::PiggyList::iterator::iterator
iterator()=default
souffle::PiggyList::iterator::cIndex
size_t cIndex
Definition: PiggyList.h:256
souffle::PiggyList::iterator::bl
PiggyList * bl
Definition: PiggyList.h:257