Generator

class zhetapi::Generator : public zhetapi::Set

Generator interface. Allows the inherited primitive types to be iterated through using for loops and “in” syntax.

ie. allows for:

for ([var] in [Generator])
    [code]

Subclassed by zhetapi::Collection, zhetapi::Dictionary

Public Functions

virtual Iterator *begin() = 0
Returns

the starting iterator.

virtual Iterator *next(Iterator *itr) = 0

Get the next iterator.

Parameters

itr – the current iterator.

Returns

the iterator ahead of the one passed, or nullptr if it was the end.