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

#include <Table.h>

Inheritance diagram for souffle::Table< T, blockSize >::iterator:
Inheritance graph
Collaboration diagram for souffle::Table< T, blockSize >::iterator:
Collaboration graph

Public Member Functions

 iterator (Block *block=nullptr, unsigned pos=0)
 
 iterator (const iterator &)=default
 
 iterator (iterator &&)=default
 
bool operator!= (const iterator &other) const
 
const T & operator* () const
 
iteratoroperator++ ()
 
iteratoroperator= (const iterator &)=default
 
bool operator== (const iterator &other) const
 

Private Attributes

Blockblock
 
unsigned pos
 

Detailed Description

template<typename T, unsigned blockSize = 4096>
class souffle::Table< T, blockSize >::iterator

Definition at line 66 of file Table.h.

Constructor & Destructor Documentation

◆ iterator() [1/3]

template<typename T , unsigned blockSize = 4096>
souffle::Table< T, blockSize >::iterator::iterator ( Block block = nullptr,
unsigned  pos = 0 
)
inline

Definition at line 71 of file Table.h.

74 {

◆ iterator() [2/3]

template<typename T , unsigned blockSize = 4096>
souffle::Table< T, blockSize >::iterator::iterator ( const iterator )
default

◆ iterator() [3/3]

template<typename T , unsigned blockSize = 4096>
souffle::Table< T, blockSize >::iterator::iterator ( iterator &&  )
default

Member Function Documentation

◆ operator!=()

template<typename T , unsigned blockSize = 4096>
bool souffle::Table< T, blockSize >::iterator::operator!= ( const iterator other) const
inline

Definition at line 83 of file Table.h.

91  : head(nullptr), tail(nullptr) {}

◆ operator*()

template<typename T , unsigned blockSize = 4096>
const T& souffle::Table< T, blockSize >::iterator::operator* ( ) const
inline

Definition at line 88 of file Table.h.

91  : head(nullptr), tail(nullptr) {}

◆ operator++()

template<typename T , unsigned blockSize = 4096>
iterator& souffle::Table< T, blockSize >::iterator::operator++ ( )
inline

Definition at line 93 of file Table.h.

93  {
94  clear();
95  }
96 
97  bool empty() const {
98  return (!head);
99  }
100 
101  std::size_t size() const {
102  return count;

References souffle::Table< T, blockSize >::clear().

Here is the call graph for this function:

◆ operator=()

template<typename T , unsigned blockSize = 4096>
iterator& souffle::Table< T, blockSize >::iterator::operator= ( const iterator )
default

◆ operator==()

template<typename T , unsigned blockSize = 4096>
bool souffle::Table< T, blockSize >::iterator::operator== ( const iterator other) const
inline

Definition at line 78 of file Table.h.

79  {
80  // move on in block

Field Documentation

◆ block

template<typename T , unsigned blockSize = 4096>
Block* souffle::Table< T, blockSize >::iterator::block
private

Definition at line 67 of file Table.h.

◆ pos

template<typename T , unsigned blockSize = 4096>
unsigned souffle::Table< T, blockSize >::iterator::pos
private

Definition at line 68 of file Table.h.


The documentation for this class was generated from the following file:
souffle::Table::size
std::size_t size() const
Definition: Table.h:115
souffle::Table::head
Block * head
Definition: Table.h:60
souffle::Table::empty
bool empty() const
Definition: Table.h:111
souffle::Table::count
std::size_t count
Definition: Table.h:63
souffle::Table::tail
Block * tail
Definition: Table.h:61
souffle::Table::clear
void clear()
Definition: Table.h:147