KiCad PCB EDA Suite
MULTIVECTOR< T, FIRST_TYPE_VAL, LAST_TYPE_VAL >::ITERATOR_BASE< ITEM_TYPE, ITEM_CONTAINER, ITEM_CONTAINER_IT > Class Template Reference

Generic implementation of a flat const/non-const iterator over contained items.The non-const iterator. More...

#include <multivector.h>

Public Member Functions

ITEM_TYPE & operator * ()
 
ITEM_TYPE * operator-> ()
 
ITERATOR_BASEoperator++ ()
 
bool operator!= (const ITERATOR_BASE &aOther) const
 

Protected Member Functions

 ITERATOR_BASE (ITEM_CONTAINER *aItems, ITEM_CONTAINER_IT aIt, int aBucket, int aType=UNDEFINED_TYPE)
 Assures the iterator is in a valid state. More...
 
void validate ()
 Wrapped container. More...
 

Protected Attributes

ITEM_CONTAINER * m_parent
 Iterator for one of the ptr_vector containers stored in the array. More...
 
ITEM_CONTAINER_IT m_it
 Flag indicating whether type filtering is enabled. More...
 
bool m_filter
 Type of the currently iterated items. More...
 
int m_curType
 

Friends

class MULTIVECTOR
 

Detailed Description

template<typename T, int FIRST_TYPE_VAL, int LAST_TYPE_VAL>
template<typename ITEM_TYPE, typename ITEM_CONTAINER, typename ITEM_CONTAINER_IT>
class MULTIVECTOR< T, FIRST_TYPE_VAL, LAST_TYPE_VAL >::ITERATOR_BASE< ITEM_TYPE, ITEM_CONTAINER, ITEM_CONTAINER_IT >

Generic implementation of a flat const/non-const iterator over contained items.The non-const iterator.

Definition at line 70 of file multivector.h.

Constructor & Destructor Documentation

◆ ITERATOR_BASE()

template<typename T, int FIRST_TYPE_VAL, int LAST_TYPE_VAL>
template<typename ITEM_TYPE , typename ITEM_CONTAINER , typename ITEM_CONTAINER_IT >
MULTIVECTOR< T, FIRST_TYPE_VAL, LAST_TYPE_VAL >::ITERATOR_BASE< ITEM_TYPE, ITEM_CONTAINER, ITEM_CONTAINER_IT >::ITERATOR_BASE ( ITEM_CONTAINER *  aItems,
ITEM_CONTAINER_IT  aIt,
int  aBucket,
int  aType = UNDEFINED_TYPE 
)
inlineprotected

Assures the iterator is in a valid state.

Parameters
aItemsis the container to wrap.
aItis the iterator to initialize this iterator (usually some begin() or end() iterator).
aBucketis the type ID of the given iterator.
aTypeenables item type filtering. When aType is UNDEFINED_TYPE, there is no filtering and all item types are accessible by the iterator.

Definition at line 116 of file multivector.h.

References MULTIVECTOR< T, FIRST_TYPE_VAL, LAST_TYPE_VAL >::ITERATOR_BASE< ITEM_TYPE, ITEM_CONTAINER, ITEM_CONTAINER_IT >::m_filter, and MULTIVECTOR< T, FIRST_TYPE_VAL, LAST_TYPE_VAL >::UNDEFINED_TYPE.

Member Function Documentation

◆ operator *()

template<typename T, int FIRST_TYPE_VAL, int LAST_TYPE_VAL>
template<typename ITEM_TYPE , typename ITEM_CONTAINER , typename ITEM_CONTAINER_IT >
ITEM_TYPE& MULTIVECTOR< T, FIRST_TYPE_VAL, LAST_TYPE_VAL >::ITERATOR_BASE< ITEM_TYPE, ITEM_CONTAINER, ITEM_CONTAINER_IT >::operator * ( )
inline

Definition at line 73 of file multivector.h.

74  {
75  return *m_it;
76  }
ITEM_CONTAINER_IT m_it
Flag indicating whether type filtering is enabled.
Definition: multivector.h:151

References MULTIVECTOR< T, FIRST_TYPE_VAL, LAST_TYPE_VAL >::ITERATOR_BASE< ITEM_TYPE, ITEM_CONTAINER, ITEM_CONTAINER_IT >::m_it.

◆ operator!=()

template<typename T, int FIRST_TYPE_VAL, int LAST_TYPE_VAL>
template<typename ITEM_TYPE , typename ITEM_CONTAINER , typename ITEM_CONTAINER_IT >
bool MULTIVECTOR< T, FIRST_TYPE_VAL, LAST_TYPE_VAL >::ITERATOR_BASE< ITEM_TYPE, ITEM_CONTAINER, ITEM_CONTAINER_IT >::operator!= ( const ITERATOR_BASE< ITEM_TYPE, ITEM_CONTAINER, ITEM_CONTAINER_IT > &  aOther) const
inline

Definition at line 93 of file multivector.h.

