Flutter Engine
The Flutter Engine
Classes | Public Member Functions | Static Public Attributes | List of all members
dart::ArrayOfTuplesView< EnumType, TupleT, kStartOffset > Class Template Reference

#include <object.h>

Classes

class  Iterator
 
class  TupleView
 

Public Member Functions

 ArrayOfTuplesView (const Array &array)
 
intptr_t Length () const
 
TupleView At (intptr_t i) const
 
TupleView operator[] (intptr_t i) const
 
Iterator begin () const
 
Iterator end () const
 

Static Public Attributes

static constexpr intptr_t EntrySize = std::tuple_size<TupleT>::value
 

Detailed Description

template<typename EnumType, typename TupleT, int kStartOffset = 0>
class dart::ArrayOfTuplesView< EnumType, TupleT, kStartOffset >

Definition at line 13462 of file object.h.

Constructor & Destructor Documentation

◆ ArrayOfTuplesView()

template<typename EnumType , typename TupleT , int kStartOffset = 0>
dart::ArrayOfTuplesView< EnumType, TupleT, kStartOffset >::ArrayOfTuplesView ( const Array array)
inlineexplicit

Definition at line 13519 of file object.h.

13519 : array_(array) {
13520 ASSERT(!array.IsNull());
13521 ASSERT(array.Length() >= kStartOffset);
13522 ASSERT(array.Length() % EntrySize == kStartOffset);
13523 }
static constexpr intptr_t EntrySize
Definition: object.h:13464
#define ASSERT(E)

Member Function Documentation

◆ At()

template<typename EnumType , typename TupleT , int kStartOffset = 0>
TupleView dart::ArrayOfTuplesView< EnumType, TupleT, kStartOffset >::At ( intptr_t  i) const
inline

Definition at line 13529 of file object.h.

13529 {
13530 return TupleView(array_, kStartOffset + i * EntrySize);
13531 }

◆ begin()

template<typename EnumType , typename TupleT , int kStartOffset = 0>
Iterator dart::ArrayOfTuplesView< EnumType, TupleT, kStartOffset >::begin ( ) const
inline

Definition at line 13535 of file object.h.

13535{ return Iterator(array_, kStartOffset); }

◆ end()

template<typename EnumType , typename TupleT , int kStartOffset = 0>
Iterator dart::ArrayOfTuplesView< EnumType, TupleT, kStartOffset >::end ( ) const
inline

Definition at line 13537 of file object.h.

13537 {
13538 return Iterator(array_, kStartOffset + Length() * EntrySize);
13539 }
intptr_t Length() const
Definition: object.h:13525

◆ Length()

template<typename EnumType , typename TupleT , int kStartOffset = 0>
intptr_t dart::ArrayOfTuplesView< EnumType, TupleT, kStartOffset >::Length ( ) const
inline

Definition at line 13525 of file object.h.

13525 {
13526 return (array_.Length() - kStartOffset) / EntrySize;
13527 }
intptr_t Length() const
Definition: object.h:10829

◆ operator[]()

template<typename EnumType , typename TupleT , int kStartOffset = 0>
TupleView dart::ArrayOfTuplesView< EnumType, TupleT, kStartOffset >::operator[] ( intptr_t  i) const
inline

Definition at line 13533 of file object.h.

13533{ return At(i); }
TupleView At(intptr_t i) const
Definition: object.h:13529

Member Data Documentation

◆ EntrySize

template<typename EnumType , typename TupleT , int kStartOffset = 0>
constexpr intptr_t dart::ArrayOfTuplesView< EnumType, TupleT, kStartOffset >::EntrySize = std::tuple_size<TupleT>::value
staticconstexpr

Definition at line 13464 of file object.h.


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