Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
SkTInternalLList< T >::Iter Class Reference

#include <SkTInternalLList.h>

Public Types

enum  IterStart { kHead_IterStart , kTail_IterStart }
 

Public Member Functions

 Iter ()
 
 Iter (const Iter &iter)
 
Iteroperator= (const Iter &iter)
 
Tinit (const SkTInternalLList &list, IterStart startLoc)
 
Tget ()
 
Tnext ()
 
Tprev ()
 
bool operator!= (const Iter &that)
 
Toperator* ()
 
void operator++ ()
 

Detailed Description

template<class T>
class SkTInternalLList< T >::Iter

Definition at line 193 of file SkTInternalLList.h.

Member Enumeration Documentation

◆ IterStart

template<class T >
enum SkTInternalLList::Iter::IterStart
Enumerator
kHead_IterStart 
kTail_IterStart 

Definition at line 195 of file SkTInternalLList.h.

Constructor & Destructor Documentation

◆ Iter() [1/2]

template<class T >
SkTInternalLList< T >::Iter::Iter ( )
inline

Definition at line 200 of file SkTInternalLList.h.

200: fCurr(nullptr) {}

◆ Iter() [2/2]

template<class T >
SkTInternalLList< T >::Iter::Iter ( const Iter iter)
inline

Definition at line 201 of file SkTInternalLList.h.

201: fCurr(iter.fCurr) {}

Member Function Documentation

◆ get()

template<class T >
T * SkTInternalLList< T >::Iter::get ( )
inline

Definition at line 215 of file SkTInternalLList.h.

215{ return fCurr; }

◆ init()

template<class T >
T * SkTInternalLList< T >::Iter::init ( const SkTInternalLList list,
IterStart  startLoc 
)
inline

Definition at line 204 of file SkTInternalLList.h.

204 {
205 if (kHead_IterStart == startLoc) {
206 fCurr = list.fHead;
207 } else {
208 SkASSERT(kTail_IterStart == startLoc);
209 fCurr = list.fTail;
210 }
211
212 return fCurr;
213 }
#define SkASSERT(cond)
Definition SkAssert.h:116

◆ next()

template<class T >
T * SkTInternalLList< T >::Iter::next ( )
inline

Return the next/previous element in the list or NULL if at the end.

Definition at line 220 of file SkTInternalLList.h.

220 {
221 if (nullptr == fCurr) {
222 return nullptr;
223 }
224
225 fCurr = fCurr->fNext;
226 return fCurr;
227 }

◆ operator!=()

template<class T >
bool SkTInternalLList< T >::Iter::operator!= ( const Iter that)
inline

C++11 range-for interface.

Definition at line 241 of file SkTInternalLList.h.

241{ return fCurr != that.fCurr; }

◆ operator*()

template<class T >
T * SkTInternalLList< T >::Iter::operator* ( )
inline

Definition at line 242 of file SkTInternalLList.h.

242{ return this->get(); }

◆ operator++()

template<class T >
void SkTInternalLList< T >::Iter::operator++ ( )
inline

Definition at line 243 of file SkTInternalLList.h.

243{ this->next(); }

◆ operator=()

template<class T >
Iter & SkTInternalLList< T >::Iter::operator= ( const Iter iter)
inline

Definition at line 202 of file SkTInternalLList.h.

202{ fCurr = iter.fCurr; return *this; }

◆ prev()

template<class T >
T * SkTInternalLList< T >::Iter::prev ( )
inline

Definition at line 229 of file SkTInternalLList.h.

229 {
230 if (nullptr == fCurr) {
231 return nullptr;
232 }
233
234 fCurr = fCurr->fPrev;
235 return fCurr;
236 }

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