Flutter Engine
The Flutter Engine
Public Member Functions | Friends | List of all members
dart::DictionaryIterator Class Reference

#include <object.h>

Inheritance diagram for dart::DictionaryIterator:
dart::ValueObject dart::ClassDictionaryIterator

Public Member Functions

 DictionaryIterator (const Library &library)
 
bool HasNext () const
 
ObjectPtr GetNext ()
 
- Public Member Functions inherited from dart::ValueObject
 ValueObject ()
 
 ~ValueObject ()
 

Friends

class ClassDictionaryIterator
 

Detailed Description

Definition at line 5045 of file object.h.

Constructor & Destructor Documentation

◆ DictionaryIterator()

dart::DictionaryIterator::DictionaryIterator ( const Library library)
explicit

Definition at line 13502 of file object.cc.

13503 : array_(Array::Handle(library.dictionary())),
13504 // Last element in array is a Smi indicating the number of entries used.
13505 size_(Array::Handle(library.dictionary()).Length() - 1),
13506 next_ix_(0) {
13507 MoveToNextObject();
13508}
static Object & Handle()
Definition: object.h:407

Member Function Documentation

◆ GetNext()

ObjectPtr dart::DictionaryIterator::GetNext ( )

Definition at line 13510 of file object.cc.

13510 {
13511 ASSERT(HasNext());
13512 int ix = next_ix_++;
13513 MoveToNextObject();
13514 ASSERT(array_.At(ix) != Object::null());
13515 return array_.At(ix);
13516}
ObjectPtr At(intptr_t index) const
Definition: object.h:10875
bool HasNext() const
Definition: object.h:5049
static ObjectPtr null()
Definition: object.h:433
#define ASSERT(E)

◆ HasNext()

bool dart::DictionaryIterator::HasNext ( ) const
inline

Definition at line 5049 of file object.h.

5049{ return next_ix_ < size_; }

Friends And Related Function Documentation

◆ ClassDictionaryIterator

friend class ClassDictionaryIterator
friend

Definition at line 5061 of file object.h.


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