Data Structures Lerax  v3.0-102-gaf18
Opinionated Data Structures & Algorithms
Loading...
Searching...
No Matches
Iterator Struct Reference

A generic iterator struct. More...

#include <iterator.h>

Data Fields

void * container
void * begin
void *(* next )(struct Iterator *)
void(* free )(struct Iterator *)
bool(* done )(struct Iterator *)

Detailed Description

A generic iterator struct.

This struct provides a generic interface for iterating over a container.

Field Documentation

◆ begin

void* Iterator::begin

◆ container

void* Iterator::container

◆ done

bool(* Iterator::done) (struct Iterator *)

(optional) check logic if iterator is done

◆ free

void(* Iterator::free) (struct Iterator *)

(optional) free object

◆ next

void *(* Iterator::next) (struct Iterator *)

get current data and move container pointer to next


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