libMesh
Public Member Functions | Private Attributes | List of all members
libMesh::QoISet::iterator Class Reference

#include <qoi_set.h>

Public Member Functions

 iterator (std::size_t i, const std::vector< bool > &v)
 
std::size_t operator* () const
 
iteratoroperator++ ()
 
iterator operator++ (int)
 
bool operator== (const iterator &other) const
 
bool operator!= (const iterator &other) const
 

Private Attributes

std::size_t _i
 
const std::vector< bool > & _vecbool
 

Detailed Description

Definition at line 48 of file qoi_set.h.

Constructor & Destructor Documentation

◆ iterator()

libMesh::QoISet::iterator::iterator ( std::size_t  i,
const std::vector< bool > &  v 
)
inline

Definition at line 51 of file qoi_set.h.

References _i, and _vecbool.

51  : _i(i), _vecbool(v)
52  {
53  while (_i < _vecbool.size() && !_vecbool[_i])
54  _i++;
55  }
const std::vector< bool > & _vecbool
Definition: qoi_set.h:90

Member Function Documentation

◆ operator!=()

bool libMesh::QoISet::iterator::operator!= ( const iterator other) const
inline

Definition at line 80 of file qoi_set.h.

References _i, and _vecbool.

81  {
82  libmesh_assert_equal_to (&_vecbool, &other._vecbool);
83  return _i != other._i;
84  }
const std::vector< bool > & _vecbool
Definition: qoi_set.h:90

◆ operator*()

std::size_t libMesh::QoISet::iterator::operator* ( ) const
inline

Definition at line 57 of file qoi_set.h.

References _i.

57 { return _i; }

◆ operator++() [1/2]

iterator& libMesh::QoISet::iterator::operator++ ( )
inline

Definition at line 59 of file qoi_set.h.

References _i, and _vecbool.

60  {
61  do {
62  _i++;
63  } while (_i < _vecbool.size() && !_vecbool[_i]);
64  return *this;
65  }
const std::vector< bool > & _vecbool
Definition: qoi_set.h:90

◆ operator++() [2/2]

iterator libMesh::QoISet::iterator::operator++ ( int  )
inline

Definition at line 67 of file qoi_set.h.

68  {
69  iterator it = *this;
70  ++(*this);
71  return it;
72  }
iterator(std::size_t i, const std::vector< bool > &v)
Definition: qoi_set.h:51

◆ operator==()

bool libMesh::QoISet::iterator::operator== ( const iterator other) const
inline

Definition at line 74 of file qoi_set.h.

References _i, and _vecbool.

75  {
76  libmesh_assert_equal_to (&_vecbool, &other._vecbool);
77  return _i == other._i;
78  }
const std::vector< bool > & _vecbool
Definition: qoi_set.h:90

Member Data Documentation

◆ _i

std::size_t libMesh::QoISet::iterator::_i
private

Definition at line 88 of file qoi_set.h.

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

◆ _vecbool

const std::vector<bool>& libMesh::QoISet::iterator::_vecbool
private

Definition at line 90 of file qoi_set.h.

Referenced by iterator(), operator!=(), operator++(), and operator==().


The documentation for this class was generated from the following file: