The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta::Pipeline< DataT, EventT >::PipelineIterator< is_const_iterator > Class Template Reference

An iterator class for Pipeline class. More...

#include <Pipeline.hpp>

Inheritance diagram for sparta::Pipeline< DataT, EventT >::PipelineIterator< is_const_iterator >:
Collaboration diagram for sparta::Pipeline< DataT, EventT >::PipelineIterator< is_const_iterator >:

Public Member Functions

 PipelineIterator (PipelinePointerType ptr)
 Constructor.
 
 PipelineIterator (PipelinePointerType ptr, uint32_t i)
 Constructor.
 
 PipelineIterator (const PipelineIterator< false > &rhs)
 Copy constructor.
 
 PipelineIterator (const PipelineIterator< true > &rhs)
 Copy constructor.
 
PipelineIteratoroperator= (const PipelineIterator &rhs)=default
 Copy assignment operator.
 
DataReferenceType operator* ()
 Override the dereferencing operator*.
 
DataPointerType operator-> ()
 Override the dereferencing operator->
 
PipelineIterator operator++ ()
 Override the pre-increment operator.
 
PipelineIterator operator++ (int)
 Override the pre-increment operator.
 
bool operator== (const PipelineIterator &rhs) const
 Override the comparison(equal) operator.
 
bool operator!= (const PipelineIterator &rhs) const
 Override the comparison(not equal) operator.
 
bool isValid () const
 Check the validity of the iterator.
 

Friends

class PipelineIterator< true >
 
class Pipeline
 

Additional Inherited Members

- Public Types inherited from sparta::utils::IteratorTraits< std::forward_iterator_tag, DataT >
using difference_type = long
 
using value_type = DataT
 
using pointer = const DataT *
 
using reference = const DataT &
 
using iterator_category = std::forward_iterator_tag
 

Detailed Description

template<typename DataT, typename EventT = PhasedUniqueEvent>
template<bool is_const_iterator = true>
class sparta::Pipeline< DataT, EventT >::PipelineIterator< is_const_iterator >

An iterator class for Pipeline class.

The PipelineIterator is a forward iterator. It could be instantiated as either a const iterator or a non-const iterator.

If the iterator is dereferenced with operator*(), a data-reference type is returned. If the iterator is dereferenced with operator->(), a data-pointer type is returned.

An assertion error will fire if the itertaor is dereferenced, but the pipeline stage referred to by the iterator is not valid.

Definition at line 101 of file Pipeline.hpp.

Constructor & Destructor Documentation

◆ PipelineIterator() [1/4]

template<typename DataT , typename EventT = PhasedUniqueEvent>
template<bool is_const_iterator = true>
sparta::Pipeline< DataT, EventT >::PipelineIterator< is_const_iterator >::PipelineIterator ( PipelinePointerType  ptr)
inline

Constructor.

Parameters
ptrPipeline pointer

Definition at line 122 of file Pipeline.hpp.

◆ PipelineIterator() [2/4]

template<typename DataT , typename EventT = PhasedUniqueEvent>
template<bool is_const_iterator = true>
sparta::Pipeline< DataT, EventT >::PipelineIterator< is_const_iterator >::PipelineIterator ( PipelinePointerType  ptr,
uint32_t  i 
)
inline

Constructor.

Parameters
ptrPipeline pointer
iPipeline stage number

Definition at line 130 of file Pipeline.hpp.

◆ PipelineIterator() [3/4]

template<typename DataT , typename EventT = PhasedUniqueEvent>
template<bool is_const_iterator = true>
sparta::Pipeline< DataT, EventT >::PipelineIterator< is_const_iterator >::PipelineIterator ( const PipelineIterator< false > &  rhs)
inline

Copy constructor.

Parameters
rhsPipelineIterator(non-const)
Note
Allow for implicit conversion from non-const to const iterator

Definition at line 139 of file Pipeline.hpp.

◆ PipelineIterator() [4/4]

