Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
skia_private::THashTable< T, K, Traits >::Iter< SlotVal > Class Template Reference

#include <SkTHash.h>

Public Types

using TTable = THashTable< T, K, Traits >
 

Public Member Functions

 Iter (const TTable *table, int slot)
 
const SlotVal & operator* () const
 
const SlotVal * operator-> () const
 
bool operator== (const Iter &that) const
 
bool operator!= (const Iter &that) const
 
Iteroperator++ ()
 
Iter operator++ (int)
 

Static Public Member Functions

static Iter MakeBegin (const TTable *table)
 
static Iter MakeEnd (const TTable *table)
 

Protected Attributes

const TTablefTable
 
int fSlot
 

Detailed Description

template<typename T, typename K, typename Traits = T>
template<typename SlotVal>
class skia_private::THashTable< T, K, Traits >::Iter< SlotVal >

Definition at line 206 of file SkTHash.h.

Member Typedef Documentation

◆ TTable

template<typename T , typename K , typename Traits = T>
template<typename SlotVal >
using skia_private::THashTable< T, K, Traits >::Iter< SlotVal >::TTable = THashTable<T, K, Traits>

Definition at line 208 of file SkTHash.h.

Constructor & Destructor Documentation

◆ Iter()

template<typename T , typename K , typename Traits = T>
template<typename SlotVal >
skia_private::THashTable< T, K, Traits >::Iter< SlotVal >::Iter ( const TTable table,
int  slot 
)
inline

Definition at line 210 of file SkTHash.h.

210: fTable(table), fSlot(slot) {}
SI F table(const skcms_Curve *curve, F v)

Member Function Documentation

◆ MakeBegin()

template<typename T , typename K , typename Traits = T>
template<typename SlotVal >
static Iter skia_private::THashTable< T, K, Traits >::Iter< SlotVal >::MakeBegin ( const TTable table)
inlinestatic

Definition at line 212 of file SkTHash.h.

212 {
213 return Iter{table, table->firstPopulatedSlot()};
214 }
Iter(const TTable *table, int slot)
Definition: SkTHash.h:210

◆ MakeEnd()

template<typename T , typename K , typename Traits = T>
template<typename SlotVal >
static Iter skia_private::THashTable< T, K, Traits >::Iter< SlotVal >::MakeEnd ( const TTable table)
inlinestatic

Definition at line 216 of file SkTHash.h.

216 {
217 return Iter{table, table->capacity()};
218 }

◆ operator!=()

template<typename T , typename K , typename Traits = T>
template<typename SlotVal >
bool skia_private::THashTable< T, K, Traits >::Iter< SlotVal >::operator!= ( const Iter< SlotVal > &  that) const
inline

Definition at line 234 of file SkTHash.h.

234 {
235 return !(*this == that);
236 }

◆ operator*()

template<typename T , typename K , typename Traits = T>
template<typename SlotVal >
const SlotVal & skia_private::THashTable< T, K, Traits >::Iter< SlotVal >::operator* ( ) const
inline

Definition at line 220 of file SkTHash.h.

220 {
221 return *fTable->slot(fSlot);
222 }

◆ operator++() [1/2]

template<typename T , typename K , typename Traits = T>
template<typename SlotVal >
Iter & skia_private::THashTable< T, K, Traits >::Iter< SlotVal >::operator++ ( )
inline

Definition at line 238 of file SkTHash.h.

238 {
239 fSlot = fTable->nextPopulatedSlot(fSlot);
240 return *this;
241 }

◆ operator++() [2/2]

template<typename T , typename K , typename Traits = T>
template<typename SlotVal >
Iter skia_private::THashTable< T, K, Traits >::Iter< SlotVal >::operator++ ( int  )
inline

Definition at line 243 of file SkTHash.h.

243 {
244 Iter old = *this;
245 this->operator++();
246 return old;
247 }

◆ operator->()

template<typename T , typename K , typename Traits = T>
template<typename SlotVal >
const SlotVal * skia_private::THashTable< T, K, Traits >::Iter< SlotVal >::operator-> ( ) const
inline

Definition at line 224 of file SkTHash.h.

224 {
225 return fTable->slot(fSlot);
226 }

◆ operator==()

template<typename T , typename K , typename Traits = T>
template<typename SlotVal >
bool skia_private::THashTable< T, K, Traits >::Iter< SlotVal >::operator== ( const Iter< SlotVal > &  that) const
inline

Definition at line 228 of file SkTHash.h.

228 {
229 // Iterators from different tables shouldn't be compared against each other.
230 SkASSERT(fTable == that.fTable);
231 return fSlot == that.fSlot;
232 }
#define SkASSERT(cond)
Definition: SkAssert.h:116

Member Data Documentation

◆ fSlot

template<typename T , typename K , typename Traits = T>
template<typename SlotVal >
int skia_private::THashTable< T, K, Traits >::Iter< SlotVal >::fSlot
protected

Definition at line 251 of file SkTHash.h.

◆ fTable

template<typename T , typename K , typename Traits = T>
template<typename SlotVal >
const TTable* skia_private::THashTable< T, K, Traits >::Iter< SlotVal >::fTable
protected

Definition at line 250 of file SkTHash.h.


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