Flutter Engine
The Flutter Engine
Classes | Public Member Functions | List of all members
SkTDynamicHash< T, Key, Traits > Class Template Reference

#include <SkTDynamicHash.h>

Public Member Functions

 SkTDynamicHash ()
 
template<typename Fn >
void foreach (Fn &&fn)
 
template<typename Fn >
void foreach (Fn &&fn) const
 
int count () const
 
size_t approxBytesUsed () const
 
Tfind (const Key &key) const
 
void add (T *entry)
 
void remove (const Key &key)
 
void rewind ()
 
void reset ()
 

Detailed Description

template<typename T, typename Key, typename Traits = T>
class SkTDynamicHash< T, Key, Traits >

Definition at line 22 of file SkTDynamicHash.h.

Constructor & Destructor Documentation

◆ SkTDynamicHash()

template<typename T , typename Key , typename Traits = T>
SkTDynamicHash< T, Key, Traits >::SkTDynamicHash ( )
inline

Definition at line 24 of file SkTDynamicHash.h.

24{}

Member Function Documentation

◆ add()

template<typename T , typename Key , typename Traits = T>
void SkTDynamicHash< T, Key, Traits >::add ( T entry)
inline

Definition at line 44 of file SkTDynamicHash.h.

44{ fTable.set(entry); }

◆ approxBytesUsed()

template<typename T , typename Key , typename Traits = T>
size_t SkTDynamicHash< T, Key, Traits >::approxBytesUsed ( ) const
inline

Definition at line 40 of file SkTDynamicHash.h.

40{ return fTable.approxBytesUsed(); }
size_t approxBytesUsed() const
Definition: SkTHash.h:74

◆ count()

template<typename T , typename Key , typename Traits = T>
int SkTDynamicHash< T, Key, Traits >::count ( ) const
inline

Definition at line 38 of file SkTDynamicHash.h.

38{ return fTable.count(); }
int count() const
Definition: SkTHash.h:67

◆ find()

template<typename T , typename Key , typename Traits = T>
T * SkTDynamicHash< T, Key, Traits >::find ( const Key key) const
inline

Definition at line 42 of file SkTDynamicHash.h.

42{ return fTable.findOrNull(key); }
T findOrNull(const K &key) const
Definition: SkTHash.h:126

◆ foreach() [1/2]

template<typename T , typename Key , typename Traits = T>
template<typename Fn >
void SkTDynamicHash< T, Key, Traits >::foreach ( Fn &&  fn)
inline

Definition at line 30 of file SkTDynamicHash.h.

30 {
31 fTable.foreach([&](T** entry) { fn(*entry); });
32 }
void foreach(Fn &&fn)
Definition: SkTHash.h:184
#define T
Definition: precompiler.cc:65

◆ foreach() [2/2]

template<typename T , typename Key , typename Traits = T>
template<typename Fn >
void SkTDynamicHash< T, Key, Traits >::foreach ( Fn &&  fn) const
inline

Definition at line 34 of file SkTDynamicHash.h.

34 {
35 fTable.foreach([&](T* entry) { fn(*entry); });
36 }

◆ remove()

template<typename T , typename Key , typename Traits = T>
void SkTDynamicHash< T, Key, Traits >::remove ( const Key key)
inline

Definition at line 45 of file SkTDynamicHash.h.

45{ fTable.remove(key); }
void remove(const K &key)
Definition: SkTHash.h:157

◆ reset()

template<typename T , typename Key , typename Traits = T>
void SkTDynamicHash< T, Key, Traits >::reset ( )
inline

Definition at line 48 of file SkTDynamicHash.h.

48{ fTable.reset(); }

◆ rewind()

template<typename T , typename Key , typename Traits = T>
void SkTDynamicHash< T, Key, Traits >::rewind ( )
inline

Definition at line 47 of file SkTDynamicHash.h.

47{ fTable.reset(); }

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