Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
BlockIndexIterator< T, Forward, Const, Start, End, Next, Resolve >::Item Class Reference

#include <SkTBlockList.h>

Public Member Functions

bool operator!= (const Item &other) const
 
T operator* () const
 
Itemoperator++ ()
 

Detailed Description

template<typename T, bool Forward, bool Const, IndexFn Start, IndexFn End, NextFn Next, ItemFn< T, typename std::conditional< Const, const SkBlockAllocator::Block, SkBlockAllocator::Block >::type > Resolve>
class BlockIndexIterator< T, Forward, Const, Start, End, Next, Resolve >::Item

Definition at line 397 of file SkTBlockList.h.

Member Function Documentation

◆ operator!=()

template<typename T , bool Forward, bool Const, IndexFn Start, IndexFn End, NextFn Next, ItemFn< T, typename std::conditional< Const, const SkBlockAllocator::Block, SkBlockAllocator::Block >::type > Resolve>
bool BlockIndexIterator< T, Forward, Const, Start, End, Next, Resolve >::Item::operator!= ( const Item other) const
inline

Definition at line 399 of file SkTBlockList.h.

399 {
400 return other.fBlock != fBlock || (SkToBool(*fBlock) && other.fIndex != fIndex);
401 }
static constexpr bool SkToBool(const T &x)
Definition: SkTo.h:35

◆ operator*()

template<typename T , bool Forward, bool Const, IndexFn Start, IndexFn End, NextFn Next, ItemFn< T, typename std::conditional< Const, const SkBlockAllocator::Block, SkBlockAllocator::Block >::type > Resolve>
T BlockIndexIterator< T, Forward, Const, Start, End, Next, Resolve >::Item::operator* ( ) const
inline

Definition at line 403 of file SkTBlockList.h.

403 {
404 SkASSERT(*fBlock);
405 return Resolve(*fBlock, fIndex);
406 }
#define SkASSERT(cond)
Definition: SkAssert.h:116
static FunctionPtr Resolve(Thread *thread, Zone *zone, const GrowableArray< const Instance * > &caller_arguments, const Class &receiver_class, const String &name, const Array &descriptor)

◆ operator++()

template<typename T , bool Forward, bool Const, IndexFn Start, IndexFn End, NextFn Next, ItemFn< T, typename std::conditional< Const, const SkBlockAllocator::Block, SkBlockAllocator::Block >::type > Resolve>
Item & BlockIndexIterator< T, Forward, Const, Start, End, Next, Resolve >::Item::operator++ ( )
inline

Definition at line 408 of file SkTBlockList.h.

408 {
409 const auto* block = *fBlock;
410 SkASSERT(block && block->metadata() > 0);
411 SkASSERT((Forward && Next(block, fIndex) > fIndex) ||
412 (!Forward && Next(block, fIndex) < fIndex));
413 fIndex = Next(block, fIndex);
414 if ((Forward && fIndex > fEndIndex) || (!Forward && fIndex < fEndIndex)) {
415 ++fBlock;
416 this->setIndices();
417 }
418 return *this;
419 }

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