tvm
Public Types | Public Member Functions | List of all members
tvm::runtime::IterAdapter< Converter, TIter > Class Template Reference

iterator adapter that adapts TIter to return another type. More...

#include <base.h>

Collaboration diagram for tvm::runtime::IterAdapter< Converter, TIter >:

Public Types

using difference_type = typename std::iterator_traits< TIter >::difference_type
 
using value_type = typename Converter::ResultType
 
using pointer = typename Converter::ResultType *
 
using reference = typename Converter::ResultType &
 
using iterator_category = typename std::iterator_traits< TIter >::iterator_category
 

Public Member Functions

 IterAdapter (TIter iter)
 
IterAdapteroperator++ ()
 
IterAdapteroperator-- ()
 
IterAdapter operator++ (int)
 
IterAdapter operator-- (int)
 
IterAdapter operator+ (difference_type offset) const
 
IterAdapter operator- (difference_type offset) const
 
template<typename T = IterAdapter>
std::enable_if< std::is_same< iterator_category, std::random_access_iterator_tag >::value, typename T::difference_type >::type operator- (const IterAdapter &rhs) const
 
bool operator== (IterAdapter other) const
 
bool operator!= (IterAdapter other) const
 
const value_type operator* () const
 

Detailed Description

template<typename Converter, typename TIter>
class tvm::runtime::IterAdapter< Converter, TIter >

iterator adapter that adapts TIter to return another type.

Template Parameters
Convertera struct that contains converting function
TIterthe content iterator type.

Member Typedef Documentation

◆ difference_type

template<typename Converter , typename TIter >
using tvm::runtime::IterAdapter< Converter, TIter >::difference_type = typename std::iterator_traits<TIter>::difference_type

◆ iterator_category

template<typename Converter , typename TIter >
using tvm::runtime::IterAdapter< Converter, TIter >::iterator_category = typename std::iterator_traits<TIter>::iterator_category

◆ pointer

template<typename Converter , typename TIter >
using tvm::runtime::IterAdapter< Converter, TIter >::pointer = typename Converter::ResultType*

◆ reference

template<typename Converter , typename TIter >
using tvm::runtime::IterAdapter< Converter, TIter >::reference = typename Converter::ResultType&

◆ value_type

template<typename Converter , typename TIter >
using tvm::runtime::IterAdapter< Converter, TIter >::value_type = typename Converter::ResultType

Constructor & Destructor Documentation

◆ IterAdapter()

template<typename Converter , typename TIter >
tvm::runtime::IterAdapter< Converter, TIter >::IterAdapter ( TIter  iter)
inlineexplicit

Member Function Documentation

◆ operator!=()

template<typename Converter , typename TIter >
bool tvm::runtime::IterAdapter< Converter, TIter >::operator!= ( IterAdapter< Converter, TIter >  other) const
inline

◆ operator*()

template<typename Converter , typename TIter >
const value_type tvm::runtime::IterAdapter< Converter, TIter >::operator* ( ) const
inline

◆ operator+()

template<typename Converter , typename TIter >
IterAdapter tvm::runtime::IterAdapter< Converter, TIter >::operator+ ( difference_type  offset) const
inline

◆ operator++() [1/2]

template<typename Converter , typename TIter >
IterAdapter& tvm::runtime::IterAdapter< Converter, TIter >::operator++ ( )
inline

◆ operator++() [2/2]

template<typename Converter , typename TIter >
IterAdapter tvm::runtime::IterAdapter< Converter, TIter >::operator++ ( int  )
inline

◆ operator-() [1/2]

template<typename Converter , typename TIter >
template<typename T = IterAdapter>
std::enable_if<std::is_same<iterator_category, std::random_access_iterator_tag>::value, typename T::difference_type>::type tvm::runtime::IterAdapter< Converter, TIter >::operator- ( const IterAdapter< Converter, TIter > &  rhs) const
inline

◆ operator-() [2/2]

template<typename Converter , typename TIter >
IterAdapter tvm::runtime::IterAdapter< Converter, TIter >::operator- ( difference_type  offset) const
inline

◆ operator--() [1/2]

template<typename Converter , typename TIter >
IterAdapter& tvm::runtime::IterAdapter< Converter, TIter >::operator-- ( )
inline

◆ operator--() [2/2]

template<typename Converter , typename TIter >
IterAdapter tvm::runtime::IterAdapter< Converter, TIter >::operator-- ( int  )
inline

◆ operator==()

template<typename Converter , typename TIter >
bool tvm::runtime::IterAdapter< Converter, TIter >::operator== ( IterAdapter< Converter, TIter >  other) const
inline

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