94  {
95  if( aOther.m_parent != m_parent )
96  return true;
97 
98  if( aOther.m_filter != m_filter )
99  return true;
100 
101  if( aOther.m_curType != m_curType )
102  return true;
103 
104  return aOther.m_it != m_it;
105  }
bool m_filter
Type of the currently iterated items.
Definition: multivector.h:154
ITEM_CONTAINER * m_parent
Iterator for one of the ptr_vector containers stored in the array.
Definition: multivector.h:148
ITEM_CONTAINER_IT m_it
Flag indicating whether type filtering is enabled.
Definition: multivector.h:151

References MULTIVECTOR< T, FIRST_TYPE_VAL, LAST_TYPE_VAL >::ITERATOR_BASE< ITEM_TYPE, ITEM_CONTAINER, ITEM_CONTAINER_IT >::m_curType, MULTIVECTOR< T, FIRST_TYPE_VAL, LAST_TYPE_VAL >::ITERATOR_BASE< ITEM_TYPE, ITEM_CONTAINER, ITEM_CONTAINER_IT >::m_filter, MULTIVECTOR< T, FIRST_TYPE_VAL, LAST_TYPE_VAL >::ITERATOR_BASE< ITEM_TYPE, ITEM_CONTAINER, ITEM_CONTAINER_IT >::m_it, and MULTIVECTOR< T, FIRST_TYPE_VAL, LAST_TYPE_VAL >::ITERATOR_BASE< ITEM_TYPE, ITEM_CONTAINER, ITEM_CONTAINER_IT >::m_parent.

◆ operator++()

template<typename T, int FIRST_TYPE_VAL, int LAST_TYPE_VAL>
template<typename ITEM_TYPE , typename ITEM_CONTAINER , typename ITEM_CONTAINER_IT >
ITERATOR_BASE& MULTIVECTOR< T, FIRST_TYPE_VAL, LAST_TYPE_VAL >::ITERATOR_BASE< ITEM_TYPE, ITEM_CONTAINER, ITEM_CONTAINER_IT >::operator++ ( )
inline

◆ operator->()

template<typename T, int FIRST_TYPE_VAL, int LAST_TYPE_VAL>
template<typename ITEM_TYPE , typename ITEM_CONTAINER , typename ITEM_CONTAINER_IT >
ITEM_TYPE* MULTIVECTOR< T, FIRST_TYPE_VAL, LAST_TYPE_VAL >::ITERATOR_BASE< ITEM_TYPE, ITEM_CONTAINER, ITEM_CONTAINER_IT >::operator-> ( )
inline

Definition at line 78 of file multivector.h.

79  {
80  return &( *m_it );
81  }

◆ validate()

Friends And Related Function Documentation

◆ MULTIVECTOR

template<typename T, int FIRST_TYPE_VAL, int LAST_TYPE_VAL>
template<typename ITEM_TYPE , typename ITEM_CONTAINER , typename ITEM_CONTAINER_IT >
friend class MULTIVECTOR
friend

Definition at line 159 of file multivector.h.

Member Data Documentation

◆ m_curType

template<typename T, int FIRST_TYPE_VAL, int LAST_TYPE_VAL>
template<typename ITEM_TYPE , typename ITEM_CONTAINER , typename ITEM_CONTAINER_IT >
int MULTIVECTOR< T, FIRST_TYPE_VAL, LAST_TYPE_VAL >::ITERATOR_BASE< ITEM_TYPE, ITEM_CONTAINER, ITEM_CONTAINER_IT >::m_curType
protected

◆ m_filter

template<typename T, int FIRST_TYPE_VAL, int LAST_TYPE_VAL>
template<typename ITEM_TYPE , typename ITEM_CONTAINER , typename ITEM_CONTAINER_IT >
bool MULTIVECTOR< T, FIRST_TYPE_VAL, LAST_TYPE_VAL >::ITERATOR_BASE< ITEM_TYPE, ITEM_CONTAINER, ITEM_CONTAINER_IT >::m_filter
protected

◆ m_it

template<typename T, int FIRST_TYPE_VAL, int LAST_TYPE_VAL>
template<typename ITEM_TYPE , typename ITEM_CONTAINER , typename ITEM_CONTAINER_IT >
ITEM_CONTAINER_IT MULTIVECTOR< T, FIRST_TYPE_VAL, LAST_TYPE_VAL >::ITERATOR_BASE< ITEM_TYPE, ITEM_CONTAINER, ITEM_CONTAINER_IT >::m_it
protected

◆ m_parent

template<typename T, int FIRST_TYPE_VAL, int LAST_TYPE_VAL>
template<typename ITEM_TYPE , typename ITEM_CONTAINER , typename ITEM_CONTAINER_IT >
ITEM_CONTAINER* MULTIVECTOR< T, FIRST_TYPE_VAL, LAST_TYPE_VAL >::ITERATOR_BASE< ITEM_TYPE, ITEM_CONTAINER, ITEM_CONTAINER_IT >::m_parent
protected

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