Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
SkMetaData::Iter Class Reference

#include <SkMetaData.h>

Public Member Functions

 Iter ()
 
 Iter (const SkMetaData &)
 
void reset (const SkMetaData &)
 
const char * next (Type *, int *count)
 

Detailed Description

Definition at line 69 of file SkMetaData.h.

Constructor & Destructor Documentation

◆ Iter() [1/2]

SkMetaData::Iter::Iter ( )
inline

Definition at line 71 of file SkMetaData.h.

71: fRec(nullptr) {}

◆ Iter() [2/2]

SkMetaData::Iter::Iter ( const SkMetaData metadata)

Definition at line 219 of file SkMetaData.cpp.

219 {
220 fRec = metadata.fRec;
221}
Rec * fRec
Definition: SkMetaData.h:105

Member Function Documentation

◆ next()

const char * SkMetaData::Iter::next ( SkMetaData::Type t,
int count 
)

Each time next is called, it returns the name of the next data element, or null when there are no more elements. If non-null is returned, then the element's type is returned (if not null), and the number of data values is returned in count (if not null).

Definition at line 227 of file SkMetaData.cpp.

227 {
228 const char* name = nullptr;
229
230 if (fRec) {
231 if (t) {
232 *t = (SkMetaData::Type)fRec->fType;
233 }
234 if (count) {
235 *count = fRec->fDataCount;
236 }
237 name = fRec->name();
238
239 fRec = fRec->fNext;
240 }
241 return name;
242}
int count
Definition: FontMgrTest.cpp:50
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32
const char * name() const
Definition: SkMetaData.h:99
uint8_t fType
Definition: SkMetaData.h:95
uint16_t fDataCount
Definition: SkMetaData.h:93

◆ reset()

void SkMetaData::Iter::reset ( const SkMetaData metadata)

Reset the iterator, so that calling next() will return the first data element. This is done implicitly in the constructor.

Definition at line 223 of file SkMetaData.cpp.

223 {
224 fRec = metadata.fRec;
225}

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