template<typename DataT , typename EventT = PhasedUniqueEvent>
template<bool is_const_iterator = true>
sparta::Pipeline< DataT, EventT >::PipelineIterator< is_const_iterator >::PipelineIterator ( const PipelineIterator< true > &  rhs)
inline

Copy constructor.

Parameters
rhsPipelineIterator(const)

Definition at line 151 of file Pipeline.hpp.

Member Function Documentation

◆ isValid()

template<typename DataT , typename EventT = PhasedUniqueEvent>
template<bool is_const_iterator = true>
bool sparta::Pipeline< DataT, EventT >::PipelineIterator< is_const_iterator >::isValid ( ) const
inline

Check the validity of the iterator.

Returns
Returns false if the iterator is not valid

Definition at line 211 of file Pipeline.hpp.

◆ operator!=()

template<typename DataT , typename EventT = PhasedUniqueEvent>
template<bool is_const_iterator = true>
bool sparta::Pipeline< DataT, EventT >::PipelineIterator< is_const_iterator >::operator!= ( const PipelineIterator< is_const_iterator > &  rhs) const
inline

Override the comparison(not equal) operator.

Definition at line 204 of file Pipeline.hpp.

Here is the call graph for this function:

◆ operator*()

template<typename DataT , typename EventT = PhasedUniqueEvent>
template<bool is_const_iterator = true>
DataReferenceType sparta::Pipeline< DataT, EventT >::PipelineIterator< is_const_iterator >::operator* ( )
inline

Override the dereferencing operator*.

Definition at line 166 of file Pipeline.hpp.

Here is the call graph for this function:

◆ operator++() [1/2]

template<typename DataT , typename EventT = PhasedUniqueEvent>
template<bool is_const_iterator = true>
PipelineIterator sparta::Pipeline< DataT, EventT >::PipelineIterator< is_const_iterator >::operator++ ( )
inline

Override the pre-increment operator.

Definition at line 180 of file Pipeline.hpp.

◆ operator++() [2/2]

template<typename DataT , typename EventT = PhasedUniqueEvent>
template<bool is_const_iterator = true>
PipelineIterator sparta::Pipeline< DataT, EventT >::PipelineIterator< is_const_iterator >::operator++ ( int  )
inline

Override the pre-increment operator.

Definition at line 190 of file Pipeline.hpp.

Here is the call graph for this function:

◆ operator->()

template<typename DataT , typename EventT = PhasedUniqueEvent>
template<bool is_const_iterator = true>
DataPointerType sparta::Pipeline< DataT, EventT >::PipelineIterator< is_const_iterator >::operator-> ( )
inline

Override the dereferencing operator->

Definition at line 173 of file Pipeline.hpp.

Here is the call graph for this function:

◆ operator=()

template<typename DataT , typename EventT = PhasedUniqueEvent>
template<bool is_const_iterator = true>
PipelineIterator & sparta::Pipeline< DataT, EventT >::PipelineIterator< is_const_iterator >::operator= ( const PipelineIterator< is_const_iterator > &  rhs)
default

Copy assignment operator.

Parameters
rhsPipelineIterator(const or non-const)

◆ operator==()

template<typename DataT , typename EventT = PhasedUniqueEvent>
template<bool is_const_iterator = true>
bool sparta::Pipeline< DataT, EventT >::PipelineIterator< is_const_iterator >::operator== ( const PipelineIterator< is_const_iterator > &  rhs) const
inline

Override the comparison(equal) operator.

Definition at line 198 of file Pipeline.hpp.

Friends And Related Symbol Documentation

◆ Pipeline

template<typename DataT , typename EventT = PhasedUniqueEvent>
template<bool is_const_iterator = true>
friend class Pipeline
friend

Definition at line 115 of file Pipeline.hpp.

◆ PipelineIterator< true >

template<typename DataT , typename EventT = PhasedUniqueEvent>
template<bool is_const_iterator = true>
friend class PipelineIterator< true >
friend

Definition at line 1107 of file Pipeline.hpp.


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