Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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 195 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 197 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 199 of file SkTHash.h.

199: 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 201 of file SkTHash.h.

201 {
202 return Iter{table, table->firstPopulatedSlot()};
203 }
Iter(const TTable *table, int slot)
Definition SkTHash.h:199

◆ 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 205 of file SkTHash.h.

205 {
206 return Iter{table, table->capacity()};
207 }

◆ 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 223 of file SkTHash.h.

223 {
224 return !(*this == that);
225 }

◆ 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 209 of file SkTHash.h.

209 {
210 return *fTable->slot(fSlot);
211 }

◆ 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 227 of file SkTHash.h.

227 {
228 fSlot = fTable->nextPopulatedSlot(fSlot);
229 return *this;
230 }

◆ 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 232 of file SkTHash.h.

232 {
233 Iter old = *this;
234 this->operator++();
235 return old;
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 213 of file SkTHash.h.

213 {
214 return fTable->slot(fSlot);
215 }

◆ 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 217 of file SkTHash.h.

217 {
218 // Iterators from different tables shouldn't be compared against each other.
219 SkASSERT(fTable == that.fTable);
220 return fSlot == that.fSlot;
221 }
#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 240 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 239 of file SkTHash.h.


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